|
|
@@ -17,6 +17,7 @@ import com.sckw.core.utils.CollectionUtils;
|
|
|
import com.sckw.core.utils.StringUtils;
|
|
|
import com.sckw.core.web.constant.HttpStatus;
|
|
|
import com.sckw.core.web.context.LoginUserHolder;
|
|
|
+import com.sckw.core.web.response.HttpResult;
|
|
|
import com.sckw.excel.utils.EasyExcelUtil;
|
|
|
import com.sckw.manage.dao.KwmCooperateMapper;
|
|
|
import com.sckw.manage.dao.KwmCooperateTypeMapper;
|
|
|
@@ -40,7 +41,7 @@ import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
-
|
|
|
+import org.springframework.util.Assert;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -190,19 +191,20 @@ public class KwmCooperateManageService {
|
|
|
Long userId = LoginUserHolder.getUserId();
|
|
|
Date date = new Date();
|
|
|
//判断是否可以解除-销售订单
|
|
|
- Boolean order = tradeOrderInfoService.associateEnt(kwmCooperates.get(0).getEntId());
|
|
|
+ Boolean order = tradeOrderInfoService.associateEnt(kwmCooperates.get(0).getInviteeEntId(),kwmCooperates.get(0).getInviteeEntId());
|
|
|
if (order)
|
|
|
{
|
|
|
throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MSG_031);
|
|
|
}
|
|
|
|
|
|
//判断是否可以解除-托运和承运
|
|
|
- Boolean sport = transportDubboService.checkLogisticsOrderFinishByEntId(kwmCooperates.get(0).getEntId());
|
|
|
- if (sport)
|
|
|
+ HttpResult response = transportDubboService.checkLogisticsOrderIsFinishByEntId(kwmCooperates.get(0).getInviteeEntId(),kwmCooperates.get(0).getInviteeEntId());
|
|
|
+ Object receivedResult = response.getData();
|
|
|
+ if (receivedResult != null)
|
|
|
{
|
|
|
throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MSG_031);
|
|
|
}
|
|
|
- Map<OrderEnum, List<String>> ledgerMap = paymentDubboService.checkLedger(kwmCooperates.get(0).getEntId());
|
|
|
+ Map<OrderEnum, List<String>> ledgerMap = paymentDubboService.checkLedger(kwmCooperates.get(0).getInviteeEntId(),kwmCooperates.get(0).getInviteeEntId());
|
|
|
if (!CollectionUtils.isEmpty(ledgerMap.get(OrderEnum.LOGISTICS)))
|
|
|
{
|
|
|
throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MSG_031);
|
|
|
@@ -211,7 +213,7 @@ public class KwmCooperateManageService {
|
|
|
{
|
|
|
throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MSG_031);
|
|
|
}
|
|
|
- Map<OrderEnum,List<String>> settlementMap= paymentDubboService.checkSettlement(kwmCooperates.get(0).getEntId());
|
|
|
+ Map<OrderEnum,List<String>> settlementMap= paymentDubboService.checkSettlement(kwmCooperates.get(0).getInviteeEntId(),kwmCooperates.get(0).getInviteeEntId());
|
|
|
if (!CollectionUtils.isEmpty(settlementMap.get(OrderEnum.LOGISTICS)))
|
|
|
{
|
|
|
throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MSG_031);
|