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.
292 lines
17 KiB
292 lines
17 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.stock.mapper.StocklistMapper">
|
|
|
|
<resultMap type="Stocklist" id="StocklistResult">
|
|
<result property="ym" column="ym" />
|
|
<result property="stockno" column="stockno" />
|
|
<result property="wlCode" column="Wl_Code" />
|
|
<result property="hsCode" column="HS_Code" />
|
|
<result property="Itemname" column="Itemname" />
|
|
<result property="enName" column="EN_NAME" />
|
|
<result property="Itemstandard" column="Itemstandard" />
|
|
<result property="machineNo" column="Machine_no" />
|
|
<result property="stockDw" column="Stock_dw" />
|
|
<result property="poPiNo" column="PO_PI_NO" />
|
|
<result property="lastQty" column="Last_qty" />
|
|
<result property="lastJuan" column="last_juan" />
|
|
<result property="lastWeight" column="Last_weight" />
|
|
<result property="lastPrice" column="Last_price" />
|
|
<result property="lastAmt" column="Last_amt" />
|
|
<result property="inputQty" column="input_qty" />
|
|
<result property="inputJuan" column="input_juan" />
|
|
<result property="inputWeight" column="input_weight" />
|
|
<result property="inputPrice" column="Input_price" />
|
|
<result property="inputAmt" column="Input_amt" />
|
|
<result property="outputQty" column="output_qty" />
|
|
<result property="outputJuan" column="output_juan" />
|
|
<result property="outputWeight" column="output_weight" />
|
|
<result property="outputPrice" column="Output_price" />
|
|
<result property="outputAmt" column="Output_amt" />
|
|
<result property="justQty" column="just_qty" />
|
|
<result property="justJuan" column="just_juan" />
|
|
<result property="justAmt" column="just_amt" />
|
|
<result property="justWeight" column="Just_weight" />
|
|
<result property="nowQty" column="now_qty" />
|
|
<result property="nowJuan" column="now_juan" />
|
|
<result property="nowWeight" column="Now_weight" />
|
|
<result property="nowPrice" column="now_price" />
|
|
<result property="nowAmt" column="now_amt" />
|
|
<result property="workorderQty" column="Workorder_qty" />
|
|
<result property="canuseQty" column="Canuse_qty" />
|
|
<result property="safetyStockNum" column="Safety_stock_num" />
|
|
<result property="topStockNum" column="Top_stock_num" />
|
|
<result property="Itemclass" column="Itemclass" />
|
|
<result property="Inclass" column="Inclass" />
|
|
<result property="defaultPosition" column="Default_position" />
|
|
<result property="wldm" column="wldm" />
|
|
<result property="PCODE" column="PCODE" />
|
|
<result property="justPrice" column="Just_Price" />
|
|
<result property="stateName" column="State_name" />
|
|
<result property="crlName" column="CRL_NAME" />
|
|
<result property="PNAME" column="PNAME" />
|
|
<result property="juanM2" column="juan_m2" />
|
|
<result property="m2Price" column="m2_price" />
|
|
<result property="nowM2Amt" column="now_m2_amt" />
|
|
<result property="baseCode" column="base_code" />
|
|
<result property="stockname" column="stockname" />
|
|
<result property="pWldm" column="p_wldm" />
|
|
<result property="ID" column="ID" />
|
|
</resultMap>
|
|
|
|
<sql id="selectStocklistVo">
|
|
select ym, stockno, Wl_Code, HS_Code, Itemname, EN_NAME, Itemstandard, Machine_no, Stock_dw, PO_PI_NO, Last_qty, last_juan, Last_weight, Last_price, Last_amt, input_qty, input_juan, input_weight, Input_price, Input_amt, output_qty, output_juan, output_weight, Output_price, Output_amt, just_qty, just_juan, just_amt, Just_weight, now_qty, now_juan, Now_weight, now_price, now_amt, Workorder_qty, Canuse_qty, Safety_stock_num, Top_stock_num, Itemclass, Inclass, Default_position, wldm, PCODE, Just_Price, State_name, CRL_NAME, PNAME, juan_m2, m2_price, now_m2_amt, base_code, stockname, p_wldm, ID from stocklist
|
|
</sql>
|
|
|
|
<select id="selectStocklistList" parameterType="Stocklist" resultMap="StocklistResult">
|
|
<include refid="selectStocklistVo"/>
|
|
<where>
|
|
<if test="ym != null and ym != ''"> and ym = #{ym}</if>
|
|
<if test="stockno != null and stockno != ''"> and stockno = #{stockno}</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="Itemclass != null and Itemclass != ''"> and Itemclass = #{Itemclass}</if>
|
|
<if test="wldm != null and wldm != ''"> and wldm = #{wldm}</if>
|
|
<if test="pWldm != null and pWldm != ''"> and p_wldm = #{pWldm}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectStocklistSearch" parameterType="Stocklist" resultMap="StocklistResult">
|
|
<include refid="selectStocklistVo"/>
|
|
<where>
|
|
<if test="ym != null and ym != ''"> and ym = #{ym}</if>
|
|
<if test="stockno != null and stockno != ''"> and stockno = #{stockno}</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="Itemclass != null and Itemclass != ''"> and Itemclass = #{Itemclass}</if>
|
|
<if test="wldm != null and wldm != ''"> and wldm = #{wldm}</if>
|
|
<if test="pWldm != null and pWldm != ''"> and p_wldm = #{pWldm}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectStocklistById" parameterType="String" resultMap="StocklistResult">
|
|
<include refid="selectStocklistVo"/>
|
|
where ID = #{ID}
|
|
</select>
|
|
|
|
<insert id="insertStocklist" parameterType="Stocklist">
|
|
insert into stocklist
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="ym != null">ym,</if>
|
|
<if test="stockno != null">stockno,</if>
|
|
<if test="wlCode != null">Wl_Code,</if>
|
|
<if test="hsCode != null">HS_Code,</if>
|
|
<if test="Itemname != null">Itemname,</if>
|
|
<if test="enName != null">EN_NAME,</if>
|
|
<if test="Itemstandard != null">Itemstandard,</if>
|
|
<if test="machineNo != null">Machine_no,</if>
|
|
<if test="stockDw != null">Stock_dw,</if>
|
|
<if test="poPiNo != null">PO_PI_NO,</if>
|
|
<if test="lastQty != null">Last_qty,</if>
|
|
<if test="lastJuan != null">last_juan,</if>
|
|
<if test="lastWeight != null">Last_weight,</if>
|
|
<if test="lastPrice != null">Last_price,</if>
|
|
<if test="lastAmt != null">Last_amt,</if>
|
|
<if test="inputQty != null">input_qty,</if>
|
|
<if test="inputJuan != null">input_juan,</if>
|
|
<if test="inputWeight != null">input_weight,</if>
|
|
<if test="inputPrice != null">Input_price,</if>
|
|
<if test="inputAmt != null">Input_amt,</if>
|
|
<if test="outputQty != null">output_qty,</if>
|
|
<if test="outputJuan != null">output_juan,</if>
|
|
<if test="outputWeight != null">output_weight,</if>
|
|
<if test="outputPrice != null">Output_price,</if>
|
|
<if test="outputAmt != null">Output_amt,</if>
|
|
<if test="justQty != null">just_qty,</if>
|
|
<if test="justJuan != null">just_juan,</if>
|
|
<if test="justAmt != null">just_amt,</if>
|
|
<if test="justWeight != null">Just_weight,</if>
|
|
<if test="nowQty != null">now_qty,</if>
|
|
<if test="nowJuan != null">now_juan,</if>
|
|
<if test="nowWeight != null">Now_weight,</if>
|
|
<if test="nowPrice != null">now_price,</if>
|
|
<if test="nowAmt != null">now_amt,</if>
|
|
<if test="workorderQty != null">Workorder_qty,</if>
|
|
<if test="canuseQty != null">Canuse_qty,</if>
|
|
<if test="safetyStockNum != null">Safety_stock_num,</if>
|
|
<if test="topStockNum != null">Top_stock_num,</if>
|
|
<if test="Itemclass != null">Itemclass,</if>
|
|
<if test="Inclass != null">Inclass,</if>
|
|
<if test="defaultPosition != null">Default_position,</if>
|
|
<if test="wldm != null">wldm,</if>
|
|
<if test="PCODE != null">PCODE,</if>
|
|
<if test="justPrice != null">Just_Price,</if>
|
|
<if test="stateName != null">State_name,</if>
|
|
<if test="crlName != null">CRL_NAME,</if>
|
|
<if test="PNAME != null">PNAME,</if>
|
|
<if test="juanM2 != null">juan_m2,</if>
|
|
<if test="m2Price != null">m2_price,</if>
|
|
<if test="nowM2Amt != null">now_m2_amt,</if>
|
|
<if test="baseCode != null">base_code,</if>
|
|
<if test="stockname != null">stockname,</if>
|
|
<if test="pWldm != null">p_wldm,</if>
|
|
<if test="ID != null">ID,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="ym != null">#{ym},</if>
|
|
<if test="stockno != null">#{stockno},</if>
|
|
<if test="wlCode != null">#{wlCode},</if>
|
|
<if test="hsCode != null">#{hsCode},</if>
|
|
<if test="Itemname != null">#{Itemname},</if>
|
|
<if test="enName != null">#{enName},</if>
|
|
<if test="Itemstandard != null">#{Itemstandard},</if>
|
|
<if test="machineNo != null">#{machineNo},</if>
|
|
<if test="stockDw != null">#{stockDw},</if>
|
|
<if test="poPiNo != null">#{poPiNo},</if>
|
|
<if test="lastQty != null">#{lastQty},</if>
|
|
<if test="lastJuan != null">#{lastJuan},</if>
|
|
<if test="lastWeight != null">#{lastWeight},</if>
|
|
<if test="lastPrice != null">#{lastPrice},</if>
|
|
<if test="lastAmt != null">#{lastAmt},</if>
|
|
<if test="inputQty != null">#{inputQty},</if>
|
|
<if test="inputJuan != null">#{inputJuan},</if>
|
|
<if test="inputWeight != null">#{inputWeight},</if>
|
|
<if test="inputPrice != null">#{inputPrice},</if>
|
|
<if test="inputAmt != null">#{inputAmt},</if>
|
|
<if test="outputQty != null">#{outputQty},</if>
|
|
<if test="outputJuan != null">#{outputJuan},</if>
|
|
<if test="outputWeight != null">#{outputWeight},</if>
|
|
<if test="outputPrice != null">#{outputPrice},</if>
|
|
<if test="outputAmt != null">#{outputAmt},</if>
|
|
<if test="justQty != null">#{justQty},</if>
|
|
<if test="justJuan != null">#{justJuan},</if>
|
|
<if test="justAmt != null">#{justAmt},</if>
|
|
<if test="justWeight != null">#{justWeight},</if>
|
|
<if test="nowQty != null">#{nowQty},</if>
|
|
<if test="nowJuan != null">#{nowJuan},</if>
|
|
<if test="nowWeight != null">#{nowWeight},</if>
|
|
<if test="nowPrice != null">#{nowPrice},</if>
|
|
<if test="nowAmt != null">#{nowAmt},</if>
|
|
<if test="workorderQty != null">#{workorderQty},</if>
|
|
<if test="canuseQty != null">#{canuseQty},</if>
|
|
<if test="safetyStockNum != null">#{safetyStockNum},</if>
|
|
<if test="topStockNum != null">#{topStockNum},</if>
|
|
<if test="Itemclass != null">#{Itemclass},</if>
|
|
<if test="Inclass != null">#{Inclass},</if>
|
|
<if test="defaultPosition != null">#{defaultPosition},</if>
|
|
<if test="wldm != null">#{wldm},</if>
|
|
<if test="PCODE != null">#{PCODE},</if>
|
|
<if test="justPrice != null">#{justPrice},</if>
|
|
<if test="stateName != null">#{stateName},</if>
|
|
<if test="crlName != null">#{crlName},</if>
|
|
<if test="PNAME != null">#{PNAME},</if>
|
|
<if test="juanM2 != null">#{juanM2},</if>
|
|
<if test="m2Price != null">#{m2Price},</if>
|
|
<if test="nowM2Amt != null">#{nowM2Amt},</if>
|
|
<if test="baseCode != null">#{baseCode},</if>
|
|
<if test="stockname != null">#{stockname},</if>
|
|
<if test="pWldm != null">#{pWldm},</if>
|
|
<if test="ID != null">#{ID},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateStocklist" parameterType="Stocklist">
|
|
update stocklist
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="stockno != null">stockno = #{stockno},</if>
|
|
<if test="wlCode != null">Wl_Code = #{wlCode},</if>
|
|
<if test="hsCode != null">HS_Code = #{hsCode},</if>
|
|
<if test="Itemname != null">Itemname = #{Itemname},</if>
|
|
<if test="enName != null">EN_NAME = #{enName},</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="poPiNo != null">PO_PI_NO = #{poPiNo},</if>
|
|
<if test="lastQty != null">Last_qty = #{lastQty},</if>
|
|
<if test="lastJuan != null">last_juan = #{lastJuan},</if>
|
|
<if test="lastWeight != null">Last_weight = #{lastWeight},</if>
|
|
<if test="lastPrice != null">Last_price = #{lastPrice},</if>
|
|
<if test="lastAmt != null">Last_amt = #{lastAmt},</if>
|
|
<if test="inputQty != null">input_qty = #{inputQty},</if>
|
|
<if test="inputJuan != null">input_juan = #{inputJuan},</if>
|
|
<if test="inputWeight != null">input_weight = #{inputWeight},</if>
|
|
<if test="inputPrice != null">Input_price = #{inputPrice},</if>
|
|
<if test="inputAmt != null">Input_amt = #{inputAmt},</if>
|
|
<if test="outputQty != null">output_qty = #{outputQty},</if>
|
|
<if test="outputJuan != null">output_juan = #{outputJuan},</if>
|
|
<if test="outputWeight != null">output_weight = #{outputWeight},</if>
|
|
<if test="outputPrice != null">Output_price = #{outputPrice},</if>
|
|
<if test="outputAmt != null">Output_amt = #{outputAmt},</if>
|
|
<if test="justQty != null">just_qty = #{justQty},</if>
|
|
<if test="justJuan != null">just_juan = #{justJuan},</if>
|
|
<if test="justAmt != null">just_amt = #{justAmt},</if>
|
|
<if test="justWeight != null">Just_weight = #{justWeight},</if>
|
|
<if test="nowQty != null">now_qty = #{nowQty},</if>
|
|
<if test="nowJuan != null">now_juan = #{nowJuan},</if>
|
|
<if test="nowWeight != null">Now_weight = #{nowWeight},</if>
|
|
<if test="nowPrice != null">now_price = #{nowPrice},</if>
|
|
<if test="nowAmt != null">now_amt = #{nowAmt},</if>
|
|
<if test="workorderQty != null">Workorder_qty = #{workorderQty},</if>
|
|
<if test="canuseQty != null">Canuse_qty = #{canuseQty},</if>
|
|
<if test="safetyStockNum != null">Safety_stock_num = #{safetyStockNum},</if>
|
|
<if test="topStockNum != null">Top_stock_num = #{topStockNum},</if>
|
|
<if test="Itemclass != null">Itemclass = #{Itemclass},</if>
|
|
<if test="Inclass != null">Inclass = #{Inclass},</if>
|
|
<if test="defaultPosition != null">Default_position = #{defaultPosition},</if>
|
|
<if test="wldm != null">wldm = #{wldm},</if>
|
|
<if test="PCODE != null">PCODE = #{PCODE},</if>
|
|
<if test="justPrice != null">Just_Price = #{justPrice},</if>
|
|
<if test="stateName != null">State_name = #{stateName},</if>
|
|
<if test="crlName != null">CRL_NAME = #{crlName},</if>
|
|
<if test="PNAME != null">PNAME = #{PNAME},</if>
|
|
<if test="juanM2 != null">juan_m2 = #{juanM2},</if>
|
|
<if test="m2Price != null">m2_price = #{m2Price},</if>
|
|
<if test="nowM2Amt != null">now_m2_amt = #{nowM2Amt},</if>
|
|
<if test="baseCode != null">base_code = #{baseCode},</if>
|
|
<if test="stockname != null">stockname = #{stockname},</if>
|
|
<if test="pWldm != null">p_wldm = #{pWldm},</if>
|
|
<if test="ID != null">ID = #{ID},</if>
|
|
</trim>
|
|
where ID = #{ID}
|
|
</update>
|
|
|
|
<delete id="deleteStocklistById" parameterType="String">
|
|
delete from stocklist where ID = #{ID}
|
|
</delete>
|
|
|
|
<delete id="deleteStocklistByIds" parameterType="String">
|
|
delete from stocklist where ID in
|
|
<foreach item="ym" collection="array" open="(" separator="," close=")">
|
|
#{ID}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper>
|