|
|
@ -580,7 +580,15 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result modifyHandleResult(ItemHandleSubmitFormDTO dto) { |
|
|
|
try { |
|
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
|
Result<SysDeptDTO> deptMessage = adminFeignClient.getSysDeptInfo(dto.getHandleDeptId()); |
|
|
|
if( null == deptMessage.getData()){ |
|
|
|
throw new RenException("未查到该部门相关信息"); |
|
|
|
} |
|
|
|
String typeKey = deptMessage.getData().getTypeKey(); |
|
|
|
if(StringUtils.isBlank(typeKey)){ |
|
|
|
throw new RenException("未查到该部门的键类型信息"); |
|
|
|
} |
|
|
|
dto.setTypeKey(typeKey); |
|
|
|
ItemEntity entity = baseDao.selectById(dto.getId()); |
|
|
|
// 组装发送消息内容
|
|
|
|
EpdcInformationFormDTO informationFormDTO = new EpdcInformationFormDTO(); |
|
|
@ -593,12 +601,11 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
informationFormDTO.setRelBusinessContent("项目:" + entity.getItemContent()); |
|
|
|
|
|
|
|
ItemHandleProcessEntity handleProcessEntity = new ItemHandleProcessEntity(); |
|
|
|
handleProcessEntity.setHandlerDeptId(user.getDeptId()); |
|
|
|
handleProcessEntity.setHandlerDept(user.getDeptName()); |
|
|
|
handleProcessEntity.setHandlerDeptId(dto.getHandleDeptId()); |
|
|
|
handleProcessEntity.setHandlerDept(dto.getHandleDeptName()); |
|
|
|
handleProcessEntity.setItemId(dto.getId()); |
|
|
|
handleProcessEntity.setHandleAdvice(dto.getHandleAdvice()); |
|
|
|
handleProcessEntity.setOutHandleAdvice(dto.getOutHandleAdvice()); |
|
|
|
handleProcessEntity.setHandlerDeptId(user.getDeptId()); |
|
|
|
|
|
|
|
if (ItemHandleCategoryEnum.HANDLE_CIRCULATION_ASSISTANCE.getValue() == dto.getHandleCategory()) { |
|
|
|
// 项目流转校验
|
|
|
@ -609,13 +616,13 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
handleProcessEntity.setState(EventIssueItemState.ITEM_HANDLING); |
|
|
|
|
|
|
|
// 获取已流转部门信息
|
|
|
|
List<Long> oldDeptIds = itemDeptService.listOfWhistlingDeptIds(dto.getId(), SecurityUser.getDeptId()); |
|
|
|
List<Long> oldDeptIds = itemDeptService.listOfWhistlingDeptIds(dto.getId(), dto.getHandleDeptId()); |
|
|
|
// 删除已流转协助部门
|
|
|
|
itemDeptService.modifyItemDepts(SecurityUser.getDeptId(), dto.getId()); |
|
|
|
itemDeptService.modifyItemDepts(dto.getHandleDeptId(), dto.getId()); |
|
|
|
// 记录处理记录
|
|
|
|
itemHandleProcessService.insert(handleProcessEntity); |
|
|
|
// 新增流转协助部门
|
|
|
|
itemDeptService.saveItemDepts(SecurityUser.getDeptId(), dto, handleProcessEntity.getId()); |
|
|
|
itemDeptService.saveItemDepts(dto.getHandleDeptId(), dto, handleProcessEntity.getId()); |
|
|
|
List<ItemCirculationDeptResultDTO> circulationDeptResultDTOS = dto.getDeptResultDTOS(); |
|
|
|
List<Long> newDeptIds = new ArrayList<>(); |
|
|
|
for (ItemCirculationDeptResultDTO circulationDto : |
|
|
@ -664,7 +671,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(), SecurityUser.getDeptId()); |
|
|
|
itemEvaluateDeptService.saveEvaluateDepts(dto.getEvaluateDeptDTOS(), dto.getId(), dto.getHandleDeptId()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -683,20 +690,20 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
itemInfoDto.setBusinessType(dto.getHandleCategory()); |
|
|
|
itemInfoDto.setAssociatedBusinessId(dto.getId()); |
|
|
|
itemInfoDto.setAssociatedBusinessContent(entity.getItemContent()); |
|
|
|
itemInfoDto.setHandleDeptId(user.getDeptId()); |
|
|
|
itemInfoDto.setHandleDept(user.getDeptName()); |
|
|
|
itemInfoDto.setHandleDeptId(dto.getHandleDeptId()); |
|
|
|
itemInfoDto.setHandleDept(dto.getHandleDeptName()); |
|
|
|
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(user.getTypeKey()) || OrganizationTypeConstant.ORG_TYPE_STREET_PARTY.equals(user.getTypeKey())) { |
|
|
|
if (OrganizationTypeConstant.ORG_TYPE_COMMUNITY_PARTY.equals(typeKey) || OrganizationTypeConstant.ORG_TYPE_STREET_PARTY.equals(typeKey)) { |
|
|
|
//插入项目消息表(仅网格)
|
|
|
|
// 通知部门Id(网格)
|
|
|
|
itemInfoDto.setDeptId(entity.getGridId().toString()); |
|
|
|
itemInformationService.insert(itemInfoDto); |
|
|
|
// 街道部门和区直部门
|
|
|
|
} else if (OrganizationTypeConstant.ORG_TYPE_STREET_DEPT.equals(user.getTypeKey()) || OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(user.getTypeKey())) { |
|
|
|
} else if (OrganizationTypeConstant.ORG_TYPE_STREET_DEPT.equals(typeKey) || OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(typeKey)) { |
|
|
|
//插入项目消息表(网格和街道)
|
|
|
|
// 通知部门Id(网格)
|
|
|
|
itemInfoDto.setDeptId(entity.getGridId().toString()); |
|
|
@ -736,7 +743,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
// 关闭和结案处理
|
|
|
|
} else { |
|
|
|
// 查询已吹哨部门
|
|
|
|
List<Long> oldDeptIds = itemDeptService.listOfWhistlingDeptIds(dto.getId(), SecurityUser.getDeptId()); |
|
|
|
List<Long> oldDeptIds = itemDeptService.listOfWhistlingDeptIds(dto.getId(), dto.getHandleDeptId()); |
|
|
|
// 遍历被吹哨部门插入项目消息表
|
|
|
|
for (Long itemDeptId : oldDeptIds) { |
|
|
|
// 通知部门Id(被吹哨部门)
|
|
|
@ -752,12 +759,12 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
newsTask.insertUserInformation(informationFormDTO); |
|
|
|
|
|
|
|
// 发送菜单消息-待处理项目
|
|
|
|
if (entity.getGridId().equals(user.getDeptId())) { |
|
|
|
if (entity.getGridId().equals(dto.getHandleDeptId())) { |
|
|
|
// 网格长操作-发送菜单消息
|
|
|
|
this.sendItemHandleMenuNotice(entity.getGridId(), null); |
|
|
|
} else { |
|
|
|
// 吹哨部门操作-发送菜单消息
|
|
|
|
this.sendWhistlingDeptItemHandleMenuNotice(Collections.singletonList(user.getDeptId()), null); |
|
|
|
this.sendWhistlingDeptItemHandleMenuNotice(Collections.singletonList(dto.getHandleDeptId()), null); |
|
|
|
} |
|
|
|
//项目外部处理意见图片保存
|
|
|
|
if (dto.getOutHandleImages() != null && dto.getOutHandleImages().size() > 0) { |
|
|
@ -823,9 +830,8 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
} |
|
|
|
|
|
|
|
// 如果当前流转协助是网格发起,判断其街道党工委是否已将该项目流转协助
|
|
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
|
if (OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(user.getTypeKey())) { |
|
|
|
Result<CompleteDeptDTO> completeDept = adminFeignClient.getCompleteDept(SecurityUser.getDeptId()); |
|
|
|
if (OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(dto.getTypeKey())) { |
|
|
|
Result<CompleteDeptDTO> completeDept = adminFeignClient.getCompleteDept(dto.getHandleDeptId()); |
|
|
|
if (!completeDept.success()) { |
|
|
|
return new Result().error("获取机构信息失败,请稍后重试"); |
|
|
|
} |
|
|
@ -1139,7 +1145,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
ItemGridPlatformEntity itemGridPlatformEntity = new ItemGridPlatformEntity(); |
|
|
|
itemGridPlatformEntity.setReferenceId(handleProcessEntity.getItemId()); |
|
|
|
itemGridPlatformEntity.setTaskid(gridDto.getTaskId()); |
|
|
|
itemGridPlatformEntity.setReportPersonDeptId(user.getDeptId()); |
|
|
|
itemGridPlatformEntity.setReportPersonDeptId(handleProcessEntity.getHandlerDeptId()); |
|
|
|
itemGridPlatformEntity.setStatus(ItemGridPlatformHandleStatusEnum.HANDLE_SB.getValue()); |
|
|
|
itemGridPlatformService.insert(itemGridPlatformEntity); |
|
|
|
|
|
|
@ -1280,7 +1286,6 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
* @Date: 2020-01-09 |
|
|
|
*/ |
|
|
|
private void workProjectHandle(ItemHandleSubmitFormDTO dto){ |
|
|
|
UserDetail user = SecurityUser.getUser(); //获取当前登录人信息
|
|
|
|
List<Long> deptId = new ArrayList<>(); |
|
|
|
if(ItemHandleCategoryEnum.HANDLE_CIRCULATION_ASSISTANCE.getValue() == dto.getHandleCategory()){ |
|
|
|
List<ItemCirculationDeptResultDTO> deptList = dto.getDeptResultDTOS(); |
|
|
@ -1288,18 +1293,18 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
ItemCirculationDeptResultDTO indexDto = (ItemCirculationDeptResultDTO)deptList.get(i); |
|
|
|
deptId.add(indexDto.getDeptId()); |
|
|
|
} |
|
|
|
issueOverseeResultsTask.getUserPhoneByListDeptId(dto, deptId,user.getTypeKey());//吹哨处理 a吹b 向b部门下的,所有人员发送短信
|
|
|
|
if (user.getTypeKey().equals(OrganizationTypeConstant.ORG_TYPE_STREET_PARTY)){ //如果是街道做吹哨处理, 做回应处理
|
|
|
|
issueOverseeResultsTask.getUserPhoneByListDeptId(dto, deptId,dto.getTypeKey());//吹哨处理 a吹b 向b部门下的,所有人员发送短信
|
|
|
|
if (dto.getTypeKey().equals(OrganizationTypeConstant.ORG_TYPE_STREET_PARTY)){ //如果是街道做吹哨处理, 做回应处理
|
|
|
|
this.superiorDeptSmsHandle(dto); |
|
|
|
} |
|
|
|
} else if(ItemHandleCategoryEnum.HANDLE_CLOSE.getValue() == dto.getHandleCategory() || |
|
|
|
ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue() == dto.getHandleCategory()){ |
|
|
|
deptId = baseDao.queryDeptIdList(dto.getId(),user.getDeptId()); |
|
|
|
deptId = baseDao.queryDeptIdList(dto.getId(),dto.getHandleDeptId()); |
|
|
|
if (deptId != null && deptId.size() > 0){ |
|
|
|
issueOverseeResultsTask.getUserPhoneByListDeptId(dto, deptId,user.getTypeKey());//关闭/结案 当前项目的所有部门ID,下的人员发送短信,且不等于当前部门ID
|
|
|
|
issueOverseeResultsTask.getUserPhoneByListDeptId(dto, deptId,dto.getTypeKey());//关闭/结案 当前项目的所有部门ID,下的人员发送短信,且不等于当前部门ID
|
|
|
|
} |
|
|
|
} else if(ItemHandleCategoryEnum.HANDLE_I_HANDLE.getValue() == dto.getHandleCategory()){ |
|
|
|
if (!user.getTypeKey().equals(OrganizationTypeConstant.ORG_TYPE_GRID_PARTY)){//回应
|
|
|
|
if (!dto.getTypeKey().equals(OrganizationTypeConstant.ORG_TYPE_GRID_PARTY)){//回应
|
|
|
|
this.superiorDeptSmsHandle(dto); |
|
|
|
} |
|
|
|
}else if(ItemHandleCategoryEnum.HANDLE_REPORT.getValue() == dto.getHandleCategory()){ //上报网格化平台
|
|
|
@ -1316,9 +1321,8 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
* @Date: 2020-01-14 |
|
|
|
*/ |
|
|
|
private void superiorDeptSmsHandle(ItemHandleSubmitFormDTO dto){ |
|
|
|
UserDetail user = SecurityUser.getUser(); //获取当前登录人信息
|
|
|
|
List<Long> deptId = new ArrayList<>(); |
|
|
|
Long queryDePtId = user.getDeptId(); |
|
|
|
Long queryDePtId = dto.getHandleDeptId(); |
|
|
|
while (true){ |
|
|
|
List<Long> createdDeptId = baseDao.queryParentDeptId(dto.getId(),queryDePtId); |
|
|
|
if (createdDeptId != null && createdDeptId.size() > 0){ |
|
|
@ -1331,7 +1335,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
} |
|
|
|
} |
|
|
|
if (deptId != null && deptId.size() > 0) { |
|
|
|
issueOverseeResultsTask.getUserPhoneByListDeptId(dto, deptId,user.getTypeKey());//做回应处理,向部门下的所有人员发送短信
|
|
|
|
issueOverseeResultsTask.getUserPhoneByListDeptId(dto, deptId,dto.getTypeKey());//做回应处理,向部门下的所有人员发送短信
|
|
|
|
} |
|
|
|
} |
|
|
|
/** |
|
|
|