From 50a6e79798dd78a5365aef80fa979d347079bc2e Mon Sep 17 00:00:00 2001 From: yewj Date: Wed, 25 Dec 2024 17:29:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E5=85=A5=E9=98=B3=E9=87=87=EF=BC=8C?= =?UTF-8?q?=E9=80=89=E5=85=A5=E9=98=BF=E9=87=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 33 ++-- .../inout/IoOrderDetailBizController.java | 29 ++-- .../entity/alihealth/YcFileOrderUploadVo.java | 4 +- .../glxp/api/entity/inout/IoOrderEntity.java | 8 + .../api/req/inout/AddBizProductReqeust.java | 6 + .../alihealth/AlihealthBusService.java | 5 +- .../impl/AlihealthBusServiceImpl.java | 150 ++++++++---------- .../service/basic/UdiRelevanceService.java | 2 + .../basic/impl/UdiRelevanceServiceImpl.java | 8 + .../impl/IoOrderDetailBizServiceImpl.java | 2 +- src/main/resources/schemas/schema_v2.4.sql | 6 +- 11 files changed, 132 insertions(+), 121 deletions(-) diff --git a/pom.xml b/pom.xml index d9c13880..1aa2192b 100644 --- a/pom.xml +++ b/pom.xml @@ -140,13 +140,6 @@ 3.9.1 - - - org.projectlombok - lombok - true - - io.jsonwebtoken @@ -400,12 +393,12 @@ - - - org.javassist - javassist - 3.28.0-GA - + + + + + + @@ -431,13 +424,13 @@ - - org.springframework.boot - spring-boot-maven-plugin - - true - - + + + + + + + org.apache.maven.plugins maven-surefire-plugin 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 81542543..8faeae78 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java @@ -679,7 +679,7 @@ public class IoOrderDetailBizController extends BaseController { for (IoOrderInvoiceEntity orderInvoiceEntity : orderInvoiceEntities) { if (StrUtil.trimToEmpty(orderInvoiceEntity.getBatchNo()).equals(StrUtil.trimToEmpty(orderDetailCodeEntity.getBatchNo())) && StrUtil.trimToEmpty(orderInvoiceEntity.getBindRlFk()).equals(StrUtil.trimToEmpty(orderDetailCodeEntity.getBindRlFk() + ""))) { - if (StrUtil.isNotEmpty(orderInvoiceEntity.getPrice())){ + if (StrUtil.isNotEmpty(orderInvoiceEntity.getPrice())) { BigDecimal price = new BigDecimal(orderInvoiceEntity.getPrice()); invoiceAmount = invoiceAmount.add(price); } @@ -772,7 +772,7 @@ public class IoOrderDetailBizController extends BaseController { filterUdiRelRequest.setNameCode(nameCode); List udiRelevanceResponses = udiRelevanceDao.filterUdiRelevance(filterUdiRelRequest); if (CollUtil.isEmpty(udiRelevanceResponses)) { - return ResultVOUtils.error("未通过药品标识【"+aliYljgBillDetailDrug.getProdName()+nameCode+"】获取详情信息!"); + return ResultVOUtils.error("未通过药品标识【" + aliYljgBillDetailDrug.getProdName() + nameCode + "】获取详情信息!"); } UdiRelevanceResponse udiRelevanceResponse = udiRelevanceResponses.get(0); List aliYljgBillDetailDrugCodeList1 = aliYljgBillDetailDrug.getAliYljgBillDetailDrugCodeList(); @@ -795,15 +795,14 @@ public class IoOrderDetailBizController extends BaseController { addBizProductReqeust.setOrderEntity(ioOrderEntity); } addBizProductReqeust.setProductType(udiRelevanceResponse.getProductType()); - BaseResponse response = orderDetailBizService.addBizProduct(addBizProductReqeust); - if (response.getCode() != 20000) { - return response; - } - if (i == 0) { - ioOrderEntity = JSONObject.parseObject(JSONObject.toJSONString(response.getData()), IoOrderEntity.class); - addBizProductReqeust.setOrderEntity(ioOrderEntity); - } - +// BaseResponse response = orderDetailBizService.addBizProduct(addBizProductReqeust); +// if (response.getCode() != 20000) { +// return response; +// } +// if (i == 0) { +// ioOrderEntity = JSONObject.parseObject(JSONObject.toJSONString(response.getData()), IoOrderEntity.class); +// addBizProductReqeust.setOrderEntity(ioOrderEntity); +// } AddOrderRequest addOrderRequest = new AddOrderRequest(); BeanUtils.copyProperties(ioOrderEntity, addOrderRequest); @@ -835,7 +834,7 @@ public class IoOrderDetailBizController extends BaseController { codeLostEntity.setExpireDate(aliYljgBillDetailDrug.getValidEndDate().substring(2).replace(" 00:00:00", "").replace("-", "")); } Long id = codeLostEntity.getId(); - if (id == null) codeLostEntity.setId(IdUtil.getSnowflakeNextId()); + if (id == null) codeLostEntity.setId(IdUtil.getSnowflakeNextId()); } ioCodeLostService.insertOrUpdate(codeLostEntity); @@ -850,12 +849,11 @@ public class IoOrderDetailBizController extends BaseController { } - //录入阳光采购的追溯码 @PostMapping("/udiwms/inout/order/yc/fileUpload") @CusRedissonAnnotation(cacheName = RedissonCacheKey.XML_UPLOAD, key = {"#billNo"}, timeOutMsg = "系统正在处理,请勿重复上传") public BaseResponse ycFileUpload(@RequestParam("billNo") String billNo, @RequestParam("file") MultipartFile file) { - alihealthBusService.ycFileUpload(billNo,file); + alihealthBusService.ycFileUpload(billNo, file); return ResultVOUtils.successMsg("上传成功!"); } @@ -864,8 +862,7 @@ public class IoOrderDetailBizController extends BaseController { @PostMapping("/udiwms/inout/order/yc/orderFileUpload") @CusRedissonAnnotation(cacheName = RedissonCacheKey.XML_UPLOAD, key = {"#billNoJson"}, timeOutMsg = "系统正在处理,请勿重复上传") public BaseResponse ycOrderFileUpload(@RequestParam("billNoJson") String billNoJson, @RequestParam("file") MultipartFile file) { - IoOrderEntity ioOrderEntity = alihealthBusService.ycOrderFileUpload(billNoJson,file); - return ResultVOUtils.success(ioOrderEntity); + return alihealthBusService.ycOrderFileUpload(billNoJson, file); } } diff --git a/src/main/java/com/glxp/api/entity/alihealth/YcFileOrderUploadVo.java b/src/main/java/com/glxp/api/entity/alihealth/YcFileOrderUploadVo.java index 072159e1..a59d2652 100644 --- a/src/main/java/com/glxp/api/entity/alihealth/YcFileOrderUploadVo.java +++ b/src/main/java/com/glxp/api/entity/alihealth/YcFileOrderUploadVo.java @@ -4,6 +4,8 @@ import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.write.style.ColumnWidth; import lombok.Data; +import java.math.BigDecimal; + @Data public class YcFileOrderUploadVo { @@ -55,7 +57,7 @@ public class YcFileOrderUploadVo { @ExcelProperty("采购价格(元)") @ColumnWidth(20) - private String purchasePrice; + private BigDecimal purchasePrice; @ExcelProperty("挂网价(元)") @ColumnWidth(20) diff --git a/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java b/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java index af7e869b..6538f99b 100644 --- a/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java +++ b/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java @@ -283,4 +283,12 @@ public class IoOrderEntity { */ @TableField(value = "aliOrderBillNo") private String aliOrderBillNo; + + + /** + * 来源阳采单号 + */ + @TableField(value = "ycBillNo") + private String ycBillNo; + } diff --git a/src/main/java/com/glxp/api/req/inout/AddBizProductReqeust.java b/src/main/java/com/glxp/api/req/inout/AddBizProductReqeust.java index 840e9295..475a6b9c 100644 --- a/src/main/java/com/glxp/api/req/inout/AddBizProductReqeust.java +++ b/src/main/java/com/glxp/api/req/inout/AddBizProductReqeust.java @@ -6,6 +6,7 @@ import com.glxp.api.entity.alihealth.AliYljgSearchbill; import com.glxp.api.entity.inout.IoOrderEntity; import lombok.Data; +import java.math.BigDecimal; import java.util.List; @Data @@ -24,6 +25,11 @@ public class AddBizProductReqeust { private Integer count; private Integer productType; private String aliOrderBillNo; + private BigDecimal price; + + private String ycBillNo; + private String ycBizNo; + private String fromCorp; List datas; //多选添加 AliYljgSearchbill aliData; //多选添加 diff --git a/src/main/java/com/glxp/api/service/alihealth/AlihealthBusService.java b/src/main/java/com/glxp/api/service/alihealth/AlihealthBusService.java index 49d1a1a4..9ea0dbd1 100644 --- a/src/main/java/com/glxp/api/service/alihealth/AlihealthBusService.java +++ b/src/main/java/com/glxp/api/service/alihealth/AlihealthBusService.java @@ -1,5 +1,6 @@ package com.glxp.api.service.alihealth; +import com.glxp.api.common.res.BaseResponse; import com.glxp.api.entity.alihealth.AliYljgBillDetail; import com.glxp.api.entity.alihealth.AliYljgBillDetailDrug; import com.glxp.api.entity.alihealth.AliYljgBillDetailDrugCode; @@ -16,7 +17,7 @@ public interface AlihealthBusService { AliYljgBillDetail aliYljgBillDetail(AliYljgSearchbillReqeust aliYljgSearchbillReqeust); - void ycFileUpload(String billNo,MultipartFile file); + void ycFileUpload(String billNo, MultipartFile file); - IoOrderEntity ycOrderFileUpload(String billNoJson, MultipartFile file); + BaseResponse ycOrderFileUpload(String billNoJson, MultipartFile file); } diff --git a/src/main/java/com/glxp/api/service/alihealth/impl/AlihealthBusServiceImpl.java b/src/main/java/com/glxp/api/service/alihealth/impl/AlihealthBusServiceImpl.java index c5cb26c3..86bd35d2 100644 --- a/src/main/java/com/glxp/api/service/alihealth/impl/AlihealthBusServiceImpl.java +++ b/src/main/java/com/glxp/api/service/alihealth/impl/AlihealthBusServiceImpl.java @@ -25,9 +25,12 @@ import com.glxp.api.req.inout.AddOrderRequest; import com.glxp.api.req.inout.FilterOrderRequest; import com.glxp.api.res.basic.UdiRelevanceResponse; import com.glxp.api.service.alihealth.AlihealthBusService; +import com.glxp.api.service.basic.UdiRelevanceService; import com.glxp.api.service.inout.IoCodeLostService; +import com.glxp.api.service.inout.IoOrderDetailBizService; import com.glxp.api.service.inout.IoOrderService; import com.glxp.api.service.inout.impl.IoCodeTempService; +import com.glxp.api.util.IntUtil; import com.glxp.api.util.StringUtils; import com.glxp.api.util.alihealth.AlihealthYljgUtils; import com.glxp.api.util.udi.FilterUdiUtils; @@ -39,6 +42,7 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; import com.alibaba.excel.EasyExcel; import org.springframework.web.multipart.MultipartFile; + import javax.annotation.Resource; import java.io.IOException; import java.io.InputStream; @@ -65,23 +69,23 @@ public class AlihealthBusServiceImpl implements AlihealthBusService { AlihealthYljgListupoutReqeust alihealthYljgListupoutReqeust1 = new AlihealthYljgListupoutReqeust(); alihealthYljgListupoutReqeust1.setBegin_date(aliYljgSearchbillReqeust.getBeginDate()); alihealthYljgListupoutReqeust1.setEnd_date(aliYljgSearchbillReqeust.getEnsDate()); - if(StringUtils.isNotEmpty(aliYljgSearchbillReqeust.getBillCode())){ + if (StringUtils.isNotEmpty(aliYljgSearchbillReqeust.getBillCode())) { alihealthYljgListupoutReqeust1.setBill_code(aliYljgSearchbillReqeust.getBillCode()); } if (aliYljgSearchbillReqeust.getPage() != null) { alihealthYljgListupoutReqeust1.setPage(aliYljgSearchbillReqeust.getPage()); alihealthYljgListupoutReqeust1.setPage_size(aliYljgSearchbillReqeust.getLimit()); - }else { + } else { alihealthYljgListupoutReqeust1.setPage(1); alihealthYljgListupoutReqeust1.setPage_size(20); } BaseResponse> listBaseResponse = alihealthYljgUtils.listupout(alihealthYljgListupoutReqeust1, aliYljgSearchbillReqeust.getErpId()); - if (listBaseResponse.getCode() == 20000){ + if (listBaseResponse.getCode() == 20000) { List data = listBaseResponse.getData(); return data; - }else { + } else { throw new JsonException(listBaseResponse.getMessage()); } } @@ -93,10 +97,10 @@ public class AlihealthBusServiceImpl implements AlihealthBusService { alihealthYljgListupoutDetailReqeust.setFrom_ref_user_id(aliYljgSearchbillReqeust.getFromRefUserId()); BaseResponse aliYljgBillDetailBaseResponse = alihealthYljgUtils.listupoutDetail(alihealthYljgListupoutDetailReqeust); - if (aliYljgBillDetailBaseResponse.getCode() == 20000){ + if (aliYljgBillDetailBaseResponse.getCode() == 20000) { AliYljgBillDetail data = aliYljgBillDetailBaseResponse.getData(); return data; - }else { + } else { throw new JsonException(aliYljgBillDetailBaseResponse.getMessage()); } @@ -110,7 +114,7 @@ public class AlihealthBusServiceImpl implements AlihealthBusService { @Override @Transactional(rollbackFor = Exception.class) - public void ycFileUpload(String billNo,MultipartFile file) { + public void ycFileUpload(String billNo, MultipartFile file) { try { String fileName = file.getOriginalFilename(); String suffix = FileUtil.getSuffix(fileName); @@ -125,14 +129,14 @@ public class AlihealthBusServiceImpl implements AlihealthBusService { } List list = getList(file); - if (CollUtil.isEmpty(list)){ + if (CollUtil.isEmpty(list)) { throw new JsonException("文件数据为空"); } FilterOrderRequest request = new FilterOrderRequest(); request.setBillNo(billNo); List ioOrderEntities = ioOrderService.filterOrderList(request); - if (CollUtil.isEmpty(ioOrderEntities)){ + if (CollUtil.isEmpty(ioOrderEntities)) { throw new JsonException("单据编号未找到信息"); } IoOrderEntity ioOrderEntity = ioOrderEntities.get(0); @@ -146,8 +150,8 @@ public class AlihealthBusServiceImpl implements AlihealthBusService { addOrderRequest.setCode(code); UdiEntity udiEntity = FilterUdiUtils.getUdi(code); - if (udiEntity == null){ - throw new JsonException("追溯码解析错误:【"+code+"】"); + if (udiEntity == null) { + throw new JsonException("追溯码解析错误:【" + code + "】"); } IoCodeLostEntity codeLostEntity = ioCodeLostService.findByCode(ycFileCodeUploadVo.getCode()); @@ -174,7 +178,7 @@ public class AlihealthBusServiceImpl implements AlihealthBusService { codeLostEntity.setExpireDate(udiEntity.getExpireDate()); } Long id = codeLostEntity.getId(); - if (id == null) codeLostEntity.setId(IdUtil.getSnowflakeNextId()); + if (id == null) codeLostEntity.setId(IdUtil.getSnowflakeNextId()); } ioCodeLostService.insertOrUpdate(codeLostEntity); @@ -185,11 +189,43 @@ public class AlihealthBusServiceImpl implements AlihealthBusService { } } + @Resource + private UdiRelevanceService udiRelevanceService; + @Resource + private IoOrderDetailBizService orderDetailBizService; + @Override @Transactional(rollbackFor = Exception.class) - public IoOrderEntity ycOrderFileUpload(String billNoJson, MultipartFile file) { + public BaseResponse ycOrderFileUpload(String billNoJson, MultipartFile file) { + // 解析请求参数 + AddBizProductReqeust bizProductRequest = JSONObject.parseObject(billNoJson, AddBizProductReqeust.class); + + // 校验上传文件 + validateUploadFile(file); + + // 解析Excel文件数据 + List orderList = getOrderList(file); + if (CollUtil.isEmpty(orderList)) { + throw new JsonException("文件数据为空"); + } + + // 构建业务请求参数 + IoOrderEntity orderEntity = bizProductRequest.getOrderEntity(); + bizProductRequest.setProductType(2); + bizProductRequest.setOrderEntity(orderEntity); + + // 处理每条订单数据 + List productRequests = new ArrayList<>(); + for (YcFileOrderUploadVo orderUploadVo : orderList) { + AddBizProductReqeust productRequest = buildProductRequest(orderUploadVo, orderEntity, bizProductRequest.getFromCorp()); + productRequests.add(productRequest); + } - AddBizProductReqeust addBizProductReqeust = JSONObject.parseObject(billNoJson, AddBizProductReqeust.class); + bizProductRequest.setDatas(productRequests); + return orderDetailBizService.addBizProduct(bizProductRequest); + } + + private void validateUploadFile(MultipartFile file) { try { String fileName = file.getOriginalFilename(); String suffix = FileUtil.getSuffix(fileName); @@ -202,75 +238,29 @@ public class AlihealthBusServiceImpl implements AlihealthBusService { } catch (Exception e) { throw new JsonException("上传失败:" + e.getMessage()); } + } - List list = getOrderList(file); - if (CollUtil.isEmpty(list)){ - throw new JsonException("文件数据为空"); + private AddBizProductReqeust buildProductRequest(YcFileOrderUploadVo orderUploadVo, IoOrderEntity orderEntity, String fromCorp) { + orderEntity.setYcBillNo(orderUploadVo.getYcBillNo()); + + UdiRelevanceResponse udiRelevance = udiRelevanceService.selectByMainIdOne(orderUploadVo.getDrugUnifiedCode()); + if (udiRelevance == null) { + throw new JsonException(500, "未通过药品标识获取详情信息!"); } - IoOrderEntity ioOrderEntity = addBizProductReqeust.getOrderEntity(); - // TODO: 2024/12/25 阳采导入业务明细功能 1、参考阿里的业务导入(下方注释的代码)搜索 addAliBizProduct 参考 需要考虑 发票的问题 和 后续导出 阳采的单号 和 明细 需要先做存储 有单号追加 - return ioOrderEntity; -// -// IoOrderEntity ioOrderEntity = addBizProductReqeust.getOrderEntity(); -// addBizProductReqeust.setAliOrderBillNo(billCode); -// ioOrderEntity.setAliOrderBillNo(billCode); -// for (int i = 0; i < aliYljgBillDetailDrugList.size(); i++) { -// AliYljgBillDetailDrug aliYljgBillDetailDrug = aliYljgBillDetailDrugList.get(i); -// -// -// String code = aliYljgBillDetailDrug.getAliYljgBillDetailDrugCodeList().get(0).getCode(); -// if (StrUtil.isEmpty(code)) { -// return ResultVOUtils.error("单据码为空!"); -// } -// -// UdiEntity drugInfo = FilterUdiUtils.getDrugInfo(code); -// if (drugInfo == null) { -// return ResultVOUtils.error("单据码解析药品信息错误!"); -// } -// -// //获取药品信息 -// String nameCode = drugInfo.getUdi(); -// if (StrUtil.isEmpty(nameCode)) { -// return ResultVOUtils.error("单据码解析药品标识错误!"); -// } -// FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest(); -// filterUdiRelRequest.setNameCode(nameCode); -// List udiRelevanceResponses = udiRelevanceDao.filterUdiRelevance(filterUdiRelRequest); -// if (CollUtil.isEmpty(udiRelevanceResponses)) { -// return ResultVOUtils.error("未通过药品标识获取详情信息!"); -// } -// UdiRelevanceResponse udiRelevanceResponse = udiRelevanceResponses.get(0); -// List aliYljgBillDetailDrugCodeList1 = aliYljgBillDetailDrug.getAliYljgBillDetailDrugCodeList(); -// //1、直接模拟增加biz一行 -// addBizProductReqeust.setProductId(String.valueOf(udiRelevanceResponse.getProductId())); -// addBizProductReqeust.setRelId(udiRelevanceResponse.getRelId()); -// addBizProductReqeust.setZczbhhzbapzbh(udiRelevanceResponse.getZczbhhzbapzbh()); -// addBizProductReqeust.setSupId(udiRelevanceResponse.getSupId()); -// addBizProductReqeust.setDatas(null); -// addBizProductReqeust.setCount(aliYljgBillDetailDrugCodeList1.size() * udiCalCountUtil.getCirActCount(udiRelevanceResponse)); -// -// addBizProductReqeust.setBatchNo(aliYljgBillDetailDrug.getProduceBatchNo()); -// if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getProduceDate())) { -// addBizProductReqeust.setProductDate(aliYljgBillDetailDrug.getProduceDate().substring(2).replace(" 00:00:00", "").replace("-", "")); -// } -// if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getValidEndDate())) { -// addBizProductReqeust.setExpireDate(aliYljgBillDetailDrug.getValidEndDate().substring(2).replace(" 00:00:00", "").replace("-", "")); -// } -// if (i == 0) { -// addBizProductReqeust.setOrderEntity(ioOrderEntity); -// } -// addBizProductReqeust.setProductType(udiRelevanceResponse.getProductType()); -// BaseResponse response = orderDetailBizService.addBizProduct(addBizProductReqeust); -// if (response.getCode() != 20000) { -// return response; -// } -// if (i == 0) { -// ioOrderEntity = JSONObject.parseObject(JSONObject.toJSONString(response.getData()), IoOrderEntity.class); -// addBizProductReqeust.setOrderEntity(ioOrderEntity); -// } - - + AddBizProductReqeust productRequest = new AddBizProductReqeust(); + productRequest.setProductId(String.valueOf(udiRelevance.getProductId())); + productRequest.setRelId(udiRelevance.getRelId()); + productRequest.setZczbhhzbapzbh(udiRelevance.getZczbhhzbapzbh()); + productRequest.setDatas(null); + productRequest.setCount(IntUtil.value(orderUploadVo.getShipmentQuantity())); + productRequest.setBatchNo(orderUploadVo.getBatchNumber()); + productRequest.setProductType(udiRelevance.getProductType()); + productRequest.setYcBizNo(orderUploadVo.getShipmentDetailId()); + productRequest.setPrice(orderUploadVo.getPurchasePrice()); + productRequest.setSupId(fromCorp); + + return productRequest; } public List getList(MultipartFile file) { diff --git a/src/main/java/com/glxp/api/service/basic/UdiRelevanceService.java b/src/main/java/com/glxp/api/service/basic/UdiRelevanceService.java index 1aad4f4d..626687ff 100644 --- a/src/main/java/com/glxp/api/service/basic/UdiRelevanceService.java +++ b/src/main/java/com/glxp/api/service/basic/UdiRelevanceService.java @@ -66,6 +66,8 @@ public interface UdiRelevanceService extends IService { List selectByMainId(String mainId); + UdiRelevanceResponse selectByMainIdOne(String mainId); + UdiRelevanceEntity selectUpteaByAll(String uuid, String thirdId); UdiRelevanceEntity selectByThirdId(String thirdId, String thirdSys); diff --git a/src/main/java/com/glxp/api/service/basic/impl/UdiRelevanceServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/UdiRelevanceServiceImpl.java index 9057a925..823e99bd 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/UdiRelevanceServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/UdiRelevanceServiceImpl.java @@ -275,6 +275,14 @@ public class UdiRelevanceServiceImpl extends ServiceImpl udiRelevanceResponses = selectByMainId(mainId); + if (udiRelevanceResponses != null && udiRelevanceResponses.size() > 0) + return udiRelevanceResponses.get(0); + return null; + } + @Override public UdiRelevanceEntity selectUpteaByAll(String uuid, String thirdId) { FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest(); 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 9a319f96..0e7a8640 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 @@ -438,7 +438,7 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService { ioOrderDetailBizEntity.setManufacturer(udiRelevanceResponse.getManufactory()); ioOrderDetailBizEntity.setMeasname(udiRelevanceResponse.getMeasname()); ioOrderDetailBizEntity.setSpec(udiRelevanceResponse.getGgxh()); - ioOrderDetailBizEntity.setPrice(udiRelevanceResponse.getPrice()); + ioOrderDetailBizEntity.setPrice(item.getPrice()); ioOrderDetailBizEntity.setProductDate(item.getProductDate()); ioOrderDetailBizEntity.setExpireDate(item.getExpireDate()); ioOrderDetailBizEntity.setBatchNo(item.getBatchNo()); diff --git a/src/main/resources/schemas/schema_v2.4.sql b/src/main/resources/schemas/schema_v2.4.sql index 52750887..26d60587 100644 --- a/src/main/resources/schemas/schema_v2.4.sql +++ b/src/main/resources/schemas/schema_v2.4.sql @@ -1255,11 +1255,15 @@ CALL Pro_Temp_ColumnWork('io_order', 'aliOrderBillNo', ' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''阿里来源单号''', 1); +CALL Pro_Temp_ColumnWork('io_order', 'ycBillNo', + ' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''来源阳采单号''', + 1); CALL Pro_Temp_ColumnWork('basic_udirel', 'detailSort', ' tinyint DEFAULT NULL', 1); -CALL Pro_Temp_ColumnWork('basic_corp', 'adSickNum', ' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL', 1); +CALL Pro_Temp_ColumnWork('basic_corp', 'adSickNum', + ' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL', 1);