From 31d5fcc31f71dd888540e37da8d3a811375193cb Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 18 Aug 2020 09:10:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=BA=E5=85=B3=E5=B7=A5=E4=BD=9C=E4=BA=BA?= =?UTF-8?q?=E5=91=98=EF=BC=8C=E9=83=A8=E9=97=A8=E5=B7=A5=E4=BD=9C=E4=BA=BA?= =?UTF-8?q?=E5=91=98=EF=BC=8C=E7=BD=91=E6=A0=BC=E5=B7=A5=E4=BD=9C=E4=BA=BA?= =?UTF-8?q?=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/OpenUpServiceImpl.java | 12 ++++++++++-- .../java/com/epmet/feign/GovOrgOpenFeignClient.java | 8 ++++---- 2 files changed, 14 insertions(+), 6 deletions(-) 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); }