|
|
@ -18,6 +18,7 @@ |
|
|
|
package com.elink.esua.epdc.modules.item.service.impl; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.map.MapUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
@ -82,6 +83,7 @@ import com.elink.esua.epdc.modules.item.service.*; |
|
|
|
import com.elink.esua.epdc.modules.rocketmq.dto.CategoryModifyDTO; |
|
|
|
import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO; |
|
|
|
import com.elink.esua.epdc.modules.rolecategory.service.HandleRoleCategoryService; |
|
|
|
import org.apache.commons.collections4.MapUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.logging.log4j.LogManager; |
|
|
|
import org.apache.logging.log4j.Logger; |
|
|
@ -178,31 +180,25 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
throw new RuntimeException("获取用户信息失败"); |
|
|
|
} |
|
|
|
if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(user.getTypeKey())) { |
|
|
|
if (params.get("streetId") != null && !"".equals(params.get("streetId"))) { |
|
|
|
Result<SysDeptDTO> resultdept = adminFeignClient.getSysDeptInfo(Long.parseLong(params.get("streetId").toString())); |
|
|
|
String deptId = MapUtils.getString(params, "deptId"); |
|
|
|
if (StringUtils.isNotBlank(deptId)) { |
|
|
|
Result<SysDeptDTO> resultdept = adminFeignClient.getSysDeptInfo(Long.parseLong(deptId)); |
|
|
|
if (resultdept.success()) { |
|
|
|
SysDeptDTO dept = resultdept.getData(); |
|
|
|
Object deptId = params.get("streetId"); |
|
|
|
if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(dept.getTypeKey())) { |
|
|
|
params.put("districtDeptId", deptId); |
|
|
|
params.remove("streetId"); |
|
|
|
params.remove("deptId"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//部门ID列表
|
|
|
|
List<Long> deptIdList = new ArrayList<>(); |
|
|
|
// 判断是否为网格,不为网格只能查看本部门下的项目数据
|
|
|
|
if (OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(user.getTypeKey())) { |
|
|
|
deptIdList = user.getDeptIdList(); |
|
|
|
} else { |
|
|
|
deptIdList.add(user.getDeptId()); |
|
|
|
} |
|
|
|
params.put("deptIdList", null); |
|
|
|
if (null != deptIdList && deptIdList.size() > 0) { |
|
|
|
params.put("deptIdList", deptIdList); |
|
|
|
} |
|
|
|
// 判断是否为网格,不为网格只能查看本部门下的项目数据
|
|
|
|
params.put("deptIdList", OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(user.getTypeKey()) ? user.getDeptIdList() : Arrays.asList(user.getDeptId())); |
|
|
|
|
|
|
|
if (null != params.get("itemCode")) { |
|
|
|
params.put("itemCode", params.get("itemCode").toString().trim()); |
|
|
|
} |
|
|
|
|
|
|
|
IPage<ItemPendingHandleDTO> page = getPage(params); |
|
|
|
List<ItemPendingHandleDTO> list = baseDao.selectListOfPendingHandleItems(params); |
|
|
|
return new PageData<>(list, page.getTotal()); |
|
|
|