|
@@ -2130,23 +2130,6 @@ public class KwoTradeOrderService {
|
|
|
if (unitMap.keySet().size() < 2) {
|
|
if (unitMap.keySet().size() < 2) {
|
|
|
throw new BusinessException("贸易订单企业信息缺失");
|
|
throw new BusinessException("贸易订单企业信息缺失");
|
|
|
}
|
|
}
|
|
|
- TradeContractResDto tradeContractResDto = remoteContractService.queryTradeContract(tradeOrderAuditParam.getTradeContractId(), byOrderId.getGoodsId());
|
|
|
|
|
- if (Objects.isNull(tradeContractResDto)) {
|
|
|
|
|
- throw new BusinessException("贸易合同不存在");
|
|
|
|
|
- }
|
|
|
|
|
- Map<String, Map<String, String>> dict = remoteSystemService.queryDictByType(List.of(DictTypeEnum.UNIT_TYPE.getType()));
|
|
|
|
|
- List<LogisticsEntDtoVO> validContractLog = new ArrayList<>();
|
|
|
|
|
- List<LogisticsEntDto> logisticsContractId = new ArrayList<>();
|
|
|
|
|
- if (Objects.equals(DispatchWayEnums.AUTO_DISPATCH.getCode(), tradeContractResDto.getDispatchWay())) {
|
|
|
|
|
- //自动派单校验: 判断当前有无包含该商品的有效自动派车物流合同
|
|
|
|
|
- validContractLog = checkAutoContractLogOrder(unitMap, byOrderId, tradeContractResDto);
|
|
|
|
|
- } else {
|
|
|
|
|
- logisticsContractId = tradeOrderAuditParam.getLogisticsContractList();
|
|
|
|
|
- if (Objects.equals(tradeContractResDto.getConsignment(), 2) && CollUtil.isEmpty(logisticsContractId)) {
|
|
|
|
|
- throw new BusinessException("卖方托运时,物流合同不能为空");
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
if (Objects.equals(tradeOrderAuditParam.getStatus(), 2)) {
|
|
if (Objects.equals(tradeOrderAuditParam.getStatus(), 2)) {
|
|
|
//钱包退回金额
|
|
//钱包退回金额
|
|
@@ -2170,6 +2153,23 @@ public class KwoTradeOrderService {
|
|
|
kwoTradeOrderTrackService.insert(kwoTradeOrderTrack);
|
|
kwoTradeOrderTrackService.insert(kwoTradeOrderTrack);
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
+ TradeContractResDto tradeContractResDto = remoteContractService.queryTradeContract(tradeOrderAuditParam.getTradeContractId(), byOrderId.getGoodsId());
|
|
|
|
|
+ if (Objects.isNull(tradeContractResDto)) {
|
|
|
|
|
+ throw new BusinessException("贸易合同不存在");
|
|
|
|
|
+ }
|
|
|
|
|
+ Map<String, Map<String, String>> dict = remoteSystemService.queryDictByType(List.of(DictTypeEnum.UNIT_TYPE.getType()));
|
|
|
|
|
+ List<LogisticsEntDtoVO> validContractLog = new ArrayList<>();
|
|
|
|
|
+ List<LogisticsEntDto> logisticsContractId = new ArrayList<>();
|
|
|
|
|
+ if (Objects.equals(DispatchWayEnums.AUTO_DISPATCH.getCode(), tradeContractResDto.getDispatchWay())) {
|
|
|
|
|
+ //自动派单校验: 判断当前有无包含该商品的有效自动派车物流合同
|
|
|
|
|
+ validContractLog = checkAutoContractLogOrder(unitMap, byOrderId, tradeContractResDto);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ logisticsContractId = tradeOrderAuditParam.getLogisticsContractList();
|
|
|
|
|
+ if (Objects.equals(tradeContractResDto.getConsignment(), 2) && CollUtil.isEmpty(logisticsContractId)) {
|
|
|
|
|
+ throw new BusinessException("卖方托运时,物流合同不能为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
KwoTradeOrderTrack kwoTradeOrderTrack = new KwoTradeOrderTrack();
|
|
KwoTradeOrderTrack kwoTradeOrderTrack = new KwoTradeOrderTrack();
|
|
|
kwoTradeOrderTrack.setTOrderId(kwoTradeOrder.getId());
|
|
kwoTradeOrderTrack.setTOrderId(kwoTradeOrder.getId());
|
|
|
kwoTradeOrderTrack.setTOrderNo(kwoTradeOrder.getTOrderNo());
|
|
kwoTradeOrderTrack.setTOrderNo(kwoTradeOrder.getTOrderNo());
|