1.添加盘点表相关实体类和接口
parent
3d22ec1593
commit
acac5afbc3
@ -0,0 +1,26 @@
|
||||
package com.glxp.api.admin.dao.inventory;
|
||||
|
||||
import com.glxp.api.admin.entity.inventory.InvCountCodes;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface InvCountCodesMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(InvCountCodes record);
|
||||
|
||||
int insertSelective(InvCountCodes record);
|
||||
|
||||
InvCountCodes selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(InvCountCodes record);
|
||||
|
||||
int updateByPrimaryKey(InvCountCodes record);
|
||||
|
||||
int updateBatch(List<InvCountCodes> list);
|
||||
|
||||
int batchInsert(@Param("list") List<InvCountCodes> list);
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.glxp.api.admin.dao.inventory;
|
||||
|
||||
import com.glxp.api.admin.entity.inventory.InvCountOrderDetail;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface InvCountOrderDetailMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(InvCountOrderDetail record);
|
||||
|
||||
int insertSelective(InvCountOrderDetail record);
|
||||
|
||||
InvCountOrderDetail selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(InvCountOrderDetail record);
|
||||
|
||||
int updateByPrimaryKey(InvCountOrderDetail record);
|
||||
|
||||
int updateBatch(List<InvCountOrderDetail> list);
|
||||
|
||||
int batchInsert(@Param("list") List<InvCountOrderDetail> list);
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.glxp.api.admin.dao.inventory;
|
||||
|
||||
import com.glxp.api.admin.entity.inventory.InvCountOrder;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface InvCountOrderMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(InvCountOrder record);
|
||||
|
||||
int insertSelective(InvCountOrder record);
|
||||
|
||||
InvCountOrder selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(InvCountOrder record);
|
||||
|
||||
int updateByPrimaryKey(InvCountOrder record);
|
||||
|
||||
int updateBatch(List<InvCountOrder> list);
|
||||
|
||||
int batchInsert(@Param("list") List<InvCountOrder> list);
|
||||
}
|
@ -0,0 +1,162 @@
|
||||
package com.glxp.api.admin.entity.inventory;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 盘点单据表
|
||||
*/
|
||||
public class InvCountOrder {
|
||||
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 盘点单号
|
||||
*/
|
||||
private String orderid;
|
||||
|
||||
/**
|
||||
* 仓库号
|
||||
*/
|
||||
private String invstoragecode;
|
||||
|
||||
/**
|
||||
* 分库号
|
||||
*/
|
||||
private String invwarehousecode;
|
||||
|
||||
/**
|
||||
* 货位号
|
||||
*/
|
||||
private String invspacecode;
|
||||
|
||||
/**
|
||||
* 盘点用户ID
|
||||
*/
|
||||
private String createuser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createtime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updatetime;
|
||||
|
||||
/**
|
||||
* 审核用户ID
|
||||
*/
|
||||
private String audituser;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private Date audittime;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Boolean status;
|
||||
|
||||
/**
|
||||
* 备注字段
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getOrderid() {
|
||||
return orderid;
|
||||
}
|
||||
|
||||
public void setOrderid(String orderid) {
|
||||
this.orderid = orderid;
|
||||
}
|
||||
|
||||
public String getInvstoragecode() {
|
||||
return invstoragecode;
|
||||
}
|
||||
|
||||
public void setInvstoragecode(String invstoragecode) {
|
||||
this.invstoragecode = invstoragecode;
|
||||
}
|
||||
|
||||
public String getInvwarehousecode() {
|
||||
return invwarehousecode;
|
||||
}
|
||||
|
||||
public void setInvwarehousecode(String invwarehousecode) {
|
||||
this.invwarehousecode = invwarehousecode;
|
||||
}
|
||||
|
||||
public String getInvspacecode() {
|
||||
return invspacecode;
|
||||
}
|
||||
|
||||
public void setInvspacecode(String invspacecode) {
|
||||
this.invspacecode = invspacecode;
|
||||
}
|
||||
|
||||
public String getCreateuser() {
|
||||
return createuser;
|
||||
}
|
||||
|
||||
public void setCreateuser(String createuser) {
|
||||
this.createuser = createuser;
|
||||
}
|
||||
|
||||
public Date getCreatetime() {
|
||||
return createtime;
|
||||
}
|
||||
|
||||
public void setCreatetime(Date createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
|
||||
public Date getUpdatetime() {
|
||||
return updatetime;
|
||||
}
|
||||
|
||||
public void setUpdatetime(Date updatetime) {
|
||||
this.updatetime = updatetime;
|
||||
}
|
||||
|
||||
public String getAudituser() {
|
||||
return audituser;
|
||||
}
|
||||
|
||||
public void setAudituser(String audituser) {
|
||||
this.audituser = audituser;
|
||||
}
|
||||
|
||||
public Date getAudittime() {
|
||||
return audittime;
|
||||
}
|
||||
|
||||
public void setAudittime(Date audittime) {
|
||||
this.audittime = audittime;
|
||||
}
|
||||
|
||||
public Boolean getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Boolean status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
}
|
@ -0,0 +1,136 @@
|
||||
<?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.glxp.sale.admin.dao.inventory.InvCountCodesMapper">
|
||||
<resultMap id="BaseResultMap" type="com.glxp.sale.admin.entity.inventory.InvCountCodes">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table inv_count_codes-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="orderIdFk" jdbcType="VARCHAR" property="orderidfk" />
|
||||
<result column="productId" jdbcType="VARCHAR" property="productid" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="status" jdbcType="BOOLEAN" property="status" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, orderIdFk, productId, code, `status`
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from inv_count_codes
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<!--@mbg.generated-->
|
||||
delete from inv_count_codes
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inventory.InvCountCodes" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into inv_count_codes (orderIdFk, productId, code,
|
||||
`status`)
|
||||
values (#{orderidfk,jdbcType=VARCHAR}, #{productid,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=BOOLEAN})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inventory.InvCountCodes" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into inv_count_codes
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderidfk != null">
|
||||
orderIdFk,
|
||||
</if>
|
||||
<if test="productid != null">
|
||||
productId,
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderidfk != null">
|
||||
#{orderidfk,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productid != null">
|
||||
#{productid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=BOOLEAN},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.sale.admin.entity.inventory.InvCountCodes">
|
||||
<!--@mbg.generated-->
|
||||
update inv_count_codes
|
||||
<set>
|
||||
<if test="orderidfk != null">
|
||||
orderIdFk = #{orderidfk,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productid != null">
|
||||
productId = #{productid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=BOOLEAN},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.glxp.sale.admin.entity.inventory.InvCountCodes">
|
||||
<!--@mbg.generated-->
|
||||
update inv_count_codes
|
||||
set orderIdFk = #{orderidfk,jdbcType=VARCHAR},
|
||||
productId = #{productid,jdbcType=VARCHAR},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=BOOLEAN}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update inv_count_codes
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="orderIdFk = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.orderidfk,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="productId = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.productid,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="code = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="`status` = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=BOOLEAN}
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||
#{item.id,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</update>
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into inv_count_codes
|
||||
(orderIdFk, productId, code, `status`)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.orderidfk,jdbcType=VARCHAR}, #{item.productid,jdbcType=VARCHAR}, #{item.code,jdbcType=VARCHAR},
|
||||
#{item.status,jdbcType=BOOLEAN})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,257 @@
|
||||
<?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.glxp.sale.admin.dao.inventory.InvCountOrderDetailMapper">
|
||||
<resultMap id="BaseResultMap" type="com.glxp.sale.admin.entity.inventory.InvCountOrderDetail">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table inv_count_order_detail-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="orderIdFk" jdbcType="VARCHAR" property="orderidfk" />
|
||||
<result column="productId" jdbcType="VARCHAR" property="productid" />
|
||||
<result column="batchNo" jdbcType="VARCHAR" property="batchno" />
|
||||
<result column="produceDate" jdbcType="TIMESTAMP" property="producedate" />
|
||||
<result column="expireDate" jdbcType="TIMESTAMP" property="expiredate" />
|
||||
<result column="serialNo" jdbcType="VARCHAR" property="serialno" />
|
||||
<result column="countNum" jdbcType="INTEGER" property="countnum" />
|
||||
<result column="bookNum" jdbcType="INTEGER" property="booknum" />
|
||||
<result column="profitNum" jdbcType="INTEGER" property="profitnum" />
|
||||
<result column="lossNum" jdbcType="INTEGER" property="lossnum" />
|
||||
<result column="status" jdbcType="BOOLEAN" property="status" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, orderIdFk, productId, batchNo, produceDate, expireDate, serialNo, countNum, bookNum,
|
||||
profitNum, lossNum, `status`
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from inv_count_order_detail
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<!--@mbg.generated-->
|
||||
delete from inv_count_order_detail
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inventory.InvCountOrderDetail" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into inv_count_order_detail (orderIdFk, productId, batchNo,
|
||||
produceDate, expireDate, serialNo,
|
||||
countNum, bookNum, profitNum,
|
||||
lossNum, `status`)
|
||||
values (#{orderidfk,jdbcType=VARCHAR}, #{productid,jdbcType=VARCHAR}, #{batchno,jdbcType=VARCHAR},
|
||||
#{producedate,jdbcType=TIMESTAMP}, #{expiredate,jdbcType=TIMESTAMP}, #{serialno,jdbcType=VARCHAR},
|
||||
#{countnum,jdbcType=INTEGER}, #{booknum,jdbcType=INTEGER}, #{profitnum,jdbcType=INTEGER},
|
||||
#{lossnum,jdbcType=INTEGER}, #{status,jdbcType=BOOLEAN})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inventory.InvCountOrderDetail" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into inv_count_order_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderidfk != null">
|
||||
orderIdFk,
|
||||
</if>
|
||||
<if test="productid != null">
|
||||
productId,
|
||||
</if>
|
||||
<if test="batchno != null">
|
||||
batchNo,
|
||||
</if>
|
||||
<if test="producedate != null">
|
||||
produceDate,
|
||||
</if>
|
||||
<if test="expiredate != null">
|
||||
expireDate,
|
||||
</if>
|
||||
<if test="serialno != null">
|
||||
serialNo,
|
||||
</if>
|
||||
<if test="countnum != null">
|
||||
countNum,
|
||||
</if>
|
||||
<if test="booknum != null">
|
||||
bookNum,
|
||||
</if>
|
||||
<if test="profitnum != null">
|
||||
profitNum,
|
||||
</if>
|
||||
<if test="lossnum != null">
|
||||
lossNum,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderidfk != null">
|
||||
#{orderidfk,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productid != null">
|
||||
#{productid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="batchno != null">
|
||||
#{batchno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="producedate != null">
|
||||
#{producedate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="expiredate != null">
|
||||
#{expiredate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serialno != null">
|
||||
#{serialno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="countnum != null">
|
||||
#{countnum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="booknum != null">
|
||||
#{booknum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="profitnum != null">
|
||||
#{profitnum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="lossnum != null">
|
||||
#{lossnum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=BOOLEAN},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.sale.admin.entity.inventory.InvCountOrderDetail">
|
||||
<!--@mbg.generated-->
|
||||
update inv_count_order_detail
|
||||
<set>
|
||||
<if test="orderidfk != null">
|
||||
orderIdFk = #{orderidfk,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productid != null">
|
||||
productId = #{productid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="batchno != null">
|
||||
batchNo = #{batchno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="producedate != null">
|
||||
produceDate = #{producedate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="expiredate != null">
|
||||
expireDate = #{expiredate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serialno != null">
|
||||
serialNo = #{serialno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="countnum != null">
|
||||
countNum = #{countnum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="booknum != null">
|
||||
bookNum = #{booknum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="profitnum != null">
|
||||
profitNum = #{profitnum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="lossnum != null">
|
||||
lossNum = #{lossnum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=BOOLEAN},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.glxp.sale.admin.entity.inventory.InvCountOrderDetail">
|
||||
<!--@mbg.generated-->
|
||||
update inv_count_order_detail
|
||||
set orderIdFk = #{orderidfk,jdbcType=VARCHAR},
|
||||
productId = #{productid,jdbcType=VARCHAR},
|
||||
batchNo = #{batchno,jdbcType=VARCHAR},
|
||||
produceDate = #{producedate,jdbcType=TIMESTAMP},
|
||||
expireDate = #{expiredate,jdbcType=TIMESTAMP},
|
||||
serialNo = #{serialno,jdbcType=VARCHAR},
|
||||
countNum = #{countnum,jdbcType=INTEGER},
|
||||
bookNum = #{booknum,jdbcType=INTEGER},
|
||||
profitNum = #{profitnum,jdbcType=INTEGER},
|
||||
lossNum = #{lossnum,jdbcType=INTEGER},
|
||||
`status` = #{status,jdbcType=BOOLEAN}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update inv_count_order_detail
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="orderIdFk = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.orderidfk,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="productId = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.productid,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="batchNo = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.batchno,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="produceDate = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.producedate,jdbcType=TIMESTAMP}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="expireDate = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.expiredate,jdbcType=TIMESTAMP}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="serialNo = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.serialno,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="countNum = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.countnum,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="bookNum = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.booknum,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="profitNum = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.profitnum,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="lossNum = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.lossnum,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="`status` = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=BOOLEAN}
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||
#{item.id,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</update>
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into inv_count_order_detail
|
||||
(orderIdFk, productId, batchNo, produceDate, expireDate, serialNo, countNum, bookNum,
|
||||
profitNum, lossNum, `status`)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.orderidfk,jdbcType=VARCHAR}, #{item.productid,jdbcType=VARCHAR}, #{item.batchno,jdbcType=VARCHAR},
|
||||
#{item.producedate,jdbcType=TIMESTAMP}, #{item.expiredate,jdbcType=TIMESTAMP},
|
||||
#{item.serialno,jdbcType=VARCHAR}, #{item.countnum,jdbcType=INTEGER}, #{item.booknum,jdbcType=INTEGER},
|
||||
#{item.profitnum,jdbcType=INTEGER}, #{item.lossnum,jdbcType=INTEGER}, #{item.status,jdbcType=BOOLEAN}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,265 @@
|
||||
<?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.glxp.sale.admin.dao.inventory.InvCountOrderMapper">
|
||||
<resultMap id="BaseResultMap" type="com.glxp.sale.admin.entity.inventory.InvCountOrder">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table inv_count_order-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="orderId" jdbcType="VARCHAR" property="orderid" />
|
||||
<result column="invStorageCode" jdbcType="VARCHAR" property="invstoragecode" />
|
||||
<result column="invWarehouseCode" jdbcType="VARCHAR" property="invwarehousecode" />
|
||||
<result column="invSpaceCode" jdbcType="VARCHAR" property="invspacecode" />
|
||||
<result column="createUser" jdbcType="VARCHAR" property="createuser" />
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
|
||||
<result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
|
||||
<result column="auditUser" jdbcType="VARCHAR" property="audituser" />
|
||||
<result column="auditTime" jdbcType="TIMESTAMP" property="audittime" />
|
||||
<result column="status" jdbcType="BOOLEAN" property="status" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, orderId, invStorageCode, invWarehouseCode, invSpaceCode, `createUser`, createTime,
|
||||
updateTime, auditUser, auditTime, `status`, remark
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from inv_count_order
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<!--@mbg.generated-->
|
||||
delete from inv_count_order
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.glxp.sale.admin.entity.inventory.InvCountOrder">
|
||||
<!--@mbg.generated-->
|
||||
insert into inv_count_order (id, orderId, invStorageCode,
|
||||
invWarehouseCode, invSpaceCode, `createUser`,
|
||||
createTime, updateTime, auditUser,
|
||||
auditTime, `status`, remark
|
||||
)
|
||||
values (#{id,jdbcType=INTEGER}, #{orderid,jdbcType=VARCHAR}, #{invstoragecode,jdbcType=VARCHAR},
|
||||
#{invwarehousecode,jdbcType=VARCHAR}, #{invspacecode,jdbcType=VARCHAR}, #{createuser,jdbcType=VARCHAR},
|
||||
#{createtime,jdbcType=TIMESTAMP}, #{updatetime,jdbcType=TIMESTAMP}, #{audituser,jdbcType=VARCHAR},
|
||||
#{audittime,jdbcType=TIMESTAMP}, #{status,jdbcType=BOOLEAN}, #{remark,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.glxp.sale.admin.entity.inventory.InvCountOrder">
|
||||
<!--@mbg.generated-->
|
||||
insert into inv_count_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="orderid != null">
|
||||
orderId,
|
||||
</if>
|
||||
<if test="invstoragecode != null">
|
||||
invStorageCode,
|
||||
</if>
|
||||
<if test="invwarehousecode != null">
|
||||
invWarehouseCode,
|
||||
</if>
|
||||
<if test="invspacecode != null">
|
||||
invSpaceCode,
|
||||
</if>
|
||||
<if test="createuser != null">
|
||||
`createUser`,
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime,
|
||||
</if>
|
||||
<if test="updatetime != null">
|
||||
updateTime,
|
||||
</if>
|
||||
<if test="audituser != null">
|
||||
auditUser,
|
||||
</if>
|
||||
<if test="audittime != null">
|
||||
auditTime,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="orderid != null">
|
||||
#{orderid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="invstoragecode != null">
|
||||
#{invstoragecode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="invwarehousecode != null">
|
||||
#{invwarehousecode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="invspacecode != null">
|
||||
#{invspacecode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createuser != null">
|
||||
#{createuser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
#{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatetime != null">
|
||||
#{updatetime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="audituser != null">
|
||||
#{audituser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="audittime != null">
|
||||
#{audittime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=BOOLEAN},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.sale.admin.entity.inventory.InvCountOrder">
|
||||
<!--@mbg.generated-->
|
||||
update inv_count_order
|
||||
<set>
|
||||
<if test="orderid != null">
|
||||
orderId = #{orderid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="invstoragecode != null">
|
||||
invStorageCode = #{invstoragecode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="invwarehousecode != null">
|
||||
invWarehouseCode = #{invwarehousecode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="invspacecode != null">
|
||||
invSpaceCode = #{invspacecode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createuser != null">
|
||||
`createUser` = #{createuser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatetime != null">
|
||||
updateTime = #{updatetime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="audituser != null">
|
||||
auditUser = #{audituser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="audittime != null">
|
||||
auditTime = #{audittime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=BOOLEAN},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.glxp.sale.admin.entity.inventory.InvCountOrder">
|
||||
<!--@mbg.generated-->
|
||||
update inv_count_order
|
||||
set orderId = #{orderid,jdbcType=VARCHAR},
|
||||
invStorageCode = #{invstoragecode,jdbcType=VARCHAR},
|
||||
invWarehouseCode = #{invwarehousecode,jdbcType=VARCHAR},
|
||||
invSpaceCode = #{invspacecode,jdbcType=VARCHAR},
|
||||
`createUser` = #{createuser,jdbcType=VARCHAR},
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||
updateTime = #{updatetime,jdbcType=TIMESTAMP},
|
||||
auditUser = #{audituser,jdbcType=VARCHAR},
|
||||
auditTime = #{audittime,jdbcType=TIMESTAMP},
|
||||
`status` = #{status,jdbcType=BOOLEAN},
|
||||
remark = #{remark,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update inv_count_order
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="orderId = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.orderid,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="invStorageCode = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.invstoragecode,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="invWarehouseCode = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.invwarehousecode,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="invSpaceCode = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.invspacecode,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="`createUser` = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.createuser,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="createTime = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.createtime,jdbcType=TIMESTAMP}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="updateTime = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.updatetime,jdbcType=TIMESTAMP}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="auditUser = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.audituser,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="auditTime = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.audittime,jdbcType=TIMESTAMP}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="`status` = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=BOOLEAN}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="remark = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.remark,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||
#{item.id,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
insert into inv_count_order
|
||||
(id, orderId, invStorageCode, invWarehouseCode, invSpaceCode, `createUser`, createTime,
|
||||
updateTime, auditUser, auditTime, `status`, remark)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=INTEGER}, #{item.orderid,jdbcType=VARCHAR}, #{item.invstoragecode,jdbcType=VARCHAR},
|
||||
#{item.invwarehousecode,jdbcType=VARCHAR}, #{item.invspacecode,jdbcType=VARCHAR},
|
||||
#{item.createuser,jdbcType=VARCHAR}, #{item.createtime,jdbcType=TIMESTAMP}, #{item.updatetime,jdbcType=TIMESTAMP},
|
||||
#{item.audituser,jdbcType=VARCHAR}, #{item.audittime,jdbcType=TIMESTAMP}, #{item.status,jdbcType=BOOLEAN},
|
||||
#{item.remark,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
Loading…
Reference in New Issue