Browse Source

房东信息查看功能

develop
zhangyuan 4 years ago
parent
commit
9074321af5
  1. 17
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java
  2. 11
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentTenantInfoServiceImpl.java
  3. 3
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentTenantInfoDao.xml

17
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java

@ -122,26 +122,27 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
RentContractInfoEntity entity = baseDao.selectById(id); RentContractInfoEntity entity = baseDao.selectById(id);
RentContractInfoDTO dto = ConvertUtils.sourceToTarget(entity, RentContractInfoDTO.class); RentContractInfoDTO dto = ConvertUtils.sourceToTarget(entity, RentContractInfoDTO.class);
// 取出租客信息
Map<String, Object> params = new HashMap<>(4); Map<String, Object> params = new HashMap<>(4);
params.put("contractId", id); params.put("contractId", id);
// 取出租客信息
List<RentTenantInfoDTO> tenantList = rentTenantInfoService.list(params); List<RentTenantInfoDTO> tenantList = rentTenantInfoService.list(params);
tenantList.forEach(item -> { tenantList.forEach(item -> {
// 租客信息补充照片信息 // 租客信息补充照片信息
params.put("referenceId", item.getId()); Map<String, Object> imgParams = new HashMap<>(4);
params.put("fileType", NumConstant.ZERO_STR); imgParams.put("referenceId", item.getId());
List<RentContractFileDTO> imgList = rentContractFileService.list(params); imgParams.put("fileType", NumConstant.ZERO_STR);
List<RentContractFileDTO> imgList = rentContractFileService.list(imgParams);
item.setImgList(imgList); item.setImgList(imgList);
}); });
dto.setTenantList(tenantList); dto.setTenantList(tenantList);
dto.setTenantNum(tenantList.size()); dto.setTenantNum(tenantList.size());
params.put("referenceId", dto.getId());
params.put("fileType", NumConstant.ONE_STR);
// 取出合同文件信息 // 取出合同文件信息
List<RentContractFileDTO> fileList = rentContractFileService.list(params); Map<String, Object> fileParams = new HashMap<>(4);
fileParams.put("referenceId", dto.getId());
fileParams.put("fileType", NumConstant.ONE_STR);
List<RentContractFileDTO> fileList = rentContractFileService.list(fileParams);
dto.setFileList(fileList); dto.setFileList(fileList);
return dto; return dto;

11
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentTenantInfoServiceImpl.java

@ -12,6 +12,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IcResiUserAttachmentDTO; import com.epmet.dto.IcResiUserAttachmentDTO;
import com.epmet.dto.form.RentTenantFormDTO; import com.epmet.dto.form.RentTenantFormDTO;
import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.plugin.power.dto.rent.RentContractFileDTO;
import com.epmet.plugin.power.dto.rent.RentTenantInfoDTO; import com.epmet.plugin.power.dto.rent.RentTenantInfoDTO;
import com.epmet.plugin.power.modules.rent.dao.RentTenantInfoDao; import com.epmet.plugin.power.modules.rent.dao.RentTenantInfoDao;
import com.epmet.plugin.power.modules.rent.entity.RentContractFileEntity; import com.epmet.plugin.power.modules.rent.entity.RentContractFileEntity;
@ -87,8 +88,16 @@ public class RentTenantInfoServiceImpl extends BaseServiceImpl<RentTenantInfoDao
@Override @Override
public RentTenantInfoDTO get(String id) { public RentTenantInfoDTO get(String id) {
RentTenantInfoDTO dto;
RentTenantInfoEntity entity = baseDao.selectById(id); RentTenantInfoEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, RentTenantInfoDTO.class); dto = ConvertUtils.sourceToTarget(entity, RentTenantInfoDTO.class);
// 补充照片信息
Map<String, Object> params = new HashMap<>(4);
params.put("referenceId", id);
params.put("fileType", NumConstant.ZERO_STR);
List<RentContractFileDTO> imgList = rentContractFileService.list(params);
dto.setImgList(imgList);
return dto;
} }
@Override @Override

3
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentTenantInfoDao.xml

@ -62,5 +62,8 @@
<if test="idCard != null and idCard != ''"> <if test="idCard != null and idCard != ''">
AND ID_CARD LIKE concat('%', #{idCard}, '%') AND ID_CARD LIKE concat('%', #{idCard}, '%')
</if> </if>
ORDER BY
UPDATED_TIME DESC,
CREATED_TIME DESC
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save