增加库存模块
This commit is contained in:
parent
54c8743cdd
commit
30bdbb8fe8
|
|
@ -20,8 +20,8 @@
|
||||||
<module>order</module>
|
<module>order</module>
|
||||||
<module>shop</module>
|
<module>shop</module>
|
||||||
<module>open</module>
|
<module>open</module>
|
||||||
<!-- <module>scm-module</module>-->
|
<module>stock</module>
|
||||||
<!-- <module>wms-module</module>-->
|
|
||||||
</modules>
|
</modules>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>cn.qihangerp.module</groupId>
|
||||||
|
<artifactId>module</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>cn.qihangerp.module</groupId>
|
||||||
|
<artifactId>stock</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>wms</name>
|
||||||
|
<url>http://maven.apache.org</url>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.qihangerp.core</groupId>
|
||||||
|
<artifactId>common</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.qihangerp.module</groupId>
|
||||||
|
<artifactId>goods</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>3.8.1</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package cn.qihangerp.module;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hello world!
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class App
|
||||||
|
{
|
||||||
|
public static void main( String[] args )
|
||||||
|
{
|
||||||
|
System.out.println( "Hello World!" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
package cn.qihangerp.module.stock;
|
||||||
|
|
||||||
|
public class a {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,134 @@
|
||||||
|
package cn.qihangerp.module.stock.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库库存操作记录表
|
||||||
|
* @TableName wms_inventory_operation
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WmsInventoryOperation implements Serializable {
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品id
|
||||||
|
*/
|
||||||
|
private Long goodsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品编码
|
||||||
|
*/
|
||||||
|
private String goodsNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品规格id
|
||||||
|
*/
|
||||||
|
private Long skuId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格编码(唯一)
|
||||||
|
*/
|
||||||
|
private String skuCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存批次id
|
||||||
|
*/
|
||||||
|
private Long batchId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存批次号
|
||||||
|
*/
|
||||||
|
private String batchNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存类型(1增加库存2减少库存3锁定库存)
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品库存id(本表id减库存的时候关联)
|
||||||
|
*/
|
||||||
|
private Long inventoryDetailId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作库存数量
|
||||||
|
*/
|
||||||
|
private Integer quantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 锁定库存数量(status变成已结算时把该字段值更新到quantity)
|
||||||
|
*/
|
||||||
|
private Integer lockedQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 价格(type=1采购价格;type=2出库时的价格)
|
||||||
|
*/
|
||||||
|
private Double price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务类型(10采购入库20采购退货30退货入库40订单出库)
|
||||||
|
*/
|
||||||
|
private Integer bizType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务单id
|
||||||
|
*/
|
||||||
|
private Long bizId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务单号
|
||||||
|
*/
|
||||||
|
private String bizNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务单itemId
|
||||||
|
*/
|
||||||
|
private Long bizItemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(0待结算1已结算)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库id
|
||||||
|
*/
|
||||||
|
private Long warehouseId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓位id
|
||||||
|
*/
|
||||||
|
private Long positionId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,108 @@
|
||||||
|
package cn.qihangerp.module.stock.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库单
|
||||||
|
* @TableName wms_stock_in
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WmsStockIn implements Serializable {
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id",type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库单据编号
|
||||||
|
*/
|
||||||
|
private String stockInNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源类型(1采购订单2退货订单)
|
||||||
|
*/
|
||||||
|
private Integer stockInType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源单号
|
||||||
|
*/
|
||||||
|
private String sourceNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源单id
|
||||||
|
*/
|
||||||
|
private Long sourceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采购订单商品数
|
||||||
|
*/
|
||||||
|
private Integer sourceGoodsUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采购订单总件数
|
||||||
|
*/
|
||||||
|
private Integer sourceSpecUnitTotal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采购订单商品规格数
|
||||||
|
*/
|
||||||
|
private Integer sourceSpecUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作入库人id
|
||||||
|
*/
|
||||||
|
private String stockInOperatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作入库人
|
||||||
|
*/
|
||||||
|
private String stockInOperator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库时间
|
||||||
|
*/
|
||||||
|
private Date stockInTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(0待入库1部分入库2全部入库)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<WmsStockInItem> itemList;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,128 @@
|
||||||
|
package cn.qihangerp.module.stock.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库单明细
|
||||||
|
* @TableName wms_stock_in_item
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WmsStockInItem implements Serializable {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库单id
|
||||||
|
*/
|
||||||
|
private Long stockInId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源类型(1采购订单2退货订单)
|
||||||
|
*/
|
||||||
|
private Integer stockInType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源单号
|
||||||
|
*/
|
||||||
|
private String sourceNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源单id
|
||||||
|
*/
|
||||||
|
private Long sourceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源单itemId
|
||||||
|
*/
|
||||||
|
private Long sourceItemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品id
|
||||||
|
*/
|
||||||
|
private String goodsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品编码
|
||||||
|
*/
|
||||||
|
private String goodsNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品名称
|
||||||
|
*/
|
||||||
|
private String goodsName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品图片
|
||||||
|
*/
|
||||||
|
private String goodsImage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品规格id
|
||||||
|
*/
|
||||||
|
private String skuId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品规格编码
|
||||||
|
*/
|
||||||
|
private String skuCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 颜色
|
||||||
|
*/
|
||||||
|
private String skuName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原始数量
|
||||||
|
*/
|
||||||
|
private Integer quantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库数量
|
||||||
|
*/
|
||||||
|
private Integer inQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(0待入库1部分入库2全部入库)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer intoQuantity;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer positionId;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String positionNum;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,119 @@
|
||||||
|
package cn.qihangerp.module.stock.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库单
|
||||||
|
* @TableName wms_stock_out
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WmsStockOut implements Serializable {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库单编号
|
||||||
|
*/
|
||||||
|
private String stockOutNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源单据号
|
||||||
|
*/
|
||||||
|
private String sourceNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源单据Id
|
||||||
|
*/
|
||||||
|
private Long sourceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库类型1订单拣货出库2采购退货出库3盘点出库4报损出库
|
||||||
|
*/
|
||||||
|
private Integer stockOutType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品数
|
||||||
|
*/
|
||||||
|
private Integer goodsUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品规格数
|
||||||
|
*/
|
||||||
|
private Integer specUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总件数
|
||||||
|
*/
|
||||||
|
private Integer specUnitTotal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已出库数量
|
||||||
|
*/
|
||||||
|
private Integer outTotal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:0待出库1部分出库2全部出库
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印状态:是否打印1已打印0未打印
|
||||||
|
*/
|
||||||
|
private Integer printStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印时间
|
||||||
|
*/
|
||||||
|
private Date printTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库时间
|
||||||
|
*/
|
||||||
|
private Date outTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成出库时间
|
||||||
|
*/
|
||||||
|
private Date completeTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库操作人userid
|
||||||
|
*/
|
||||||
|
private Integer operatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库操作人
|
||||||
|
*/
|
||||||
|
private String operatorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建日期
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,94 @@
|
||||||
|
package cn.qihangerp.module.stock.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库单明细
|
||||||
|
* @TableName wms_stock_out_item
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WmsStockOutItem implements Serializable {
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库类型1订单拣货出库2采购退货出库3盘点出库4报损出库
|
||||||
|
*/
|
||||||
|
private Integer stockOutType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库单id(外键)
|
||||||
|
*/
|
||||||
|
private Long entryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源订单id
|
||||||
|
*/
|
||||||
|
private Long sourceOrderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源订单itemId出库对应的itemId,如:order_item表id、invoice_info表id
|
||||||
|
*/
|
||||||
|
private Long sourceOrderItemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源订单号
|
||||||
|
*/
|
||||||
|
private String sourceOrderNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品id
|
||||||
|
*/
|
||||||
|
private Integer goodsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品规格id
|
||||||
|
*/
|
||||||
|
private Integer specId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格编码
|
||||||
|
*/
|
||||||
|
private String specNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总数量
|
||||||
|
*/
|
||||||
|
private Long originalQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已出库数量
|
||||||
|
*/
|
||||||
|
private Long outQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成出库时间
|
||||||
|
*/
|
||||||
|
private Date completeTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成拣货时间
|
||||||
|
*/
|
||||||
|
private Date pickedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:0待出库1部分出库2全部出库
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
package cn.qihangerp.module.stock.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库仓位详情
|
||||||
|
* @TableName wms_stock_out_item_position
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WmsStockOutItemPosition implements Serializable {
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库单ID
|
||||||
|
*/
|
||||||
|
private Long entryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库单ItemID
|
||||||
|
*/
|
||||||
|
private Long entryItemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存ID
|
||||||
|
*/
|
||||||
|
private Long goodsInventoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存详情ID
|
||||||
|
*/
|
||||||
|
private Long goodsInventoryDetailId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库数量
|
||||||
|
*/
|
||||||
|
private Long quantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库仓位ID
|
||||||
|
*/
|
||||||
|
private Integer locationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库操作人userid
|
||||||
|
*/
|
||||||
|
private Integer operatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库操作人
|
||||||
|
*/
|
||||||
|
private String operatorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库时间
|
||||||
|
*/
|
||||||
|
private Date outTime;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
package cn.qihangerp.module.stock.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库表
|
||||||
|
* @TableName wms_warehouse
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WmsWarehouse implements Serializable {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "id",type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库编号
|
||||||
|
*/
|
||||||
|
private String number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省
|
||||||
|
*/
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市
|
||||||
|
*/
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区
|
||||||
|
*/
|
||||||
|
private String district;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 街道
|
||||||
|
*/
|
||||||
|
private String street;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态0禁用 1正常
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,93 @@
|
||||||
|
package cn.qihangerp.module.stock.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库仓位表
|
||||||
|
* @TableName wms_warehouse_position
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WmsWarehousePosition implements Serializable {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "id",type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库id
|
||||||
|
*/
|
||||||
|
private Integer warehouseId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库/货架编号
|
||||||
|
*/
|
||||||
|
private String number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓位/货架名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上级id
|
||||||
|
*/
|
||||||
|
private Integer parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 层级深度1级2级3级
|
||||||
|
*/
|
||||||
|
private Integer depth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 一级类目id
|
||||||
|
*/
|
||||||
|
private Integer parentId1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二级类目id
|
||||||
|
*/
|
||||||
|
private Integer parentId2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0正常 1删除
|
||||||
|
*/
|
||||||
|
private Integer isDelete;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package cn.qihangerp.module.stock.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsInventoryOperation;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_inventory_operation(仓库库存操作记录表)】的数据库操作Mapper
|
||||||
|
* @createDate 2024-09-23 22:35:19
|
||||||
|
* @Entity cn.qihangerp.wms.domain.WmsInventoryOperation
|
||||||
|
*/
|
||||||
|
public interface WmsInventoryOperationMapper extends BaseMapper<WmsInventoryOperation> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package cn.qihangerp.module.stock.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsStockInItem;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_stock_in_item(入库单明细)】的数据库操作Mapper
|
||||||
|
* @createDate 2024-09-22 16:28:57
|
||||||
|
* @Entity cn.qihangerp.wms.domain.WmsStockInItem
|
||||||
|
*/
|
||||||
|
public interface WmsStockInItemMapper extends BaseMapper<WmsStockInItem> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package cn.qihangerp.module.stock.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsStockIn;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_stock_in(入库单)】的数据库操作Mapper
|
||||||
|
* @createDate 2024-09-22 16:10:08
|
||||||
|
* @Entity cn.qihangerp.wms.domain.WmsStockIn
|
||||||
|
*/
|
||||||
|
public interface WmsStockInMapper extends BaseMapper<WmsStockIn> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package cn.qihangerp.module.stock.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsStockOutItem;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_stock_out_item(出库单明细)】的数据库操作Mapper
|
||||||
|
* @createDate 2024-09-22 11:13:23
|
||||||
|
* @Entity cn.qihangerp.wms.domain.WmsStockOutItem
|
||||||
|
*/
|
||||||
|
public interface WmsStockOutItemMapper extends BaseMapper<WmsStockOutItem> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package cn.qihangerp.module.stock.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsStockOutItemPosition;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_stock_out_item_position(出库仓位详情)】的数据库操作Mapper
|
||||||
|
* @createDate 2024-09-22 11:13:23
|
||||||
|
* @Entity cn.qihangerp.wms.domain.WmsStockOutItemPosition
|
||||||
|
*/
|
||||||
|
public interface WmsStockOutItemPositionMapper extends BaseMapper<WmsStockOutItemPosition> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package cn.qihangerp.module.stock.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsStockOut;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_stock_out(出库单)】的数据库操作Mapper
|
||||||
|
* @createDate 2024-09-22 11:13:23
|
||||||
|
* @Entity cn.qihangerp.wms.domain.WmsStockOut
|
||||||
|
*/
|
||||||
|
public interface WmsStockOutMapper extends BaseMapper<WmsStockOut> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package cn.qihangerp.module.stock.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsWarehouse;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_warehouse(仓库表)】的数据库操作Mapper
|
||||||
|
* @createDate 2024-09-22 11:13:23
|
||||||
|
* @Entity cn.qihangerp.wms.domain.WmsWarehouse
|
||||||
|
*/
|
||||||
|
public interface WmsWarehouseMapper extends BaseMapper<WmsWarehouse> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package cn.qihangerp.module.stock.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsWarehousePosition;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_warehouse_position(仓库仓位表)】的数据库操作Mapper
|
||||||
|
* @createDate 2024-09-22 11:13:23
|
||||||
|
* @Entity cn.qihangerp.wms.domain.WmsWarehousePosition
|
||||||
|
*/
|
||||||
|
public interface WmsWarehousePositionMapper extends BaseMapper<WmsWarehousePosition> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package cn.qihangerp.module.stock.request;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class StockInCreateItem {
|
||||||
|
private String skuId;
|
||||||
|
private String goodsId;
|
||||||
|
private Integer quantity;
|
||||||
|
private String skuCode;
|
||||||
|
private String goodsName;
|
||||||
|
private String goodsImg;
|
||||||
|
private String skuName;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package cn.qihangerp.module.stock.request;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class StockInCreateRequest {
|
||||||
|
private String stockInNum;
|
||||||
|
private Integer stockInType;
|
||||||
|
private String sourceNo;
|
||||||
|
private String stockInOperator;
|
||||||
|
private String remark;
|
||||||
|
private List<StockInCreateItem> itemList;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package cn.qihangerp.module.stock.request;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class StockInItem {
|
||||||
|
private Long id;
|
||||||
|
private Long intoQuantity;
|
||||||
|
private Long positionId;
|
||||||
|
private String positionNum;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package cn.qihangerp.module.stock.request;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class StockInRequest {
|
||||||
|
private Long stockInId;
|
||||||
|
private Long warehouseId;
|
||||||
|
private String stockInOperator;
|
||||||
|
private List<StockInItem> itemList;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package cn.qihangerp.module.stock.service;
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsInventoryOperation;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_inventory_operation(仓库库存操作记录表)】的数据库操作Service
|
||||||
|
* @createDate 2024-09-23 22:35:19
|
||||||
|
*/
|
||||||
|
public interface WmsInventoryOperationService extends IService<WmsInventoryOperation> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package cn.qihangerp.module.stock.service;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsStockInItem;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_stock_in_item(入库单明细)】的数据库操作Service
|
||||||
|
* @createDate 2024-09-22 16:28:57
|
||||||
|
*/
|
||||||
|
public interface WmsStockInItemService extends IService<WmsStockInItem> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package cn.qihangerp.module.stock.service;
|
||||||
|
|
||||||
|
import cn.qihangerp.common.PageQuery;
|
||||||
|
import cn.qihangerp.common.PageResult;
|
||||||
|
import cn.qihangerp.common.ResultVo;
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsStockIn;
|
||||||
|
import cn.qihangerp.module.stock.request.StockInCreateRequest;
|
||||||
|
import cn.qihangerp.module.stock.request.StockInRequest;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_stock_in(入库单)】的数据库操作Service
|
||||||
|
* @createDate 2024-09-22 16:10:08
|
||||||
|
*/
|
||||||
|
public interface WmsStockInService extends IService<WmsStockIn> {
|
||||||
|
PageResult<WmsStockIn> queryPageList(WmsStockIn bo, PageQuery pageQuery);
|
||||||
|
ResultVo<Long> createEntry(Long userId, String userName, StockInCreateRequest request);
|
||||||
|
ResultVo<Long> stockIn(Long userId, String userName, StockInRequest request);
|
||||||
|
|
||||||
|
WmsStockIn getDetailAndItemById(Long id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package cn.qihangerp.module.stock.service;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsStockOutItemPosition;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_stock_out_item_position(出库仓位详情)】的数据库操作Service
|
||||||
|
* @createDate 2024-09-22 11:13:23
|
||||||
|
*/
|
||||||
|
public interface WmsStockOutItemPositionService extends IService<WmsStockOutItemPosition> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package cn.qihangerp.module.stock.service;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsStockOutItem;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_stock_out_item(出库单明细)】的数据库操作Service
|
||||||
|
* @createDate 2024-09-22 11:13:23
|
||||||
|
*/
|
||||||
|
public interface WmsStockOutItemService extends IService<WmsStockOutItem> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package cn.qihangerp.module.stock.service;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsStockOut;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_stock_out(出库单)】的数据库操作Service
|
||||||
|
* @createDate 2024-09-22 11:13:23
|
||||||
|
*/
|
||||||
|
public interface WmsStockOutService extends IService<WmsStockOut> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package cn.qihangerp.module.stock.service;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsWarehousePosition;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_warehouse_position(仓库仓位表)】的数据库操作Service
|
||||||
|
* @createDate 2024-09-22 11:13:23
|
||||||
|
*/
|
||||||
|
public interface WmsWarehousePositionService extends IService<WmsWarehousePosition> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package cn.qihangerp.module.stock.service;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsWarehouse;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_warehouse(仓库表)】的数据库操作Service
|
||||||
|
* @createDate 2024-09-22 11:13:23
|
||||||
|
*/
|
||||||
|
public interface WmsWarehouseService extends IService<WmsWarehouse> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package cn.qihangerp.module.stock.service.impl;
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsInventoryOperation;
|
||||||
|
import cn.qihangerp.module.stock.mapper.WmsInventoryOperationMapper;
|
||||||
|
import cn.qihangerp.module.stock.service.WmsInventoryOperationService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_inventory_operation(仓库库存操作记录表)】的数据库操作Service实现
|
||||||
|
* @createDate 2024-09-23 22:35:19
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WmsInventoryOperationServiceImpl extends ServiceImpl<WmsInventoryOperationMapper, WmsInventoryOperation>
|
||||||
|
implements WmsInventoryOperationService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package cn.qihangerp.module.stock.service.impl;
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsStockInItem;
|
||||||
|
import cn.qihangerp.module.stock.mapper.WmsStockInItemMapper;
|
||||||
|
import cn.qihangerp.module.stock.service.WmsStockInItemService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_stock_in_item(入库单明细)】的数据库操作Service实现
|
||||||
|
* @createDate 2024-09-22 16:28:57
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WmsStockInItemServiceImpl extends ServiceImpl<WmsStockInItemMapper, WmsStockInItem>
|
||||||
|
implements WmsStockInItemService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,208 @@
|
||||||
|
package cn.qihangerp.module.stock.service.impl;
|
||||||
|
|
||||||
|
import cn.qihangerp.common.PageQuery;
|
||||||
|
import cn.qihangerp.common.PageResult;
|
||||||
|
import cn.qihangerp.common.ResultVo;
|
||||||
|
import cn.qihangerp.common.ResultVoEnum;
|
||||||
|
import cn.qihangerp.common.utils.DateUtils;
|
||||||
|
|
||||||
|
import cn.qihangerp.module.goods.domain.OGoodsInventory;
|
||||||
|
import cn.qihangerp.module.goods.domain.OGoodsInventoryBatch;
|
||||||
|
import cn.qihangerp.module.goods.service.OGoodsInventoryBatchService;
|
||||||
|
import cn.qihangerp.module.goods.service.OGoodsInventoryService;
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsStockIn;
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsStockInItem;
|
||||||
|
import cn.qihangerp.module.stock.mapper.WmsStockInMapper;
|
||||||
|
import cn.qihangerp.module.stock.request.StockInCreateItem;
|
||||||
|
import cn.qihangerp.module.stock.request.StockInCreateRequest;
|
||||||
|
import cn.qihangerp.module.stock.request.StockInItem;
|
||||||
|
import cn.qihangerp.module.stock.request.StockInRequest;
|
||||||
|
import cn.qihangerp.module.stock.service.WmsStockInItemService;
|
||||||
|
import cn.qihangerp.module.stock.service.WmsStockInService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_stock_in(入库单)】的数据库操作Service实现
|
||||||
|
* @createDate 2024-09-22 16:10:08
|
||||||
|
*/
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class WmsStockInServiceImpl extends ServiceImpl<WmsStockInMapper, WmsStockIn>
|
||||||
|
implements WmsStockInService {
|
||||||
|
private final WmsStockInMapper mapper;
|
||||||
|
private final WmsStockInItemService inItemService;
|
||||||
|
private final OGoodsInventoryBatchService inventoryBatchService;
|
||||||
|
private final OGoodsInventoryService inventoryService;
|
||||||
|
@Override
|
||||||
|
public PageResult<WmsStockIn> queryPageList(WmsStockIn bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<WmsStockIn> queryWrapper = new LambdaQueryWrapper<WmsStockIn>()
|
||||||
|
.eq( bo.getStatus()!=null,WmsStockIn::getStatus, bo.getStatus())
|
||||||
|
.eq( bo.getStockInType()!=null,WmsStockIn::getStockInType, bo.getStockInType())
|
||||||
|
.eq(StringUtils.isNotBlank(bo.getStockInNum()),WmsStockIn::getStockInNum, bo.getStockInNum())
|
||||||
|
.eq(StringUtils.isNotBlank(bo.getSourceNo()),WmsStockIn::getSourceNo, bo.getSourceNo())
|
||||||
|
.eq(bo.getSourceId()!=null,WmsStockIn::getSourceId, bo.getSourceId())
|
||||||
|
;
|
||||||
|
|
||||||
|
Page<WmsStockIn> pages = mapper.selectPage(pageQuery.build(), queryWrapper);
|
||||||
|
return PageResult.build(pages);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public ResultVo<Long> createEntry(Long userId, String userName, StockInCreateRequest request) {
|
||||||
|
if(request.getStockInType() == null ) return ResultVo.error(ResultVoEnum.ParamsError,"缺少参数stockInType");
|
||||||
|
if(request.getItemList().isEmpty()) return ResultVo.error(ResultVoEnum.ParamsError,"缺少参数itemList");
|
||||||
|
if(StringUtils.isBlank(request.getStockInNum())){
|
||||||
|
request.setStockInNum(DateUtils.parseDateToStr("yyyyMMddHHmmss",new Date()));
|
||||||
|
}
|
||||||
|
if(StringUtils.isBlank(request.getStockInOperator())){
|
||||||
|
request.setStockInOperator(userName);
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, List<StockInCreateItem>> goodsGroup = request.getItemList().stream().collect(Collectors.groupingBy(x -> x.getGoodsId()));
|
||||||
|
Long total = request.getItemList().stream().mapToLong(StockInCreateItem::getQuantity).sum();
|
||||||
|
//添加主表信息
|
||||||
|
WmsStockIn insert = new WmsStockIn();
|
||||||
|
insert.setStockInNum(request.getStockInNum());
|
||||||
|
insert.setStockInType(request.getStockInType());
|
||||||
|
insert.setStockInOperator(request.getStockInOperator());
|
||||||
|
insert.setStockInOperatorId(userId+"");
|
||||||
|
// insert.setStockInTime(new Date());
|
||||||
|
insert.setSourceNo(request.getSourceNo());
|
||||||
|
insert.setRemark(request.getRemark());
|
||||||
|
insert.setCreateBy(userName);
|
||||||
|
insert.setCreateTime(new Date());
|
||||||
|
insert.setSourceGoodsUnit(goodsGroup.size());
|
||||||
|
insert.setSourceSpecUnit(request.getItemList().size());
|
||||||
|
insert.setSourceSpecUnitTotal(total.intValue());
|
||||||
|
insert.setStatus(0);//状态(0待入库1部分入库2全部入库)
|
||||||
|
mapper.insert(insert);
|
||||||
|
|
||||||
|
//添加子表信息
|
||||||
|
List<WmsStockInItem> itemList = new ArrayList<>();
|
||||||
|
for(StockInCreateItem item: request.getItemList()){
|
||||||
|
WmsStockInItem inItem = new WmsStockInItem();
|
||||||
|
inItem.setStockInId(insert.getId());
|
||||||
|
inItem.setStockInType(insert.getStockInType());
|
||||||
|
inItem.setSourceNo(insert.getSourceNo());
|
||||||
|
inItem.setSourceId(0L);
|
||||||
|
inItem.setSourceItemId(0L);
|
||||||
|
inItem.setGoodsId(item.getGoodsId());
|
||||||
|
inItem.setGoodsName(item.getGoodsName());
|
||||||
|
inItem.setGoodsImage(item.getGoodsImg());
|
||||||
|
inItem.setSkuName(item.getSkuName());
|
||||||
|
inItem.setSkuId(item.getSkuId());
|
||||||
|
inItem.setSkuCode(item.getSkuCode());
|
||||||
|
inItem.setQuantity(item.getQuantity());
|
||||||
|
inItem.setInQuantity(0);
|
||||||
|
inItem.setStatus(0);
|
||||||
|
inItem.setCreateBy(userName);
|
||||||
|
inItem.setCreateTime(new Date());
|
||||||
|
itemList.add(inItem);
|
||||||
|
}
|
||||||
|
inItemService.saveBatch(itemList);
|
||||||
|
return ResultVo.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public ResultVo<Long> stockIn(Long userId, String userName, StockInRequest request) {
|
||||||
|
if (request.getStockInId() == null) return ResultVo.error(ResultVoEnum.ParamsError, "缺少参数stockInId");
|
||||||
|
if (request.getWarehouseId() == null) return ResultVo.error(ResultVoEnum.ParamsError, "缺少参数warehouseId");
|
||||||
|
if (request.getItemList().isEmpty()) return ResultVo.error(ResultVoEnum.ParamsError, "缺少入库数据");
|
||||||
|
|
||||||
|
WmsStockIn wmsStockIn = mapper.selectById(request.getStockInId());
|
||||||
|
if (wmsStockIn == null) return ResultVo.error(ResultVoEnum.NotFound, "没有找到入库单");
|
||||||
|
else if (wmsStockIn.getStatus() == 2) {
|
||||||
|
return ResultVo.error(ResultVoEnum.SystemException, "入库单状态不能入库");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<StockInItem> waitList = new ArrayList<>();
|
||||||
|
for (var item : request.getItemList()) {
|
||||||
|
if (item.getIntoQuantity() == null || item.getPositionId() == null) {
|
||||||
|
waitList.add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (waitList.size() == 0) return ResultVo.error(ResultVoEnum.ParamsError, "缺少入库明细数据");
|
||||||
|
|
||||||
|
// 开始入库
|
||||||
|
for (var item:waitList) {
|
||||||
|
// 查询明细
|
||||||
|
WmsStockInItem stockInItem = inItemService.getById(item.getId());
|
||||||
|
if(stockInItem == null){
|
||||||
|
return ResultVo.error(ResultVoEnum.DataError, "数据错误!没有找到入库单明细");
|
||||||
|
}
|
||||||
|
// 添加库存操作表
|
||||||
|
|
||||||
|
// 增加商品库存批次表
|
||||||
|
OGoodsInventoryBatch inventoryBatch = new OGoodsInventoryBatch();
|
||||||
|
inventoryBatch.setBatchNum(DateUtils.parseDateToStr("yyyyMMddHHmmss",new Date()));
|
||||||
|
inventoryBatch.setOriginQty(item.getIntoQuantity());
|
||||||
|
inventoryBatch.setCurrentQty(item.getIntoQuantity());
|
||||||
|
inventoryBatch.setPurPrice(0.0);
|
||||||
|
inventoryBatch.setPurId(0L);
|
||||||
|
inventoryBatch.setPurItemId(0L);
|
||||||
|
inventoryBatch.setSkuId(stockInItem.getSkuId());
|
||||||
|
inventoryBatch.setSkuCode(stockInItem.getSkuCode());
|
||||||
|
inventoryBatch.setGoodsId(stockInItem.getGoodsId());
|
||||||
|
inventoryBatch.setWarehouseId(request.getWarehouseId());
|
||||||
|
inventoryBatch.setPositionId(item.getPositionId());
|
||||||
|
inventoryBatch.setCreateTime(new Date());
|
||||||
|
inventoryBatch.setCreateBy(userName);
|
||||||
|
inventoryBatchService.save(inventoryBatch);
|
||||||
|
// 增加商品库存表
|
||||||
|
List<OGoodsInventory> inventoryList = inventoryService.list(new LambdaQueryWrapper<OGoodsInventory>().eq(OGoodsInventory::getSkuId, stockInItem.getSkuId()));
|
||||||
|
if(inventoryList.isEmpty()) {
|
||||||
|
// 新增
|
||||||
|
OGoodsInventory inventory = new OGoodsInventory();
|
||||||
|
inventory.setGoodsId(stockInItem.getGoodsId());
|
||||||
|
inventory.setGoodsNum(stockInItem.getGoodsNum());
|
||||||
|
inventory.setSkuId(stockInItem.getSkuId());
|
||||||
|
inventory.setSkuCode(stockInItem.getSkuCode());
|
||||||
|
inventory.setQuantity(stockInItem.getIntoQuantity().longValue());
|
||||||
|
inventory.setIsDelete(0);
|
||||||
|
inventory.setCreateBy(userName);
|
||||||
|
inventory.setCreateTime(new Date());
|
||||||
|
inventoryService.save(inventory);
|
||||||
|
}else{
|
||||||
|
//修改
|
||||||
|
OGoodsInventory update = new OGoodsInventory();
|
||||||
|
update.setId(inventoryList.get(0).getId());
|
||||||
|
update.setUpdateBy(userName);
|
||||||
|
update.setUpdateTime(new Date());
|
||||||
|
update.setQuantity(inventoryList.get(0).getQuantity()+stockInItem.getIntoQuantity().longValue());
|
||||||
|
inventoryService.updateById(update);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ResultVo.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WmsStockIn getDetailAndItemById(Long id) {
|
||||||
|
WmsStockIn wmsStockIn = mapper.selectById(id);
|
||||||
|
if(wmsStockIn!=null){
|
||||||
|
wmsStockIn.setItemList(inItemService.list(new LambdaQueryWrapper<WmsStockInItem>().eq(WmsStockInItem::getStockInId,id)));
|
||||||
|
return wmsStockIn;
|
||||||
|
}else
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package cn.qihangerp.module.stock.service.impl;
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsStockOutItemPosition;
|
||||||
|
import cn.qihangerp.module.stock.mapper.WmsStockOutItemPositionMapper;
|
||||||
|
import cn.qihangerp.module.stock.service.WmsStockOutItemPositionService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_stock_out_item_position(出库仓位详情)】的数据库操作Service实现
|
||||||
|
* @createDate 2024-09-22 11:13:23
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WmsStockOutItemPositionServiceImpl extends ServiceImpl<WmsStockOutItemPositionMapper, WmsStockOutItemPosition>
|
||||||
|
implements WmsStockOutItemPositionService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package cn.qihangerp.module.stock.service.impl;
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsStockOutItem;
|
||||||
|
import cn.qihangerp.module.stock.mapper.WmsStockOutItemMapper;
|
||||||
|
import cn.qihangerp.module.stock.service.WmsStockOutItemService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_stock_out_item(出库单明细)】的数据库操作Service实现
|
||||||
|
* @createDate 2024-09-22 11:13:23
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WmsStockOutItemServiceImpl extends ServiceImpl<WmsStockOutItemMapper, WmsStockOutItem>
|
||||||
|
implements WmsStockOutItemService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package cn.qihangerp.module.stock.service.impl;
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsStockOut;
|
||||||
|
import cn.qihangerp.module.stock.mapper.WmsStockOutMapper;
|
||||||
|
import cn.qihangerp.module.stock.service.WmsStockOutService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_stock_out(出库单)】的数据库操作Service实现
|
||||||
|
* @createDate 2024-09-22 11:13:23
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WmsStockOutServiceImpl extends ServiceImpl<WmsStockOutMapper, WmsStockOut>
|
||||||
|
implements WmsStockOutService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package cn.qihangerp.module.stock.service.impl;
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsWarehousePosition;
|
||||||
|
import cn.qihangerp.module.stock.mapper.WmsWarehousePositionMapper;
|
||||||
|
import cn.qihangerp.module.stock.service.WmsWarehousePositionService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_warehouse_position(仓库仓位表)】的数据库操作Service实现
|
||||||
|
* @createDate 2024-09-22 11:13:23
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WmsWarehousePositionServiceImpl extends ServiceImpl<WmsWarehousePositionMapper, WmsWarehousePosition>
|
||||||
|
implements WmsWarehousePositionService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package cn.qihangerp.module.stock.service.impl;
|
||||||
|
|
||||||
|
import cn.qihangerp.module.stock.domain.WmsWarehouse;
|
||||||
|
import cn.qihangerp.module.stock.mapper.WmsWarehouseMapper;
|
||||||
|
import cn.qihangerp.module.stock.service.WmsWarehouseService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【wms_warehouse(仓库表)】的数据库操作Service实现
|
||||||
|
* @createDate 2024-09-22 11:13:23
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WmsWarehouseServiceImpl extends ServiceImpl<WmsWarehouseMapper, WmsWarehouse>
|
||||||
|
implements WmsWarehouseService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?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="cn.qihangerp.module.wms.mapper.WmsInventoryOperationMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="cn.qihangerp.module.stock.domain.WmsInventoryOperation">
|
||||||
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||||
|
<result property="goodsId" column="goods_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="goodsNum" column="goods_num" jdbcType="VARCHAR"/>
|
||||||
|
<result property="skuId" column="sku_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="skuCode" column="sku_code" jdbcType="VARCHAR"/>
|
||||||
|
<result property="batchId" column="batch_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="batchNum" column="batch_num" jdbcType="VARCHAR"/>
|
||||||
|
<result property="type" column="type" jdbcType="INTEGER"/>
|
||||||
|
<result property="inventoryDetailId" column="inventory_detail_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="quantity" column="quantity" jdbcType="INTEGER"/>
|
||||||
|
<result property="lockedQuantity" column="locked_quantity" jdbcType="INTEGER"/>
|
||||||
|
<result property="price" column="price" jdbcType="DOUBLE"/>
|
||||||
|
<result property="bizType" column="biz_type" jdbcType="INTEGER"/>
|
||||||
|
<result property="bizId" column="biz_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="bizNum" column="biz_num" jdbcType="VARCHAR"/>
|
||||||
|
<result property="bizItemId" column="biz_item_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||||
|
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||||
|
<result property="warehouseId" column="warehouse_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="positionId" column="position_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,goods_id,goods_num,
|
||||||
|
sku_id,sku_code,batch_id,
|
||||||
|
batch_num,type,inventory_detail_id,
|
||||||
|
quantity,locked_quantity,price,
|
||||||
|
biz_type,biz_id,biz_num,
|
||||||
|
biz_item_id,status,remark,
|
||||||
|
warehouse_id,position_id,create_time,
|
||||||
|
create_by,update_time,update_by
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?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="cn.qihangerp.module.wms.mapper.WmsStockInItemMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="cn.qihangerp.module.stock.domain.WmsStockInItem">
|
||||||
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||||
|
<result property="stockInId" column="stock_in_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="stockInType" column="stock_in_type" jdbcType="INTEGER"/>
|
||||||
|
<result property="sourceNo" column="source_no" jdbcType="VARCHAR"/>
|
||||||
|
<result property="sourceId" column="source_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="sourceItemId" column="source_item_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="goodsId" column="goods_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="goodsNum" column="goods_num" jdbcType="VARCHAR"/>
|
||||||
|
<result property="goodsName" column="goods_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="goodsImage" column="goods_image" jdbcType="VARCHAR"/>
|
||||||
|
<result property="skuId" column="sku_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="skuCode" column="sku_code" jdbcType="VARCHAR"/>
|
||||||
|
<result property="skuName" column="sku_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="quantity" column="quantity" jdbcType="BIGINT"/>
|
||||||
|
<result property="inQuantity" column="in_quantity" jdbcType="BIGINT"/>
|
||||||
|
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||||
|
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||||
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,stock_in_id,stock_in_type,
|
||||||
|
source_no,source_id,source_item_id,
|
||||||
|
goods_id,goods_num,goods_name,
|
||||||
|
goods_image,sku_id,sku_code,
|
||||||
|
sku_name,quantity,in_quantity,
|
||||||
|
remark,status,create_by,
|
||||||
|
create_time,update_by,update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?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="cn.qihangerp.module.wms.mapper.WmsStockInMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="cn.qihangerp.module.stock.domain.WmsStockIn">
|
||||||
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||||
|
<result property="stockInNum" column="stock_in_num" jdbcType="VARCHAR"/>
|
||||||
|
<result property="stockInType" column="stock_in_type" jdbcType="INTEGER"/>
|
||||||
|
<result property="sourceNo" column="source_no" jdbcType="VARCHAR"/>
|
||||||
|
<result property="sourceId" column="source_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="sourceGoodsUnit" column="source_goods_unit" jdbcType="INTEGER"/>
|
||||||
|
<result property="sourceSpecUnitTotal" column="source_spec_unit_total" jdbcType="INTEGER"/>
|
||||||
|
<result property="sourceSpecUnit" column="source_spec_unit" jdbcType="INTEGER"/>
|
||||||
|
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||||
|
<result property="stockInOperatorId" column="stock_in_operator_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="stockInOperator" column="stock_in_operator" jdbcType="VARCHAR"/>
|
||||||
|
<result property="stockInTime" column="stock_in_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||||
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,stock_in_num,stock_in_type,
|
||||||
|
source_no,source_id,source_goods_unit,
|
||||||
|
source_spec_unit_total,source_spec_unit,remark,
|
||||||
|
stock_in_operator_id,stock_in_operator,stock_in_time,
|
||||||
|
status,create_by,create_time,
|
||||||
|
update_by,update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?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="cn.qihangerp.module.wms.mapper.WmsStockOutItemMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="cn.qihangerp.module.stock.domain.WmsStockOutItem">
|
||||||
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||||
|
<result property="stockOutType" column="stock_out_type" jdbcType="INTEGER"/>
|
||||||
|
<result property="entryId" column="entry_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="sourceOrderId" column="source_order_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="sourceOrderItemId" column="source_order_item_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="sourceOrderNum" column="source_order_num" jdbcType="VARCHAR"/>
|
||||||
|
<result property="goodsId" column="goods_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="specId" column="spec_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="specNum" column="spec_num" jdbcType="VARCHAR"/>
|
||||||
|
<result property="originalQuantity" column="original_quantity" jdbcType="BIGINT"/>
|
||||||
|
<result property="outQuantity" column="out_quantity" jdbcType="BIGINT"/>
|
||||||
|
<result property="completeTime" column="complete_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="pickedTime" column="picked_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,stock_out_type,entry_id,
|
||||||
|
source_order_id,source_order_item_id,source_order_num,
|
||||||
|
goods_id,spec_id,spec_num,
|
||||||
|
original_quantity,out_quantity,complete_time,
|
||||||
|
picked_time,status,create_time,
|
||||||
|
update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?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="cn.qihangerp.module.wms.mapper.WmsStockOutItemPositionMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="cn.qihangerp.module.stock.domain.WmsStockOutItemPosition">
|
||||||
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||||
|
<result property="entryId" column="entry_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="entryItemId" column="entry_item_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="goodsInventoryId" column="goods_inventory_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="goodsInventoryDetailId" column="goods_inventory_detail_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="quantity" column="quantity" jdbcType="BIGINT"/>
|
||||||
|
<result property="locationId" column="location_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="operatorId" column="operator_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="operatorName" column="operator_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="outTime" column="out_time" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,entry_id,entry_item_id,
|
||||||
|
goods_inventory_id,goods_inventory_detail_id,quantity,
|
||||||
|
location_id,operator_id,operator_name,
|
||||||
|
out_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?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="cn.qihangerp.module.wms.mapper.WmsStockOutMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="cn.qihangerp.module.stock.domain.WmsStockOut">
|
||||||
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||||
|
<result property="stockOutNum" column="stock_out_num" jdbcType="VARCHAR"/>
|
||||||
|
<result property="sourceNum" column="source_num" jdbcType="VARCHAR"/>
|
||||||
|
<result property="sourceId" column="source_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="stockOutType" column="stock_out_type" jdbcType="INTEGER"/>
|
||||||
|
<result property="goodsUnit" column="goods_unit" jdbcType="INTEGER"/>
|
||||||
|
<result property="specUnit" column="spec_unit" jdbcType="INTEGER"/>
|
||||||
|
<result property="specUnitTotal" column="spec_unit_total" jdbcType="INTEGER"/>
|
||||||
|
<result property="outTotal" column="out_total" jdbcType="INTEGER"/>
|
||||||
|
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||||
|
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||||
|
<result property="printStatus" column="print_status" jdbcType="INTEGER"/>
|
||||||
|
<result property="printTime" column="print_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="outTime" column="out_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="completeTime" column="complete_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="operatorId" column="operator_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="operatorName" column="operator_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,stock_out_num,source_num,
|
||||||
|
source_id,stock_out_type,goods_unit,
|
||||||
|
spec_unit,spec_unit_total,out_total,
|
||||||
|
remark,status,print_status,
|
||||||
|
print_time,out_time,complete_time,
|
||||||
|
operator_id,operator_name,create_time,
|
||||||
|
create_by,update_time,update_by
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?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="cn.qihangerp.module.wms.mapper.WmsWarehouseMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="cn.qihangerp.module.stock.domain.WmsWarehouse">
|
||||||
|
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||||
|
<result property="number" column="number" jdbcType="VARCHAR"/>
|
||||||
|
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="province" column="province" jdbcType="VARCHAR"/>
|
||||||
|
<result property="city" column="city" jdbcType="VARCHAR"/>
|
||||||
|
<result property="district" column="district" jdbcType="VARCHAR"/>
|
||||||
|
<result property="street" column="street" jdbcType="VARCHAR"/>
|
||||||
|
<result property="address" column="address" jdbcType="VARCHAR"/>
|
||||||
|
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||||
|
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||||
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,number,name,
|
||||||
|
province,city,district,
|
||||||
|
street,address,remark,
|
||||||
|
status,create_by,create_time,
|
||||||
|
update_by,update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?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="cn.qihangerp.module.wms.mapper.WmsWarehousePositionMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="cn.qihangerp.module.stock.domain.WmsWarehousePosition">
|
||||||
|
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||||
|
<result property="warehouseId" column="warehouse_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="number" column="number" jdbcType="VARCHAR"/>
|
||||||
|
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="parentId" column="parent_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="depth" column="depth" jdbcType="INTEGER"/>
|
||||||
|
<result property="parentId1" column="parent_id1" jdbcType="INTEGER"/>
|
||||||
|
<result property="parentId2" column="parent_id2" jdbcType="INTEGER"/>
|
||||||
|
<result property="address" column="address" jdbcType="VARCHAR"/>
|
||||||
|
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||||
|
<result property="isDelete" column="is_delete" jdbcType="INTEGER"/>
|
||||||
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,warehouse_id,number,
|
||||||
|
name,parent_id,depth,
|
||||||
|
parent_id1,parent_id2,address,
|
||||||
|
remark,is_delete,create_by,
|
||||||
|
create_time,update_by,update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package cn.qihangerp.module;
|
||||||
|
|
||||||
|
import junit.framework.Test;
|
||||||
|
import junit.framework.TestCase;
|
||||||
|
import junit.framework.TestSuite;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unit test for simple App.
|
||||||
|
*/
|
||||||
|
public class AppTest
|
||||||
|
extends TestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create the test case
|
||||||
|
*
|
||||||
|
* @param testName name of the test case
|
||||||
|
*/
|
||||||
|
public AppTest( String testName )
|
||||||
|
{
|
||||||
|
super( testName );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the suite of tests being tested
|
||||||
|
*/
|
||||||
|
public static Test suite()
|
||||||
|
{
|
||||||
|
return new TestSuite( AppTest.class );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rigourous Test :-)
|
||||||
|
*/
|
||||||
|
public void testApp()
|
||||||
|
{
|
||||||
|
assertTrue( true );
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue