|
|
@ -322,7 +322,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
public ItemDetailForPCEndResultDTO getItemDetailById(String id) { |
|
|
|
// 详情
|
|
|
|
ItemDetailForPCEndResultDTO resultDTO = baseDao.selectOneOfItemDetailForPCEnd(id); |
|
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
|
/*UserDetail user = SecurityUser.getUser(); |
|
|
|
// 获取已流转部门
|
|
|
|
List<ItemDeptDTO> itemDeptDTOS = itemDeptService.listOfItemDept(id, user.getDeptId()); |
|
|
|
// 获取可操作处理和可流转部门
|
|
|
@ -337,7 +337,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
break; |
|
|
|
case OrganizationTypeConstant.ORG_TYPE_STREET_PARTY: |
|
|
|
resultDTO = this.getHandleCategoryAndCirculationDeptOfStreet(resultDTO, itemDeptDTOS); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
//获取项目基本信息
|
|
|
|
ItemEntity entity = this.selectById(id); |
|
|
|
// 获取项目处理进度
|
|
|
@ -351,6 +351,29 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
return resultDTO; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public ItemDetailForPCEndResultDTO getHandleResultDTOS(HandleResultDTOSFormDTO dto) { |
|
|
|
// 详情
|
|
|
|
ItemDetailForPCEndResultDTO resultDTO = new ItemDetailForPCEndResultDTO(); |
|
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
|
// 获取已流转部门
|
|
|
|
List<ItemDeptDTO> itemDeptDTOS = itemDeptService.listOfItemDept(dto.getItemId(), dto.getDeptId()); |
|
|
|
// 获取可操作处理和可流转部门
|
|
|
|
switch (user.getTypeKey()) { |
|
|
|
case OrganizationTypeConstant.ORG_TYPE_GRID_PARTY: |
|
|
|
resultDTO = this.getHandleCategoryAndCirculationDeptOfGrid(resultDTO, itemDeptDTOS); |
|
|
|
break; |
|
|
|
case OrganizationTypeConstant.ORG_TYPE_COMMUNITY_PARTY: |
|
|
|
case OrganizationTypeConstant.ORG_TYPE_STREET_DEPT: |
|
|
|
case OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT: |
|
|
|
resultDTO = this.getHandleCategory(resultDTO); |
|
|
|
break; |
|
|
|
case OrganizationTypeConstant.ORG_TYPE_STREET_PARTY: |
|
|
|
resultDTO = this.getHandleCategoryAndCirculationDeptOfStreet(resultDTO, itemDeptDTOS); |
|
|
|
} |
|
|
|
return resultDTO; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 项目详情-网格-可做操作和可流转部门 |
|
|
|
* |
|
|
@ -580,7 +603,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result modifyHandleResult(ItemHandleSubmitFormDTO dto) { |
|
|
|
try { |
|
|
|
Result<SysDeptDTO> deptMessage = adminFeignClient.getSysDeptInfo(dto.getHandleDeptId()); |
|
|
|
Result<SysDeptDTO> deptMessage = adminFeignClient.getSysDeptInfo(dto.getHandlerDeptId()); |
|
|
|
if( null == deptMessage.getData()){ |
|
|
|
throw new RenException("未查到该部门相关信息"); |
|
|
|
} |
|
|
@ -601,8 +624,10 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
informationFormDTO.setRelBusinessContent("项目:" + entity.getItemContent()); |
|
|
|
|
|
|
|
ItemHandleProcessEntity handleProcessEntity = new ItemHandleProcessEntity(); |
|
|
|
handleProcessEntity.setHandlerDeptId(dto.getHandleDeptId()); |
|
|
|
handleProcessEntity.setHandlerDept(dto.getHandleDeptName()); |
|
|
|
/*handleProcessEntity.setHandlerDeptId(user.getDeptId()); |
|
|
|
handleProcessEntity.setHandlerDept(user.getDeptName());*/ |
|
|
|
handleProcessEntity.setHandlerDeptId(dto.getHandlerDeptId()); |
|
|
|
handleProcessEntity.setHandlerDept(dto.getHandlerDept()); |
|
|
|
handleProcessEntity.setItemId(dto.getId()); |
|
|
|
handleProcessEntity.setHandleAdvice(dto.getHandleAdvice()); |
|
|
|
handleProcessEntity.setOutHandleAdvice(dto.getOutHandleAdvice()); |
|
|
@ -616,13 +641,13 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
handleProcessEntity.setState(EventIssueItemState.ITEM_HANDLING); |
|
|
|
|
|
|
|
// 获取已流转部门信息
|
|
|
|
List<Long> oldDeptIds = itemDeptService.listOfWhistlingDeptIds(dto.getId(), dto.getHandleDeptId()); |
|
|
|
List<Long> oldDeptIds = itemDeptService.listOfWhistlingDeptIds(dto.getId(), dto.getHandlerDeptId()); |
|
|
|
// 删除已流转协助部门
|
|
|
|
itemDeptService.modifyItemDepts(dto.getHandleDeptId(), dto.getId()); |
|
|
|
itemDeptService.modifyItemDepts(dto.getHandlerDeptId(), dto.getId()); |
|
|
|
// 记录处理记录
|
|
|
|
itemHandleProcessService.insert(handleProcessEntity); |
|
|
|
// 新增流转协助部门
|
|
|
|
itemDeptService.saveItemDepts(dto.getHandleDeptId(), dto, handleProcessEntity.getId()); |
|
|
|
itemDeptService.saveItemDepts(dto.getHandlerDeptId(), dto, handleProcessEntity.getId()); |
|
|
|
List<ItemCirculationDeptResultDTO> circulationDeptResultDTOS = dto.getDeptResultDTOS(); |
|
|
|
List<Long> newDeptIds = new ArrayList<>(); |
|
|
|
for (ItemCirculationDeptResultDTO circulationDto : |
|
|
@ -671,7 +696,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
if (ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue() == dto.getHandleCategory()) { |
|
|
|
informationFormDTO.setTitle(EventsNoticeConstant.NOTICE_ITEM_PROCESSED); |
|
|
|
if (null != dto.getEvaluateDeptDTOS()) { |
|
|
|
itemEvaluateDeptService.saveEvaluateDepts(dto.getEvaluateDeptDTOS(), dto.getId(), dto.getHandleDeptId()); |
|
|
|
itemEvaluateDeptService.saveEvaluateDepts(dto.getEvaluateDeptDTOS(), dto.getId(), dto.getHandlerDeptId()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -690,8 +715,8 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
itemInfoDto.setBusinessType(dto.getHandleCategory()); |
|
|
|
itemInfoDto.setAssociatedBusinessId(dto.getId()); |
|
|
|
itemInfoDto.setAssociatedBusinessContent(entity.getItemContent()); |
|
|
|
itemInfoDto.setHandleDeptId(dto.getHandleDeptId()); |
|
|
|
itemInfoDto.setHandleDept(dto.getHandleDeptName()); |
|
|
|
itemInfoDto.setHandleDeptId(dto.getHandlerDeptId()); |
|
|
|
itemInfoDto.setHandleDept(dto.getHandlerDept()); |
|
|
|
itemInfoDto.setHandleAdvice(dto.getHandleAdvice()); |
|
|
|
itemInfoDto.setReadFlag(ItemInformationConstant.READ_FLAG_NO); |
|
|
|
// 回应处理
|
|
|
@ -743,7 +768,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
// 关闭和结案处理
|
|
|
|
} else { |
|
|
|
// 查询已吹哨部门
|
|
|
|
List<Long> oldDeptIds = itemDeptService.listOfWhistlingDeptIds(dto.getId(), dto.getHandleDeptId()); |
|
|
|
List<Long> oldDeptIds = itemDeptService.listOfWhistlingDeptIds(dto.getId(), dto.getHandlerDeptId()); |
|
|
|
// 遍历被吹哨部门插入项目消息表
|
|
|
|
for (Long itemDeptId : oldDeptIds) { |
|
|
|
// 通知部门Id(被吹哨部门)
|
|
|
@ -759,12 +784,12 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
newsTask.insertUserInformation(informationFormDTO); |
|
|
|
|
|
|
|
// 发送菜单消息-待处理项目
|
|
|
|
if (entity.getGridId().equals(dto.getHandleDeptId())) { |
|
|
|
if (entity.getGridId().equals(dto.getHandlerDeptId())) { |
|
|
|
// 网格长操作-发送菜单消息
|
|
|
|
this.sendItemHandleMenuNotice(entity.getGridId(), null); |
|
|
|
} else { |
|
|
|
// 吹哨部门操作-发送菜单消息
|
|
|
|
this.sendWhistlingDeptItemHandleMenuNotice(Collections.singletonList(dto.getHandleDeptId()), null); |
|
|
|
this.sendWhistlingDeptItemHandleMenuNotice(Collections.singletonList(dto.getHandlerDeptId()), null); |
|
|
|
} |
|
|
|
//项目外部处理意见图片保存
|
|
|
|
if (dto.getOutHandleImages() != null && dto.getOutHandleImages().size() > 0) { |
|
|
@ -831,7 +856,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
|
|
|
|
// 如果当前流转协助是网格发起,判断其街道党工委是否已将该项目流转协助
|
|
|
|
if (OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(dto.getTypeKey())) { |
|
|
|
Result<CompleteDeptDTO> completeDept = adminFeignClient.getCompleteDept(dto.getHandleDeptId()); |
|
|
|
Result<CompleteDeptDTO> completeDept = adminFeignClient.getCompleteDept(dto.getHandlerDeptId()); |
|
|
|
if (!completeDept.success()) { |
|
|
|
return new Result().error("获取机构信息失败,请稍后重试"); |
|
|
|
} |
|
|
@ -1299,7 +1324,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
} |
|
|
|
} else if(ItemHandleCategoryEnum.HANDLE_CLOSE.getValue() == dto.getHandleCategory() || |
|
|
|
ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue() == dto.getHandleCategory()){ |
|
|
|
deptId = baseDao.queryDeptIdList(dto.getId(),dto.getHandleDeptId()); |
|
|
|
deptId = baseDao.queryDeptIdList(dto.getId(),dto.getHandlerDeptId()); |
|
|
|
if (deptId != null && deptId.size() > 0){ |
|
|
|
issueOverseeResultsTask.getUserPhoneByListDeptId(dto, deptId,dto.getTypeKey());//关闭/结案 当前项目的所有部门ID,下的人员发送短信,且不等于当前部门ID
|
|
|
|
} |
|
|
@ -1322,7 +1347,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
*/ |
|
|
|
private void superiorDeptSmsHandle(ItemHandleSubmitFormDTO dto){ |
|
|
|
List<Long> deptId = new ArrayList<>(); |
|
|
|
Long queryDePtId = dto.getHandleDeptId(); |
|
|
|
Long queryDePtId = dto.getHandlerDeptId(); |
|
|
|
while (true){ |
|
|
|
List<Long> createdDeptId = baseDao.queryParentDeptId(dto.getId(),queryDePtId); |
|
|
|
if (createdDeptId != null && createdDeptId.size() > 0){ |
|
|
|