Ver Fonte

拓展查询条件

xucaiqin há 1 mês atrás
pai
commit
ff656dbee0

+ 1 - 0
sckw-modules/sckw-product/src/main/java/com/sckw/product/model/vo/req/BuildingMaterialsMarketListParam.java

@@ -29,6 +29,7 @@ public class BuildingMaterialsMarketListParam extends PageRequest {
      * 商品类型type值
      */
     private String goodsTypeValue;
+    private String spec;
 
     /**
      * 区域code

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

@@ -307,7 +307,7 @@ public class KwpGoodsService {
         Long entId = LoginUserHolder.getEntId();
         detail.setSignFlag(false);
         if (Objects.nonNull(entId)) {
-            TradeContractGoodsDto tradeContractResDto = remoteContractService.queryTradeContractNew(entId, id,LocalDateTime.now());
+            TradeContractGoodsDto tradeContractResDto = remoteContractService.queryTradeContractNew(entId, id, LocalDateTime.now());
             if (Objects.nonNull(tradeContractResDto)) {
                 detail.setSignPrice(tradeContractResDto.getPrice());
                 detail.setSignFlag(true);
@@ -988,10 +988,10 @@ public class KwpGoodsService {
             List<EntCacheResDto> entList = remoteSystemService.queryEntCacheByName(params.getKeywords());
             List<Long> entIds = entList.stream().map(EntCacheResDto::getId).toList();
             wrapper.and(kwpGoodsLambdaQueryWrapper -> kwpGoodsLambdaQueryWrapper.like(KwpGoods::getName, params.getKeywords())
-                    .or().like(KwpGoods::getSpec, params.getKeywords())
                     .or(CollUtil.isNotEmpty(entIds)).in(CollUtil.isNotEmpty(entIds), KwpGoods::getSupplyEntId, entIds)
             );
         }
+        wrapper.eq(StrUtil.isNotBlank(params.getSpec()), KwpGoods::getSpec, params.getSpec());
         if (Objects.nonNull(params.getSign())) {//查询签约或未签约商品
             List<Long> longs = tradeOrderInfoService.querySignGoods(LoginUserHolder.getEntId());
             if (Objects.equals(params.getSign(), 1)) {
@@ -1048,7 +1048,7 @@ public class KwpGoodsService {
                     .setSupplyEnt(entMap.get(e.getSupplyEntId()));
             materials.setSignFlag(false);
             if (Objects.nonNull(entId)) {
-                TradeContractGoodsDto tradeContractResDto = remoteContractService.queryTradeContractNew(entId, e.getId(),LocalDateTime.now());
+                TradeContractGoodsDto tradeContractResDto = remoteContractService.queryTradeContractNew(entId, e.getId(), LocalDateTime.now());
                 if (Objects.nonNull(tradeContractResDto)) {
                     materials.setSignPrice(tradeContractResDto.getPrice());
                     materials.setSignFlag(true);
@@ -1409,14 +1409,14 @@ public class KwpGoodsService {
     public GoodsInfoResp getGoods(GoodsInfoReq req) {
         log.info("查询商品信息,请求参数 :{}", JSON.toJSONString(req));
         //查询上商品信息
-        Long entId =StringUtils.isNotBlank(req.getEntId()) ? Long.valueOf(req.getEntId()) : null;
+        Long entId = StringUtils.isNotBlank(req.getEntId()) ? Long.valueOf(req.getEntId()) : null;
         List<KwpGoods> goods = kwpGoodsRepository.queryByEntIdAndGoodsName(entId, req.getGoodsName());
         if (org.apache.commons.collections4.CollectionUtils.isEmpty(goods)) {
             return new GoodsInfoResp();
         }
         //组装商品参数
         List<GoodsInfoResp.GoodsInfo> goodsInfos = goods.stream()
-                .filter(e->Objects.equals(e.getStatus(), GoodsStatusEnum.PUT_ON_SHELVES.getCode()))
+                .filter(e -> Objects.equals(e.getStatus(), GoodsStatusEnum.PUT_ON_SHELVES.getCode()))
                 .map(KwpGoodsService::getGoodsInfo)
                 .collect(Collectors.toList());
         GoodsInfoResp goodsInfoResp = new GoodsInfoResp();
@@ -1484,7 +1484,7 @@ public class KwpGoodsService {
             ;
             materials.setSignFlag(false);
             if (Objects.nonNull(entId)) {
-                TradeContractGoodsDto tradeContractResDto = remoteContractService.queryTradeContractNew(entId, e.getId(),LocalDateTime.now());
+                TradeContractGoodsDto tradeContractResDto = remoteContractService.queryTradeContractNew(entId, e.getId(), LocalDateTime.now());
                 if (Objects.nonNull(tradeContractResDto)) {
                     materials.setSignPrice(tradeContractResDto.getPrice());
                     materials.setSignFlag(true);