This commit is contained in:
parent
a4559e550c
commit
07ac905a2c
|
|
@ -18,8 +18,8 @@ public class CodeGen {
|
||||||
private final static String DATABASE = "czg_cashier_test";
|
private final static String DATABASE = "czg_cashier_test";
|
||||||
private final static String OLD_DATABASE = "fycashier";
|
private final static String OLD_DATABASE = "fycashier";
|
||||||
|
|
||||||
private final static boolean IS_OLD_VERSION = false;
|
// private final static boolean IS_OLD_VERSION = false;
|
||||||
// private final static boolean IS_OLD_VERSION = true;
|
private final static boolean IS_OLD_VERSION = true;
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
//配置数据源
|
//配置数据源
|
||||||
|
|
@ -81,7 +81,7 @@ public class CodeGen {
|
||||||
//设置表前缀和只生成哪些表,setGenerateTable 未配置时,生成所有表
|
//设置表前缀和只生成哪些表,setGenerateTable 未配置时,生成所有表
|
||||||
globalConfig.getStrategyConfig()
|
globalConfig.getStrategyConfig()
|
||||||
.setTablePrefix("tb_")
|
.setTablePrefix("tb_")
|
||||||
.setGenerateTable("tb_free_dine_config");
|
.setGenerateTable("tb_product_stock_detail", "tb_product_stock_operate", "tb_product_stocktakin");
|
||||||
|
|
||||||
EntityConfig entityConfig = globalConfig.getEntityConfig();
|
EntityConfig entityConfig = globalConfig.getEntityConfig();
|
||||||
if (IS_OLD_VERSION) {
|
if (IS_OLD_VERSION) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,165 @@
|
||||||
|
package com.czg.mergedata.cur.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Date;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 耗材库存变动记录 实体类。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("tb_cons_stock_flow")
|
||||||
|
public class CurConsStockFlow implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺id
|
||||||
|
*/
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商id
|
||||||
|
*/
|
||||||
|
private Long vendorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出入库类型 in-入库 out-出库
|
||||||
|
*/
|
||||||
|
private String inOutType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出入库名目 manual-in:手动入库 manual-out:手动出库 win-in:盘盈入库 loss-out:盘亏出库 order-in:订单退款入库 order-out:订单消费出库
|
||||||
|
*/
|
||||||
|
private String inOutItem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出入库日期
|
||||||
|
*/
|
||||||
|
private Date inOutDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应付金额
|
||||||
|
*/
|
||||||
|
private BigDecimal amountPayable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实付金额
|
||||||
|
*/
|
||||||
|
private BigDecimal actualPaymentAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付款日期
|
||||||
|
*/
|
||||||
|
private Date paymentDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批次号
|
||||||
|
*/
|
||||||
|
private String batchNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 耗材id
|
||||||
|
*/
|
||||||
|
private Long conId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 耗材名称
|
||||||
|
*/
|
||||||
|
private String conName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采购价/进价
|
||||||
|
*/
|
||||||
|
private BigDecimal purchasePrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动前的库存
|
||||||
|
*/
|
||||||
|
private BigDecimal beforeNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出入库数量
|
||||||
|
*/
|
||||||
|
private BigDecimal inOutNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动后的库存
|
||||||
|
*/
|
||||||
|
private BigDecimal afterNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小计
|
||||||
|
*/
|
||||||
|
private BigDecimal subTotal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品id
|
||||||
|
*/
|
||||||
|
private Long productId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sku id
|
||||||
|
*/
|
||||||
|
private Long skuId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品订单id
|
||||||
|
*/
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相关图片urls,json数组
|
||||||
|
*/
|
||||||
|
private String imgUrls;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人id
|
||||||
|
*/
|
||||||
|
private Long createUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人name
|
||||||
|
*/
|
||||||
|
private String createUserName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,120 @@
|
||||||
|
package com.czg.mergedata.cur.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Date;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品库存变动记录 实体类。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("tb_product_stock_flow")
|
||||||
|
public class CurProductStockFlow implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺id
|
||||||
|
*/
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出入库类型 in-入库 out-出库
|
||||||
|
*/
|
||||||
|
private String inOutType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出入库名目 manual-in:手动入库 manual-out:手动出库 win-in:盘盈入库 loss-out:盘亏出库 order-in:订单退款入库 order-out:订单消费出库
|
||||||
|
*/
|
||||||
|
private String inOutItem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出入库日期
|
||||||
|
*/
|
||||||
|
private Date inOutDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品id
|
||||||
|
*/
|
||||||
|
private Long productId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品名称
|
||||||
|
*/
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动前的库存
|
||||||
|
*/
|
||||||
|
private BigDecimal beforeNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出入库数量
|
||||||
|
*/
|
||||||
|
private BigDecimal inOutNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动后的库存
|
||||||
|
*/
|
||||||
|
private BigDecimal afterNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品订单id
|
||||||
|
*/
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相关图片urls,json数组
|
||||||
|
*/
|
||||||
|
private String imgUrls;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人id
|
||||||
|
*/
|
||||||
|
private Long createUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人name
|
||||||
|
*/
|
||||||
|
private String createUserName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.czg.mergedata.cur.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.czg.mergedata.cur.entity.CurConsStockFlow;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 耗材库存变动记录 映射层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
public interface CurConsStockFlowMapper extends BaseMapper<CurConsStockFlow> {
|
||||||
|
|
||||||
|
@Select("truncate tb_cons_stock_flow")
|
||||||
|
void truncateTable();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.czg.mergedata.cur.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.czg.mergedata.cur.entity.CurProductStockFlow;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品库存变动记录 映射层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
public interface CurProductStockFlowMapper extends BaseMapper<CurProductStockFlow> {
|
||||||
|
|
||||||
|
@Select("truncate tb_product_stock_flow")
|
||||||
|
void truncateTable();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.czg.mergedata.cur.service;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
|
import com.czg.mergedata.cur.entity.CurConsStockFlow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 耗材库存变动记录 服务层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
public interface CurConsStockFlowService extends IService<CurConsStockFlow> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.czg.mergedata.cur.service;
|
||||||
|
|
||||||
|
import com.czg.mergedata.common.resp.CzgResult;
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
|
import com.czg.mergedata.cur.entity.CurProductStockFlow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品库存变动记录 服务层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
public interface CurProductStockFlowService extends IService<CurProductStockFlow> {
|
||||||
|
|
||||||
|
CzgResult<String> mergeData();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.czg.mergedata.cur.service.impl;
|
||||||
|
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import com.czg.mergedata.cur.entity.CurConsStockFlow;
|
||||||
|
import com.czg.mergedata.cur.mapper.CurConsStockFlowMapper;
|
||||||
|
import com.czg.mergedata.cur.service.CurConsStockFlowService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 耗材库存变动记录 服务层实现。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CurConsStockFlowServiceImpl extends ServiceImpl<CurConsStockFlowMapper, CurConsStockFlow> implements CurConsStockFlowService{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.czg.mergedata.cur.service.impl;
|
||||||
|
|
||||||
|
import com.czg.mergedata.common.resp.CzgResult;
|
||||||
|
import com.czg.mergedata.old.service.OldProductStockDetailService;
|
||||||
|
import com.czg.mergedata.old.service.OldProductStockOperateService;
|
||||||
|
import com.czg.mergedata.old.service.OldProductStocktakinService;
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import com.czg.mergedata.cur.entity.CurProductStockFlow;
|
||||||
|
import com.czg.mergedata.cur.mapper.CurProductStockFlowMapper;
|
||||||
|
import com.czg.mergedata.cur.service.CurProductStockFlowService;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品库存变动记录 服务层实现。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CurProductStockFlowServiceImpl extends ServiceImpl<CurProductStockFlowMapper, CurProductStockFlow> implements CurProductStockFlowService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private OldProductStockDetailService oldProductStockDetailService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private OldProductStockOperateService oldProductStockOperateService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private OldProductStocktakinService oldProductStocktakinService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CzgResult<String> mergeData() {
|
||||||
|
getMapper().truncateTable();
|
||||||
|
|
||||||
|
|
||||||
|
return CzgResult.success("合并成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void mergeProductStockDetail() {}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,148 @@
|
||||||
|
package com.czg.mergedata.old.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.BigInteger;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品库存详情 实体类。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("tb_product_stock_detail")
|
||||||
|
public class OldProductStockDetail implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
|
private BigInteger id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* skuId
|
||||||
|
*/
|
||||||
|
private String skuId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品Id
|
||||||
|
*/
|
||||||
|
private String productId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品名称
|
||||||
|
*/
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否开启库存
|
||||||
|
*/
|
||||||
|
private Integer isStock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格
|
||||||
|
*/
|
||||||
|
private String specSnap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品单位
|
||||||
|
*/
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺Id
|
||||||
|
*/
|
||||||
|
private String shopId;
|
||||||
|
|
||||||
|
private String recordId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作批次号
|
||||||
|
*/
|
||||||
|
private String batchNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存操作来源:收银端调用 CASHIER 系统后台调用SHOP
|
||||||
|
*/
|
||||||
|
private String sourcePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联订单Id
|
||||||
|
*/
|
||||||
|
private String orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1:入库 -1:出库
|
||||||
|
*/
|
||||||
|
private Integer subType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* purchase采购入库 transfer调拔入库
|
||||||
|
stockpile存酒入库
|
||||||
|
2盘点入库3退货入库4期初5生产归还入库6内部令用归还7借出归还8其它入库9调拔出库sale销售出库11盘点出库12锁定13生产领料14内部领用15借用出库16其它出库17报废出库
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上次剩余数量
|
||||||
|
*/
|
||||||
|
private Integer leftNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出入库时间
|
||||||
|
*/
|
||||||
|
private Long stockTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次操作库存数量
|
||||||
|
*/
|
||||||
|
private Double stockNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库合计成本金额
|
||||||
|
*/
|
||||||
|
private BigDecimal costAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出售合计金额
|
||||||
|
*/
|
||||||
|
private BigDecimal salesAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作人
|
||||||
|
*/
|
||||||
|
private String operator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存镜像
|
||||||
|
*/
|
||||||
|
private String stockSnap;
|
||||||
|
|
||||||
|
private String barCode;
|
||||||
|
|
||||||
|
private String coverImg;
|
||||||
|
|
||||||
|
private Long createdAt;
|
||||||
|
|
||||||
|
private Long updatedAt;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
package com.czg.mergedata.old.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作日志 实体类。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("tb_product_stock_operate")
|
||||||
|
public class OldProductStockOperate implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺Id
|
||||||
|
*/
|
||||||
|
private String shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作镜像
|
||||||
|
*/
|
||||||
|
private String stockSnap;
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
private Integer subType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批次
|
||||||
|
*/
|
||||||
|
private String batchNumber;
|
||||||
|
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作时间
|
||||||
|
*/
|
||||||
|
private Long stockTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作人
|
||||||
|
*/
|
||||||
|
private String operatorSnap;
|
||||||
|
|
||||||
|
private Long createdAt;
|
||||||
|
|
||||||
|
private Long updatedAt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商Id
|
||||||
|
*/
|
||||||
|
private String purveyorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商名称
|
||||||
|
*/
|
||||||
|
private String purveyorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* nullify作废normal正常
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
package com.czg.mergedata.old.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点表 实体类。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("tb_product_stocktakin")
|
||||||
|
public class OldProductStocktakin implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺id
|
||||||
|
*/
|
||||||
|
private Integer productId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* skuId
|
||||||
|
*/
|
||||||
|
private Integer skuId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品封面
|
||||||
|
*/
|
||||||
|
private String coverImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存数量
|
||||||
|
*/
|
||||||
|
private Integer stock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 盘点数量
|
||||||
|
*/
|
||||||
|
private Integer inventoryStock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 盈亏金额
|
||||||
|
*/
|
||||||
|
private BigDecimal phasePrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 盈亏数量
|
||||||
|
*/
|
||||||
|
private Integer phaseNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺id
|
||||||
|
*/
|
||||||
|
private Integer shopId;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.czg.mergedata.old.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.UseDataSource;
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.czg.mergedata.old.entity.OldProductStockDetail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品库存详情 映射层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
@UseDataSource("ds2")
|
||||||
|
public interface OldProductStockDetailMapper extends BaseMapper<OldProductStockDetail> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.czg.mergedata.old.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.UseDataSource;
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.czg.mergedata.old.entity.OldProductStockOperate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作日志 映射层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
@UseDataSource("ds2")
|
||||||
|
public interface OldProductStockOperateMapper extends BaseMapper<OldProductStockOperate> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.czg.mergedata.old.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.UseDataSource;
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.czg.mergedata.old.entity.OldProductStocktakin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点表 映射层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
@UseDataSource("ds2")
|
||||||
|
public interface OldProductStocktakinMapper extends BaseMapper<OldProductStocktakin> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.czg.mergedata.old.service;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
|
import com.czg.mergedata.old.entity.OldProductStockDetail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品库存详情 服务层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
public interface OldProductStockDetailService extends IService<OldProductStockDetail> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.czg.mergedata.old.service;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
|
import com.czg.mergedata.old.entity.OldProductStockOperate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作日志 服务层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
public interface OldProductStockOperateService extends IService<OldProductStockOperate> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.czg.mergedata.old.service;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
|
import com.czg.mergedata.old.entity.OldProductStocktakin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点表 服务层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
public interface OldProductStocktakinService extends IService<OldProductStocktakin> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.czg.mergedata.old.service.impl;
|
||||||
|
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import com.czg.mergedata.old.entity.OldProductStockDetail;
|
||||||
|
import com.czg.mergedata.old.mapper.OldProductStockDetailMapper;
|
||||||
|
import com.czg.mergedata.old.service.OldProductStockDetailService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品库存详情 服务层实现。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OldProductStockDetailServiceImpl extends ServiceImpl<OldProductStockDetailMapper, OldProductStockDetail> implements OldProductStockDetailService{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.czg.mergedata.old.service.impl;
|
||||||
|
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import com.czg.mergedata.old.entity.OldProductStockOperate;
|
||||||
|
import com.czg.mergedata.old.mapper.OldProductStockOperateMapper;
|
||||||
|
import com.czg.mergedata.old.service.OldProductStockOperateService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作日志 服务层实现。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OldProductStockOperateServiceImpl extends ServiceImpl<OldProductStockOperateMapper, OldProductStockOperate> implements OldProductStockOperateService{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.czg.mergedata.old.service.impl;
|
||||||
|
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import com.czg.mergedata.old.entity.OldProductStocktakin;
|
||||||
|
import com.czg.mergedata.old.mapper.OldProductStocktakinMapper;
|
||||||
|
import com.czg.mergedata.old.service.OldProductStocktakinService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点表 服务层实现。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OldProductStocktakinServiceImpl extends ServiceImpl<OldProductStocktakinMapper, OldProductStocktakin> implements OldProductStocktakinService{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.czg.mergedata.cur.mapper.CurConsStockFlowMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.czg.mergedata.cur.mapper.CurProductStockFlowMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.czg.mergedata.old.mapper.OldProductStockDetailMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.czg.mergedata.old.mapper.OldProductStockOperateMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.czg.mergedata.old.mapper.OldProductStocktakinMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue