2 Incheckningar 728b67599b ... 051b7fba2c

Upphovsman SHA1 Meddelande Datum
  xucaiqin 051b7fba2c Merge remote-tracking branch 'origin/dev_20251130' into dev_20251130 3 veckor sedan
  xucaiqin 877cb6535a fix 3 veckor sedan

+ 5 - 2
sckw-modules/sckw-product/src/main/java/com/sckw/product/service/KwpGoodsService.java

@@ -1508,14 +1508,16 @@ public class KwpGoodsService {
         List<EntCacheResDto> entList = remoteSystemService.queryEntCacheByIds(supplyEntIds);
         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(),
-                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)) {
             productNameMap = dict.get(DictTypeEnum.PRODUCT_NAME_TYPE.getType());
             unitMap = dict.get(DictTypeEnum.UNIT_TYPE.getType());
+            goodsMap = dict.get(DictTypeEnum.GOODS_SPEC.getType());
         } else {
             productNameMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
             unitMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
+            goodsMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
         }
         Long entId = LoginUserHolder.getEntId();
 
@@ -1525,6 +1527,7 @@ public class KwpGoodsService {
             List<KwpGoodsPriceRange> priceRanges = priceRangeMap.get(e.getId());
             materials.setGoodsTypeLabel(CollectionUtils.isNotEmpty(productNameMap) ? productNameMap.get(e.getGoodsType()) : 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())
                     .setDetailAddress(Objects.isNull(address) ? null : address.getDetailAddress())
                     .setPrice(CollectionUtils.isEmpty(priceRanges) ? null : priceRanges.get(0).getPrice())