盘点管理 基础点位管理 绑定物料 解除物料
This commit is contained in:
@@ -19,11 +19,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare6" column="spare6" />
|
||||
<result property="spare7" column="spare7" />
|
||||
<result property="spare8" column="spare8" />
|
||||
<result property="spare9" column="spare9" />
|
||||
<result property="productName" column="product_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasProductVo">
|
||||
select product_guid, product_id, parent_id, price, cargo_no, unit, spec, remark, spare1, spare2, spare3, spare4, spare5, spare6, product_name from bas_product
|
||||
select product_guid, product_id, parent_id, price, cargo_no, unit, spec, remark, spare1, spare2, spare3, spare4, spare5, spare6, product_name, spare7, spare8, spare9 from bas_product
|
||||
</sql>
|
||||
|
||||
<select id="selectBasProductList" parameterType="BasProduct" resultMap="BasProductResult">
|
||||
@@ -42,6 +45,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 like concat('%', #{spare4}, '%')</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 like concat('%', #{spare5}, '%')</if>
|
||||
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
|
||||
<if test="spare7 != null and spare7 != ''"> and spare7 like concat('%', #{spare7}, '%')</if>
|
||||
<if test="spare8 != null and spare8 != ''"> and spare8 like concat('%', #{spare8}, '%')</if>
|
||||
<if test="spare9 != null and spare9 != ''"> and spare9 like concat('%', #{spare9}, '%')</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
@@ -57,6 +63,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{productGuid}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="selectBasProductByProductId" resultType="com.ruoyi.bas.BasProduct.domain.BasProduct">
|
||||
<include refid="selectBasProductVo"/>
|
||||
where product_id = #{productId}
|
||||
</select>
|
||||
<select id="selectBasProductListByProductIds" resultType="com.ruoyi.bas.BasProduct.domain.BasProduct">
|
||||
<include refid="selectBasProductVo"/>
|
||||
where product_id in
|
||||
<foreach collection="productIds" item="productId" open="(" separator="," close=")">
|
||||
#{productId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<insert id="insertBasProduct" parameterType="BasProduct">
|
||||
insert into bas_product
|
||||
@@ -75,6 +92,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
<if test="spare6 != null">spare6,</if>
|
||||
<if test="spare7 != null">spare7,</if>
|
||||
<if test="spare8 != null">spare8,</if>
|
||||
<if test="spare9 != null">spare9,</if>
|
||||
<if test="productName != null and productName != ''">product_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
@@ -92,6 +112,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
<if test="spare6 != null">#{spare6},</if>
|
||||
<if test="spare7 != null">#{spare7},</if>
|
||||
<if test="spare8 != null">#{spare8},</if>
|
||||
<if test="spare9 != null">#{spare9},</if>
|
||||
<if test="productName != null and productName != ''">#{productName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
@@ -112,6 +135,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
<if test="spare6 != null">spare6 = #{spare6},</if>
|
||||
<if test="spare7 != null">spare7 = #{spare7},</if>
|
||||
<if test="spare8 != null">spare8 = #{spare8},</if>
|
||||
<if test="spare9 != null">spare9 = #{spare9},</if>
|
||||
<if test="productName != null and productName != ''">product_name = #{productName},</if>
|
||||
</trim>
|
||||
where product_guid = #{productGuid}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
<?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.ruoyi.bas.port.mapper.BasProductPortMapper">
|
||||
|
||||
<resultMap type="BasProductPort" id="BasProductPortResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="portName" column="port_name" />
|
||||
<result property="portType" column="port_type" />
|
||||
<result property="portDesc" column="port_desc" />
|
||||
<result property="createMan" column="create_man" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasProductPortVo">
|
||||
select id, port_name, port_type, port_desc, create_man, create_time from bas_product_port
|
||||
</sql>
|
||||
|
||||
<select id="selectBasProductPortList" parameterType="BasProductPort" resultMap="BasProductPortResult">
|
||||
<include refid="selectBasProductPortVo"/>
|
||||
<where>
|
||||
<if test="portName != null and portName != ''"> and port_name like concat('%', #{portName}, '%')</if>
|
||||
<if test="portType != null and portType != ''"> and port_type = #{portType}</if>
|
||||
<if test="portDesc != null and portDesc != ''"> and port_desc = #{portDesc}</if>
|
||||
<if test="createMan != null and createMan != ''"> and create_man = #{createMan}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasProductPortById" parameterType="String" resultMap="BasProductPortResult">
|
||||
<include refid="selectBasProductPortVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasProductPort" parameterType="BasProductPort">
|
||||
insert into bas_product_port
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="portName != null">port_name,</if>
|
||||
<if test="portType != null">port_type,</if>
|
||||
<if test="portDesc != null">port_desc,</if>
|
||||
<if test="createMan != null">create_man,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="portName != null">#{portName},</if>
|
||||
<if test="portType != null">#{portType},</if>
|
||||
<if test="portDesc != null">#{portDesc},</if>
|
||||
<if test="createMan != null">#{createMan},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasProductPort" parameterType="BasProductPort">
|
||||
update bas_product_port
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="portName != null">port_name = #{portName},</if>
|
||||
<if test="portType != null">port_type = #{portType},</if>
|
||||
<if test="portDesc != null">port_desc = #{portDesc},</if>
|
||||
<if test="createMan != null">create_man = #{createMan},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasProductPortById" parameterType="String">
|
||||
delete from bas_product_port where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasProductPortByIds" parameterType="String">
|
||||
delete from bas_product_port where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,114 @@
|
||||
<?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.ruoyi.bas.portrel.mapper.BasProductPortRelMapper">
|
||||
|
||||
<resultMap type="BasProductPortRel" id="BasProductPortRelResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="portId" column="port_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasProductPortRelVo">
|
||||
select id, product_guid, product_id, port_id from bas_product_port_rel
|
||||
</sql>
|
||||
|
||||
<resultMap type="BasProduct" id="BasProductResult">
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="price" column="price" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare6" column="spare6" />
|
||||
<result property="spare7" column="spare7" />
|
||||
<result property="spare8" column="spare8" />
|
||||
<result property="spare9" column="spare9" />
|
||||
<result property="productName" column="product_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasProductVo">
|
||||
select product_guid, product_id, parent_id, price, cargo_no, unit, spec, remark, spare1, spare2, spare3, spare4, spare5, spare6, product_name from bas_product
|
||||
</sql>
|
||||
|
||||
<select id="selectBasProductPortRelList" parameterType="BasProductPortRel" resultMap="BasProductPortRelResult">
|
||||
<include refid="selectBasProductPortRelVo"/>
|
||||
<where>
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="portId != null and portId != ''"> and port_id = #{portId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasProductPortRelById" parameterType="Long" resultMap="BasProductPortRelResult">
|
||||
<include refid="selectBasProductPortRelVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectNotBindProduct" resultMap="BasProductResult">
|
||||
select product_guid, product_id, parent_id, price, cargo_no, unit, spec, remark, spare1, spare2, spare3, spare4, spare5, spare6, product_name, spare7, spare8, spare9
|
||||
from bas_product bp
|
||||
<where>
|
||||
<if test="bindStatus =='1'.toString()">
|
||||
and product_id in (select product_id from bas_product_port_rel where port_id=#{portId})
|
||||
</if>
|
||||
<if test="bindStatus =='0'.toString()">
|
||||
and product_id not in (select product_id from bas_product_port_rel where port_id=#{portId})
|
||||
</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<insert id="insertBasProductPortRel" parameterType="BasProductPortRel">
|
||||
insert into bas_product_port_rel
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="portId != null">port_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="portId != null">#{portId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasProductPortRel" parameterType="BasProductPortRel">
|
||||
update bas_product_port_rel
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productGuid != null">product_guid = #{productGuid},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="portId != null">port_id = #{portId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasProductPortRelById" parameterType="Long">
|
||||
delete from bas_product_port_rel where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasProductPortRelByIds" parameterType="String">
|
||||
delete from bas_product_port_rel where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteBasProductPortRel">
|
||||
delete from bas_product_port_rel where port_id=#{portId} and product_id in
|
||||
<foreach item="productId" collection="productIds" open="(" separator="," close=")">
|
||||
#{productId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,197 @@
|
||||
<?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.ruoyi.check.stockcheckdetailfinish.mapper.CheckStockinDetailFinishMapper">
|
||||
|
||||
<resultMap type="CheckStockinDetailFinish" id="CheckStockinDetailFinishResult">
|
||||
<result property="stockCheckDetailId" column="stock_check_detail_id" />
|
||||
<result property="stockCheckGuid" column="stock_check_guid" />
|
||||
<result property="stockCheckId" column="stock_check_id" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="quantityX" column="quantity_x" />
|
||||
<result property="quantityJ" column="quantity_j" />
|
||||
<result property="price" column="price" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="assignNum" column="assign_num" />
|
||||
<result property="assignNumX" column="assign_num_x" />
|
||||
<result property="assignNumJ" column="assign_num_j" />
|
||||
<result property="printDate" column="print_date" />
|
||||
<result property="stockStatus" column="stock_status" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare6" column="spare6" />
|
||||
<result property="scanNum" column="scan_num" />
|
||||
<result property="scanNumX" column="scan_num_x" />
|
||||
<result property="scanNumJ" column="scan_num_j" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCheckStockinDetailFinishVo">
|
||||
select stock_check_detail_id, stock_check_guid, stock_check_id, lot_no, product_guid, product_id, quantity, quantity_x, quantity_j, price, cargo_no, remark, assign_num, assign_num_x, assign_num_j, print_date, stock_status, supplier_id, customer_id, unit, spec, spare1, spare2, spare3, spare4, spare5, spare6, scan_num, scan_num_x, scan_num_j from check_stockin_detail_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectCheckStockinDetailFinishList" parameterType="CheckStockinDetailFinish" resultMap="CheckStockinDetailFinishResult">
|
||||
<include refid="selectCheckStockinDetailFinishVo"/>
|
||||
<where>
|
||||
<if test="stockCheckGuid != null and stockCheckGuid != ''"> and stock_check_guid = #{stockCheckGuid}</if>
|
||||
<if test="stockCheckId != null and stockCheckId != ''"> and stock_check_id = #{stockCheckId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
||||
<if test="quantityX != null and quantityX != ''"> and quantity_x = #{quantityX}</if>
|
||||
<if test="quantityJ != null and quantityJ != ''"> and quantity_j = #{quantityJ}</if>
|
||||
<if test="price != null and price != ''"> and price = #{price}</if>
|
||||
<if test="cargoNo != null and cargoNo != ''"> and cargo_no = #{cargoNo}</if>
|
||||
<if test="assignNum != null and assignNum != ''"> and assign_num = #{assignNum}</if>
|
||||
<if test="assignNumX != null and assignNumX != ''"> and assign_num_x = #{assignNumX}</if>
|
||||
<if test="assignNumJ != null and assignNumJ != ''"> and assign_num_j = #{assignNumJ}</if>
|
||||
<if test="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
|
||||
<if test="stockStatus != null and stockStatus != ''"> and stock_status = #{stockStatus}</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and supplier_id = #{supplierId}</if>
|
||||
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="spec != null and spec != ''"> and spec = #{spec}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
||||
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
|
||||
<if test="scanNum != null and scanNum != ''"> and scan_num = #{scanNum}</if>
|
||||
<if test="scanNumX != null and scanNumX != ''"> and scan_num_x = #{scanNumX}</if>
|
||||
<if test="scanNumJ != null and scanNumJ != ''"> and scan_num_j = #{scanNumJ}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCheckStockinDetailFinishByStockCheckDetailId" parameterType="String" resultMap="CheckStockinDetailFinishResult">
|
||||
<include refid="selectCheckStockinDetailFinishVo"/>
|
||||
where stock_check_detail_id = #{stockCheckDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertCheckStockinDetailFinish" parameterType="CheckStockinDetailFinish">
|
||||
insert into check_stockin_detail_finish
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockCheckDetailId != null">stock_check_detail_id,</if>
|
||||
<if test="stockCheckGuid != null and stockCheckGuid != ''">stock_check_guid,</if>
|
||||
<if test="stockCheckId != null and stockCheckId != ''">stock_check_id,</if>
|
||||
<if test="lotNo != null and lotNo != ''">lot_no,</if>
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
<if test="productId != null and productId != ''">product_id,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="quantityX != null">quantity_x,</if>
|
||||
<if test="quantityJ != null">quantity_j,</if>
|
||||
<if test="price != null">price,</if>
|
||||
<if test="cargoNo != null">cargo_no,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="assignNum != null">assign_num,</if>
|
||||
<if test="assignNumX != null">assign_num_x,</if>
|
||||
<if test="assignNumJ != null">assign_num_j,</if>
|
||||
<if test="printDate != null">print_date,</if>
|
||||
<if test="stockStatus != null">stock_status,</if>
|
||||
<if test="supplierId != null">supplier_id,</if>
|
||||
<if test="customerId != null">customer_id,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="spec != null">spec,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
<if test="spare6 != null">spare6,</if>
|
||||
<if test="scanNum != null">scan_num,</if>
|
||||
<if test="scanNumX != null">scan_num_x,</if>
|
||||
<if test="scanNumJ != null">scan_num_j,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockCheckDetailId != null">#{stockCheckDetailId},</if>
|
||||
<if test="stockCheckGuid != null and stockCheckGuid != ''">#{stockCheckGuid},</if>
|
||||
<if test="stockCheckId != null and stockCheckId != ''">#{stockCheckId},</if>
|
||||
<if test="lotNo != null and lotNo != ''">#{lotNo},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="productId != null and productId != ''">#{productId},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="quantityX != null">#{quantityX},</if>
|
||||
<if test="quantityJ != null">#{quantityJ},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="cargoNo != null">#{cargoNo},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="assignNum != null">#{assignNum},</if>
|
||||
<if test="assignNumX != null">#{assignNumX},</if>
|
||||
<if test="assignNumJ != null">#{assignNumJ},</if>
|
||||
<if test="printDate != null">#{printDate},</if>
|
||||
<if test="stockStatus != null">#{stockStatus},</if>
|
||||
<if test="supplierId != null">#{supplierId},</if>
|
||||
<if test="customerId != null">#{customerId},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spec != null">#{spec},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
<if test="spare6 != null">#{spare6},</if>
|
||||
<if test="scanNum != null">#{scanNum},</if>
|
||||
<if test="scanNumX != null">#{scanNumX},</if>
|
||||
<if test="scanNumJ != null">#{scanNumJ},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCheckStockinDetailFinish" parameterType="CheckStockinDetailFinish">
|
||||
update check_stockin_detail_finish
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockCheckGuid != null and stockCheckGuid != ''">stock_check_guid = #{stockCheckGuid},</if>
|
||||
<if test="stockCheckId != null and stockCheckId != ''">stock_check_id = #{stockCheckId},</if>
|
||||
<if test="lotNo != null and lotNo != ''">lot_no = #{lotNo},</if>
|
||||
<if test="productGuid != null">product_guid = #{productGuid},</if>
|
||||
<if test="productId != null and productId != ''">product_id = #{productId},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="quantityX != null">quantity_x = #{quantityX},</if>
|
||||
<if test="quantityJ != null">quantity_j = #{quantityJ},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="assignNum != null">assign_num = #{assignNum},</if>
|
||||
<if test="assignNumX != null">assign_num_x = #{assignNumX},</if>
|
||||
<if test="assignNumJ != null">assign_num_j = #{assignNumJ},</if>
|
||||
<if test="printDate != null">print_date = #{printDate},</if>
|
||||
<if test="stockStatus != null">stock_status = #{stockStatus},</if>
|
||||
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="spec != null">spec = #{spec},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
<if test="spare6 != null">spare6 = #{spare6},</if>
|
||||
<if test="scanNum != null">scan_num = #{scanNum},</if>
|
||||
<if test="scanNumX != null">scan_num_x = #{scanNumX},</if>
|
||||
<if test="scanNumJ != null">scan_num_j = #{scanNumJ},</if>
|
||||
</trim>
|
||||
where stock_check_detail_id = #{stockCheckDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCheckStockinDetailFinishByStockCheckDetailId" parameterType="String">
|
||||
delete from check_stockin_detail_finish where stock_check_detail_id = #{stockCheckDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCheckStockinDetailFinishByStockCheckDetailIds" parameterType="String">
|
||||
delete from check_stockin_detail_finish where stock_check_detail_id in
|
||||
<foreach item="stockCheckDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{stockCheckDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,197 @@
|
||||
<?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.ruoyi.check.stockcheckdetail.mapper.CheckStockinDetailMapper">
|
||||
|
||||
<resultMap type="CheckStockinDetail" id="CheckStockinDetailResult">
|
||||
<result property="stockCheckDetailId" column="stock_check_detail_id" />
|
||||
<result property="stockCheckGuid" column="stock_check_guid" />
|
||||
<result property="stockCheckId" column="stock_check_id" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="quantityX" column="quantity_x" />
|
||||
<result property="quantityJ" column="quantity_j" />
|
||||
<result property="price" column="price" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="assignNum" column="assign_num" />
|
||||
<result property="assignNumX" column="assign_num_x" />
|
||||
<result property="assignNumJ" column="assign_num_j" />
|
||||
<result property="printDate" column="print_date" />
|
||||
<result property="stockStatus" column="stock_status" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
<result property="scanNum" column="scan_num" />
|
||||
<result property="scanNumX" column="scan_num_x" />
|
||||
<result property="scanNumJ" column="scan_num_j" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare6" column="spare6" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCheckStockinDetailVo">
|
||||
select stock_check_detail_id, stock_check_guid, stock_check_id, lot_no, product_guid, product_id, quantity, quantity_x, quantity_j, price, cargo_no, remark, assign_num, assign_num_x, assign_num_j, print_date, stock_status, supplier_id, customer_id, unit, spec, scan_num, scan_num_x, scan_num_j, spare1, spare2, spare3, spare4, spare5, spare6 from check_stockin_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectCheckStockinDetailList" parameterType="CheckStockinDetail" resultMap="CheckStockinDetailResult">
|
||||
<include refid="selectCheckStockinDetailVo"/>
|
||||
<where>
|
||||
<if test="stockCheckGuid != null and stockCheckGuid != ''"> and stock_check_guid = #{stockCheckGuid}</if>
|
||||
<if test="stockCheckId != null and stockCheckId != ''"> and stock_check_id = #{stockCheckId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
||||
<if test="quantityX != null and quantityX != ''"> and quantity_x = #{quantityX}</if>
|
||||
<if test="quantityJ != null and quantityJ != ''"> and quantity_j = #{quantityJ}</if>
|
||||
<if test="price != null and price != ''"> and price = #{price}</if>
|
||||
<if test="cargoNo != null and cargoNo != ''"> and cargo_no = #{cargoNo}</if>
|
||||
<if test="assignNum != null and assignNum != ''"> and assign_num = #{assignNum}</if>
|
||||
<if test="assignNumX != null and assignNumX != ''"> and assign_num_x = #{assignNumX}</if>
|
||||
<if test="assignNumJ != null and assignNumJ != ''"> and assign_num_j = #{assignNumJ}</if>
|
||||
<if test="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
|
||||
<if test="stockStatus != null and stockStatus != ''"> and stock_status = #{stockStatus}</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and supplier_id = #{supplierId}</if>
|
||||
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="spec != null and spec != ''"> and spec = #{spec}</if>
|
||||
<if test="scanNum != null and scanNum != ''"> and scan_num = #{scanNum}</if>
|
||||
<if test="scanNumX != null and scanNumX != ''"> and scan_num_x = #{scanNumX}</if>
|
||||
<if test="scanNumJ != null and scanNumJ != ''"> and scan_num_j = #{scanNumJ}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
||||
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCheckStockinDetailByStockCheckDetailId" parameterType="String" resultMap="CheckStockinDetailResult">
|
||||
<include refid="selectCheckStockinDetailVo"/>
|
||||
where stock_check_detail_id = #{stockCheckDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertCheckStockinDetail" parameterType="CheckStockinDetail">
|
||||
insert into check_stockin_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockCheckDetailId != null">stock_check_detail_id,</if>
|
||||
<if test="stockCheckGuid != null and stockCheckGuid != ''">stock_check_guid,</if>
|
||||
<if test="stockCheckId != null and stockCheckId != ''">stock_check_id,</if>
|
||||
<if test="lotNo != null and lotNo != ''">lot_no,</if>
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
<if test="productId != null and productId != ''">product_id,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="quantityX != null">quantity_x,</if>
|
||||
<if test="quantityJ != null">quantity_j,</if>
|
||||
<if test="price != null">price,</if>
|
||||
<if test="cargoNo != null">cargo_no,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="assignNum != null">assign_num,</if>
|
||||
<if test="assignNumX != null">assign_num_x,</if>
|
||||
<if test="assignNumJ != null">assign_num_j,</if>
|
||||
<if test="printDate != null">print_date,</if>
|
||||
<if test="stockStatus != null">stock_status,</if>
|
||||
<if test="supplierId != null">supplier_id,</if>
|
||||
<if test="customerId != null">customer_id,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="spec != null">spec,</if>
|
||||
<if test="scanNum != null">scan_num,</if>
|
||||
<if test="scanNumX != null">scan_num_x,</if>
|
||||
<if test="scanNumJ != null">scan_num_j,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
<if test="spare6 != null">spare6,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockCheckDetailId != null">#{stockCheckDetailId},</if>
|
||||
<if test="stockCheckGuid != null and stockCheckGuid != ''">#{stockCheckGuid},</if>
|
||||
<if test="stockCheckId != null and stockCheckId != ''">#{stockCheckId},</if>
|
||||
<if test="lotNo != null and lotNo != ''">#{lotNo},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="productId != null and productId != ''">#{productId},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="quantityX != null">#{quantityX},</if>
|
||||
<if test="quantityJ != null">#{quantityJ},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="cargoNo != null">#{cargoNo},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="assignNum != null">#{assignNum},</if>
|
||||
<if test="assignNumX != null">#{assignNumX},</if>
|
||||
<if test="assignNumJ != null">#{assignNumJ},</if>
|
||||
<if test="printDate != null">#{printDate},</if>
|
||||
<if test="stockStatus != null">#{stockStatus},</if>
|
||||
<if test="supplierId != null">#{supplierId},</if>
|
||||
<if test="customerId != null">#{customerId},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spec != null">#{spec},</if>
|
||||
<if test="scanNum != null">#{scanNum},</if>
|
||||
<if test="scanNumX != null">#{scanNumX},</if>
|
||||
<if test="scanNumJ != null">#{scanNumJ},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
<if test="spare6 != null">#{spare6},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCheckStockinDetail" parameterType="CheckStockinDetail">
|
||||
update check_stockin_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockCheckGuid != null and stockCheckGuid != ''">stock_check_guid = #{stockCheckGuid},</if>
|
||||
<if test="stockCheckId != null and stockCheckId != ''">stock_check_id = #{stockCheckId},</if>
|
||||
<if test="lotNo != null and lotNo != ''">lot_no = #{lotNo},</if>
|
||||
<if test="productGuid != null">product_guid = #{productGuid},</if>
|
||||
<if test="productId != null and productId != ''">product_id = #{productId},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="quantityX != null">quantity_x = #{quantityX},</if>
|
||||
<if test="quantityJ != null">quantity_j = #{quantityJ},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="assignNum != null">assign_num = #{assignNum},</if>
|
||||
<if test="assignNumX != null">assign_num_x = #{assignNumX},</if>
|
||||
<if test="assignNumJ != null">assign_num_j = #{assignNumJ},</if>
|
||||
<if test="printDate != null">print_date = #{printDate},</if>
|
||||
<if test="stockStatus != null">stock_status = #{stockStatus},</if>
|
||||
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="spec != null">spec = #{spec},</if>
|
||||
<if test="scanNum != null">scan_num = #{scanNum},</if>
|
||||
<if test="scanNumX != null">scan_num_x = #{scanNumX},</if>
|
||||
<if test="scanNumJ != null">scan_num_j = #{scanNumJ},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
<if test="spare6 != null">spare6 = #{spare6},</if>
|
||||
</trim>
|
||||
where stock_check_detail_id = #{stockCheckDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCheckStockinDetailByStockCheckDetailId" parameterType="String">
|
||||
delete from check_stockin_detail where stock_check_detail_id = #{stockCheckDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCheckStockinDetailByStockCheckDetailIds" parameterType="String">
|
||||
delete from check_stockin_detail where stock_check_detail_id in
|
||||
<foreach item="stockCheckDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{stockCheckDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,143 @@
|
||||
<?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.ruoyi.check.stockcheckfinish.mapper.CheckStockinFinishMapper">
|
||||
|
||||
<resultMap type="CheckStockinFinish" id="CheckStockinFinishResult">
|
||||
<result property="stockGuid" column="stock_guid" />
|
||||
<result property="stockCheckId" column="stock_check_id" />
|
||||
<result property="checkType" column="check_type" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="createManId" column="create_man_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="finishDate" column="finish_date" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="erpBill" column="erp_bill" />
|
||||
<result property="stockSource" column="stock_source" />
|
||||
<result property="departmentNo" column="department_no" />
|
||||
<result property="customerNo" column="customer_no" />
|
||||
<result property="classNo" column="class_no" />
|
||||
<result property="supplierNo" column="supplier_no" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCheckStockinFinishVo">
|
||||
select stock_guid, stock_check_id, check_type, create_date, create_man_id, status, warehouse_id, spare5, spare4, spare3, finish_date, spare2, spare1, erp_bill, stock_source, department_no, customer_no, class_no, supplier_no from check_stockin_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectCheckStockinFinishList" parameterType="CheckStockinFinish" resultMap="CheckStockinFinishResult">
|
||||
<include refid="selectCheckStockinFinishVo"/>
|
||||
<where>
|
||||
<if test="stockCheckId != null and stockCheckId != ''"> and stock_check_id = #{stockCheckId}</if>
|
||||
<if test="checkType != null and checkType != ''"> and check_type = #{checkType}</if>
|
||||
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if>
|
||||
<if test="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="erpBill != null and erpBill != ''"> and erp_bill = #{erpBill}</if>
|
||||
<if test="stockSource != null and stockSource != ''"> and stock_source = #{stockSource}</if>
|
||||
<if test="departmentNo != null and departmentNo != ''"> and department_no = #{departmentNo}</if>
|
||||
<if test="customerNo != null and customerNo != ''"> and customer_no = #{customerNo}</if>
|
||||
<if test="classNo != null and classNo != ''"> and class_no = #{classNo}</if>
|
||||
<if test="supplierNo != null and supplierNo != ''"> and supplier_no = #{supplierNo}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCheckStockinFinishByStockGuid" parameterType="String" resultMap="CheckStockinFinishResult">
|
||||
<include refid="selectCheckStockinFinishVo"/>
|
||||
where stock_guid = #{stockGuid}
|
||||
</select>
|
||||
|
||||
<insert id="insertCheckStockinFinish" parameterType="CheckStockinFinish">
|
||||
insert into check_stockin_finish
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockGuid != null">stock_guid,</if>
|
||||
<if test="stockCheckId != null and stockCheckId != ''">stock_check_id,</if>
|
||||
<if test="checkType != null and checkType != ''">check_type,</if>
|
||||
<if test="createDate != null and createDate != ''">create_date,</if>
|
||||
<if test="createManId != null">create_man_id,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="finishDate != null">finish_date,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="erpBill != null">erp_bill,</if>
|
||||
<if test="stockSource != null">stock_source,</if>
|
||||
<if test="departmentNo != null">department_no,</if>
|
||||
<if test="customerNo != null">customer_no,</if>
|
||||
<if test="classNo != null">class_no,</if>
|
||||
<if test="supplierNo != null">supplier_no,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockGuid != null">#{stockGuid},</if>
|
||||
<if test="stockCheckId != null and stockCheckId != ''">#{stockCheckId},</if>
|
||||
<if test="checkType != null and checkType != ''">#{checkType},</if>
|
||||
<if test="createDate != null and createDate != ''">#{createDate},</if>
|
||||
<if test="createManId != null">#{createManId},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="finishDate != null">#{finishDate},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="erpBill != null">#{erpBill},</if>
|
||||
<if test="stockSource != null">#{stockSource},</if>
|
||||
<if test="departmentNo != null">#{departmentNo},</if>
|
||||
<if test="customerNo != null">#{customerNo},</if>
|
||||
<if test="classNo != null">#{classNo},</if>
|
||||
<if test="supplierNo != null">#{supplierNo},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCheckStockinFinish" parameterType="CheckStockinFinish">
|
||||
update check_stockin_finish
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockCheckId != null and stockCheckId != ''">stock_check_id = #{stockCheckId},</if>
|
||||
<if test="checkType != null and checkType != ''">check_type = #{checkType},</if>
|
||||
<if test="createDate != null and createDate != ''">create_date = #{createDate},</if>
|
||||
<if test="createManId != null">create_man_id = #{createManId},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="erpBill != null">erp_bill = #{erpBill},</if>
|
||||
<if test="stockSource != null">stock_source = #{stockSource},</if>
|
||||
<if test="departmentNo != null">department_no = #{departmentNo},</if>
|
||||
<if test="customerNo != null">customer_no = #{customerNo},</if>
|
||||
<if test="classNo != null">class_no = #{classNo},</if>
|
||||
<if test="supplierNo != null">supplier_no = #{supplierNo},</if>
|
||||
</trim>
|
||||
where stock_guid = #{stockGuid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCheckStockinFinishByStockGuid" parameterType="String">
|
||||
delete from check_stockin_finish where stock_guid = #{stockGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCheckStockinFinishByStockGuids" parameterType="String">
|
||||
delete from check_stockin_finish where stock_guid in
|
||||
<foreach item="stockGuid" collection="array" open="(" separator="," close=")">
|
||||
#{stockGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,143 @@
|
||||
<?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.ruoyi.check.stockcheck.mapper.CheckStockinMapper">
|
||||
|
||||
<resultMap type="CheckStockin" id="CheckStockinResult">
|
||||
<result property="stockGuid" column="stock_guid" />
|
||||
<result property="stockCheckId" column="stock_check_id" />
|
||||
<result property="checkType" column="check_type" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="createManId" column="create_man_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="finishDate" column="finish_date" />
|
||||
<result property="erpBill" column="erp_bill" />
|
||||
<result property="stockSource" column="stock_source" />
|
||||
<result property="departmentNo" column="department_no" />
|
||||
<result property="customerNo" column="customer_no" />
|
||||
<result property="classNo" column="class_no" />
|
||||
<result property="supplierNo" column="supplier_no" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCheckStockinVo">
|
||||
select stock_guid, stock_check_id, check_type, create_date, create_man_id, status, warehouse_id, finish_date, erp_bill, stock_source, department_no, customer_no, class_no, supplier_no, spare1, spare2, spare3, spare4, spare5 from check_stockin
|
||||
</sql>
|
||||
|
||||
<select id="selectCheckStockinList" parameterType="CheckStockin" resultMap="CheckStockinResult">
|
||||
<include refid="selectCheckStockinVo"/>
|
||||
<where>
|
||||
<if test="stockCheckId != null and stockCheckId != ''"> and stock_check_id = #{stockCheckId}</if>
|
||||
<if test="checkType != null and checkType != ''"> and check_type = #{checkType}</if>
|
||||
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if>
|
||||
<if test="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if>
|
||||
<if test="erpBill != null and erpBill != ''"> and erp_bill = #{erpBill}</if>
|
||||
<if test="stockSource != null and stockSource != ''"> and stock_source = #{stockSource}</if>
|
||||
<if test="departmentNo != null and departmentNo != ''"> and department_no = #{departmentNo}</if>
|
||||
<if test="customerNo != null and customerNo != ''"> and customer_no = #{customerNo}</if>
|
||||
<if test="classNo != null and classNo != ''"> and class_no = #{classNo}</if>
|
||||
<if test="supplierNo != null and supplierNo != ''"> and supplier_no = #{supplierNo}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCheckStockinByStockGuid" parameterType="String" resultMap="CheckStockinResult">
|
||||
<include refid="selectCheckStockinVo"/>
|
||||
where stock_guid = #{stockGuid}
|
||||
</select>
|
||||
|
||||
<insert id="insertCheckStockin" parameterType="CheckStockin">
|
||||
insert into check_stockin
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockGuid != null">stock_guid,</if>
|
||||
<if test="stockCheckId != null and stockCheckId != ''">stock_check_id,</if>
|
||||
<if test="checkType != null and checkType != ''">check_type,</if>
|
||||
<if test="createDate != null and createDate != ''">create_date,</if>
|
||||
<if test="createManId != null">create_man_id,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="finishDate != null">finish_date,</if>
|
||||
<if test="erpBill != null">erp_bill,</if>
|
||||
<if test="stockSource != null">stock_source,</if>
|
||||
<if test="departmentNo != null">department_no,</if>
|
||||
<if test="customerNo != null">customer_no,</if>
|
||||
<if test="classNo != null">class_no,</if>
|
||||
<if test="supplierNo != null">supplier_no,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockGuid != null">#{stockGuid},</if>
|
||||
<if test="stockCheckId != null and stockCheckId != ''">#{stockCheckId},</if>
|
||||
<if test="checkType != null and checkType != ''">#{checkType},</if>
|
||||
<if test="createDate != null and createDate != ''">#{createDate},</if>
|
||||
<if test="createManId != null">#{createManId},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="finishDate != null">#{finishDate},</if>
|
||||
<if test="erpBill != null">#{erpBill},</if>
|
||||
<if test="stockSource != null">#{stockSource},</if>
|
||||
<if test="departmentNo != null">#{departmentNo},</if>
|
||||
<if test="customerNo != null">#{customerNo},</if>
|
||||
<if test="classNo != null">#{classNo},</if>
|
||||
<if test="supplierNo != null">#{supplierNo},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCheckStockin" parameterType="CheckStockin">
|
||||
update check_stockin
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockCheckId != null and stockCheckId != ''">stock_check_id = #{stockCheckId},</if>
|
||||
<if test="checkType != null and checkType != ''">check_type = #{checkType},</if>
|
||||
<if test="createDate != null and createDate != ''">create_date = #{createDate},</if>
|
||||
<if test="createManId != null">create_man_id = #{createManId},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
||||
<if test="erpBill != null">erp_bill = #{erpBill},</if>
|
||||
<if test="stockSource != null">stock_source = #{stockSource},</if>
|
||||
<if test="departmentNo != null">department_no = #{departmentNo},</if>
|
||||
<if test="customerNo != null">customer_no = #{customerNo},</if>
|
||||
<if test="classNo != null">class_no = #{classNo},</if>
|
||||
<if test="supplierNo != null">supplier_no = #{supplierNo},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
</trim>
|
||||
where stock_guid = #{stockGuid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCheckStockinByStockGuid" parameterType="String">
|
||||
delete from check_stockin where stock_guid = #{stockGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCheckStockinByStockGuids" parameterType="String">
|
||||
delete from check_stockin where stock_guid in
|
||||
<foreach item="stockGuid" collection="array" open="(" separator="," close=")">
|
||||
#{stockGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -38,40 +38,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInStockinDetailVo">
|
||||
select stockin_detail_id, stockin_guid, stockin_id, lot_no, product_guid, product_id, quantity, quantity_x, quantity_j, price, cargo_no, remark, assign_num, assign_num_x, assign_num_j, print_date, stock_status, supplier_id, customer_id, unit, spec, spare1, spare2, spare3, spare4, spare5, spare6, scan_num, scan_num_x, scan_num_j from in_stockin_detail
|
||||
select stockin_detail_id, stockin_guid, stockin_id, lot_no, isd.product_guid,
|
||||
isd.product_id, quantity, quantity_x, quantity_j, isd.price, isd.cargo_no, isd.remark,
|
||||
assign_num, assign_num_x, assign_num_j, print_date, stock_status,
|
||||
supplier_id, customer_id, isd.unit, isd.spec, isd.spare1, isd.spare2, isd.spare3, isd.spare4,
|
||||
isd.spare5, isd.spare6, scan_num, scan_num_x, scan_num_j
|
||||
from in_stockin_detail isd
|
||||
left join bas_product bp on bp.product_id = isd.product_id
|
||||
</sql>
|
||||
|
||||
<select id="selectInStockinDetailList" parameterType="InStockinDetail" resultMap="InStockinDetailResult">
|
||||
<include refid="selectInStockinDetailVo"/>
|
||||
<where>
|
||||
<if test="stockinGuid != null and stockinGuid != ''"> and stockin_guid = #{stockinGuid}</if>
|
||||
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
||||
<if test="quantityX != null and quantityX != ''"> and quantity_x = #{quantityX}</if>
|
||||
<if test="quantityJ != null and quantityJ != ''"> and quantity_j = #{quantityJ}</if>
|
||||
<if test="price != null and price != ''"> and price = #{price}</if>
|
||||
<if test="cargoNo != null and cargoNo != ''"> and cargo_no = #{cargoNo}</if>
|
||||
<if test="assignNum != null and assignNum != ''"> and assign_num = #{assignNum}</if>
|
||||
<if test="assignNumX != null and assignNumX != ''"> and assign_num_x = #{assignNumX}</if>
|
||||
<if test="assignNumJ != null and assignNumJ != ''"> and assign_num_j = #{assignNumJ}</if>
|
||||
<if test="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
|
||||
<if test="stockStatus != null and stockStatus != ''"> and stock_status = #{stockStatus}</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and supplier_id = #{supplierId}</if>
|
||||
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="spec != null and spec != ''"> and spec = #{spec}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
||||
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
|
||||
<if test="scanNum != null and scanNum != ''"> and scan_num = #{scanNum}</if>
|
||||
<if test="scanNumX != null and scanNumX != ''"> and scan_num_x = #{scanNumX}</if>
|
||||
<if test="scanNumJ != null and scanNumJ != ''"> and scan_num_j = #{scanNumJ}</if>
|
||||
<if test="stockinGuid != null and stockinGuid != ''"> and isd.stockin_guid = #{stockinGuid}</if>
|
||||
<if test="stockinId != null and stockinId != ''"> and isd.stockin_id = #{stockinId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and isd.lot_no = #{lotNo}</if>
|
||||
<if test="productGuid != null and productGuid != ''"> and isd.product_guid = #{productGuid}</if>
|
||||
<if test="productId != null and productId != ''"> and isd.product_id = #{productId}</if>
|
||||
<if test="quantity != null and quantity != ''"> and isd.quantity = #{quantity}</if>
|
||||
<if test="quantityX != null and quantityX != ''"> and isd.quantity_x = #{quantityX}</if>
|
||||
<if test="quantityJ != null and quantityJ != ''"> and isd.quantity_j = #{quantityJ}</if>
|
||||
<if test="price != null and price != ''"> and isd.price = #{price}</if>
|
||||
<if test="cargoNo != null and cargoNo != ''"> and isd.cargo_no = #{cargoNo}</if>
|
||||
<if test="assignNum != null and assignNum != ''"> and isd.assign_num = #{assignNum}</if>
|
||||
<if test="assignNumX != null and assignNumX != ''"> and isd.assign_num_x = #{assignNumX}</if>
|
||||
<if test="assignNumJ != null and assignNumJ != ''"> and isd.assign_num_j = #{assignNumJ}</if>
|
||||
<if test="printDate != null and printDate != ''"> and isd.print_date = #{printDate}</if>
|
||||
<if test="stockStatus != null and stockStatus != ''"> and isd.stock_status = #{stockStatus}</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and isd.supplier_id = #{supplierId}</if>
|
||||
<if test="customerId != null and customerId != ''"> and isd.customer_id = #{customerId}</if>
|
||||
<if test="unit != null and unit != ''"> and isd.unit = #{unit}</if>
|
||||
<if test="spec != null and spec != ''"> and isd.spec = #{spec}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and isd.spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and isd.spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and isd.spare3 = #{spare3}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and isd.spare4 = #{spare4}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and isd.spare5 = #{spare5}</if>
|
||||
<if test="spare6 != null and spare6 != ''"> and isd.spare6 = #{spare6}</if>
|
||||
<if test="scanNum != null and scanNum != ''"> and isd.scan_num = #{scanNum}</if>
|
||||
<if test="scanNumX != null and scanNumX != ''"> and isd.scan_num_x = #{scanNumX}</if>
|
||||
<if test="scanNumJ != null and scanNumJ != ''"> and isd.scan_num_j = #{scanNumJ}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user