|
@@ -683,7 +683,7 @@ public class KwoTradeOrderService {
|
|
|
Map<String, String> orderUnitMap, orderAddressMap, addressMap;
|
|
Map<String, String> orderUnitMap, orderAddressMap, addressMap;
|
|
|
if (CollUtil.isNotEmpty(dict)) {
|
|
if (CollUtil.isNotEmpty(dict)) {
|
|
|
tradeMap = dict.get(DictTypeEnum.TRADE_TYPE.getType());
|
|
tradeMap = dict.get(DictTypeEnum.TRADE_TYPE.getType());
|
|
|
- pickupMap = dict.get(DictTypeEnum.PICKUP_TYPE.getType());
|
|
|
|
|
|
|
+ pickupMap = dict.get(DictTypeEnum.CONSIGNMENT_WAY.getType());
|
|
|
deleveryMap = dict.get(DictTypeEnum.DELIVERY_TYPE.getType());
|
|
deleveryMap = dict.get(DictTypeEnum.DELIVERY_TYPE.getType());
|
|
|
sourceMap = dict.get(DictTypeEnum.TORDER_SOURCE.getType());
|
|
sourceMap = dict.get(DictTypeEnum.TORDER_SOURCE.getType());
|
|
|
statusMap = dict.get(DictTypeEnum.TORDER_STATUS.getType());
|
|
statusMap = dict.get(DictTypeEnum.TORDER_STATUS.getType());
|
|
@@ -1571,13 +1571,13 @@ public class KwoTradeOrderService {
|
|
|
Map<Long, UserCacheResDto> userMap = remoteSystemService.queryUserCacheMapByIds(createByIds);
|
|
Map<Long, UserCacheResDto> userMap = remoteSystemService.queryUserCacheMapByIds(createByIds);
|
|
|
Map<Long, KwpGoods> goodsMap = goodsInfoService.getGoodsByIds(goodIdList);
|
|
Map<Long, KwpGoods> goodsMap = goodsInfoService.getGoodsByIds(goodIdList);
|
|
|
Map<Long, ContractCommonInfoResDto> contractMap = remoteContractService.queryContractBaseInfo(contracIdList);
|
|
Map<Long, ContractCommonInfoResDto> contractMap = remoteContractService.queryContractBaseInfo(contracIdList);
|
|
|
- Map<String, Map<String, String>> dict = remoteSystemService.queryDictByType(List.of(DictTypeEnum.TORDER_STATUS.getType(), DictTypeEnum.TRADE_TYPE.getType(), DictTypeEnum.DELIVERY_TYPE.getType(), DictTypeEnum.PICKUP_TYPE.getType(), DictTypeEnum.TORDER_SOURCE.getType()));
|
|
|
|
|
|
|
+ Map<String, Map<String, String>> dict = remoteSystemService.queryDictByType(List.of(DictTypeEnum.TORDER_STATUS.getType(), DictTypeEnum.TRADE_TYPE.getType(), DictTypeEnum.SETTLEMENT_WAY.getType(), DictTypeEnum.CONSIGNMENT_WAY.getType(), DictTypeEnum.TORDER_SOURCE.getType()));
|
|
|
Map<String, SysDictResDto> unitType = remoteSystemService.queryDictMapByType(DictTypeEnum.UNIT_TYPE.getType());
|
|
Map<String, SysDictResDto> unitType = remoteSystemService.queryDictMapByType(DictTypeEnum.UNIT_TYPE.getType());
|
|
|
Map<String, String> tradeMap, deliveryMap, pickupMap, sourceMap;
|
|
Map<String, String> tradeMap, deliveryMap, pickupMap, sourceMap;
|
|
|
if (CollUtil.isNotEmpty(dict)) {
|
|
if (CollUtil.isNotEmpty(dict)) {
|
|
|
tradeMap = CollUtil.isNotEmpty(dict.get(DictTypeEnum.TRADE_TYPE.getType())) ? dict.get(DictTypeEnum.TRADE_TYPE.getType()) : new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
tradeMap = CollUtil.isNotEmpty(dict.get(DictTypeEnum.TRADE_TYPE.getType())) ? dict.get(DictTypeEnum.TRADE_TYPE.getType()) : new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
- deliveryMap = CollUtil.isNotEmpty(dict.get(DictTypeEnum.DELIVERY_TYPE.getType())) ? dict.get(DictTypeEnum.DELIVERY_TYPE.getType()) : new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
|
|
- pickupMap = CollUtil.isNotEmpty(dict.get(DictTypeEnum.PICKUP_TYPE.getType())) ? dict.get(DictTypeEnum.PICKUP_TYPE.getType()) : new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
|
|
|
|
+ deliveryMap = CollUtil.isNotEmpty(dict.get(DictTypeEnum.SETTLEMENT_WAY.getType())) ? dict.get(DictTypeEnum.SETTLEMENT_WAY.getType()) : new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
|
|
+ pickupMap = CollUtil.isNotEmpty(dict.get(DictTypeEnum.CONSIGNMENT_WAY.getType())) ? dict.get(DictTypeEnum.CONSIGNMENT_WAY.getType()) : new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
sourceMap = CollUtil.isNotEmpty(dict.get(DictTypeEnum.TORDER_SOURCE.getType())) ? dict.get(DictTypeEnum.TORDER_SOURCE.getType()) : new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
sourceMap = CollUtil.isNotEmpty(dict.get(DictTypeEnum.TORDER_SOURCE.getType())) ? dict.get(DictTypeEnum.TORDER_SOURCE.getType()) : new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
} else {
|
|
} else {
|
|
|
tradeMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
tradeMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
@@ -1591,14 +1591,9 @@ public class KwoTradeOrderService {
|
|
|
List<KwoTradeOrderAddress> loadAddresses = kwoTradeOrderAddressService.findByAddress(e.getTOrderId(), AddressTypeEnum.SHIPMENT.getCode());
|
|
List<KwoTradeOrderAddress> loadAddresses = kwoTradeOrderAddressService.findByAddress(e.getTOrderId(), AddressTypeEnum.SHIPMENT.getCode());
|
|
|
//卸货地址
|
|
//卸货地址
|
|
|
List<KwoTradeOrderAddress> unloadAddresses = kwoTradeOrderAddressService.findByAddress(e.getTOrderId(), AddressTypeEnum.TAKE.getCode());
|
|
List<KwoTradeOrderAddress> unloadAddresses = kwoTradeOrderAddressService.findByAddress(e.getTOrderId(), AddressTypeEnum.TAKE.getCode());
|
|
|
- //装货地点名称
|
|
|
|
|
- List<String> loadName = loadAddresses.stream().map(KwoTradeOrderAddress::getName).toList();
|
|
|
|
|
- //装货地点
|
|
|
|
|
- List<String> loadAddress = loadAddresses.stream().map(item -> item.getCityName() + " " + item.getDetailAddress()).toList();
|
|
|
|
|
|
|
+ Optional<KwoTradeOrderAddress> loadAddress = loadAddresses.stream().findFirst();
|
|
|
//卸货地点点名称
|
|
//卸货地点点名称
|
|
|
- List<String> unloadName = unloadAddresses.stream().map(KwoTradeOrderAddress::getName).toList();
|
|
|
|
|
- //卸货地点
|
|
|
|
|
- List<String> unloadAddress = unloadAddresses.stream().map(item -> item.getCityName() + " " + item.getDetailAddress()).toList();
|
|
|
|
|
|
|
+ Optional<KwoTradeOrderAddress> unloadAddress = unloadAddresses.stream().findFirst();
|
|
|
|
|
|
|
|
BigDecimal actualAmount = Objects.isNull(e.getActualAmount()) ? BigDecimal.ZERO : e.getActualAmount();
|
|
BigDecimal actualAmount = Objects.isNull(e.getActualAmount()) ? BigDecimal.ZERO : e.getActualAmount();
|
|
|
BigDecimal unitPrice = Objects.isNull(e.getUnitPrice()) ? BigDecimal.ZERO : e.getUnitPrice();
|
|
BigDecimal unitPrice = Objects.isNull(e.getUnitPrice()) ? BigDecimal.ZERO : e.getUnitPrice();
|
|
@@ -1631,8 +1626,18 @@ public class KwoTradeOrderService {
|
|
|
.setEntrustAmount(setScale(e.getEntrustAmount()))
|
|
.setEntrustAmount(setScale(e.getEntrustAmount()))
|
|
|
.setActualAmount(setScale(e.getActualAmount()))
|
|
.setActualAmount(setScale(e.getActualAmount()))
|
|
|
.setCreateByName(Objects.isNull(userCache) ? null : userCache.getName())
|
|
.setCreateByName(Objects.isNull(userCache) ? null : userCache.getName())
|
|
|
- .setLoadName(loadName).setLoadAddress(loadAddress)
|
|
|
|
|
- .setUnloadName(unloadName).setUnloadAddress(unloadAddress);
|
|
|
|
|
|
|
+ ;
|
|
|
|
|
+ loadAddress.ifPresent(d -> {
|
|
|
|
|
+ vo.setLoadName(d.getName());
|
|
|
|
|
+ vo.setLoadAddress(d.getCityName() + " " + d.getDetailAddress());
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+ unloadAddress.ifPresent(d -> {
|
|
|
|
|
+ vo.setUnloadName(d.getName());
|
|
|
|
|
+ vo.setUnloadAddress(d.getCityName() + " " + d.getDetailAddress());
|
|
|
|
|
+ vo.setUnloadContact(d.getContacts());
|
|
|
|
|
+ vo.setUnloadContactPhone(d.getPhone());
|
|
|
|
|
+ });
|
|
|
result.add(vo);
|
|
result.add(vo);
|
|
|
});
|
|
});
|
|
|
return PageHelperUtil.getPageResult(new PageInfo<>(result), list, pageSize);
|
|
return PageHelperUtil.getPageResult(new PageInfo<>(result), list, pageSize);
|