|
|
|
@ -41,6 +41,8 @@ import com.glxp.mipsdl.admin.req.phxyy.PhProductRequest;
|
|
|
|
|
import com.glxp.mipsdl.admin.req.phxyy.PhUnitRequest;
|
|
|
|
|
import com.glxp.mipsdl.admin.req.phxyy.PhWarehouseRequest;
|
|
|
|
|
import com.glxp.mipsdl.admin.req.thrsys.FilterThrInvWarehouseRequest;
|
|
|
|
|
import com.glxp.mipsdl.admin.res.system.PageSimpleResponse;
|
|
|
|
|
import com.glxp.mipsdl.admin.res.system.UdiwmsWarehouseDetail;
|
|
|
|
|
import com.glxp.mipsdl.admin.util.DateUtil;
|
|
|
|
|
import com.glxp.mipsdl.admin.util.HttpClient;
|
|
|
|
|
import com.glxp.mipsdl.common.res.BaseResponse;
|
|
|
|
@ -378,14 +380,6 @@ public class ZaxyyClient {
|
|
|
|
|
|
|
|
|
|
BasicThirdSysDetailEntity basicThirdSysDetailEntity = basicThirdSysDetailDao.selectByOrderType(key, thirdSysConfig.getThirdSysConfig().getThirdId(), udiwmsOrderRequest.getBillType());
|
|
|
|
|
|
|
|
|
|
String interStr = "";
|
|
|
|
|
if (StrUtil.isNotEmpty(basicThirdSysDetailEntity.getOrderTypeUrl())) {
|
|
|
|
|
interStr = basicThirdSysDetailEntity.getOrderTypeUrl();
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
interStr = basicThirdSysDetailEntity.getValue();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//记录日志
|
|
|
|
|
StockOrderUploadLogEntity uploadLog = new StockOrderUploadLogEntity();
|
|
|
|
|
uploadLog.setBillDate(DateUtil.parseDate(udiwmsOrderRequest.getBillDate()));
|
|
|
|
@ -393,7 +387,7 @@ public class ZaxyyClient {
|
|
|
|
|
uploadLog.setSubmitTime(new Date());
|
|
|
|
|
uploadLog.setBillNo(udiwmsOrderRequest.getBillNo());
|
|
|
|
|
uploadLog.setFromType(ConstantStatus.THIRD_ORDER_UPLOAD);
|
|
|
|
|
String response = httpClient.postJson(thirdSysConfig.getThirdSysConfig().getThirdSysUrl() + interStr, zaZyHeareRequest, getHeaderArray());
|
|
|
|
|
String response = httpClient.postJson(thirdSysConfig.getThirdSysConfig().getThirdSysUrl(), zaZyHeareRequest, getHeaderArray());
|
|
|
|
|
response = parseErrorMsg(response);
|
|
|
|
|
if (StrUtil.isNotBlank(response)) {
|
|
|
|
|
try {
|
|
|
|
@ -483,12 +477,33 @@ public class ZaxyyClient {
|
|
|
|
|
String response = httpClient.postJson(thirdSysConfig.getThirdSysConfig().getThirdSysUrl() + basicThirdSysDetailEntity.getValue(), zaZyHeareRequest, getHeaderArray());
|
|
|
|
|
response = parseErrorMsg(response);
|
|
|
|
|
try {
|
|
|
|
|
BaseResponse baseResponse =
|
|
|
|
|
BaseResponse<PageSimpleResponse<UdiwmsWarehouseDetail>> baseResponse =
|
|
|
|
|
JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
|
|
|
|
|
});
|
|
|
|
|
if (baseResponse.getCode() == 20000) {
|
|
|
|
|
List<UdiwmsWarehouseDetail> udiwmsWarehouseDetails = baseResponse.getData().getList();
|
|
|
|
|
UdiwmsWarehouseDetail resultData = new UdiwmsWarehouseDetail();
|
|
|
|
|
if (CollUtil.isNotEmpty(udiwmsWarehouseDetails)) {
|
|
|
|
|
resultData.setCode("7071568");
|
|
|
|
|
resultData.setCode("总仓库");
|
|
|
|
|
List<UdiwmsWarehouseDetail.SubWarehouse> subWarehouseList = new ArrayList<>();
|
|
|
|
|
for (UdiwmsWarehouseDetail udiwmsWarehouseDetail : udiwmsWarehouseDetails) {
|
|
|
|
|
UdiwmsWarehouseDetail.SubWarehouse subWarehouse = new UdiwmsWarehouseDetail.SubWarehouse();
|
|
|
|
|
subWarehouse.setCode(udiwmsWarehouseDetail.getCode());
|
|
|
|
|
subWarehouse.setName(udiwmsWarehouseDetail.getName());
|
|
|
|
|
subWarehouseList.add(subWarehouse);
|
|
|
|
|
}
|
|
|
|
|
resultData.setSubWarehouses(subWarehouseList);
|
|
|
|
|
}
|
|
|
|
|
List<UdiwmsWarehouseDetail> resultList = new ArrayList<>();
|
|
|
|
|
resultList.add(resultData);
|
|
|
|
|
PageSimpleResponse<UdiwmsWarehouseDetail> pageSimpleResponse = new PageSimpleResponse<>();
|
|
|
|
|
pageSimpleResponse.setTotal(1L);
|
|
|
|
|
pageSimpleResponse.setList(resultList);
|
|
|
|
|
return ResultVOUtils.success(pageSimpleResponse);
|
|
|
|
|
}
|
|
|
|
|
return baseResponse;
|
|
|
|
|
} catch (
|
|
|
|
|
Exception e) {
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
return ResultVOUtils.error(500, "网络错误,或远程服务器异常无法返回正确结果" + "(" + response + ")");
|
|
|
|
|