241 lines
15 KiB
XML
241 lines
15 KiB
XML
<?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.in.stockindeatilback.mapper.InStockinDetailBackMapper">
|
|
|
|
<resultMap type="InStockinDetailBack" id="InStockinDetailBackResult">
|
|
<result property="stockinDetailId" column="stockin_detail_id" />
|
|
<result property="stockinGuid" column="stockin_guid" />
|
|
<result property="stockinId" column="stockin_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" />
|
|
<result property="spare7" column="spare7" />
|
|
<result property="spare8" column="spare8" />
|
|
<result property="spare9" column="spare9" />
|
|
<result property="productName" column="product_name" />
|
|
<result property="sendStatus" column="send_status"/>
|
|
<result property="sendTime" column="send_time"/>
|
|
<result property="msg" column="msg"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectInStockinDetailBackVo">
|
|
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, spare7, spare8, spare9, product_name,send_status,send_time,msg from in_stockin_detail_back
|
|
</sql>
|
|
|
|
<select id="selectInStockinDetailBackList" parameterType="InStockinDetailBack" resultMap="InStockinDetailBackResult">
|
|
<include refid="selectInStockinDetailBackVo"/>
|
|
<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="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
|
|
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
|
|
<if test="spare9 != null and spare9 != ''"> and spare9 = #{spare9}</if>
|
|
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
|
<if test="sendStatus != null and sendStatus != ''"> and send_status = #{sendStatus}</if>
|
|
<if test="sendTime != null and sendTime != ''"> and send_time = #{sendTime}</if>
|
|
<if test="msg != null and msg != ''"> and msg = #{msg}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectInStockinDetailBackByStockinDetailId" parameterType="String" resultMap="InStockinDetailBackResult">
|
|
<include refid="selectInStockinDetailBackVo"/>
|
|
where stockin_detail_id = #{stockinDetailId}
|
|
</select>
|
|
|
|
<insert id="insertInStockinDetailBack" parameterType="InStockinDetailBack">
|
|
insert into in_stockin_detail_back
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="stockinDetailId != null">stockin_detail_id,</if>
|
|
<if test="stockinGuid != null and stockinGuid != ''">stockin_guid,</if>
|
|
<if test="stockinId != null and stockinId != ''">stockin_id,</if>
|
|
<if test="lotNo != null">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>
|
|
<if test="spare7 != null">spare7,</if>
|
|
<if test="spare8 != null">spare8,</if>
|
|
<if test="spare9 != null">spare9,</if>
|
|
<if test="productName != null">product_name,</if>
|
|
<if test="sendStatus != null">send_status,</if>
|
|
<if test="sendTime != null">send_time,</if>
|
|
<if test="msg != null">msg,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="stockinDetailId != null">#{stockinDetailId},</if>
|
|
<if test="stockinGuid != null and stockinGuid != ''">#{stockinGuid},</if>
|
|
<if test="stockinId != null and stockinId != ''">#{stockinId},</if>
|
|
<if test="lotNo != null">#{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>
|
|
<if test="spare7 != null">#{spare7},</if>
|
|
<if test="spare8 != null">#{spare8},</if>
|
|
<if test="spare9 != null">#{spare9},</if>
|
|
<if test="productName != null">#{productName},</if>
|
|
<if test="sendStatus != null">#{sendStatus},</if>
|
|
<if test="sendTime != null">#{sendTime},</if>
|
|
<if test="msg != null">#{msg},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
|
|
<insert id="insertInStockinDetailBackById" parameterType="InStockin">
|
|
insert into in_stockin_detail_back
|
|
select * from in_stockin_detail where stockin_guid = #{stockinGuid}
|
|
</insert>
|
|
|
|
<update id="updateInStockinDetailBack" parameterType="InStockinDetailBack">
|
|
update in_stockin_detail_back
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="stockinGuid != null and stockinGuid != ''">stockin_guid = #{stockinGuid},</if>
|
|
|
|
<if test="lotNo != null">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>
|
|
<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">product_name = #{productName},</if>
|
|
<if test="sendStatus != null">send_status = #{sendStatus},</if>
|
|
<if test="sendTime != null">send_time = #{sendTime},</if>
|
|
<if test="msg != null">msg = #{msg},</if>
|
|
</trim>
|
|
where stockin_id = #{stockinId}
|
|
</update>
|
|
|
|
<delete id="deleteInStockinDetailBackByStockinDetailId" parameterType="String">
|
|
delete from in_stockin_detail_back where stockin_detail_id = #{stockinDetailId}
|
|
</delete>
|
|
|
|
<delete id="deleteInStockinDetailBackByStockinDetailIds" parameterType="String">
|
|
delete from in_stockin_detail_back where stockin_detail_id in
|
|
<foreach item="stockinDetailId" collection="array" open="(" separator="," close=")">
|
|
#{stockinDetailId}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |