|
|
@ -4115,6 +4115,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
//3.判断评价结果,未评价的赋值为满意并且结案给网格化平台推送结果;已评价的结果为满意直接结案给网格化推结果,不满意直接给网格化推结果
|
|
|
//3.判断评价结果,未评价的赋值为满意并且结案给网格化平台推送结果;已评价的结果为满意直接结案给网格化推结果,不满意直接给网格化推结果
|
|
|
|
|
|
ItemHandleProcessDTO processDTO = new ItemHandleProcessDTO(); |
|
|
if (null == entity.getEvaluationScore() || 0 != entity.getEvaluationScore()) { |
|
|
if (null == entity.getEvaluationScore() || 0 != entity.getEvaluationScore()) { |
|
|
//3-1.未评价的或评价结果不是不满意的则需要结案
|
|
|
//3-1.未评价的或评价结果不是不满意的则需要结案
|
|
|
QueryWrapper<ItemGridPlatformEntity> wrapper = new QueryWrapper<>(); |
|
|
QueryWrapper<ItemGridPlatformEntity> wrapper = new QueryWrapper<>(); |
|
|
@ -4155,10 +4156,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
dto.setCantoncode(hEntity.getGridCantoncode()); |
|
|
dto.setCantoncode(hEntity.getGridCantoncode()); |
|
|
dto.setImages(imgUrlList); |
|
|
dto.setImages(imgUrlList); |
|
|
dto.setCreatedTime(hEntity.getCreatedTime()); |
|
|
dto.setCreatedTime(hEntity.getCreatedTime()); |
|
|
Result result = pushItemProcess(dto); |
|
|
processDTO = closedItem(dto); |
|
|
if (!result.success()) { |
|
|
|
|
|
throw new RenException("结案操作失败,项目id->" + itemId); |
|
|
|
|
|
} |
|
|
|
|
|
//3-2.未评价的赋值默认评价结果为满意
|
|
|
//3-2.未评价的赋值默认评价结果为满意
|
|
|
if (null == entity.getEvaluationScore()) { |
|
|
if (null == entity.getEvaluationScore()) { |
|
|
entity.setEvaluationScore(2); |
|
|
entity.setEvaluationScore(2); |
|
|
@ -4169,9 +4167,108 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
updateById(entity); |
|
|
updateById(entity); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//4.推送评价结果给网格化平台
|
|
|
//4.市平台推送数据
|
|
|
//TODO
|
|
|
//4-1.诉求评价
|
|
|
|
|
|
pushToCityGridService.evaluation(itemId); |
|
|
|
|
|
//4-2.诉求结案
|
|
|
|
|
|
pushToCityGridService.caseClosedSentoCity(processDTO.getId()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
public ItemHandleProcessDTO closedItem(AcceptPlantformProcessDTO formDto) { |
|
|
|
|
|
String successFlag = YesOrNoEnum.NO.value(); |
|
|
|
|
|
String returnMsgBody = ""; |
|
|
|
|
|
ItemGridPlatformDTO itemPlat = itemGridPlatformService.getInfoByTaskId(formDto.getP_recId()); |
|
|
|
|
|
if (null == itemPlat) { |
|
|
|
|
|
// 保存接口调用日志
|
|
|
|
|
|
this.saveInterfaceLog("", InterfaceLogBusinessTypeEnum.ACCEPT_ITEM_PROCESS.getValue(), |
|
|
|
|
|
ApiConstants.acceptItemProcess, successFlag, formDto.getP_recId(), returnMsgBody); |
|
|
|
|
|
logger.error("未查到相关事件信息"); |
|
|
|
|
|
} |
|
|
|
|
|
// 插入项目处理进度表
|
|
|
|
|
|
String firstHandleId = ""; |
|
|
|
|
|
ItemHandleProcessDTO itemHandleProcessDto = new ItemHandleProcessDTO(); |
|
|
|
|
|
itemHandleProcessDto.setId(UUID.randomUUID().toString().replaceAll("-", "")); |
|
|
|
|
|
itemHandleProcessDto.setItemId(itemPlat.getReferenceId()); |
|
|
|
|
|
//组装处理人及部门相关字段
|
|
|
|
|
|
itemHandleProcessDto.setGridPartyid(formDto.getGridPartyid()); |
|
|
|
|
|
itemHandleProcessDto.setGridPartyname(formDto.getGridPartyname()); |
|
|
|
|
|
itemHandleProcessDto.setGridUnitid(formDto.getGridUnitid()); |
|
|
|
|
|
itemHandleProcessDto.setGridUnitname(formDto.getGridUnitname()); |
|
|
|
|
|
itemHandleProcessDto.setGridCantoncode(formDto.getCantoncode()); |
|
|
|
|
|
//根据网格化区域编码获取对应的市中心区域编码
|
|
|
|
|
|
if (StringUtils.isNotBlank(itemHandleProcessDto.getGridCantoncode())) { |
|
|
|
|
|
Result<SysDeptAreaCodeResultDTO> result = adminFeignClient.getZoneCode(itemHandleProcessDto.getGridCantoncode()); |
|
|
|
|
|
SysDeptAreaCodeResultDTO dept = result.getData(); |
|
|
|
|
|
if (dept != null) { |
|
|
|
|
|
String zoneCode = dept.getDisCenterZoningCode(); |
|
|
|
|
|
itemHandleProcessDto.setDisCenterZoningCode(zoneCode); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if ("0".equals(formDto.getState())) { |
|
|
|
|
|
ItemEntity item = baseDao.selectById(itemPlat.getReferenceId()); |
|
|
|
|
|
log.info("根据id查询数据"); |
|
|
|
|
|
itemHandleProcessDto.setState(ItemGridPlatformHandleStatusEnum.HANDLE_JA.getValue()); |
|
|
|
|
|
//判断最后一条处理进展是吹哨还是结案,结案:取第一条处置意见;吹哨:取平台处置意见
|
|
|
|
|
|
if ("1".equals(item.getPeopleFlag()) || "2".equals(item.getPeopleFlag())) { |
|
|
|
|
|
//执法和发展填写网格化平台的意见
|
|
|
|
|
|
itemHandleProcessDto.setOutHandleAdvice(formDto.getHandleAdvice()); |
|
|
|
|
|
} else if (getItemIsCs(itemPlat.getReferenceId())) { |
|
|
|
|
|
//吹哨
|
|
|
|
|
|
itemHandleProcessDto.setOutHandleAdvice(formDto.getHandleAdvice() + "h_s办理人:" + item.getHandlePeopleName() + ",联系电话:" + item.getHandlePeopleMobile()); |
|
|
|
|
|
} else { |
|
|
|
|
|
//内容组成:第一个发起结案申请+办理人:XXX+办理电话:XXX。换行(前端处理) 感谢您的支持,“北尚诉办”全程为您服务!没有结案申请就取网格化结案状态流程数据
|
|
|
|
|
|
ItemHandleProcessEntity firsthandleProcess = baseDao.selectFirstHandleProcessByItemId(itemPlat.getReferenceId(), ItemGridPlatformHandleStatusEnum.HANDLE_SQ.getValue()); |
|
|
|
|
|
if (firsthandleProcess == null) { |
|
|
|
|
|
firsthandleProcess = baseDao.selectFirstHandleProcessByItemId(itemPlat.getReferenceId(), ItemGridPlatformHandleStatusEnum.HANDLE_JA.getValue()); |
|
|
|
|
|
if (firsthandleProcess == null) { |
|
|
|
|
|
itemHandleProcessDto.setOutHandleAdvice("办理人:" + item.getHandlePeopleName() + ",联系电话:" + item.getHandlePeopleMobile()); |
|
|
|
|
|
} else { |
|
|
|
|
|
firstHandleId = firsthandleProcess.getId(); |
|
|
|
|
|
itemHandleProcessDto.setOutHandleAdvice(firsthandleProcess.getHandleAdvice() + "h_s办理人:" + item.getHandlePeopleName() + ",联系电话:" + item.getHandlePeopleMobile()); |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
firstHandleId = firsthandleProcess.getId(); |
|
|
|
|
|
itemHandleProcessDto.setOutHandleAdvice(firsthandleProcess.getHandleAdvice() + "h_s办理人:" + item.getHandlePeopleName() + ",联系电话:" + item.getHandlePeopleMobile()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
itemHandleProcessDto.setGridPartyname("结案"); |
|
|
|
|
|
itemHandleProcessDto.setGridTaskcnname("区中心"); |
|
|
|
|
|
item.setItemState(ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue()); |
|
|
|
|
|
// 可以进行评价了,默认评分-满意
|
|
|
|
|
|
item.setEvaluationScore(ItemEvaluationLevel.LEVALUATION_LEVEL_BETTER); |
|
|
|
|
|
item.setEvaluationState(NumConstant.ONE_STR); |
|
|
|
|
|
updateById(item); |
|
|
|
|
|
} |
|
|
|
|
|
itemHandleProcessDto.setHandleAdvice(formDto.getHandleAdvice()); |
|
|
|
|
|
itemHandleProcessDto.setHandlerDept("网格化平台"); |
|
|
|
|
|
itemHandleProcessDto.setCreatedTime(null == formDto.getCreatedTime() ? new Date() : formDto.getCreatedTime()); |
|
|
|
|
|
itemHandleProcessDto.setUpdatedTime(new Date()); |
|
|
|
|
|
itemHandleProcessService.saveItemHandleProcess(itemHandleProcessDto); |
|
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(firstHandleId)){ |
|
|
|
|
|
// 插入第一级结案申请时的图片
|
|
|
|
|
|
List<ImgEntity> imageList = imgDao.selectListByRefeId(firstHandleId); |
|
|
|
|
|
for(ImgEntity imgEntity : imageList){ |
|
|
|
|
|
imgEntity.setId(null); |
|
|
|
|
|
imgEntity.setReferenceId(itemHandleProcessDto.getId()); |
|
|
|
|
|
imgDao.insert(imgEntity); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//项目处理意见图片保存
|
|
|
|
|
|
if (formDto.getImages() != null && formDto.getImages().size() > 0) { |
|
|
|
|
|
imgService.saveImages(formDto.getImages(), itemHandleProcessDto.getId(), ImageConstant.TYPE_IMAGE_ITEM_OUT_HANDLE); |
|
|
|
|
|
} |
|
|
|
|
|
successFlag = YesOrNoEnum.YES.value(); |
|
|
|
|
|
// 保存接口调用日志
|
|
|
|
|
|
String message = formDto.getP_recId(); |
|
|
|
|
|
message = message + ":" + formDto; |
|
|
|
|
|
this.saveInterfaceLog(itemPlat.getReferenceId(), InterfaceLogBusinessTypeEnum.ACCEPT_ITEM_PROCESS.getValue(), |
|
|
|
|
|
ApiConstants.acceptItemProcess, successFlag, message, returnMsgBody); |
|
|
|
|
|
return itemHandleProcessDto; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|