Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/dev_20251130' into dev_20251130

sckw-developer 2 mesi fa
parent
commit
5c0079eeb3

+ 1 - 1
pom.xml

@@ -396,7 +396,7 @@
             </activation>
             <properties>
                 <profiles.active>test</profiles.active>
-                <nacos.server>10.10.10.224:8848</nacos.server>
+                <nacos.server>10.10.10.230:8848</nacos.server>
                 <nacos.namespace>sckw-ng-service-platform</nacos.namespace>
             </properties>
         </profile>

+ 2 - 1
sckw-modules-api/sckw-fleet-api/src/main/java/com/sckw/fleet/api/RemoteFleetService.java

@@ -4,7 +4,6 @@ import com.sckw.fleet.api.model.vo.*;
 
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 /**
  * @author zk
@@ -103,5 +102,7 @@ public interface RemoteFleetService {
      */
     RFleetVo findFleetById(Long fleetId);
 
+    String getCarAxisInfo(int axleNumId);
+
 
 }

+ 9 - 8
sckw-modules/sckw-contract/src/main/resources/mapper/KwcContractTradeMapper.xml

@@ -27,7 +27,8 @@
                a.contract_pid contractPid,
                a.performed_amount performedAmount,
                f.name contractPname,
-               f.unload_way   unloadWay
+               a.unload_way   unloadWay,
+               a.signing_way signingWay
           from kwc_contract_trade a
           left join kwc_contract_trade_unit b
             on a.id = b.contract_id
@@ -44,13 +45,13 @@
           left join kwc_contract_trade_unit e on a.id = e.contract_id and e.unit_type != #{entType} and e.del_flag = 0
           left join kwc_contract_trade f on f.id = a.contract_pid
          where a.del_flag = 0
-           and case when a.status = 3 then a.ent_id = #{entId} and #{entType} = 1
-                else (b.ent_id in
-                        <foreach collection="allEnt" separator="," open="(" close=")" item="item">
-                            #{item}
-                        </foreach>
-                        and b.id is not null)
-                end
+<!--           and case when a.status = 3 then a.ent_id = #{entId} and #{entType} = 1-->
+<!--                else (b.ent_id in-->
+<!--                        <foreach collection="allEnt" separator="," open="(" close=")" item="item">-->
+<!--                            #{item}-->
+<!--                        </foreach>-->
+<!--                        and b.id is not null)-->
+<!--                end-->
         <if test="startTime != null">
             and a.create_time >= #{startTime}
         </if>

+ 19 - 2
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/dubbo/RemoteFleetServiceImpl.java

@@ -1,10 +1,10 @@
 package com.sckw.fleet.dubbo;
 
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.sckw.core.exception.BusinessException;
 import com.sckw.core.model.constant.Global;
 import com.sckw.core.utils.BeanUtils;
 import com.sckw.core.utils.CollectionUtils;
-import com.sckw.core.utils.NumberUtils;
 import com.sckw.core.utils.StringUtils;
 import com.sckw.fleet.api.RemoteFleetService;
 import com.sckw.fleet.api.model.vo.*;
@@ -14,7 +14,6 @@ import com.sckw.fleet.model.*;
 import com.sckw.fleet.repository.*;
 import lombok.RequiredArgsConstructor;
 import org.apache.dubbo.config.annotation.DubboService;
-import org.jetbrains.annotations.NotNull;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -45,6 +44,7 @@ public class RemoteFleetServiceImpl implements RemoteFleetService {
     private final KwfFleetDriverRepository kwfFleetDriverRepository;
     private final KwfFleetTruckRepository kwfFleetTruckRepository;
     private final KwfTruckRouteRepository kwfTruckRouteRepository;
+    private final KwfTruckAxleNumRepository kwfTruckAxleNumRepository;
 
     /**
      * @param driverIds 司机档案主键id,多个已逗号隔开
@@ -364,6 +364,23 @@ public class RemoteFleetServiceImpl implements RemoteFleetService {
         return fleetVo;
     }
 
+    /**
+     * 查询轴数
+     * @param axleNumId
+     * @return
+     */
+    @Override
+    public String getCarAxisInfo(int axleNumId) {
+        //查询车辆关联司机信息
+        TmsTruckAxleNum axleNum = kwfTruckAxleNumRepository.getOne(Wrappers.<TmsTruckAxleNum>lambdaQuery()
+                .eq(TmsTruckAxleNum::getStatus, 1)
+                .eq(TmsTruckAxleNum::getId,axleNumId));
+        if (axleNum == null) {
+            return null;
+        }
+        return axleNum.getName();
+    }
+
 
 
 }

+ 3 - 3
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/request/KwpBizWalletPrepayQueryRequest.java

@@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import com.sckw.core.model.page.PageRequest;
 import io.swagger.v3.oas.annotations.media.Schema;
 import jakarta.validation.constraints.NotNull;
-import jakarta.validation.constraints.Positive;
+import jakarta.validation.constraints.PositiveOrZero;
 import lombok.Data;
 
 import java.math.BigDecimal;
@@ -32,14 +32,14 @@ public class KwpBizWalletPrepayQueryRequest extends PageRequest {
      * 最小金额
      */
     @Schema(description = "最小金额")
-    @Positive(message = "金额必须为正数!")
+    @PositiveOrZero(message = "金额必须大于等于0!")
     private BigDecimal minAmount;
 
     /**
      * 最大金额
      */
     @Schema(description = "最大金额")
-    @Positive(message = "金额必须为正数!")
+    @PositiveOrZero(message = "金额必须大于等于0!")
     private BigDecimal maxAmount;
 
     /**

+ 2 - 2
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/request/KwpBizWalletPrepayRequest.java

@@ -29,8 +29,8 @@ public class KwpBizWalletPrepayRequest extends PageRequest {
      */
     @Schema(description = "本次更新金额")
     @NotNull(message = "金额不能为空!")
-    @Positive(message = "金额必须为正数!")
-    @Digits(integer = 10, fraction = 5, message = "金额最多10位整数和5位小数!")
+    @Positive(message = "金额必须大于0!")
+    @Digits(integer = 9, fraction = 5, message = "金额最多9位整数和5位小数!")
     private BigDecimal amount;
 
     /**

+ 6 - 0
sckw-modules/sckw-product/pom.xml

@@ -78,6 +78,12 @@
 <!--            <version>1.0.0</version>-->
         </dependency>
 
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>sckw-fleet-api</artifactId>
+            <version>${basic.version}</version>
+        </dependency>
+
         <dependency>
             <groupId>com.sckw</groupId>
             <artifactId>sckw-common-redis</artifactId>

+ 1 - 1
sckw-modules/sckw-product/src/main/java/com/sckw/product/model/KwpGoods.java

@@ -136,7 +136,7 @@ public class KwpGoods extends BaseModel implements Serializable {
      * 轴数
      */
     @TableField("car_axis")
-    private String carAxis;
+    private int carAxis;
 
     /**
      * 富文本内容

+ 1 - 8
sckw-modules/sckw-product/src/main/java/com/sckw/product/model/vo/req/AddGoodsParam.java

@@ -77,7 +77,7 @@ public class AddGoodsParam {
      * 轴数
      */
     @Schema(description = "轴数")
-    private String carAxis;
+    private Integer carAxis;
 
     /**
      * 富文本内容
@@ -114,13 +114,6 @@ public class AddGoodsParam {
     @NotNull(message = "客户经理不能为空")
     private Long manager;
 
-    /**
-     * 备注
-     */
-    @Schema(description = "备注")
-    @Length(max = 200, message = "备注最多支持200字")
-    private String remark;
-
     /**
      * 商品缩略图
      */

+ 3 - 2
sckw-modules/sckw-product/src/main/java/com/sckw/product/model/vo/req/GoodsInfoReq.java

@@ -2,6 +2,7 @@ package com.sckw.product.model.vo.req;
 
 import io.swagger.v3.oas.annotations.media.Schema;
 import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
 import lombok.Data;
 
 import java.io.Serial;
@@ -21,8 +22,8 @@ public class GoodsInfoReq implements Serializable {
      * 企业id
      */
     @Schema(description = "企业id")
-    @NotBlank(message = "企业id不能为空")
-    private Long entId;
+    @NotNull(message = "企业id不能为空")
+    private String entId;
     /**
      * 商品名称
      */

+ 14 - 22
sckw-modules/sckw-product/src/main/java/com/sckw/product/model/vo/req/UpdateGoodsParam.java

@@ -1,5 +1,6 @@
 package com.sckw.product.model.vo.req;
 
+import io.swagger.v3.oas.annotations.media.Schema;
 import jakarta.validation.Valid;
 import jakarta.validation.constraints.DecimalMin;
 import jakarta.validation.constraints.NotBlank;
@@ -53,12 +54,6 @@ public class UpdateGoodsParam {
     @Length(max = 20, message = "规格尺寸最多支持20字")
     private String spec;
 
-    /**
-     * 库存数量
-     */
-    @DecimalMin(value = "0.01", message = "库存数量必须大于零")
-    private BigDecimal amount;
-
     /**
      * 参数目录
      */
@@ -67,27 +62,29 @@ public class UpdateGoodsParam {
     private List<GoodsAttributes> attributes;
 
     /**
-     * 发票税率(%)
+     * 商品编码
      */
-    private String taxRate;
+    @Schema(description = "商品编码")
+    private String code;
 
     /**
-     * 是否设置预付限额0否1是
+     * 轴数
      */
-    @Range(min = 0, max = 1, message = "非法设置预付限额参数")
-    private Integer prepaidLimit;
+    @Schema(description = "轴数")
+    private int carAxis;
 
     /**
-     * 预付款最低限额(万元)
+     * 富文本内容
      */
-    @DecimalMin(value = "0.01", message = "预付款最低限额必须大于零")
-    private BigDecimal advancePrice;
+    @Schema(description = "富文本内容")
+    private String content;
 
     /**
-     * 价格梯度
+     * 参考价格(元)
      */
-    @Size(max = 4, message = "价格梯度最多4个")
-    private List<GoodsPriceRanges> priceRanges;
+    @Schema(description = "参考价格(元)")
+    @DecimalMin(value = "0.01", message = "参考价格必须大于零")
+    private BigDecimal price;
 
     /**
      * 供应企业
@@ -105,11 +102,6 @@ public class UpdateGoodsParam {
      */
     private Long manager;
 
-    /**
-     * 备注
-     */
-    @Length(max = 200, message = "备注最多支持200字")
-    private String remark;
 
     /**
      * 商品缩略图

+ 5 - 35
sckw-modules/sckw-product/src/main/java/com/sckw/product/model/vo/res/GoodsDetail.java

@@ -111,6 +111,11 @@ public class GoodsDetail {
      */
     private String content;
 
+    /**
+     * 参考价格
+     */
+    private BigDecimal price;
+
     /**
      * 单位(吨、方、件、箱、其他)
      */
@@ -126,26 +131,6 @@ public class GoodsDetail {
      */
     private String spec;
 
-    /**
-     * 发票税率
-     */
-    private String taxRate;
-
-    /**
-     * 发票税率label
-     */
-    private String taxRateLabel;
-
-    /**
-     * 是否设置预付限额0否1是
-     */
-    private Integer prepaidLimit;
-
-    /**
-     * 是否设置预付限额label
-     */
-    private String prepaidLimitLabel;
-
     /**
      * 预付款最低限额
      */
@@ -161,11 +146,6 @@ public class GoodsDetail {
      */
     private String managerName;
 
-    /**
-     * 专属客户经理电话
-     */
-    private String managerPhone;
-
     /**
      * 成交量
      */
@@ -188,11 +168,6 @@ public class GoodsDetail {
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date shelfTime;
 
-    /**
-     * 备注
-     */
-    private String remark;
-
     /**
      * 状态:0草稿/1上架/2下架
      */
@@ -213,11 +188,6 @@ public class GoodsDetail {
      */
     private AddressInfoDetail addressInfo;
 
-    /**
-     * 价格梯度
-     */
-    private BigDecimal priceRanges;
-
     /**
      * 参数目录
      */

+ 6 - 38
sckw-modules/sckw-product/src/main/java/com/sckw/product/model/vo/res/GoodsList.java

@@ -75,45 +75,11 @@ public class GoodsList {
      */
     private String spec;
 
-    /**
-     * 发票税率(%)
-     */
-    private String taxRate;
-
-    /**
-     * 发票税率label
-     */
-    private String taxRateLabel;
-
     /**
      * 库存数量
      */
     private BigDecimal amount;
 
-    /**
-     * 是否设置预付限额0否1是
-     */
-    private Integer prepaidLimit;
-
-    /**
-     * 是否设置预付限额label
-     */
-    private String prepaidLimitLabel;
-
-    /**
-     * 预付款最低限额
-     */
-    private BigDecimal advancePrice;
-
-    /**
-     * 最高单价
-     */
-    private BigDecimal highestPrice;
-
-    /**
-     * 最低单价
-     */
-    private BigDecimal lowestPrice;
 
     /**
      * 仓储地址
@@ -125,10 +91,6 @@ public class GoodsList {
      */
     private String manageName;
 
-    /**
-     * 联系电话
-     */
-    private String phone;
 
     /**
      * 上架时间
@@ -178,5 +140,11 @@ public class GoodsList {
      */
     private String content;
 
+    /**
+     * 参考价格
+     */
+    private BigDecimal price;
+
+
 
 }

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

@@ -17,10 +17,14 @@ import com.sckw.core.model.page.PageResult;
 import com.sckw.core.model.vo.TableBottom;
 import com.sckw.core.model.vo.TableStatisticRes;
 import com.sckw.core.model.vo.TableTop;
-import com.sckw.core.utils.*;
+import com.sckw.core.utils.BeanUtils;
+import com.sckw.core.utils.CollectionUtils;
+import com.sckw.core.utils.FileUtils;
+import com.sckw.core.utils.StringUtils;
 import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.context.LoginUserHolder;
 import com.sckw.excel.utils.DateUtil;
+import com.sckw.fleet.api.RemoteFleetService;
 import com.sckw.payment.api.dubbo.PayCenterDubboService;
 import com.sckw.payment.api.model.constant.ChannelEnum;
 import com.sckw.payment.api.model.dto.WalletDto;
@@ -44,11 +48,9 @@ import com.sckw.system.api.model.dto.res.KwsUserResDto;
 import com.sckw.system.api.model.dto.res.SysDictResDto;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
 import jakarta.servlet.http.HttpServletRequest;
-import jakarta.validation.Valid;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
-import org.jetbrains.annotations.NotNull;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cloud.stream.function.StreamBridge;
 import org.springframework.stereotype.Service;
@@ -78,6 +80,10 @@ public class KwpGoodsService {
     @DubboReference(version = "1.0.0", group = "design", check = false)
     private PayCenterDubboService payCenterDubboService;
 
+    @DubboReference(version = "1.0.0", group = "design", check = false)
+    private RemoteFleetService remoteFleetService;
+
+
     private final KwpGoodsMapper kwpGoodsMapper;
     private final KwpGoodsAddressService kwpGoodsAddressService;
     private final KwpGoodsAttributeService kwpGoodsAttributeService;
@@ -269,7 +275,7 @@ public class KwpGoodsService {
         }
         UserCacheResDto managerInfo = remoteSystemService.queryUserCacheById(detail.getManager());
         if (Objects.nonNull(managerInfo)) {
-            detail.setManagerName(managerInfo.getName()).setManagerPhone(managerInfo.getPhone());
+            detail.setManagerName(managerInfo.getName());
         }
         Map<String, Map<String, String>> dict = remoteSystemService.queryDictByType(List.of(DictTypeEnum.PRODUCT_NAME_TYPE.getType(),
                 DictTypeEnum.UNIT_TYPE.getType(),
@@ -278,13 +284,11 @@ public class KwpGoodsService {
                 DictTypeEnum.ADDRESS_TYPE.getType()));
         Map<String, String> productNameMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
         Map<String, String> unitMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
-//        Map<String, String> taxRateMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
         Map<String, String> goodsStatusMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
         Map<String, String> addressMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
         if (CollectionUtils.isNotEmpty(dict)) {
             productNameMap = dict.get(DictTypeEnum.PRODUCT_NAME_TYPE.getType());
             unitMap = dict.get(DictTypeEnum.UNIT_TYPE.getType());
-//            taxRateMap = dict.get(DictTypeEnum.TAX_RATE.getType());
             goodsStatusMap = dict.get(DictTypeEnum.GOODS_STATUS.getType());
             addressMap = dict.get(DictTypeEnum.ADDRESS_TYPE.getType());
         }
@@ -295,9 +299,7 @@ public class KwpGoodsService {
         }
         detail.setGoodsTypeLabel(CollectionUtils.isNotEmpty(productNameMap) ? productNameMap.get(detail.getGoodsType()) : null)
                 .setUnitLabel(CollectionUtils.isNotEmpty(unitMap) ? unitMap.get(detail.getUnit()) : null)
-//                .setTaxRateLabel(CollectionUtils.isNotEmpty(taxRateMap) ? taxRateMap.get(detail.getTaxRate()) : null)
                 .setStatusLabel(CollectionUtils.isNotEmpty(goodsStatusMap) ? goodsStatusMap.get(String.valueOf(detail.getStatus())) : null);
-//                .setPrepaidLimitLabel(Objects.equals(detail.getPrepaidLimit(), 1) ? "是" : "否");
         //商品图片信息
         if (Objects.nonNull(goods.getThumb())) {
             detail.setThumb(FileUtils.splice(goods.getThumb()));
@@ -334,10 +336,15 @@ public class KwpGoodsService {
                 e.setToUnitName(finalUnitMap != null ? finalUnitMap.get(e.getToUnit()) : null);
             });
         }
-        detail.setImages(images).setPriceRanges(price).setAttributes(attributes).setAddressInfo(addressInfo).setAssistUnit(assistUnit);
+        detail.setImages(images).setPrice(price).setAttributes(attributes).setAddressInfo(addressInfo).setAssistUnit(assistUnit);
+        //轴数
+        String carAxisName = remoteFleetService.getCarAxisInfo(goods.getCarAxis());
+        detail.setCarAxis(carAxisName);
+
         return detail;
     }
 
+
     /**
      * @desc: 更新商品信息
      * @author: yzc
@@ -360,10 +367,6 @@ public class KwpGoodsService {
             if (StringUtils.isNotBlank(msg)) {
                 throw new BusinessException(msg);
             }
-            if (Objects.equals(goods.getStatus(), GoodsStatusEnum.PUT_ON_SHELVES.getCode()) &&
-                    goods.getAmount().compareTo(param.getAmount()) != 0) {
-                throw new BusinessException("上架商品不可修改库存数量!");
-            }
         }
         AddressInfo address = param.getAddressInfo();
         Integer areaCode = Objects.isNull(address) ? null : address.getCityCode();
@@ -373,13 +376,10 @@ public class KwpGoodsService {
                 .set(KwpGoods::getGoodsType, param.getGoodsType())
                 .set(KwpGoods::getUnit, param.getUnit())
                 .set(KwpGoods::getSpec, param.getSpec())
-                .set(KwpGoods::getAmount, param.getAmount())
-                .set(KwpGoods::getTaxRate, param.getTaxRate())
-                .set(KwpGoods::getPrepaidLimit, param.getPrepaidLimit())
-                .set(KwpGoods::getAdvancePrice, param.getAdvancePrice())
+                .set(KwpGoods::getCode, param.getCode())
+                .set(KwpGoods::getCarAxis, param.getCarAxis())
+                .set(KwpGoods::getContent, param.getContent())
                 .set(KwpGoods::getSupplyEntId, param.getSupplyEntId())
-                .set(KwpGoods::getManager, param.getManager())
-                .set(KwpGoods::getRemark, param.getRemark())
                 .set(KwpGoods::getThumb, FileUtils.replaceAll(param.getThumb()))
                 .set(KwpGoods::getAreaCode, areaCode)
                 .set(KwpGoods::getAddressName, addressName)
@@ -431,14 +431,11 @@ public class KwpGoodsService {
 
         //更新商品价格梯度信息
         kwpGoodsPriceRangeService.delByGoodsIds(Collections.singletonList(goodsId));
-        if (CollectionUtils.isNotEmpty(param.getPriceRanges())) {
-            List<KwpGoodsPriceRange> list = new ArrayList<>(param.getPriceRanges().size());
-            param.getPriceRanges().forEach(e -> {
-                KwpGoodsPriceRange priceRange = BeanUtils.copyProperties(e, KwpGoodsPriceRange.class);
-                priceRange.setGoodsId(goodsId);
-                list.add(priceRange);
-            });
-            kwpGoodsPriceRangeService.insertBatch(list);
+        if (param.getPrice() != null) {
+            KwpGoodsPriceRange priceRange = new KwpGoodsPriceRange();
+            priceRange.setGoodsId(goodsId);
+            priceRange.setPrice(param.getPrice());
+            kwpGoodsPriceRangeService.insertBatch(Lists.newArrayList(priceRange));
         }
 
         //更新商品辅助单位信息
@@ -472,18 +469,6 @@ public class KwpGoodsService {
         if (StringUtils.isBlank(param.getUnit())) {
             return "计量单位不能为空!";
         }
-        if (Objects.isNull(param.getAmount())) {
-            return "库存数量不能为空!";
-        }
-        if (StringUtils.isBlank(param.getTaxRate())) {
-            return "发票税率不能为空!";
-        }
-        if (Objects.isNull(param.getPrepaidLimit())) {
-            return "是否设置预付限额不能为空!";
-        }
-        if (Objects.equals(param.getPrepaidLimit(), 1) && Objects.isNull(param.getAdvancePrice())) {
-            return "设置预付限额时,预付款最低限额不能为空!";
-        }
 
         List<GoodsAttributes> attributes = param.getAttributes();
         if (CollectionUtils.isNotEmpty(attributes)) {
@@ -504,24 +489,11 @@ public class KwpGoodsService {
                 }
             }
         }
-        List<GoodsPriceRanges> priceRanges = param.getPriceRanges();
-        if (CollectionUtils.isEmpty(priceRanges)) {
-            return "价格梯度不能为空!";
-        }
-        for (GoodsPriceRanges e : priceRanges) {
-            if (Objects.isNull(e.getStartAmount()) || e.getStartAmount().compareTo(BigDecimal.ZERO) <= 0) {
-                return "起售量不能为空且必须大于零!";
-            }
-            if (Objects.isNull(e.getEndAmount()) || e.getEndAmount().compareTo(new BigDecimal("-1.00")) < 0) {
-                return "上限售量不能为空且必须大于零!";
-            }
-            if (Objects.isNull(e.getPrice()) || e.getStartAmount().compareTo(BigDecimal.ZERO) <= 0) {
-                return "含税价不能为空且必须大于零!";
-            }
-            if (Objects.isNull(e.getSort())) {
-                return "价格梯度顺序不能为空!";
-            }
+        BigDecimal price = param.getPrice();
+        if (price == null) {
+            return "价格不能为空!";
         }
+
         AddressInfo address = param.getAddressInfo();
         if (Objects.isNull(address)) {
             return "地址信息不能为空!";
@@ -553,9 +525,6 @@ public class KwpGoodsService {
         if (Objects.isNull(param.getSupplyEntId())) {
             return "供应企业不能为空!";
         }
-        if (Objects.isNull(param.getManager())) {
-            return "客户经理不能为空!";
-        }
         return null;
     }
 
@@ -637,8 +606,6 @@ public class KwpGoodsService {
         goodsLists.forEach(e -> {
             GoodsListExport export = BeanUtils.copyProperties(e, GoodsListExport.class);
             export.setAmount(Objects.isNull(e.getAmount()) ? null : String.valueOf(e.getAmount()))
-                    .setHighestPrice(Objects.isNull(e.getHighestPrice()) ? null : String.valueOf(e.getHighestPrice()))
-                    .setLowestPrice(Objects.isNull(e.getLowestPrice()) ? null : String.valueOf(e.getLowestPrice()))
                     .setAddedTime(Objects.isNull(e.getAddedTime()) ? null : DateUtil.getDateTime(e.getAddedTime()))
                     .setShelfTime(Objects.isNull(e.getShelfTime()) ? null : DateUtil.getDateTime(e.getShelfTime()))
                     .setCreateTime(Objects.isNull(e.getCreateTime()) ? null : DateUtil.getDateTime(e.getCreateTime()));
@@ -744,7 +711,6 @@ public class KwpGoodsService {
         list.forEach(e -> {
             Long id = e.getId();
             GoodsList goodsList = BeanUtils.copyProperties(e, GoodsList.class);
-            UserCacheResDto manager = userMap.get(e.getManager());
             UserCacheResDto createUser = userMap.get(e.getCreateBy());
             goodsList.setStatusLabel(CollectionUtils.isNotEmpty(goodsStatusMap) ? goodsStatusMap.get(String.valueOf(goodsList.getStatus())) : null)
                     .setGoodsTypeLabel(CollectionUtils.isNotEmpty(productNameMap) ? productNameMap.get(goodsList.getGoodsType()) : null)
@@ -752,11 +718,15 @@ public class KwpGoodsService {
                     .setSupplyEnt(entMap.get(e.getSupplyEntId()))
                     .setThumb(FileUtils.splice(e.getThumb()))
                     .setCreateByName(Objects.nonNull(createUser) ? createUser.getName() : null);
+
             List<KwpGoodsPriceRange> priceRanges = priceRangeMap.get(id);
-            if (CollectionUtils.isNotEmpty(priceRanges)) {
-                goodsList.setHighestPrice(priceRanges.get(priceRanges.size() - 1).getPrice())
-                        .setLowestPrice(priceRanges.get(0).getPrice());
-            }
+            BigDecimal price = Optional.ofNullable(priceRanges)
+                    .filter(priceRangeList -> !priceRangeList.isEmpty())
+                    .map(priceRangeList -> priceRangeList.get(0))
+                    .map(KwpGoodsPriceRange::getPrice)
+                    .orElse(null);
+                goodsList.setPrice(price);
+
             result.add(goodsList);
         });
         return result;
@@ -780,13 +750,17 @@ public class KwpGoodsService {
         if (Objects.equals(GoodsStatusEnum.PUT_ON_SHELVES.getCode(), goods.getStatus())) {
             throw new BusinessException("上架操作仅针对“已下架”“草稿”状态的单据!");
         }
-        if (goods.getAmount().compareTo(BigDecimal.ZERO) <= 0) {
-            throw new BusinessException("商品上架必须库存大于零!");
-        }
         if (Objects.equals(GoodsStatusEnum.SAVED.getCode(), goods.getStatus())) {
             UpdateGoodsParam updateParam = BeanUtils.copyProperties(goods, UpdateGoodsParam.class);
             updateParam.setAttributes(BeanUtils.copyToList(kwpGoodsAttributeService.getByGoodsId(id), GoodsAttributes.class));
-            updateParam.setPriceRanges(BeanUtils.copyToList(kwpGoodsPriceRangeService.getByGoodsId(id), GoodsPriceRanges.class));
+            //价格
+            List<KwpGoodsPriceRange> priceRanges = kwpGoodsPriceRangeService.getByGoodsId(id);
+            BigDecimal price = Optional.ofNullable(priceRanges)
+                    .filter(priceRangeList -> !priceRangeList.isEmpty())
+                    .map(priceRangeList -> priceRangeList.get(0))
+                    .map(KwpGoodsPriceRange::getPrice)
+                    .orElse(null);
+            updateParam.setPrice(price);
             updateParam.setImages(BeanUtils.copyToList(kwpGoodsImageService.getByGoodsId(id), GoodsImages.class));
             updateParam.setAddressInfo(BeanUtils.copyProperties(kwpGoodsAddressService.getByGoodsId(id), AddressInfo.class));
             String msg = judgeParameters(updateParam);
@@ -1325,7 +1299,7 @@ public class KwpGoodsService {
     public GoodsInfoResp getGoods( GoodsInfoReq req) {
         log.info("查询商品信息,请求参数 :{}", JSON.toJSONString(req));
         //查询上商品信息
-        List<KwpGoods> goods =  kwpGoodsRepository.queryByEntIdAndGoodsName(req.getEntId(), req.getGoodsName());
+        List<KwpGoods> goods =  kwpGoodsRepository.queryByEntIdAndGoodsName(Long.valueOf(req.getEntId()), req.getGoodsName());
         if (org.apache.commons.collections4.CollectionUtils.isEmpty( goods)){
             return new GoodsInfoResp();
         }