|
@@ -1508,14 +1508,16 @@ public class KwpGoodsService {
|
|
|
List<EntCacheResDto> entList = remoteSystemService.queryEntCacheByIds(supplyEntIds);
|
|
List<EntCacheResDto> entList = remoteSystemService.queryEntCacheByIds(supplyEntIds);
|
|
|
Map<Long, String> entMap = entList.stream().collect(Collectors.toMap(EntCacheResDto::getId, EntCacheResDto::getFirmName, (k1, k2) -> k1));
|
|
Map<Long, String> entMap = entList.stream().collect(Collectors.toMap(EntCacheResDto::getId, EntCacheResDto::getFirmName, (k1, k2) -> k1));
|
|
|
Map<String, Map<String, String>> dict = remoteSystemService.queryDictByType(List.of(DictTypeEnum.PRODUCT_NAME_TYPE.getType(),
|
|
Map<String, Map<String, String>> dict = remoteSystemService.queryDictByType(List.of(DictTypeEnum.PRODUCT_NAME_TYPE.getType(),
|
|
|
- DictTypeEnum.UNIT_TYPE.getType()));
|
|
|
|
|
- Map<String, String> productNameMap, unitMap;
|
|
|
|
|
|
|
+ DictTypeEnum.UNIT_TYPE.getType(),DictTypeEnum.GOODS_SPEC.getType()));
|
|
|
|
|
+ Map<String, String> productNameMap, unitMap,goodsMap;
|
|
|
if (CollectionUtils.isNotEmpty(dict)) {
|
|
if (CollectionUtils.isNotEmpty(dict)) {
|
|
|
productNameMap = dict.get(DictTypeEnum.PRODUCT_NAME_TYPE.getType());
|
|
productNameMap = dict.get(DictTypeEnum.PRODUCT_NAME_TYPE.getType());
|
|
|
unitMap = dict.get(DictTypeEnum.UNIT_TYPE.getType());
|
|
unitMap = dict.get(DictTypeEnum.UNIT_TYPE.getType());
|
|
|
|
|
+ goodsMap = dict.get(DictTypeEnum.GOODS_SPEC.getType());
|
|
|
} else {
|
|
} else {
|
|
|
productNameMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
productNameMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
unitMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
unitMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
|
|
+ goodsMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
|
|
|
}
|
|
}
|
|
|
Long entId = LoginUserHolder.getEntId();
|
|
Long entId = LoginUserHolder.getEntId();
|
|
|
|
|
|
|
@@ -1525,6 +1527,7 @@ public class KwpGoodsService {
|
|
|
List<KwpGoodsPriceRange> priceRanges = priceRangeMap.get(e.getId());
|
|
List<KwpGoodsPriceRange> priceRanges = priceRangeMap.get(e.getId());
|
|
|
materials.setGoodsTypeLabel(CollectionUtils.isNotEmpty(productNameMap) ? productNameMap.get(e.getGoodsType()) : null)
|
|
materials.setGoodsTypeLabel(CollectionUtils.isNotEmpty(productNameMap) ? productNameMap.get(e.getGoodsType()) : null)
|
|
|
.setUnitLabel(CollectionUtils.isNotEmpty(unitMap) ? unitMap.get(e.getUnit()) : null)
|
|
.setUnitLabel(CollectionUtils.isNotEmpty(unitMap) ? unitMap.get(e.getUnit()) : null)
|
|
|
|
|
+ .setSpec(CollectionUtils.isNotEmpty(goodsMap) ? goodsMap.get(e.getSpec()) : null)
|
|
|
.setAddressName(Objects.isNull(address) ? null : address.getCityName())
|
|
.setAddressName(Objects.isNull(address) ? null : address.getCityName())
|
|
|
.setDetailAddress(Objects.isNull(address) ? null : address.getDetailAddress())
|
|
.setDetailAddress(Objects.isNull(address) ? null : address.getDetailAddress())
|
|
|
.setPrice(CollectionUtils.isEmpty(priceRanges) ? null : priceRanges.get(0).getPrice())
|
|
.setPrice(CollectionUtils.isEmpty(priceRanges) ? null : priceRanges.get(0).getPrice())
|