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.
110 lines
5.5 KiB
110 lines
5.5 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.finance.mapper.ViewSaleorderHLMapper">
|
|
|
|
<resultMap type="ViewSaleorderHL" id="ViewSaleorderHLResult">
|
|
<result property="SaleorderNO" column="SaleorderNO" />
|
|
<result property="pName" column="P_Name" />
|
|
<result property="wlCode" column="Wl_Code" />
|
|
<result property="Itemname" column="Itemname" />
|
|
<result property="Qty" column="Qty" />
|
|
<result property="OrderQty" column="OrderQty" />
|
|
<result property="qQty" column="Q_Qty" />
|
|
<result property="zzgdOrderqty" column="ZZGD_OrderQty" />
|
|
<result property="zzgdQQty" column="ZZGD_Q_Qty" />
|
|
<result property="SendDate" column="SendDate" />
|
|
<result property="Factory" column="Factory" />
|
|
<result property="piNo" column="PI_NO" />
|
|
</resultMap>
|
|
|
|
<sql id="selectViewSaleorderHLVo">
|
|
select SaleorderNO, P_Name, Wl_Code, Itemname, Qty, OrderQty, Q_Qty, ZZGD_OrderQty, ZZGD_Q_Qty, SendDate, Factory, PI_NO from view_saleorder_h_l
|
|
</sql>
|
|
|
|
<select id="selectViewSaleorderHLList" parameterType="ViewSaleorderHL" resultMap="ViewSaleorderHLResult">
|
|
<include refid="selectViewSaleorderHLVo"/>
|
|
<where>
|
|
<if test="SaleorderNO != null and SaleorderNO != ''"> and SaleorderNO = #{SaleorderNO}</if>
|
|
<if test="pName != null and pName != ''"> and P_Name like concat('%', #{pName}, '%')</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="Qty != null "> and Qty = #{Qty}</if>
|
|
<if test="OrderQty != null "> and OrderQty = #{OrderQty}</if>
|
|
<if test="qQty != null "> and Q_Qty = #{qQty}</if>
|
|
<if test="zzgdOrderqty != null "> and ZZGD_OrderQty = #{zzgdOrderqty}</if>
|
|
<if test="zzgdQQty != null "> and ZZGD_Q_Qty = #{zzgdQQty}</if>
|
|
<if test="SendDate != null "> and SendDate = #{SendDate}</if>
|
|
<if test="Factory != null and Factory != ''"> and Factory = #{Factory}</if>
|
|
<if test="piNo != null and piNo != ''"> and PI_NO = #{piNo}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectViewSaleorderHLById" parameterType="String" resultMap="ViewSaleorderHLResult">
|
|
<include refid="selectViewSaleorderHLVo"/>
|
|
where SaleorderNO = #{SaleorderNO}
|
|
</select>
|
|
|
|
<insert id="insertViewSaleorderHL" parameterType="ViewSaleorderHL">
|
|
insert into view_saleorder_h_l
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="SaleorderNO != null">SaleorderNO,</if>
|
|
<if test="pName != null">P_Name,</if>
|
|
<if test="wlCode != null">Wl_Code,</if>
|
|
<if test="Itemname != null">Itemname,</if>
|
|
<if test="Qty != null">Qty,</if>
|
|
<if test="OrderQty != null">OrderQty,</if>
|
|
<if test="qQty != null">Q_Qty,</if>
|
|
<if test="zzgdOrderqty != null">ZZGD_OrderQty,</if>
|
|
<if test="zzgdQQty != null">ZZGD_Q_Qty,</if>
|
|
<if test="SendDate != null">SendDate,</if>
|
|
<if test="Factory != null">Factory,</if>
|
|
<if test="piNo != null">PI_NO,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="SaleorderNO != null">#{SaleorderNO},</if>
|
|
<if test="pName != null">#{pName},</if>
|
|
<if test="wlCode != null">#{wlCode},</if>
|
|
<if test="Itemname != null">#{Itemname},</if>
|
|
<if test="Qty != null">#{Qty},</if>
|
|
<if test="OrderQty != null">#{OrderQty},</if>
|
|
<if test="qQty != null">#{qQty},</if>
|
|
<if test="zzgdOrderqty != null">#{zzgdOrderqty},</if>
|
|
<if test="zzgdQQty != null">#{zzgdQQty},</if>
|
|
<if test="SendDate != null">#{SendDate},</if>
|
|
<if test="Factory != null">#{Factory},</if>
|
|
<if test="piNo != null">#{piNo},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateViewSaleorderHL" parameterType="ViewSaleorderHL">
|
|
update view_saleorder_h_l
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="pName != null">P_Name = #{pName},</if>
|
|
<if test="wlCode != null">Wl_Code = #{wlCode},</if>
|
|
<if test="Itemname != null">Itemname = #{Itemname},</if>
|
|
<if test="Qty != null">Qty = #{Qty},</if>
|
|
<if test="OrderQty != null">OrderQty = #{OrderQty},</if>
|
|
<if test="qQty != null">Q_Qty = #{qQty},</if>
|
|
<if test="zzgdOrderqty != null">ZZGD_OrderQty = #{zzgdOrderqty},</if>
|
|
<if test="zzgdQQty != null">ZZGD_Q_Qty = #{zzgdQQty},</if>
|
|
<if test="SendDate != null">SendDate = #{SendDate},</if>
|
|
<if test="Factory != null">Factory = #{Factory},</if>
|
|
<if test="piNo != null">PI_NO = #{piNo},</if>
|
|
</trim>
|
|
where SaleorderNO = #{SaleorderNO}
|
|
</update>
|
|
|
|
<delete id="deleteViewSaleorderHLById" parameterType="String">
|
|
delete from view_saleorder_h_l where SaleorderNO = #{SaleorderNO}
|
|
</delete>
|
|
|
|
<delete id="deleteViewSaleorderHLByIds" parameterType="String">
|
|
delete from view_saleorder_h_l where SaleorderNO in
|
|
<foreach item="SaleorderNO" collection="array" open="(" separator="," close=")">
|
|
#{SaleorderNO}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper>
|