Merge branch 'master' of http://gitea.zianxin.com/zianxin-tec/biz-api-cloud
This commit is contained in:
commit
8e6d2c6f01
4 files changed
+11
-12
No files matched your search
-8
@@ -40,29 +40,21 @@ public class SmErpSpuImportDto {
|
||||
private Integer packageNum; // 装数
|
||||
|
||||
@ExcelProperty("进价")
|
||||
// @JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
// @JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
private Integer purchasePrice; // 进价
|
||||
|
||||
@ExcelProperty("零售价")
|
||||
// @JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
// @JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
private Integer retailPrice; // 零售价
|
||||
|
||||
@ExcelProperty("货商")
|
||||
private String supplier; // 货商
|
||||
|
||||
@ExcelProperty("促销价")
|
||||
@JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
@JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
private Integer promotionPrice; // 促销价
|
||||
|
||||
@ExcelProperty("商品性质")
|
||||
private String commodityNature; // 商品性质
|
||||
|
||||
@ExcelProperty("成本单价")
|
||||
@JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
@JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
private Integer costPrice; // 成本单价
|
||||
|
||||
@ExcelProperty("库存上限")
|
||||
|
||||
+3
@@ -14,6 +14,9 @@ import lombok.Data;
|
||||
public class SmErpSupplierSimpleVo {
|
||||
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Schema(description="id")
|
||||
private Long supplierId;
|
||||
|
||||
|
||||
+6
-2
@@ -971,8 +971,10 @@ public class SmErpSpuServiceImpl extends ServiceImpl<SmErpSpuMapper, SmErpSpuEnt
|
||||
SmErpSpuEntity existingSpu = existingSpuMap.get(productCode);
|
||||
if (existingSpu != null) {
|
||||
// 更新模式:设置原有主键
|
||||
spu.setId(existingSpu.getId());
|
||||
updateBatch.add(spu);
|
||||
// spu.setId(existingSpu.getId());
|
||||
// updateBatch.add(spu);
|
||||
errorReasons.add(existingSpu.getProductCode()+"-"+existingSpu.getProductName()+",该货号商品系统中已存在");
|
||||
errorList.add(createErrorInfo(rowNumber, productCode, errorReasons));
|
||||
} else {
|
||||
// 新增模式
|
||||
insertBatch.add(spu);
|
||||
@@ -1028,6 +1030,8 @@ public class SmErpSpuServiceImpl extends ServiceImpl<SmErpSpuMapper, SmErpSpuEnt
|
||||
// 处理单位数据
|
||||
SmErpUnitEntity unit = new SmErpUnitEntity();
|
||||
org.springframework.beans.BeanUtils.copyProperties(dto, unit);
|
||||
unit.setPurchasePrice(dto.getPurchasePrice()*100);
|
||||
unit.setRetailPrice(dto.getRetailPrice()*100);
|
||||
unit.setSpuId(spu.getId());
|
||||
unit.setIsBase(true);
|
||||
unitBatch.add(unit);
|
||||
|
||||
+2
-2
@@ -59,8 +59,8 @@
|
||||
u.retail_price,
|
||||
u.promotion_price,
|
||||
u.spu_id
|
||||
FROM supermarket_unit u
|
||||
LEFT JOIN supermarket_spu s
|
||||
FROM sm_erp_unit u
|
||||
LEFT JOIN sm_erp_spu s
|
||||
on u.spu_id = s.id
|
||||
<where>
|
||||
u.del_flag = '0'
|
||||
|
||||
Reference in new issue
Block a user