## 产品添加仓储编号;
This commit is contained in:
parent
d57f12fd94
commit
cf186d98c7
|
@ -293,11 +293,9 @@ public class BdProductController extends BaseController {
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询产品规格
|
* 查询产品规格
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@PostMapping("/get-product-specs")
|
@PostMapping("/get-product-specs")
|
||||||
public AjaxResult getProductSpecs(@RequestBody ProductParams productParams) {
|
public AjaxResult getProductSpecs(@RequestBody ProductParams productParams) {
|
||||||
List<Integer> productIds = productParams.getProductIds();
|
List<Integer> productIds = productParams.getProductIds();
|
||||||
|
@ -358,7 +356,6 @@ public class BdProductController extends BaseController {
|
||||||
/**
|
/**
|
||||||
* 查询产品规格(带是否赠品)
|
* 查询产品规格(带是否赠品)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@PostMapping("/get-product-specs-gift")
|
@PostMapping("/get-product-specs-gift")
|
||||||
public AjaxResult getProductSpecsGift(@RequestBody ProductParams productParams) {
|
public AjaxResult getProductSpecsGift(@RequestBody ProductParams productParams) {
|
||||||
List<ProductGiftParam> productGiftList = productParams.getProductGiftList();
|
List<ProductGiftParam> productGiftList = productParams.getProductGiftList();
|
||||||
|
@ -422,7 +419,6 @@ public class BdProductController extends BaseController {
|
||||||
/**
|
/**
|
||||||
* 查询产品规格
|
* 查询产品规格
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@PostMapping("/get-product-code-specs")
|
@PostMapping("/get-product-code-specs")
|
||||||
public AjaxResult getProductCodeSpecs(@RequestBody ProductParams productParams) {
|
public AjaxResult getProductCodeSpecs(@RequestBody ProductParams productParams) {
|
||||||
List<String> productCodes = productParams.getProductCodes();
|
List<String> productCodes = productParams.getProductCodes();
|
||||||
|
@ -473,13 +469,11 @@ public class BdProductController extends BaseController {
|
||||||
specsTypeParam.setSpecsList(resultSpecsList);
|
specsTypeParam.setSpecsList(resultSpecsList);
|
||||||
specsTypeParamList.add(specsTypeParam);
|
specsTypeParamList.add(specsTypeParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
productSpecsInfo.setSpecsTypeData(specsTypeParamList);
|
productSpecsInfo.setSpecsTypeData(specsTypeParamList);
|
||||||
}
|
}
|
||||||
resultList.add(productSpecsInfo);
|
resultList.add(productSpecsInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
return AjaxResult.success(resultList);
|
return AjaxResult.success(resultList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -248,4 +248,9 @@ public class ProductParams implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Date removalTime;
|
private Date removalTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓储产品编号
|
||||||
|
*/
|
||||||
|
private String wmsCode;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,12 @@ public class BdProductServiceImpl extends ServiceImpl<BdProductMapper, BdProduct
|
||||||
bdProduct.setPkSupplier(cubasdoc.getPkSupplier());
|
bdProduct.setPkSupplier(cubasdoc.getPkSupplier());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isEmpty(bdProduct.getWmsCode())) {
|
||||||
|
// 仓储产品编号为空,则默认使用产品编号
|
||||||
|
bdProduct.setWmsCode(bdProduct.getProductCode());
|
||||||
|
}
|
||||||
this.save(bdProduct);
|
this.save(bdProduct);
|
||||||
|
|
||||||
// 生成拓展表
|
// 生成拓展表
|
||||||
BdProductExtend productExtend = BeanUtil.copyProperties(productParams, BdProductExtend.class);
|
BdProductExtend productExtend = BeanUtil.copyProperties(productParams, BdProductExtend.class);
|
||||||
productExtend.setPkProduct(bdProduct.getPkId());
|
productExtend.setPkProduct(bdProduct.getPkId());
|
||||||
|
@ -236,6 +241,10 @@ public class BdProductServiceImpl extends ServiceImpl<BdProductMapper, BdProduct
|
||||||
if (productParams.getIsPutOn().equals(EYesNo.NO.getIntValue())) {
|
if (productParams.getIsPutOn().equals(EYesNo.NO.getIntValue())) {
|
||||||
bdProduct.setRemovalTime(DateUtils.currentDateTime());
|
bdProduct.setRemovalTime(DateUtils.currentDateTime());
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isEmpty(bdProduct.getWmsCode())) {
|
||||||
|
// 仓储产品编号为空,则默认使用产品编号
|
||||||
|
bdProduct.setWmsCode(bdProduct.getProductCode());
|
||||||
|
}
|
||||||
this.updateById(bdProduct);
|
this.updateById(bdProduct);
|
||||||
// 生成拓展表
|
// 生成拓展表
|
||||||
BdProductExtend productExtend = BeanUtil.copyProperties(productParams, BdProductExtend.class);
|
BdProductExtend productExtend = BeanUtil.copyProperties(productParams, BdProductExtend.class);
|
||||||
|
|
|
@ -1,27 +1,14 @@
|
||||||
package com.hzs.sale.product.vo;
|
package com.hzs.sale.product.vo;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import com.hzs.common.core.annotation.BigDecimalFormat;
|
import com.hzs.common.core.annotation.BigDecimalFormat;
|
||||||
import com.hzs.common.core.annotation.Excel;
|
import com.hzs.common.core.annotation.Excel;
|
||||||
import com.hzs.common.core.web.domain.BaseEntity;
|
|
||||||
import com.hzs.common.domain.sale.product.BdProduct;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description:
|
|
||||||
* @Author: yuhui
|
|
||||||
* @Time: 2022/10/28 16:26
|
|
||||||
* @Classname: ProductVo
|
|
||||||
* @PackageName: com.hzs.sale.product.vo
|
|
||||||
*/
|
|
||||||
@Data
|
@Data
|
||||||
public class ProductVo implements Serializable {
|
public class ProductVo implements Serializable {
|
||||||
|
|
||||||
|
@ -57,11 +44,9 @@ public class ProductVo implements Serializable {
|
||||||
@Excel(name = "产品编码")
|
@Excel(name = "产品编码")
|
||||||
private String productCode;
|
private String productCode;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所属分类
|
* 所属分类
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private Integer pkClassify;
|
private Integer pkClassify;
|
||||||
/**
|
/**
|
||||||
* 发货渠道
|
* 发货渠道
|
||||||
|
@ -184,7 +169,7 @@ public class ProductVo implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Integer isMerge;
|
private Integer isMerge;
|
||||||
/**
|
/**
|
||||||
*合并发货 翻译
|
* 合并发货 翻译
|
||||||
*/
|
*/
|
||||||
@Excel(name = "合并发货")
|
@Excel(name = "合并发货")
|
||||||
private String isMergeVal;
|
private String isMergeVal;
|
||||||
|
@ -199,11 +184,9 @@ public class ProductVo implements Serializable {
|
||||||
@Excel(name = "冷链运输")
|
@Excel(name = "冷链运输")
|
||||||
private String isFreshVal;
|
private String isFreshVal;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否海运
|
* 是否海运
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private Integer isOceanTrans;
|
private Integer isOceanTrans;
|
||||||
/**
|
/**
|
||||||
* 是否空运
|
* 是否空运
|
||||||
|
@ -213,7 +196,6 @@ public class ProductVo implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 是否陆运
|
* 是否陆运
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private Integer isLandTrans;
|
private Integer isLandTrans;
|
||||||
/**
|
/**
|
||||||
* 运输方式合并 / 分割
|
* 运输方式合并 / 分割
|
||||||
|
@ -221,11 +203,10 @@ public class ProductVo implements Serializable {
|
||||||
@Excel(name = "运输方式")
|
@Excel(name = "运输方式")
|
||||||
private String typeShippingMerge;
|
private String typeShippingMerge;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上下架
|
* 上下架
|
||||||
*/
|
*/
|
||||||
@Excel(name = "上下架状态",readConverterExp = "0=上架,1=下架")
|
@Excel(name = "上下架状态", readConverterExp = "0=上架,1=下架")
|
||||||
private Integer isPutOn;
|
private Integer isPutOn;
|
||||||
/**
|
/**
|
||||||
* 创建人ID
|
* 创建人ID
|
||||||
|
@ -235,7 +216,7 @@ public class ProductVo implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
@Excel(name = "创建时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date creationTime;
|
private Date creationTime;
|
||||||
|
|
||||||
|
@ -275,7 +256,6 @@ public class ProductVo implements Serializable {
|
||||||
*/
|
*/
|
||||||
private String custName;
|
private String custName;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 产品基本信息名称
|
* 产品基本信息名称
|
||||||
*/
|
*/
|
||||||
|
@ -297,5 +277,9 @@ public class ProductVo implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Integer pkCubasdoc;
|
private Integer pkCubasdoc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓储产品编号
|
||||||
|
*/
|
||||||
|
private String wmsCode;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
<result column="PRODUCT_ATTR" property="productAttr"/>
|
<result column="PRODUCT_ATTR" property="productAttr"/>
|
||||||
<result column="SHIPPING_CHANNEL" property="shippingChannel"/>
|
<result column="SHIPPING_CHANNEL" property="shippingChannel"/>
|
||||||
<result column="REPURCHASE_TYPE" property="repurchaseType"/>
|
<result column="REPURCHASE_TYPE" property="repurchaseType"/>
|
||||||
|
<result column="WMS_CODE" property="wmsCode"/>
|
||||||
<collection property="specsList" ofType="com.hzs.common.domain.sale.classify.BdSpecs">
|
<collection property="specsList" ofType="com.hzs.common.domain.sale.classify.BdSpecs">
|
||||||
<result column="PK_SPECS_ID" property="pkId"/>
|
<result column="PK_SPECS_ID" property="pkId"/>
|
||||||
<result column="PK_SPECS_TYPE" property="pkSpecsType"/>
|
<result column="PK_SPECS_TYPE" property="pkSpecsType"/>
|
||||||
|
@ -74,6 +75,7 @@
|
||||||
<result column="IS_PUT_ON" property="isPutOn"/>
|
<result column="IS_PUT_ON" property="isPutOn"/>
|
||||||
<result column="LISTING_TIME" property="listingTime"/>
|
<result column="LISTING_TIME" property="listingTime"/>
|
||||||
<result column="REMOVAL_TIME" property="removalTime"/>
|
<result column="REMOVAL_TIME" property="removalTime"/>
|
||||||
|
<result column="WMS_CODE" property="wmsCode"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="getLastProductCode" resultType="string">
|
<select id="getLastProductCode" resultType="string">
|
||||||
|
|
|
@ -4,10 +4,11 @@ import java.math.BigDecimal;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import com.hzs.common.core.web.domain.BaseEntity;
|
import com.hzs.common.core.web.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -15,12 +16,7 @@ import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* 产品详情
|
||||||
* 邮费详情设置
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author hzs
|
|
||||||
* @since 2022-09-01
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ -168,5 +164,10 @@ public class BdProduct extends BaseEntity {
|
||||||
@TableField("REMOVAL_TIME")
|
@TableField("REMOVAL_TIME")
|
||||||
private Date removalTime;
|
private Date removalTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓储产品编号
|
||||||
|
*/
|
||||||
|
@TableField("WMS_CODE")
|
||||||
|
private String wmsCode;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue