|
@ -35,14 +35,11 @@ import com.elink.esua.epdc.commons.tools.security.user.UserDetail; |
|
|
import com.elink.esua.epdc.commons.tools.utils.*; |
|
|
import com.elink.esua.epdc.commons.tools.utils.*; |
|
|
import com.elink.esua.epdc.constant.*; |
|
|
import com.elink.esua.epdc.constant.*; |
|
|
import com.elink.esua.epdc.constants.MenuCodeConstant; |
|
|
import com.elink.esua.epdc.constants.MenuCodeConstant; |
|
|
import com.elink.esua.epdc.dto.CompleteDeptDTO; |
|
|
import com.elink.esua.epdc.dto.*; |
|
|
import com.elink.esua.epdc.dto.DeptGridPlatformDTO; |
|
|
|
|
|
import com.elink.esua.epdc.dto.MenuNoticeDTO; |
|
|
|
|
|
import com.elink.esua.epdc.dto.SysDeptDTO; |
|
|
|
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO; |
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO; |
|
|
import com.elink.esua.epdc.dto.events.EpdcEventsCommentsDTO; |
|
|
import com.elink.esua.epdc.dto.events.EpdcEventsCommentsDTO; |
|
|
import com.elink.esua.epdc.dto.form.KpiMetaDataOfEventsFormDTO; |
|
|
|
|
|
import com.elink.esua.epdc.dto.events.form.GroupFormDTO; |
|
|
import com.elink.esua.epdc.dto.events.form.GroupFormDTO; |
|
|
|
|
|
import com.elink.esua.epdc.dto.form.KpiMetaDataOfEventsFormDTO; |
|
|
import com.elink.esua.epdc.dto.form.SmsNoticeFormDTO; |
|
|
import com.elink.esua.epdc.dto.form.SmsNoticeFormDTO; |
|
|
import com.elink.esua.epdc.dto.issue.result.IssueProgressResultDTO; |
|
|
import com.elink.esua.epdc.dto.issue.result.IssueProgressResultDTO; |
|
|
import com.elink.esua.epdc.dto.item.*; |
|
|
import com.elink.esua.epdc.dto.item.*; |
|
@ -158,6 +155,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
@Autowired |
|
|
@Autowired |
|
|
private OssFeignClient ossFeignClient; |
|
|
private OssFeignClient ossFeignClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public PageData<ItemDTO> page(Map<String, Object> params) { |
|
|
public PageData<ItemDTO> page(Map<String, Object> params) { |
|
|
IPage<ItemEntity> page = baseDao.selectPage( |
|
|
IPage<ItemEntity> page = baseDao.selectPage( |
|
@ -324,13 +322,36 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
public ItemDetailForPCEndResultDTO getItemDetailById(String id) { |
|
|
public ItemDetailForPCEndResultDTO getItemDetailById(String id) { |
|
|
// 详情
|
|
|
// 详情
|
|
|
ItemDetailForPCEndResultDTO resultDTO = baseDao.selectOneOfItemDetailForPCEnd(id); |
|
|
ItemDetailForPCEndResultDTO resultDTO = baseDao.selectOneOfItemDetailForPCEnd(id); |
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
//获取项目基本信息
|
|
|
|
|
|
ItemEntity entity = this.selectById(id); |
|
|
|
|
|
// 获取项目处理进度
|
|
|
|
|
|
List<ItemHandleProgressResultDTO> dtoList = baseDao.selectListOfItemHandleProgressByWork(id); |
|
|
|
|
|
resultDTO.setHandleProgressResultDTOS(dtoList); |
|
|
|
|
|
// 获取议题处理进度
|
|
|
|
|
|
List<IssueProgressResultDTO> issueProgressResultDTOS = issueService.listIssueProgress(entity.getIssueId()); |
|
|
|
|
|
resultDTO.setIssueProgressResultDTOS(issueProgressResultDTOS); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return resultDTO; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public ItemDetailForPCEndResultDTO getHandleResultDTOS(HandleResultDTOSFormDTO dto) { |
|
|
|
|
|
// 详情
|
|
|
|
|
|
ItemDetailForPCEndResultDTO resultDTO = new ItemDetailForPCEndResultDTO(); |
|
|
// 获取已流转部门
|
|
|
// 获取已流转部门
|
|
|
List<ItemDeptDTO> itemDeptDTOS = itemDeptService.listOfItemDept(id, user.getDeptId()); |
|
|
List<ItemDeptDTO> itemDeptDTOS = itemDeptService.listOfItemDept(dto.getItemId(), dto.getDeptId()); |
|
|
|
|
|
Result deptMessage = adminFeignClient.getDeptTypeKey(dto.getDeptId()); |
|
|
|
|
|
String typeKey = ""; |
|
|
|
|
|
if( 0 == deptMessage.getCode()){ |
|
|
|
|
|
typeKey = deptMessage.getData().toString(); |
|
|
|
|
|
}else{ |
|
|
|
|
|
throw new RenException(deptMessage.getMsg()); |
|
|
|
|
|
} |
|
|
// 获取可操作处理和可流转部门
|
|
|
// 获取可操作处理和可流转部门
|
|
|
switch (user.getTypeKey()) { |
|
|
switch (typeKey) { |
|
|
case OrganizationTypeConstant.ORG_TYPE_GRID_PARTY: |
|
|
case OrganizationTypeConstant.ORG_TYPE_GRID_PARTY: |
|
|
resultDTO = this.getHandleCategoryAndCirculationDeptOfGrid(resultDTO, itemDeptDTOS); |
|
|
resultDTO = this.getHandleCategoryAndCirculationDeptOfGrid(resultDTO, itemDeptDTOS, dto.getDeptId()); |
|
|
break; |
|
|
break; |
|
|
case OrganizationTypeConstant.ORG_TYPE_COMMUNITY_PARTY: |
|
|
case OrganizationTypeConstant.ORG_TYPE_COMMUNITY_PARTY: |
|
|
case OrganizationTypeConstant.ORG_TYPE_STREET_DEPT: |
|
|
case OrganizationTypeConstant.ORG_TYPE_STREET_DEPT: |
|
@ -338,18 +359,8 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
resultDTO = this.getHandleCategory(resultDTO); |
|
|
resultDTO = this.getHandleCategory(resultDTO); |
|
|
break; |
|
|
break; |
|
|
case OrganizationTypeConstant.ORG_TYPE_STREET_PARTY: |
|
|
case OrganizationTypeConstant.ORG_TYPE_STREET_PARTY: |
|
|
resultDTO = this.getHandleCategoryAndCirculationDeptOfStreet(resultDTO, itemDeptDTOS); |
|
|
resultDTO = this.getHandleCategoryAndCirculationDeptOfStreet(resultDTO, itemDeptDTOS, dto.getDeptId()); |
|
|
} |
|
|
} |
|
|
//获取项目基本信息
|
|
|
|
|
|
ItemEntity entity = this.selectById(id); |
|
|
|
|
|
// 获取项目处理进度
|
|
|
|
|
|
List<ItemHandleProgressResultDTO> dtoList = baseDao.selectListOfItemHandleProgressByWork(id); |
|
|
|
|
|
resultDTO.setHandleProgressResultDTOS(dtoList); |
|
|
|
|
|
// 获取议题处理进度
|
|
|
|
|
|
List<IssueProgressResultDTO> issueProgressResultDTOS = issueService.listIssueProgress(entity.getIssueId()); |
|
|
|
|
|
resultDTO.setIssueProgressResultDTOS(issueProgressResultDTOS); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return resultDTO; |
|
|
return resultDTO; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -362,9 +373,9 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
* @Date: 2019/9/16 13:40 |
|
|
* @Date: 2019/9/16 13:40 |
|
|
*/ |
|
|
*/ |
|
|
private ItemDetailForPCEndResultDTO getHandleCategoryAndCirculationDeptOfGrid(ItemDetailForPCEndResultDTO resultDTO, |
|
|
private ItemDetailForPCEndResultDTO getHandleCategoryAndCirculationDeptOfGrid(ItemDetailForPCEndResultDTO resultDTO, |
|
|
List<ItemDeptDTO> itemDeptDTOS) { |
|
|
List<ItemDeptDTO> itemDeptDTOS,Long deptId) { |
|
|
// 可流转部门
|
|
|
// 可流转部门
|
|
|
Result<CompleteDeptDTO> completeDept = adminFeignClient.getCompleteDept(SecurityUser.getDeptId()); |
|
|
Result<CompleteDeptDTO> completeDept = adminFeignClient.getCompleteDept(deptId); |
|
|
if (!completeDept.success()) { |
|
|
if (!completeDept.success()) { |
|
|
throw new RenException("获取流转协助部门失败"); |
|
|
throw new RenException("获取流转协助部门失败"); |
|
|
} |
|
|
} |
|
@ -415,7 +426,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
resultDTO.setDeptResultDTOS(deptResultDTOS); |
|
|
resultDTO.setDeptResultDTOS(deptResultDTOS); |
|
|
|
|
|
|
|
|
// 满意度评价部门
|
|
|
// 满意度评价部门
|
|
|
List<ItemEvaluateDeptDTO> evaluateDeptDTOS = itemDeptService.listOfEvaluateDepts(resultDTO.getId(), SecurityUser.getDeptId()); |
|
|
List<ItemEvaluateDeptDTO> evaluateDeptDTOS = itemDeptService.listOfEvaluateDepts(resultDTO.getId(), deptId); |
|
|
resultDTO.setEvaluateDeptDTOS(evaluateDeptDTOS); |
|
|
resultDTO.setEvaluateDeptDTOS(evaluateDeptDTOS); |
|
|
|
|
|
|
|
|
return resultDTO; |
|
|
return resultDTO; |
|
@ -450,13 +461,19 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
* @Date: 2019/11/19 16:34 |
|
|
* @Date: 2019/11/19 16:34 |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public Result<List<ItemCirculationDeptResultDTO>> whistlingDept() { |
|
|
public Result<List<ItemCirculationDeptResultDTO>> whistlingDept(EventDeptFormDTO formDto) { |
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
Result deptMessage = adminFeignClient.getDeptTypeKey(formDto.getDeptId()); |
|
|
|
|
|
String typeKey = ""; |
|
|
|
|
|
if( 0 == deptMessage.getCode()){ |
|
|
|
|
|
typeKey = deptMessage.getData().toString(); |
|
|
|
|
|
}else{ |
|
|
|
|
|
throw new RenException(deptMessage.getMsg()); |
|
|
|
|
|
} |
|
|
List<ItemCirculationDeptResultDTO> deptResultDTOS = new ArrayList<>(); |
|
|
List<ItemCirculationDeptResultDTO> deptResultDTOS = new ArrayList<>(); |
|
|
// 网格-可做操作和可流转部门
|
|
|
// 网格-可做操作和可流转部门
|
|
|
if (OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(user.getTypeKey())) { |
|
|
if (OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(typeKey)) { |
|
|
// 可流转部门
|
|
|
// 可流转部门
|
|
|
Result<CompleteDeptDTO> completeDept = adminFeignClient.getCompleteDept(SecurityUser.getDeptId()); |
|
|
Result<CompleteDeptDTO> completeDept = adminFeignClient.getCompleteDept(formDto.getDeptId()); |
|
|
if (!completeDept.success()) { |
|
|
if (!completeDept.success()) { |
|
|
throw new RenException("获取流转协助部门失败"); |
|
|
throw new RenException("获取流转协助部门失败"); |
|
|
} |
|
|
} |
|
@ -475,9 +492,9 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
circulationDeptStreetResultDTO.setTypeKey(OrganizationTypeConstant.ORG_TYPE_STREET_PARTY); |
|
|
circulationDeptStreetResultDTO.setTypeKey(OrganizationTypeConstant.ORG_TYPE_STREET_PARTY); |
|
|
deptResultDTOS.add(circulationDeptStreetResultDTO); |
|
|
deptResultDTOS.add(circulationDeptStreetResultDTO); |
|
|
|
|
|
|
|
|
} else if (OrganizationTypeConstant.ORG_TYPE_STREET_PARTY.equals(user.getTypeKey())) { |
|
|
} else if (OrganizationTypeConstant.ORG_TYPE_STREET_PARTY.equals(typeKey)) { |
|
|
// 可流转部门
|
|
|
// 可流转部门
|
|
|
Result<List<SysDeptDTO>> listResult = adminFeignClient.listOfItemCirculationDept(SecurityUser.getDeptId()); |
|
|
Result<List<SysDeptDTO>> listResult = adminFeignClient.listOfItemCirculationDept(formDto.getDeptId()); |
|
|
if (!listResult.success()) { |
|
|
if (!listResult.success()) { |
|
|
throw new RenException("获取流转协助部门失败"); |
|
|
throw new RenException("获取流转协助部门失败"); |
|
|
} |
|
|
} |
|
@ -505,9 +522,9 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
* @Date: 2019/9/16 16:17 |
|
|
* @Date: 2019/9/16 16:17 |
|
|
*/ |
|
|
*/ |
|
|
private ItemDetailForPCEndResultDTO getHandleCategoryAndCirculationDeptOfStreet(ItemDetailForPCEndResultDTO resultDTO, |
|
|
private ItemDetailForPCEndResultDTO getHandleCategoryAndCirculationDeptOfStreet(ItemDetailForPCEndResultDTO resultDTO, |
|
|
List<ItemDeptDTO> itemDeptDTOS) { |
|
|
List<ItemDeptDTO> itemDeptDTOS,Long deptId) { |
|
|
// 可流转部门
|
|
|
// 可流转部门
|
|
|
Result<List<SysDeptDTO>> listResult = adminFeignClient.listOfItemCirculationDept(SecurityUser.getDeptId()); |
|
|
Result<List<SysDeptDTO>> listResult = adminFeignClient.listOfItemCirculationDept(deptId); |
|
|
if (!listResult.success()) { |
|
|
if (!listResult.success()) { |
|
|
throw new RenException("获取流转协助部门失败"); |
|
|
throw new RenException("获取流转协助部门失败"); |
|
|
} |
|
|
} |
|
@ -579,7 +596,14 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public Result modifyHandleResult(ItemHandleSubmitFormDTO dto) { |
|
|
public Result modifyHandleResult(ItemHandleSubmitFormDTO dto) { |
|
|
try { |
|
|
try { |
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
Result deptMessage = adminFeignClient.getDeptTypeKey(dto.getHandlerDeptId()); |
|
|
|
|
|
String typeKey = ""; |
|
|
|
|
|
if( 0 == deptMessage.getCode()){ |
|
|
|
|
|
typeKey = deptMessage.getData().toString(); |
|
|
|
|
|
}else{ |
|
|
|
|
|
throw new RenException(deptMessage.getMsg()); |
|
|
|
|
|
} |
|
|
|
|
|
dto.setTypeKey(typeKey); |
|
|
ItemEntity entity = baseDao.selectById(dto.getId()); |
|
|
ItemEntity entity = baseDao.selectById(dto.getId()); |
|
|
// 组装发送消息内容
|
|
|
// 组装发送消息内容
|
|
|
EpdcInformationFormDTO informationFormDTO = new EpdcInformationFormDTO(); |
|
|
EpdcInformationFormDTO informationFormDTO = new EpdcInformationFormDTO(); |
|
@ -592,14 +616,26 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
informationFormDTO.setRelBusinessContent("项目:" + entity.getItemContent()); |
|
|
informationFormDTO.setRelBusinessContent("项目:" + entity.getItemContent()); |
|
|
|
|
|
|
|
|
ItemHandleProcessEntity handleProcessEntity = new ItemHandleProcessEntity(); |
|
|
ItemHandleProcessEntity handleProcessEntity = new ItemHandleProcessEntity(); |
|
|
handleProcessEntity.setHandlerDeptId(user.getDeptId()); |
|
|
handleProcessEntity.setHandlerDeptId(dto.getHandlerDeptId()); |
|
|
handleProcessEntity.setHandlerDept(user.getDeptName()); |
|
|
handleProcessEntity.setHandlerDept(dto.getHandlerDept()); |
|
|
handleProcessEntity.setItemId(dto.getId()); |
|
|
handleProcessEntity.setItemId(dto.getId()); |
|
|
handleProcessEntity.setHandleAdvice(dto.getHandleAdvice()); |
|
|
handleProcessEntity.setHandleAdvice(dto.getHandleAdvice()); |
|
|
handleProcessEntity.setOutHandleAdvice(dto.getOutHandleAdvice()); |
|
|
handleProcessEntity.setOutHandleAdvice(dto.getOutHandleAdvice()); |
|
|
handleProcessEntity.setHandlerDeptId(user.getDeptId()); |
|
|
|
|
|
|
|
|
|
|
|
if (ItemHandleCategoryEnum.HANDLE_CIRCULATION_ASSISTANCE.getValue() == dto.getHandleCategory()) { |
|
|
if (ItemHandleCategoryEnum.HANDLE_CIRCULATION_ASSISTANCE.getValue() == dto.getHandleCategory()) { |
|
|
|
|
|
// 吹哨
|
|
|
|
|
|
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); |
|
|
Result checkResult = this.checkItemCirculation(dto); |
|
|
if (!checkResult.success()) { |
|
|
if (!checkResult.success()) { |
|
@ -608,13 +644,13 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
handleProcessEntity.setState(EventIssueItemState.ITEM_HANDLING); |
|
|
handleProcessEntity.setState(EventIssueItemState.ITEM_HANDLING); |
|
|
|
|
|
|
|
|
// 获取已流转部门信息
|
|
|
// 获取已流转部门信息
|
|
|
List<Long> oldDeptIds = itemDeptService.listOfWhistlingDeptIds(dto.getId(), SecurityUser.getDeptId()); |
|
|
List<Long> oldDeptIds = itemDeptService.listOfWhistlingDeptIds(dto.getId(), dto.getHandlerDeptId()); |
|
|
// 删除已流转协助部门
|
|
|
// 删除已流转协助部门
|
|
|
itemDeptService.modifyItemDepts(SecurityUser.getDeptId(), dto.getId()); |
|
|
itemDeptService.modifyItemDepts(dto.getHandlerDeptId(), dto.getId()); |
|
|
// 记录处理记录
|
|
|
// 记录处理记录
|
|
|
itemHandleProcessService.insert(handleProcessEntity); |
|
|
itemHandleProcessService.insert(handleProcessEntity); |
|
|
// 新增流转协助部门
|
|
|
// 新增流转协助部门
|
|
|
itemDeptService.saveItemDepts(SecurityUser.getDeptId(), dto, handleProcessEntity.getId()); |
|
|
itemDeptService.saveItemDepts(dto.getHandlerDeptId(), dto, handleProcessEntity.getId()); |
|
|
List<ItemCirculationDeptResultDTO> circulationDeptResultDTOS = dto.getDeptResultDTOS(); |
|
|
List<ItemCirculationDeptResultDTO> circulationDeptResultDTOS = dto.getDeptResultDTOS(); |
|
|
List<Long> newDeptIds = new ArrayList<>(); |
|
|
List<Long> newDeptIds = new ArrayList<>(); |
|
|
for (ItemCirculationDeptResultDTO circulationDto : |
|
|
for (ItemCirculationDeptResultDTO circulationDto : |
|
@ -651,8 +687,11 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
} else { |
|
|
} else { |
|
|
handleProcessEntity.setState(dto.getHandleCategory()); |
|
|
handleProcessEntity.setState(dto.getHandleCategory()); |
|
|
// 更新项目状态
|
|
|
// 更新项目状态
|
|
|
if (ItemHandleCategoryEnum.HANDLE_CLOSE.getValue() == dto.getHandleCategory() || |
|
|
if (ItemHandleCategoryEnum.HANDLE_CLOSE.getValue() == dto.getHandleCategory() || ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue() == dto.getHandleCategory()) { |
|
|
ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue() == dto.getHandleCategory()) { |
|
|
if (dto.getHandlerDeptId().longValue() != entity.getGridId().longValue()) { |
|
|
|
|
|
return new Result().error("请选择正确的处理部门"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
informationFormDTO.setTitle(EventsNoticeConstant.NOTICE_ITEM_CLOSED); |
|
|
informationFormDTO.setTitle(EventsNoticeConstant.NOTICE_ITEM_CLOSED); |
|
|
|
|
|
|
|
|
ItemEntity itemEntity = new ItemEntity(); |
|
|
ItemEntity itemEntity = new ItemEntity(); |
|
@ -663,7 +702,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
if (ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue() == dto.getHandleCategory()) { |
|
|
if (ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue() == dto.getHandleCategory()) { |
|
|
informationFormDTO.setTitle(EventsNoticeConstant.NOTICE_ITEM_PROCESSED); |
|
|
informationFormDTO.setTitle(EventsNoticeConstant.NOTICE_ITEM_PROCESSED); |
|
|
if (null != dto.getEvaluateDeptDTOS()) { |
|
|
if (null != dto.getEvaluateDeptDTOS()) { |
|
|
itemEvaluateDeptService.saveEvaluateDepts(dto.getEvaluateDeptDTOS(), dto.getId(), SecurityUser.getDeptId()); |
|
|
itemEvaluateDeptService.saveEvaluateDepts(dto.getEvaluateDeptDTOS(), dto.getId(), dto.getHandlerDeptId()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -682,20 +721,20 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
itemInfoDto.setBusinessType(dto.getHandleCategory()); |
|
|
itemInfoDto.setBusinessType(dto.getHandleCategory()); |
|
|
itemInfoDto.setAssociatedBusinessId(dto.getId()); |
|
|
itemInfoDto.setAssociatedBusinessId(dto.getId()); |
|
|
itemInfoDto.setAssociatedBusinessContent(entity.getItemContent()); |
|
|
itemInfoDto.setAssociatedBusinessContent(entity.getItemContent()); |
|
|
itemInfoDto.setHandleDeptId(user.getDeptId()); |
|
|
itemInfoDto.setHandleDeptId(dto.getHandlerDeptId()); |
|
|
itemInfoDto.setHandleDept(user.getDeptName()); |
|
|
itemInfoDto.setHandleDept(dto.getHandlerDept()); |
|
|
itemInfoDto.setHandleAdvice(dto.getHandleAdvice()); |
|
|
itemInfoDto.setHandleAdvice(dto.getHandleAdvice()); |
|
|
itemInfoDto.setReadFlag(ItemInformationConstant.READ_FLAG_NO); |
|
|
itemInfoDto.setReadFlag(ItemInformationConstant.READ_FLAG_NO); |
|
|
// 回应处理
|
|
|
// 回应处理
|
|
|
if (ItemHandleCategoryEnum.HANDLE_I_HANDLE.getValue() == dto.getHandleCategory()) { |
|
|
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(网格)
|
|
|
// 通知部门Id(网格)
|
|
|
itemInfoDto.setDeptId(entity.getGridId().toString()); |
|
|
itemInfoDto.setDeptId(entity.getGridId().toString()); |
|
|
itemInformationService.insert(itemInfoDto); |
|
|
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(网格)
|
|
|
// 通知部门Id(网格)
|
|
|
itemInfoDto.setDeptId(entity.getGridId().toString()); |
|
|
itemInfoDto.setDeptId(entity.getGridId().toString()); |
|
@ -735,7 +774,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
// 关闭和结案处理
|
|
|
// 关闭和结案处理
|
|
|
} else { |
|
|
} else { |
|
|
// 查询已吹哨部门
|
|
|
// 查询已吹哨部门
|
|
|
List<Long> oldDeptIds = itemDeptService.listOfWhistlingDeptIds(dto.getId(), SecurityUser.getDeptId()); |
|
|
List<Long> oldDeptIds = itemDeptService.listOfWhistlingDeptIds(dto.getId(), dto.getHandlerDeptId()); |
|
|
// 遍历被吹哨部门插入项目消息表
|
|
|
// 遍历被吹哨部门插入项目消息表
|
|
|
for (Long itemDeptId : oldDeptIds) { |
|
|
for (Long itemDeptId : oldDeptIds) { |
|
|
// 通知部门Id(被吹哨部门)
|
|
|
// 通知部门Id(被吹哨部门)
|
|
@ -751,12 +790,12 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
newsTask.insertUserInformation(informationFormDTO); |
|
|
newsTask.insertUserInformation(informationFormDTO); |
|
|
|
|
|
|
|
|
// 发送菜单消息-待处理项目
|
|
|
// 发送菜单消息-待处理项目
|
|
|
if (entity.getGridId().equals(user.getDeptId())) { |
|
|
if (entity.getGridId().equals(dto.getHandlerDeptId())) { |
|
|
// 网格长操作-发送菜单消息
|
|
|
// 网格长操作-发送菜单消息
|
|
|
this.sendItemHandleMenuNotice(entity.getGridId(), null); |
|
|
this.sendItemHandleMenuNotice(entity.getGridId(), null); |
|
|
} else { |
|
|
} else { |
|
|
// 吹哨部门操作-发送菜单消息
|
|
|
// 吹哨部门操作-发送菜单消息
|
|
|
this.sendWhistlingDeptItemHandleMenuNotice(Collections.singletonList(user.getDeptId()), null); |
|
|
this.sendWhistlingDeptItemHandleMenuNotice(Collections.singletonList(dto.getHandlerDeptId()), null); |
|
|
} |
|
|
} |
|
|
//项目外部处理意见图片保存
|
|
|
//项目外部处理意见图片保存
|
|
|
if (dto.getOutHandleImages() != null && dto.getOutHandleImages().size() > 0) { |
|
|
if (dto.getOutHandleImages() != null && dto.getOutHandleImages().size() > 0) { |
|
@ -822,9 +861,8 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 如果当前流转协助是网格发起,判断其街道党工委是否已将该项目流转协助
|
|
|
// 如果当前流转协助是网格发起,判断其街道党工委是否已将该项目流转协助
|
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
if (OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(dto.getTypeKey())) { |
|
|
if (OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(user.getTypeKey())) { |
|
|
Result<CompleteDeptDTO> completeDept = adminFeignClient.getCompleteDept(dto.getHandlerDeptId()); |
|
|
Result<CompleteDeptDTO> completeDept = adminFeignClient.getCompleteDept(SecurityUser.getDeptId()); |
|
|
|
|
|
if (!completeDept.success()) { |
|
|
if (!completeDept.success()) { |
|
|
return new Result().error("获取机构信息失败,请稍后重试"); |
|
|
return new Result().error("获取机构信息失败,请稍后重试"); |
|
|
} |
|
|
} |
|
@ -1138,7 +1176,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
ItemGridPlatformEntity itemGridPlatformEntity = new ItemGridPlatformEntity(); |
|
|
ItemGridPlatformEntity itemGridPlatformEntity = new ItemGridPlatformEntity(); |
|
|
itemGridPlatformEntity.setReferenceId(handleProcessEntity.getItemId()); |
|
|
itemGridPlatformEntity.setReferenceId(handleProcessEntity.getItemId()); |
|
|
itemGridPlatformEntity.setTaskid(gridDto.getTaskId()); |
|
|
itemGridPlatformEntity.setTaskid(gridDto.getTaskId()); |
|
|
itemGridPlatformEntity.setReportPersonDeptId(user.getDeptId()); |
|
|
itemGridPlatformEntity.setReportPersonDeptId(handleProcessEntity.getHandlerDeptId()); |
|
|
itemGridPlatformEntity.setStatus(ItemGridPlatformHandleStatusEnum.HANDLE_SB.getValue()); |
|
|
itemGridPlatformEntity.setStatus(ItemGridPlatformHandleStatusEnum.HANDLE_SB.getValue()); |
|
|
itemGridPlatformService.insert(itemGridPlatformEntity); |
|
|
itemGridPlatformService.insert(itemGridPlatformEntity); |
|
|
|
|
|
|
|
@ -1279,7 +1317,6 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
* @Date: 2020-01-09 |
|
|
* @Date: 2020-01-09 |
|
|
*/ |
|
|
*/ |
|
|
private void workProjectHandle(ItemHandleSubmitFormDTO dto){ |
|
|
private void workProjectHandle(ItemHandleSubmitFormDTO dto){ |
|
|
UserDetail user = SecurityUser.getUser(); //获取当前登录人信息
|
|
|
|
|
|
List<Long> deptId = new ArrayList<>(); |
|
|
List<Long> deptId = new ArrayList<>(); |
|
|
if(ItemHandleCategoryEnum.HANDLE_CIRCULATION_ASSISTANCE.getValue() == dto.getHandleCategory()){ |
|
|
if(ItemHandleCategoryEnum.HANDLE_CIRCULATION_ASSISTANCE.getValue() == dto.getHandleCategory()){ |
|
|
List<ItemCirculationDeptResultDTO> deptList = dto.getDeptResultDTOS(); |
|
|
List<ItemCirculationDeptResultDTO> deptList = dto.getDeptResultDTOS(); |
|
@ -1287,18 +1324,18 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
ItemCirculationDeptResultDTO indexDto = (ItemCirculationDeptResultDTO)deptList.get(i); |
|
|
ItemCirculationDeptResultDTO indexDto = (ItemCirculationDeptResultDTO)deptList.get(i); |
|
|
deptId.add(indexDto.getDeptId()); |
|
|
deptId.add(indexDto.getDeptId()); |
|
|
} |
|
|
} |
|
|
issueOverseeResultsTask.getUserPhoneByListDeptId(dto, deptId,user.getTypeKey());//吹哨处理 a吹b 向b部门下的,所有人员发送短信
|
|
|
issueOverseeResultsTask.getUserPhoneByListDeptId(dto, deptId,dto.getTypeKey());//吹哨处理 a吹b 向b部门下的,所有人员发送短信
|
|
|
if (user.getTypeKey().equals(OrganizationTypeConstant.ORG_TYPE_STREET_PARTY)){ //如果是街道做吹哨处理, 做回应处理
|
|
|
if (dto.getTypeKey().equals(OrganizationTypeConstant.ORG_TYPE_STREET_PARTY)){ //如果是街道做吹哨处理, 做回应处理
|
|
|
this.superiorDeptSmsHandle(dto); |
|
|
this.superiorDeptSmsHandle(dto); |
|
|
} |
|
|
} |
|
|
} else if(ItemHandleCategoryEnum.HANDLE_CLOSE.getValue() == dto.getHandleCategory() || |
|
|
} else if(ItemHandleCategoryEnum.HANDLE_CLOSE.getValue() == dto.getHandleCategory() || |
|
|
ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue() == dto.getHandleCategory()){ |
|
|
ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue() == dto.getHandleCategory()){ |
|
|
deptId = baseDao.queryDeptIdList(dto.getId(),user.getDeptId()); |
|
|
deptId = baseDao.queryDeptIdList(dto.getId(),dto.getHandlerDeptId()); |
|
|
if (deptId != null && deptId.size() > 0){ |
|
|
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()){ |
|
|
} 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); |
|
|
this.superiorDeptSmsHandle(dto); |
|
|
} |
|
|
} |
|
|
}else if(ItemHandleCategoryEnum.HANDLE_REPORT.getValue() == dto.getHandleCategory()){ //上报网格化平台
|
|
|
}else if(ItemHandleCategoryEnum.HANDLE_REPORT.getValue() == dto.getHandleCategory()){ //上报网格化平台
|
|
@ -1315,9 +1352,8 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
* @Date: 2020-01-14 |
|
|
* @Date: 2020-01-14 |
|
|
*/ |
|
|
*/ |
|
|
private void superiorDeptSmsHandle(ItemHandleSubmitFormDTO dto){ |
|
|
private void superiorDeptSmsHandle(ItemHandleSubmitFormDTO dto){ |
|
|
UserDetail user = SecurityUser.getUser(); //获取当前登录人信息
|
|
|
|
|
|
List<Long> deptId = new ArrayList<>(); |
|
|
List<Long> deptId = new ArrayList<>(); |
|
|
Long queryDePtId = user.getDeptId(); |
|
|
Long queryDePtId = dto.getHandlerDeptId(); |
|
|
while (true){ |
|
|
while (true){ |
|
|
List<Long> createdDeptId = baseDao.queryParentDeptId(dto.getId(),queryDePtId); |
|
|
List<Long> createdDeptId = baseDao.queryParentDeptId(dto.getId(),queryDePtId); |
|
|
if (createdDeptId != null && createdDeptId.size() > 0){ |
|
|
if (createdDeptId != null && createdDeptId.size() > 0){ |
|
@ -1330,7 +1366,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (deptId != null && deptId.size() > 0) { |
|
|
if (deptId != null && deptId.size() > 0) { |
|
|
issueOverseeResultsTask.getUserPhoneByListDeptId(dto, deptId,user.getTypeKey());//做回应处理,向部门下的所有人员发送短信
|
|
|
issueOverseeResultsTask.getUserPhoneByListDeptId(dto, deptId,dto.getTypeKey());//做回应处理,向部门下的所有人员发送短信
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
/** |
|
|
/** |
|
@ -1360,11 +1396,17 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
* @Date 2020/1/13 16:55 |
|
|
* @Date 2020/1/13 16:55 |
|
|
**/ |
|
|
**/ |
|
|
@Override |
|
|
@Override |
|
|
public Result<List<ItemHandleResultDTO>> queryHandleCategories() { |
|
|
public Result<List<ItemHandleResultDTO>> queryHandleCategories(EventDeptFormDTO formDto) { |
|
|
List<ItemHandleResultDTO> itemHandleResultDTOList = new ArrayList<>(); |
|
|
List<ItemHandleResultDTO> itemHandleResultDTOList = new ArrayList<>(); |
|
|
UserDetail userDetail = SecurityUser.getUser(); |
|
|
Result deptMessage = adminFeignClient.getDeptTypeKey(formDto.getDeptId()); |
|
|
|
|
|
String typeKey = ""; |
|
|
|
|
|
if( 0 == deptMessage.getCode()){ |
|
|
|
|
|
typeKey = deptMessage.getData().toString(); |
|
|
|
|
|
}else{ |
|
|
|
|
|
throw new RenException(deptMessage.getMsg()); |
|
|
|
|
|
} |
|
|
// 获取可操作处理和可流转部门
|
|
|
// 获取可操作处理和可流转部门
|
|
|
switch (userDetail.getTypeKey()) { |
|
|
switch (typeKey) { |
|
|
case OrganizationTypeConstant.ORG_TYPE_GRID_PARTY: |
|
|
case OrganizationTypeConstant.ORG_TYPE_GRID_PARTY: |
|
|
itemHandleResultDTOList = ItemHandleCategoryEnum.getHandleCategoriesForGird(false); |
|
|
itemHandleResultDTOList = ItemHandleCategoryEnum.getHandleCategoriesForGird(false); |
|
|
break; |
|
|
break; |
|
|