|
@@ -17,6 +17,7 @@ import com.sckw.contract.model.dto.res.QueryListResDto;
|
|
|
import com.sckw.contract.model.entity.KwcContractLogistics;
|
|
import com.sckw.contract.model.entity.KwcContractLogistics;
|
|
|
import com.sckw.contract.model.entity.KwcContractLogisticsGoods;
|
|
import com.sckw.contract.model.entity.KwcContractLogisticsGoods;
|
|
|
import com.sckw.contract.model.entity.KwcContractLogisticsUnit;
|
|
import com.sckw.contract.model.entity.KwcContractLogisticsUnit;
|
|
|
|
|
+import com.sckw.contract.model.entity.KwcContractTrade;
|
|
|
import com.sckw.contract.model.vo.req.*;
|
|
import com.sckw.contract.model.vo.req.*;
|
|
|
import com.sckw.contract.model.vo.res.*;
|
|
import com.sckw.contract.model.vo.res.*;
|
|
|
import com.sckw.core.common.enums.enums.DictEnum;
|
|
import com.sckw.core.common.enums.enums.DictEnum;
|
|
@@ -62,6 +63,7 @@ public class KwcContractLogisticsService {
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private KwcContractLogisticsUnitService kwcContractLogisticsUnitService;
|
|
private KwcContractLogisticsUnitService kwcContractLogisticsUnitService;
|
|
|
|
|
+
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private RemoteContractServiceImpl remoteContractService;
|
|
private RemoteContractServiceImpl remoteContractService;
|
|
|
|
|
|
|
@@ -152,7 +154,9 @@ public class KwcContractLogisticsService {
|
|
|
throw new SystemException(HttpStatus.QUERY_FAIL_CODE, HttpStatus.CONTRACT_NOT_EXISTS);
|
|
throw new SystemException(HttpStatus.QUERY_FAIL_CODE, HttpStatus.CONTRACT_NOT_EXISTS);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- addCheckedContract(reqVo);
|
|
|
|
|
|
|
+ //补充合同直接
|
|
|
|
|
+ submit(reqVo);
|
|
|
|
|
+// addCheckedContract(reqVo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -174,6 +178,10 @@ public class KwcContractLogisticsService {
|
|
|
|
|
|
|
|
private ContractLogisticsDetailResVo buildContractLogisticsDetailResVo(KwcContractLogistics kwcContractLogistics) {
|
|
private ContractLogisticsDetailResVo buildContractLogisticsDetailResVo(KwcContractLogistics kwcContractLogistics) {
|
|
|
ContractLogisticsDetailResVo contractLogisticsDetailResVo = new ContractLogisticsDetailResVo();
|
|
ContractLogisticsDetailResVo contractLogisticsDetailResVo = new ContractLogisticsDetailResVo();
|
|
|
|
|
+ contractLogisticsDetailResVo.setId(kwcContractLogistics.getId());
|
|
|
|
|
+ contractLogisticsDetailResVo.setRemark(kwcContractLogistics.getRemark());
|
|
|
|
|
+ contractLogisticsDetailResVo.setStatus(kwcContractLogistics.getStatus());
|
|
|
|
|
+ contractLogisticsDetailResVo.setStatusName(ContractStatusEnum.getName(kwcContractLogistics.getStatus()).getName());
|
|
|
//基础信息
|
|
//基础信息
|
|
|
List<KwcContractLogisticsUnit> kwcContractLogisticsUnitList = kwcContractLogisticsUnitService.queryByContractId(kwcContractLogistics.getId());
|
|
List<KwcContractLogisticsUnit> kwcContractLogisticsUnitList = kwcContractLogisticsUnitService.queryByContractId(kwcContractLogistics.getId());
|
|
|
if (CollectionUtils.isNotEmpty(kwcContractLogisticsUnitList)) {
|
|
if (CollectionUtils.isNotEmpty(kwcContractLogisticsUnitList)) {
|
|
@@ -182,29 +190,29 @@ public class KwcContractLogisticsService {
|
|
|
if (kwcContractLogisticsUnit.getUnitType().equals(CooperateTypeEnum.CONSIGN.getCode())) {
|
|
if (kwcContractLogisticsUnit.getUnitType().equals(CooperateTypeEnum.CONSIGN.getCode())) {
|
|
|
logisticsBaseInfoResVo.setCheckedEntName(kwcContractLogisticsUnit.getFirmName());
|
|
logisticsBaseInfoResVo.setCheckedEntName(kwcContractLogisticsUnit.getFirmName());
|
|
|
logisticsBaseInfoResVo.setCheckedPhone(kwcContractLogisticsUnit.getSignPhone());
|
|
logisticsBaseInfoResVo.setCheckedPhone(kwcContractLogisticsUnit.getSignPhone());
|
|
|
|
|
+ logisticsBaseInfoResVo.setCheckedContacts(kwcContractLogisticsUnit.getContacts());
|
|
|
logisticsBaseInfoResVo.setCheckedEntId(kwcContractLogisticsUnit.getEntId());
|
|
logisticsBaseInfoResVo.setCheckedEntId(kwcContractLogisticsUnit.getEntId());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (kwcContractLogisticsUnit.getUnitType().equals(CooperateTypeEnum.CARRIAGE.getCode())) {
|
|
if (kwcContractLogisticsUnit.getUnitType().equals(CooperateTypeEnum.CARRIAGE.getCode())) {
|
|
|
logisticsBaseInfoResVo.setCarrierEntName(kwcContractLogisticsUnit.getFirmName());
|
|
logisticsBaseInfoResVo.setCarrierEntName(kwcContractLogisticsUnit.getFirmName());
|
|
|
logisticsBaseInfoResVo.setCarrierPhone(kwcContractLogisticsUnit.getSignPhone());
|
|
logisticsBaseInfoResVo.setCarrierPhone(kwcContractLogisticsUnit.getSignPhone());
|
|
|
|
|
+ logisticsBaseInfoResVo.setCarrierContacts(kwcContractLogisticsUnit.getContacts());
|
|
|
logisticsBaseInfoResVo.setCarrierEntId(kwcContractLogisticsUnit.getEntId());
|
|
logisticsBaseInfoResVo.setCarrierEntId(kwcContractLogisticsUnit.getEntId());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
logisticsBaseInfoResVo.setChargingName(DictEnum.getLabel(DictTypeEnum.CHARGING_TYPE.getType(), String.valueOf(kwcContractLogistics.getCharging())));
|
|
logisticsBaseInfoResVo.setChargingName(DictEnum.getLabel(DictTypeEnum.CHARGING_TYPE.getType(), String.valueOf(kwcContractLogistics.getCharging())));
|
|
|
- logisticsBaseInfoResVo.setCharging(String.valueOf(kwcContractLogistics.getCharging()));
|
|
|
|
|
|
|
+ logisticsBaseInfoResVo.setCharging(StringUtils.objectStr(kwcContractLogistics.getCharging()));
|
|
|
logisticsBaseInfoResVo.setContractCode(kwcContractLogistics.getContractNo());
|
|
logisticsBaseInfoResVo.setContractCode(kwcContractLogistics.getContractNo());
|
|
|
logisticsBaseInfoResVo.setContractName(kwcContractLogistics.getName());
|
|
logisticsBaseInfoResVo.setContractName(kwcContractLogistics.getName());
|
|
|
logisticsBaseInfoResVo.setEndTime(Objects.isNull(kwcContractLogistics.getEndTime()) ? Global.EMPTY_STRING : DateUtils.format(kwcContractLogistics.getEndTime()));
|
|
logisticsBaseInfoResVo.setEndTime(Objects.isNull(kwcContractLogistics.getEndTime()) ? Global.EMPTY_STRING : DateUtils.format(kwcContractLogistics.getEndTime()));
|
|
|
logisticsBaseInfoResVo.setSigningWayName(DictEnum.getLabel(DictTypeEnum.SIGNING_WAY.getType(), String.valueOf(kwcContractLogistics.getSigningWay())));
|
|
logisticsBaseInfoResVo.setSigningWayName(DictEnum.getLabel(DictTypeEnum.SIGNING_WAY.getType(), String.valueOf(kwcContractLogistics.getSigningWay())));
|
|
|
- logisticsBaseInfoResVo.setSigningWay(String.valueOf(kwcContractLogistics.getSigningWay()));
|
|
|
|
|
|
|
+ logisticsBaseInfoResVo.setSigningWay(StringUtils.objectStr(kwcContractLogistics.getSigningWay()));
|
|
|
logisticsBaseInfoResVo.setStartTime(kwcContractLogistics.getStartTime());
|
|
logisticsBaseInfoResVo.setStartTime(kwcContractLogistics.getStartTime());
|
|
|
logisticsBaseInfoResVo.setAmount(kwcContractLogistics.getAmount());
|
|
logisticsBaseInfoResVo.setAmount(kwcContractLogistics.getAmount());
|
|
|
logisticsBaseInfoResVo.setPerformedAmount(kwcContractLogistics.getPerformedAmount());
|
|
logisticsBaseInfoResVo.setPerformedAmount(kwcContractLogistics.getPerformedAmount());
|
|
|
contractLogisticsDetailResVo.setBaseInfo(logisticsBaseInfoResVo);
|
|
contractLogisticsDetailResVo.setBaseInfo(logisticsBaseInfoResVo);
|
|
|
- contractLogisticsDetailResVo.setId(kwcContractLogistics.getId());
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//标的信息
|
|
//标的信息
|
|
@@ -235,6 +243,7 @@ public class KwcContractLogisticsService {
|
|
|
logisticsGoodsInfoResVo.setLoss(kwcContractLogisticsGoods.getLoss());
|
|
logisticsGoodsInfoResVo.setLoss(kwcContractLogisticsGoods.getLoss());
|
|
|
logisticsGoodsInfoResVo.setLossUnit(kwcContractLogisticsGoods.getLossUnit());
|
|
logisticsGoodsInfoResVo.setLossUnit(kwcContractLogisticsGoods.getLossUnit());
|
|
|
|
|
|
|
|
|
|
+
|
|
|
SysDictResDto unitType = stringSysDictResDtoMap.get(DictTypeEnum.UNIT_TYPE.getType() + Global.POUND + kwcContractLogisticsGoods.getUnit());
|
|
SysDictResDto unitType = stringSysDictResDtoMap.get(DictTypeEnum.UNIT_TYPE.getType() + Global.POUND + kwcContractLogisticsGoods.getUnit());
|
|
|
if (Objects.nonNull(unitType)) {
|
|
if (Objects.nonNull(unitType)) {
|
|
|
logisticsGoodsInfoResVo.setUnitName(unitType.getLabel());
|
|
logisticsGoodsInfoResVo.setUnitName(unitType.getLabel());
|
|
@@ -266,6 +275,9 @@ public class KwcContractLogisticsService {
|
|
|
fileList.add(kwcContractLogistics.getSigningUrl());
|
|
fileList.add(kwcContractLogistics.getSigningUrl());
|
|
|
contractLogisticsDetailResVo.setContractFile(fileList.stream().filter(StringUtils::isNotBlank).toList());
|
|
contractLogisticsDetailResVo.setContractFile(fileList.stream().filter(StringUtils::isNotBlank).toList());
|
|
|
|
|
|
|
|
|
|
+ //审批流程信息
|
|
|
|
|
+ contractLogisticsDetailResVo.setTrackInfo(kwcContractLogisticsTrackService.queryContractTrackByContractId(kwcContractLogistics.getId()));
|
|
|
|
|
+
|
|
|
//补充合同
|
|
//补充合同
|
|
|
List<KwcContractLogistics> supplementList = getSupplementList(kwcContractLogistics);
|
|
List<KwcContractLogistics> supplementList = getSupplementList(kwcContractLogistics);
|
|
|
if (CollectionUtils.isNotEmpty(supplementList)) {
|
|
if (CollectionUtils.isNotEmpty(supplementList)) {
|
|
@@ -275,7 +287,6 @@ public class KwcContractLogisticsService {
|
|
|
}
|
|
}
|
|
|
contractLogisticsDetailResVo.setChild(child);
|
|
contractLogisticsDetailResVo.setChild(child);
|
|
|
}
|
|
}
|
|
|
- contractLogisticsDetailResVo.setRemark(kwcContractLogistics.getRemark());
|
|
|
|
|
return contractLogisticsDetailResVo;
|
|
return contractLogisticsDetailResVo;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -284,7 +295,7 @@ public class KwcContractLogisticsService {
|
|
|
LambdaQueryWrapper<KwcContractLogistics> wrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<KwcContractLogistics> wrapper = new LambdaQueryWrapper<>();
|
|
|
wrapper.eq(KwcContractLogistics::getContractPid, kwcContractLogistics.getId());
|
|
wrapper.eq(KwcContractLogistics::getContractPid, kwcContractLogistics.getId());
|
|
|
wrapper.eq(KwcContractLogistics::getDelFlag, Global.NO);
|
|
wrapper.eq(KwcContractLogistics::getDelFlag, Global.NO);
|
|
|
- wrapper.eq(KwcContractLogistics::getStatus, Global.NO);
|
|
|
|
|
|
|
+// wrapper.eq(KwcContractLogistics::getStatus, Global.NO);
|
|
|
return kwcContractLogisticsMapper.selectList(wrapper);
|
|
return kwcContractLogisticsMapper.selectList(wrapper);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -467,8 +478,11 @@ public class KwcContractLogisticsService {
|
|
|
for (QueryListResDto queryListResDto : queryListResDtos) {
|
|
for (QueryListResDto queryListResDto : queryListResDtos) {
|
|
|
QueryListResVo queryListResVo = new QueryListResVo();
|
|
QueryListResVo queryListResVo = new QueryListResVo();
|
|
|
BeanUtils.copyProperties(queryListResDto, queryListResVo);
|
|
BeanUtils.copyProperties(queryListResDto, queryListResVo);
|
|
|
- queryListResVo.setCheckedEntName(queryListResDto.getUnitType().compareTo(EntTypeEnum.LOGISTICS3.getCode()) == 0 ? queryListResDto.getEntName() : queryListResDto.getTargetEntName());
|
|
|
|
|
- queryListResVo.setCarrierEntName(queryListResDto.getUnitType().compareTo(EntTypeEnum.LOGISTICS3.getCode()) == 0 ? queryListResDto.getTargetEntName() : queryListResDto.getEntName());
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (Objects.nonNull(queryListResDto.getUnitType())) {
|
|
|
|
|
+ queryListResVo.setCheckedEntName(queryListResDto.getUnitType().compareTo(EntTypeEnum.LOGISTICS3.getCode()) == 0 ? queryListResDto.getEntName() : queryListResDto.getTargetEntName());
|
|
|
|
|
+ queryListResVo.setCarrierEntName(queryListResDto.getUnitType().compareTo(EntTypeEnum.LOGISTICS3.getCode()) == 0 ? queryListResDto.getTargetEntName() : queryListResDto.getEntName());
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
UserCacheResDto userCacheResDto = longUserCacheResDtoMap.get(queryListResDto.getInitiateBy());
|
|
UserCacheResDto userCacheResDto = longUserCacheResDtoMap.get(queryListResDto.getInitiateBy());
|
|
|
if (Objects.nonNull(userCacheResDto)) {
|
|
if (Objects.nonNull(userCacheResDto)) {
|