|
|
|
@ -574,9 +574,14 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
} |
|
|
|
|
|
|
|
// 可做操作:流转协助、我来处理、关闭、结案
|
|
|
|
List<ItemHandleResultDTO> itemHandleResultDTOS = ItemHandleCategoryEnum.getHandleCategoriesForGird(selected); |
|
|
|
// List<ItemHandleResultDTO> itemHandleResultDTOS = ItemHandleCategoryEnum.getHandleCategoriesForGird(selected);
|
|
|
|
// resultDTO.setHandleResultDTOS(itemHandleResultDTOS);
|
|
|
|
|
|
|
|
// 9.4修改逻辑
|
|
|
|
List<ItemHandleResultDTO> itemHandleResultDTOS = ItemHandleCategoryEnum.getHandleCategoriesForGirdNew(); |
|
|
|
resultDTO.setHandleResultDTOS(itemHandleResultDTOS); |
|
|
|
|
|
|
|
|
|
|
|
// 初始化可流转部门-网格:社区、街道党工委
|
|
|
|
List<ItemCirculationDeptResultDTO> deptResultDTOS = new ArrayList<>(); |
|
|
|
ItemCirculationDeptResultDTO circulationDeptResultDTO = new ItemCirculationDeptResultDTO(); |
|
|
|
@ -622,11 +627,22 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
itemHandleResultDTO.setProcessName(ItemHandleCategoryEnum.HANDLE_I_HANDLE.getName()); |
|
|
|
itemHandleResultDTO.setSelect(false); |
|
|
|
itemHandleResultDTOS.add(itemHandleResultDTO); |
|
|
|
ItemHandleResultDTO itemHandleResultDTO2 = new ItemHandleResultDTO(); |
|
|
|
itemHandleResultDTO2.setProcessResult(ItemHandleCategoryEnum.HANDLE_CANCEL_CASE.getValue()); |
|
|
|
itemHandleResultDTO2.setProcessName(ItemHandleCategoryEnum.HANDLE_CANCEL_CASE.getName()); |
|
|
|
itemHandleResultDTO2.setSelect(false); |
|
|
|
itemHandleResultDTOS.add(itemHandleResultDTO2); |
|
|
|
// 9.4 修改
|
|
|
|
// ItemHandleResultDTO itemHandleResultDTO2 = new ItemHandleResultDTO();
|
|
|
|
// itemHandleResultDTO2.setProcessResult(ItemHandleCategoryEnum.HANDLE_CANCEL_CASE.getValue());
|
|
|
|
// itemHandleResultDTO2.setProcessName(ItemHandleCategoryEnum.HANDLE_CANCEL_CASE.getName());
|
|
|
|
// itemHandleResultDTO2.setSelect(false);
|
|
|
|
// itemHandleResultDTOS.add(itemHandleResultDTO2);
|
|
|
|
ItemHandleResultDTO itemHandleResultDTO3 = new ItemHandleResultDTO(); |
|
|
|
itemHandleResultDTO3.setProcessResult(ItemHandleCategoryEnum.HANDLE_REPORT.getValue()); |
|
|
|
itemHandleResultDTO3.setProcessName(ItemHandleCategoryEnum.HANDLE_REPORT.getName()); |
|
|
|
itemHandleResultDTO3.setSelect(false); |
|
|
|
itemHandleResultDTOS.add(itemHandleResultDTO3); |
|
|
|
ItemHandleResultDTO itemHandleResultDTO4 = new ItemHandleResultDTO(); |
|
|
|
itemHandleResultDTO4.setProcessResult(ItemHandleCategoryEnum.HANDLE_CLOSING_CASE_APPLY.getValue()); |
|
|
|
itemHandleResultDTO4.setProcessName(ItemHandleCategoryEnum.HANDLE_CLOSING_CASE_APPLY.getName()); |
|
|
|
itemHandleResultDTO4.setSelect(false); |
|
|
|
itemHandleResultDTOS.add(itemHandleResultDTO4); |
|
|
|
resultDTO.setHandleResultDTOS(itemHandleResultDTOS); |
|
|
|
|
|
|
|
return resultDTO; |
|
|
|
@ -807,6 +823,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
handleProcessEntity.setHandleAdvice(dto.getHandleAdvice()); |
|
|
|
handleProcessEntity.setOutHandleAdvice(dto.getOutHandleAdvice()); |
|
|
|
log.info("处理项目-进入判断"); |
|
|
|
// 吹哨
|
|
|
|
if (ItemHandleCategoryEnum.HANDLE_CIRCULATION_ASSISTANCE.getValue() == dto.getHandleCategory()) { |
|
|
|
log.info("处理项目-进入吹哨"); |
|
|
|
// 吹哨
|
|
|
|
@ -839,8 +856,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
itemDeptService.saveItemDepts(dto.getHandlerDeptId(), dto, handleProcessEntity.getId()); |
|
|
|
List<ItemCirculationDeptResultDTO> circulationDeptResultDTOS = dto.getDeptResultDTOS(); |
|
|
|
List<Long> newDeptIds = new ArrayList<>(); |
|
|
|
for (ItemCirculationDeptResultDTO circulationDto : |
|
|
|
circulationDeptResultDTOS) { |
|
|
|
for (ItemCirculationDeptResultDTO circulationDto : circulationDeptResultDTOS) { |
|
|
|
newDeptIds.add(circulationDto.getDeptId()); |
|
|
|
} |
|
|
|
TreeSet<Long> longTreeSet = new TreeSet<>(); |
|
|
|
@ -849,6 +865,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
List<Long> deptIds = new ArrayList<>(longTreeSet); |
|
|
|
// 发送菜单消息-待处理项目-吹哨部门
|
|
|
|
this.sendWhistlingDeptItemHandleMenuNotice(deptIds, null); |
|
|
|
// 上报网格化平台
|
|
|
|
} else if (ItemHandleCategoryEnum.HANDLE_REPORT.getValue() == dto.getHandleCategory()) { |
|
|
|
log.info("处理项目-进入上报网格化平台"); |
|
|
|
boolean reportFlag = this.checkReport(dto.getId()); |
|
|
|
@ -872,6 +889,59 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
// 记录平台上报信息
|
|
|
|
this.saveItemGridPlatformInfo(sendResult, handleProcessEntity); |
|
|
|
log.info("处理项目-上报网格化平台-if结束"); |
|
|
|
// 结案申请
|
|
|
|
} else if (ItemHandleCategoryEnum.HANDLE_CLOSING_CASE_APPLY.getValue() == dto.getHandleCategory()) { |
|
|
|
log.info("处理项目-进入结案申请"); |
|
|
|
// 结案申请
|
|
|
|
Result result = adminFeignClient.getCompleteDept(entity.getGridId()); |
|
|
|
Long streetId = 0L; |
|
|
|
if( result.getCode() == 0){ |
|
|
|
CompleteDeptDTO completeDeptDTO = (CompleteDeptDTO)result.getData(); |
|
|
|
streetId = completeDeptDTO.getStreetId(); |
|
|
|
}else{ |
|
|
|
throw new RenException(result.getMsg()); |
|
|
|
} |
|
|
|
if (dto.getHandlerDeptId().longValue() != entity.getGridId().longValue() && dto.getHandlerDeptId().longValue() != streetId.longValue()) { |
|
|
|
return new Result().error("请选择正确的处理部门"); |
|
|
|
} |
|
|
|
|
|
|
|
// 项目流转校验
|
|
|
|
Result checkResult = this.checkItemCirculation(dto); |
|
|
|
if (!checkResult.success()) { |
|
|
|
return checkResult; |
|
|
|
} |
|
|
|
|
|
|
|
// 根据当前登录人部门,获取上一级部门ID
|
|
|
|
Long currentDeptId = SecurityUser.getDeptId(); |
|
|
|
Result<SysDeptDTO> sysDeptInfo = adminFeignClient.getSysDeptInfo(currentDeptId); |
|
|
|
SysDeptDTO sysDeptDTO = sysDeptInfo.getData(); |
|
|
|
|
|
|
|
handleProcessEntity.setState(dto.getHandleCategory()); |
|
|
|
handleProcessEntity.setCloseCheckId(sysDeptDTO.getPid()); |
|
|
|
|
|
|
|
// 获取已流转部门信息
|
|
|
|
List<Long> oldDeptIds = itemDeptService.listOfWhistlingDeptIds(dto.getId(), dto.getHandlerDeptId()); |
|
|
|
// 删除已流转协助部门
|
|
|
|
itemDeptService.modifyItemDepts(dto.getHandlerDeptId(), dto.getId()); |
|
|
|
// 记录处理记录
|
|
|
|
itemHandleProcessService.insert(handleProcessEntity); |
|
|
|
// 新增流转协助部门
|
|
|
|
itemDeptService.saveItemDepts(dto.getHandlerDeptId(), dto, handleProcessEntity.getId()); |
|
|
|
List<Long> newDeptIds = new ArrayList<>(); |
|
|
|
// List<ItemCirculationDeptResultDTO> circulationDeptResultDTOS = dto.getDeptResultDTOS();
|
|
|
|
// for (ItemCirculationDeptResultDTO circulationDto :
|
|
|
|
// circulationDeptResultDTOS) {
|
|
|
|
// newDeptIds.add(circulationDto.getDeptId());
|
|
|
|
// }
|
|
|
|
|
|
|
|
newDeptIds.add(sysDeptDTO.getPid()); |
|
|
|
|
|
|
|
TreeSet<Long> longTreeSet = new TreeSet<>(); |
|
|
|
longTreeSet.addAll(oldDeptIds); |
|
|
|
longTreeSet.addAll(newDeptIds); |
|
|
|
List<Long> deptIds = new ArrayList<>(longTreeSet); |
|
|
|
// 发送菜单消息-待处理项目-吹哨部门
|
|
|
|
this.sendWhistlingDeptItemHandleMenuNotice(deptIds, null); |
|
|
|
} else { |
|
|
|
handleProcessEntity.setState(dto.getHandleCategory()); |
|
|
|
// 更新项目状态
|
|
|
|
@ -913,7 +983,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
itemInfoDto.setHandleDept(dto.getHandlerDept()); |
|
|
|
itemInfoDto.setHandleAdvice(dto.getHandleAdvice()); |
|
|
|
itemInfoDto.setReadFlag(ItemInformationConstant.READ_FLAG_NO); |
|
|
|
// 回应处理
|
|
|
|
// 办理处理
|
|
|
|
if (ItemHandleCategoryEnum.HANDLE_I_HANDLE.getValue() == dto.getHandleCategory()) { |
|
|
|
// 社区党工委和街道党工委处理
|
|
|
|
if (OrganizationTypeConstant.ORG_TYPE_COMMUNITY_PARTY.equals(typeKey) || OrganizationTypeConstant.ORG_TYPE_STREET_PARTY.equals(typeKey)) { |
|
|
|
@ -936,7 +1006,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
itemInfoStreetDto.setDeptId(comDeptDto.getStreetId().toString()); |
|
|
|
itemInformationService.insert(itemInfoStreetDto); |
|
|
|
} |
|
|
|
// 吹哨处理
|
|
|
|
// 吹哨处理
|
|
|
|
} else if (ItemHandleCategoryEnum.HANDLE_CIRCULATION_ASSISTANCE.getValue() == dto.getHandleCategory()) { |
|
|
|
List<ItemCirculationDeptResultDTO> deptList = dto.getDeptResultDTOS(); |
|
|
|
// 拼接被吹哨部门
|
|
|
|
@ -959,7 +1029,43 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
itemInfoEachDto.setDeptId(itemDto.getDeptId().toString()); |
|
|
|
itemInformationService.insert(itemInfoEachDto); |
|
|
|
} |
|
|
|
// 关闭和结案处理
|
|
|
|
// 结案申请
|
|
|
|
}else if(ItemHandleCategoryEnum.HANDLE_CLOSING_CASE_APPLY.getValue() == dto.getHandleCategory()){ |
|
|
|
Long currentDeptId = SecurityUser.getDeptId(); |
|
|
|
// 根据当前登录人部门,获取上一级部门ID
|
|
|
|
Result<SysDeptDTO> sysDeptInfo = adminFeignClient.getSysDeptInfo(currentDeptId); |
|
|
|
SysDeptDTO sysDeptDTO = sysDeptInfo.getData(); |
|
|
|
ItemCirculationDeptResultDTO itemCirculationDeptResultDTO = new ItemCirculationDeptResultDTO(); |
|
|
|
itemCirculationDeptResultDTO.setDeptId(sysDeptDTO.getPid()); |
|
|
|
itemCirculationDeptResultDTO.setDeptName(sysDeptDTO.getParentName()); |
|
|
|
itemCirculationDeptResultDTO.setSelected(false); |
|
|
|
itemCirculationDeptResultDTO.setTypeKey(sysDeptDTO.getTypeKey()); |
|
|
|
List<ItemCirculationDeptResultDTO> deptList = new ArrayList<ItemCirculationDeptResultDTO>(); |
|
|
|
deptList.add(itemCirculationDeptResultDTO); |
|
|
|
|
|
|
|
// 拼接被吹哨部门
|
|
|
|
String whistlDept = ""; |
|
|
|
for (int i = 0; i < deptList.size(); i++) { |
|
|
|
ItemCirculationDeptResultDTO indexDto = (ItemCirculationDeptResultDTO) deptList.get(i); |
|
|
|
if (i == 0) { |
|
|
|
whistlDept += indexDto.getDeptName(); |
|
|
|
} else { |
|
|
|
whistlDept += (",".concat(indexDto.getDeptName())); |
|
|
|
} |
|
|
|
} |
|
|
|
itemInfoDto.setWhistleDept(whistlDept); |
|
|
|
// 遍历被吹哨部门插入项目消息表
|
|
|
|
for (ItemCirculationDeptResultDTO itemDto : deptList) { |
|
|
|
// 通知部门Id(被吹哨部门)
|
|
|
|
ItemInformationEntity itemInfoEachDto = new ItemInformationEntity(); |
|
|
|
BeanUtils.copyProperties(itemInfoDto, itemInfoEachDto); |
|
|
|
itemInfoEachDto.setId(null); |
|
|
|
itemInfoEachDto.setDeptId(itemDto.getDeptId().toString()); |
|
|
|
itemInformationService.insert(itemInfoEachDto); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 关闭和结案处理
|
|
|
|
} else { |
|
|
|
log.info("处理项目-查询已吹哨部门"); |
|
|
|
// 查询已吹哨部门
|
|
|
|
@ -1431,7 +1537,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
if (ipr.getState() == 0 && ipr.getItemDeptDTOS().size() > 0) { |
|
|
|
handleProcess.setState("吹哨"); |
|
|
|
} else if (ipr.getState() == 0 && ipr.getItemDeptDTOS().size() == 0) { |
|
|
|
handleProcess.setState("回应"); |
|
|
|
handleProcess.setState("办理"); |
|
|
|
} else if (ipr.getState() == 5) { |
|
|
|
handleProcess.setState("关闭"); |
|
|
|
} else if (ipr.getState() == 10) { |
|
|
|
|