171 lines
9.7 KiB
XML
171 lines
9.7 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.stockinback.mapper.InStockinBackMapper">
|
|
|
|
<resultMap type="InStockinBack" id="InStockinBackResult">
|
|
<result property="stockinGuid" column="stockin_guid" />
|
|
<result property="stockinId" column="stockin_id" />
|
|
<result property="inType" column="in_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" />
|
|
<result property="sendStatus" column="send_status"/>
|
|
<result property="sendTime" column="send_time"/>
|
|
<result property="msg" column="msg"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectInStockinBackVo">
|
|
select stockin_guid, stockin_id, in_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,send_status,send_time,msg from in_stockin_back
|
|
</sql>
|
|
|
|
<select id="selectInStockinBackList" parameterType="InStockinBack" resultMap="InStockinBackResult">
|
|
<include refid="selectInStockinBackVo"/>
|
|
<where>
|
|
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
|
|
<if test="inType != null and inType != ''"> and in_type = #{inType}</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>
|
|
<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="selectInStockinBackByStockinGuid" parameterType="String" resultMap="InStockinBackResult">
|
|
<include refid="selectInStockinBackVo"/>
|
|
where stockin_guid = #{stockinGuid}
|
|
</select>
|
|
|
|
<insert id="insertInStockinBack" parameterType="InStockinBack">
|
|
insert into in_stockin_back
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="stockinGuid != null">stockin_guid,</if>
|
|
<if test="stockinId != null and stockinId != ''">stockin_id,</if>
|
|
<if test="inType != null and inType != ''">in_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>
|
|
<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="stockinGuid != null">#{stockinGuid},</if>
|
|
<if test="stockinId != null and stockinId != ''">#{stockinId},</if>
|
|
<if test="inType != null and inType != ''">#{inType},</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>
|
|
<if test="sendStatus != null">#{sendStatus},</if>
|
|
<if test="sendTime != null">#{sendTime},</if>
|
|
<if test="msg != null">#{msg},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<insert id="insertInStockinBackById" parameterType="InStockin" >
|
|
insert into in_stockin_back
|
|
select * from in_stockin where stockin_guid = #{stockinGuid}
|
|
</insert>
|
|
|
|
<update id="updateInStockinBack" parameterType="InStockinBack">
|
|
update in_stockin_back
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="stockinId != null and stockinId != ''">stockin_id = #{stockinId},</if>
|
|
<if test="inType != null and inType != ''">in_type = #{inType},</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>
|
|
<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_guid = #{stockinGuid}
|
|
</update>
|
|
|
|
<delete id="deleteInStockinBackByStockinGuid" parameterType="String">
|
|
delete from in_stockin_back where stockin_guid = #{stockinGuid}
|
|
</delete>
|
|
|
|
<delete id="deleteInStockinBackByStockinGuids" parameterType="String">
|
|
delete from in_stockin_back where stockin_guid in
|
|
<foreach item="stockinGuid" collection="array" open="(" separator="," close=")">
|
|
#{stockinGuid}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<select id="selectTopInStockin" resultMap="InStockinBackResult">
|
|
select top(1) *
|
|
from in_stockin_back where send_status= 0
|
|
|
|
</select>
|
|
</mapper> |