From 178b8373b3e12b7138f00059618f6651ed4f2ea5 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Mon, 10 Apr 2023 14:14:04 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E4=BC=98=E5=8C=96=E7=AB=99=E7=82=B9feign?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=9F=A5=E8=AF=A2list=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hnac/hzims/equipment/controller/EmInfoController.java | 2 +- .../com/hnac/hzims/operational/station/feign/StationClient.java | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java index 0f096dc..b13402e 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java @@ -94,7 +94,7 @@ public class EmInfoController extends BladeController { queryWrapper.lambda().eq(EmInfoEntity::getGpid, 0); IPage pages = em_infoService.page(Condition.getPage(query), queryWrapper); // 获取站点列表 - 填充站点编码、站点类型、站点名称 - R> stationListR = stationClient.getListAll(); + R> stationListR = stationClient.list(new StationEntity()); if(stationListR.isSuccess() && CollectionUtil.isNotEmpty(stationListR.getData())) { List stationList = stationListR.getData(); pages.getRecords().forEach(emInfoEntity -> { diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/feign/StationClient.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/feign/StationClient.java index bad6654..48644d6 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/feign/StationClient.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/feign/StationClient.java @@ -12,6 +12,7 @@ import lombok.AllArgsConstructor; import lombok.RequiredArgsConstructor; import org.springblade.core.mp.support.Condition; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.system.user.entity.User; import org.springframework.beans.factory.annotation.Value; @@ -102,8 +103,10 @@ public class StationClient implements IStationClient { @ApiOperation("根据条件查询相关站点列表") @ApiOperationSupport(order = 8) public R> list(StationEntity stationEntity) { - LambdaQueryWrapper wrapper = Condition.getQueryWrapper(stationEntity,StationEntity.class); - wrapper.eq(StationEntity::getRefDept,stationEntity.getRefDept()); + LambdaQueryWrapper wrapper = Condition.getQueryWrapper(stationEntity).lambda(); + if(Func.isNotEmpty(stationEntity.getStatus())) { + wrapper.eq(StationEntity::getStatus,stationEntity.getStatus()); + } return R.data(stationService.list(wrapper)); }