diff --git a/src/main/java/com/glxp/api/controller/basic/BasicCorpController.java b/src/main/java/com/glxp/api/controller/basic/BasicCorpController.java index 58ac5cf3..6fe60cf7 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicCorpController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicCorpController.java @@ -19,7 +19,7 @@ import com.glxp.api.entity.sync.SocketMsgEntity; import com.glxp.api.entity.system.SystemParamConfigEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; import com.glxp.api.entity.thrsys.ThrSystemEntity; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.basic.*; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.FilterBasicThirdSysRequest; diff --git a/src/main/java/com/glxp/api/controller/basic/BasicGenExcelService.java b/src/main/java/com/glxp/api/controller/basic/BasicGenExcelService.java index 293cf42e..528cbceb 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicGenExcelService.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicGenExcelService.java @@ -10,7 +10,7 @@ import com.glxp.api.entity.basic.BasicCorpEntity; import com.glxp.api.entity.basic.BasicCorpsExportLogEntity; import com.glxp.api.entity.basic.BasicProductsExportLogEntity; import com.glxp.api.entity.sync.SyncDataSetEntity; -import com.glxp.api.httpClient.HttpOkClient; +import com.glxp.api.httpClient.utils.HttpOkClient; import com.glxp.api.req.basic.BasicCorpsExportRequest; import com.glxp.api.req.basic.BasicUnitMaintainFilterRequest; import com.glxp.api.res.basic.BasicCorpExportLogResponse; diff --git a/src/main/java/com/glxp/api/controller/basic/UdiContrastController.java b/src/main/java/com/glxp/api/controller/basic/UdiContrastController.java index 836cd81b..f3db46d2 100644 --- a/src/main/java/com/glxp/api/controller/basic/UdiContrastController.java +++ b/src/main/java/com/glxp/api/controller/basic/UdiContrastController.java @@ -23,7 +23,7 @@ import com.glxp.api.entity.sync.SocketMsgEntity; import com.glxp.api.entity.thrsys.CodeRel; import com.glxp.api.entity.thrsys.ThrProductsEntity; import com.glxp.api.entity.thrsys.ThrSystemEntity; -import com.glxp.api.httpClient.NmpaUdiClient; +import com.glxp.api.httpClient.serviceClient.impl.NmpaUdiClientImpl; import com.glxp.api.req.basic.*; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.FilterBasicThirdSysRequest; @@ -58,7 +58,7 @@ import java.util.List; public class UdiContrastController extends BaseController{ @Resource - NmpaUdiClient udiDlHttpClient; + NmpaUdiClientImpl udiDlHttpClient; @Resource UdiRelevanceService udiRelevanceService; @Resource diff --git a/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java b/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java index f21bbc15..18719bcb 100644 --- a/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java +++ b/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java @@ -23,7 +23,7 @@ import com.glxp.api.entity.system.SystemParamConfigEntity; import com.glxp.api.entity.thrsys.CodeRel; import com.glxp.api.entity.thrsys.ThrProductsEntity; import com.glxp.api.entity.thrsys.ThrSystemEntity; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.basic.*; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.FilterBasicThirdSysRequest; diff --git a/src/main/java/com/glxp/api/controller/basic/UdiRlSupController.java b/src/main/java/com/glxp/api/controller/basic/UdiRlSupController.java index ed7ea986..6af93b0c 100644 --- a/src/main/java/com/glxp/api/controller/basic/UdiRlSupController.java +++ b/src/main/java/com/glxp/api/controller/basic/UdiRlSupController.java @@ -21,7 +21,7 @@ import com.glxp.api.entity.sync.SocketMsgEntity; import com.glxp.api.entity.system.CompanyEntity; import com.glxp.api.entity.thrsys.CodeRel; import com.glxp.api.exception.JsonException; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.basic.*; import com.glxp.api.req.system.CompanyRequest; import com.glxp.api.req.system.DeleteCompanyFileRequest; diff --git a/src/main/java/com/glxp/api/controller/collect/IoCollectOrderBackupController.java b/src/main/java/com/glxp/api/controller/collect/IoCollectOrderBackupController.java index 5afa8faa..7d36ea7e 100644 --- a/src/main/java/com/glxp/api/controller/collect/IoCollectOrderBackupController.java +++ b/src/main/java/com/glxp/api/controller/collect/IoCollectOrderBackupController.java @@ -2,7 +2,7 @@ package com.glxp.api.controller.collect; import com.glxp.api.common.res.BaseResponse; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.collect.PostCollectOrderRequest; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.PostMapping; diff --git a/src/main/java/com/glxp/api/controller/sync/SyncDelController.java b/src/main/java/com/glxp/api/controller/sync/SyncDelController.java index 61413368..ad06372c 100644 --- a/src/main/java/com/glxp/api/controller/sync/SyncDelController.java +++ b/src/main/java/com/glxp/api/controller/sync/SyncDelController.java @@ -21,7 +21,7 @@ import com.glxp.api.entity.inv.DeviceInspectTaskEntity; import com.glxp.api.entity.sync.SyncEditLogEntity; import com.glxp.api.entity.sync.SyncEditTypeEntity; import com.glxp.api.entity.thrsys.CodeRel; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.basic.*; import com.glxp.api.req.system.DeleteCompanyFileRequest; import com.glxp.api.req.system.DeleteRequest; diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrBusTypeOriginController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrBusTypeOriginController.java index 53e194fe..a95e012b 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrBusTypeOriginController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrBusTypeOriginController.java @@ -10,7 +10,7 @@ import com.glxp.api.constant.BusinessType; import com.glxp.api.entity.thrsys.ThrBusTypeOriginEntity; import com.glxp.api.entity.thrsys.ThrSystemBusApiEntity; import com.glxp.api.entity.thrsys.ThrSystemEntity; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.FilterBasicThirdSysDetailRequest; import com.glxp.api.req.thrsys.FilterThrBusTypeOriginRequest; diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrCorpExportLogController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrCorpExportLogController.java index 1b866b70..e964f0fe 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrCorpExportLogController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrCorpExportLogController.java @@ -12,7 +12,7 @@ import com.glxp.api.constant.BusinessType; import com.glxp.api.entity.thrsys.ThrCorpEntity; import com.glxp.api.entity.thrsys.ThrCorpExportLogEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.FilterThrCorpExportLogRequest; import com.glxp.api.req.thrsys.FilterThrCorpRequest; diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrCorpsController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrCorpsController.java index c9cfda51..35e94e8f 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrCorpsController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrCorpsController.java @@ -11,7 +11,7 @@ import com.glxp.api.constant.BusinessType; import com.glxp.api.constant.Constant; import com.glxp.api.entity.thrsys.ThrCorpImportLogEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.FilterThrCorpRequest; import com.glxp.api.req.thrsys.PostThrCorpRequest; diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrInvProductsController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrInvProductsController.java index 2981bec4..398b8231 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrInvProductsController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrInvProductsController.java @@ -14,7 +14,7 @@ import com.glxp.api.constant.Constant; import com.glxp.api.entity.thrsys.ThrInvProductsEntity; import com.glxp.api.entity.thrsys.ThrInvProductsImportLogEntity; import com.glxp.api.entity.thrsys.ThrSystemEntity; -import com.glxp.api.httpClient.HttpOkClient; +import com.glxp.api.httpClient.utils.HttpOkClient; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.FilterThrInvProductsRequest; import com.glxp.api.req.thrsys.PostThrInvProductsRequest; diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrInvProductsExportLogController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrInvProductsExportLogController.java index 6211d846..a9bc4991 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrInvProductsExportLogController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrInvProductsExportLogController.java @@ -10,7 +10,7 @@ import com.glxp.api.constant.BusinessType; import com.glxp.api.entity.thrsys.ThrInvProductsEntity; import com.glxp.api.entity.thrsys.ThrInvProductsExportLogEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; -import com.glxp.api.httpClient.ErpInvClient; +import com.glxp.api.httpClient.serviceClient.impl.ErpInvClientImpl; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.*; import com.glxp.api.res.PageSimpleResponse; @@ -48,7 +48,7 @@ public class ThrInvProductsExportLogController { @Resource private ThrInvProductsService thrInvProductsService; @Resource - ErpInvClient erpInvClient; + ErpInvClientImpl erpInvClientImpl; @GetMapping("/udiwms/invProducts/exportLog/filter") public BaseResponse filter(FilterThrCorpExportLogRequest filterThrProductsExportLogRequest, @@ -160,7 +160,7 @@ public class ThrInvProductsExportLogController { } if (thrSystemDetailEntity.getFromType() == 0) { - BaseResponse> responseBaseResponse = erpInvClient.getInvPrdoductResponse(onhandQueryRequest, onHandUrl); + BaseResponse> responseBaseResponse = erpInvClientImpl.getInvPrdoductResponse(onhandQueryRequest, onHandUrl); return responseBaseResponse; } else { FilterThrInvProductsRequest filterThrInvProductsRequest = new FilterThrInvProductsRequest(); diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrManusController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrManusController.java index 8c3ec8c1..43247dce 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrManusController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrManusController.java @@ -9,7 +9,7 @@ import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.entity.thrsys.ThrManufacturerEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.FilterBasicProducstRequest; import com.glxp.api.req.thrsys.FilterThrCorpRequest; diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrOrderController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrOrderController.java index 284e6a54..af3a1eec 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrOrderController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrOrderController.java @@ -14,7 +14,7 @@ import com.glxp.api.constant.BusinessType; import com.glxp.api.constant.Constant; import com.glxp.api.entity.system.SystemParamConfigEntity; import com.glxp.api.entity.thrsys.*; -import com.glxp.api.httpClient.HttpOkClient; +import com.glxp.api.httpClient.utils.HttpOkClient; import com.glxp.api.req.inout.FilterOrderRequest; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.*; diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrOrderExportLogController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrOrderExportLogController.java index 8fde75f2..471532bf 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrOrderExportLogController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrOrderExportLogController.java @@ -11,7 +11,7 @@ import com.glxp.api.entity.thrsys.ThrOrderDetailEntity; import com.glxp.api.entity.thrsys.ThrOrderEntity; import com.glxp.api.entity.thrsys.ThrOrderExportLogEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; -import com.glxp.api.httpClient.ErpOrderClient; +import com.glxp.api.httpClient.serviceClient.impl.ErpOrderClientImpl; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.*; import com.glxp.api.res.PageSimpleResponse; @@ -50,7 +50,7 @@ public class ThrOrderExportLogController { @Resource private ThrOrderDetailService thrOrderDetailService; @Resource - private ErpOrderClient erpOrderClient; + private ErpOrderClientImpl erpOrderClientImpl; @GetMapping("/udiwms/thrOrder/exportLog/filter") public BaseResponse filter(FilterThrCorpImportLogRequest filterUdiEpLogReques, @@ -183,7 +183,7 @@ public class ThrOrderExportLogController { // } ThrSystemDetailEntity thrSystemDetailEntity=new ThrSystemDetailEntity(); if (thrSystemDetailEntity.getFromType() != null && thrSystemDetailEntity.getFromType() == 0) { - return erpOrderClient.getThrOrderResponse(filterErpOrderRequest); + return erpOrderClientImpl.getThrOrderResponse(filterErpOrderRequest); } else { //todo 订单查询,需加日期 FilterThrOrderRequest filterThrOrderRequest = new FilterThrOrderRequest(); diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrProductsAddDiController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrProductsAddDiController.java index 5da069ed..63967c80 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrProductsAddDiController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrProductsAddDiController.java @@ -21,7 +21,7 @@ import com.glxp.api.entity.thrsys.ThrProductsAddDiEntity; import com.glxp.api.entity.thrsys.ThrProductsEntity; import com.glxp.api.entity.thrsys.ThrSystemEntity; import com.glxp.api.exception.JsonException; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.basic.SupplementRequest; import com.glxp.api.req.basic.UdiCombineRequest; import com.glxp.api.req.system.DeleteRequest; diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrProductsController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrProductsController.java index 3cc68b20..23b4fd8a 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrProductsController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrProductsController.java @@ -13,7 +13,7 @@ import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.constant.BusinessType; import com.glxp.api.entity.basic.UdiProductEntity; import com.glxp.api.entity.thrsys.ThrProductsEntity; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.FilterThrProductsRequest; import com.glxp.api.res.PageSimpleResponse; diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrProductsExportLogController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrProductsExportLogController.java index 9e6457d3..5fb2ce83 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrProductsExportLogController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrProductsExportLogController.java @@ -9,7 +9,7 @@ import com.glxp.api.constant.BasicProcessStatus; import com.glxp.api.constant.BusinessType; import com.glxp.api.entity.thrsys.ThrProductsExportLogEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.FilterThrProductsExportLogRequest; import com.glxp.api.req.thrsys.FilterThrProductsRequest; @@ -51,6 +51,8 @@ public class ThrProductsExportLogController { ThrSystemDetailService thrSystemDetailService; @Resource private CustomerService customerService; + @Resource + ErpBasicClient erpBasicHttpClient; @GetMapping("/udiwms/thrProducts/exportLog/filter") @@ -184,7 +186,6 @@ public class ThrProductsExportLogController { return ResultVOUtils.error(500, "ERP产品信息接口地址未定义"); if (thrSystemDetailEntity.getEnabled()) { if (thrSystemDetailEntity.getFromType() == 0) { - ErpBasicClient erpBasicHttpClient = new ErpBasicClient(); BaseResponse> udiDlDeviceResponse = erpBasicHttpClient.getErpProducts(filterThrProductsRequest); if (udiDlDeviceResponse.getCode() == 20000) { return udiDlDeviceResponse; diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrSystemController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrSystemController.java index 8c0498b3..4cb82c46 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrSystemController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrSystemController.java @@ -13,7 +13,7 @@ import com.glxp.api.constant.BusinessType; import com.glxp.api.entity.thrsys.ThrSystemBusApiEntity; import com.glxp.api.entity.thrsys.ThrSystemEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.thrsys.FilterBasicThirdSysDetailRequest; import com.glxp.api.req.thrsys.FilterBasicThirdSysRequest; import com.glxp.api.res.PageSimpleResponse; diff --git a/src/main/java/com/glxp/api/httpClient/ErpOrderClient.java b/src/main/java/com/glxp/api/httpClient/ErpOrderClient.java deleted file mode 100644 index 6acc8877..00000000 --- a/src/main/java/com/glxp/api/httpClient/ErpOrderClient.java +++ /dev/null @@ -1,145 +0,0 @@ -package com.glxp.api.httpClient; - -import com.alibaba.fastjson.JSONObject; -import com.alibaba.fastjson.TypeReference; -import com.glxp.api.common.res.BaseResponse; -import com.glxp.api.constant.ConstantStatus; -import com.glxp.api.entity.thrsys.ThrSystemEntity; -import com.glxp.api.req.thrsys.FilterThrOrderRequest; -import com.glxp.api.res.PageSimpleResponse; -import com.glxp.api.res.thrsys.ThrErpOrderResponse; -import com.glxp.api.res.thrsys.ThrOrderResponse; -import com.glxp.api.service.thrsys.ThrSystemService; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -/** - * 获取ERP出入库单据 - */ -@Slf4j -@Service -public class ErpOrderClient { - - @Autowired - private ThrSystemService thrSystemService; - @Resource - HttpOkClient httpOkClient; - - public List getErpOrder(String url, List billCodes, String action) { - List erpOrderEntities = new ArrayList<>(); - if (billCodes != null && billCodes.size() > 0) { - for (int i = 0; i < billCodes.size(); i++) { - List ThrErpOrderResponses = getErpOrder(url, Arrays.asList(billCodes.get(i)), action); - if (ThrErpOrderResponses != null) { - erpOrderEntities.addAll(ThrErpOrderResponses); - } - } - } - return erpOrderEntities; - } - - public BaseResponse> getThrOrderResponse(FilterThrOrderRequest filterOrderRequest) { - - //查询第三方服务授权参数 - ThrSystemEntity thrSystemEntity = thrSystemService.selectByThirdId("thirdId"); - String url = thrSystemEntity.getThridUrl() + "/udiwms/erp/getOrders"; - String response = httpOkClient.uCloudPost(url, filterOrderRequest, thrSystemEntity); - try { - BaseResponse> responseBaseResponse = - JSONObject.parseObject(response, new TypeReference>>() { - }); - return responseBaseResponse; - } catch (Exception e) { - log.error("获取订单数据异常", e); - } - return null; - } - - public List getErpOrder(FilterThrOrderRequest filterOrderRequest) { - try { - BaseResponse> responseBaseResponse = getThrOrderResponse(filterOrderRequest); - List purchaseinResponseList = responseBaseResponse.getData().getList(); - if (purchaseinResponseList != null && purchaseinResponseList.size() > 0) { - List erpOrderEntities = new ArrayList<>(); - for (ThrOrderResponse ThrOrderResponse : purchaseinResponseList) { - for (ThrOrderResponse.SubErpOrder subPurchase : ThrOrderResponse.getSubErpOrders()) { - ThrErpOrderResponse ThrErpOrderResponse = new ThrErpOrderResponse(); - ThrErpOrderResponse.setErpOrderId(ThrOrderResponse.getBillNo()); - ThrErpOrderResponse.setCompanyid(ThrOrderResponse.getCorpId()); - ThrErpOrderResponse.setCompanyname(ThrOrderResponse.getCorpName()); - ThrErpOrderResponse.setCredate(ThrOrderResponse.getBilldate()); - ThrErpOrderResponse.setGoodsid(subPurchase.getProductId()); - ThrErpOrderResponse.setGoodsname(subPurchase.getProductName()); - ThrErpOrderResponse.setBatchNo(subPurchase.getBatchNo()); - ThrErpOrderResponse.setProductDate(subPurchase.getProductDate()); - ThrErpOrderResponse.setExpireDate(subPurchase.getExpireDate()); - ThrErpOrderResponse.setErpCount(subPurchase.getCount()); - ThrErpOrderResponse.setReCount(subPurchase.getReCount()); - ThrErpOrderResponse.setOriginType(ThrOrderResponse.getOriginType()); - ThrErpOrderResponse.setGoodsunit(subPurchase.getSpec()); - ThrErpOrderResponse.setOrderFromType(ConstantStatus.SORDER_FROM_ONLINE); - erpOrderEntities.add(ThrErpOrderResponse); - } - } - return erpOrderEntities; - } - } catch ( - Exception e) { - e.printStackTrace(); - } - return null; - } - - -// public BaseResponse submitOrder(UdiwmsOrderRequest udiwmsOrderRequest) { -// BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectByThirdId(udiwmsOrderRequest.getThirdSys()); -// String url = basicThirdSysEntity.getThridUrl() + "/udiwms/erp/submitOrders"; -// String response = httpOkClient.uCloudPost(url, udiwmsOrderRequest); -// try { -// BaseResponse> responseBaseResponse = -// JSONObject.parseObject(response, new TypeReference>>() { -// }); -// return responseBaseResponse; -// } catch (Exception e) { -// log.error("获取订单数据异常", e); -// } -// return null; -// } - - -// public BaseResponse postBill(Map> postMap, String billAction, String uploadUrl, String thirdSysFk) { -// ERPPostBillRequest erpPostBillRequest = new ERPPostBillRequest(); -// erpPostBillRequest.setPostMap(postMap); -// erpPostBillRequest.setBillAction(billAction); -// -// //查询第三方服务授权参数 -// BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectByThirdId(thirdSysFk); -// String response = httpOkClient.uCloudPost(uploadUrl, erpPostBillRequest, basicThirdSysEntity); -// BaseResponse baseResponse = JSONObject.parseObject(response, new TypeReference() { -// }); -// return baseResponse; -// } -// -// public BaseResponse postBill(ERPPostBillRequest erpPostBillRequest, String uploadUrl) { -// String response = httpOkClient.uCloudPost(uploadUrl, erpPostBillRequest); -// BaseResponse baseResponse = -// JSONObject.parseObject(response, new TypeReference() { -// }); -// return baseResponse; -// } -// -// public BaseResponse signBill(USignRequest signRequest, String url) { -// String response = httpOkClient.uCloudPost(url, signRequest); -// BaseResponse baseResponse = -// JSONObject.parseObject(response, new TypeReference() { -// }); -// return baseResponse; -// } - -} diff --git a/src/main/java/com/glxp/api/httpClient/serviceClient/ErpBasicClient.java b/src/main/java/com/glxp/api/httpClient/serviceClient/ErpBasicClient.java new file mode 100644 index 00000000..ed19871e --- /dev/null +++ b/src/main/java/com/glxp/api/httpClient/serviceClient/ErpBasicClient.java @@ -0,0 +1,84 @@ +package com.glxp.api.httpClient.serviceClient; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.TypeReference; +import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.common.util.ResultVOUtils; +import com.glxp.api.entity.thrsys.*; +import com.glxp.api.httpClient.req.UdiwmsBusTypeRequest; +import com.glxp.api.httpClient.req.UdiwmsUnitRequest; +import com.glxp.api.req.basic.YbDrugDetailFilterRequest; +import com.glxp.api.req.basic.YbHcflDetailFilterRequest; +import com.glxp.api.req.collect.PostCollectOrderRequest; +import com.glxp.api.req.thrsys.*; +import com.glxp.api.res.PageSimpleResponse; +import com.glxp.api.res.chs.YbHcflEntityResponse; +import com.glxp.api.res.thrsys.ThrCorpsResponse; +import com.glxp.api.res.thrsys.ThrProductsResponse; +import com.glxp.api.res.thrsys.UdiwmsWarehouseDetail; +import org.springframework.beans.BeanUtils; + +import java.util.List; + +public interface ErpBasicClient { + + + public BaseResponse> getErpCrop(ThrUnitMaintainFilterRequest thrUnitMaintainFilterRequest); + + //获取产品信息 + public BaseResponse> getErpProducts(FilterThrProductsRequest filterThrProductsRequest); + + //查询仓库货位号 + public BaseResponse> getWarehouse(UdiwmsWarehouseRequest udiwmsWarehouseRequest); + //测试连通性 + public BaseResponse testThridConnect(ThrSystemEntity thrSystemEntity); + //下载第三方系统单据类型 + public BaseResponse> getBusTypes(FilterBasicThirdSysDetailRequest filterBasicThirdSysDetailRequest); + + /** + * 医保耗材详情 + */ + public BaseResponse> getYbHcflDetail(YbHcflDetailFilterRequest ybHcflDetailFilterRequest); + + /** + * 获取往来单位 + */ + public BaseResponse> getThrManu(ThrManuFilterRequest thrManuFilterRequest); + /** + * 通过医保编码获取 药品 信息 + * @param ybHcflDetailFilterRequest + * @return + */ + public BaseResponse> getYbDrugDetail(YbDrugDetailFilterRequest ybHcflDetailFilterRequest); + + /** + * 获取 多码融合表 + * @param codeRel + * @return + */ + public BaseResponse> getCodeRelDetail(CodeRel codeRel); + + /** + * 获取 多码融合表 + * @param codeList + * @return + */ + public BaseResponse checkCode(List codeList); + + /** + * 更新 多码融合表 + * @param codeRel + * @return + */ + public BaseResponse updateCodeRelDetail(CodeRel codeRel); + + /** + * 上传已成功传输医保的完成单据 + * @param postCollectOrderRequest + * @return + */ + public BaseResponse collectOrderUpload(PostCollectOrderRequest postCollectOrderRequest); + +} diff --git a/src/main/java/com/glxp/api/httpClient/serviceClient/ErpInvClient.java b/src/main/java/com/glxp/api/httpClient/serviceClient/ErpInvClient.java new file mode 100644 index 00000000..71e54b5b --- /dev/null +++ b/src/main/java/com/glxp/api/httpClient/serviceClient/ErpInvClient.java @@ -0,0 +1,10 @@ +package com.glxp.api.httpClient.serviceClient; + +import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.req.thrsys.ThrOnhandRequest; +import com.glxp.api.res.PageSimpleResponse; +import com.glxp.api.res.thrsys.ThrInvProductResponse; + +public interface ErpInvClient { + public BaseResponse> getInvPrdoductResponse(ThrOnhandRequest onhandRequest, String url); +} diff --git a/src/main/java/com/glxp/api/httpClient/serviceClient/ErpOrderClient.java b/src/main/java/com/glxp/api/httpClient/serviceClient/ErpOrderClient.java new file mode 100644 index 00000000..90643eea --- /dev/null +++ b/src/main/java/com/glxp/api/httpClient/serviceClient/ErpOrderClient.java @@ -0,0 +1,10 @@ +package com.glxp.api.httpClient.serviceClient; + +import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.req.thrsys.FilterThrOrderRequest; +import com.glxp.api.res.PageSimpleResponse; +import com.glxp.api.res.thrsys.ThrOrderResponse; + +public interface ErpOrderClient { + public BaseResponse> getThrOrderResponse(FilterThrOrderRequest filterOrderRequest); +} diff --git a/src/main/java/com/glxp/api/httpClient/serviceClient/NmpaUdiClient.java b/src/main/java/com/glxp/api/httpClient/serviceClient/NmpaUdiClient.java new file mode 100644 index 00000000..e66aeea3 --- /dev/null +++ b/src/main/java/com/glxp/api/httpClient/serviceClient/NmpaUdiClient.java @@ -0,0 +1,24 @@ +package com.glxp.api.httpClient.serviceClient; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.StrUtil; +import com.glxp.api.constant.ConstantStatus; +import com.glxp.api.entity.basic.ProductInfoEntity; +import com.glxp.api.entity.basic.UdiProductEntity; +import com.glxp.api.req.basic.ProductInfoFilterRequest; +import com.glxp.api.util.UuidUtils; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +public interface NmpaUdiClient { + + + public List getUdiByUuid(String uuid); + + public List getOrUpdateByUuid(String uuid); + + public List getUdiByDi(String key); +} diff --git a/src/main/java/com/glxp/api/httpClient/ErpBasicClient.java b/src/main/java/com/glxp/api/httpClient/serviceClient/impl/ErpBasicClientImpl.java similarity index 94% rename from src/main/java/com/glxp/api/httpClient/ErpBasicClient.java rename to src/main/java/com/glxp/api/httpClient/serviceClient/impl/ErpBasicClientImpl.java index dda80b89..ffb81243 100644 --- a/src/main/java/com/glxp/api/httpClient/ErpBasicClient.java +++ b/src/main/java/com/glxp/api/httpClient/serviceClient/impl/ErpBasicClientImpl.java @@ -1,4 +1,4 @@ -package com.glxp.api.httpClient; +package com.glxp.api.httpClient.serviceClient.impl; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.StrUtil; @@ -9,6 +9,8 @@ import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.entity.thrsys.*; import com.glxp.api.httpClient.req.UdiwmsBusTypeRequest; import com.glxp.api.httpClient.req.UdiwmsUnitRequest; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; +import com.glxp.api.httpClient.utils.HttpOkClient; import com.glxp.api.req.basic.YbDrugDetailFilterRequest; import com.glxp.api.req.basic.YbHcflDetailFilterRequest; import com.glxp.api.req.collect.PostCollectOrderRequest; @@ -31,13 +33,14 @@ import java.util.List; */ @Slf4j @Service -public class ErpBasicClient { +public class ErpBasicClientImpl implements ErpBasicClient { @Resource HttpOkClient httpOkClient; @Resource private ThrSystemService basicThirdSysService; //获取往来单位 + @Override public BaseResponse> getErpCrop(ThrUnitMaintainFilterRequest thrUnitMaintainFilterRequest) { UdiwmsUnitRequest udiwmsUnitRequest = new UdiwmsUnitRequest(); BeanUtil.copyProperties(thrUnitMaintainFilterRequest, udiwmsUnitRequest); @@ -61,8 +64,8 @@ public class ErpBasicClient { } //获取产品信息 + @Override public BaseResponse> getErpProducts(FilterThrProductsRequest filterThrProductsRequest) { - ThrSystemEntity basicThirdSysEntity = basicThirdSysService.selectByThirdId(filterThrProductsRequest.getThirdSys()); String url = basicThirdSysEntity.getThridUrl() + "/udiwms/erp/getProducts"; @@ -81,7 +84,8 @@ public class ErpBasicClient { } } - //查询仓库货位号 + //查询仓库货位号 + @Override public BaseResponse> getWarehouse(UdiwmsWarehouseRequest udiwmsWarehouseRequest) { ThrSystemEntity basicThirdSysEntity = basicThirdSysService.selectByThirdId(udiwmsWarehouseRequest.getThirdSys()); String url = basicThirdSysEntity.getThridUrl() + "/udiwms/erp/getWarehouse"; @@ -99,6 +103,7 @@ public class ErpBasicClient { } //测试连通性 + @Override public BaseResponse testThridConnect(ThrSystemEntity thrSystemEntity) { String response = httpOkClient.uCloudPost(thrSystemEntity.getThridUrl() + "/udiwms/erp/testThirdSys", "{}"); log.info(response); @@ -111,6 +116,7 @@ public class ErpBasicClient { } //下载第三方系统单据类型 + @Override public BaseResponse> getBusTypes(FilterBasicThirdSysDetailRequest filterBasicThirdSysDetailRequest) { ThrSystemEntity thrSystemEntity = basicThirdSysService.selectByThirdId(filterBasicThirdSysDetailRequest.getThirdSysFk()); String url = thrSystemEntity.getThridUrl() + "/udiwms/erp/getOrderType"; @@ -124,9 +130,9 @@ public class ErpBasicClient { BaseResponse> udiDlDeviceResponse = JSONObject.parseObject(response, new TypeReference>>() { }); - if(udiDlDeviceResponse!=null){ + if (udiDlDeviceResponse != null) { return udiDlDeviceResponse; - }else{ + } else { return ResultVOUtils.error(500, "查询第三方数据失败!"); } @@ -139,8 +145,9 @@ public class ErpBasicClient { /** * 医保耗材详情 */ + @Override public BaseResponse> getYbHcflDetail(YbHcflDetailFilterRequest ybHcflDetailFilterRequest) { - String url = "https://www.udims.com/UDI_DL_Server_test"+"/udchs/ybHcfl/list"; + String url = "https://www.udims.com/UDI_DL_Server_test" + "/udchs/ybHcfl/list"; try { ybHcflDetailFilterRequest.setLimit(1); ybHcflDetailFilterRequest.setPage(1); @@ -160,6 +167,7 @@ public class ErpBasicClient { /** * 获取往来单位 */ + @Override public BaseResponse> getThrManu(ThrManuFilterRequest thrManuFilterRequest) { UdiwmsUnitRequest udiwmsUnitRequest = new UdiwmsUnitRequest(); BeanUtils.copyProperties(thrManuFilterRequest, udiwmsUnitRequest); @@ -183,9 +191,11 @@ public class ErpBasicClient { /** * 通过医保编码获取 药品 信息 + * * @param ybHcflDetailFilterRequest * @return */ + @Override public BaseResponse> getYbDrugDetail(YbDrugDetailFilterRequest ybHcflDetailFilterRequest) { String url = "https://www.udims.com/UDI_DL_Server_test" + "/udchs/ybDrug/list"; try { @@ -202,9 +212,11 @@ public class ErpBasicClient { /** * 获取 多码融合表 + * * @param codeRel * @return */ + @Override public BaseResponse> getCodeRelDetail(CodeRel codeRel) { String url = "https://www.udims.com/UDI_DL_Server_test" + "/udchs/codeRel/list"; try { @@ -221,9 +233,11 @@ public class ErpBasicClient { /** * 获取 多码融合表 + * * @param codeList * @return */ + @Override public BaseResponse checkCode(List codeList) { String url = "https://www.udims.com/UDI_DL_Server_test" + "/udiwms/relCode/checkCode"; try { @@ -240,11 +254,13 @@ public class ErpBasicClient { /** * 更新 多码融合表 + * * @param codeRel * @return */ + @Override public BaseResponse updateCodeRelDetail(CodeRel codeRel) { - String url = "https://www.udims.com/UDI_DL_Server_test"+ "/udchs/codeRel/update"; + String url = "https://www.udims.com/UDI_DL_Server_test" + "/udchs/codeRel/update"; try { String response = httpOkClient.uCloudPost(url, codeRel); BaseResponse listBaseResponse = @@ -259,11 +275,13 @@ public class ErpBasicClient { /** * 上传已成功传输医保的完成单据 + * * @param postCollectOrderRequest * @return */ + @Override public BaseResponse collectOrderUpload(PostCollectOrderRequest postCollectOrderRequest) { - String url = "https://www.udims.com/UDI_DL_Server_test"+ "/collect/order/upload"; + String url = "https://www.udims.com/UDI_DL_Server_test" + "/collect/order/upload"; try { String response = httpOkClient.uCloudPost(url, postCollectOrderRequest); BaseResponse listBaseResponse = diff --git a/src/main/java/com/glxp/api/httpClient/ErpInvClient.java b/src/main/java/com/glxp/api/httpClient/serviceClient/impl/ErpInvClientImpl.java similarity index 92% rename from src/main/java/com/glxp/api/httpClient/ErpInvClient.java rename to src/main/java/com/glxp/api/httpClient/serviceClient/impl/ErpInvClientImpl.java index 0189c4f7..7a0519b1 100644 --- a/src/main/java/com/glxp/api/httpClient/ErpInvClient.java +++ b/src/main/java/com/glxp/api/httpClient/serviceClient/impl/ErpInvClientImpl.java @@ -1,8 +1,10 @@ -package com.glxp.api.httpClient; +package com.glxp.api.httpClient.serviceClient.impl; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.httpClient.serviceClient.ErpInvClient; +import com.glxp.api.httpClient.utils.HttpOkClient; import com.glxp.api.req.thrsys.ThrOnhandRequest; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.thrsys.ThrInvProductResponse; @@ -13,12 +15,13 @@ import java.util.HashMap; import java.util.Map; @Service -public class ErpInvClient { +public class ErpInvClientImpl implements ErpInvClient { @Resource HttpOkClient httpOkClient; + @Override public BaseResponse> getInvPrdoductResponse(ThrOnhandRequest onhandRequest, String url) { Map paramMap = new HashMap<>(16); diff --git a/src/main/java/com/glxp/api/httpClient/serviceClient/impl/ErpOrderClientImpl.java b/src/main/java/com/glxp/api/httpClient/serviceClient/impl/ErpOrderClientImpl.java new file mode 100644 index 00000000..78f84293 --- /dev/null +++ b/src/main/java/com/glxp/api/httpClient/serviceClient/impl/ErpOrderClientImpl.java @@ -0,0 +1,51 @@ +package com.glxp.api.httpClient.serviceClient.impl; + +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.TypeReference; +import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.entity.thrsys.ThrSystemEntity; +import com.glxp.api.httpClient.serviceClient.ErpOrderClient; +import com.glxp.api.httpClient.utils.HttpOkClient; +import com.glxp.api.req.thrsys.FilterThrOrderRequest; +import com.glxp.api.res.PageSimpleResponse; +import com.glxp.api.res.thrsys.ThrOrderResponse; +import com.glxp.api.service.thrsys.ThrSystemService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +/** + * 获取ERP出入库单据 + */ +@Slf4j +@Service +public class ErpOrderClientImpl implements ErpOrderClient { + + @Autowired + private ThrSystemService thrSystemService; + @Resource + HttpOkClient httpOkClient; + + @Override + public BaseResponse> getThrOrderResponse(FilterThrOrderRequest filterOrderRequest) { + + //查询第三方服务授权参数 + ThrSystemEntity thrSystemEntity = thrSystemService.selectByThirdId("thirdId"); + String url = thrSystemEntity.getThridUrl() + "/udiwms/erp/getOrders"; + String response = httpOkClient.uCloudPost(url, filterOrderRequest, thrSystemEntity); + try { + BaseResponse> responseBaseResponse = + JSONObject.parseObject(response, new TypeReference>>() { + }); + return responseBaseResponse; + } catch (Exception e) { + log.error("获取订单数据异常", e); + } + return null; + } + + + +} diff --git a/src/main/java/com/glxp/api/httpClient/NmpaUdiClient.java b/src/main/java/com/glxp/api/httpClient/serviceClient/impl/NmpaUdiClientImpl.java similarity index 84% rename from src/main/java/com/glxp/api/httpClient/NmpaUdiClient.java rename to src/main/java/com/glxp/api/httpClient/serviceClient/impl/NmpaUdiClientImpl.java index f55a6f00..b6457c3f 100644 --- a/src/main/java/com/glxp/api/httpClient/NmpaUdiClient.java +++ b/src/main/java/com/glxp/api/httpClient/serviceClient/impl/NmpaUdiClientImpl.java @@ -1,16 +1,14 @@ -package com.glxp.api.httpClient; +package com.glxp.api.httpClient.serviceClient.impl; import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; import com.glxp.api.constant.ConstantStatus; import com.glxp.api.entity.basic.ProductInfoEntity; import com.glxp.api.entity.basic.UdiProductEntity; +import com.glxp.api.httpClient.serviceClient.NmpaUdiClient; import com.glxp.api.req.basic.ProductInfoFilterRequest; import com.glxp.api.service.basic.ProductInfoService; -import com.glxp.api.service.basic.UdiProductService; import com.glxp.api.util.UuidUtils; -import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -23,12 +21,11 @@ import java.util.stream.Collectors; * 获取国家UDI同步库信息(nmpa:国家药品监督管理局) */ @Service -public class NmpaUdiClient { +public class NmpaUdiClientImpl implements NmpaUdiClient { @Resource ProductInfoService productInfoService; - @Resource - UdiProductService udiProductService; + @Override public List getUdiByUuid(String uuid) { ProductInfoFilterRequest productInfoFilterRequest = new ProductInfoFilterRequest(); productInfoFilterRequest.setPage(1); @@ -51,19 +48,14 @@ public class NmpaUdiClient { return udiInfoEntities; } + @Override public List getOrUpdateByUuid(String uuid) { List udiInfoEntities = getUdiByUuid(uuid); -// if (CollUtil.isNotEmpty(udiInfoEntities)) { -// UdiProductEntity udiProductEntity = udiProductService.findByNameCode(udiInfoEntities.get(0).getNameCode()); -// if (udiProductEntity != null) { -// List exitUdis = udiProductService.findByUuids(udiProductEntity.getUuid()); -// return exitUdis; -// } -// } return udiInfoEntities; } + @Override public List getUdiByDi(String key) { ProductInfoFilterRequest productInfoFilterRequest = new ProductInfoFilterRequest(); productInfoFilterRequest.setPage(1); diff --git a/src/main/java/com/glxp/api/httpClient/HttpOkClient.java b/src/main/java/com/glxp/api/httpClient/utils/HttpOkClient.java similarity index 97% rename from src/main/java/com/glxp/api/httpClient/HttpOkClient.java rename to src/main/java/com/glxp/api/httpClient/utils/HttpOkClient.java index 6f634727..b31a530d 100644 --- a/src/main/java/com/glxp/api/httpClient/HttpOkClient.java +++ b/src/main/java/com/glxp/api/httpClient/utils/HttpOkClient.java @@ -1,4 +1,4 @@ -package com.glxp.api.httpClient; +package com.glxp.api.httpClient.utils; import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; diff --git a/src/main/java/com/glxp/api/service/basic/BasicBackUpdateProductService.java b/src/main/java/com/glxp/api/service/basic/BasicBackUpdateProductService.java index e8280322..60172288 100644 --- a/src/main/java/com/glxp/api/service/basic/BasicBackUpdateProductService.java +++ b/src/main/java/com/glxp/api/service/basic/BasicBackUpdateProductService.java @@ -8,7 +8,7 @@ import com.glxp.api.entity.basic.UdiRelevanceEntity; import com.glxp.api.entity.system.SystemParamConfigEntity; import com.glxp.api.entity.thrsys.ThrProductsEntity; import com.glxp.api.entity.thrsys.ThrSystemEntity; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.thrsys.FilterThrProductsRequest; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.thrsys.ThrProductsResponse; diff --git a/src/main/java/com/glxp/api/service/basic/UdiContrastService.java b/src/main/java/com/glxp/api/service/basic/UdiContrastService.java index 6d5e795f..db91c955 100644 --- a/src/main/java/com/glxp/api/service/basic/UdiContrastService.java +++ b/src/main/java/com/glxp/api/service/basic/UdiContrastService.java @@ -18,7 +18,7 @@ import com.glxp.api.entity.basic.UdiProductEntity; import com.glxp.api.entity.basic.UdiRelevanceEntity; import com.glxp.api.entity.thrsys.*; import com.glxp.api.exception.JsonException; -import com.glxp.api.httpClient.NmpaUdiClient; +import com.glxp.api.httpClient.serviceClient.impl.NmpaUdiClientImpl; import com.glxp.api.req.alihealth.AlihealthKytDrugrescodeReqeust; import com.glxp.api.req.alihealth.local.AlihealthThirdAliDrugInsertReqeust; import com.glxp.api.req.basic.UdiCombineRequest; @@ -68,7 +68,7 @@ public class UdiContrastService { @Resource UdiProductService udiProductService; @Resource - NmpaUdiClient udiDlHttpClient; + NmpaUdiClientImpl udiDlHttpClient; @Resource BasicInsMaterialService basicInsMaterialService; diff --git a/src/main/java/com/glxp/api/service/basic/impl/BasicProductsImportLogServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/BasicProductsImportLogServiceImpl.java index a4dfdc38..a080d993 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/BasicProductsImportLogServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/BasicProductsImportLogServiceImpl.java @@ -14,7 +14,7 @@ import com.glxp.api.entity.basic.UdiRelevanceEntity; import com.glxp.api.entity.system.SystemParamConfigEntity; import com.glxp.api.entity.thrsys.ThrProductsEntity; import com.glxp.api.entity.thrsys.ThrSystemEntity; -import com.glxp.api.httpClient.NmpaUdiClient; +import com.glxp.api.httpClient.serviceClient.impl.NmpaUdiClientImpl; import com.glxp.api.req.basic.FilterUdiIpLogRequest; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.basic.UdiRelevanceResponse; @@ -43,7 +43,7 @@ public class BasicProductsImportLogServiceImpl implements BasicProductsImportLog @Resource BasicProductsImportLogDao udiInfoImportLogDao; @Resource - NmpaUdiClient nmpaUdiClient; + NmpaUdiClientImpl nmpaUdiClientImpl; @Resource BasicProductsImportDetailService basicProductsImportDetailService; @Resource @@ -118,7 +118,7 @@ public class BasicProductsImportLogServiceImpl implements BasicProductsImportLog udiInfoEntity = udiProductService.findByNameCode(basicProductsImportDetailEntity.getUdiCode()); List froms = null; if (udiInfoEntity == null) { - froms = nmpaUdiClient.getUdiByDi(basicProductsImportDetailEntity.getUdiCode()); + froms = nmpaUdiClientImpl.getUdiByDi(basicProductsImportDetailEntity.getUdiCode()); if (froms != null && !froms.isEmpty()) { udiInfoEntity = froms.get(0); 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 748bd46f..7bb4b8b9 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 @@ -30,7 +30,7 @@ import com.glxp.api.entity.inv.*; import com.glxp.api.entity.sync.SyncDataBustypeEntity; import com.glxp.api.entity.thrsys.ThrSystemBusApiEntity; import com.glxp.api.entity.thrsys.ThrSystemEntity; -import com.glxp.api.httpClient.HttpOkClient; +import com.glxp.api.httpClient.utils.HttpOkClient; import com.glxp.api.req.inout.FilterOrderRequest; import com.glxp.api.req.inout.FilterUploadOrderRequest; import com.glxp.api.req.inout.OrderEditRequest; diff --git a/src/main/java/com/glxp/api/service/thrsys/ThrCorpsDlService.java b/src/main/java/com/glxp/api/service/thrsys/ThrCorpsDlService.java index 90a72235..e2a061ee 100644 --- a/src/main/java/com/glxp/api/service/thrsys/ThrCorpsDlService.java +++ b/src/main/java/com/glxp/api/service/thrsys/ThrCorpsDlService.java @@ -10,8 +10,8 @@ import com.glxp.api.constant.BasicProcessStatus; import com.glxp.api.constant.Constant; import com.glxp.api.entity.sync.SyncDataSetEntity; import com.glxp.api.entity.thrsys.*; -import com.glxp.api.httpClient.ErpBasicClient; -import com.glxp.api.httpClient.HttpOkClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; +import com.glxp.api.httpClient.utils.HttpOkClient; import com.glxp.api.req.thrsys.*; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.thrsys.ThrCorpsResponse; @@ -330,7 +330,7 @@ public class ThrCorpsDlService { thrUnitMaintainFilterRequest.setErpId(thrCorpExportRequest.getUnitId()); thrUnitMaintainFilterRequest.setPage(page); thrUnitMaintainFilterRequest.setLimit(limit); - BaseResponse> erpCrops = new ErpBasicClient().getErpCrop(thrUnitMaintainFilterRequest); + BaseResponse> erpCrops = erpBasicClient.getErpCrop(thrUnitMaintainFilterRequest); if (erpCrops.getCode() != 20000) { return null; } diff --git a/src/main/java/com/glxp/api/service/thrsys/ThrDataService.java b/src/main/java/com/glxp/api/service/thrsys/ThrDataService.java index ade362d3..ea9d3f3c 100644 --- a/src/main/java/com/glxp/api/service/thrsys/ThrDataService.java +++ b/src/main/java/com/glxp/api/service/thrsys/ThrDataService.java @@ -4,7 +4,7 @@ import cn.hutool.core.bean.BeanUtil; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.entity.thrsys.ThrProductsEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.thrsys.FilterThrProductsRequest; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.thrsys.ThrProductsResponse; diff --git a/src/main/java/com/glxp/api/service/thrsys/ThrInvProductsDlService.java b/src/main/java/com/glxp/api/service/thrsys/ThrInvProductsDlService.java index f27da647..2d78fe54 100644 --- a/src/main/java/com/glxp/api/service/thrsys/ThrInvProductsDlService.java +++ b/src/main/java/com/glxp/api/service/thrsys/ThrInvProductsDlService.java @@ -6,7 +6,7 @@ import com.glxp.api.common.res.BaseResponse; import com.glxp.api.constant.BasicProcessStatus; import com.glxp.api.constant.Constant; import com.glxp.api.entity.thrsys.*; -import com.glxp.api.httpClient.ErpInvClient; +import com.glxp.api.httpClient.serviceClient.impl.ErpInvClientImpl; import com.glxp.api.req.thrsys.*; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.thrsys.ThrInvProductResponse; @@ -39,7 +39,7 @@ public class ThrInvProductsDlService { @Resource ThrInvProductsDetailService thrInvProductsDetailService; @Resource - ErpInvClient erpInvClient; + ErpInvClientImpl erpInvClientImpl; @Resource CustomerService customerServicel; @@ -241,7 +241,7 @@ public class ThrInvProductsDlService { ThrOnhandRequest.setPage(page); ThrOnhandRequest.setLimit(limit); - BaseResponse> responseBaseResponse = erpInvClient.getInvPrdoductResponse(ThrOnhandRequest, productUrl); + BaseResponse> responseBaseResponse = erpInvClientImpl.getInvPrdoductResponse(ThrOnhandRequest, productUrl); if (responseBaseResponse.getCode() != 20000) { thrInvProductsImportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL); @@ -305,7 +305,7 @@ public class ThrInvProductsDlService { ThrOnhandRequest.setPage(page); ThrOnhandRequest.setLimit(limit); - BaseResponse> responseBaseResponse = erpInvClient.getInvPrdoductResponse(ThrOnhandRequest, invPiUrl); + BaseResponse> responseBaseResponse = erpInvClientImpl.getInvPrdoductResponse(ThrOnhandRequest, invPiUrl); if (responseBaseResponse != null && responseBaseResponse.getCode() == 20000) { List ThrInvProductResponses = responseBaseResponse.getData().getList(); if (ThrInvProductResponses != null && ThrInvProductResponses.size() > 0) { diff --git a/src/main/java/com/glxp/api/service/thrsys/ThrManufacturerService.java b/src/main/java/com/glxp/api/service/thrsys/ThrManufacturerService.java index 03ef48ee..9181a070 100644 --- a/src/main/java/com/glxp/api/service/thrsys/ThrManufacturerService.java +++ b/src/main/java/com/glxp/api/service/thrsys/ThrManufacturerService.java @@ -8,7 +8,7 @@ import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.dao.thrsys.ThrManufacturerMapper; import com.glxp.api.entity.thrsys.ThrManufacturerEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.thrsys.FilterBasicProducstRequest; import com.glxp.api.req.thrsys.FilterThrCorpRequest; import com.glxp.api.req.thrsys.ThrManuFilterRequest; diff --git a/src/main/java/com/glxp/api/service/thrsys/ThrOrdersDlService.java b/src/main/java/com/glxp/api/service/thrsys/ThrOrdersDlService.java index 3ea31431..a3dc3d6c 100644 --- a/src/main/java/com/glxp/api/service/thrsys/ThrOrdersDlService.java +++ b/src/main/java/com/glxp/api/service/thrsys/ThrOrdersDlService.java @@ -7,8 +7,8 @@ import com.glxp.api.constant.BasicProcessStatus; import com.glxp.api.constant.Constant; import com.glxp.api.entity.sync.SyncDataSetEntity; import com.glxp.api.entity.thrsys.*; -import com.glxp.api.httpClient.ErpOrderClient; -import com.glxp.api.httpClient.HttpOkClient; +import com.glxp.api.httpClient.serviceClient.impl.ErpOrderClientImpl; +import com.glxp.api.httpClient.utils.HttpOkClient; import com.glxp.api.req.thrsys.FilterThrOrderDetailRequest; import com.glxp.api.req.thrsys.FilterThrOrderRequest; import com.glxp.api.req.thrsys.PostThrOrderRequest; @@ -47,7 +47,7 @@ public class ThrOrdersDlService { ThrOrderImportDetailService thrOrderImportDetailService; @Resource - private ErpOrderClient erpOrderClient; + private ErpOrderClientImpl erpOrderClientImpl; @Resource SyncDataSetService syncDataSetService; @@ -307,7 +307,7 @@ public class ThrOrdersDlService { filterThrOrderRequest.setBillAction(action); FilterThrOrderRequest filterOrderRequest = new FilterThrOrderRequest(); BeanUtils.copyProperties(filterThrOrderRequest, filterOrderRequest); - BaseResponse> responseBaseResponse = erpOrderClient.getThrOrderResponse(filterOrderRequest); + BaseResponse> responseBaseResponse = erpOrderClientImpl.getThrOrderResponse(filterOrderRequest); if (responseBaseResponse != null && responseBaseResponse.getCode() == 20000) { List erpOrderResponses = responseBaseResponse.getData().getList(); if (erpOrderResponses != null && erpOrderResponses.size() > 0) { @@ -374,7 +374,7 @@ public class ThrOrdersDlService { BeanUtils.copyProperties(filterThrOrderRequest, filterOrderRequest); filterOrderRequest.setPage(page); filterOrderRequest.setLimit(limit); - BaseResponse> responseBaseResponse = erpOrderClient.getThrOrderResponse(filterOrderRequest); + BaseResponse> responseBaseResponse = erpOrderClientImpl.getThrOrderResponse(filterOrderRequest); if (responseBaseResponse != null && responseBaseResponse.getCode() == 20000) { List erpOrderResponses = responseBaseResponse.getData().getList(); if (erpOrderResponses != null && erpOrderResponses.size() > 0) { diff --git a/src/main/java/com/glxp/api/service/thrsys/ThrProductsDlService.java b/src/main/java/com/glxp/api/service/thrsys/ThrProductsDlService.java index 15f393fa..e6f18625 100644 --- a/src/main/java/com/glxp/api/service/thrsys/ThrProductsDlService.java +++ b/src/main/java/com/glxp/api/service/thrsys/ThrProductsDlService.java @@ -10,8 +10,8 @@ import com.glxp.api.entity.sync.SyncDataSetEntity; import com.glxp.api.entity.thrsys.ThrProductsEntity; import com.glxp.api.entity.thrsys.ThrProductsExportLogEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; -import com.glxp.api.httpClient.ErpBasicClient; -import com.glxp.api.httpClient.HttpOkClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; +import com.glxp.api.httpClient.utils.HttpOkClient; import com.glxp.api.req.thrsys.FilterThrProductsRequest; import com.glxp.api.req.thrsys.PostThrProductsRequest; import com.glxp.api.req.thrsys.ThrProductsExportRequest; diff --git a/src/main/java/com/glxp/api/service/thrsys/ThrUnitImportService.java b/src/main/java/com/glxp/api/service/thrsys/ThrUnitImportService.java index 4a3f745b..eda57818 100644 --- a/src/main/java/com/glxp/api/service/thrsys/ThrUnitImportService.java +++ b/src/main/java/com/glxp/api/service/thrsys/ThrUnitImportService.java @@ -4,7 +4,7 @@ import cn.hutool.extra.pinyin.PinyinUtil; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.constant.ConstantStatus; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.thrsys.FilterThrCorpRequest; import com.glxp.api.req.thrsys.ThrUnitMaintainFilterRequest; import com.glxp.api.res.PageSimpleResponse; diff --git a/src/main/java/com/glxp/api/service/thrsys/YbDrugService.java b/src/main/java/com/glxp/api/service/thrsys/YbDrugService.java index 4d466ed9..ab9a76db 100644 --- a/src/main/java/com/glxp/api/service/thrsys/YbDrugService.java +++ b/src/main/java/com/glxp/api/service/thrsys/YbDrugService.java @@ -4,7 +4,7 @@ import cn.hutool.core.collection.CollUtil; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.dao.thrsys.YbDrugMapper; import com.glxp.api.entity.thrsys.YbDrug; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.basic.YbDrugDetailFilterRequest; import com.glxp.api.res.PageSimpleResponse; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/glxp/api/service/thrsys/impl/ThrDeptServiceImpl.java b/src/main/java/com/glxp/api/service/thrsys/impl/ThrDeptServiceImpl.java index e37b19ec..ec1f4fa2 100644 --- a/src/main/java/com/glxp/api/service/thrsys/impl/ThrDeptServiceImpl.java +++ b/src/main/java/com/glxp/api/service/thrsys/impl/ThrDeptServiceImpl.java @@ -10,7 +10,7 @@ import com.glxp.api.dao.thrsys.ThrDeptDao; import com.glxp.api.dao.thrsys.ThrInvWarehouseDao; import com.glxp.api.entity.thrsys.ThrDeptEntity; import com.glxp.api.entity.thrsys.ThrInvWarehouseEntity; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.thrsys.FilterThrDeptRequest; import com.glxp.api.req.thrsys.UdiwmsWarehouseRequest; import com.glxp.api.res.PageSimpleResponse; diff --git a/src/main/java/com/glxp/api/service/thrsys/impl/ThrSystemDetailServiceImpl.java b/src/main/java/com/glxp/api/service/thrsys/impl/ThrSystemDetailServiceImpl.java index 61a30c3e..98b642e1 100644 --- a/src/main/java/com/glxp/api/service/thrsys/impl/ThrSystemDetailServiceImpl.java +++ b/src/main/java/com/glxp/api/service/thrsys/impl/ThrSystemDetailServiceImpl.java @@ -5,7 +5,7 @@ import com.glxp.api.common.res.BaseResponse; import com.glxp.api.dao.thrsys.ThrSystemDetailDao; import com.glxp.api.entity.thrsys.ThrSystemEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; -import com.glxp.api.httpClient.ErpBasicClient; +import com.glxp.api.httpClient.serviceClient.ErpBasicClient; import com.glxp.api.req.thrsys.FilterBasicThirdSysDetailRequest; import com.glxp.api.service.thrsys.ThrSystemDetailService; import lombok.extern.slf4j.Slf4j;