项目初始化

This commit is contained in:
liuhanqing
2025-12-03 16:09:29 +08:00
commit 68c9100aab
1649 changed files with 303228 additions and 0 deletions

View File

@@ -0,0 +1,86 @@
<?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.out.exception.mapper.OutExceptionRecordMapper">
<resultMap type="OutExceptionRecord" id="OutExceptionRecordResult">
<result property="outGuid" column="out_guid" />
<result property="warehouseId" column="warehouse_id" />
<result property="stockId" column="stock_id" />
<result property="trayCode" column="tray_code" />
<result property="productId" column="product_id" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
</resultMap>
<sql id="selectOutExceptionRecordVo">
select out_guid, warehouse_id, stock_id, tray_code, product_id, spare1, spare2, spare3 from out_exception_record
</sql>
<select id="selectOutExceptionRecordList" parameterType="OutExceptionRecord" resultMap="OutExceptionRecordResult">
<include refid="selectOutExceptionRecordVo"/>
<where>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</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>
</where>
</select>
<select id="selectOutExceptionRecordByOutGuid" parameterType="Long" resultMap="OutExceptionRecordResult">
<include refid="selectOutExceptionRecordVo"/>
where out_guid = #{outGuid}
</select>
<insert id="insertOutExceptionRecord" parameterType="OutExceptionRecord" useGeneratedKeys="true" keyProperty="outGuid">
insert into out_exception_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="warehouseId != null">warehouse_id,</if>
<if test="stockId != null">stock_id,</if>
<if test="trayCode != null">tray_code,</if>
<if test="productId != null">product_id,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="warehouseId != null">#{warehouseId},</if>
<if test="stockId != null">#{stockId},</if>
<if test="trayCode != null">#{trayCode},</if>
<if test="productId != null">#{productId},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
</trim>
</insert>
<update id="updateOutExceptionRecord" parameterType="OutExceptionRecord">
update out_exception_record
<trim prefix="SET" suffixOverrides=",">
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="stockId != null">stock_id = #{stockId},</if>
<if test="trayCode != null">tray_code = #{trayCode},</if>
<if test="productId != null">product_id = #{productId},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
</trim>
where out_guid = #{outGuid}
</update>
<delete id="deleteOutExceptionRecordByOutGuid" parameterType="Long">
delete from out_exception_record where out_guid = #{outGuid}
</delete>
<delete id="deleteOutExceptionRecordByOutGuids" parameterType="String">
delete from out_exception_record where out_guid in
<foreach item="outGuid" collection="array" open="(" separator="," close=")">
#{outGuid}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,101 @@
<?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.out.submit.mapper.OutPickSubmitMapper">
<resultMap type="OutPickSubmit" id="OutPickSubmitResult">
<result property="id" column="id" />
<result property="trayCode" column="tray_code" />
<result property="jobId" column="job_id" />
<result property="jobDetailId" column="job_detail_id" />
<result property="productId" column="product_id" />
<result property="quantity" column="quantity" />
<result property="warehouseId" column="warehouse_id" />
<result property="exitId" column="exit_id" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
</resultMap>
<sql id="selectOutPickSubmitVo">
select id, tray_code, job_id, job_detail_id, product_id, quantity, warehouse_id, exit_id, spare1, spare2, spare3 from out_pick_submit
</sql>
<select id="selectOutPickSubmitList" parameterType="OutPickSubmit" resultMap="OutPickSubmitResult">
<include refid="selectOutPickSubmitVo"/>
<where>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
<if test="jobDetailId != null and jobDetailId != ''"> and job_detail_id = #{jobDetailId}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</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>
</where>
</select>
<select id="selectOutPickSubmitById" parameterType="Long" resultMap="OutPickSubmitResult">
<include refid="selectOutPickSubmitVo"/>
where id = #{id}
</select>
<insert id="insertOutPickSubmit" parameterType="OutPickSubmit" useGeneratedKeys="true" keyProperty="id">
insert into out_pick_submit
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="trayCode != null">tray_code,</if>
<if test="jobId != null">job_id,</if>
<if test="jobDetailId != null">job_detail_id,</if>
<if test="productId != null">product_id,</if>
<if test="quantity != null">quantity,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="exitId != null">exit_id,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="trayCode != null">#{trayCode},</if>
<if test="jobId != null">#{jobId},</if>
<if test="jobDetailId != null">#{jobDetailId},</if>
<if test="productId != null">#{productId},</if>
<if test="quantity != null">#{quantity},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="exitId != null">#{exitId},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
</trim>
</insert>
<update id="updateOutPickSubmit" parameterType="OutPickSubmit">
update out_pick_submit
<trim prefix="SET" suffixOverrides=",">
<if test="trayCode != null">tray_code = #{trayCode},</if>
<if test="jobId != null">job_id = #{jobId},</if>
<if test="jobDetailId != null">job_detail_id = #{jobDetailId},</if>
<if test="productId != null">product_id = #{productId},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="exitId != null">exit_id = #{exitId},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteOutPickSubmitById" parameterType="Long">
delete from out_pick_submit where id = #{id}
</delete>
<delete id="deleteOutPickSubmitByIds" parameterType="String">
delete from out_pick_submit where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,277 @@
<?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.out.outStockoutDetailFinish.mapper.OutStockoutDetailFinishMapper">
<resultMap type="OutStockoutDetailFinish" id="OutStockoutDetailFinishResult">
<result property="stockoutDetailId" column="stockout_detail_id" />
<result property="stockoutGuid" column="stockout_guid" />
<result property="stockoutId" column="stockout_id" />
<result property="lotNo" column="lot_no" />
<result property="productGuid" column="product_guid" />
<result property="productId" column="product_id" />
<result property="quantity" column="quantity" />
<result property="quantityX" column="quantity_x" />
<result property="quantityJ" column="quantity_j" />
<result property="assignNum" column="assign_num" />
<result property="assignNumX" column="assign_num_x" />
<result property="assignNumJ" column="assign_num_j" />
<result property="allotQuantity" column="allot_quantity" />
<result property="allotQuantityX" column="allot_quantity_x" />
<result property="allotQuantityJ" column="allot_quantity_j" />
<result property="price" column="price" />
<result property="remark" column="remark" />
<result property="warehouseId" column="warehouse_id" />
<result property="outId" column="out_id" />
<result property="bukechaiQuantity" column="bukechai_quantity" />
<result property="kechaiQuantity" column="kechai_quantity" />
<result property="entryid" column="entryid" />
<result property="flatQuantity" column="flat_quantity" />
<result property="fid" column="fid" />
<result property="erpStockoutId" column="erp_stockout_id" />
<result property="unit" column="unit" />
<result property="spec" column="spec" />
<result property="productName" column="product_name" />
<result property="supplierId" column="supplier_id" />
<result property="cargoNo" column="cargo_no" />
<result property="createTime" column="create_time" />
<result property="printDate" column="print_date" />
</resultMap>
<resultMap type="OutStockoutDetail" id="OutStockoutDetailResult">
<result property="stockoutDetailId" column="stockout_detail_id" />
<result property="stockoutGuid" column="stockout_guid" />
<result property="stockoutId" column="stockout_id" />
<result property="lotNo" column="lot_no" />
<result property="productGuid" column="product_guid" />
<result property="productId" column="product_id" />
<result property="quantity" column="quantity" />
<result property="quantityX" column="quantity_x" />
<result property="quantityJ" column="quantity_j" />
<result property="assignNum" column="assign_num" />
<result property="assignNumX" column="assign_num_x" />
<result property="assignNumJ" column="assign_num_j" />
<result property="allotQuantity" column="allot_quantity" />
<result property="allotQuantityX" column="allot_quantity_x" />
<result property="allotQuantityJ" column="allot_quantity_j" />
<result property="price" column="price" />
<result property="remark" column="remark" />
<result property="warehouseId" column="warehouse_id" />
<result property="outId" column="out_id" />
<result property="bukechaiQuantity" column="bukechai_quantity" />
<result property="kechaiQuantity" column="kechai_quantity" />
<result property="entryid" column="entryid" />
<result property="flatQuantity" column="flat_quantity" />
<result property="fid" column="fid" />
<result property="erpStockoutId" column="erp_stockout_id" />
<result property="unit" column="unit" />
<result property="spec" column="spec" />
<result property="supplierId" column="supplier_id" />
<result property="cargoNo" column="cargo_no" />
<result property="createTime" column="create_time" />
<result property="printDate" column="print_date" />
<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="productName" column="product_name" />
<result property="productPrice" column="product_price" />
<result property="productDrawNo" column="product_draw_no" />
<result property="productUnit" column="product_unit" />
<result property="productSpec" column="product_spec" />
<result property="productStatus" column="product_status" />
<result property="createSys" column="create_sys" />
<result property="isUsed" column="is_used" />
<result property="supplierName" column="supplier_name" />
<result property="customerName" column="customer_name" />
</resultMap>
<sql id="selectOutStockoutDetailFinishVo">
select stockout_detail_id, stockout_guid, stockout_id, lot_no, product_guid, product_id, quantity, quantity_x, quantity_j, assign_num, assign_num_x, assign_num_j, allot_quantity, allot_quantity_x, allot_quantity_j, price, remark, warehouse_id, out_id, bukechai_quantity, kechai_quantity, entryid, flat_quantity, fid, erp_stockout_id, unit, spec, product_name, supplier_id, cargo_no, create_time, print_date from out_stockout_detail_finish
</sql>
<select id="selectOutStockoutDetailFinishList" parameterType="OutStockoutDetailFinish" resultMap="OutStockoutDetailFinishResult">
<include refid="selectOutStockoutDetailFinishVo"/>
<where>
<if test="stockoutDetailId != null and stockoutDetailId != ''"> and stockout_detail_id = #{stockoutDetailId}</if>
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="quantity != null "> and quantity = #{quantity}</if>
<if test="quantityX != null "> and quantity_x = #{quantityX}</if>
<if test="quantityJ != null "> and quantity_j = #{quantityJ}</if>
<if test="assignNum != null "> and assign_num = #{assignNum}</if>
<if test="assignNumX != null "> and assign_num_x = #{assignNumX}</if>
<if test="assignNumJ != null "> and assign_num_j = #{assignNumJ}</if>
<if test="allotQuantity != null "> and allot_quantity = #{allotQuantity}</if>
<if test="allotQuantityX != null "> and allot_quantity_x = #{allotQuantityX}</if>
<if test="allotQuantityJ != null "> and allot_quantity_j = #{allotQuantityJ}</if>
<if test="price != null and price != ''"> and price = #{price}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="outId != null and outId != ''"> and out_id = #{outId}</if>
<if test="bukechaiQuantity != null and bukechaiQuantity != ''"> and bukechai_quantity = #{bukechaiQuantity}</if>
<if test="kechaiQuantity != null and kechaiQuantity != ''"> and kechai_quantity = #{kechaiQuantity}</if>
<if test="entryid != null and entryid != ''"> and entryid = #{entryid}</if>
<if test="flatQuantity != null and flatQuantity != ''"> and flat_quantity = #{flatQuantity}</if>
<if test="fid != null and fid != ''"> and fid = #{fid}</if>
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="spec != null and spec != ''"> and spec = #{spec}</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="supplierId != null and supplierId != ''"> and supplier_id = #{supplierId}</if>
<if test="cargoNo != null and cargoNo != ''"> and cargo_no = #{cargoNo}</if>
<if test="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
</where>
</select>
<select id="selectOutStockoutDetailFinishByStockoutDetailId" parameterType="String" resultMap="OutStockoutDetailFinishResult">
<include refid="selectOutStockoutDetailFinishVo"/>
where stockout_detail_id = #{stockoutDetailId}
</select>
<insert id="insertOutStockoutDetailFinish" parameterType="OutStockoutDetailFinish">
insert into out_stockout_detail_finish
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockoutDetailId != null and stockoutDetailId != ''">stockout_detail_id,</if>
<if test="stockoutGuid != null">stockout_guid,</if>
<if test="stockoutId != null">stockout_id,</if>
<if test="lotNo != null">lot_no,</if>
<if test="productGuid != null">product_guid,</if>
<if test="productId != null">product_id,</if>
<if test="quantity != null">quantity,</if>
<if test="quantityX != null">quantity_x,</if>
<if test="quantityJ != null">quantity_j,</if>
<if test="assignNum != null">assign_num,</if>
<if test="assignNumX != null">assign_num_x,</if>
<if test="assignNumJ != null">assign_num_j,</if>
<if test="allotQuantity != null">allot_quantity,</if>
<if test="allotQuantityX != null">allot_quantity_x,</if>
<if test="allotQuantityJ != null">allot_quantity_j,</if>
<if test="price != null">price,</if>
<if test="remark != null">remark,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="outId != null">out_id,</if>
<if test="bukechaiQuantity != null">bukechai_quantity,</if>
<if test="kechaiQuantity != null">kechai_quantity,</if>
<if test="entryid != null">entryid,</if>
<if test="flatQuantity != null">flat_quantity,</if>
<if test="fid != null">fid,</if>
<if test="erpStockoutId != null">erp_stockout_id,</if>
<if test="unit != null">unit,</if>
<if test="spec != null">spec,</if>
<if test="productName != null">product_name,</if>
<if test="supplierId != null">supplier_id,</if>
<if test="cargoNo != null">cargo_no,</if>
<if test="createTime != null">create_time,</if>
<if test="printDate != null">print_date,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockoutDetailId != null and stockoutDetailId != ''">#{stockoutDetailId},</if>
<if test="stockoutGuid != null">#{stockoutGuid},</if>
<if test="stockoutId != null">#{stockoutId},</if>
<if test="lotNo != null">#{lotNo},</if>
<if test="productGuid != null">#{productGuid},</if>
<if test="productId != null">#{productId},</if>
<if test="quantity != null">#{quantity},</if>
<if test="quantityX != null">#{quantityX},</if>
<if test="quantityJ != null">#{quantityJ},</if>
<if test="assignNum != null">#{assignNum},</if>
<if test="assignNumX != null">#{assignNumX},</if>
<if test="assignNumJ != null">#{assignNumJ},</if>
<if test="allotQuantity != null">#{allotQuantity},</if>
<if test="allotQuantityX != null">#{allotQuantityX},</if>
<if test="allotQuantityJ != null">#{allotQuantityJ},</if>
<if test="price != null">#{price},</if>
<if test="remark != null">#{remark},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="outId != null">#{outId},</if>
<if test="bukechaiQuantity != null">#{bukechaiQuantity},</if>
<if test="kechaiQuantity != null">#{kechaiQuantity},</if>
<if test="entryid != null">#{entryid},</if>
<if test="flatQuantity != null">#{flatQuantity},</if>
<if test="fid != null">#{fid},</if>
<if test="erpStockoutId != null">#{erpStockoutId},</if>
<if test="unit != null">#{unit},</if>
<if test="spec != null">#{spec},</if>
<if test="productName != null">#{productName},</if>
<if test="supplierId != null">#{supplierId},</if>
<if test="cargoNo != null">#{cargoNo},</if>
<if test="createTime != null">#{createTime},</if>
<if test="printDate != null">#{printDate},</if>
</trim>
</insert>
<update id="updateOutStockoutDetailFinish" parameterType="OutStockoutDetailFinish">
update out_stockout_detail_finish
<trim prefix="SET" suffixOverrides=",">
<if test="stockoutGuid != null">stockout_guid = #{stockoutGuid},</if>
<if test="stockoutId != null">stockout_id = #{stockoutId},</if>
<if test="lotNo != null">lot_no = #{lotNo},</if>
<if test="productGuid != null">product_guid = #{productGuid},</if>
<if test="productId != null">product_id = #{productId},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="quantityX != null">quantity_x = #{quantityX},</if>
<if test="quantityJ != null">quantity_j = #{quantityJ},</if>
<if test="assignNum != null">assign_num = #{assignNum},</if>
<if test="assignNumX != null">assign_num_x = #{assignNumX},</if>
<if test="assignNumJ != null">assign_num_j = #{assignNumJ},</if>
<if test="allotQuantity != null">allot_quantity = #{allotQuantity},</if>
<if test="allotQuantityX != null">allot_quantity_x = #{allotQuantityX},</if>
<if test="allotQuantityJ != null">allot_quantity_j = #{allotQuantityJ},</if>
<if test="price != null">price = #{price},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="outId != null">out_id = #{outId},</if>
<if test="bukechaiQuantity != null">bukechai_quantity = #{bukechaiQuantity},</if>
<if test="kechaiQuantity != null">kechai_quantity = #{kechaiQuantity},</if>
<if test="entryid != null">entryid = #{entryid},</if>
<if test="flatQuantity != null">flat_quantity = #{flatQuantity},</if>
<if test="fid != null">fid = #{fid},</if>
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="spec != null">spec = #{spec},</if>
<if test="productName != null">product_name = #{productName},</if>
<if test="supplierId != null">supplier_id = #{supplierId},</if>
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="printDate != null">print_date = #{printDate},</if>
</trim>
where stockout_detail_id = #{stockoutDetailId}
</update>
<delete id="deleteOutStockoutDetailFinishByStockoutDetailId" parameterType="String">
delete from out_stockout_detail_finish where stockout_detail_id = #{stockoutDetailId}
</delete>
<delete id="deleteOutStockoutDetailFinishByStockoutDetailIds" parameterType="String">
delete from out_stockout_detail_finish where stockout_detail_id in
<foreach item="stockoutDetailId" collection="array" open="(" separator="," close=")">
#{stockoutDetailId}
</foreach>
</delete>
<select id="selectOutStockoutDetailFinishListByStockoutGuid" parameterType="string" resultMap="OutStockoutDetailResult">
select d.stockout_detail_id, d.stockout_guid, d.stockout_id, d.lot_no, d.product_guid, d.product_id, d.quantity, d.quantity_x,
d.quantity_j, d.assign_num, d.assign_num_x, d.assign_num_j, d.allot_quantity, d.allot_quantity_x, d.allot_quantity_j,
d.price, d.remark, d.warehouse_id, d.out_id, d.bukechai_quantity, d.kechai_quantity, d.entryid, d.flat_quantity, d.fid,
d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.print_date,
d.voltage, d.power, d.phase, d.net_weight, d.gross_weight, d.distribution, d.model, d.order_id,
p.product_name,p.parent_id,p.price as product_price,p.cargo_no as product_draw_no,p.unit as product_unit,p.spec as product_spec,
p.spare1 as product_status,p.spare3 as create_time,p.spare4 as create_sys,p.spare7 as is_used,
s.supplier_name,
c.customer_name
from out_stockout_detail_finish d
left join bas_product p on d.product_id = p.product_id
left join bas_supplier s on d.supplier_id = s.supplier_no
left join bas_customer c on d.out_id = c.customer_no
where stockout_guid = #{stockoutGuid}
</select>
</mapper>

