万材erp项目
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.
 
 
 
 

105 lines
5.0 KiB

<?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.invoice.mapper.PoInvoiceListMapper">
<resultMap type="PoInvoiceList" id="PoInvoiceListResult">
<result property="invoiceid" column="invoiceid" />
<result property="orderno" column="orderno" />
<result property="wlCode" column="wl_code" />
<result property="itemname" column="itemname" />
<result property="stockDw" column="stock_dw" />
<result property="crlName" column="crl_name" />
<result property="qty" column="qty" />
<result property="price" column="price" />
<result property="amt" column="amt" />
<result property="PNO" column="PNO" />
<result property="FPH" column="FPH" />
</resultMap>
<sql id="selectPoInvoiceListVo">
select invoiceid, orderno, wl_code, itemname, stock_dw, crl_name, qty, price, amt, PNO, FPH from poinvoicelist
</sql>
<select id="selectPoInvoiceListList" parameterType="PoInvoiceList" resultMap="PoInvoiceListResult">
<include refid="selectPoInvoiceListVo"/>
<where>
<if test="invoiceid != null and invoiceid != ''"> and invoiceid = #{invoiceid}</if>
<if test="orderno != null and orderno != ''"> and orderno = #{orderno}</if>
<if test="wlCode != null and wlCode != ''"> and wl_code = #{wlCode}</if>
<if test="itemname != null and itemname != ''"> and itemname like concat('%', #{itemname}, '%')</if>
<if test="stockDw != null and stockDw != ''"> and stock_dw = #{stockDw}</if>
<if test="crlName != null and crlName != ''"> and crl_name like concat('%', #{crlName}, '%')</if>
<if test="qty != null "> and qty = #{qty}</if>
<if test="price != null "> and price = #{price}</if>
<if test="amt != null "> and amt = #{amt}</if>
<if test="PNO != null and PNO != ''"> and PNO = #{PNO}</if>
<if test="FPH != null and FPH != ''"> and FPH = #{FPH}</if>
</where>
</select>
<select id="selectPoInvoiceListById" parameterType="String" resultMap="PoInvoiceListResult">
<include refid="selectPoInvoiceListVo"/>
where invoiceid = #{invoiceid}
</select>
<insert id="insertPoInvoiceList" parameterType="PoInvoiceList">
insert into poinvoicelist
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="invoiceid != null">invoiceid,</if>
<if test="orderno != null">orderno,</if>
<if test="wlCode != null">wl_code,</if>
<if test="itemname != null">itemname,</if>
<if test="stockDw != null">stock_dw,</if>
<if test="crlName != null">crl_name,</if>
<if test="qty != null">qty,</if>
<if test="price != null">price,</if>
<if test="amt != null">amt,</if>
<if test="PNO != null">PNO,</if>
<if test="FPH != null">FPH,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="invoiceid != null">#{invoiceid},</if>
<if test="orderno != null">#{orderno},</if>
<if test="wlCode != null">#{wlCode},</if>
<if test="itemname != null">#{itemname},</if>
<if test="stockDw != null">#{stockDw},</if>
<if test="crlName != null">#{crlName},</if>
<if test="qty != null">#{qty},</if>
<if test="price != null">#{price},</if>
<if test="amt != null">#{amt},</if>
<if test="PNO != null">#{PNO},</if>
<if test="FPH != null">#{FPH},</if>
</trim>
</insert>
<update id="updatePoInvoiceList" parameterType="PoInvoiceList">
update poinvoicelist
<trim prefix="SET" suffixOverrides=",">
<if test="orderno != null">orderno = #{orderno},</if>
<if test="wlCode != null">wl_code = #{wlCode},</if>
<if test="itemname != null">itemname = #{itemname},</if>
<if test="stockDw != null">stock_dw = #{stockDw},</if>
<if test="crlName != null">crl_name = #{crlName},</if>
<if test="qty != null">qty = #{qty},</if>
<if test="price != null">price = #{price},</if>
<if test="amt != null">amt = #{amt},</if>
<if test="PNO != null">PNO = #{PNO},</if>
<if test="FPH != null">FPH = #{FPH},</if>
</trim>
where invoiceid = #{invoiceid}
</update>
<delete id="deletePoInvoiceListById" parameterType="String">
delete from poinvoicelist where invoiceid = #{invoiceid}
</delete>
<delete id="deletePoInvoiceListByIds" parameterType="String">
delete from poinvoicelist where invoiceid in
<foreach item="invoiceid" collection="array" open="(" separator="," close=")">
#{invoiceid}
</foreach>
</delete>
</mapper>