|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
package com.glxp.api.http;
|
|
|
|
|
package com.glxp.api.httpClient;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
@ -7,8 +7,8 @@ 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.http.req.UdiwmsBusTypeRequest;
|
|
|
|
|
import com.glxp.api.http.req.UdiwmsUnitRequest;
|
|
|
|
|
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;
|
|
|
|
@ -81,28 +81,7 @@ public class ErpBasicClient {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// //获取单据类型
|
|
|
|
|
// public BaseResponse<PageSimpleResponse<BasicThirdSysBusApiEntity>> getBusTypes(FilterBasicThirdSysDetailRequest filterBasicThirdSysDetailRequest) {
|
|
|
|
|
// BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectByThirdId(filterBasicThirdSysDetailRequest.getThirdSysFk());
|
|
|
|
|
// String url = basicThirdSysEntity.getThridUrl() + "/udiwms/erp/getOrderType";
|
|
|
|
|
// UdiwmsBusTypeRequest udiwmsBusTypeRequest = new UdiwmsBusTypeRequest();
|
|
|
|
|
// udiwmsBusTypeRequest.setThirdSys(filterBasicThirdSysDetailRequest.getThirdSysFk());
|
|
|
|
|
// udiwmsBusTypeRequest.setPage(filterBasicThirdSysDetailRequest.getPage());
|
|
|
|
|
// udiwmsBusTypeRequest.setLimit(filterBasicThirdSysDetailRequest.getLimit());
|
|
|
|
|
// try {
|
|
|
|
|
// String response = httpOkClient.uCloudPost(url, udiwmsBusTypeRequest, basicThirdSysEntity);
|
|
|
|
|
// log.info(response);
|
|
|
|
|
// BaseResponse<PageSimpleResponse<BasicThirdSysBusApiEntity>> udiDlDeviceResponse =
|
|
|
|
|
// JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<BasicThirdSysBusApiEntity>>>() {
|
|
|
|
|
// });
|
|
|
|
|
// return udiDlDeviceResponse;
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
// log.error("获取单据类型异常", e);
|
|
|
|
|
// return ResultVOUtils.error(500, "连接第三方系统接口服务出错!");
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
//查询仓库货位号
|
|
|
|
|
//查询仓库货位号
|
|
|
|
|
public BaseResponse<PageSimpleResponse<UdiwmsWarehouseDetail>> getWarehouse(UdiwmsWarehouseRequest udiwmsWarehouseRequest) {
|
|
|
|
|
ThrSystemEntity basicThirdSysEntity = basicThirdSysService.selectByThirdId(udiwmsWarehouseRequest.getThirdSys());
|
|
|
|
|
String url = basicThirdSysEntity.getThridUrl() + "/udiwms/erp/getWarehouse";
|
|
|
|
@ -119,21 +98,6 @@ public class ErpBasicClient {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//测试连通性
|
|
|
|
|
public BaseResponse testConnection(ThrSystemEntity thrSystemEntity) {
|
|
|
|
|
String response = httpOkClient.uCloudPost(thrSystemEntity.getThridUrl() + "/udispsync/sync/testConnection", "{}");
|
|
|
|
|
log.info(response);
|
|
|
|
|
if (StrUtil.isBlank(response)) {
|
|
|
|
|
return ResultVOUtils.error(500, "连接失败");
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
return JSONObject.parseObject(response, BaseResponse.class);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.info("测试第三方服务连通性失败");
|
|
|
|
|
return ResultVOUtils.error(500, "连接失败");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//测试连通性
|
|
|
|
|
public BaseResponse testThridConnect(ThrSystemEntity thrSystemEntity) {
|
|
|
|
|
String response = httpOkClient.uCloudPost(thrSystemEntity.getThridUrl() + "/udiwms/erp/testThirdSys", "{}");
|
|
|
|
@ -217,6 +181,11 @@ public class ErpBasicClient {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 通过医保编码获取 药品 信息
|
|
|
|
|
* @param ybHcflDetailFilterRequest
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public BaseResponse<PageSimpleResponse<YbDrug>> getYbDrugDetail(YbDrugDetailFilterRequest ybHcflDetailFilterRequest) {
|
|
|
|
|
String url = "https://www.udims.com/UDI_DL_Server_test" + "/udchs/ybDrug/list";
|
|
|
|
|
try {
|