From 96d4d7cee3b5412441213daf8223376a87f83b8e Mon Sep 17 00:00:00 2001 From: songguoqiang <765017469@qq.com> Date: Thu, 23 May 2024 14:40:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A9=E5=90=88=E5=A4=87=E4=BB=B6=E5=8F=B0?= =?UTF-8?q?=E8=B4=A6=E9=9C=80=E6=B1=82=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/itemaccounts/vo/ItemAccountsPageReqVO.java | 8 ++++++++ .../eam/dal/mysql/itemaccounts/ItemAccountsMapper.java | 8 +++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/controller/itemaccounts/vo/ItemAccountsPageReqVO.java b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/controller/itemaccounts/vo/ItemAccountsPageReqVO.java index 6da2028..814e657 100644 --- a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/controller/itemaccounts/vo/ItemAccountsPageReqVO.java +++ b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/controller/itemaccounts/vo/ItemAccountsPageReqVO.java @@ -33,4 +33,12 @@ public class ItemAccountsPageReqVO extends PageParam { @Schema(description = "项目号") private String project; + @Schema(description = "备件名称") + private String itemName; + + @Schema(description = "规格型号") + private String specifications; + + + } diff --git a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemaccounts/ItemAccountsMapper.java b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemaccounts/ItemAccountsMapper.java index 2347901..8e748f4 100644 --- a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemaccounts/ItemAccountsMapper.java +++ b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemaccounts/ItemAccountsMapper.java @@ -252,9 +252,15 @@ public interface ItemAccountsMapper extends BaseMapperX { .eqIfPresent(ItemAccountsDO::getType, reqVO.getType()) .eqIfPresent(ItemAccountsDO::getAvailable, reqVO.getAvailable()) .orderByDesc(ItemAccountsDO::getId); - if(reqVO.getProject()!=null&& !reqVO.getProject().isEmpty()){ + if(reqVO.getProject()!=null&& !reqVO.getProject().isEmpty()){//项目号模糊查询 itemAccountsDOLambdaQueryWrapper.inSql(ItemAccountsDO::getItemNumber, "select number from basic_item where available = 'TRUE' and deleted = 0 and project like CONCAT('%','" + reqVO.getProject() + "','%') "); } + if(reqVO.getItemName()!=null&& !reqVO.getItemName().isEmpty()){//备件名称 + itemAccountsDOLambdaQueryWrapper.inSql(ItemAccountsDO::getItemNumber, "select number from basic_item where available = 'TRUE' and deleted = 0 and name like CONCAT('%','" + reqVO.getItemName() + "','%') "); + } + if(reqVO.getSpecifications()!=null&& !reqVO.getSpecifications().isEmpty()){//备件名称 + itemAccountsDOLambdaQueryWrapper.inSql(ItemAccountsDO::getItemNumber, "select number from basic_item where available = 'TRUE' and deleted = 0 and specifications like CONCAT('%','" + reqVO.getSpecifications() + "','%') "); + } return selectPage(reqVO, itemAccountsDOLambdaQueryWrapper); }