|
@ -29,10 +29,7 @@ import com.elink.esua.epdc.commons.tools.security.user.UserDetail; |
|
|
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|
|
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|
|
import com.elink.esua.epdc.commons.tools.utils.DateUtils; |
|
|
import com.elink.esua.epdc.commons.tools.utils.DateUtils; |
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
import com.elink.esua.epdc.constant.EventIssueItemState; |
|
|
import com.elink.esua.epdc.constant.*; |
|
|
import com.elink.esua.epdc.constant.EventsNoticeConstant; |
|
|
|
|
|
import com.elink.esua.epdc.constant.ImageConstant; |
|
|
|
|
|
import com.elink.esua.epdc.constant.ItemInformationConstant; |
|
|
|
|
|
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.CompleteDeptDTO; |
|
|
import com.elink.esua.epdc.dto.KpiMetaDataDTO; |
|
|
import com.elink.esua.epdc.dto.KpiMetaDataDTO; |
|
@ -122,7 +119,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
//部门ID列表
|
|
|
//部门ID列表
|
|
|
List<Long> deptIdList = new ArrayList<>(); |
|
|
List<Long> deptIdList = new ArrayList<>(); |
|
|
// 判断是否为网格,不为网格只能查看本部门下的项目数据
|
|
|
// 判断是否为网格,不为网格只能查看本部门下的项目数据
|
|
|
if (OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(user.getTypeKey())) { |
|
|
if (TypeKeyConstant.DEPT_GRID_PARTY.equals(user.getTypeKey())) { |
|
|
deptIdList = user.getDeptIdList(); |
|
|
deptIdList = user.getDeptIdList(); |
|
|
} else { |
|
|
} else { |
|
|
deptIdList.add(user.getDeptId()); |
|
|
deptIdList.add(user.getDeptId()); |
|
@ -269,15 +266,15 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
List<ItemDeptDTO> itemDeptDTOS = itemDeptService.listOfItemDept(id, user.getDeptId()); |
|
|
List<ItemDeptDTO> itemDeptDTOS = itemDeptService.listOfItemDept(id, user.getDeptId()); |
|
|
// 获取可操作处理和可流转部门
|
|
|
// 获取可操作处理和可流转部门
|
|
|
switch (user.getTypeKey()) { |
|
|
switch (user.getTypeKey()) { |
|
|
case OrganizationTypeConstant.ORG_TYPE_GRID_PARTY: |
|
|
case TypeKeyConstant.DEPT_GRID_PARTY: |
|
|
resultDTO = this.getHandleCategoryAndCirculationDeptOfGrid(resultDTO, itemDeptDTOS); |
|
|
resultDTO = this.getHandleCategoryAndCirculationDeptOfGrid(resultDTO, itemDeptDTOS); |
|
|
break; |
|
|
break; |
|
|
case OrganizationTypeConstant.ORG_TYPE_COMMUNITY_PARTY: |
|
|
case TypeKeyConstant.DEPT_COMMUNITY_PARTY: |
|
|
case OrganizationTypeConstant.ORG_TYPE_STREET_DEPT: |
|
|
case TypeKeyConstant.DEPT_STREET_DEPT: |
|
|
case OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT: |
|
|
case TypeKeyConstant.DEPT_DISTRICT_DEPT: |
|
|
resultDTO = this.getHandleCategory(resultDTO); |
|
|
resultDTO = this.getHandleCategory(resultDTO); |
|
|
break; |
|
|
break; |
|
|
case OrganizationTypeConstant.ORG_TYPE_STREET_PARTY: |
|
|
case TypeKeyConstant.DEPT_STREET_PARTY: |
|
|
resultDTO = this.getHandleCategoryAndCirculationDeptOfStreet(resultDTO, itemDeptDTOS); |
|
|
resultDTO = this.getHandleCategoryAndCirculationDeptOfStreet(resultDTO, itemDeptDTOS); |
|
|
} |
|
|
} |
|
|
//获取项目基本信息
|
|
|
//获取项目基本信息
|
|
@ -337,7 +334,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
ItemCirculationDeptResultDTO circulationDeptResultDTO = new ItemCirculationDeptResultDTO(); |
|
|
ItemCirculationDeptResultDTO circulationDeptResultDTO = new ItemCirculationDeptResultDTO(); |
|
|
circulationDeptResultDTO.setDeptId(completeDeptDTO.getCommunityId()); |
|
|
circulationDeptResultDTO.setDeptId(completeDeptDTO.getCommunityId()); |
|
|
circulationDeptResultDTO.setDeptName(completeDeptDTO.getCommunity()); |
|
|
circulationDeptResultDTO.setDeptName(completeDeptDTO.getCommunity()); |
|
|
circulationDeptResultDTO.setTypeKey(OrganizationTypeConstant.ORG_TYPE_COMMUNITY_PARTY); |
|
|
circulationDeptResultDTO.setTypeKey(TypeKeyConstant.DEPT_COMMUNITY_PARTY); |
|
|
circulationDeptResultDTO.setSelected(false); |
|
|
circulationDeptResultDTO.setSelected(false); |
|
|
if (communitySelected) { |
|
|
if (communitySelected) { |
|
|
circulationDeptResultDTO.setSelected(true); |
|
|
circulationDeptResultDTO.setSelected(true); |
|
@ -346,7 +343,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
ItemCirculationDeptResultDTO circulationDeptResultDTO1 = new ItemCirculationDeptResultDTO(); |
|
|
ItemCirculationDeptResultDTO circulationDeptResultDTO1 = new ItemCirculationDeptResultDTO(); |
|
|
circulationDeptResultDTO1.setDeptId(completeDeptDTO.getStreetId()); |
|
|
circulationDeptResultDTO1.setDeptId(completeDeptDTO.getStreetId()); |
|
|
circulationDeptResultDTO1.setDeptName(completeDeptDTO.getStreet()); |
|
|
circulationDeptResultDTO1.setDeptName(completeDeptDTO.getStreet()); |
|
|
circulationDeptResultDTO1.setTypeKey(OrganizationTypeConstant.ORG_TYPE_STREET_PARTY); |
|
|
circulationDeptResultDTO1.setTypeKey(TypeKeyConstant.DEPT_STREET_PARTY); |
|
|
circulationDeptResultDTO1.setSelected(false); |
|
|
circulationDeptResultDTO1.setSelected(false); |
|
|
if (streetSelected) { |
|
|
if (streetSelected) { |
|
|
circulationDeptResultDTO1.setSelected(true); |
|
|
circulationDeptResultDTO1.setSelected(true); |
|
@ -394,7 +391,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
List<ItemCirculationDeptResultDTO> deptResultDTOS = new ArrayList<>(); |
|
|
List<ItemCirculationDeptResultDTO> deptResultDTOS = new ArrayList<>(); |
|
|
// 网格-可做操作和可流转部门
|
|
|
// 网格-可做操作和可流转部门
|
|
|
if (OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(user.getTypeKey())) { |
|
|
if (TypeKeyConstant.DEPT_GRID_PARTY.equals(user.getTypeKey())) { |
|
|
// 可流转部门
|
|
|
// 可流转部门
|
|
|
Result<CompleteDeptDTO> completeDept = adminFeignClient.getCompleteDept(SecurityUser.getDeptId()); |
|
|
Result<CompleteDeptDTO> completeDept = adminFeignClient.getCompleteDept(SecurityUser.getDeptId()); |
|
|
if (!completeDept.success()) { |
|
|
if (!completeDept.success()) { |
|
@ -406,16 +403,16 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
ItemCirculationDeptResultDTO circulationDeptCommunityResultDTO = new ItemCirculationDeptResultDTO(); |
|
|
ItemCirculationDeptResultDTO circulationDeptCommunityResultDTO = new ItemCirculationDeptResultDTO(); |
|
|
circulationDeptCommunityResultDTO.setDeptId(completeDeptDTO.getCommunityId()); |
|
|
circulationDeptCommunityResultDTO.setDeptId(completeDeptDTO.getCommunityId()); |
|
|
circulationDeptCommunityResultDTO.setDeptName(completeDeptDTO.getCommunity()); |
|
|
circulationDeptCommunityResultDTO.setDeptName(completeDeptDTO.getCommunity()); |
|
|
circulationDeptCommunityResultDTO.setTypeKey(OrganizationTypeConstant.ORG_TYPE_COMMUNITY_PARTY); |
|
|
circulationDeptCommunityResultDTO.setTypeKey(TypeKeyConstant.DEPT_COMMUNITY_PARTY); |
|
|
deptResultDTOS.add(circulationDeptCommunityResultDTO); |
|
|
deptResultDTOS.add(circulationDeptCommunityResultDTO); |
|
|
// 直属街道
|
|
|
// 直属街道
|
|
|
ItemCirculationDeptResultDTO circulationDeptStreetResultDTO = new ItemCirculationDeptResultDTO(); |
|
|
ItemCirculationDeptResultDTO circulationDeptStreetResultDTO = new ItemCirculationDeptResultDTO(); |
|
|
circulationDeptStreetResultDTO.setDeptId(completeDeptDTO.getStreetId()); |
|
|
circulationDeptStreetResultDTO.setDeptId(completeDeptDTO.getStreetId()); |
|
|
circulationDeptStreetResultDTO.setDeptName(completeDeptDTO.getStreet()); |
|
|
circulationDeptStreetResultDTO.setDeptName(completeDeptDTO.getStreet()); |
|
|
circulationDeptStreetResultDTO.setTypeKey(OrganizationTypeConstant.ORG_TYPE_STREET_PARTY); |
|
|
circulationDeptStreetResultDTO.setTypeKey(TypeKeyConstant.DEPT_STREET_PARTY); |
|
|
deptResultDTOS.add(circulationDeptStreetResultDTO); |
|
|
deptResultDTOS.add(circulationDeptStreetResultDTO); |
|
|
|
|
|
|
|
|
} else if (OrganizationTypeConstant.ORG_TYPE_STREET_PARTY.equals(user.getTypeKey())) { |
|
|
} else if (TypeKeyConstant.DEPT_STREET_PARTY.equals(user.getTypeKey())) { |
|
|
// 可流转部门
|
|
|
// 可流转部门
|
|
|
Result<List<SysDeptDTO>> listResult = adminFeignClient.listOfItemCirculationDept(SecurityUser.getDeptId()); |
|
|
Result<List<SysDeptDTO>> listResult = adminFeignClient.listOfItemCirculationDept(SecurityUser.getDeptId()); |
|
|
if (!listResult.success()) { |
|
|
if (!listResult.success()) { |
|
@ -605,13 +602,13 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
// 回应处理
|
|
|
// 回应处理
|
|
|
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 (TypeKeyConstant.DEPT_COMMUNITY_PARTY.equals(user.getTypeKey()) || TypeKeyConstant.DEPT_STREET_PARTY.equals(user.getTypeKey())) { |
|
|
//插入项目消息表(仅网格)
|
|
|
//插入项目消息表(仅网格)
|
|
|
// 通知部门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 (TypeKeyConstant.DEPT_STREET_DEPT.equals(user.getTypeKey()) || TypeKeyConstant.DEPT_DISTRICT_DEPT.equals(user.getTypeKey())) { |
|
|
//插入项目消息表(网格和街道)
|
|
|
//插入项目消息表(网格和街道)
|
|
|
// 通知部门Id(网格)
|
|
|
// 通知部门Id(网格)
|
|
|
itemInfoDto.setDeptId(entity.getGridId().toString()); |
|
|
itemInfoDto.setDeptId(entity.getGridId().toString()); |
|
@ -710,7 +707,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
|
|
|
|
|
// 如果当前流转协助是网格发起,判断其街道党工委是否已将该项目流转协助
|
|
|
// 如果当前流转协助是网格发起,判断其街道党工委是否已将该项目流转协助
|
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
if (OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(user.getTypeKey())) { |
|
|
if (TypeKeyConstant.DEPT_GRID_PARTY.equals(user.getTypeKey())) { |
|
|
Result<CompleteDeptDTO> completeDept = adminFeignClient.getCompleteDept(SecurityUser.getDeptId()); |
|
|
Result<CompleteDeptDTO> completeDept = adminFeignClient.getCompleteDept(SecurityUser.getDeptId()); |
|
|
if (!completeDept.success()) { |
|
|
if (!completeDept.success()) { |
|
|
return new Result().error("获取机构信息失败,请稍后重试"); |
|
|
return new Result().error("获取机构信息失败,请稍后重试"); |
|
|