|
|
@ -135,12 +135,12 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
//每个事件对应的图片数据
|
|
|
|
if(!CollectionUtils.isEmpty(dto.getAttachmentList())){ |
|
|
|
List<String> imageList = new ArrayList<>(); |
|
|
|
List<String> voiceList = new ArrayList<>(); |
|
|
|
List<IcEventListResultDTO.Attachment> voiceList = new ArrayList<>(); |
|
|
|
for(IcEventListResultDTO.Attachment file: dto.getAttachmentList()){ |
|
|
|
if ("image".equals(file.getType())) { |
|
|
|
imageList.add(file.getUrl()); |
|
|
|
} else if ("voice".equals(file.getType())) { |
|
|
|
voiceList.add(file.getUrl()); |
|
|
|
voiceList.add(file); |
|
|
|
} |
|
|
|
} |
|
|
|
dto.setImageList(imageList); |
|
|
@ -993,7 +993,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
|
|
|
|
/** |
|
|
|
* @Author sun |
|
|
|
* @Description 事件管理-评价 |
|
|
|
* @Description 事件管理-详情 |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
public IcEventListResultDTO detail(IcEventListFormDTO formDTO) { |
|
|
@ -1022,12 +1022,12 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
//每个事件对应的图片数据
|
|
|
|
if(!CollectionUtils.isEmpty(resultDTO.getAttachmentList())){ |
|
|
|
List<String> imageList = new ArrayList<>(); |
|
|
|
List<String> voiceList = new ArrayList<>(); |
|
|
|
List<IcEventListResultDTO.Attachment> 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()); |
|
|
|
voiceList.add(file); |
|
|
|
} |
|
|
|
}); |
|
|
|
resultDTO.setImageList(imageList); |
|
|
@ -1212,6 +1212,27 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
logEntity.setActualServiceTime(formDTO.getActualServiceTime()); |
|
|
|
icEventOperationLogService.insert(logEntity); |
|
|
|
} |
|
|
|
|
|
|
|
//4.判断来源居民端的事件,需求、项目结案时给居民推送站内信
|
|
|
|
if("0".equals(entity.getSourceType())){ |
|
|
|
List<UserMessageFormDTO> msgList = new ArrayList<>(); |
|
|
|
UserMessageFormDTO messageFormDTO = new UserMessageFormDTO(); |
|
|
|
messageFormDTO.setCustomerId(formDTO.getCustomerId()); |
|
|
|
messageFormDTO.setApp(ProjectConstant.RESI); |
|
|
|
messageFormDTO.setGridId(entity.getGridId()); |
|
|
|
messageFormDTO.setUserId(entity.getCreatedBy()); |
|
|
|
messageFormDTO.setTitle(UserMessageConstant.EVENT_TITILE); |
|
|
|
messageFormDTO.setMessageContent(String.format("您上报的事件已完成,请查看。")); |
|
|
|
messageFormDTO.setReadFlag(Constant.UNREAD); |
|
|
|
messageFormDTO.setMessageType(UserMessageTypeConstant.IC_EVENT); |
|
|
|
messageFormDTO.setTargetId(entity.getId()); |
|
|
|
msgList.add(messageFormDTO); |
|
|
|
Result sendMessageRes = messageOpenFeignClient.saveUserMessageList(msgList); |
|
|
|
if (!sendMessageRes.success()) { |
|
|
|
log.warn(String.format("事件回复,给居民端用户发送站内信异常,事件Id->%s", entity.getId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -1458,6 +1479,35 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
logEntity.setActionDesc(ResiEventAction.REPLY.getDesc()); |
|
|
|
logEntity.setOperateTime(new Date()); |
|
|
|
icEventOperationLogService.insert(logEntity); |
|
|
|
// 4.给工作端社区的人发送消息:山东路168号-张先生对事件进行了新的回复,请查看
|
|
|
|
noticeStaffResiReply(entity.getAgencyId(),entity.getCustomerId(),replyEntity.getUserShowName(),entity.getId()); |
|
|
|
} |
|
|
|
|
|
|
|
public void noticeStaffResiReply(String agencyId,String customerId,String showName,String icEventId){ |
|
|
|
// 查询组织下的所有工作人员
|
|
|
|
AgencyIdFormDTO formDTO = new AgencyIdFormDTO(); |
|
|
|
formDTO.setAgencyId(agencyId); |
|
|
|
Result<List<String>> agencyStaffsResult = govOrgOpenFeignClient.getAgencyStaffs(formDTO); |
|
|
|
if (!agencyStaffsResult.success()){ |
|
|
|
throw new EpmetException("查询组织下工作人员失败..."); |
|
|
|
} |
|
|
|
if (!CollectionUtils.isEmpty(agencyStaffsResult.getData())){ |
|
|
|
List<UserMessageFormDTO> msgList = new ArrayList<>(); |
|
|
|
agencyStaffsResult.getData().forEach(u -> { |
|
|
|
UserMessageFormDTO msg = new UserMessageFormDTO(); |
|
|
|
msg.setUserId(u); |
|
|
|
msg.setCustomerId(customerId); |
|
|
|
msg.setTargetId(icEventId); |
|
|
|
msg.setGridId("*"); |
|
|
|
msg.setApp(AppClientConstant.APP_GOV); |
|
|
|
msg.setMessageType(UserMessageTypeConstant.IC_EVENT); |
|
|
|
msg.setReadFlag(ReadFlagConstant.UN_READ); |
|
|
|
msg.setTitle("您有一条事件消息"); |
|
|
|
msg.setMessageContent(showName+"对事件进行了新的回复,请查看。"); |
|
|
|
msgList.add(msg); |
|
|
|
}); |
|
|
|
messageOpenFeignClient.saveUserMessageList(msgList); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|