You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
179 lines
9.4 KiB
179 lines
9.4 KiB
2 years ago
|
<?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.po.mapper.BuyorderListMapper">
|
||
|
|
||
|
<resultMap type="BuyorderList" id="BuyorderListResult">
|
||
|
<result property="poId" column="PO_ID" />
|
||
|
<result property="PNO" column="PNO" />
|
||
|
<result property="wlCode" column="Wl_Code" />
|
||
|
<result property="Itemname" column="Itemname" />
|
||
|
<result property="Itemstandard" column="Itemstandard" />
|
||
|
<result property="stockDw" column="Stock_dw" />
|
||
|
<result property="Qty" column="Qty" />
|
||
|
<result property="Weight" column="Weight" />
|
||
|
<result property="crlName" column="Crl_Name" />
|
||
|
<result property="Price" column="Price" />
|
||
|
<result property="Amt" column="Amt" />
|
||
|
<result property="SendDate" column="SendDate" />
|
||
|
<result property="MemoList" column="MemoList" />
|
||
|
<result property="OrderQty" column="OrderQty" />
|
||
|
<result property="qQty" column="Q_Qty" />
|
||
|
<result property="poQty" column="PO_qty" />
|
||
|
<result property="poDw" column="po_dw" />
|
||
|
<result property="poPrice" column="po_price" />
|
||
|
<result property="poRelation" column="po_relation" />
|
||
|
<result property="getDate" column="get_date" />
|
||
|
<result property="huili" column="huili" />
|
||
|
<result property="rmbPrice" column="RMB_Price" />
|
||
|
<result property="gysno" column="gysno" />
|
||
|
<result property="killQty" column="Kill_QTY" />
|
||
|
<result property="jaFlag" column="JA_Flag" />
|
||
|
<result property="taxMemolist" column="tax_memolist" />
|
||
|
<result property="juanNum" column="juan_num" />
|
||
|
<result property="pWldm" column="p_wldm" />
|
||
|
<result property="notSubmittedNum" column="not_submitted_num" />
|
||
|
<result property="submittedNum" column="submitted_num" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectBuyorderListVo">
|
||
|
select PO_ID, PNO, Wl_Code, Itemname, Itemstandard, Stock_dw, Qty, Weight, Crl_Name, Price, Amt, SendDate, MemoList, OrderQty, Q_Qty, PO_qty, po_dw, po_price, po_relation, get_date, huili, RMB_Price, gysno, Kill_QTY, JA_Flag, tax_memolist, juan_num, p_wldm, not_submitted_num, submitted_num from buyorder_list
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectBuyorderListList" parameterType="BuyorderList" resultMap="BuyorderListResult">
|
||
|
<include refid="selectBuyorderListVo"/>
|
||
|
<where>
|
||
|
<if test="poId != null and poId != ''"> and PO_ID like concat('%', #{poId}, '%')</if>
|
||
|
<if test="PNO != null and PNO != ''"> and PNO like concat('%', #{PNO}, '%')</if>
|
||
|
<if test="wlCode != null and wlCode != ''"> and Wl_Code like concat('%', #{wlCode}, '%')</if>
|
||
|
<if test="MemoList != null and MemoList != ''"> and MemoList like concat('%', #{MemoList}, '%')</if>
|
||
|
</where>
|
||
|
order by SendDate desc
|
||
|
</select>
|
||
|
|
||
|
<select id="selectBuyorderListById" parameterType="String" resultMap="BuyorderListResult">
|
||
|
<include refid="selectBuyorderListVo"/>
|
||
|
where PO_ID = #{poId}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertBuyorderList" parameterType="BuyorderList">
|
||
|
insert into buyorder_list
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="poId != null and poId != ''">PO_ID,</if>
|
||
|
<if test="PNO != null">PNO,</if>
|
||
|
<if test="wlCode != null">Wl_Code,</if>
|
||
|
<if test="Itemname != null">Itemname,</if>
|
||
|
<if test="Itemstandard != null">Itemstandard,</if>
|
||
|
<if test="stockDw != null">Stock_dw,</if>
|
||
|
<if test="Qty != null">Qty,</if>
|
||
|
<if test="Weight != null">Weight,</if>
|
||
|
<if test="crlName != null">Crl_Name,</if>
|
||
|
<if test="Price != null">Price,</if>
|
||
|
<if test="Amt != null">Amt,</if>
|
||
|
<if test="SendDate != null">SendDate,</if>
|
||
|
<if test="MemoList != null">MemoList,</if>
|
||
|
<if test="OrderQty != null">OrderQty,</if>
|
||
|
<if test="qQty != null">Q_Qty,</if>
|
||
|
<if test="poQty != null">PO_qty,</if>
|
||
|
<if test="poDw != null">po_dw,</if>
|
||
|
<if test="poPrice != null">po_price,</if>
|
||
|
<if test="poRelation != null">po_relation,</if>
|
||
|
<if test="getDate != null">get_date,</if>
|
||
|
<if test="huili != null">huili,</if>
|
||
|
<if test="rmbPrice != null">RMB_Price,</if>
|
||
|
<if test="gysno != null">gysno,</if>
|
||
|
<if test="killQty != null">Kill_QTY,</if>
|
||
|
<if test="jaFlag != null">JA_Flag,</if>
|
||
|
<if test="taxMemolist != null">tax_memolist,</if>
|
||
|
<if test="juanNum != null">juan_num,</if>
|
||
|
<if test="pWldm != null">p_wldm,</if>
|
||
|
<if test="notSubmittedNum != null">not_submitted_num,</if>
|
||
|
<if test="submittedNum != null">submitted_num,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="poId != null and poId != ''">#{poId},</if>
|
||
|
<if test="PNO != null">#{PNO},</if>
|
||
|
<if test="wlCode != null">#{wlCode},</if>
|
||
|
<if test="Itemname != null">#{Itemname},</if>
|
||
|
<if test="Itemstandard != null">#{Itemstandard},</if>
|
||
|
<if test="stockDw != null">#{stockDw},</if>
|
||
|
<if test="Qty != null">#{Qty},</if>
|
||
|
<if test="Weight != null">#{Weight},</if>
|
||
|
<if test="crlName != null">#{crlName},</if>
|
||
|
<if test="Price != null">#{Price},</if>
|
||
|
<if test="Amt != null">#{Amt},</if>
|
||
|
<if test="SendDate != null">#{SendDate},</if>
|
||
|
<if test="MemoList != null">#{MemoList},</if>
|
||
|
<if test="OrderQty != null">#{OrderQty},</if>
|
||
|
<if test="qQty != null">#{qQty},</if>
|
||
|
<if test="poQty != null">#{poQty},</if>
|
||
|
<if test="poDw != null">#{poDw},</if>
|
||
|
<if test="poPrice != null">#{poPrice},</if>
|
||
|
<if test="poRelation != null">#{poRelation},</if>
|
||
|
<if test="getDate != null">#{getDate},</if>
|
||
|
<if test="huili != null">#{huili},</if>
|
||
|
<if test="rmbPrice != null">#{rmbPrice},</if>
|
||
|
<if test="gysno != null">#{gysno},</if>
|
||
|
<if test="killQty != null">#{killQty},</if>
|
||
|
<if test="jaFlag != null">#{jaFlag},</if>
|
||
|
<if test="taxMemolist != null">#{taxMemolist},</if>
|
||
|
<if test="juanNum != null">#{juanNum},</if>
|
||
|
<if test="pWldm != null">#{pWldm},</if>
|
||
|
<if test="notSubmittedNum != null">#{notSubmittedNum},</if>
|
||
|
<if test="submittedNum != null">#{submittedNum},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateBuyorderList" parameterType="BuyorderList">
|
||
|
update buyorder_list
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="PNO != null">PNO = #{PNO},</if>
|
||
|
<if test="wlCode != null">Wl_Code = #{wlCode},</if>
|
||
|
<if test="Itemname != null">Itemname = #{Itemname},</if>
|
||
|
<if test="Itemstandard != null">Itemstandard = #{Itemstandard},</if>
|
||
|
<if test="stockDw != null">Stock_dw = #{stockDw},</if>
|
||
|
<if test="Qty != null">Qty = #{Qty},</if>
|
||
|
<if test="Weight != null">Weight = #{Weight},</if>
|
||
|
<if test="crlName != null">Crl_Name = #{crlName},</if>
|
||
|
<if test="Price != null">Price = #{Price},</if>
|
||
|
<if test="Amt != null">Amt = #{Amt},</if>
|
||
|
<if test="SendDate != null">SendDate = #{SendDate},</if>
|
||
|
<if test="MemoList != null">MemoList = #{MemoList},</if>
|
||
|
<if test="OrderQty != null">OrderQty = #{OrderQty},</if>
|
||
|
<if test="qQty != null">Q_Qty = #{qQty},</if>
|
||
|
<if test="poQty != null">PO_qty = #{poQty},</if>
|
||
|
<if test="poDw != null">po_dw = #{poDw},</if>
|
||
|
<if test="poPrice != null">po_price = #{poPrice},</if>
|
||
|
<if test="poRelation != null">po_relation = #{poRelation},</if>
|
||
|
<if test="getDate != null">get_date = #{getDate},</if>
|
||
|
<if test="huili != null">huili = #{huili},</if>
|
||
|
<if test="rmbPrice != null">RMB_Price = #{rmbPrice},</if>
|
||
|
<if test="gysno != null">gysno = #{gysno},</if>
|
||
|
<if test="killQty != null">Kill_QTY = #{killQty},</if>
|
||
|
<if test="jaFlag != null">JA_Flag = #{jaFlag},</if>
|
||
|
<if test="taxMemolist != null">tax_memolist = #{taxMemolist},</if>
|
||
|
<if test="juanNum != null">juan_num = #{juanNum},</if>
|
||
|
<if test="pWldm != null">p_wldm = #{pWldm},</if>
|
||
|
<if test="notSubmittedNum != null">not_submitted_num = #{notSubmittedNum},</if>
|
||
|
<if test="submittedNum != null">submitted_num = #{submittedNum},</if>
|
||
|
</trim>
|
||
|
where PO_ID = #{poId}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteBuyorderListById" parameterType="String">
|
||
|
delete from buyorder_list where PO_ID = #{poId}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteBuyorderListByIds" parameterType="String">
|
||
|
delete from buyorder_list where PO_ID in
|
||
|
<foreach item="poId" collection="array" open="(" separator="," close=")">
|
||
|
#{poId}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
<select id="selectCountByDay" resultType="Integer">
|
||
|
select count(*) from buyorder_list where to_days(SendDate) = to_days(now());
|
||
|
</select>
|
||
|
|
||
|
</mapper>
|