|
|
|
@ -29,10 +29,7 @@ import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.OrganizationTypeConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.RocketMqConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.enums.CityPushEnum; |
|
|
|
import com.elink.esua.epdc.commons.tools.enums.CityPushLinkEnum; |
|
|
|
import com.elink.esua.epdc.commons.tools.enums.InterfaceLogBusinessTypeEnum; |
|
|
|
import com.elink.esua.epdc.commons.tools.enums.YesOrNoEnum; |
|
|
|
import com.elink.esua.epdc.commons.tools.enums.*; |
|
|
|
import com.elink.esua.epdc.commons.tools.exception.RenException; |
|
|
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
|
|
|
import com.elink.esua.epdc.commons.tools.redis.RedisKeys; |
|
|
|
@ -709,7 +706,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
data.setId(entity.getId()); |
|
|
|
data.setJjcd(CityPushEnum.JJCD_YB.getCode()); |
|
|
|
data.setSqly(CityPushEnum.SQLY_WLFS.getCode()); |
|
|
|
data.setSqzt(CityPushEnum.SQZT_DPQ.getCode()); |
|
|
|
data.setSqzt(CityPushStateEnum.DCL.getCode()); |
|
|
|
data.setSbqs(CityPushEnum.SBQS_SB.getCode()); |
|
|
|
data.setDqclhj(CityPushLinkEnum.DJ.getCode()); |
|
|
|
//执法诉求所属街道的市中心编码
|
|
|
|
@ -1624,10 +1621,6 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
// pushToCityGridService.AppealReporting(handleProcessEntity.getId(), NumConstant.ZERO_STR);
|
|
|
|
// 发送菜单消息-待处理项目-吹哨部门
|
|
|
|
this.sendWhistlingDeptItemHandleMenuNotice(deptIds, null); |
|
|
|
pushToCityGridService.appealHandling(ConvertUtils.sourceToTarget(handleProcessEntity, ItemHandleProcessDTO.class)); |
|
|
|
// 诉求审核,上报市平台
|
|
|
|
ItemHandleProcessDTO d = ConvertUtils.sourceToTarget(handleProcessEntity, ItemHandleProcessDTO.class); |
|
|
|
new DataReport().myRun(d, "2"); |
|
|
|
//pushToCityGridService.appealAudit(handleProcessEntity.getId());
|
|
|
|
log.info("处理项目-结案申请-if结束"); |
|
|
|
} else { |
|
|
|
@ -1831,9 +1824,19 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
} |
|
|
|
//工作端 根据不同的处理方式,进行短信通知
|
|
|
|
this.workProjectHandle(dto); |
|
|
|
|
|
|
|
if (ItemHandleCategoryEnum.HANDLE_CLOSING_CASE_APPLY.getValue() == dto.getHandleCategory()) { |
|
|
|
// 诉求处理,上报市平台
|
|
|
|
pushToCityGridService.appealHandling(ConvertUtils.sourceToTarget(handleProcessEntity, ItemHandleProcessDTO.class)); |
|
|
|
// 诉求审核,上报市平台
|
|
|
|
//itemAutoProcessRedis.produce(handleProcessEntity.getId().concat(":3"), System.currentTimeMillis() + (131 * 1000));
|
|
|
|
//ItemHandleProcessDTO d = ConvertUtils.sourceToTarget(handleProcessEntity, ItemHandleProcessDTO.class);
|
|
|
|
//new DataReport().myRun(d, "2");
|
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
|
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@ -2966,15 +2969,17 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
if (ItemGridPlatformHandleStatusEnum.HANDLE_PQ.getValue() == dto.getState()) { |
|
|
|
pushToCityGridService.appealDispatch(dto);//2.2 诉求派遣
|
|
|
|
//pushToCityGridService.dispatchAudit(dto);//2.4 派遣审核
|
|
|
|
new DataReport().myRun(dto, "1"); |
|
|
|
//new DataReport().myRun(dto, "1");
|
|
|
|
itemAutoProcessRedis.produce(dto.getId().concat(":4"), System.currentTimeMillis() + (131 * 1000)); |
|
|
|
} else if (ItemGridPlatformHandleStatusEnum.HANDLE_CZ.getValue() == dto.getState()) { |
|
|
|
if ("区中心".equals(dto.getGridNextpartname())) { |
|
|
|
if ("区中心".equals(dto.getGridNextunitname()) || "区中心".equals(dto.getGridNextpartname())) { |
|
|
|
// 诉求上报
|
|
|
|
pushToCityGridService.appealReporting(dto.getId(), NumConstant.ONE_STR); |
|
|
|
} else { |
|
|
|
pushToCityGridService.appealDispatch(dto);//2.2 诉求派遣
|
|
|
|
//pushToCityGridService.dispatchAudit(dto);//2.4 派遣审核
|
|
|
|
new DataReport().myRun(dto, "1"); |
|
|
|
//new DataReport().myRun(dto, "1");
|
|
|
|
itemAutoProcessRedis.produce(dto.getId().concat(":4"), System.currentTimeMillis() + (131 * 1000)); |
|
|
|
} |
|
|
|
} else if (ItemGridPlatformHandleStatusEnum.HANDLE_TD.getValue() == dto.getState()) { |
|
|
|
pushToCityGridService.rebut(dto);//2.8 诉求退件
|
|
|
|
@ -2992,6 +2997,9 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
} else if (ItemGridPlatformHandleStatusEnum.HANDLE_ZF.getValue() == dto.getState()) { |
|
|
|
// 诉求废弃
|
|
|
|
pushToCityGridService.appealScrap(dto); |
|
|
|
} else if (ItemGridPlatformHandleStatusEnum.HANDLE_HT.getValue() == dto.getState()) { |
|
|
|
// 诉求审核不通过
|
|
|
|
pushToCityGridService.appealAudit(dto.getId(), NumConstant.ZERO_STR); |
|
|
|
} |
|
|
|
// 网格化平台,处置完成、延期申请、申请办结、向上申请
|
|
|
|
if (ItemGridPlatformHandleStatusEnum.HANDLE_CL.getValue() == dto.getState() || |
|
|
|
@ -3005,28 +3013,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
pushToCityGridService.appealHandling(dto); |
|
|
|
// 诉求审核,上报市平台
|
|
|
|
//pushToCityGridService.appealAudit(dto.getId());
|
|
|
|
new DataReport().myRun(dto, "2"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public class DataReport { |
|
|
|
public void myRun(ItemHandleProcessDTO dto, String type) { |
|
|
|
new Thread(new Runnable() { |
|
|
|
@SneakyThrows |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
try { |
|
|
|
Thread.sleep(131000); |
|
|
|
if ("1".equals(type)) { |
|
|
|
pushToCityGridService.dispatchAudit(dto);//2.4 派遣审核
|
|
|
|
} else if ("2".equals(type)) { |
|
|
|
pushToCityGridService.appealAudit(dto.getId()); // 诉求审核
|
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
}).start(); |
|
|
|
//itemAutoProcessRedis.produce(dto.getId().concat(":3"), System.currentTimeMillis() + (131 * 1000));
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -3393,8 +3380,8 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
data.setSqbm(entity.getSerialNum()); |
|
|
|
data.setJjcd(CityPushEnum.JJCD_YB.getCode()); |
|
|
|
data.setSqly(CityPushEnum.SQLY_WLFS.getCode()); |
|
|
|
data.setSqzt(CityPushEnum.SQZT_DPQ.getCode()); |
|
|
|
data.setDqclhj(CityPushEnum.DQCLHJ_DJ.getCode()); |
|
|
|
data.setSqzt(CityPushStateEnum.YJA.getCode()); |
|
|
|
data.setDqclhj(CityPushLinkEnum.SQCL.getCode()); |
|
|
|
data.setSbqs(CityPushEnum.SBQS_SB.getCode()); |
|
|
|
//民生诉求所属网格对应的所属社区的市中心编码
|
|
|
|
String code = ""; |
|
|
|
@ -3460,7 +3447,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
data.setId(entity.getId()); |
|
|
|
data.setJjcd(CityPushEnum.JJCD_YB.getCode()); |
|
|
|
data.setSqly(CityPushEnum.SQLY_WLFS.getCode()); |
|
|
|
data.setSqzt(CityPushEnum.SQZT_DPQ.getCode()); |
|
|
|
data.setSqzt(CityPushStateEnum.DCL.getCode()); |
|
|
|
data.setSbqs(CityPushEnum.SBQS_SB.getCode()); |
|
|
|
data.setDqclhj(CityPushLinkEnum.DJ.getCode()); |
|
|
|
//执法诉求所属街道的市中心编码
|
|
|
|
@ -3525,7 +3512,6 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
pushToCityGridServiceImpl.saveLog(entity.getId(), null, "诉求登记-发展", PushToCityGridConstant.CASE_DEVELOP, JSONObject.toJSONString(data), resultString); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @param params |
|
|
|
* @return |
|
|
|
@ -3762,6 +3748,15 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
sendItemToDsf(dto, process); |
|
|
|
} |
|
|
|
itemHandleProcessDao.insert(process); |
|
|
|
|
|
|
|
if (NumConstant.ZERO_STR.equals(formDto.getCheckFlag())) { |
|
|
|
// 社区审批,上报市平台
|
|
|
|
pushToCityGridService.appealHandling(ConvertUtils.sourceToTarget(process, ItemHandleProcessDTO.class)); |
|
|
|
// 诉求审核,上报市平台
|
|
|
|
//itemAutoProcessRedis.produce(process.getId().concat(":3"), System.currentTimeMillis() + (131 * 1000));
|
|
|
|
//ItemHandleProcessDTO d = ConvertUtils.sourceToTarget(process, ItemHandleProcessDTO.class);
|
|
|
|
//new DataReport().myRun(d, "2");
|
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@ -3809,27 +3804,6 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
new PullProcess().myRun(dto.getId()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 拉去项目在网格化平台的进展 |
|
|
|
* 单独启动线程,在上报接口完成后十秒再去拉去 |
|
|
|
*/ |
|
|
|
public class PullProcess { |
|
|
|
public void myRun(String id) { |
|
|
|
new Thread(new Runnable() { |
|
|
|
@SneakyThrows |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
try { |
|
|
|
Thread.sleep(10000); |
|
|
|
queryItemHandle(id); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
}).start(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private EventRejectDoResultDto eventsRejectDo(ItemHandleSubmitFormDTO dto, String recid) throws Exception { |
|
|
|
ItemEntity entity = baseDao.selectById(dto.getId()); |
|
|
|
// 组装上报信息(图片和处理流程)
|
|
|
|
@ -3988,17 +3962,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
//3.将数据放入redis,供24小时候定时任务自动结案使用
|
|
|
|
itemAutoProcessRedis.produce(itemPlat.getReferenceId(), itemHandleProcessDto.getCreatedTime().getTime() + (24 * 60 * 60 * 1000)); |
|
|
|
} |
|
|
|
try { |
|
|
|
//网格化平台结案/驳回操作增加的推送数据到市平台逻辑报错不能影响原有程序流程
|
|
|
|
if ("1".equals(formDto.getState())) { |
|
|
|
// 上报驳回,上报市平台
|
|
|
|
log.info("上报驳回,上报市平台" + itemHandleProcessDto.getId()); |
|
|
|
pushToCityGridService.reportRejection(itemHandleProcessDto.getId()); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("网格化平台驳回操作,发送事件数据到市中心错误,诉求项目Id->" + itemHandleProcessDto.getItemId()); |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
|
|
|
|
//项目处理意见图片保存
|
|
|
|
if (formDto.getImages() != null && formDto.getImages().size() > 0) { |
|
|
|
imgService.saveImages(formDto.getImages(), itemHandleProcessDto.getId(), ImageConstant.TYPE_IMAGE_ITEM_OUT_HANDLE); |
|
|
|
@ -4020,6 +3984,23 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
districtContentNote.put(item.getMobile(),noteParams);*/ |
|
|
|
sendShortMessage(districtMobiles, districtContentNote); |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
//网格化平台结案/驳回操作增加的推送数据到市平台逻辑报错不能影响原有程序流程
|
|
|
|
if ("1".equals(formDto.getState())) { |
|
|
|
//诉求审核不同意,上报市平台
|
|
|
|
//pushToCityGridService.appealAudit(itemHandleProcessDto.getId(), NumConstant.ZERO_STR);
|
|
|
|
// 上报驳回,上报市平台
|
|
|
|
//log.info("上报驳回,上报市平台" + itemHandleProcessDto.getId());
|
|
|
|
//pushToCityGridService.reportRejection(itemHandleProcessDto.getId());
|
|
|
|
} else { |
|
|
|
//诉求审核同意,上报市平台
|
|
|
|
pushToCityGridService.appealAudit(itemHandleProcessDto.getId(), NumConstant.ONE_STR); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("网格化平台驳回操作,发送事件数据到市中心错误,诉求项目Id->" + itemHandleProcessDto.getItemId()); |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
return new Result().ok("操作成功"); |
|
|
|
} |
|
|
|
|
|
|
|
@ -4029,7 +4010,8 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
* @param mobiles |
|
|
|
* @param contentNoteList |
|
|
|
*/ |
|
|
|
public void sendShortMessage(List<String> mobiles, Map<String, LinkedHashMap<String, String>> contentNoteList) { |
|
|
|
public void sendShortMessage |
|
|
|
(List<String> mobiles, Map<String, LinkedHashMap<String, String>> contentNoteList) { |
|
|
|
SmsNoticeFormDTO smsNoticeFormDTO = new SmsNoticeFormDTO(); |
|
|
|
smsNoticeFormDTO.setMobiles(mobiles); |
|
|
|
/*smsNoticeFormDTO.setNoteContent(contentNoteList); |
|
|
|
@ -4146,7 +4128,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
pushToCityGridService.reportRejection(itemHandleProcessDto.getId()); |
|
|
|
} else if ("0".equals(formDto.getState())) { |
|
|
|
// 诉求审核,上报市平台
|
|
|
|
pushToCityGridService.appealAudit(itemHandleProcessDto.getId()); |
|
|
|
pushToCityGridService.appealAudit(itemHandleProcessDto.getId(), NumConstant.ONE_STR); |
|
|
|
// 诉求结案,上报市平台
|
|
|
|
pushToCityGridService.caseClosedSentoCity(itemHandleProcessDto.getId()); |
|
|
|
log.info("诉求结案,上报市平台"); |
|
|
|
@ -4216,7 +4198,6 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
return list.stream().collect(Collectors.toMap(ItemHandleProcessDTO::getItemId, ItemHandleProcessDTO::getHandlerDeptId, (key1, key2) -> key2)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 获取机构编码 |
|
|
|
* |
|
|
|
@ -4510,13 +4491,49 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 定时任务:是否可以结案处理 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void itemClosed(String itemId, String type) { |
|
|
|
logger.info("开始执行结案操作,项目Id->" + itemId); |
|
|
|
public void itemClosed(String id, String type) { |
|
|
|
log.info("开始执行结案操作,Id->" + id + ",type->" + type); |
|
|
|
|
|
|
|
//根据type判断要走的流程
|
|
|
|
if (StringUtils.isBlank(type) || NumConstant.ONE_STR.equals(type)) { |
|
|
|
//诉求评价
|
|
|
|
evaluate(id); |
|
|
|
} else if (NumConstant.TWO_STR.equals(type)) { |
|
|
|
//诉求结案
|
|
|
|
//二次放入缓存取出的数据此时已经上报了评价接口,并且已经评价了,走结案
|
|
|
|
closed(id); |
|
|
|
} else if (NumConstant.THREE_STR.equals(type)) { |
|
|
|
//诉求审核
|
|
|
|
ItemHandleProcessEntity processEntity = itemHandleProcessDao.selectById(id); |
|
|
|
if (ItemGridPlatformHandleStatusEnum.HANDLE_BH.getValue() == processEntity.getState()) { |
|
|
|
pushToCityGridService.appealAudit(id, NumConstant.ZERO_STR); |
|
|
|
} else { |
|
|
|
pushToCityGridService.appealAudit(id, NumConstant.ONE_STR); |
|
|
|
} |
|
|
|
} else if (NumConstant.FOUR_STR.equals(type)) { |
|
|
|
//派遣审核
|
|
|
|
ItemHandleProcessEntity processEntity = itemHandleProcessDao.selectById(id); |
|
|
|
pushToCityGridService.dispatchAudit(ConvertUtils.sourceToTarget(processEntity, ItemHandleProcessDTO.class)); |
|
|
|
} else if (NumConstant.FIVE_STR.equals(type)) { |
|
|
|
//社区吹哨,上报市平台
|
|
|
|
pushToCityGridService.appealReporting(id, NumConstant.ZERO_STR); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 结案 |
|
|
|
* |
|
|
|
* @Param itemId |
|
|
|
* @Return |
|
|
|
* @Author zhaoqifeng |
|
|
|
* @Date 2022/11/3 10:47 |
|
|
|
*/ |
|
|
|
private void closed(String itemId) { |
|
|
|
//1.获取项目基础数据
|
|
|
|
ItemEntity entity = baseDao.selectById(itemId); |
|
|
|
if (null == entity) { |
|
|
|
@ -4531,88 +4548,105 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
wrapper.eq("item_id", itemId); |
|
|
|
wrapper.eq("del_flag", "0"); |
|
|
|
List<ItemCommentFeedbackEntity> feedbackEntityList = itemCommentFeedbackDao.selectList(wrapper); |
|
|
|
ItemHandleProcessDTO processDTO = new ItemHandleProcessDTO(); |
|
|
|
//3.判断走评价还是走结案
|
|
|
|
if (StringUtils.isBlank(type) || "1".equals(type)) { |
|
|
|
//首次放入缓存取出的数据先走评价
|
|
|
|
//3-1.没有评价的赋默认评价值
|
|
|
|
if (null == entity.getEvaluationScore() || null == entity.getEvaluationTime()) { |
|
|
|
entity.setEvaluationScore(2); |
|
|
|
//item.setEvaluationContent();
|
|
|
|
entity.setEvaluationTime(new Date()); |
|
|
|
entity.setEvaluationState("0"); |
|
|
|
updateById(entity); |
|
|
|
} |
|
|
|
//诉求评价
|
|
|
|
pushToCityGridService.evaluation(itemId); |
|
|
|
|
|
|
|
//3-2.只有首次评价的判断是发展、执法诉求的(这两个诉求项目必须走诉求初验终验逻辑)或者是评价了不满意的民生诉求的需要走市里的初验申请
|
|
|
|
if (CollUtil.isEmpty(feedbackEntityList) && (!"0".equals(entity.getPeopleFlag()) || (null != entity.getEvaluationScore() && entity.getEvaluationScore() == 0))) { |
|
|
|
//logger.info("当前诉求不做结案处理,原因:诉求分类PeopleFlag->" + entity.getPeopleFlag() + ",诉求状态itemState->" + entity.getItemState());
|
|
|
|
ItemHandleProcessEntity processEntity = new ItemHandleProcessEntity(); |
|
|
|
processEntity.setId(UUID.randomUUID().toString().replaceAll("-", "")); |
|
|
|
processEntity.setItemId(itemId); |
|
|
|
processEntity.setState(ItemGridPlatformHandleStatusEnum.HANDLE_CYSQ.getValue()); |
|
|
|
processEntity.setHandleAdvice("诉求已上报市平台初验申请"); |
|
|
|
processEntity.setOutHandleAdvice("初验申请"); |
|
|
|
long id = 0; |
|
|
|
String name = "街道"; |
|
|
|
if (StringUtils.isNotBlank(entity.getAllDeptIds()) && StringUtils.isNotBlank(entity.getAllDeptNames())) { |
|
|
|
String[] idList = entity.getAllDeptIds().split(","); |
|
|
|
String[] nameList = entity.getAllDeptNames().split("-"); |
|
|
|
id = idList.length > 1 ? Long.parseLong(idList[1]) : 0; |
|
|
|
name = nameList.length > 1 ? nameList[1] : "街道"; |
|
|
|
} |
|
|
|
processEntity.setHandlerDeptId(id); |
|
|
|
processEntity.setHandlerDept(name); |
|
|
|
itemHandleProcessService.insert(processEntity); |
|
|
|
//初验申请
|
|
|
|
ItemHandleProcessDTO dto = new ItemHandleProcessDTO(); |
|
|
|
dto.setId(processEntity.getId()); |
|
|
|
pushToCityGridService.earlyInspectionApply(dto); |
|
|
|
return; |
|
|
|
} else { |
|
|
|
//3-3.已经推了评价接口,下一个流程指定是结案的项目,将其二次放入缓存,待131秒后走结案
|
|
|
|
itemAutoProcessRedis.produce(itemId.concat(":2"), System.currentTimeMillis() + (131 * 1000)); |
|
|
|
} |
|
|
|
} else if ("2".equals(type)) { |
|
|
|
//二次放入缓存取出的数据此时已经上报了评价接口,并且已经评价了,走结案
|
|
|
|
|
|
|
|
//3.判断有过反馈的直接结案,是首次评论的则是民生诉求的没有评价的或者评论满意的直接结案
|
|
|
|
if (CollUtil.isNotEmpty(feedbackEntityList) || |
|
|
|
("0".equals(entity.getPeopleFlag()) && (null == entity.getEvaluationScore() || 0 != entity.getEvaluationScore()))) { |
|
|
|
QueryWrapper<ItemHandleProcessEntity> hWrapper = new QueryWrapper<>(); |
|
|
|
hWrapper.eq("item_id", itemId); |
|
|
|
hWrapper.eq("state", ItemGridPlatformHandleStatusEnum.HANDLE_XFPJ.getValue()); |
|
|
|
hWrapper.eq("del_flag", "0"); |
|
|
|
hWrapper.orderByDesc(FieldConstant.CREATED_TIME); |
|
|
|
hWrapper.last("limit 1"); |
|
|
|
ItemHandleProcessEntity hEntity = itemHandleProcessDao.selectOne(hWrapper); |
|
|
|
if (null == hEntity) { |
|
|
|
throw new RenException("获取项目流程节点数据失败,项目Id->" + itemId); |
|
|
|
} |
|
|
|
QueryWrapper<ImgEntity> iWrapper = new QueryWrapper<>(); |
|
|
|
iWrapper.eq("reference_id", hEntity.getId()); |
|
|
|
iWrapper.eq("del_flag", "0"); |
|
|
|
List<ImgEntity> imgEntityList = imgDao.selectList(iWrapper); |
|
|
|
List<String> imgUrlList = imgEntityList.stream().map(ImgEntity::getImgUrl).collect(Collectors.toList()); |
|
|
|
|
|
|
|
AcceptPlantformProcessDTO dto = new AcceptPlantformProcessDTO(); |
|
|
|
dto.setItemId(itemId); |
|
|
|
dto.setState("0"); |
|
|
|
dto.setHandleAdvice(hEntity.getHandleAdvice()); |
|
|
|
dto.setGridPartyid(hEntity.getGridPartyid()); |
|
|
|
dto.setGridPartyname(hEntity.getGridPartyname()); |
|
|
|
dto.setGridUnitid(hEntity.getGridUnitid()); |
|
|
|
dto.setGridUnitname(hEntity.getGridUnitname()); |
|
|
|
dto.setGridCantoncode(hEntity.getGridCantoncode()); |
|
|
|
dto.setImages(imgUrlList); |
|
|
|
dto.setCreatedTime(hEntity.getCreatedTime()); |
|
|
|
processDTO = closedItem(dto); |
|
|
|
//3.判断有过反馈的直接结案,是首次评论的则是民生诉求的没有评价的或者评论满意的直接结案
|
|
|
|
if (CollUtil.isNotEmpty(feedbackEntityList) || |
|
|
|
("0".equals(entity.getPeopleFlag()) && (null == entity.getEvaluationScore() || 0 != entity.getEvaluationScore()))) { |
|
|
|
QueryWrapper<ItemHandleProcessEntity> hWrapper = new QueryWrapper<>(); |
|
|
|
hWrapper.eq("item_id", itemId); |
|
|
|
hWrapper.eq("state", ItemGridPlatformHandleStatusEnum.HANDLE_XFPJ.getValue()); |
|
|
|
hWrapper.eq("del_flag", "0"); |
|
|
|
hWrapper.orderByDesc(FieldConstant.CREATED_TIME); |
|
|
|
hWrapper.last("limit 1"); |
|
|
|
ItemHandleProcessEntity hEntity = itemHandleProcessDao.selectOne(hWrapper); |
|
|
|
if (null == hEntity) { |
|
|
|
throw new RenException("获取项目流程节点数据失败,项目Id->" + itemId); |
|
|
|
} |
|
|
|
QueryWrapper<ImgEntity> iWrapper = new QueryWrapper<>(); |
|
|
|
iWrapper.eq("reference_id", hEntity.getId()); |
|
|
|
iWrapper.eq("del_flag", "0"); |
|
|
|
List<ImgEntity> imgEntityList = imgDao.selectList(iWrapper); |
|
|
|
List<String> imgUrlList = imgEntityList.stream().map(ImgEntity::getImgUrl).collect(Collectors.toList()); |
|
|
|
|
|
|
|
AcceptPlantformProcessDTO dto = new AcceptPlantformProcessDTO(); |
|
|
|
dto.setItemId(itemId); |
|
|
|
dto.setState("0"); |
|
|
|
dto.setHandleAdvice(hEntity.getHandleAdvice()); |
|
|
|
dto.setGridPartyid(hEntity.getGridPartyid()); |
|
|
|
dto.setGridPartyname(hEntity.getGridPartyname()); |
|
|
|
dto.setGridUnitid(hEntity.getGridUnitid()); |
|
|
|
dto.setGridUnitname(hEntity.getGridUnitname()); |
|
|
|
dto.setGridCantoncode(hEntity.getGridCantoncode()); |
|
|
|
dto.setImages(imgUrlList); |
|
|
|
dto.setCreatedTime(hEntity.getCreatedTime()); |
|
|
|
closedItem(dto); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 评价 |
|
|
|
* |
|
|
|
* @Param itemId |
|
|
|
* @Return |
|
|
|
* @Author zhaoqifeng |
|
|
|
* @Date 2022/11/3 10:47 |
|
|
|
*/ |
|
|
|
private void evaluate(String itemId) { |
|
|
|
//1.获取项目基础数据
|
|
|
|
ItemEntity entity = baseDao.selectById(itemId); |
|
|
|
if (null == entity) { |
|
|
|
throw new RenException("获取项目数据失败,项目Id->" + itemId); |
|
|
|
} |
|
|
|
//2.判断是已结案的不做处理(第二次可以评价了,没超过24小时用户评价了,此时就是已结案了)
|
|
|
|
if ("10".equals(entity.getItemState())) { |
|
|
|
return; |
|
|
|
} |
|
|
|
//查询项目反馈数据
|
|
|
|
QueryWrapper<ItemCommentFeedbackEntity> wrapper = new QueryWrapper<>(); |
|
|
|
wrapper.eq("item_id", itemId); |
|
|
|
wrapper.eq("del_flag", "0"); |
|
|
|
List<ItemCommentFeedbackEntity> feedbackEntityList = itemCommentFeedbackDao.selectList(wrapper); |
|
|
|
//首次放入缓存取出的数据先走评价
|
|
|
|
//3-1.没有评价的赋默认评价值
|
|
|
|
if (null == entity.getEvaluationScore() || null == entity.getEvaluationTime()) { |
|
|
|
entity.setEvaluationScore(2); |
|
|
|
entity.setEvaluationContent("满意"); |
|
|
|
entity.setEvaluationTime(new Date()); |
|
|
|
entity.setEvaluationState("0"); |
|
|
|
updateById(entity); |
|
|
|
} |
|
|
|
//诉求评价
|
|
|
|
pushToCityGridService.evaluation(itemId); |
|
|
|
|
|
|
|
//3-2.只有首次评价的判断是发展、执法诉求的(这两个诉求项目必须走诉求初验终验逻辑)或者是评价了不满意的民生诉求的需要走市里的初验申请
|
|
|
|
if (CollUtil.isEmpty(feedbackEntityList) && (!"0".equals(entity.getPeopleFlag()) || (null != entity.getEvaluationScore() && entity.getEvaluationScore() == 0))) { |
|
|
|
//logger.info("当前诉求不做结案处理,原因:诉求分类PeopleFlag->" + entity.getPeopleFlag() + ",诉求状态itemState->" + entity.getItemState());
|
|
|
|
ItemHandleProcessEntity processEntity = new ItemHandleProcessEntity(); |
|
|
|
processEntity.setId(UUID.randomUUID().toString().replace("-", "")); |
|
|
|
processEntity.setItemId(itemId); |
|
|
|
processEntity.setState(ItemGridPlatformHandleStatusEnum.HANDLE_CYSQ.getValue()); |
|
|
|
processEntity.setHandleAdvice("诉求已上报市平台初验申请"); |
|
|
|
processEntity.setOutHandleAdvice("初验申请"); |
|
|
|
long id = 0; |
|
|
|
String name = "街道"; |
|
|
|
if (StringUtils.isNotBlank(entity.getAllDeptIds()) && StringUtils.isNotBlank(entity.getAllDeptNames())) { |
|
|
|
String[] idList = entity.getAllDeptIds().split(","); |
|
|
|
String[] nameList = entity.getAllDeptNames().split("-"); |
|
|
|
id = idList.length > 1 ? Long.parseLong(idList[1]) : 0; |
|
|
|
name = nameList.length > 1 ? nameList[1] : "街道"; |
|
|
|
} |
|
|
|
processEntity.setHandlerDeptId(id); |
|
|
|
processEntity.setHandlerDept(name); |
|
|
|
itemHandleProcessService.insert(processEntity); |
|
|
|
//初验申请
|
|
|
|
ItemHandleProcessDTO dto = new ItemHandleProcessDTO(); |
|
|
|
dto.setId(processEntity.getId()); |
|
|
|
pushToCityGridService.earlyInspectionApply(dto); |
|
|
|
return; |
|
|
|
} else { |
|
|
|
//3-3.已经推了评价接口,下一个流程指定是结案的项目,将其二次放入缓存,待131秒后走结案
|
|
|
|
itemAutoProcessRedis.produce(itemId.concat(":2"), System.currentTimeMillis() + (131 * 1000)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -4692,16 +4726,13 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
ItemHandleSubmitFormDTO dto = ConvertUtils.sourceToTarget(formDTO, ItemHandleSubmitFormDTO.class); |
|
|
|
dto.setHandlerDeptId(deptId); |
|
|
|
dto.setHandlerDept(dept.getData().getName()); |
|
|
|
reReport(dto); |
|
|
|
reReport(dto, ConvertUtils.sourceToTarget(handleProcessEntity, ItemHandleProcessDTO.class)); |
|
|
|
} |
|
|
|
//上报市平台
|
|
|
|
pushToCityGridService.earlyInspection(ConvertUtils.sourceToTarget(handleProcessEntity, ItemHandleProcessDTO.class)); |
|
|
|
|
|
|
|
// 更新项目最后一次处理时间
|
|
|
|
ItemEntity itemEntity = new ItemEntity(); |
|
|
|
itemEntity.setId(formDTO.getId()); |
|
|
|
itemEntity.setLastHandleTime(new Date()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -4757,18 +4788,10 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
if (null == hEntity) { |
|
|
|
throw new RenException("获取项目下发评价流程节点数据失败,项目Id->" + formDTO.getId()); |
|
|
|
} |
|
|
|
AcceptPlantformProcessDTO dto = new AcceptPlantformProcessDTO(); |
|
|
|
dto.setItemId(formDTO.getId()); |
|
|
|
dto.setState("0"); |
|
|
|
dto.setHandleAdvice(formDTO.getHandleAdvice()); |
|
|
|
dto.setGridPartyid(hEntity.getGridPartyid()); |
|
|
|
dto.setGridPartyname(hEntity.getGridPartyname()); |
|
|
|
dto.setGridUnitid(hEntity.getGridUnitid()); |
|
|
|
dto.setGridUnitname(hEntity.getGridUnitname()); |
|
|
|
dto.setGridCantoncode(hEntity.getGridCantoncode()); |
|
|
|
dto.setImages(formDTO.getHandleImages()); |
|
|
|
dto.setCreatedTime(new Date()); |
|
|
|
closedItem(dto); |
|
|
|
//上报市平台
|
|
|
|
pushToCityGridService.endInspection(ConvertUtils.sourceToTarget(handleProcessEntity, ItemHandleProcessDTO.class)); |
|
|
|
itemAutoProcessRedis.produce(formDTO.getId().concat(":2"), System.currentTimeMillis() + (131 * 1000)); |
|
|
|
|
|
|
|
} else { |
|
|
|
//不同意,返回初验
|
|
|
|
String handleAdvice = "诉求终验不同意,处理意见:"; |
|
|
|
@ -4779,10 +4802,9 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
handleProcessEntity.setOutHandleAdvice(handleAdvice); |
|
|
|
handleProcessEntity.setState(ItemHandleCategoryEnum.HANDLE_I_HANDLE_CHECK_UN_AGREE.getValue()); |
|
|
|
itemHandleProcessService.insert(handleProcessEntity); |
|
|
|
//上报市平台
|
|
|
|
pushToCityGridService.endInspection(ConvertUtils.sourceToTarget(handleProcessEntity, ItemHandleProcessDTO.class)); |
|
|
|
} |
|
|
|
|
|
|
|
//上报市平台
|
|
|
|
pushToCityGridService.endInspection(ConvertUtils.sourceToTarget(handleProcessEntity, ItemHandleProcessDTO.class)); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -4793,7 +4815,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
* @Author zhaoqifeng |
|
|
|
* @Date 2022/10/24 15:02 |
|
|
|
*/ |
|
|
|
private void reReport(ItemHandleSubmitFormDTO dto) { |
|
|
|
private void reReport(ItemHandleSubmitFormDTO dto, ItemHandleProcessDTO process) { |
|
|
|
try { |
|
|
|
Result deptMessage = adminFeignClient.getDeptTypeKey(dto.getHandlerDeptId()); |
|
|
|
log.info("处理项目-deptMessage:" + deptMessage); |
|
|
|
@ -4838,15 +4860,11 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
handleProcessEntity.setHandleAdviceRemark(dto.getHandleAdviceRemark()); |
|
|
|
// 当前操作人部门tyeKey
|
|
|
|
String sendTypeKey = ""; |
|
|
|
log.info("处理项目-上报网格化平台(社区吹哨)"); |
|
|
|
handleProcessEntity.setState(ItemHandleCategoryEnum.HANDLE_STREET_REPORT.getValue()); |
|
|
|
//informationFormDTO.setTitle(EventsNoticeConstant.NOTICE_REPORT);
|
|
|
|
// 记录处理记录
|
|
|
|
itemHandleProcessService.insert(handleProcessEntity); |
|
|
|
|
|
|
|
//社区吹哨,上报市平台
|
|
|
|
pushToCityGridService.appealReporting(handleProcessEntity.getId(), NumConstant.ZERO_STR); |
|
|
|
log.info("社区吹哨-上报市平台-结束"); |
|
|
|
// 更新项目最后一次处理时间
|
|
|
|
ItemEntity itemEntity = new ItemEntity(); |
|
|
|
itemEntity.setId(dto.getId()); |
|
|
|
@ -4896,6 +4914,9 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
sendItemToDsf(dto, handleProcessEntity); |
|
|
|
//工作端 根据不同的处理方式,进行短信通知
|
|
|
|
this.workProjectHandle(dto); |
|
|
|
//诉求初验 上报市平台
|
|
|
|
pushToCityGridService.earlyInspection(process); |
|
|
|
itemAutoProcessRedis.produce(handleProcessEntity.getId().concat(":5"), System.currentTimeMillis() + (131 * 1000)); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
@ -4995,7 +5016,6 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
return itemHandleProcessDto; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public Result reportReject(AppealWhistleReportRejectResultDTO formDTO) { |
|
|
|
String successFlag = YesOrNoEnum.NO.value(); |
|
|
|
@ -5077,4 +5097,46 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
dto.getId().toString(), JSONObject.toJSONString(body)); |
|
|
|
} |
|
|
|
|
|
|
|
public class DataReport { |
|
|
|
public void myRun(ItemHandleProcessDTO dto, String type) { |
|
|
|
new Thread(new Runnable() { |
|
|
|
@SneakyThrows |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
try { |
|
|
|
Thread.sleep(131000); |
|
|
|
if ("1".equals(type)) { |
|
|
|
pushToCityGridService.dispatchAudit(dto);//2.4 派遣审核
|
|
|
|
} else if ("2".equals(type)) { |
|
|
|
pushToCityGridService.appealAudit(dto.getId(), NumConstant.ONE_STR); // 诉求审核
|
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
}).start(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 拉去项目在网格化平台的进展 |
|
|
|
* 单独启动线程,在上报接口完成后十秒再去拉去 |
|
|
|
*/ |
|
|
|
public class PullProcess { |
|
|
|
public void myRun(String id) { |
|
|
|
new Thread(new Runnable() { |
|
|
|
@SneakyThrows |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
try { |
|
|
|
Thread.sleep(10000); |
|
|
|
queryItemHandle(id); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
}).start(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|