|
|
@ -22,7 +22,6 @@ import com.epmet.commons.tools.scan.result.SyncScanResult; |
|
|
|
import com.epmet.commons.tools.utils.*; |
|
|
|
import com.epmet.constant.*; |
|
|
|
import com.epmet.dao.IcEventDao; |
|
|
|
import com.epmet.dao.ProjectDao; |
|
|
|
import com.epmet.dto.*; |
|
|
|
import com.epmet.dto.form.*; |
|
|
|
import com.epmet.dto.form.demand.DemandRecId; |
|
|
@ -95,10 +94,6 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
private EpmetMessageOpenFeignClient messageOpenFeignClient; |
|
|
|
@Autowired |
|
|
|
private ProjectSatisfactionDetailService projectSatisfactionDetailService; |
|
|
|
@Autowired |
|
|
|
private ProjectDao projectDao; |
|
|
|
@Autowired |
|
|
|
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
|
|
|
|
|
|
|
|
|
|
|
public CustomerStaffInfoCacheResult getStaffInfo(String customerId,String staffId){ |
|
|
@ -1586,17 +1581,6 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
baseDao.updateById(entity); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<ReplyListResultDTO> icEventReplyList(ReplyListFormDTO formDTO) { |
|
|
|
List<ReplyListResultDTO> list = baseDao.selectReplyList(formDTO.getResiEventId()); |
|
|
|
list.forEach(dto -> { |
|
|
|
if (dto.getReplyUserId().equals(formDTO.getCurrentUserId())) { |
|
|
|
dto.setReplyName("我"); |
|
|
|
} |
|
|
|
}); |
|
|
|
return list; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<PageUserReportEventResDTO> icEventPageUserReported(PageUserReportEventFormDTO formDTO) { |
|
|
|
if (org.apache.commons.collections4.CollectionUtils.isEmpty(formDTO.getEpmetUserIdList())) { |
|
|
@ -1607,67 +1591,4 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
return new PageData<>(pageInfo.getList(), pageInfo.getTotal()); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public EventDetailResultDTO icEventDetailForIcData(String icEventId) { |
|
|
|
EventDetailResultDTO dto = baseDao.selectEventDetail(icEventId); |
|
|
|
if (null == dto) { |
|
|
|
return new EventDetailResultDTO(); |
|
|
|
} |
|
|
|
//附件按类型分组【图片、语音】
|
|
|
|
List<String> eventImgs = new ArrayList<>(); |
|
|
|
List<FileCommonDTO> voiceList = new ArrayList<>(); |
|
|
|
dto.getAttachmentList().forEach(file -> { |
|
|
|
if ("image".equals(file.getType())) { |
|
|
|
eventImgs.add(file.getUrl()); |
|
|
|
} else if ("voice".equals(file.getType())) { |
|
|
|
FileCommonDTO fl = new FileCommonDTO(); |
|
|
|
fl.setUrl(file.getUrl()); |
|
|
|
fl.setDuration(file.getDuration()); |
|
|
|
voiceList.add(fl); |
|
|
|
} |
|
|
|
}); |
|
|
|
dto.setEventImgs(eventImgs); |
|
|
|
dto.setVoiceList(voiceList); |
|
|
|
|
|
|
|
// 已转项目
|
|
|
|
if (dto.getIsProject()) { |
|
|
|
// 查询项目信息
|
|
|
|
EventProjectInfoDTO eventProjectInfo = projectDao.selectEventProjectInfo(dto.getProjectId()); |
|
|
|
// 查询操作人的名字
|
|
|
|
Result<String> staffName = govOrgOpenFeignClient.staffName(eventProjectInfo.getUserId()); |
|
|
|
if (!staffName.success()) { |
|
|
|
throw new RenException("查询工作人员名字失败"); |
|
|
|
} |
|
|
|
eventProjectInfo.setOperationName(staffName.getData()); |
|
|
|
dto.setProjectInfo(eventProjectInfo); |
|
|
|
} |
|
|
|
// 查询报事人名字
|
|
|
|
List<String> userIdList = new ArrayList<>(); |
|
|
|
userIdList.add(dto.getEventUserId()); |
|
|
|
Result<List<UserBaseInfoResultDTO>> userResult = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); |
|
|
|
if (!userResult.success() || CollectionUtils.isEmpty(userResult.getData())) { |
|
|
|
throw new RenException("查询当前用户信息异常"); |
|
|
|
} |
|
|
|
userResult.getData().forEach(u -> { |
|
|
|
if (u.getUserId().equals(dto.getEventUserId())) { |
|
|
|
dto.setEventPeopleName(u.getUserShowName()); |
|
|
|
} |
|
|
|
}); |
|
|
|
// 查询所属网格
|
|
|
|
Result<String> gridNameResult = govOrgOpenFeignClient.gridName(dto.getGridId()); |
|
|
|
if (!gridNameResult.success()) { |
|
|
|
throw new RenException("查询所属网格失败"); |
|
|
|
} |
|
|
|
dto.setGridName(gridNameResult.getData()); |
|
|
|
// 查询报事的org
|
|
|
|
List<String> orgNameList = dto.getOrgNameList(); |
|
|
|
Result<List<String>> orgResult = govOrgOpenFeignClient.selectOrgNameByType(orgNameList); |
|
|
|
if (!orgResult.success()) { |
|
|
|
throw new RenException("查询组织名称失败"); |
|
|
|
} |
|
|
|
List<String> data = orgResult.getData(); |
|
|
|
dto.setEventOrg(data); |
|
|
|
return dto; |
|
|
|
} |
|
|
|
|
|
|
|
} |