View File

@@ -0,0 +1,281 @@
<?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.out.outStockoutDetail.mapper.OutStockoutDetailMapper">
<resultMap type="OutStockoutDetail" id="OutStockoutDetailResult">
<result property="stockoutDetailId" column="stockout_detail_id" />
<result property="stockoutGuid" column="stockout_guid" />
<result property="stockoutId" column="stockout_id" />
<result property="lotNo" column="lot_no" />
<result property="productGuid" column="product_guid" />
<result property="productId" column="product_id" />
<result property="productName" column="product_name" />
<result property="quantity" column="quantity" />
<result property="quantityX" column="quantity_x" />
<result property="quantityJ" column="quantity_j" />
<result property="assignNum" column="assign_num" />
<result property="assignNumX" column="assign_num_x" />
<result property="assignNumJ" column="assign_num_j" />
<result property="allotQuantity" column="allot_quantity" />
<result property="allotQuantityX" column="allot_quantity_x" />
<result property="allotQuantityJ" column="allot_quantity_j" />
<result property="price" column="price" />
<result property="remark" column="remark" />
<result property="warehouseId" column="warehouse_id" />
<result property="outId" column="out_id" />
<result property="bukechaiQuantity" column="bukechai_quantity" />
<result property="kechaiQuantity" column="kechai_quantity" />
<result property="entryid" column="entryid" />
<result property="flatQuantity" column="flat_quantity" />
<result property="fid" column="fid" />
<result property="erpStockoutId" column="erp_stockout_id" />
<result property="unit" column="unit" />
<result property="spec" column="spec" />
<result property="supplierId" column="supplier_id" />
<result property="cargoNo" column="cargo_no" />
<result property="createTime" column="create_time" />
<result property="printDate" column="print_date" />
<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="parentId" column="parent_id" />
<result property="orderId" column="order_id" />
<result property="productPrice" column="product_price" />
<result property="productDrawNo" column="product_draw_no" />
<result property="productUnit" column="product_unit" />
<result property="productSpec" column="product_spec" />
<result property="productStatus" column="product_status" />
<result property="createSys" column="create_sys" />
<result property="isUsed" column="is_used" />
<result property="supplierName" column="supplier_name" />
<result property="customerName" column="customer_name" />
</resultMap>
<sql id="selectOutStockoutDetailVo">
select d.stockout_detail_id, d.stockout_guid, d.stockout_id, d.lot_no, d.product_guid, d.product_id, d.quantity, d.quantity_x,
d.quantity_j, d.assign_num, d.assign_num_x, d.assign_num_j, d.allot_quantity, d.allot_quantity_x, d.allot_quantity_j,
d.price, d.remark, d.warehouse_id, d.out_id, d.bukechai_quantity, d.kechai_quantity, d.entryid, d.flat_quantity, d.fid,
d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.create_time, d.print_date,
d.voltage, d.power, d.phase, d.net_weight, d.gross_weight, d.distribution, d.model, d.order_id,
d.product_name
from out_stockout_detail d
</sql>
<select id="selectOutStockoutDetailList" parameterType="OutStockoutDetail" resultMap="OutStockoutDetailResult">
<include refid="selectOutStockoutDetailVo"/>
<where>
<if test="stockoutDetailId != null and stockoutDetailId != ''"> and stockout_detail_id = #{stockoutDetailId}</if>
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
<if test="lotNo != null and lotNo != ''"> and lot_no like concat('%', #{lotNo}, '%')</if>
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
<if test="productId != null and productId != ''"> and d.product_id like concat('%', #{productId}, '%')</if>
<if test="quantity != null "> and quantity = #{quantity}</if>
<if test="quantityX != null "> and quantity_x = #{quantityX}</if>
<if test="quantityJ != null "> and quantity_j = #{quantityJ}</if>
<if test="assignNum != null "> and assign_num = #{assignNum}</if>
<if test="assignNumX != null "> and assign_num_x = #{assignNumX}</if>
<if test="assignNumJ != null "> and assign_num_j = #{assignNumJ}</if>
<if test="allotQuantity != null "> and allot_quantity = #{allotQuantity}</if>
<if test="allotQuantityX != null "> and allot_quantity_x = #{allotQuantityX}</if>
<if test="allotQuantityJ != null "> and allot_quantity_j = #{allotQuantityJ}</if>
<if test="price != null and price != ''"> and d.price = #{price}</if>
<if test="warehouseId != null and warehouseId != ''"> and d.warehouse_id = #{warehouseId}</if>
<if test="outId != null and outId != ''"> and out_id = #{outId}</if>
<if test="bukechaiQuantity != null and bukechaiQuantity != ''"> and bukechai_quantity = #{bukechaiQuantity}</if>
<if test="kechaiQuantity != null and kechaiQuantity != ''"> and kechai_quantity = #{kechaiQuantity}</if>
<if test="entryid != null and entryid != ''"> and entryid = #{entryid}</if>
<if test="flatQuantity != null and flatQuantity != ''"> and flat_quantity = #{flatQuantity}</if>
<if test="fid != null and fid != ''"> and fid = #{fid}</if>
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
<if test="unit != null and unit != ''"> and d.unit like concat('%', #{unit}, '%')</if>
<if test="spec != null and spec != ''"> and d.spec like concat('%', #{spec}, '%')</if>
<if test="supplierId != null and supplierId != ''"> and d.supplier_id like concat('%', #{supplierId}, '%')</if>
<if test="cargoNo != null and cargoNo != ''"> and d.cargo_no = #{cargoNo}</if>
<if test="printDate != null and printDate != ''"> and d.print_date = #{printDate}</if>
<if test="voltage != null and voltage != ''"> and d.voltage = #{voltage}</if>
<if test="power != null and power != ''"> and d.power = #{power}</if>
<if test="phase != null and phase != ''"> and d.phase = #{phase}</if>
<if test="netWeight != null "> and d.net_weight = #{netWeight}</if>
<if test="grossWeight != null "> and d.gross_weight = #{grossWeight}</if>
<if test="distribution != null and distribution != ''"> and d.distribution = #{distribution}</if>
<if test="model != null and model != ''"> and d.model = #{model}</if>
<if test="orderId != null and orderId != ''"> and d.order_id = #{orderId}</if>
</where>
</select>
<select id="selectOutStockoutDetailByStockoutDetailId" parameterType="String" resultMap="OutStockoutDetailResult">
<include refid="selectOutStockoutDetailVo"/>
where stockout_detail_id = #{stockoutDetailId}
</select>
<insert id="insertOutStockoutDetail" parameterType="OutStockoutDetail">
insert into out_stockout_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockoutDetailId != null and stockoutDetailId != ''">stockout_detail_id,</if>
<if test="stockoutGuid != null">stockout_guid,</if>
<if test="stockoutId != null">stockout_id,</if>
<if test="lotNo != null">lot_no,</if>
<if test="productGuid != null">product_guid,</if>
<if test="productId != null">product_id,</if>
<if test="quantity != null">quantity,</if>
<if test="quantityX != null">quantity_x,</if>
<if test="quantityJ != null">quantity_j,</if>
<if test="assignNum != null">assign_num,</if>
<if test="assignNumX != null">assign_num_x,</if>
<if test="assignNumJ != null">assign_num_j,</if>
<if test="allotQuantity != null">allot_quantity,</if>
<if test="allotQuantityX != null">allot_quantity_x,</if>
<if test="allotQuantityJ != null">allot_quantity_j,</if>
<if test="price != null">price,</if>
<if test="remark != null">remark,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="outId != null">out_id,</if>
<if test="bukechaiQuantity != null">bukechai_quantity,</if>
<if test="kechaiQuantity != null">kechai_quantity,</if>
<if test="entryid != null">entryid,</if>
<if test="flatQuantity != null">flat_quantity,</if>
<if test="fid != null">fid,</if>
<if test="erpStockoutId != null">erp_stockout_id,</if>
<if test="unit != null">unit,</if>
<if test="spec != null">spec,</if>
<if test="supplierId != null">supplier_id,</if>
<if test="cargoNo != null">cargo_no,</if>
<if test="printDate != null">print_date,</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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockoutDetailId != null and stockoutDetailId != ''">#{stockoutDetailId},</if>
<if test="stockoutGuid != null">#{stockoutGuid},</if>
<if test="stockoutId != null">#{stockoutId},</if>
<if test="lotNo != null">#{lotNo},</if>
<if test="productGuid != null">#{productGuid},</if>
<if test="productId != null">#{productId},</if>
<if test="quantity != null">#{quantity},</if>
<if test="quantityX != null">#{quantityX},</if>
<if test="quantityJ != null">#{quantityJ},</if>
<if test="assignNum != null">#{assignNum},</if>
<if test="assignNumX != null">#{assignNumX},</if>
<if test="assignNumJ != null">#{assignNumJ},</if>
<if test="allotQuantity != null">#{allotQuantity},</if>
<if test="allotQuantityX != null">#{allotQuantityX},</if>
<if test="allotQuantityJ != null">#{allotQuantityJ},</if>
<if test="price != null">#{price},</if>
<if test="remark != null">#{remark},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="outId != null">#{outId},</if>
<if test="bukechaiQuantity != null">#{bukechaiQuantity},</if>
<if test="kechaiQuantity != null">#{kechaiQuantity},</if>
<if test="entryid != null">#{entryid},</if>
<if test="flatQuantity != null">#{flatQuantity},</if>
<if test="fid != null">#{fid},</if>
<if test="erpStockoutId != null">#{erpStockoutId},</if>
<if test="unit != null">#{unit},</if>
<if test="spec != null">#{spec},</if>
<if test="supplierId != null">#{supplierId},</if>
<if test="cargoNo != null">#{cargoNo},</if>
<if test="printDate != null">#{printDate},</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>
</trim>
</insert>
<update id="updateOutStockoutDetail" parameterType="OutStockoutDetail">
update out_stockout_detail
<trim prefix="SET" suffixOverrides=",">
<if test="stockoutGuid != null">stockout_guid = #{stockoutGuid},</if>
<if test="stockoutId != null">stockout_id = #{stockoutId},</if>
<if test="lotNo != null">lot_no = #{lotNo},</if>
<if test="productGuid != null">product_guid = #{productGuid},</if>
<if test="productId != null">product_id = #{productId},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="quantityX != null">quantity_x = #{quantityX},</if>
<if test="quantityJ != null">quantity_j = #{quantityJ},</if>
<if test="assignNum != null">assign_num = #{assignNum},</if>
<if test="assignNumX != null">assign_num_x = #{assignNumX},</if>
<if test="assignNumJ != null">assign_num_j = #{assignNumJ},</if>
<if test="allotQuantity != null">allot_quantity = #{allotQuantity},</if>
<if test="allotQuantityX != null">allot_quantity_x = #{allotQuantityX},</if>
<if test="allotQuantityJ != null">allot_quantity_j = #{allotQuantityJ},</if>
<if test="price != null">price = #{price},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="outId != null">out_id = #{outId},</if>
<if test="bukechaiQuantity != null">bukechai_quantity = #{bukechaiQuantity},</if>
<if test="kechaiQuantity != null">kechai_quantity = #{kechaiQuantity},</if>
<if test="entryid != null">entryid = #{entryid},</if>
<if test="flatQuantity != null">flat_quantity = #{flatQuantity},</if>
<if test="fid != null">fid = #{fid},</if>
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="spec != null">spec = #{spec},</if>
<if test="supplierId != null">supplier_id = #{supplierId},</if>
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="printDate != null">print_date = #{printDate},</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>
</trim>
where stockout_detail_id = #{stockoutDetailId}
</update>
<delete id="deleteOutStockoutDetailByStockoutDetailId" parameterType="String">
delete from out_stockout_detail where stockout_detail_id = #{stockoutDetailId}
</delete>
<delete id="deleteOutStockoutDetailByStockoutDetailIds" parameterType="String">
delete from out_stockout_detail where stockout_detail_id in
<foreach item="stockoutDetailId" collection="array" open="(" separator="," close=")">
#{stockoutDetailId}
</foreach>
</delete>
<select id="selectOutStockoutDetailByStockoutGuid" parameterType="string" resultMap="OutStockoutDetailResult">
select d.stockout_detail_id, d.stockout_guid, d.stockout_id, d.lot_no, d.product_guid, d.product_id, d.quantity, d.quantity_x,
d.quantity_j, d.assign_num, d.assign_num_x, d.assign_num_j, d.allot_quantity, d.allot_quantity_x, d.allot_quantity_j,
d.price, d.remark, d.warehouse_id, d.out_id, d.bukechai_quantity, d.kechai_quantity, d.entryid, d.flat_quantity, d.fid,
d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.print_date,
d.voltage, d.power, d.phase, d.net_weight, d.gross_weight, d.distribution, d.model, d.order_id,
p.product_name,p.parent_id,p.price as product_price,p.cargo_no as product_draw_no,p.unit as product_unit,p.spec as product_spec,
p.spare1 as product_status,p.spare3 as create_time,p.spare4 as create_sys,p.spare7 as is_used,
s.supplier_name,
c.customer_name
from out_stockout_detail d
left join bas_product p on d.product_id = p.product_id
left join bas_supplier s on d.supplier_id = s.supplier_no
left join bas_customer c on d.out_id = c.customer_no
where d.stockout_guid = #{stockoutGuid}
</select>
</mapper>

View File

@@ -0,0 +1,176 @@
<?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.out.outStockoutFinish.mapper.OutStockoutFinishMapper">
<resultMap type="OutStockoutFinish" id="OutStockoutFinishResult">
<result property="stockoutGuid" column="stockout_guid" />
<result property="stockoutId" column="stockout_id" />
<result property="outType" column="out_type" />
<result property="createDate" column="create_date" />
<result property="departmentNo" column="department_no" />
<result property="customerNo" column="customer_no" />
<result property="createManId" column="create_man_id" />
<result property="status" column="status" />
<result property="stockoutSource" column="stockout_source" />
<result property="warehouseId" column="warehouse_id" />
<result property="classNowId" column="class_now_id" />
<result property="exitId" column="exit_id" />
<result property="carNumber" column="car_number" />
<result property="FID" column="FID" />
<result property="erpStockoutId" column="erp_stockout_id" />
<result property="startDate" column="start_date" />
<result property="finishDate" column="finish_date" />
<result property="warehouseName" column="warehouse_name" />
<result property="customerName" column="customer_name" />
<result property="supplierName" column="supplier_name" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectOutStockoutFinishVo">
select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id, start_date, finish_date,remark from out_stockout_finish
</sql>
<select id="selectOutStockoutFinishList" parameterType="OutStockoutFinish" resultMap="OutStockoutFinishResult">
<include refid="selectOutStockoutFinishVo"/>
<where>
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
<if test="outType != null and outType != ''"> and out_type = #{outType}</if>
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if>
<if test="departmentNo != null and departmentNo != ''"> and department_no = #{departmentNo}</if>
<if test="customerNo != null and customerNo != ''"> and customer_no = #{customerNo}</if>
<if test="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="stockoutSource != null and stockoutSource != ''"> and stockout_source = #{stockoutSource}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="classNowId != null and classNowId != ''"> and class_now_id = #{classNowId}</if>
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
<if test="carNumber != null and carNumber != ''"> and car_number = #{carNumber}</if>
<if test="FID != null and FID != ''"> and FID = #{FID}</if>
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
<if test="startDate != null and startDate != ''"> and start_date = #{startDate}</if>
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if>
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
</where>
</select>
<select id="selectOutStockoutFinishByStockoutGuid" parameterType="String" resultMap="OutStockoutFinishResult">
<include refid="selectOutStockoutFinishVo"/>
where stockout_guid = #{stockoutGuid}
</select>
<insert id="insertOutStockoutFinish" parameterType="OutStockoutFinish">
insert into out_stockout_finish
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockoutGuid != null and stockoutGuid != ''">stockout_guid,</if>
<if test="stockoutId != null and stockoutId != ''">stockout_id,</if>
<if test="outType != null and outType != ''">out_type,</if>
<if test="createDate != null and createDate != ''">create_date,</if>
<if test="departmentNo != null">department_no,</if>
<if test="customerNo != null">customer_no,</if>
<if test="createManId != null">create_man_id,</if>
<if test="status != null and status != ''">status,</if>
<if test="stockoutSource != null">stockout_source,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="classNowId != null">class_now_id,</if>
<if test="exitId != null">exit_id,</if>
<if test="carNumber != null">car_number,</if>
<if test="FID != null">FID,</if>
<if test="erpStockoutId != null">erp_stockout_id,</if>
<if test="startDate != null">start_date,</if>
<if test="finishDate != null">finish_date,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockoutGuid != null and stockoutGuid != ''">#{stockoutGuid},</if>
<if test="stockoutId != null and stockoutId != ''">#{stockoutId},</if>
<if test="outType != null and outType != ''">#{outType},</if>
<if test="createDate != null and createDate != ''">#{createDate},</if>
<if test="departmentNo != null">#{departmentNo},</if>
<if test="customerNo != null">#{customerNo},</if>
<if test="createManId != null">#{createManId},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="stockoutSource != null">#{stockoutSource},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="classNowId != null">#{classNowId},</if>
<if test="exitId != null">#{exitId},</if>
<if test="carNumber != null">#{carNumber},</if>
<if test="FID != null">#{FID},</if>
<if test="erpStockoutId != null">#{erpStockoutId},</if>
<if test="startDate != null">#{startDate},</if>
<if test="finishDate != null">#{finishDate},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateOutStockoutFinish" parameterType="OutStockoutFinish">
update out_stockout_finish
<trim prefix="SET" suffixOverrides=",">
<if test="stockoutId != null and stockoutId != ''">stockout_id = #{stockoutId},</if>
<if test="outType != null and outType != ''">out_type = #{outType},</if>
<if test="createDate != null and createDate != ''">create_date = #{createDate},</if>
<if test="departmentNo != null">department_no = #{departmentNo},</if>
<if test="customerNo != null">customer_no = #{customerNo},</if>
<if test="createManId != null">create_man_id = #{createManId},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="stockoutSource != null">stockout_source = #{stockoutSource},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="classNowId != null">class_now_id = #{classNowId},</if>
<if test="exitId != null">exit_id = #{exitId},</if>
<if test="carNumber != null">car_number = #{carNumber},</if>
<if test="FID != null">FID = #{FID},</if>
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
<if test="startDate != null">start_date = #{startDate},</if>
<if test="finishDate != null">finish_date = #{finishDate},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where stockout_guid = #{stockoutGuid}
</update>
<delete id="deleteOutStockoutFinishByStockoutGuid" parameterType="String">
delete from out_stockout_finish where stockout_guid = #{stockoutGuid}
</delete>
<delete id="deleteOutStockoutFinishByStockoutGuids" parameterType="String">
delete from out_stockout_finish where stockout_guid in
<foreach item="stockoutGuid" collection="array" open="(" separator="," close=")">
#{stockoutGuid}
</foreach>
</delete>
<select id="selectOutStockoutFinishListByOutStockout" parameterType="OutStockout" resultMap="OutStockoutFinishResult">
select distinct o.stockout_guid, o.stockout_id, o.out_type, o.create_date, o.department_no, o.customer_no, o.create_man_id, o.status, o.stockout_source,
o.class_now_id, o.exit_id, o.car_number, o.FID, o.erp_stockout_id,o.start_date,o.finish_date,o.remark from out_stockout_finish o
left join out_stockout_detail_finish d on d.stockout_id = o.stockout_id
left join bas_warehouse bw on bw.warehouse_id = d.warehouse_id
left join bas_customer bc on bc.customer_no = d.out_id
left join bas_supplier bs on bs.supplier_no = d.supplier_id
left join bas_product bp on bp.product_id = d.product_id
<where>
<if test="stockoutGuid != null and stockoutGuid != ''"> and o.stockout_guid = #{stockoutGuid}</if>
<if test="stockoutId != null and stockoutId != ''"> and o.stockout_id = #{stockoutId}</if>
<if test="outType != null and outType != ''"> and o.out_type = #{outType}</if>
<if test="departmentNo != null and departmentNo != ''"> and o.department_no = #{departmentNo}</if>
<if test="customerNo != null and customerNo != ''"> and o.customer_no = #{customerNo}</if>
<if test="createManId != null and createManId != ''"> and o.create_man_id = #{createManId}</if>
<if test="status != null and status != ''"> and o.status = #{status}</if>
<if test="stockoutSource != null and stockoutSource != ''"> and o.stockout_source = #{stockoutSource}</if>
<if test="warehouseId != null and warehouseId != ''"> and d.warehouse_id = #{warehouseId}</if>
<if test="classNowId != null and classNowId != ''"> and o.class_now_id = #{classNowId}</if>
<if test="exitId != null and exitId != ''"> and o.exit_id = #{exitId}</if>
<if test="carNumber != null and carNumber != ''"> and o.car_number = #{carNumber}</if>
<if test="FID != null and FID != ''"> and o.FID = #{FID}</if>
<if test="erpStockoutId != null and erpStockoutId != ''"> and o.erp_stockout_id = #{erpStockoutId}</if>
<if test="startDate != null and startDate != ''"> and o.create_date &gt;= #{startDate}</if>
<if test="finishDate != null and finishDate != ''"> and o.create_date &lt;= #{finishDate}</if>
<if test="productId != null and productId != ''"> and d.product_id = #{productId}</if>
<if test="productName != null and productName != ''"> and bp.product_name like concat('%', #{productName}, '%')</if>
<if test="customerName != null and customerName != ''"> and bc.customer_name like concat('%', #{customerName}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and bs.supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="remark != null and remark != ''"> and o.remark like concat('%', #{remark}, '%')</if>
</where>
order by o.create_date desc
</select>
</mapper>

View File

@@ -0,0 +1,210 @@
<?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.out.outStockout.mapper.OutStockoutMapper">
<resultMap type="OutStockout" id="OutStockoutResult">
<result property="stockoutGuid" column="stockout_guid" />
<result property="stockoutId" column="stockout_id" />
<result property="outType" column="out_type" />
<result property="createDate" column="create_date" />
<result property="departmentNo" column="department_no" />
<result property="customerNo" column="customer_no" />
<result property="createManId" column="create_man_id" />
<result property="status" column="status" />
<result property="stockoutSource" column="stockout_source" />
<result property="warehouseId" column="warehouse_id" />
<result property="classNowId" column="class_now_id" />
<result property="exitId" column="exit_id" />
<result property="carNumber" column="car_number" />
<result property="FID" column="FID" />
<result property="erpStockoutId" column="erp_stockout_id" />
<result property="startDate" column="start_date" />
<result property="finishDate" column="finish_date" />
<result property="warehouseName" column="warehouse_name" />
<result property="customerName" column="customer_name" />
<result property="supplierName" column="supplier_name" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectOutStockoutVo">
select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id,start_date,finish_date,remark from out_stockout
</sql>
<select id="selectOutStockoutList" parameterType="OutStockout" resultMap="OutStockoutResult">
select distinct o.stockout_guid, o.stockout_id, o.out_type, o.create_date, o.department_no, o.customer_no, o.create_man_id, o.status, o.stockout_source,
o.class_now_id, o.exit_id, o.car_number, o.FID, o.erp_stockout_id,o.start_date,o.finish_date,o.remark from out_stockout o
left join out_stockout_detail d on d.stockout_id = o.stockout_id
left join bas_customer bc on bc.customer_no = d.out_id
left join bas_warehouse bw on bw.warehouse_id = d.warehouse_id
left join bas_supplier bs on bs.supplier_no = d.supplier_id
left join bas_product bp on bp.product_id = d.product_id
<where>
<if test="stockoutGuid != null and stockoutGuid != ''"> and o.stockout_guid = #{stockoutGuid}</if>
<if test="stockoutId != null and stockoutId != ''"> and o.stockout_id = #{stockoutId}</if>
<if test="outType != null and outType != ''"> and o.out_type = #{outType}</if>
<if test="startDate != null and startDate != ''"> and o.create_date &gt;= #{startDate}</if>
<if test="finishDate != null and finishDate != ''"> and o.create_date &lt;= #{finishDate}</if>
<if test="departmentNo != null and departmentNo != ''"> and o.department_no = #{departmentNo}</if>
<if test="customerNo != null and customerNo != ''"> and o.customer_no = #{customerNo}</if>
<if test="createManId != null and createManId != ''"> and o.create_man_id = #{createManId}</if>
<if test="status != null and status != ''"> and o.status = #{status}</if>
<if test="stockoutSource != null and stockoutSource != ''"> and o.stockout_source = #{stockoutSource}</if>
<if test="warehouseId != null and warehouseId != ''"> and d.warehouse_id = #{warehouseId}</if>
<if test="classNowId != null and classNowId != ''"> and o.class_now_id = #{classNowId}</if>
<if test="exitId != null and exitId != ''"> and o.exit_id = #{exitId}</if>
<if test="carNumber != null and carNumber != ''"> and o.car_number = #{carNumber}</if>
<if test="FID != null and FID != ''"> and o.FID = #{FID}</if>
<if test="erpStockoutId != null and erpStockoutId != ''"> and o.erp_stockout_id = #{erpStockoutId}</if>
<if test="productId != null and productId != ''"> and d.product_id = #{productId}</if>
<if test="productName != null and productName != ''"> and bp.product_name like concat('%', #{productName}, '%')</if>
<if test="customerName != null and customerName != ''"> and bc.customer_name like concat('%', #{customerName}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and bs.supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="remark != null and remark != ''"> and o.remark like concat('%', #{remark}, '%')</if>
</where>
order by o.create_date desc
</select>
<select id="selectOutStockoutByStockoutGuid" parameterType="String" resultMap="OutStockoutResult">
<include refid="selectOutStockoutVo"/>
where stockout_guid = #{stockoutGuid}
</select>
<insert id="insertOutStockout" parameterType="OutStockout">
insert into out_stockout
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockoutGuid != null and stockoutGuid != ''">stockout_guid,</if>
<if test="stockoutId != null and stockoutId != ''">stockout_id,</if>
<if test="outType != null and outType != ''">out_type,</if>
<if test="createDate != null and createDate != ''">create_date,</if>
<if test="departmentNo != null">department_no,</if>
<if test="customerNo != null">customer_no,</if>
<if test="createManId != null">create_man_id,</if>
<if test="status != null and status != ''">status,</if>
<if test="stockoutSource != null">stockout_source,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="classNowId != null">class_now_id,</if>
<if test="exitId != null">exit_id,</if>
<if test="carNumber != null">car_number,</if>
<if test="FID != null">FID,</if>
<if test="erpStockoutId != null">erp_stockout_id,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockoutGuid != null and stockoutGuid != ''">#{stockoutGuid},</if>
<if test="stockoutId != null and stockoutId != ''">#{stockoutId},</if>
<if test="outType != null and outType != ''">#{outType},</if>
<if test="createDate != null and createDate != ''">#{createDate},</if>
<if test="departmentNo != null">#{departmentNo},</if>
<if test="customerNo != null">#{customerNo},</if>
<if test="createManId != null">#{createManId},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="stockoutSource != null">#{stockoutSource},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="classNowId != null">#{classNowId},</if>
<if test="exitId != null">#{exitId},</if>
<if test="carNumber != null">#{carNumber},</if>
<if test="FID != null">#{FID},</if>
<if test="erpStockoutId != null">#{erpStockoutId},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateOutStockout" parameterType="OutStockout">
update out_stockout
<trim prefix="SET" suffixOverrides=",">
<if test="stockoutId != null and stockoutId != ''">stockout_id = #{stockoutId},</if>
<if test="outType != null and outType != ''">out_type = #{outType},</if>
<if test="createDate != null and createDate != ''">create_date = #{createDate},</if>
<if test="departmentNo != null">department_no = #{departmentNo},</if>
<if test="customerNo != null">customer_no = #{customerNo},</if>
<if test="createManId != null">create_man_id = #{createManId},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="stockoutSource != null">stockout_source = #{stockoutSource},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="classNowId != null">class_now_id = #{classNowId},</if>
<if test="exitId != null">exit_id = #{exitId},</if>
<if test="carNumber != null">car_number = #{carNumber},</if>
<if test="FID != null">FID = #{FID},</if>
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
<if test="startDate != null">start_date = #{startDate},</if>
<if test="finishDate != null">finish_date = #{finishDate},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where stockout_guid = #{stockoutGuid}
</update>
<delete id="deleteOutStockoutByStockoutGuid" parameterType="String">
delete from out_stockout where stockout_guid = #{stockoutGuid}
</delete>
<delete id="deleteOutStockoutByStockoutGuids" parameterType="String">
delete from out_stockout where stockout_guid in
<foreach item="stockoutGuid" collection="array" open="(" separator="," close=")">
#{stockoutGuid}
</foreach>
</delete>
<select id="updateOutStockoutStatus" parameterType="java.util.Map" statementType="CALLABLE">
{
call proc_update_outbill_status(
#{outStockId,mode=IN,jdbcType=VARCHAR},
#{status,mode=IN,jdbcType=VARCHAR},
#{newStatus,mode=IN,jdbcType=VARCHAR},
#{exitId,mode=IN,jdbcType=VARCHAR},
#{v_result,mode=OUT,jdbcType=VARCHAR},
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
)
}
</select>
<select id="autoAllot" parameterType="java.util.Map" statementType="CALLABLE">
{
call proc_out_auto_allocation(
#{v_stockout_detail_id,mode=IN,jdbcType=VARCHAR},
#{v_result,mode=OUT,jdbcType=VARCHAR},
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
)
}
</select>
<select id="manualAllot" parameterType="java.util.Map" statementType="CALLABLE">
{
call proc_out_hand_allocation(
#{v_stockout_detail_id,mode=IN,jdbcType=VARCHAR},
#{v_stock_id,mode=IN,jdbcType=VARCHAR},
#{v_result,mode=OUT,jdbcType=VARCHAR},
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
)
}
</select>
<select id="selectOutStockoutByStockoutId" resultMap="OutStockoutResult">
select distinct o.stockout_guid,
o.stockout_id,
o.out_type,
o.create_date,
o.department_no,
o.customer_no,
o.create_man_id,
o.status,
o.stockout_source,
o.warehouse_id,
o.class_now_id,
o.exit_id,
o.car_number,
o.FID,
o.erp_stockout_id,
o.start_date,
o.finish_date,
bw.warehouse_name,
bc.customer_name,
o.remark
from out_stockout o
left join bas_warehouse bw on bw.warehouse_id = o.warehouse_id
left join bas_customer bc on bc.customer_no = o.customer_no
left join out_stockout_detail d on d.stockout_id = o.stockout_id
left join bas_product bp on bp.product_id = d.product_id
where o.stockout_id = #{stockoutId}
</select>
</mapper>

View File

@@ -0,0 +1,235 @@
<?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.out.handAllotStock.mapper.ViewHandAllotStockMapper">
<resultMap type="ViewHandAllotStock" id="ViewHandAllotStockResult">
<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" />
<result property="cargoSpaceName" column="cargo_space_name" />
</resultMap>
<sql id="selectViewHandAllotStockVo">
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, cargo_space_name from view_hand_allot_stock
</sql>
<select id="selectViewHandAllotStockList" parameterType="ViewHandAllotStock" resultMap="ViewHandAllotStockResult">
<include refid="selectViewHandAllotStockVo"/>
<where>
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</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 like concat('%', #{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 = #{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 net_weight = #{netWeight}</if>
<if test="grossWeight != null "> 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>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
</where>
</select>
<select id="selectViewHandAllotStockByStockId" parameterType="String" resultMap="ViewHandAllotStockResult">
<include refid="selectViewHandAllotStockVo"/>
where stock_id = #{stockId}
</select>
<insert id="insertViewHandAllotStock" parameterType="ViewHandAllotStock">
insert into view_hand_allot_stock
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockId != null and stockId != ''">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>
<if test="cargoSpaceName != null">cargo_space_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockId != null and stockId != ''">#{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>
<if test="cargoSpaceName != null">#{cargoSpaceName},</if>
</trim>
</insert>
<update id="updateViewHandAllotStock" parameterType="ViewHandAllotStock">
update view_hand_allot_stock
<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>
<if test="cargoSpaceName != null">cargo_space_name = #{cargoSpaceName},</if>
</trim>
where stock_id = #{stockId}
</update>
<delete id="deleteViewHandAllotStockByStockId" parameterType="String">
delete from view_hand_allot_stock where stock_id = #{stockId}
</delete>
<delete id="deleteViewHandAllotStockByStockIds" parameterType="String">
delete from view_hand_allot_stock where stock_id in
<foreach item="stockId" collection="array" open="(" separator="," close=")">
#{stockId}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,183 @@
<?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.out.productAndStock.mapper.ViewProductAndStockMapper">
<resultMap type="ViewProductAndStock" id="ViewProductAndStockResult">
<result property="onlyIdentity" column="only_identity" />
<result property="productId" column="product_id" />
<result property="lotNo" column="lot_no" />
<result property="productName" column="product_name" />
<result property="quantity" column="quantity" />
<result property="warehouseId" column="warehouse_id" />
<result property="spare1" column="spare1" />
<result property="spare3" column="spare3" />
<result property="spare4" column="spare4" />
<result property="spare5" column="spare5" />
<result property="spare6" column="spare6" />
<result property="voltage" column="voltage" />
<result property="power" column="power" />
<result property="phase" column="phase" />
<result property="distribution" column="distribution" />
<result property="orderId" column="order_id" />
<result property="spare8" column="spare8" />
<result property="price" column="price" />
<result property="cargoNo" column="cargo_no" />
<result property="productStatus" column="product_status" />
<result property="parentId" column="parent_id" />
<result property="spare7" column="spare7" />
<result property="createTime" column="create_time" />
<result property="createSys" column="create_sys" />
<result property="spec" column="spec" />
<result property="unit" column="unit" />
<result property="supplierName" column="supplier_name" />
</resultMap>
<sql id="selectViewProductAndStockVo">
select only_identity, product_id, lot_no, product_name, quantity, warehouse_id, spare1, spare3, spare4, spare5, spare6, voltage, power, phase, distribution, order_id, spare8, price, cargo_no, product_status, parent_id, spare7, create_time, create_sys, spec, unit,supplier_name from view_product_and_stock
</sql>
<select id="selectViewProductAndStockList" parameterType="ViewProductAndStock" resultMap="ViewProductAndStockResult">
<include refid="selectViewProductAndStockVo"/>
<where>
<if test="onlyIdentity != null "> and only_identity = #{onlyIdentity}</if>
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</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="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="distribution != null and distribution != ''"> and distribution like concat('%', #{distribution}, '%')</if>
<if test="orderId != null and orderId != ''"> and order_id like concat('%', #{orderId}, '%')</if>
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
<if test="price != null and price != ''"> and price = #{price}</if>
<if test="cargoNo != null and cargoNo != ''"> and cargo_no like concat('%', #{cargoNo}, '%')</if>
<if test="productStatus != null and productStatus != ''"> and product_status = #{productStatus}</if>
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if>
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
<if test="createSys != null and createSys != ''"> and create_sys like concat('%', #{createSys}, '%')</if>
<if test="spec != null and spec != ''"> and spec like concat('%', #{spec}, '%')</if>
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
</where>
</select>
<select id="selectViewProductAndStockByOnlyIdentity" parameterType="Long" resultMap="ViewProductAndStockResult">
<include refid="selectViewProductAndStockVo"/>
where only_identity = #{onlyIdentity}
</select>
<insert id="insertViewProductAndStock" parameterType="ViewProductAndStock">
insert into view_product_and_stock
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="onlyIdentity != null">only_identity,</if>
<if test="productId != null">product_id,</if>
<if test="lotNo != null">lot_no,</if>
<if test="productName != null">product_name,</if>
<if test="quantity != null">quantity,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="spare1 != null">spare1,</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="voltage != null">voltage,</if>
<if test="power != null">power,</if>
<if test="phase != null">phase,</if>
<if test="distribution != null">distribution,</if>
<if test="orderId != null">order_id,</if>
<if test="spare8 != null">spare8,</if>
<if test="price != null">price,</if>
<if test="cargoNo != null">cargo_no,</if>
<if test="productStatus != null">product_status,</if>
<if test="parentId != null">parent_id,</if>
<if test="spare7 != null">spare7,</if>
<if test="createTime != null">create_time,</if>
<if test="createSys != null">create_sys,</if>
<if test="spec != null">spec,</if>
<if test="unit != null">unit,</if>
<if test="supplierName != null">supplier_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="onlyIdentity != null">#{onlyIdentity},</if>
<if test="productId != null">#{productId},</if>
<if test="lotNo != null">#{lotNo},</if>
<if test="productName != null">#{productName},</if>
<if test="quantity != null">#{quantity},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="spare1 != null">#{spare1},</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="voltage != null">#{voltage},</if>
<if test="power != null">#{power},</if>
<if test="phase != null">#{phase},</if>
<if test="distribution != null">#{distribution},</if>
<if test="orderId != null">#{orderId},</if>
<if test="spare8 != null">#{spare8},</if>
<if test="price != null">#{price},</if>
<if test="cargoNo != null">#{cargoNo},</if>
<if test="productStatus != null">#{productStatus},</if>
<if test="parentId != null">#{parentId},</if>
<if test="spare7 != null">#{spare7},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createSys != null">#{createSys},</if>
<if test="spec != null">#{spec},</if>
<if test="unit != null">#{unit},</if>
<if test="supplierName != null">#{supplierName},</if>
</trim>
</insert>
<update id="updateViewProductAndStock" parameterType="ViewProductAndStock">
update view_product_and_stock
<trim prefix="SET" suffixOverrides=",">
<if test="productId != null">product_id = #{productId},</if>
<if test="lotNo != null">lot_no = #{lotNo},</if>
<if test="productName != null">product_name = #{productName},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="spare1 != null">spare1 = #{spare1},</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="voltage != null">voltage = #{voltage},</if>
<if test="power != null">power = #{power},</if>
<if test="phase != null">phase = #{phase},</if>
<if test="distribution != null">distribution = #{distribution},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="spare8 != null">spare8 = #{spare8},</if>
<if test="price != null">price = #{price},</if>
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
<if test="productStatus != null">product_status = #{productStatus},</if>
<if test="parentId != null">parent_id = #{parentId},</if>
<if test="spare7 != null">spare7 = #{spare7},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createSys != null">create_sys = #{createSys},</if>
<if test="spec != null">spec = #{spec},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="supplierName != null">supplier_name = #{supplierName},</if>
</trim>
where only_identity = #{onlyIdentity}
</update>
<delete id="deleteViewProductAndStockByOnlyIdentity" parameterType="Long">
delete from view_product_and_stock where only_identity = #{onlyIdentity}
</delete>
<delete id="deleteViewProductAndStockByOnlyIdentitys" parameterType="String">
delete from view_product_and_stock where only_identity in
<foreach item="onlyIdentity" collection="array" open="(" separator="," close=")">
#{onlyIdentity}
</foreach>
</delete>
</mapper>