From cab8098c30903c6c552241a36891bc2f19378da2 Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Thu, 10 Aug 2023 21:35:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A2=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basicdata/controller/BasicdataClientController.java | 8 ++++++-- .../controller/DistributionStockArticleController.java | 7 +++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataClientController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataClientController.java index c4532cae5..3e812ac34 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataClientController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataClientController.java @@ -87,10 +87,14 @@ public class BasicdataClientController extends BladeController { basicdataClient.put("contractStartTime",null); basicdataClient.put("contractEntTime",null); QueryWrapper queryWrapper = Condition.getQueryWrapper(basicdataClient, BasicdataClientEntity.class); - queryWrapper.apply(o != null, +/* queryWrapper.apply(o != null, "date_format (contract_start_time,'%Y-%m-%d') >= date_format ({0},'%Y-%m-%d')", o) .apply(o1 != null, - "date_format (contract_ent_time,'%Y-%m-%d') <= date_format ({0},'%Y-%m-%d')", o1); + "date_format (contract_ent_time,'%Y-%m-%d') <= date_format ({0},'%Y-%m-%d')", o1);*/ + if(ObjectUtils.isNotNull(o)){ + queryWrapper.between("contract_start_time",o,o1); + + } if(ObjectUtils.isNotNull(o2)){ queryWrapper.eq("pid",o2); }else{ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java index 167330e05..c135f9ccc 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java @@ -86,8 +86,12 @@ public class DistributionStockArticleController extends BladeController { public R> list(@ApiIgnore @RequestParam Map distributionStockArticle, Query query) { Object o = distributionStockArticle.get("orderSelfNumbering"); distributionStockArticle.remove("orderSelfNumbering"); + Object o2 = distributionStockArticle.get("startDate"); + Object o1 = distributionStockArticle.get("entDate"); Object d = distributionStockArticle.get("id"); distributionStockArticle.remove("id"); + distributionStockArticle.remove("startDate"); + distributionStockArticle.remove("entDate"); QueryWrapper queryWrapper = Condition.getQueryWrapper(distributionStockArticle, DistributionStockArticleEntity.class); if(Func.isNotEmpty(o)){ queryWrapper.in("order_self_numbering",String.valueOf(o).split(",")); @@ -95,6 +99,9 @@ public class DistributionStockArticleController extends BladeController { if(ObjectUtil.isNotEmpty(d)){ queryWrapper.in("id",String.valueOf(d).split(",")); } + if(ObjectUtil.isNotEmpty(o2)){ + queryWrapper.between("warehouse_entry_time",o2,o1); + } IPage pages = distributionStockArticleService.page(Condition.getPage(query), queryWrapper); return R.data(DistributionStockArticleWrapper.build().pageVO(pages));