Browse Source

服务项目微调附件字段

master
zxc 3 years ago
parent
commit
3dfe378ae0
  1. 4
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java
  2. 15
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java

4
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java

@ -35,21 +35,25 @@ public class IcServiceProjectAttachmentDTO implements Serializable {
* 附件名 * 附件名
*/ */
private String attachmentName; private String attachmentName;
private String name;
/** /**
* 文件格式JPGPNGPDFJPEGBMPMP4WMAM4AMP3DOCDOCXXLS * 文件格式JPGPNGPDFJPEGBMPMP4WMAM4AMP3DOCDOCXXLS
*/ */
private String attachmentFormat; private String attachmentFormat;
private String format;
/** /**
* 附件类型图片 - image 视频 - video 语音 - voice 文档 - doc * 附件类型图片 - image 视频 - video 语音 - voice 文档 - doc
*/ */
private String attachmentType; private String attachmentType;
private String type;
/** /**
* 附件地址 * 附件地址
*/ */
private String attachmentUrl; private String attachmentUrl;
private String url;
/** /**
* 排序字段 * 排序字段

15
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java

@ -178,6 +178,15 @@ public class IcServiceProjectServiceImpl extends BaseServiceImpl<IcServiceProjec
public ServiceProjectListResultDTO serviceProjectDetail(ServiceProjectListFormDTO formDTO) { public ServiceProjectListResultDTO serviceProjectDetail(ServiceProjectListFormDTO formDTO) {
List<ServiceProjectListResultDTO> serviceProjectList = baseDao.getServiceProjectList(formDTO); List<ServiceProjectListResultDTO> serviceProjectList = baseDao.getServiceProjectList(formDTO);
if (CollectionUtils.isNotEmpty(serviceProjectList)){ if (CollectionUtils.isNotEmpty(serviceProjectList)){
DictListFormDTO dictListFormDTO = new DictListFormDTO();
dictListFormDTO.setDictType("ic_service_type");
Result<List<DictListResultDTO>> listResult = adminOpenFeignClient.dictList(dictListFormDTO);
if (!listResult.success()){
throw new EpmetException("获取字典表数据失败,类型为:ic_service_type");
}
if (CollectionUtils.isNotEmpty(listResult.getData())){
serviceProjectList.forEach(p -> listResult.getData().stream().filter(l -> l.getValue().equals(p.getServiceCategoryKey())).forEach(l -> p.setServiceCategory(l.getLabel())));
}
return serviceProjectList.get(NumConstant.ZERO); return serviceProjectList.get(NumConstant.ZERO);
} }
return new ServiceProjectListResultDTO(); return new ServiceProjectListResultDTO();
@ -226,6 +235,12 @@ public class IcServiceProjectServiceImpl extends BaseServiceImpl<IcServiceProjec
* @date 2022/5/30 10:17 * @date 2022/5/30 10:17
*/ */
public void disposeAttachment(List<IcServiceProjectAttachmentDTO> attachmentList,String customerId,String serviceId){ public void disposeAttachment(List<IcServiceProjectAttachmentDTO> attachmentList,String customerId,String serviceId){
attachmentList.forEach(a -> {
a.setAttachmentName(a.getName());
a.setAttachmentFormat(a.getFormat());
a.setAttachmentType(a.getType());
a.setAttachmentUrl(a.getUrl());
});
List<IcServiceProjectAttachmentEntity> entities = ConvertUtils.sourceToTarget(attachmentList, IcServiceProjectAttachmentEntity.class); List<IcServiceProjectAttachmentEntity> entities = ConvertUtils.sourceToTarget(attachmentList, IcServiceProjectAttachmentEntity.class);
Integer sort = NumConstant.ZERO; Integer sort = NumConstant.ZERO;
for (IcServiceProjectAttachmentEntity e : entities) { for (IcServiceProjectAttachmentEntity e : entities) {

Loading…
Cancel
Save