Browse Source

增加新的附件字段

feature/visit_zhy
zhangyuan 3 years ago
parent
commit
b0962b02c5
  1. 7
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentContractInfoDTO.java
  2. 2
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentContractFileEntity.java
  3. 15
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java

7
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentContractInfoDTO.java

@ -198,11 +198,16 @@ public class RentContractInfoDTO implements Serializable {
private List<RentTenantInfoDTO> tenantList;
/**
* 附件列表
* 附件列表图片
*/
@NotEmpty
private List<RentContractFileDTO> fileList;
/**
* 附件列表文件
*/
private List<RentContractFileDTO> docList;
/**
* 中介资料
*/

2
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentContractFileEntity.java

@ -32,7 +32,7 @@ public class RentContractFileEntity extends BaseEpmetEntity {
private String fileUrl;
/**
* 文件类型 0图片人脸/头像1 文件合同2 身份证照片3 中介资料
* 文件类型 0图片人脸/头像1 文件合同照片2 身份证照片3 中介资料4 文件其他文档
*/
private String fileType;

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

@ -175,6 +175,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
// 取出合同文件信息
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;
}
@ -390,7 +391,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
});
}
// 附件处理
// 图片附件处理
if (null == dto.getFileList() || dto.getFileList().isEmpty()) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "合同附件不能为空");
} else {
@ -403,6 +404,17 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
rentContractFileService.insertBatch(fileList);
}
// 文件附件处理
if (null != dto.getDocList() && dto.getDocList().size() > 0) {
List<RentContractFileEntity> fileList = ConvertUtils.sourceToTarget(dto.getDocList(), RentContractFileEntity.class);
fileList.forEach(item -> {
item.setReferenceId(contractId);
item.setFileType(NumConstant.FOUR_STR);
item.setCustomerId(loginUserUtil.getLoginUserCustomerId());
});
rentContractFileService.insertBatch(fileList);
}
// 中介资料处理
if (null != dto.getAgencyImgList() && dto.getAgencyImgList().size() > 0) {
List<RentContractFileEntity> fileList = ConvertUtils.sourceToTarget(dto.getAgencyImgList(), RentContractFileEntity.class);
@ -413,6 +425,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
});
rentContractFileService.insertBatch(fileList);
}
}
}

Loading…
Cancel
Save