|
|
@@ -194,24 +194,32 @@ public class KwmCooperateManageService {
|
|
|
Date date = new Date();
|
|
|
//判断是否可以解除-销售订单
|
|
|
Boolean order = tradeOrderInfoService.associateEnt(kwmCooperates.get(0).getEntId());
|
|
|
- if (!order)
|
|
|
+ if (order)
|
|
|
{
|
|
|
throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MSG_031);
|
|
|
}
|
|
|
|
|
|
//判断是否可以解除-托运和承运
|
|
|
Boolean sport = transportDubboService.checkLogisticsOrderFinishByEntId(kwmCooperates.get(0).getEntId());
|
|
|
- if (!sport)
|
|
|
+ if (sport)
|
|
|
{
|
|
|
throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MSG_031);
|
|
|
}
|
|
|
Map<OrderEnum, List<String>> ledgerMap = paymentDubboService.checkLedger(kwmCooperates.get(0).getEntId());
|
|
|
- if (!ledgerMap.isEmpty())
|
|
|
+ if (!CollectionUtils.isEmpty(ledgerMap.get(OrderEnum.LOGISTICS)))
|
|
|
+ {
|
|
|
+ throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MSG_031);
|
|
|
+ }
|
|
|
+ if (!CollectionUtils.isEmpty(ledgerMap.get(OrderEnum.TRADE)))
|
|
|
{
|
|
|
throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MSG_031);
|
|
|
}
|
|
|
Map<OrderEnum,List<String>> settlementMap= paymentDubboService.checkSettlement(kwmCooperates.get(0).getEntId());
|
|
|
- if (!settlementMap.isEmpty())
|
|
|
+ if (!CollectionUtils.isEmpty(settlementMap.get(OrderEnum.LOGISTICS)))
|
|
|
+ {
|
|
|
+ throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MSG_031);
|
|
|
+ }
|
|
|
+ if (!CollectionUtils.isEmpty(settlementMap.get(OrderEnum.TRADE)))
|
|
|
{
|
|
|
throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MSG_031);
|
|
|
}
|