|
|
@ -232,7 +232,7 @@ public class ZaxyyClient {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public BaseResponse submitOrders(ZaxzyyOrderRequest udiwmsOrderRequest) {
|
|
|
|
public BaseResponse submitOrders(ZaxzyyOrderRequest udiwmsOrderRequest) {
|
|
|
|
if (StrUtil.isBlank(udiwmsOrderRequest.getId())) {
|
|
|
|
if (StrUtil.isEmpty(udiwmsOrderRequest.getId())) {
|
|
|
|
return ResultVOUtils.error(500, "单据ID不能为空!");
|
|
|
|
return ResultVOUtils.error(500, "单据ID不能为空!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//查询单据和详情信息,组装第三方系统接口参数所需数据
|
|
|
|
//查询单据和详情信息,组装第三方系统接口参数所需数据
|
|
|
@ -252,9 +252,7 @@ public class ZaxyyClient {
|
|
|
|
if (StrUtil.isBlank(thirdSysBusApiEntity.getUrl())) {
|
|
|
|
if (StrUtil.isBlank(thirdSysBusApiEntity.getUrl())) {
|
|
|
|
return ResultVOUtils.error(500, "接口未配置,无法提交!");
|
|
|
|
return ResultVOUtils.error(500, "接口未配置,无法提交!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
String thirdId = getThirdId(thirdSysBusApiEntity);
|
|
|
|
String thirdId = getThirdId(thirdSysBusApiEntity);
|
|
|
|
|
|
|
|
|
|
|
|
udiwmsOrderRequest.setThirdSys(thirdId); //第三方系统标识
|
|
|
|
udiwmsOrderRequest.setThirdSys(thirdId); //第三方系统标识
|
|
|
|
udiwmsOrderRequest.setBillType(thirdSysBusApiEntity.getThirdBuyCode());
|
|
|
|
udiwmsOrderRequest.setBillType(thirdSysBusApiEntity.getThirdBuyCode());
|
|
|
|
|
|
|
|
|
|
|
@ -368,6 +366,8 @@ public class ZaxyyClient {
|
|
|
|
zaZyHeareRequest.setMsgBody(JSONUtil.toJsonStr(udiwmsOrderRequest));
|
|
|
|
zaZyHeareRequest.setMsgBody(JSONUtil.toJsonStr(udiwmsOrderRequest));
|
|
|
|
} else if (thirdSysBusApiEntity.getUrl().equals("saveMaterialHight")) {
|
|
|
|
} else if (thirdSysBusApiEntity.getUrl().equals("saveMaterialHight")) {
|
|
|
|
//临床出库
|
|
|
|
//临床出库
|
|
|
|
|
|
|
|
udiwmsOrderRequest.setLocInvCode(udiwmsOrderRequest.getLocStorageCode());
|
|
|
|
|
|
|
|
udiwmsOrderRequest.setLocInvName(udiwmsOrderRequest.getLocStorageName());
|
|
|
|
zaZyHeareRequest.setMsgHeader(getMsgHeader("saveMaterialHight"));
|
|
|
|
zaZyHeareRequest.setMsgHeader(getMsgHeader("saveMaterialHight"));
|
|
|
|
key = "preInOrderSubmit";
|
|
|
|
key = "preInOrderSubmit";
|
|
|
|
|
|
|
|
|
|
|
@ -395,7 +395,7 @@ public class ZaxyyClient {
|
|
|
|
uploadLog.setFromType(ConstantStatus.THIRD_ORDER_UPLOAD);
|
|
|
|
uploadLog.setFromType(ConstantStatus.THIRD_ORDER_UPLOAD);
|
|
|
|
String response = httpClient.postJson(thirdSysConfig.getThirdSysConfig().getThirdSysUrl() + interStr, zaZyHeareRequest, getHeaderArray());
|
|
|
|
String response = httpClient.postJson(thirdSysConfig.getThirdSysConfig().getThirdSysUrl() + interStr, zaZyHeareRequest, getHeaderArray());
|
|
|
|
response = parseErrorMsg(response);
|
|
|
|
response = parseErrorMsg(response);
|
|
|
|
if (StrUtil.isNotBlank(response)){
|
|
|
|
if (StrUtil.isNotBlank(response)) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
BaseResponse baseResponse =
|
|
|
|
BaseResponse baseResponse =
|
|
|
|
JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
|
|
|
|
JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
|
|
|
@ -421,7 +421,7 @@ public class ZaxyyClient {
|
|
|
|
stockOrderUploadLogDao.insert(uploadLog);
|
|
|
|
stockOrderUploadLogDao.insert(uploadLog);
|
|
|
|
return ResultVOUtils.error(500, "提交失败");
|
|
|
|
return ResultVOUtils.error(500, "提交失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
uploadLog.setStatus(3);
|
|
|
|
uploadLog.setStatus(3);
|
|
|
|
uploadLog.setResult("提交失败,调用接口返回为空");
|
|
|
|
uploadLog.setResult("提交失败,调用接口返回为空");
|
|
|
|
stockOrderUploadLogDao.insert(uploadLog);
|
|
|
|
stockOrderUploadLogDao.insert(uploadLog);
|
|
|
|