|
|
|
@ -453,9 +453,6 @@ public class CtqyyClient extends CommonHttpClient {
|
|
|
|
|
zaxzyyOrderRequest.setBillDate(DateUtil.formatDateTime(orderEntity.getCreateTime()));
|
|
|
|
|
//查询对应的第三方单据类型
|
|
|
|
|
ThrSystemBusApiEntity thrSystemBusApiEntity = thrSystemBusApiDao.selectOne(new QueryWrapper<ThrSystemBusApiEntity>().eq("code", udiwmsOrderRequest.getBillType()));
|
|
|
|
|
if (StrUtil.isBlank(thrSystemBusApiEntity.getUrl())) {
|
|
|
|
|
// return ResultVOUtils.error(500, "接口未配置,无法提交!");
|
|
|
|
|
}
|
|
|
|
|
zaxzyyOrderRequest.setThirdSys(getUserName(orderEntity));
|
|
|
|
|
zaxzyyOrderRequest.setBillType(thrSystemBusApiEntity.getThirdBuyCode());
|
|
|
|
|
zaxzyyOrderRequest.setBillFlag("1");
|
|
|
|
@ -569,25 +566,34 @@ public class CtqyyClient extends CommonHttpClient {
|
|
|
|
|
|
|
|
|
|
//提交到第三方系统
|
|
|
|
|
if (thrSystemBusApiEntity.getUrl().equals("saveMasterialInput")) {
|
|
|
|
|
//采购入库单据
|
|
|
|
|
// //采购入库单据
|
|
|
|
|
// if (vailHightMaterial(detailBizEntities.get(0))) {
|
|
|
|
|
// zaZyRequest.setMsgHeader(getMsgHeader("saveMaterialHight"));
|
|
|
|
|
// UdiwmsPreInOrderRequest udiwmsPreInOrderRequest = submitPreInOrderToThirdSys(zaxzyyOrderRequest, orderEntity);
|
|
|
|
|
// zaZyRequest.setMsgBody(JSONUtil.toJsonStr(udiwmsPreInOrderRequest));
|
|
|
|
|
// } else {
|
|
|
|
|
// zaZyRequest.setMsgHeader(getMsgHeader("saveMasterialInput"));
|
|
|
|
|
// zaZyRequest.setMsgBody(JSONUtil.toJsonStr(zaxzyyOrderRequest));
|
|
|
|
|
// }
|
|
|
|
|
zaZyRequest.setMsgHeader(getMsgHeader("saveMasterialInput"));
|
|
|
|
|
zaZyRequest.setMsgBody(JSONUtil.toJsonStr(zaxzyyOrderRequest));
|
|
|
|
|
return submitOrder(orderEntity, zaZyRequest);
|
|
|
|
|
} else if (thrSystemBusApiEntity.getUrl().equals("saveMaterialHight")) {
|
|
|
|
|
|
|
|
|
|
if (vailHightMaterial(detailBizEntities.get(0))) {
|
|
|
|
|
zaZyRequest.setMsgHeader(getMsgHeader("saveMaterialHight"));
|
|
|
|
|
UdiwmsPreInOrderRequest udiwmsPreInOrderRequest = submitPreInOrderToThirdSys(zaxzyyOrderRequest, orderEntity);
|
|
|
|
|
zaZyRequest.setMsgBody(JSONUtil.toJsonStr(udiwmsPreInOrderRequest));
|
|
|
|
|
} else {
|
|
|
|
|
zaZyRequest.setMsgHeader(getMsgHeader("saveMasterialInput"));
|
|
|
|
|
zaZyRequest.setMsgBody(JSONUtil.toJsonStr(zaxzyyOrderRequest));
|
|
|
|
|
}
|
|
|
|
|
// 1.先提交到物资
|
|
|
|
|
zaZyRequest.setMsgHeader(getMsgHeader("saveMasterialInput"));
|
|
|
|
|
zaZyRequest.setMsgBody(JSONUtil.toJsonStr(zaxzyyOrderRequest));
|
|
|
|
|
submitOrder(orderEntity, zaZyRequest);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (thrSystemBusApiEntity.getUrl().equals("saveMaterialHight")) {
|
|
|
|
|
//2.提交到预备货
|
|
|
|
|
zaZyRequest.setMsgHeader(getMsgHeader("saveMaterialHight"));
|
|
|
|
|
UdiwmsPreInOrderRequest udiwmsPreInOrderRequest = submitPreInOrderToThirdSys(zaxzyyOrderRequest, orderEntity);
|
|
|
|
|
zaZyRequest.setMsgBody(JSONUtil.toJsonStr(udiwmsPreInOrderRequest));
|
|
|
|
|
return submitOrder(orderEntity, zaZyRequest);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return submitOrder(orderEntity, zaZyRequest);
|
|
|
|
|
return ResultVOUtils.error(500, "提交失败!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|