|
|
@@ -2130,24 +2130,6 @@ public class KwoTradeOrderService {
|
|
|
if (unitMap.keySet().size() < 2) {
|
|
|
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())
|
|
|
- && Objects.equals(tradeOrderAuditParam.getStatus(), Global.NUMERICAL_ONE)) {
|
|
|
- //自动派单校验: 判断当前有无包含该商品的有效自动派车物流合同
|
|
|
- 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)) {
|
|
|
//钱包退回金额
|
|
|
@@ -2178,7 +2160,8 @@ public class KwoTradeOrderService {
|
|
|
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())) {
|
|
|
+ if (Objects.equals(DispatchWayEnums.AUTO_DISPATCH.getCode(), tradeContractResDto.getDispatchWay())
|
|
|
+ && Objects.equals(tradeOrderAuditParam.getStatus(), Global.NUMERICAL_ONE)) {
|
|
|
//自动派单校验: 判断当前有无包含该商品的有效自动派车物流合同
|
|
|
validContractLog = checkAutoContractLogOrder(unitMap, byOrderId, tradeContractResDto);
|
|
|
} else {
|