|
|
@@ -2205,10 +2205,10 @@ public class KwoTradeOrderService {
|
|
|
kwoTradeOrderUnitService.insertBatch(list);
|
|
|
|
|
|
//扣减库存
|
|
|
- HttpResult updateResult = goodsInfoService.updateGoodsAmount(tradeOrderParam.getGoodsId(), tradeOrderParam.getAmount());
|
|
|
- if (!Objects.equals(HttpStatus.SUCCESS_CODE, updateResult.getCode())) {
|
|
|
- throw new BusinessException(updateResult.getMsg());
|
|
|
- }
|
|
|
+// HttpResult updateResult = goodsInfoService.updateGoodsAmount(tradeOrderParam.getGoodsId(), tradeOrderParam.getAmount());
|
|
|
+// if (!Objects.equals(HttpStatus.SUCCESS_CODE, updateResult.getCode())) {
|
|
|
+// throw new BusinessException(updateResult.getMsg());
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
private TradeContractResDto checkPara(TradeOrderParam tradeOrderParam, KwoTradeOrder order, KwpGoods goodsById) {
|
|
|
@@ -2284,8 +2284,10 @@ public class KwoTradeOrderService {
|
|
|
if (unitMap.keySet().size() < 2) {
|
|
|
throw new BusinessException("贸易订单企业信息缺失");
|
|
|
}
|
|
|
- TradeContractResDto tradeContractResDto = remoteContractService.queryTradeContract(tradeOrderAuditParam.getTradeContractId(), tradeOrderAuditParam.getGoodsId());
|
|
|
-
|
|
|
+ TradeContractResDto tradeContractResDto = remoteContractService.queryTradeContract(tradeOrderAuditParam.getTradeContractId(), byOrderId.getGoodsId());
|
|
|
+ if (Objects.isNull(tradeContractResDto)) {
|
|
|
+ throw new BusinessException("贸易合同不存在");
|
|
|
+ }
|
|
|
List<LogisticsEntDto> logisticsContractId = tradeOrderAuditParam.getLogisticsContractList();
|
|
|
if (Objects.equals(tradeContractResDto.getConsignment(), 2) && CollUtil.isEmpty(logisticsContractId)) {
|
|
|
throw new BusinessException("卖方托运时,物流合同不能为空");
|
|
|
@@ -2454,7 +2456,8 @@ public class KwoTradeOrderService {
|
|
|
addLogisticOrderParam.setUnloadCityName(unloadAddress.getCityName());
|
|
|
addLogisticOrderParam.setUnLoadDetailAddress(unloadAddress.getDetailAddress());
|
|
|
}
|
|
|
-
|
|
|
+ addLogisticOrderParam.setEntId(LoginUserHolder.getEntId());
|
|
|
+ addLogisticOrderParam.setUserId(LoginUserHolder.getUserId());
|
|
|
log.info("创建物流订单:{}", JSONObject.toJSONString(addLogisticOrderParam));
|
|
|
transportRemoteService.addLogisticOrder(addLogisticOrderParam);
|
|
|
return true;
|