diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/PliRentContractInfoLogDTO.java b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/PliRentContractInfoLogDTO.java index bdaea3c..0db967b 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/PliRentContractInfoLogDTO.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/PliRentContractInfoLogDTO.java @@ -19,8 +19,12 @@ package com.epmet.plugin.power.dto.rent; import java.io.Serializable; import java.util.Date; +import java.util.List; + import lombok.Data; +import javax.validation.constraints.NotEmpty; + /** * 合同记录表 @@ -228,4 +232,31 @@ public class PliRentContractInfoLogDTO implements Serializable { */ private String isPcInput; + /** + * 租客列表 + */ + @NotEmpty + private List tenantList; + + /** + * 附件列表(图片) + */ + @NotEmpty + private List fileList; + + /** + * 附件列表(文件) + */ + private List docList; + + /** + * 中介资料 + */ + private List agencyImgList; + + /** + * 租户数 + */ + private Integer tenantNum; + } diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/PliRentContractInfoLogController.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/PliRentContractInfoLogController.java index 9fd74f7..4ffd34f 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/PliRentContractInfoLogController.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/PliRentContractInfoLogController.java @@ -55,7 +55,7 @@ public class PliRentContractInfoLogController { return new Result>().ok(page); } - @GetMapping("{id}") + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) public Result get(@PathVariable("id") String id){ PliRentContractInfoLogDTO data = pliRentContractInfoLogService.get(id); return new Result().ok(data); diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/PliRentContractInfoLogServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/PliRentContractInfoLogServiceImpl.java index 822442f..c911279 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/PliRentContractInfoLogServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/PliRentContractInfoLogServiceImpl.java @@ -21,21 +21,27 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.plugin.power.dto.rent.PliRentContractInfoLogDTO; import com.epmet.plugin.power.dto.rent.RentContractInfoDTO; +import com.epmet.plugin.power.dto.rent.RentTenantInfoDTO; import com.epmet.plugin.power.modules.rent.dao.PliRentContractInfoLogDao; import com.epmet.plugin.power.modules.rent.entity.PliRentContractInfoLogEntity; +import com.epmet.plugin.power.modules.rent.entity.RentContractInfoEntity; import com.epmet.plugin.power.modules.rent.redis.PliRentContractInfoLogRedis; import com.epmet.plugin.power.modules.rent.service.PliRentContractInfoLogService; +import com.epmet.plugin.power.modules.rent.service.RentContractFileService; +import com.epmet.plugin.power.modules.rent.service.RentTenantInfoService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -54,6 +60,12 @@ public class PliRentContractInfoLogServiceImpl extends BaseServiceImpl page(Map params) { // IPage page = baseDao.selectPage( @@ -90,8 +102,31 @@ public class PliRentContractInfoLogServiceImpl extends BaseServiceImpl params = new HashMap<>(4); + params.put("contractId", id); + List tenantList = rentTenantInfoService.list(params); + + tenantList.forEach(item -> { + // 租客信息补充照片信息 + item.setImgList(rentContractFileService.listByRefAndType(item.getId(), NumConstant.ZERO_STR)); + // 租客信息补充身份证照片信息 + item.setIdCardImgList(rentContractFileService.listByRefAndType(item.getId(), NumConstant.TWO_STR)); + }); + dto.setTenantList(tenantList); + dto.setTenantNum(tenantList.size()); + + // 取出合同文件信息 + dto.setFileList(rentContractFileService.listByRefAndType(dto.getId(), NumConstant.ONE_STR)); + dto.setAgencyImgList(rentContractFileService.listByRefAndType(dto.getId(), NumConstant.THREE_STR)); + dto.setDocList(rentContractFileService.listByRefAndType(dto.getId(), NumConstant.FOUR_STR)); + + return dto; } @Override