From 057a57300d8567bf403e90909c4246c1cc6a566c Mon Sep 17 00:00:00 2001 From: chenhc <2369838784@qq.com> Date: Mon, 16 Dec 2024 11:51:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=98=BF=E9=87=8C=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E9=80=81=E8=B4=A7=E5=8D=95=E7=9A=84=E4=B8=9A=E5=8A=A1=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/alihealth/AlihealthBusController.java | 12 +++++++++++- .../controller/inout/IoOrderDetailBizController.java | 2 ++ src/main/java/com/glxp/api/dao/inout/IoOrderDao.java | 1 + .../glxp/api/entity/alihealth/AliYljgSearchbill.java | 1 + .../com/glxp/api/entity/inout/IoOrderEntity.java | 5 +++++ .../com/glxp/api/req/inout/AddBizProductReqeust.java | 1 + .../com/glxp/api/service/inout/IoOrderService.java | 2 ++ .../api/service/inout/impl/IoOrderServiceImpl.java | 5 +++++ .../resources/mybatis/mapper/inout/IoOrderDao.xml | 7 +++++++ src/main/resources/schemas/schema_v2.4.sql | 5 +++++ 10 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/glxp/api/controller/alihealth/AlihealthBusController.java b/src/main/java/com/glxp/api/controller/alihealth/AlihealthBusController.java index 158576f1..d0ddf5b8 100644 --- a/src/main/java/com/glxp/api/controller/alihealth/AlihealthBusController.java +++ b/src/main/java/com/glxp/api/controller/alihealth/AlihealthBusController.java @@ -23,6 +23,7 @@ import com.glxp.api.req.alihealth.local.AlihealthThirdAliDrugInsertReqeust; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.alihealth.AlihealthKytGetentinfoResponse; import com.glxp.api.service.alihealth.AlihealthBusService; +import com.glxp.api.service.inout.IoOrderService; import com.glxp.api.util.alihealth.AlihealthUtils; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -150,6 +151,8 @@ public class AlihealthBusController extends BaseController { @Resource AlihealthBusService alihealthBusService; + @Resource + IoOrderService orderService; /** * 阿里的采购单查询接口 @@ -179,7 +182,14 @@ public class AlihealthBusController extends BaseController { List group = entry.getValue(); if (!group.isEmpty()) { // 添加每个分组中的第一个对象到新列表 - listResp.add(group.get(0)); + String key = entry.getKey(); + //如果查得到就不可以再次选入 + String billNo = orderService.selectAliYljgSearchbillByAliBillNo(key); + AliYljgSearchbill aliYljgSearchbill = group.get(0); + if (StringUtils.isNotEmpty(billNo)){ + aliYljgSearchbill.setCheckBillNO(true); + } + listResp.add(aliYljgSearchbill); } } diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java index 3796a08c..b05dd0a4 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java @@ -730,6 +730,8 @@ public class IoOrderDetailBizController extends BaseController { IoOrderEntity ioOrderEntity = addBizProductReqeust.getOrderEntity(); + addBizProductReqeust.setAliOrderBillNo(billCode); + ioOrderEntity.setAliOrderBillNo(billCode); for (int i = 0; i < aliYljgBillDetailDrugList.size(); i++) { AliYljgBillDetailDrug aliYljgBillDetailDrug = aliYljgBillDetailDrugList.get(i); diff --git a/src/main/java/com/glxp/api/dao/inout/IoOrderDao.java b/src/main/java/com/glxp/api/dao/inout/IoOrderDao.java index f4f1f963..105dcbbe 100644 --- a/src/main/java/com/glxp/api/dao/inout/IoOrderDao.java +++ b/src/main/java/com/glxp/api/dao/inout/IoOrderDao.java @@ -65,4 +65,5 @@ public interface IoOrderDao extends BaseMapperPlus datas; //多选添加 AliYljgSearchbill aliData; //多选添加 diff --git a/src/main/java/com/glxp/api/service/inout/IoOrderService.java b/src/main/java/com/glxp/api/service/inout/IoOrderService.java index 691f6b0d..de183755 100644 --- a/src/main/java/com/glxp/api/service/inout/IoOrderService.java +++ b/src/main/java/com/glxp/api/service/inout/IoOrderService.java @@ -138,4 +138,6 @@ public interface IoOrderService { * @param oldIoOrderEntity */ boolean copyOrder(AuthAdmin authAdmin,String newBillNo, IoOrderEntity newIoOrderEntity, IoOrderEntity oldIoOrderEntity); + + String selectAliYljgSearchbillByAliBillNo(String key); } 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 7981918f..31d4d2bd 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 @@ -909,6 +909,11 @@ public class IoOrderServiceImpl implements IoOrderService { return false; } + @Override + public String selectAliYljgSearchbillByAliBillNo(String key) { + return orderDao.selectAliYljgSearchbillByAliBillNo(key); + } + /** * 查询此单据关联的所有单据 * diff --git a/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml b/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml index afede1a9..584267a8 100644 --- a/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml +++ b/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml @@ -435,6 +435,13 @@ where billNo = #{billNo} + +