|
|
@@ -683,7 +683,7 @@ public class KwoTradeOrderService {
|
|
|
if (Objects.isNull(order)) {
|
|
|
throw new BusinessException("不存在该订单!");
|
|
|
}
|
|
|
- Map<String, Map<String, String>> dict = remoteSystemService.queryDictByType(List.of(DictTypeEnum.TRADE_TYPE.getType(), DictTypeEnum.PICKUP_TYPE.getType(), DictTypeEnum.DELIVERY_TYPE.getType(), DictTypeEnum.TORDER_SOURCE.getType(), DictTypeEnum.TORDER_STATUS.getType(), DictTypeEnum.PRODUCT_NAME_TYPE.getType(), DictTypeEnum.UNIT_TYPE.getType(), DictTypeEnum.TAX_RATE.getType(), DictTypeEnum.TORDER_UNIT_TYPE.getType(), DictTypeEnum.TORDER_ADDRESS_TYPE.getType(), DictTypeEnum.ADDRESS_TYPE.getType(), DictTypeEnum.CONSIGNMENT_WAY.getType(), DictTypeEnum.CHARGING_TYPE.getType()));
|
|
|
+ Map<String, Map<String, String>> dict = remoteSystemService.queryDictByType(List.of(DictTypeEnum.TRADE_TYPE.getType(), DictTypeEnum.PICKUP_TYPE.getType(), DictTypeEnum.DELIVERY_TYPE.getType(), DictTypeEnum.TORDER_SOURCE.getType(), DictTypeEnum.TORDER_STATUS.getType(), DictTypeEnum.PRODUCT_NAME_TYPE.getType(), DictTypeEnum.UNIT_TYPE.getType(), DictTypeEnum.TAX_RATE.getType(), DictTypeEnum.TORDER_UNIT_TYPE.getType(), DictTypeEnum.TORDER_ADDRESS_TYPE.getType(), DictTypeEnum.ADDRESS_TYPE.getType(), DictTypeEnum.CONSIGNMENT_WAY.getType(), DictTypeEnum.CHARGING_TYPE.getType(), DictTypeEnum.GOODS_SPEC.getType()));
|
|
|
Map<String, String> pickupMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
Map<String, String> deleveryMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
Map<String, String> sourceMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
@@ -693,6 +693,7 @@ public class KwoTradeOrderService {
|
|
|
Map<String, String> taxRateMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
Map<String, String> chargeTypeMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
Map<String, String> consignmentWayMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
+ Map<String, String> goodspec = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
Map<String, String> orderUnitMap, orderAddressMap, addressMap;
|
|
|
if (CollUtil.isNotEmpty(dict)) {
|
|
|
pickupMap = dict.get(DictTypeEnum.CONSIGNMENT_WAY.getType());
|
|
|
@@ -707,6 +708,7 @@ public class KwoTradeOrderService {
|
|
|
addressMap = dict.get(DictTypeEnum.ADDRESS_TYPE.getType());
|
|
|
chargeTypeMap = dict.get(DictTypeEnum.CHARGING_TYPE.getType());
|
|
|
consignmentWayMap = dict.get(DictTypeEnum.CONSIGNMENT_WAY.getType());
|
|
|
+ goodspec = dict.get(DictTypeEnum.GOODS_SPEC.getType());
|
|
|
} else {
|
|
|
orderUnitMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
orderAddressMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
@@ -740,6 +742,7 @@ public class KwoTradeOrderService {
|
|
|
EntCacheResDto entCache = remoteSystemService.queryEntCacheById(goods.getEntId());
|
|
|
GoodsInfoDetailRes goodsDetail = new GoodsInfoDetailRes();
|
|
|
goodsDetail.setGoodsTypeLabel(CollUtil.isNotEmpty(prodcutNameMap) ? prodcutNameMap.get(goods.getGoodsType()) : null).setUnitLabel(CollUtil.isNotEmpty(unitMap) ? unitMap.get(goods.getUnit()) : null).setTaxRateLabel(CollUtil.isNotEmpty(taxRateMap) ? taxRateMap.get(goods.getTaxRate()) : null).setGoodsAmount(goods.getAmount()).setGoodsId(goods.getId()).setCode(goods.getCode()).setName(goods.getName()).setGoodsType(goods.getGoodsType()).setTaxRate(goods.getTaxRate()).setSpec(goods.getSpec()).setUnit(goods.getUnit()).setPriceRangeId(orderGoods.getPriceRangeId()).setUnitPrice(orderGoods.getUnitPrice()).setSkuId(orderGoods.getSkuId()).setCollectionUnitId(goods.getEntId()).setGoodsThumb(goods.getThumb()).setPrepaidLimit(goods.getPrepaidLimit()).setAdvancePrice(goods.getAdvancePrice()).setCollectionUnit(Objects.isNull(entCache) ? null : entCache.getFirmName());
|
|
|
+ goodsDetail.setSpec(CollUtil.isNotEmpty(goodspec) ? goodspec.get(goods.getSpec()) : null);
|
|
|
detail.setGoodsInfo(goodsDetail);
|
|
|
if (Objects.equals(detail.getChargeType(), 1)) {//按装货量
|
|
|
detail.setDealMoney(NumberUtil.mul(orderGoods.getUnitPrice(), detail.getLoadAmount()));
|
|
|
@@ -1583,15 +1586,16 @@ public class KwoTradeOrderService {
|
|
|
Map<Long, UserCacheResDto> userMap = remoteSystemService.queryUserCacheMapByIds(createByIds);
|
|
|
Map<Long, KwpGoods> goodsMap = goodsInfoService.getGoodsByIds(goodIdList);
|
|
|
Map<Long, ContractCommonInfoResDto> contractMap = remoteContractService.queryContractBaseInfo(contracIdList);
|
|
|
- Map<String, Map<String, String>> dict = remoteSystemService.queryDictByType(List.of(DictTypeEnum.TORDER_STATUS.getType(), DictTypeEnum.PRODUCT_NAME_TYPE.getType(), DictTypeEnum.TRADE_TYPE.getType(), DictTypeEnum.SETTLEMENT_WAY.getType(), DictTypeEnum.CONSIGNMENT_WAY.getType(), DictTypeEnum.TORDER_SOURCE.getType()));
|
|
|
+ Map<String, Map<String, String>> dict = remoteSystemService.queryDictByType(List.of(DictTypeEnum.TORDER_STATUS.getType(), DictTypeEnum.PRODUCT_NAME_TYPE.getType(), DictTypeEnum.TRADE_TYPE.getType(), DictTypeEnum.SETTLEMENT_WAY.getType(), DictTypeEnum.CONSIGNMENT_WAY.getType(), DictTypeEnum.TORDER_SOURCE.getType(), DictTypeEnum.GOODS_SPEC.getType()));
|
|
|
Map<String, SysDictResDto> unitType = remoteSystemService.queryDictMapByType(DictTypeEnum.UNIT_TYPE.getType());
|
|
|
- Map<String, String> tradeMap, deliveryMap, pickupMap, sourceMap, nameMap;
|
|
|
+ Map<String, String> tradeMap, deliveryMap, pickupMap, sourceMap, nameMap, specMap;
|
|
|
if (CollUtil.isNotEmpty(dict)) {
|
|
|
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.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);
|
|
|
nameMap = CollUtil.isNotEmpty(dict.get(DictTypeEnum.PRODUCT_NAME_TYPE.getType())) ? dict.get(DictTypeEnum.PRODUCT_NAME_TYPE.getType()) : new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
+ specMap = CollUtil.isNotEmpty(dict.get(DictTypeEnum.GOODS_SPEC.getType())) ? dict.get(DictTypeEnum.GOODS_SPEC.getType()) : new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
|
|
|
} else {
|
|
|
tradeMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
@@ -1599,6 +1603,7 @@ public class KwoTradeOrderService {
|
|
|
pickupMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
sourceMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
nameMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
+ specMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
}
|
|
|
list.forEach(e -> {
|
|
|
//装货地址
|
|
|
@@ -1617,7 +1622,7 @@ public class KwoTradeOrderService {
|
|
|
|
|
|
OrderListResVO vo = BeanUtil.copyProperties(e, OrderListResVO.class);
|
|
|
vo.setStatusLabel(TradeOrderStatusEnum.getMsg(e.getStatus())).setTradingLabel(tradeMap.get(e.getTrading())).setTrading(tradeMap.get(e.getTrading())).setDeliveryType(deliveryMap.get(e.getDeliveryType())).setPickupTypeLabel(pickupMap.get(e.getPickupType())).setSourceLabel(sourceMap.get(e.getSource())).setSource(sourceMap.get(e.getSource())).setContractName(Objects.isNull(contract) ? null : contract.getContactName()).setContractSigningWay(Objects.isNull(contract) ? null : contract.getSigningWayName()).setGoodsName(Objects.isNull(goods) ? null : goods.getName());
|
|
|
- vo.setGoodsSpec(Objects.isNull(goods) ? null : goods.getSpec());
|
|
|
+ vo.setGoodsSpec(Objects.isNull(goods) ? "" : CollUtil.isNotEmpty(specMap) ? specMap.get(goods.getSpec()) : null);
|
|
|
vo.setGoodsTaxRate(Objects.isNull(goods) ? null : goods.getTaxRate());
|
|
|
vo.setGoodsThumb(Objects.isNull(goods) ? null : goods.getThumb());
|
|
|
vo.setGoodsType(Objects.isNull(goods) ? null : goods.getGoodsType());
|