|
|
@@ -24,6 +24,8 @@ import com.sckw.core.utils.*;
|
|
|
import com.sckw.core.web.constant.HttpStatus;
|
|
|
import com.sckw.core.web.context.LoginUserHolder;
|
|
|
import com.sckw.excel.utils.EasyExcelUtil;
|
|
|
+import com.sckw.order.api.dubbo.TradeOrderInfoService;
|
|
|
+import com.sckw.order.api.model.ContractSignCompletedParam;
|
|
|
import com.sckw.product.api.dubbo.GoodsInfoService;
|
|
|
import com.sckw.product.api.model.KwpGoods;
|
|
|
import com.sckw.system.api.model.dto.res.SysDictResDto;
|
|
|
@@ -69,6 +71,9 @@ public class KwcContractTradeService {
|
|
|
@DubboReference(version = "2.0.0", group = "design", check = false)
|
|
|
private GoodsInfoService goodsInfoService;
|
|
|
|
|
|
+ @DubboReference(version = "2.0.0", group = "design", check = false)
|
|
|
+ private TradeOrderInfoService tradeOrderInfoService;
|
|
|
+
|
|
|
/**
|
|
|
* @return PageResult
|
|
|
* @desc: 分页查询
|
|
|
@@ -80,7 +85,9 @@ public class KwcContractTradeService {
|
|
|
PageHelper.startPage(reqVo.getPage(), reqVo.getPageSize());
|
|
|
QueryListReqDto queryListReqDto = new QueryListReqDto();
|
|
|
BeanUtils.copyProperties(reqVo, queryListReqDto);
|
|
|
- queryListReqDto.setEntId(LoginUserHolder.getEntId());
|
|
|
+ if (Objects.isNull(reqVo.getEntId())) {
|
|
|
+ queryListReqDto.setEntId(LoginUserHolder.getEntId());
|
|
|
+ }
|
|
|
List<QueryListResDto> queryListResDtos = kwcContractTradeMapper.queryList(queryListReqDto);
|
|
|
if (CollectionUtils.isEmpty(queryListResDtos)) {
|
|
|
return PageHelperUtil.getPageResult(new PageInfo<>());
|
|
|
@@ -122,7 +129,8 @@ public class KwcContractTradeService {
|
|
|
}
|
|
|
queryListResVo.setTradingName(DictEnum.getLabel(DictTypeEnum.TRADE_TYPE.getType(), String.valueOf(queryListResDto.getTrading())));
|
|
|
queryListResVo.setStatusName(Objects.requireNonNull(ContractStatusEnum.getName(queryListResDto.getStatus())).getName());
|
|
|
- queryListResVo.setSigningWayName(DictEnum.getLabel(DictTypeEnum.SIGNING_TYPE.getType(), String.valueOf(queryListResDto.getSigningWay())));
|
|
|
+ queryListResVo.setSigningWayName(DictEnum.getLabel(DictTypeEnum.SIGNING_TYPE.getType(), queryListResDto.getSigningWay()));
|
|
|
+ queryListResVo.setSigningWay(queryListResDto.getSigningWay());
|
|
|
queryListResVo.setAmount(queryListResDto.getAmount());
|
|
|
queryListResVo.setPerformedAmount(new BigDecimal("0"));
|
|
|
list.add(queryListResVo);
|
|
|
@@ -456,6 +464,13 @@ public class KwcContractTradeService {
|
|
|
if (kwcContractTradeMapper.updateById(kwcContractTrade) <= 0) {
|
|
|
throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.UPDATE_FAIL);
|
|
|
}
|
|
|
+
|
|
|
+ //完结相关订单
|
|
|
+ ContractSignCompletedParam contractSignCompletedParam = new ContractSignCompletedParam();
|
|
|
+ contractSignCompletedParam.setContractId(kwcContractTrade.getContractPid());
|
|
|
+ contractSignCompletedParam.setUpdateBy(LoginUserHolder.getUserId());
|
|
|
+ contractSignCompletedParam.setUpdateByName(LoginUserHolder.getUserName());
|
|
|
+ tradeOrderInfoService.contractSignCompleted(contractSignCompletedParam);
|
|
|
}
|
|
|
|
|
|
|