|
|
@ -178,6 +178,15 @@ public class IcServiceProjectServiceImpl extends BaseServiceImpl<IcServiceProjec |
|
|
|
public ServiceProjectListResultDTO serviceProjectDetail(ServiceProjectListFormDTO formDTO) { |
|
|
|
List<ServiceProjectListResultDTO> serviceProjectList = baseDao.getServiceProjectList(formDTO); |
|
|
|
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 new ServiceProjectListResultDTO(); |
|
|
@ -226,6 +235,12 @@ public class IcServiceProjectServiceImpl extends BaseServiceImpl<IcServiceProjec |
|
|
|
* @date 2022/5/30 10:17 |
|
|
|
*/ |
|
|
|
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); |
|
|
|
Integer sort = NumConstant.ZERO; |
|
|
|
for (IcServiceProjectAttachmentEntity e : entities) { |
|
|
|