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} + +