diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java index f90f0a0545..38120535b9 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java +++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java @@ -1,10 +1,10 @@ package com.epmet.service.impl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.ModuleConstant; -import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.StaffSinAgencyResultDTO; import com.epmet.dto.result.StaffSinDeptResultDTO; @@ -12,7 +12,6 @@ import com.epmet.dto.result.StaffSinGridResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.OpenUpService; -import org.bouncycastle.math.raw.Mod; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -48,6 +47,9 @@ public class OpenUpServiceImpl implements OpenUpService { if (!gridStaffs.success()){ throw new RenException(ModuleConstant.ERROR_GOV_ORG_GRID); } + if (gridStaffs.getData().size() == NumConstant.ZERO){ + return new ArrayList<>(); + } return this.getStaffList(gridStaffs.getData()); } @@ -65,6 +67,9 @@ public class OpenUpServiceImpl implements OpenUpService { if (!departmentStaffs.success()){ throw new RenException(ModuleConstant.ERROR_GOV_ORG_DEPARTMENT); } + if (departmentStaffs.getData().size() == NumConstant.ZERO){ + return new ArrayList<>(); + } List data = this.getStaffList(departmentStaffs.getData()); List result = new ArrayList<>(); data.forEach(staff -> { @@ -89,6 +94,9 @@ public class OpenUpServiceImpl implements OpenUpService { if (!agencyStaffs.success()){ throw new RenException(ModuleConstant.ERROR_GOV_ORG_AGENCY); } + if (agencyStaffs.getData().size() == NumConstant.ZERO){ + return new ArrayList<>(); + } List staffList = this.getStaffList(agencyStaffs.getData()); List result = new ArrayList<>(); staffList.forEach(staff -> { diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java index dbd11097bd..2ada6a69a3 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java @@ -191,7 +191,7 @@ public interface GovOrgOpenFeignClient { * @author zxc * @date 2020/8/13 10:46 上午 */ - @PostMapping(value = "/gov/org/customerstaffgrid/getgridstaffs",consumes = MediaType.APPLICATION_JSON_VALUE) + @PostMapping(value = "/gov/org/customerstaffgrid/getgridstaffs") Result> getGridStaffs(@RequestBody CommonGridIdFormDTO gridIdFormDTO); /** @@ -200,7 +200,7 @@ public interface GovOrgOpenFeignClient { * @author zxc * @date 2020/8/13 2:46 下午 */ - @PostMapping(value = "/gov/org/customerstaffdepartment/getdepartmentstaffs",consumes = MediaType.APPLICATION_JSON_VALUE) + @PostMapping(value = "/gov/org/customerstaffdepartment/getdepartmentstaffs") Result> getDepartmentStaffs(@RequestBody DepartmentIdFormDTO formDTO); /** @@ -209,7 +209,7 @@ public interface GovOrgOpenFeignClient { * @author zxc * @date 2020/8/14 9:31 上午 */ - @PostMapping(value = "/gov/org/customergrid/gridcount",consumes = MediaType.APPLICATION_JSON_VALUE) + @PostMapping(value = "/gov/org/customergrid/gridcount") Result selectGridCount(@RequestBody CustomerIdFormDTO customerIdFormDTO); /** @@ -218,6 +218,6 @@ public interface GovOrgOpenFeignClient { * @author zxc * @date 2020/8/17 */ - @PostMapping(value = "/gov/org/customerstaffagency/getagencystaffs",consumes = MediaType.APPLICATION_JSON_VALUE) + @PostMapping(value = "/gov/org/customerstaffagency/getagencystaffs") Result> getAgencyStaffs(@RequestBody AgencyIdFormDTO formDTO); }