|
|
@ -15,6 +15,7 @@ import com.epmet.commons.tools.feign.ResultDataResolver; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; |
|
|
|
import com.epmet.commons.tools.scan.param.ImgScanParamDTO; |
|
|
|
import com.epmet.commons.tools.scan.param.ImgTaskDTO; |
|
|
@ -187,6 +188,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
|
|
|
|
/** |
|
|
|
* 事件管理-新增 |
|
|
|
* |
|
|
|
* @param formDTO |
|
|
|
*/ |
|
|
|
@Override |
|
|
@ -456,6 +458,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
|
|
|
|
/** |
|
|
|
* 事件管理-批量删除事件 |
|
|
|
* |
|
|
|
* @param ids |
|
|
|
*/ |
|
|
|
@Override |
|
|
@ -463,7 +466,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
public void delete(String[] ids) { |
|
|
|
//已立项、已转服务的事件删除时,同时删除关联的服务和项目
|
|
|
|
for (String id : ids) { |
|
|
|
IcEventEntity entity = baseDao.selectById(id); |
|
|
|
IcEventEntity entity = baseDao.selectByEventId(id); |
|
|
|
if (null == entity) { |
|
|
|
// throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"数据不存在","数据不存在");
|
|
|
|
continue; |
|
|
@ -731,6 +734,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询家属 |
|
|
|
* |
|
|
|
* @param idCard |
|
|
|
* @return |
|
|
|
*/ |
|
|
@ -779,7 +783,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void reply(IcEventReplyFormDTO formDTO) { |
|
|
|
//1.查询事件数据 判断是否允许回复
|
|
|
|
IcEventEntity entity = baseDao.selectById(formDTO.getIcEventId()); |
|
|
|
IcEventEntity entity = baseDao.selectByEventId(formDTO.getIcEventId()); |
|
|
|
if (null == entity || "1".equals(entity.getOperationType()) || "2".equals(entity.getOperationType())) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前事件不允许回复"); |
|
|
|
} |
|
|
@ -1214,6 +1218,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
|
|
|
|
/** |
|
|
|
* Desc: 定时任务自动评价 |
|
|
|
* |
|
|
|
* @param formDTO |
|
|
|
* @author zxc |
|
|
|
* @date 2022/5/18 16:35 |
|
|
@ -1238,6 +1243,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
|
|
|
|
/** |
|
|
|
* Desc: 处理未评价的icEvent |
|
|
|
* |
|
|
|
* @param customerId |
|
|
|
* @author zxc |
|
|
|
* @date 2022/5/18 16:52 |
|
|
@ -1266,7 +1272,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
public LinkedList<IcEventProcessListResultDTO> process(IcEventReplyFormDTO formDTO) { |
|
|
|
LinkedList<IcEventProcessListResultDTO> resultList = new LinkedList<IcEventProcessListResultDTO>(); |
|
|
|
//1.查询事件基础信息
|
|
|
|
IcEventEntity entity = baseDao.selectById(formDTO.getIcEventId()); |
|
|
|
IcEventEntity entity = baseDao.selectByEventId(formDTO.getIcEventId()); |
|
|
|
if (null == entity) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "事件不存在", "事件不存在"); |
|
|
|
} |
|
|
@ -1410,6 +1416,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
|
|
|
|
/** |
|
|
|
* Desc: 新增【随手拍、讲】 |
|
|
|
* |
|
|
|
* @param formDTO |
|
|
|
* @author zxc |
|
|
|
* @date 2022/5/19 13:38 |
|
|
@ -1485,6 +1492,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
|
|
|
|
/** |
|
|
|
* Desc: 给工作人员发送站内信 |
|
|
|
* |
|
|
|
* @param agencyId |
|
|
|
* @param customerId |
|
|
|
* @param showName |
|
|
@ -1521,6 +1529,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
|
|
|
|
/** |
|
|
|
* Desc: 附件处理 |
|
|
|
* |
|
|
|
* @param list |
|
|
|
* @param attachmentEntityList |
|
|
|
* @param id |
|
|
@ -1914,4 +1923,34 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
return ConvertUtils.sourceToTarget(list, IcEventDTO.class); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public EventRateResultDTO getEventRate(String orgId, String orgType) { |
|
|
|
return baseDao.getEventRate(getOrgPath(orgId, orgType)); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public EventAnalysisResultDTO getEventAnalysis(String orgId, String orgType) { |
|
|
|
EventAnalysisResultDTO dto = baseDao.getEventAnalysis(getOrgPath(orgId,orgType)); |
|
|
|
Result<Map<String, String>> categoryMap = govIssueOpenFeignClient.getCategoryMap(EpmetRequestHolder.getLoginUserCustomerId()); |
|
|
|
if (null != categoryMap && categoryMap.getData().size() > 0) { |
|
|
|
List<Map<String,Integer>> dataMap = baseDao.getAnalysis(getOrgPath(orgId,orgType)); |
|
|
|
if (null != dataMap && dataMap.size() > 0) { |
|
|
|
Map<String, Integer> merged = new HashMap<>(); |
|
|
|
dataMap.forEach(merged::putAll); |
|
|
|
dto.setCategoryCount(merged); |
|
|
|
} |
|
|
|
} |
|
|
|
return dto; |
|
|
|
} |
|
|
|
|
|
|
|
private String getOrgPath(String orgId, String orgType) { |
|
|
|
if (OrgInfoConstant.AGENCY.equals(orgType)) { // 行政组织
|
|
|
|
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(orgId); |
|
|
|
return PidUtils.convertPid2OrgIdPath(agencyInfo.getId(), agencyInfo.getPids()); |
|
|
|
} else {// 网格
|
|
|
|
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(orgId); |
|
|
|
return PidUtils.convertPid2OrgIdPath(gridInfo.getId(), gridInfo.getPids()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|