From 8f3f7abf9422c2a2f54bbd9f863e0694a3c65098 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Fri, 27 Oct 2023 15:20:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E6=BD=AD=E6=99=AE=E8=80=97=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=B1=87=E6=80=BB=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/service/basic/BasicProductCategoryServiceImpl.java | 4 ++-- .../api/service/basic/impl/BasicBusTypeChangeServiceImpl.java | 2 +- .../api/service/basic/impl/BasicBusTypePreServiceImpl.java | 2 +- .../api/service/basic/impl/BasicBussinessTypeServiceImpl.java | 2 +- .../api/service/inout/impl/IoOrderDetailBizServiceImpl.java | 2 +- .../api/service/inout/impl/IoOrderDetailCodeServiceImpl.java | 2 +- .../service/inout/impl/IoOrderDetailResultServiceImpl.java | 2 +- .../com/glxp/api/service/inout/impl/IoOrderServiceImpl.java | 2 +- .../glxp/api/service/inout/impl/IoStatMonthServiceImpl.java | 1 + .../glxp/api/service/inout/impl/IoStatQuarterServiceImpl.java | 1 + .../glxp/api/service/inout/impl/IoStatYearServiceImpl.java | 1 + .../glxp/api/service/inv/impl/InvPreinProductServiceImpl.java | 4 ++-- .../java/com/glxp/api/service/inv/impl/InvProductService.java | 2 +- 13 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/glxp/api/service/basic/BasicProductCategoryServiceImpl.java b/src/main/java/com/glxp/api/service/basic/BasicProductCategoryServiceImpl.java index 14723918..eb5956c5 100644 --- a/src/main/java/com/glxp/api/service/basic/BasicProductCategoryServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/BasicProductCategoryServiceImpl.java @@ -46,7 +46,7 @@ public class BasicProductCategoryServiceImpl implements BasicProductCategoryServ @Override public BasicProductCategory selectBasicHospTypeEntity() { QueryWrapper Wrapper = new QueryWrapper<>(); - Wrapper.eq("code",10000); + Wrapper.eq("code",10000).last("limit 1"); return basicProductCategoryMapper.selectOne(Wrapper); } @@ -179,7 +179,7 @@ public class BasicProductCategoryServiceImpl implements BasicProductCategoryServ @Override public BasicProductCategory checkCode(String parentCode) { - return basicProductCategoryMapper.selectOne(new QueryWrapper().eq("code",parentCode)); + return basicProductCategoryMapper.selectOne(new QueryWrapper().eq("code",parentCode).last("limit 1")); } @Override diff --git a/src/main/java/com/glxp/api/service/basic/impl/BasicBusTypeChangeServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/BasicBusTypeChangeServiceImpl.java index 716fe8b1..d3e11869 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/BasicBusTypeChangeServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/BasicBusTypeChangeServiceImpl.java @@ -31,7 +31,7 @@ public class BasicBusTypeChangeServiceImpl extends ServiceImpl().eq("originAction", action)); + return basicBusTypeChangeDao.selectOne(new QueryWrapper().eq("originAction", action).last("limit 1")); } @Override diff --git a/src/main/java/com/glxp/api/service/basic/impl/BasicBusTypePreServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/BasicBusTypePreServiceImpl.java index a3843d8f..1cb7f7ea 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/BasicBusTypePreServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/BasicBusTypePreServiceImpl.java @@ -78,7 +78,7 @@ public class BasicBusTypePreServiceImpl extends ServiceImpl().eq("originAction", originAction)); + return basicBusTypePreDao.selectOne(new QueryWrapper().eq("originAction", originAction).last("limit 1")); } @Override diff --git a/src/main/java/com/glxp/api/service/basic/impl/BasicBussinessTypeServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/BasicBussinessTypeServiceImpl.java index 2e8f2fa6..7eea169f 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/BasicBussinessTypeServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/BasicBussinessTypeServiceImpl.java @@ -130,7 +130,7 @@ public class BasicBussinessTypeServiceImpl extends ServiceImpl().eq("action", action)); + return basicBussinessTypeDao.selectOne(new QueryWrapper().eq("action", action).last("limit 1")); } return null; } diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java index 379f20e6..016f1c2b 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java @@ -158,7 +158,7 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService { if (StrUtil.isNotEmpty(bindRlFk)) { ew.eq("bindRlFk", bindRlFk); } - IoOrderDetailBizEntity ioOrderDetailBizEntity = ioOrderDetailBizDao.selectOne(ew); + IoOrderDetailBizEntity ioOrderDetailBizEntity = ioOrderDetailBizDao.selectOne(ew.last("limit 1")); return ioOrderDetailBizEntity; } diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailCodeServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailCodeServiceImpl.java index 06938c78..1750b39f 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailCodeServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailCodeServiceImpl.java @@ -50,7 +50,7 @@ public class IoOrderDetailCodeServiceImpl implements IoOrderDetailCodeService { .eq("orderIdFk", orderId).eq("bindRlFk", relId) .eq(StrUtil.isNotEmpty(bacthNo), "batchNo", bacthNo) .isNull(StrUtil.isEmpty(bacthNo), "batchNo") - .eq(price != null, "price", price) + .eq(price != null, "price", price).last("limit 1") ); } diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailResultServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailResultServiceImpl.java index 23ba1b5e..1773f7d7 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailResultServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailResultServiceImpl.java @@ -33,7 +33,7 @@ public class IoOrderDetailResultServiceImpl implements IoOrderDetailResultServic @Override public IoOrderDetailResultEntity findByUnique(String orderId, Long relId, String bacthNo) { return orderDetailResultDao.selectOne(new QueryWrapper().eq("orderIdFk", orderId).eq("bindRlFk", relId).eq(StrUtil.isNotEmpty(bacthNo), "batchNo", bacthNo) - .isNull(StrUtil.isEmpty(bacthNo), "batchNo")); + .isNull(StrUtil.isEmpty(bacthNo), "batchNo").last("limit 1")); } @Override diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java index 435b9ce8..d2de0ac2 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java @@ -151,7 +151,7 @@ public class IoOrderServiceImpl implements IoOrderService { @Override public IoOrderEntity findByBillNo(String billNO) { - return orderDao.selectOne(new QueryWrapper().eq("billNo", billNO)); + return orderDao.selectOne(new QueryWrapper().eq("billNo", billNO).last("limit 1")); } @Override diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoStatMonthServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoStatMonthServiceImpl.java index 3edab997..b6f1ad7a 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoStatMonthServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoStatMonthServiceImpl.java @@ -197,6 +197,7 @@ public class IoStatMonthServiceImpl implements IoStatMonthService { IoStatMonthEntity statData = new IoStatMonthEntity(); statData.setYear(lastMonth.year()); + statData.setInvCode(orderDetailResultEntity.getInvCode()); statData.setDeptCode(orderDetailResultEntity.getDeptCode()); statData.setQuarter(lastMonth.quarter()); statData.setMonth(lastMonth.monthBaseOne()); diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoStatQuarterServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoStatQuarterServiceImpl.java index 21b7b6d6..9865183c 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoStatQuarterServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoStatQuarterServiceImpl.java @@ -196,6 +196,7 @@ public class IoStatQuarterServiceImpl implements IoStatQuarterService { //未存在于集合中,构造新数据 IoStatQuarterEntity statData = new IoStatQuarterEntity(); + statData.setInvCode(orderDetailResultEntity.getInvCode()); statData.setDeptCode(orderDetailResultEntity.getDeptCode()); statData.setYear(yesterday.year()); statData.setQuarter(yesterday.quarter()); diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoStatYearServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoStatYearServiceImpl.java index 9de2b936..fe8d0a04 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoStatYearServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoStatYearServiceImpl.java @@ -190,6 +190,7 @@ public class IoStatYearServiceImpl implements IoStatYearService { //未在于集合中,构造新数据 IoStatYearEntity statData = new IoStatYearEntity(); statData.setYear(yesterday.year()); + statData.setInvCode(orderDetailResultEntity.getInvCode()); statData.setDeptCode(orderDetailResultEntity.getDeptCode()); statData.setRelIdFk(String.valueOf(orderDetailResultEntity.getBindRlFk())); statData.setNameCode(orderDetailResultEntity.getNameCode()); diff --git a/src/main/java/com/glxp/api/service/inv/impl/InvPreinProductServiceImpl.java b/src/main/java/com/glxp/api/service/inv/impl/InvPreinProductServiceImpl.java index 2e6011bb..f1bb93b4 100644 --- a/src/main/java/com/glxp/api/service/inv/impl/InvPreinProductServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inv/impl/InvPreinProductServiceImpl.java @@ -39,14 +39,14 @@ public class InvPreinProductServiceImpl implements InvPreinProductService { public InvPreinProductEntity selectByUnique(Long relId, String batchNo, String supId, String deptCode, String invCode, BigDecimal price) { return invPreinProductDao.selectOne(new QueryWrapper().eq("relIdFk", relId).eq(StrUtil.isNotEmpty(batchNo), "batchNo", batchNo) .isNull(StrUtil.isEmpty(batchNo), "batchNo").eq("supId", supId).eq("deptCode", deptCode).eq("invCode", invCode) - .eq(price != null, "price", price).isNull(price == null, "price")); + .eq(price != null, "price", price).isNull(price == null, "price").last("limit 1")); } @Override public InvPreinProductEntity selectByUnique(Long relId, String batchNo, String supId) { return invPreinProductDao.selectOne(new QueryWrapper().eq("relIdFk", relId).eq(StrUtil.isNotEmpty(batchNo), "batchNo", batchNo) - .isNull(StrUtil.isEmpty(batchNo), "batchNo").eq("supId", supId)); + .isNull(StrUtil.isEmpty(batchNo), "batchNo").eq("supId", supId).last("limit 1")); } diff --git a/src/main/java/com/glxp/api/service/inv/impl/InvProductService.java b/src/main/java/com/glxp/api/service/inv/impl/InvProductService.java index 729209cb..7f228d4d 100644 --- a/src/main/java/com/glxp/api/service/inv/impl/InvProductService.java +++ b/src/main/java/com/glxp/api/service/inv/impl/InvProductService.java @@ -50,7 +50,7 @@ public class InvProductService extends ServiceImpl