|
|
@@ -3193,8 +3193,7 @@ public class KwtAcceptCarriageOrderService {
|
|
|
throw new BusinessException("物流信息不能为空");
|
|
|
}
|
|
|
List<Long> contractIds = logisticInfo.stream()
|
|
|
- .filter(x-> org.apache.commons.lang3.StringUtils.isNotBlank(x.getContractId()))
|
|
|
- .map(x->Long.parseLong(x.getContractId()))
|
|
|
+ .map(AddLogisticOrderDTO.LogisticInfo::getContractId)
|
|
|
.collect(Collectors.toList());
|
|
|
Map<Long, ContractCommonInfoResDto> longContractCommonInfoResDtoMap = remoteContractService.queryContractBaseInfo(contractIds);
|
|
|
if (MapUtils.isEmpty(longContractCommonInfoResDtoMap)) {
|
|
|
@@ -3239,16 +3238,16 @@ public class KwtAcceptCarriageOrderService {
|
|
|
consignUnit.setId(new IdWorker(NumberConstant.ONE).nextId());
|
|
|
consignUnit.setLOrderId(lOrderId);
|
|
|
consignUnit.setUnitType(NumberConstant.ONE);
|
|
|
- consignUnit.setEntId(Long.parseLong(orderDTO.getConsignCompanyId()));
|
|
|
+ consignUnit.setEntId(orderDTO.getConsignCompanyId());
|
|
|
List<Long> entIds = new ArrayList<>();
|
|
|
- entIds.add(Long.parseLong(orderDTO.getConsignCompanyId()));
|
|
|
- entIds.add(Long.parseLong(x.getAcceptCompanyId()));
|
|
|
+ entIds.add(orderDTO.getConsignCompanyId());
|
|
|
+ entIds.add(x.getAcceptCompanyId());
|
|
|
Map<Long, EntCacheResDto> entMap = remoteSystemService.queryEntTreeByIds(entIds);
|
|
|
- EntCacheResDto ent = entMap.get(Long.parseLong(orderDTO.getConsignCompanyId()));
|
|
|
+ EntCacheResDto ent = entMap.get(orderDTO.getConsignCompanyId());
|
|
|
if (Objects.isNull(ent)) {
|
|
|
throw new BusinessException("企业:" + orderDTO.getConsignCompany() + "的一级企业信息不存在!");
|
|
|
}
|
|
|
- consignUnit.setContactsId(Long.parseLong(orderDTO.getConsignContactsId()));
|
|
|
+ consignUnit.setContactsId(orderDTO.getConsignContactsId());
|
|
|
consignUnit.setTopEntId(ent.getId());
|
|
|
consignUnit.setFirmName(orderDTO.getConsignCompany());
|
|
|
consignUnit.setContacts(orderDTO.getConsignContacts());
|
|
|
@@ -3265,12 +3264,12 @@ public class KwtAcceptCarriageOrderService {
|
|
|
unit.setId(new IdWorker(NumberConstant.TWO).nextId());
|
|
|
unit.setLOrderId(lOrderId);
|
|
|
unit.setUnitType(NumberConstant.TWO);
|
|
|
- unit.setEntId(Long.parseLong(x.getAcceptCompanyId()));
|
|
|
- EntCacheResDto ent1 = entMap.get(Long.parseLong(x.getAcceptCompanyId()));
|
|
|
+ unit.setEntId(x.getAcceptCompanyId());
|
|
|
+ EntCacheResDto ent1 = entMap.get(x.getAcceptCompanyId());
|
|
|
if (Objects.isNull(ent1)) {
|
|
|
throw new BusinessException("企业:" + x.getAcceptCompany() + "的一级企业信息不存在!");
|
|
|
}
|
|
|
- unit.setContactsId(Long.parseLong(x.getAcceptContactsId()));
|
|
|
+ unit.setContactsId(x.getAcceptContactsId());
|
|
|
unit.setTopEntId(ent1.getId());
|
|
|
unit.setFirmName(x.getAcceptCompany());
|
|
|
unit.setContacts(x.getAcceptContacts());
|
|
|
@@ -3287,11 +3286,11 @@ public class KwtAcceptCarriageOrderService {
|
|
|
private static void setLogisticContractInfo(AddLogisticOrderDTO.LogisticInfo x, Long lOrderId, List<KwtLogisticsOrderContract> saveContractList) {
|
|
|
KwtLogisticsOrderContract contract = new KwtLogisticsOrderContract();
|
|
|
contract.setId(new IdWorker(NumberConstant.ONE).nextId());
|
|
|
- contract.setContractId(Long.parseLong(x.getContractId()));
|
|
|
+ contract.setContractId(x.getContractId());
|
|
|
contract.setLOrderId(lOrderId);
|
|
|
contract.setContractNo(x.getContractNo());
|
|
|
contract.setContractName(x.getContractName());
|
|
|
- contract.setSigningWay(x.getSigningWay());
|
|
|
+ contract.setSigningWay(String.valueOf(x.getSigningWay()));
|
|
|
contract.setCreateBy(LoginUserHolder.getUserId());
|
|
|
contract.setCreateTime(new Date());
|
|
|
contract.setUpdateBy(LoginUserHolder.getUserId());
|
|
|
@@ -3339,12 +3338,12 @@ public class KwtAcceptCarriageOrderService {
|
|
|
unloadAddress.setId(new IdWorker(NumberConstant.TWO).nextId());
|
|
|
unloadAddress.setLOrderId(lOrderId);
|
|
|
unloadAddress.setAddressType(NumberConstant.TWO);
|
|
|
- unloadAddress.setName(x.getUnloadName());
|
|
|
+ unloadAddress.setName(orderDTO.getUnloadName());
|
|
|
// unloadAddress.setType();
|
|
|
unloadAddress.setContacts(x.getUnloadContacts());
|
|
|
unloadAddress.setPhone(x.getUnloadPhone());
|
|
|
- unloadAddress.setCityCode(x.getUnloadCityCode());
|
|
|
- unloadAddress.setCityName(x.getUnloadCityName());
|
|
|
+ unloadAddress.setCityCode(orderDTO.getUnloadCityCode());
|
|
|
+ unloadAddress.setCityName(orderDTO.getUnloadCityName());
|
|
|
unloadAddress.setDetailAddress(x.getUnloadDetailAddress());
|
|
|
unloadAddress.setEntryType(NumberConstant.FOUR);
|
|
|
unloadAddress.setStatus(NumberConstant.ZERO);
|
|
|
@@ -3359,7 +3358,7 @@ public class KwtAcceptCarriageOrderService {
|
|
|
KwtLogisticsOrder kwtLogisticsOrder = new KwtLogisticsOrder();
|
|
|
kwtLogisticsOrder.setId(lOrderId);
|
|
|
kwtLogisticsOrder.setEntId(LoginUserHolder.getEntId());
|
|
|
- kwtLogisticsOrder.setType(x.getType());
|
|
|
+ kwtLogisticsOrder.setType(String.valueOf(x.getType()));
|
|
|
kwtLogisticsOrder.setTOrderId(orderDTO.getTradeOrderId());
|
|
|
kwtLogisticsOrder.setTOrderNo(orderDTO.getTradeOrderNo());
|
|
|
kwtLogisticsOrder.setLOrderNo(lOrderNo);
|