|
|
@ -290,7 +290,6 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
if (categoryEntity != null) { |
|
|
|
icEventCategoryService.insert(categoryEntity); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
//3-4.操作记录数据保存
|
|
|
|
List<IcEventOperationLogEntity> logList = new ArrayList<>(); |
|
|
@ -668,28 +667,29 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
icEventReplyService.insert(replyEntity); |
|
|
|
|
|
|
|
//4.判断新增或修改分类数据
|
|
|
|
if (StringUtils.isNotBlank(formDTO.getOperationType())) { |
|
|
|
if (StringUtils.isNotBlank(formDTO.getCategoryId())) { |
|
|
|
//查询分类信息
|
|
|
|
List<String> categoryList = new ArrayList<>(); |
|
|
|
categoryList.add(formDTO.getCategoryId()); |
|
|
|
CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryList); |
|
|
|
AtomicReference<IcEventCategoryEntity> categoryEntity = null; |
|
|
|
category.getCategoryList().forEach(ca -> { |
|
|
|
IcEventCategoryEntity categoryEntity = null; |
|
|
|
for (IssueProjectCategoryDictDTO ca : category.getCategoryList()){ |
|
|
|
if (ca.getId().equals(formDTO.getCategoryId())) { |
|
|
|
categoryEntity.set(new IcEventCategoryEntity()); |
|
|
|
categoryEntity.get().setCustomerId(formDTO.getCustomerId()); |
|
|
|
categoryEntity.get().setIcEventId(entity.getId()); |
|
|
|
categoryEntity.get().setCategoryId(ca.getId()); |
|
|
|
categoryEntity.get().setCategoryPids(ca.getPids()); |
|
|
|
categoryEntity.get().setCategoryCode(ca.getCategoryCode()); |
|
|
|
categoryEntity = new IcEventCategoryEntity(); |
|
|
|
categoryEntity.setCustomerId(formDTO.getCustomerId()); |
|
|
|
categoryEntity.setIcEventId(entity.getId()); |
|
|
|
categoryEntity.setCategoryId(ca.getId()); |
|
|
|
categoryEntity.setCategoryPids(ca.getPids()); |
|
|
|
categoryEntity.setCategoryCode(ca.getCategoryCode()); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
IcEventCategoryEntity icEventCategory = icEventCategoryService.getByEventId(formDTO.getIcEventId()); |
|
|
|
if (null == category) { |
|
|
|
icEventCategoryService.insert(categoryEntity.get()); |
|
|
|
icEventCategoryService.insert(categoryEntity); |
|
|
|
} else { |
|
|
|
categoryEntity.get().setId(icEventCategory.getId()); |
|
|
|
icEventCategoryService.updateById(categoryEntity.get()); |
|
|
|
categoryEntity.setId(icEventCategory.getId()); |
|
|
|
icEventCategoryService.updateById(categoryEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -840,17 +840,19 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
resultDTO.setSourceTypeName(statusMap.get(resultDTO.getSourceType())); |
|
|
|
} |
|
|
|
//每个事件对应的图片数据
|
|
|
|
List<String> imageList = new ArrayList<>(); |
|
|
|
List<String> voiceList = new ArrayList<>(); |
|
|
|
resultDTO.getAttachmentList().forEach(file -> { |
|
|
|
if ("image".equals(file.getType())) { |
|
|
|
imageList.add(file.getUrl()); |
|
|
|
} else if ("voice".equals(file.getType())) { |
|
|
|
voiceList.add(file.getUrl()); |
|
|
|
} |
|
|
|
}); |
|
|
|
resultDTO.setImageList(imageList); |
|
|
|
resultDTO.setVoiceList(voiceList); |
|
|
|
if(!CollectionUtils.isEmpty(resultDTO.getAttachmentList())){ |
|
|
|
List<String> imageList = new ArrayList<>(); |
|
|
|
List<String> voiceList = new ArrayList<>(); |
|
|
|
resultDTO.getAttachmentList().forEach(file -> { |
|
|
|
if ("image".equals(file.getType())) { |
|
|
|
imageList.add(file.getUrl()); |
|
|
|
} else if ("voice".equals(file.getType())) { |
|
|
|
voiceList.add(file.getUrl()); |
|
|
|
} |
|
|
|
}); |
|
|
|
resultDTO.setImageList(imageList); |
|
|
|
resultDTO.setVoiceList(voiceList); |
|
|
|
} |
|
|
|
|
|
|
|
//分类信息
|
|
|
|
if(StringUtils.isNotBlank(resultDTO.getCategoryId())){ |
|
|
|