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

220 lines
12 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.ProviderPrice.mapper.ProviderPricelistMapper">
<resultMap type="ProviderPricelist" id="ProviderPricelistResult">
<result property="ID" column="ID" />
<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="MemoList" column="MemoList" />
<result property="Isnowprice" column="Isnowprice" />
<result property="poDw" column="po_dw" />
<result property="poPrice" column="po_price" />
<result property="poRelation" column="po_relation" />
<result property="rmbPrice" column="RMB_Price" />
<result property="huili" column="huili" />
<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="auditingDate" column="Auditing_Date" />
<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="stockDwM2" column="stock_dw_m2" />
<result property="KID" column="KID" />
<result property="taxFlag" column="tax_flag" />
<result property="taxPercent" column="tax_percent" />
<result property="taxPrice" column="tax_price" />
<result property="fuWidth" column="FU_Width" />
<result property="baseCode" column="base_code" />
<result property="longWidth" column="long_width" />
</resultMap>
<sql id="selectProviderPricelistVo">
select ID, Wl_Code, Itemname, Itemstandard, Machine_no, Stock_dw, Crl_Name, Price, P_Code, P_Name, SendDate, MemoList, Isnowprice, po_dw, po_price, po_relation, RMB_Price, huili, comfirm_flag, comfirm_man, comfirm_DATE, write_man, Auditing_Flag, Auditing_man, Auditing_Date, Approve_flag, Approve_MAN, Approve_date, last_price, last_crl_name, stock_dw_m2, KID, tax_flag, tax_percent, tax_price, FU_Width, base_code, long_width from provider_pricelist
</sql>
<select id="selectProviderPricelistList" parameterType="ProviderPricelist" resultMap="ProviderPricelistResult">
<include refid="selectProviderPricelistVo"/>
<where>
<if test="ID != null and ID != ''"> and ID like concat('%', #{ID}, '%')</if>
<if test="wlCode != null and wlCode != ''"> and Wl_Code like concat('%', #{wlCode}, '%')</if>
<if test="Itemname != null and Itemname != ''"> and Itemname like concat('%', #{Itemname}, '%')</if>
<if test="pName != null and pName != ''"> and P_Name like concat('%', #{pName}, '%')</if>
<if test="Isnowprice != null "> and Isnowprice = #{Isnowprice}</if>
<if test="comfirmFlag != null "> and comfirm_flag = #{comfirmFlag}</if>
<if test="auditingFlag != null "> and Auditing_Flag = #{auditingFlag}</if>
<if test="approveFlag != null "> and Approve_flag = #{approveFlag}</if>
</where>
order by SendDate desc
</select>
<select id="selectProviderPricelistById" parameterType="String" resultMap="ProviderPricelistResult">
<include refid="selectProviderPricelistVo"/>
where ID = #{ID}
</select>
<insert id="insertProviderPricelist" parameterType="ProviderPricelist">
insert into provider_pricelist
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ID != null and ID != ''">ID,</if>
<if test="wlCode != null and wlCode != ''">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="MemoList != null">MemoList,</if>
<if test="Isnowprice != null">Isnowprice,</if>
<if test="poDw != null">po_dw,</if>
<if test="poPrice != null">po_price,</if>
<if test="poRelation != null">po_relation,</if>
<if test="rmbPrice != null">RMB_Price,</if>
<if test="huili != null">huili,</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="auditingDate != null">Auditing_Date,</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="stockDwM2 != null">stock_dw_m2,</if>
<if test="KID != null">KID,</if>
<if test="taxFlag != null">tax_flag,</if>
<if test="taxPercent != null">tax_percent,</if>
<if test="taxPrice != null">tax_price,</if>
<if test="fuWidth != null">FU_Width,</if>
<if test="baseCode != null">base_code,</if>
<if test="longWidth != null">long_width,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ID != null and ID != ''">#{ID},</if>
<if test="wlCode != null and wlCode != ''">#{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="MemoList != null">#{MemoList},</if>
<if test="Isnowprice != null">#{Isnowprice},</if>
<if test="poDw != null">#{poDw},</if>
<if test="poPrice != null">#{poPrice},</if>
<if test="poRelation != null">#{poRelation},</if>
<if test="rmbPrice != null">#{rmbPrice},</if>
<if test="huili != null">#{huili},</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="auditingDate != null">#{auditingDate},</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="stockDwM2 != null">#{stockDwM2},</if>
<if test="KID != null">#{KID},</if>
<if test="taxFlag != null">#{taxFlag},</if>
<if test="taxPercent != null">#{taxPercent},</if>
<if test="taxPrice != null">#{taxPrice},</if>
<if test="fuWidth != null">#{fuWidth},</if>
<if test="baseCode != null">#{baseCode},</if>
<if test="longWidth != null">#{longWidth},</if>
</trim>
</insert>
<update id="updateProviderPricelist" parameterType="ProviderPricelist">
update provider_pricelist
<trim prefix="SET" suffixOverrides=",">
<if test="wlCode != null and wlCode != ''">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="MemoList != null">MemoList = #{MemoList},</if>
<if test="Isnowprice != null">Isnowprice = #{Isnowprice},</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="rmbPrice != null">RMB_Price = #{rmbPrice},</if>
<if test="huili != null">huili = #{huili},</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="auditingDate != null">Auditing_Date = #{auditingDate},</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="stockDwM2 != null">stock_dw_m2 = #{stockDwM2},</if>
<if test="KID != null">KID = #{KID},</if>
<if test="taxFlag != null">tax_flag = #{taxFlag},</if>
<if test="taxPercent != null">tax_percent = #{taxPercent},</if>
<if test="taxPrice != null">tax_price = #{taxPrice},</if>
<if test="fuWidth != null">FU_Width = #{fuWidth},</if>
<if test="baseCode != null">base_code = #{baseCode},</if>
<if test="longWidth != null">long_width = #{longWidth},</if>
</trim>
where ID = #{ID}
</update>
<delete id="deleteProviderPricelistById" parameterType="String">
delete from provider_pricelist where ID = #{ID}
</delete>
<delete id="deleteProviderPricelistByIds" parameterType="String">
delete from provider_pricelist where ID in
<foreach item="ID" collection="array" open="(" separator="," close=")">
#{ID}
</foreach>
</delete>
<select id="selectCountByDay" resultType="Integer">
select count(*) from provider_pricelist where to_days(SendDate) = to_days(now());
</select>
<select id="selectAllCount" resultType="Long">
select count(*) from provider_pricelist
</select>
</mapper>