万材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.
 
 
 
 

217 lines
13 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.ProductpriceMapper">
<resultMap type="Productprice" id="ProductpriceResult">
<result property="SaleOrderID" column="SaleOrderID" />
<result property="wlCode" column="Wl_Code" />
<result property="Itemname" column="Itemname" />
<result property="Itemstandard" column="Itemstandard" />
<result property="machineNo" column="Machine_no" />
<result property="stockDw" column="Stock_dw" />
<result property="crlName" column="Crl_Name" />
<result property="Price" column="Price" />
<result property="pCode" column="P_Code" />
<result property="pName" column="P_Name" />
<result property="SendDate" column="SendDate" />
<result property="memoText" column="Memo_TEXT" />
<result property="IsNowPrice" column="IsNowPrice" />
<result property="rmbPrice" column="RMB_Price" />
<result property="taxFlag" column="Tax_flag" />
<result property="comfirmFlag" column="ComFirm_Flag" />
<result property="comfirmMan" column="ComFirm_MAN" />
<result property="comfirmDate" column="ComFirm_Date" />
<result property="writeMan" column="write_man" />
<result property="auditingFlag" column="Auditing_Flag" />
<result property="auditingMan" column="Auditing_man" />
<result property="auditingDatetime" column="Auditing_Datetime" />
<result property="approveFlag" column="Approve_flag" />
<result property="approveMan" column="Approve_MAN" />
<result property="approveDate" column="Approve_DATE" />
<result property="lastPrice" column="last_price" />
<result property="lastCrlName" column="last_crl_name" />
<result property="taxPercent" column="tax_percent" />
<result property="noTaxPrice" column="no_tax_price" />
<result property="taxPrice" column="tax_price" />
</resultMap>
<sql id="selectProductpriceVo">
select SaleOrderID, Wl_Code, Itemname, Itemstandard, Machine_no, Stock_dw, Crl_Name, Price, P_Code, P_Name, SendDate, Memo_TEXT, IsNowPrice, RMB_Price, Tax_flag, ComFirm_Flag, ComFirm_MAN, ComFirm_Date, write_man, Auditing_Flag, Auditing_man, Auditing_Datetime, Approve_flag, Approve_MAN, Approve_DATE, last_price, last_crl_name, tax_percent, no_tax_price, tax_price from productprice
</sql>
<select id="selectProductpriceList" parameterType="Productprice" resultMap="ProductpriceResult">
<include refid="selectProductpriceVo"/>
<where>
<if test="SaleOrderID != null and SaleOrderID != ''"> and SaleOrderID = #{SaleOrderID}</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="Itemstandard != null and Itemstandard != ''"> and Itemstandard = #{Itemstandard}</if>
<if test="machineNo != null and machineNo != ''"> and Machine_no = #{machineNo}</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="Price != null "> and Price = #{Price}</if>
<if test="pCode != null and pCode != ''"> and P_Code = #{pCode}</if>
<if test="pName != null and pName != ''"> and P_Name like concat('%', #{pName}, '%')</if>
<if test="SendDate != null "> and SendDate = #{SendDate}</if>
<if test="memoText != null and memoText != ''"> and Memo_TEXT = #{memoText}</if>
<if test="IsNowPrice != null "> and IsNowPrice = #{IsNowPrice}</if>
<if test="rmbPrice != null "> and RMB_Price = #{rmbPrice}</if>
<if test="taxFlag != null "> and Tax_flag = #{taxFlag}</if>
<if test="comfirmFlag != null "> and ComFirm_Flag = #{comfirmFlag}</if>
<if test="comfirmMan != null and comfirmMan != ''"> and ComFirm_MAN = #{comfirmMan}</if>
<if test="comfirmDate != null "> and ComFirm_Date = #{comfirmDate}</if>
<if test="writeMan != null and writeMan != ''"> and write_man = #{writeMan}</if>
<if test="auditingFlag != null "> and Auditing_Flag = #{auditingFlag}</if>
<if test="auditingMan != null and auditingMan != ''"> and Auditing_man = #{auditingMan}</if>
<if test="auditingDatetime != null "> and Auditing_Datetime = #{auditingDatetime}</if>
<if test="approveFlag != null "> and Approve_flag = #{approveFlag}</if>
<if test="approveMan != null and approveMan != ''"> and Approve_MAN = #{approveMan}</if>
<if test="approveDate != null "> and Approve_DATE = #{approveDate}</if>
<if test="lastPrice != null "> and last_price = #{lastPrice}</if>
<if test="lastCrlName != null and lastCrlName != ''"> and last_crl_name like concat('%', #{lastCrlName}, '%')</if>
<if test="taxPercent != null "> and tax_percent = #{taxPercent}</if>
<if test="noTaxPrice != null "> and no_tax_price = #{noTaxPrice}</if>
<if test="taxPrice != null "> and tax_price = #{taxPrice}</if>
</where>
</select>
<select id="selectProductpriceById" parameterType="String" resultMap="ProductpriceResult">
<include refid="selectProductpriceVo"/>
where SaleOrderID = #{SaleOrderID}
</select>
<select id="selectProductpriceNnm" parameterType="String" resultType="java.lang.Integer">
SELECT 1 FROM productprice WHERE SaleOrderID = #{SaleOrderID} LIMIT 1
</select>
<insert id="insertProductprice" parameterType="Productprice">
insert into productprice
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="SaleOrderID != null">SaleOrderID,</if>
<if test="wlCode != null">Wl_Code,</if>
<if test="Itemname != null">Itemname,</if>
<if test="Itemstandard != null">Itemstandard,</if>
<if test="machineNo != null">Machine_no,</if>
<if test="stockDw != null">Stock_dw,</if>
<if test="crlName != null">Crl_Name,</if>
<if test="Price != null">Price,</if>
<if test="pCode != null">P_Code,</if>
<if test="pName != null">P_Name,</if>
<if test="SendDate != null">SendDate,</if>
<if test="memoText != null">Memo_TEXT,</if>
<if test="IsNowPrice != null">IsNowPrice,</if>
<if test="rmbPrice != null">RMB_Price,</if>
<if test="taxFlag != null">Tax_flag,</if>
<if test="comfirmFlag != null">ComFirm_Flag,</if>
<if test="comfirmMan != null">ComFirm_MAN,</if>
<if test="comfirmDate != null">ComFirm_Date,</if>
<if test="writeMan != null">write_man,</if>
<if test="auditingFlag != null">Auditing_Flag,</if>
<if test="auditingMan != null">Auditing_man,</if>
<if test="auditingDatetime != null">Auditing_Datetime,</if>
<if test="approveFlag != null">Approve_flag,</if>
<if test="approveMan != null">Approve_MAN,</if>
<if test="approveDate != null">Approve_DATE,</if>
<if test="lastPrice != null">last_price,</if>
<if test="lastCrlName != null">last_crl_name,</if>
<if test="taxPercent != null">tax_percent,</if>
<if test="noTaxPrice != null">no_tax_price,</if>
<if test="taxPrice != null">tax_price,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="SaleOrderID != null">#{SaleOrderID},</if>
<if test="wlCode != null">#{wlCode},</if>
<if test="Itemname != null">#{Itemname},</if>
<if test="Itemstandard != null">#{Itemstandard},</if>
<if test="machineNo != null">#{machineNo},</if>
<if test="stockDw != null">#{stockDw},</if>
<if test="crlName != null">#{crlName},</if>
<if test="Price != null">#{Price},</if>
<if test="pCode != null">#{pCode},</if>
<if test="pName != null">#{pName},</if>
<if test="SendDate != null">#{SendDate},</if>
<if test="memoText != null">#{memoText},</if>
<if test="IsNowPrice != null">#{IsNowPrice},</if>
<if test="rmbPrice != null">#{rmbPrice},</if>
<if test="taxFlag != null">#{taxFlag},</if>
<if test="comfirmFlag != null">#{comfirmFlag},</if>
<if test="comfirmMan != null">#{comfirmMan},</if>
<if test="comfirmDate != null">#{comfirmDate},</if>
<if test="writeMan != null">#{writeMan},</if>
<if test="auditingFlag != null">#{auditingFlag},</if>
<if test="auditingMan != null">#{auditingMan},</if>
<if test="auditingDatetime != null">#{auditingDatetime},</if>
<if test="approveFlag != null">#{approveFlag},</if>
<if test="approveMan != null">#{approveMan},</if>
<if test="approveDate != null">#{approveDate},</if>
<if test="lastPrice != null">#{lastPrice},</if>
<if test="lastCrlName != null">#{lastCrlName},</if>
<if test="taxPercent != null">#{taxPercent},</if>
<if test="noTaxPrice != null">#{noTaxPrice},</if>
<if test="taxPrice != null">#{taxPrice},</if>
</trim>
</insert>
<update id="updateProductprice" parameterType="Productprice">
update productprice
<trim prefix="SET" suffixOverrides=",">
<if test="wlCode != null">Wl_Code = #{wlCode},</if>
<if test="Itemname != null">Itemname = #{Itemname},</if>
<if test="Itemstandard != null">Itemstandard = #{Itemstandard},</if>
<if test="machineNo != null">Machine_no = #{machineNo},</if>
<if test="stockDw != null">Stock_dw = #{stockDw},</if>
<if test="crlName != null">Crl_Name = #{crlName},</if>
<if test="Price != null">Price = #{Price},</if>
<if test="pCode != null">P_Code = #{pCode},</if>
<if test="pName != null">P_Name = #{pName},</if>
<if test="SendDate != null">SendDate = #{SendDate},</if>
<if test="memoText != null">Memo_TEXT = #{memoText},</if>
<if test="IsNowPrice != null">IsNowPrice = #{IsNowPrice},</if>
<if test="rmbPrice != null">RMB_Price = #{rmbPrice},</if>
<if test="taxFlag != null">Tax_flag = #{taxFlag},</if>
<if test="comfirmFlag != null">ComFirm_Flag = #{comfirmFlag},</if>
<if test="comfirmMan != null">ComFirm_MAN = #{comfirmMan},</if>
<if test="comfirmDate != null">ComFirm_Date = #{comfirmDate},</if>
<if test="writeMan != null">write_man = #{writeMan},</if>
<if test="auditingFlag != null">Auditing_Flag = #{auditingFlag},</if>
<if test="auditingMan != null">Auditing_man = #{auditingMan},</if>
<if test="auditingDatetime != null">Auditing_Datetime = #{auditingDatetime},</if>
<if test="approveFlag != null">Approve_flag = #{approveFlag},</if>
<if test="approveMan != null">Approve_MAN = #{approveMan},</if>
<if test="approveDate != null">Approve_DATE = #{approveDate},</if>
<if test="lastPrice != null">last_price = #{lastPrice},</if>
<if test="lastCrlName != null">last_crl_name = #{lastCrlName},</if>
<if test="taxPercent != null">tax_percent = #{taxPercent},</if>
<if test="noTaxPrice != null">no_tax_price = #{noTaxPrice},</if>
<if test="taxPrice != null">tax_price = #{taxPrice},</if>
</trim>
where SaleOrderID = #{SaleOrderID}
</update>
<update id="updateCAA" parameterType = "com.ruoyi.finance.domain.productpriceCAA">
UPDATE productprice SET ComFirm_Flag = '1',ComFirm_MAN = #{Name},ComFirm_Date = #{Date} WHERE SaleOrderID = #{Id}
</update>
<update id="updateCBB" parameterType = "com.ruoyi.finance.domain.productpriceCAA">
UPDATE productprice SET Auditing_Flag = '1',Auditing_man = #{Name},Auditing_Datetime = #{Date} WHERE SaleOrderID = #{Id}
</update>
<update id="updateCCC" parameterType = "com.ruoyi.finance.domain.productpriceCAA">
UPDATE productprice SET Approve_flag = '1',Approve_MAN = #{Name},Approve_DATE = #{Date} WHERE SaleOrderID = #{Id}
</update>
<delete id="deleteProductpriceById" parameterType="String">
delete from productprice where SaleOrderID = #{SaleOrderID}
</delete>
<delete id="deleteProductpriceByIds" parameterType="String">
delete from productprice where SaleOrderID in
<foreach item="SaleOrderID" collection="array" open="(" separator="," close=")">
#{SaleOrderID}
</foreach>
</delete>
</mapper>