From 19ff0294f3f6c9a0f1067649cc8a0dc7156613d6 Mon Sep 17 00:00:00 2001 From: x_z Date: Wed, 18 May 2022 11:26:04 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2=E7=AC=AC?= =?UTF-8?q?=E4=B8=89=E6=96=B9=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../glxp/mipsdl/admin/client/http/PhxyyClient.java | 11 ++--------- .../com/glxp/mipsdl/admin/config/ThirdSysConfig.java | 9 ++------- .../com/glxp/mipsdl/admin/req/UdiwmsOrderDetail.java | 12 ++++++++---- .../mybatis/mapper/basic/BasicThirdSysDao.xml | 12 +++++------- 4 files changed, 17 insertions(+), 27 deletions(-) diff --git a/api-sync/src/main/java/com/glxp/mipsdl/admin/client/http/PhxyyClient.java b/api-sync/src/main/java/com/glxp/mipsdl/admin/client/http/PhxyyClient.java index 52641c0..344ec89 100644 --- a/api-sync/src/main/java/com/glxp/mipsdl/admin/client/http/PhxyyClient.java +++ b/api-sync/src/main/java/com/glxp/mipsdl/admin/client/http/PhxyyClient.java @@ -101,15 +101,8 @@ public class PhxyyClient implements BaseHttpClient { if (StrUtil.isEmpty(udiwmsOrderRequest.getThirdSys())) { return ResultVOUtils.error(500, "第三方系统ID不能为空"); } - BussinessOriginTypeResponse bussinessOriginTypeResponse = bussinessOriginTypeService.findByKey(udiwmsOrderRequest.getBillType(), udiwmsOrderRequest.getThirdSys()); - udiwmsOrderRequest.setBillType(bussinessOriginTypeResponse.getThirdAction()); - if (bussinessOriginTypeResponse.getMainAction().equals("WareHouseIn")) { - udiwmsOrderRequest.setInoutType(1); - } else if (bussinessOriginTypeResponse.getMainAction().equals("WareHouseOut")) { - udiwmsOrderRequest.setInoutType(2); - } - BasicThirdSysBusApiEntity basicThirdSysBusApiEntity = basicThirdSysBusApiService.selectByKey(bussinessOriginTypeResponse.getThirdAction(), bussinessOriginTypeResponse.getThirdSys(), 1); - String response = HttpClient.postJson(thirdSysConfig.getThirdSysConfig().getThirdSysUrl() + basicThirdSysBusApiEntity.getUrl(), udiwmsOrderRequest, getHeaders()); + BasicThirdSysDetailEntity basicThirdSysDetailEntity = basicThirdSysDetailDao.selectByKey("orderSubmitUrl", udiwmsOrderRequest.getThirdSys()); + String response = HttpClient.postJson(thirdSysConfig.getThirdSysConfig().getThirdSysUrl() + basicThirdSysDetailEntity.getValue(), udiwmsOrderRequest, getHeaders()); BaseResponse baseResponse = JSONObject.parseObject(response, new TypeReference() { }); diff --git a/api-sync/src/main/java/com/glxp/mipsdl/admin/config/ThirdSysConfig.java b/api-sync/src/main/java/com/glxp/mipsdl/admin/config/ThirdSysConfig.java index d7af121..181ab9a 100644 --- a/api-sync/src/main/java/com/glxp/mipsdl/admin/config/ThirdSysConfig.java +++ b/api-sync/src/main/java/com/glxp/mipsdl/admin/config/ThirdSysConfig.java @@ -12,19 +12,14 @@ import javax.annotation.Resource; @Configuration public class ThirdSysConfig { - @Value("THIRD_ID") + @Value("${THIRD_ID}") private String thirdSys; @Resource private BasicThirdSysDao basicThirdSysDao; - private BasicThirdSysEntity basicThirdSysEntity; - public BasicThirdSysEntity getThirdSysConfig() { - if (basicThirdSysEntity == null) { - basicThirdSysEntity = basicThirdSysDao.selectByThirdId(thirdSys); - } - return basicThirdSysEntity; + return basicThirdSysDao.selectByThirdId(thirdSys); } } diff --git a/api-sync/src/main/java/com/glxp/mipsdl/admin/req/UdiwmsOrderDetail.java b/api-sync/src/main/java/com/glxp/mipsdl/admin/req/UdiwmsOrderDetail.java index 600d1a5..41d12d6 100644 --- a/api-sync/src/main/java/com/glxp/mipsdl/admin/req/UdiwmsOrderDetail.java +++ b/api-sync/src/main/java/com/glxp/mipsdl/admin/req/UdiwmsOrderDetail.java @@ -8,19 +8,23 @@ import java.math.BigDecimal; public class UdiwmsOrderDetail { private String productId; //产品编码 + private String productName; //产品名称 private BigDecimal price; //单价 private String batchNo; //批次号 private String expireDate; //失效日期 private String productDate; //生产日期 private String standard; //规格型号 - private String productName; //产品名称 + private String billNo; //单据号 + private String secSalesInvNo;//销售发票号(第二票) + private String invoiceDate;//发票日期 + private String secSalesListNo; //第二票销售清单号 + private String firstSalesInvNo; //销售发票号(第一票) + private String registerNo; //注册/备案证号 + private String manufactory; //生产厂家 private Integer count; //数量 - private Integer reCount; //数量 private String remark; //备注 private String remark1; //备注1/规格型号ID private String remark2; //备注2/型号 private String remark3; //备注3/规格 - //阳光采购平台 耗材目录规格id - private String productSpecId; } diff --git a/api-sync/src/main/resources/mybatis/mapper/basic/BasicThirdSysDao.xml b/api-sync/src/main/resources/mybatis/mapper/basic/BasicThirdSysDao.xml index 71bbf94..f0db5b5 100644 --- a/api-sync/src/main/resources/mybatis/mapper/basic/BasicThirdSysDao.xml +++ b/api-sync/src/main/resources/mybatis/mapper/basic/BasicThirdSysDao.xml @@ -2,11 +2,9 @@ - - - - - + \ No newline at end of file