|
|
@@ -1028,7 +1028,11 @@ public class KwpGoodsService {
|
|
|
if (Objects.nonNull(params.getSign())) {//查询签约或未签约商品
|
|
|
List<Long> longs = tradeOrderInfoService.querySignGoods(LoginUserHolder.getEntId());
|
|
|
if (Objects.equals(params.getSign(), 1)) {
|
|
|
- wrapper.in(CollUtil.isNotEmpty(longs), KwpGoods::getId, longs);
|
|
|
+ if (CollUtil.isNotEmpty(longs)) {
|
|
|
+ wrapper.in(KwpGoods::getId, longs);
|
|
|
+ } else {
|
|
|
+ wrapper.eq(KwpGoods::getId, 0L);
|
|
|
+ }
|
|
|
} else {
|
|
|
wrapper.notIn(CollUtil.isNotEmpty(longs), KwpGoods::getId, longs);
|
|
|
}
|
|
|
@@ -1455,7 +1459,7 @@ public class KwpGoodsService {
|
|
|
if (org.apache.commons.collections4.CollectionUtils.isEmpty(goods)) {
|
|
|
return new GoodsInfoResp();
|
|
|
}
|
|
|
- List<String> types = Arrays.asList(DictTypeEnum.PRODUCT_NAME_TYPE.getType(), DictTypeEnum.UNIT_TYPE.getType());
|
|
|
+ List<String> types = Arrays.asList(DictTypeEnum.PRODUCT_NAME_TYPE.getType(), DictTypeEnum.GOODS_SPEC.getType());
|
|
|
//组装商品参数
|
|
|
Map<String, Map<String, String>> finalValueAndDictResDtoMap = remoteSystemService.queryDictByType(types);
|
|
|
|
|
|
@@ -1473,8 +1477,9 @@ public class KwpGoodsService {
|
|
|
goodsInfo.setGoodsId(x.getId());
|
|
|
|
|
|
Map<String, String> productNameMap = valueAndDictResDtoMap.getOrDefault(DictTypeEnum.PRODUCT_NAME_TYPE.getType(), new HashMap<>());
|
|
|
- String productType = productNameMap.get(x.getGoodsType());
|
|
|
- goodsInfo.setGoodsName(x.getName() + "/" + productType + "/" + x.getSpec());
|
|
|
+ Map<String, String> goodsSpecMap = valueAndDictResDtoMap.getOrDefault(DictTypeEnum.GOODS_SPEC.getType(), new HashMap<>());
|
|
|
+ String productType = productNameMap.getOrDefault(x.getGoodsType(), "");
|
|
|
+ goodsInfo.setGoodsName(x.getName() + "/" + productType + "/" + goodsSpecMap.getOrDefault(x.getSpec(), ""));
|
|
|
|
|
|
Map<String, String> unitMap = valueAndDictResDtoMap.getOrDefault(DictTypeEnum.UNIT_TYPE.getType(), new HashMap<>());
|
|
|
goodsInfo.setAmountUnit(unitMap.get(x.getUnit()));
|
|
|
@@ -1508,8 +1513,8 @@ 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(),DictTypeEnum.GOODS_SPEC.getType()));
|
|
|
- Map<String, String> productNameMap, unitMap,goodsMap;
|
|
|
+ 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());
|