228 lines
14 KiB
XML
228 lines
14 KiB
XML
<?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.hcstock.mapper.BasStockHcMapper">
|
|
|
|
<resultMap type="BasStockHc" id="BasStockHcResult">
|
|
<result property="stockId" column="stock_id" />
|
|
<result property="cargoSpaceId" column="cargo_space_id" />
|
|
<result property="stockStatus" column="stock_status" />
|
|
<result property="productStatus" column="product_status" />
|
|
<result property="lotNo" column="lot_no" />
|
|
<result property="inDate" column="in_date" />
|
|
<result property="backDate" column="back_date" />
|
|
<result property="productGuid" column="product_guid" />
|
|
<result property="quantity" column="quantity" />
|
|
<result property="jobId" column="job_id" />
|
|
<result property="trayCode" column="tray_code" />
|
|
<result property="outQuantity" column="out_quantity" />
|
|
<result property="stockinDetailId" column="stockin_detail_id" />
|
|
<result property="stockinId" column="stockin_id" />
|
|
<result property="inType" column="in_type" />
|
|
<result property="inClassId" column="in_class_id" />
|
|
<result property="warehouseId" column="warehouse_id" />
|
|
<result property="stackingId" column="stacking_id" />
|
|
<result property="spare1" column="spare1" />
|
|
<result property="spare2" column="spare2" />
|
|
<result property="spare3" column="spare3" />
|
|
<result property="spare4" column="spare4" />
|
|
<result property="spare5" column="spare5" />
|
|
<result property="spare6" column="spare6" />
|
|
<result property="productId" column="product_id" />
|
|
<result property="productName" column="product_name" />
|
|
<result property="voltage" column="voltage" />
|
|
<result property="power" column="power" />
|
|
<result property="phase" column="phase" />
|
|
<result property="netWeight" column="net_weight" />
|
|
<result property="grossWeight" column="gross_weight" />
|
|
<result property="distribution" column="distribution" />
|
|
<result property="model" column="model" />
|
|
<result property="orderId" column="order_id" />
|
|
<result property="spare7" column="spare7" />
|
|
<result property="spare8" column="spare8" />
|
|
</resultMap>
|
|
|
|
<sql id="selectBasStockHcVo">
|
|
select stock_id, cargo_space_id, stock_status, product_status, lot_no, in_date, back_date, product_guid, quantity, job_id, tray_code, out_quantity, stockin_detail_id, stockin_id, in_type, in_class_id, warehouse_id, stacking_id, spare1, spare2, spare3, spare4, spare5, spare6, product_id, product_name, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id, spare7, spare8 from bas_stock_hc
|
|
</sql>
|
|
|
|
<select id="selectBasStockHcList" parameterType="BasStockHc" resultMap="BasStockHcResult">
|
|
<include refid="selectBasStockHcVo"/>
|
|
<where>
|
|
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
|
<if test="stockStatus != null and stockStatus != ''"> and stock_status = #{stockStatus}</if>
|
|
<if test="productStatus != null and productStatus != ''"> and product_status = #{productStatus}</if>
|
|
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
|
<if test="inDate != null and inDate != ''"> and in_date = #{inDate}</if>
|
|
<if test="backDate != null and backDate != ''"> and back_date = #{backDate}</if>
|
|
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
|
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
|
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
|
|
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
|
<if test="outQuantity != null and outQuantity != ''"> and out_quantity = #{outQuantity}</if>
|
|
<if test="stockinDetailId != null and stockinDetailId != ''"> and stockin_detail_id = #{stockinDetailId}</if>
|
|
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
|
|
<if test="inType != null and inType != ''"> and in_type = #{inType}</if>
|
|
<if test="inClassId != null and inClassId != ''"> and in_class_id = #{inClassId}</if>
|
|
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
|
<if test="stackingId != null and stackingId != ''"> and stacking_id = #{stackingId}</if>
|
|
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
|
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
|
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
|
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
|
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
|
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
|
|
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
|
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
|
<if test="voltage != null and voltage != ''"> and voltage = #{voltage}</if>
|
|
<if test="power != null and power != ''"> and power = #{power}</if>
|
|
<if test="phase != null and phase != ''"> and phase = #{phase}</if>
|
|
<if test="netWeight != null and netWeight != ''"> and net_weight = #{netWeight}</if>
|
|
<if test="grossWeight != null and grossWeight != ''"> and gross_weight = #{grossWeight}</if>
|
|
<if test="distribution != null and distribution != ''"> and distribution = #{distribution}</if>
|
|
<if test="model != null and model != ''"> and model = #{model}</if>
|
|
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
|
|
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
|
|
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectBasStockHcByStockId" parameterType="String" resultMap="BasStockHcResult">
|
|
<include refid="selectBasStockHcVo"/>
|
|
where stock_id = #{stockId}
|
|
</select>
|
|
|
|
<insert id="insertBasStockHc" parameterType="BasStockHc">
|
|
insert into bas_stock_hc
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="stockId != null">stock_id,</if>
|
|
<if test="cargoSpaceId != null">cargo_space_id,</if>
|
|
<if test="stockStatus != null">stock_status,</if>
|
|
<if test="productStatus != null">product_status,</if>
|
|
<if test="lotNo != null">lot_no,</if>
|
|
<if test="inDate != null">in_date,</if>
|
|
<if test="backDate != null">back_date,</if>
|
|
<if test="productGuid != null">product_guid,</if>
|
|
<if test="quantity != null">quantity,</if>
|
|
<if test="jobId != null">job_id,</if>
|
|
<if test="trayCode != null">tray_code,</if>
|
|
<if test="outQuantity != null">out_quantity,</if>
|
|
<if test="stockinDetailId != null">stockin_detail_id,</if>
|
|
<if test="stockinId != null">stockin_id,</if>
|
|
<if test="inType != null">in_type,</if>
|
|
<if test="inClassId != null">in_class_id,</if>
|
|
<if test="warehouseId != null">warehouse_id,</if>
|
|
<if test="stackingId != null">stacking_id,</if>
|
|
<if test="spare1 != null">spare1,</if>
|
|
<if test="spare2 != null">spare2,</if>
|
|
<if test="spare3 != null">spare3,</if>
|
|
<if test="spare4 != null">spare4,</if>
|
|
<if test="spare5 != null">spare5,</if>
|
|
<if test="spare6 != null">spare6,</if>
|
|
<if test="productId != null">product_id,</if>
|
|
<if test="productName != null">product_name,</if>
|
|
<if test="voltage != null">voltage,</if>
|
|
<if test="power != null">power,</if>
|
|
<if test="phase != null">phase,</if>
|
|
<if test="netWeight != null">net_weight,</if>
|
|
<if test="grossWeight != null">gross_weight,</if>
|
|
<if test="distribution != null">distribution,</if>
|
|
<if test="model != null">model,</if>
|
|
<if test="orderId != null">order_id,</if>
|
|
<if test="spare7 != null">spare7,</if>
|
|
<if test="spare8 != null">spare8,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="stockId != null">#{stockId},</if>
|
|
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
|
<if test="stockStatus != null">#{stockStatus},</if>
|
|
<if test="productStatus != null">#{productStatus},</if>
|
|
<if test="lotNo != null">#{lotNo},</if>
|
|
<if test="inDate != null">#{inDate},</if>
|
|
<if test="backDate != null">#{backDate},</if>
|
|
<if test="productGuid != null">#{productGuid},</if>
|
|
<if test="quantity != null">#{quantity},</if>
|
|
<if test="jobId != null">#{jobId},</if>
|
|
<if test="trayCode != null">#{trayCode},</if>
|
|
<if test="outQuantity != null">#{outQuantity},</if>
|
|
<if test="stockinDetailId != null">#{stockinDetailId},</if>
|
|
<if test="stockinId != null">#{stockinId},</if>
|
|
<if test="inType != null">#{inType},</if>
|
|
<if test="inClassId != null">#{inClassId},</if>
|
|
<if test="warehouseId != null">#{warehouseId},</if>
|
|
<if test="stackingId != null">#{stackingId},</if>
|
|
<if test="spare1 != null">#{spare1},</if>
|
|
<if test="spare2 != null">#{spare2},</if>
|
|
<if test="spare3 != null">#{spare3},</if>
|
|
<if test="spare4 != null">#{spare4},</if>
|
|
<if test="spare5 != null">#{spare5},</if>
|
|
<if test="spare6 != null">#{spare6},</if>
|
|
<if test="productId != null">#{productId},</if>
|
|
<if test="productName != null">#{productName},</if>
|
|
<if test="voltage != null">#{voltage},</if>
|
|
<if test="power != null">#{power},</if>
|
|
<if test="phase != null">#{phase},</if>
|
|
<if test="netWeight != null">#{netWeight},</if>
|
|
<if test="grossWeight != null">#{grossWeight},</if>
|
|
<if test="distribution != null">#{distribution},</if>
|
|
<if test="model != null">#{model},</if>
|
|
<if test="orderId != null">#{orderId},</if>
|
|
<if test="spare7 != null">#{spare7},</if>
|
|
<if test="spare8 != null">#{spare8},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateBasStockHc" parameterType="BasStockHc">
|
|
update bas_stock_hc
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="cargoSpaceId != null">cargo_space_id = #{cargoSpaceId},</if>
|
|
<if test="stockStatus != null">stock_status = #{stockStatus},</if>
|
|
<if test="productStatus != null">product_status = #{productStatus},</if>
|
|
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
|
<if test="inDate != null">in_date = #{inDate},</if>
|
|
<if test="backDate != null">back_date = #{backDate},</if>
|
|
<if test="productGuid != null">product_guid = #{productGuid},</if>
|
|
<if test="quantity != null">quantity = #{quantity},</if>
|
|
<if test="jobId != null">job_id = #{jobId},</if>
|
|
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
|
<if test="outQuantity != null">out_quantity = #{outQuantity},</if>
|
|
<if test="stockinDetailId != null">stockin_detail_id = #{stockinDetailId},</if>
|
|
<if test="stockinId != null">stockin_id = #{stockinId},</if>
|
|
<if test="inType != null">in_type = #{inType},</if>
|
|
<if test="inClassId != null">in_class_id = #{inClassId},</if>
|
|
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
|
<if test="stackingId != null">stacking_id = #{stackingId},</if>
|
|
<if test="spare1 != null">spare1 = #{spare1},</if>
|
|
<if test="spare2 != null">spare2 = #{spare2},</if>
|
|
<if test="spare3 != null">spare3 = #{spare3},</if>
|
|
<if test="spare4 != null">spare4 = #{spare4},</if>
|
|
<if test="spare5 != null">spare5 = #{spare5},</if>
|
|
<if test="spare6 != null">spare6 = #{spare6},</if>
|
|
<if test="productId != null">product_id = #{productId},</if>
|
|
<if test="productName != null">product_name = #{productName},</if>
|
|
<if test="voltage != null">voltage = #{voltage},</if>
|
|
<if test="power != null">power = #{power},</if>
|
|
<if test="phase != null">phase = #{phase},</if>
|
|
<if test="netWeight != null">net_weight = #{netWeight},</if>
|
|
<if test="grossWeight != null">gross_weight = #{grossWeight},</if>
|
|
<if test="distribution != null">distribution = #{distribution},</if>
|
|
<if test="model != null">model = #{model},</if>
|
|
<if test="orderId != null">order_id = #{orderId},</if>
|
|
<if test="spare7 != null">spare7 = #{spare7},</if>
|
|
<if test="spare8 != null">spare8 = #{spare8},</if>
|
|
</trim>
|
|
where stock_id = #{stockId}
|
|
</update>
|
|
|
|
<delete id="deleteBasStockHcByStockId" parameterType="String">
|
|
delete from bas_stock_hc where stock_id = #{stockId}
|
|
</delete>
|
|
|
|
<delete id="deleteBasStockHcByStockIds" parameterType="String">
|
|
delete from bas_stock_hc where stock_id in
|
|
<foreach item="stockId" collection="array" open="(" separator="," close=")">
|
|
#{stockId}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |