空托盘入库

This commit is contained in:
liuhanqing
2025-10-27 15:13:02 +08:00
parent be56b3be9d
commit b7c7597193
11 changed files with 1000 additions and 1908 deletions

View File

@@ -5,445 +5,179 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.search.ViewStockinHistory.mapper.ViewStockinHistoryMapper">
<resultMap type="ViewStockinHistory" id="ViewStockinHistoryResult">
<result property="stockinGuid" column="stockin_guid" />
<result property="stockinId" column="stockin_id" />
<result property="inType" column="in_type" />
<result property="createDate" column="create_date" />
<result property="createManId" column="create_man_id" />
<result property="status" column="status" />
<result property="warehouseId" column="warehouse_id" />
<result property="finishDate" column="finish_date" />
<result property="erpBill" column="erp_bill" />
<result property="stockSource" column="stock_source" />
<result property="departmentNo" column="department_no" />
<result property="classNo" column="class_no" />
<result property="stockinDetailId" column="stockin_detail_id" />
<result property="productId" column="product_id" />
<result property="productName" column="product_name" />
<result property="spec" column="spec" />
<result property="cargoNo" column="cargo_no" />
<result property="productType" column="productType" />
<result property="quantity" column="quantity" />
<result property="scanNum" column="scan_num" />
<result property="assignNum" column="assign_num" />
<result property="unit" column="unit" />
<result property="price" column="price" />
<result property="priceTotal" column="priceTotal" />
<result property="supplierNo" column="supplier_no" />
<result property="supplierName" column="supplier_name" />
<result property="simpleName" column="simple_name" />
<result property="contactName" column="contact_name" />
<result property="contactNumber" column="contact_number" />
<result property="address" column="address" />
<result property="stockinDetailId" column="stockin_detail_id" />
<result property="lotNo" column="lot_no" />
<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="scanNum" column="scan_num" />
<result property="scanNumX" column="scan_num_x" />
<result property="scanNumJ" column="scan_num_j" />
<result property="printDate" column="print_date" />
<result property="stockStatus" column="stock_status" />
<result property="productGuid" column="product_guid" />
<result property="productId" column="product_id" />
<result property="parentId" column="parent_id" />
<result property="price" column="price" />
<result property="cargoNo" column="cargo_no" />
<result property="unit" column="unit" />
<result property="spec" column="spec" />
<result property="spare6" column="spare6" />
<result property="spare5" column="spare5" />
<result property="spare7" column="spare7" />
<result property="spare3" column="spare3" />
<result property="createManId" column="create_man_id" />
<result property="createDate" column="create_date" />
<result property="status" column="status" />
<result property="spare8" column="spare8" />
<result property="remark" column="remark" />
<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="productName" column="product_name" />
<result property="spare7" column="spare7" />
<result property="spare8" column="spare8" />
<result property="spare9" column="spare9" />
<result property="spare10" column="spare10" />
<result property="spare11" column="spare11" />
<result property="spare12" column="spare12" />
<result property="spare13" column="spare13" />
<result property="spare14" column="spare14" />
<result property="spare15" column="spare15" />
<result property="spare16" column="spare16" />
<result property="spare17" column="spare17" />
<result property="spare18" column="spare18" />
<result property="spare19" column="spare19" />
<result property="spare20" column="spare20" />
<result property="spare21" column="spare21" />
<result property="spare22" column="spare22" />
<result property="spare23" column="spare23" />
<result property="spare24" column="spare24" />
<result property="spare25" column="spare25" />
<result property="spare26" column="spare26" />
<result property="spare27" column="spare27" />
<result property="spare28" column="spare28" />
<result property="spare29" column="spare29" />
<result property="spare30" column="spare30" />
<result property="spare31" column="spare31" />
<result property="spare32" column="spare32" />
<result property="spare33" column="spare33" />
<result property="spare34" column="spare34" />
<result property="spare35" column="spare35" />
<result property="spare36" column="spare36" />
<result property="spare37" column="spare37" />
<result property="spare38" column="spare38" />
<result property="spare39" column="spare39" />
<result property="warehouseName" column="warehouse_name" />
<result property="spare2" column="spare2" />
</resultMap>
<sql id="selectViewStockinHistoryVo">
select stockin_guid, stockin_id, in_type, create_date, create_man_id, status, warehouse_id, finish_date, erp_bill, stock_source, department_no, class_no, supplier_no, supplier_name, simple_name, contact_name, contact_number, address, stockin_detail_id, lot_no, quantity, quantity_x, quantity_j, assign_num, assign_num_x, assign_num_j, scan_num, scan_num_x, scan_num_j, print_date, stock_status, product_guid, product_id, parent_id, price, cargo_no, unit, spec, remark, spare1, spare2, spare3, spare4, spare5, spare6, product_name, spare7, spare8, spare9, spare10, spare11, spare12, spare13, spare14, spare15, spare16, spare17, spare18, spare19, spare20, spare21, spare22, spare23, spare24, spare25, spare26, spare27, spare28, spare29, spare30, spare31, spare32, spare33, spare34, spare35, spare36, spare37, spare38, spare39, warehouse_name from view_stockin_history
select stockin_id, stockin_detail_id, product_id, product_name, spec, cargo_no, productType, quantity, scan_num, assign_num, unit, price, priceTotal, supplier_no, supplier_name, spare6, spare5, spare7, spare3, create_man_id, create_date, status, spare8, remark, spare1, spare4, spare2 from view_stockin_history
</sql>
<select id="selectViewStockinHistoryList" parameterType="ViewStockinHistory" resultMap="ViewStockinHistoryResult">
<include refid="selectViewStockinHistoryVo"/>
<where>
<if test="stockinGuid != null and stockinGuid != ''"> and stockin_guid like concat('%', #{stockinGuid}, '%')</if>
<if test="stockinId != null and stockinId != ''"> and stockin_id like concat('%', #{stockinId}, '%')</if>
<if test="inType != null and inType != ''"> and in_type = #{inType}</if>
<if test="createDate != null and createDate != ''"> and create_date like concat('%', #{createDate}, '%')</if>
<if test="createManId != null and createManId != ''"> and create_man_id like concat('%', #{createManId}, '%')</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id like concat('%', #{warehouseId}, '%')</if>
<if test="finishDate != null and finishDate != ''"> and finish_date like concat('%', #{finishDate}, '%')</if>
<if test="erpBill != null and erpBill != ''"> and erp_bill like concat('%', #{erpBill}, '%')</if>
<if test="stockSource != null and stockSource != ''"> and stock_source like concat('%', #{stockSource}, '%')</if>
<if test="departmentNo != null and departmentNo != ''"> and department_no like concat('%', #{departmentNo}, '%')</if>
<if test="classNo != null and classNo != ''"> and class_no like concat('%', #{classNo}, '%')</if>
<if test="supplierNo != null and supplierNo != ''"> and supplier_no like concat('%', #{supplierNo}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="simpleName != null and simpleName != ''"> and simple_name like concat('%', #{simpleName}, '%')</if>
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
<if test="contactNumber != null and contactNumber != ''"> and contact_number like concat('%', #{contactNumber}, '%')</if>
<if test="address != null and address != ''"> and address like concat('%', #{address}, '%')</if>
<if test="stockinDetailId != null and stockinDetailId != ''"> and stockin_detail_id like concat('%', #{stockinDetailId}, '%')</if>
<if test="lotNo != null and lotNo != ''"> and lot_no like concat('%', #{lotNo}, '%')</if>
<if test="quantity != null and quantity != ''"> and quantity like concat('%', #{quantity}, '%')</if>
<if test="quantityX != null and quantityX != ''"> and quantity_x like concat('%', #{quantityX}, '%')</if>
<if test="quantityJ != null and quantityJ != ''"> and quantity_j like concat('%', #{quantityJ}, '%')</if>
<if test="assignNum != null and assignNum != ''"> and assign_num like concat('%', #{assignNum}, '%')</if>
<if test="assignNumX != null and assignNumX != ''"> and assign_num_x like concat('%', #{assignNumX}, '%')</if>
<if test="assignNumJ != null and assignNumJ != ''"> and assign_num_j like concat('%', #{assignNumJ}, '%')</if>
<if test="scanNum != null and scanNum != ''"> and scan_num like concat('%', #{scanNum}, '%')</if>
<if test="scanNumX != null and scanNumX != ''"> and scan_num_x like concat('%', #{scanNumX}, '%')</if>
<if test="scanNumJ != null and scanNumJ != ''"> and scan_num_j like concat('%', #{scanNumJ}, '%')</if>
<if test="printDate != null and printDate != ''"> and print_date like concat('%', #{printDate}, '%')</if>
<if test="stockStatus != null and stockStatus != ''"> and stock_status = #{stockStatus}</if>
<if test="productGuid != null and productGuid != ''"> and product_guid like concat('%', #{productGuid}, '%')</if>
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
<if test="parentId != null and parentId != ''"> and parent_id like concat('%', #{parentId}, '%')</if>
<if test="price != null and price != ''"> and price like concat('%', #{price}, '%')</if>
<if test="cargoNo != null and cargoNo != ''"> and cargo_no like concat('%', #{cargoNo}, '%')</if>
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
<if test="spec != null and spec != ''"> and spec like concat('%', #{spec}, '%')</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and spare3 like concat('%', #{spare3}, '%')</if>
<if test="spare4 != null and spare4 != ''"> and spare4 like concat('%', #{spare4}, '%')</if>
<if test="spare5 != null and spare5 != ''"> and spare5 like concat('%', #{spare5}, '%')</if>
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
<if test="stockinDetailId != null and stockinDetailId != ''"> and stockin_detail_id = #{stockinDetailId}</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="spare7 != null and spare7 != ''"> and spare7 like concat('%', #{spare7}, '%')</if>
<if test="spare8 != null and spare8 != ''"> and spare8 like concat('%', #{spare8}, '%')</if>
<if test="spare9 != null and spare9 != ''"> and spare9 like concat('%', #{spare9}, '%')</if>
<if test="spare10 != null and spare10 != ''"> and spare10 like concat('%', #{spare10}, '%')</if>
<if test="spare11 != null and spare11 != ''"> and spare11 like concat('%', #{spare11}, '%')</if>
<if test="spare12 != null and spare12 != ''"> and spare12 like concat('%', #{spare12}, '%')</if>
<if test="spare13 != null and spare13 != ''"> and spare13 like concat('%', #{spare13}, '%')</if>
<if test="spare14 != null and spare14 != ''"> and spare14 like concat('%', #{spare14}, '%')</if>
<if test="spare15 != null and spare15 != ''"> and spare15 like concat('%', #{spare15}, '%')</if>
<if test="spare16 != null and spare16 != ''"> and spare16 like concat('%', #{spare16}, '%')</if>
<if test="spare17 != null and spare17 != ''"> and spare17 like concat('%', #{spare17}, '%')</if>
<if test="spare18 != null and spare18 != ''"> and spare18 like concat('%', #{spare18}, '%')</if>
<if test="spare19 != null and spare19 != ''"> and spare19 like concat('%', #{spare19}, '%')</if>
<if test="spare20 != null and spare20 != ''"> and spare20 like concat('%', #{spare20}, '%')</if>
<if test="spare21 != null and spare21 != ''"> and spare21 like concat('%', #{spare21}, '%')</if>
<if test="spare22 != null and spare22 != ''"> and spare22 like concat('%', #{spare22}, '%')</if>
<if test="spare23 != null and spare23 != ''"> and spare23 like concat('%', #{spare23}, '%')</if>
<if test="spare24 != null and spare24 != ''"> and spare24 like concat('%', #{spare24}, '%')</if>
<if test="spare25 != null and spare25 != ''"> and spare25 like concat('%', #{spare25}, '%')</if>
<if test="spare26 != null and spare26 != ''"> and spare26 like concat('%', #{spare26}, '%')</if>
<if test="spare27 != null and spare27 != ''"> and spare27 like concat('%', #{spare27}, '%')</if>
<if test="spare28 != null and spare28 != ''"> and spare28 like concat('%', #{spare28}, '%')</if>
<if test="spare29 != null and spare29 != ''"> and spare29 like concat('%', #{spare29}, '%')</if>
<if test="spare30 != null and spare30 != ''"> and spare30 like concat('%', #{spare30}, '%')</if>
<if test="spare31 != null and spare31 != ''"> and spare31 like concat('%', #{spare31}, '%')</if>
<if test="spare32 != null and spare32 != ''"> and spare32 like concat('%', #{spare32}, '%')</if>
<if test="spare33 != null and spare33 != ''"> and spare33 like concat('%', #{spare33}, '%')</if>
<if test="spare34 != null and spare34 != ''"> and spare34 like concat('%', #{spare34}, '%')</if>
<if test="spare35 != null and spare35 != ''"> and spare35 like concat('%', #{spare35}, '%')</if>
<if test="spare36 != null and spare36 != ''"> and spare36 like concat('%', #{spare36}, '%')</if>
<if test="spare37 != null and spare37 != ''"> and spare37 like concat('%', #{spare37}, '%')</if>
<if test="spare38 != null and spare38 != ''"> and spare38 like concat('%', #{spare38}, '%')</if>
<if test="spare39 != null and spare39 != ''"> and spare39 like concat('%', #{spare39}, '%')</if>
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
<if test="spec != null and spec != ''"> and spec = #{spec}</if>
<if test="cargoNo != null and cargoNo != ''"> and cargo_no = #{cargoNo}</if>
<if test="productType != null and productType != ''"> and productType = #{productType}</if>
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
<if test="scanNum != null and scanNum != ''"> and scan_num = #{scanNum}</if>
<if test="assignNum != null and assignNum != ''"> and assign_num = #{assignNum}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="price != null and price != ''"> and price = #{price}</if>
<if test="priceTotal != null and priceTotal != ''"> and priceTotal = #{priceTotal}</if>
<if test="supplierNo != null and supplierNo != ''"> and supplier_no = #{supplierNo}</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
</where>
</select>
<select id="selectViewStockinHistoryByStockinGuid" parameterType="String" resultMap="ViewStockinHistoryResult">
<select id="selectViewStockinHistoryByStockinId" parameterType="String" resultMap="ViewStockinHistoryResult">
<include refid="selectViewStockinHistoryVo"/>
where stockin_guid = #{stockinGuid}
where stockin_id = #{stockinId}
</select>
<insert id="insertViewStockinHistory" parameterType="ViewStockinHistory">
insert into view_stockin_history
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockinGuid != null and stockinGuid != ''">stockin_guid,</if>
<if test="stockinId != null">stockin_id,</if>
<if test="inType != null">in_type,</if>
<if test="createDate != null">create_date,</if>
<if test="createManId != null">create_man_id,</if>
<if test="status != null">status,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="finishDate != null">finish_date,</if>
<if test="erpBill != null">erp_bill,</if>
<if test="stockSource != null">stock_source,</if>
<if test="departmentNo != null">department_no,</if>
<if test="classNo != null">class_no,</if>
<if test="stockinId != null and stockinId != ''">stockin_id,</if>
<if test="stockinDetailId != null">stockin_detail_id,</if>
<if test="productId != null">product_id,</if>
<if test="productName != null">product_name,</if>
<if test="spec != null">spec,</if>
<if test="cargoNo != null">cargo_no,</if>
<if test="productType != null">productType,</if>
<if test="quantity != null">quantity,</if>
<if test="scanNum != null">scan_num,</if>
<if test="assignNum != null">assign_num,</if>
<if test="unit != null">unit,</if>
<if test="price != null">price,</if>
<if test="priceTotal != null">priceTotal,</if>
<if test="supplierNo != null">supplier_no,</if>
<if test="supplierName != null">supplier_name,</if>
<if test="simpleName != null">simple_name,</if>
<if test="contactName != null">contact_name,</if>
<if test="contactNumber != null">contact_number,</if>
<if test="address != null">address,</if>
<if test="stockinDetailId != null">stockin_detail_id,</if>
<if test="lotNo != null">lot_no,</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="scanNum != null">scan_num,</if>
<if test="scanNumX != null">scan_num_x,</if>
<if test="scanNumJ != null">scan_num_j,</if>
<if test="printDate != null">print_date,</if>
<if test="stockStatus != null">stock_status,</if>
<if test="productGuid != null">product_guid,</if>
<if test="productId != null">product_id,</if>
<if test="parentId != null">parent_id,</if>
<if test="price != null">price,</if>
<if test="cargoNo != null">cargo_no,</if>
<if test="unit != null">unit,</if>
<if test="spec != null">spec,</if>
<if test="spare6 != null">spare6,</if>
<if test="spare5 != null">spare5,</if>
<if test="spare7 != null">spare7,</if>
<if test="spare3 != null">spare3,</if>
<if test="createManId != null">create_man_id,</if>
<if test="createDate != null and createDate != ''">create_date,</if>
<if test="status != null and status != ''">status,</if>
<if test="spare8 != null">spare8,</if>
<if test="remark != null">remark,</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="productName != null">product_name,</if>
<if test="spare7 != null">spare7,</if>
<if test="spare8 != null">spare8,</if>
<if test="spare9 != null">spare9,</if>
<if test="spare10 != null">spare10,</if>
<if test="spare11 != null">spare11,</if>
<if test="spare12 != null">spare12,</if>
<if test="spare13 != null">spare13,</if>
<if test="spare14 != null">spare14,</if>
<if test="spare15 != null">spare15,</if>
<if test="spare16 != null">spare16,</if>
<if test="spare17 != null">spare17,</if>
<if test="spare18 != null">spare18,</if>
<if test="spare19 != null">spare19,</if>
<if test="spare20 != null">spare20,</if>
<if test="spare21 != null">spare21,</if>
<if test="spare22 != null">spare22,</if>
<if test="spare23 != null">spare23,</if>
<if test="spare24 != null">spare24,</if>
<if test="spare25 != null">spare25,</if>
<if test="spare26 != null">spare26,</if>
<if test="spare27 != null">spare27,</if>
<if test="spare28 != null">spare28,</if>
<if test="spare29 != null">spare29,</if>
<if test="spare30 != null">spare30,</if>
<if test="spare31 != null">spare31,</if>
<if test="spare32 != null">spare32,</if>
<if test="spare33 != null">spare33,</if>
<if test="spare34 != null">spare34,</if>
<if test="spare35 != null">spare35,</if>
<if test="spare36 != null">spare36,</if>
<if test="spare37 != null">spare37,</if>
<if test="spare38 != null">spare38,</if>
<if test="spare39 != null">spare39,</if>
<if test="warehouseName != null">warehouse_name,</if>
<if test="spare2 != null">spare2,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockinGuid != null and stockinGuid != ''">#{stockinGuid},</if>
<if test="stockinId != null">#{stockinId},</if>
<if test="inType != null">#{inType},</if>
<if test="createDate != null">#{createDate},</if>
<if test="createManId != null">#{createManId},</if>
<if test="status != null">#{status},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="finishDate != null">#{finishDate},</if>
<if test="erpBill != null">#{erpBill},</if>
<if test="stockSource != null">#{stockSource},</if>
<if test="departmentNo != null">#{departmentNo},</if>
<if test="classNo != null">#{classNo},</if>
<if test="stockinId != null and stockinId != ''">#{stockinId},</if>
<if test="stockinDetailId != null">#{stockinDetailId},</if>
<if test="productId != null">#{productId},</if>
<if test="productName != null">#{productName},</if>
<if test="spec != null">#{spec},</if>
<if test="cargoNo != null">#{cargoNo},</if>
<if test="productType != null">#{productType},</if>
<if test="quantity != null">#{quantity},</if>
<if test="scanNum != null">#{scanNum},</if>
<if test="assignNum != null">#{assignNum},</if>
<if test="unit != null">#{unit},</if>
<if test="price != null">#{price},</if>
<if test="priceTotal != null">#{priceTotal},</if>
<if test="supplierNo != null">#{supplierNo},</if>
<if test="supplierName != null">#{supplierName},</if>
<if test="simpleName != null">#{simpleName},</if>
<if test="contactName != null">#{contactName},</if>
<if test="contactNumber != null">#{contactNumber},</if>
<if test="address != null">#{address},</if>
<if test="stockinDetailId != null">#{stockinDetailId},</if>
<if test="lotNo != null">#{lotNo},</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="scanNum != null">#{scanNum},</if>
<if test="scanNumX != null">#{scanNumX},</if>
<if test="scanNumJ != null">#{scanNumJ},</if>
<if test="printDate != null">#{printDate},</if>
<if test="stockStatus != null">#{stockStatus},</if>
<if test="productGuid != null">#{productGuid},</if>
<if test="productId != null">#{productId},</if>
<if test="parentId != null">#{parentId},</if>
<if test="price != null">#{price},</if>
<if test="cargoNo != null">#{cargoNo},</if>
<if test="unit != null">#{unit},</if>
<if test="spec != null">#{spec},</if>
<if test="spare6 != null">#{spare6},</if>
<if test="spare5 != null">#{spare5},</if>
<if test="spare7 != null">#{spare7},</if>
<if test="spare3 != null">#{spare3},</if>
<if test="createManId != null">#{createManId},</if>
<if test="createDate != null and createDate != ''">#{createDate},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="spare8 != null">#{spare8},</if>
<if test="remark != null">#{remark},</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="productName != null">#{productName},</if>
<if test="spare7 != null">#{spare7},</if>
<if test="spare8 != null">#{spare8},</if>
<if test="spare9 != null">#{spare9},</if>
<if test="spare10 != null">#{spare10},</if>
<if test="spare11 != null">#{spare11},</if>
<if test="spare12 != null">#{spare12},</if>
<if test="spare13 != null">#{spare13},</if>
<if test="spare14 != null">#{spare14},</if>
<if test="spare15 != null">#{spare15},</if>
<if test="spare16 != null">#{spare16},</if>
<if test="spare17 != null">#{spare17},</if>
<if test="spare18 != null">#{spare18},</if>
<if test="spare19 != null">#{spare19},</if>
<if test="spare20 != null">#{spare20},</if>
<if test="spare21 != null">#{spare21},</if>
<if test="spare22 != null">#{spare22},</if>
<if test="spare23 != null">#{spare23},</if>
<if test="spare24 != null">#{spare24},</if>
<if test="spare25 != null">#{spare25},</if>
<if test="spare26 != null">#{spare26},</if>
<if test="spare27 != null">#{spare27},</if>
<if test="spare28 != null">#{spare28},</if>
<if test="spare29 != null">#{spare29},</if>
<if test="spare30 != null">#{spare30},</if>
<if test="spare31 != null">#{spare31},</if>
<if test="spare32 != null">#{spare32},</if>
<if test="spare33 != null">#{spare33},</if>
<if test="spare34 != null">#{spare34},</if>
<if test="spare35 != null">#{spare35},</if>
<if test="spare36 != null">#{spare36},</if>
<if test="spare37 != null">#{spare37},</if>
<if test="spare38 != null">#{spare38},</if>
<if test="spare39 != null">#{spare39},</if>
<if test="warehouseName != null">#{warehouseName},</if>
<if test="spare2 != null">#{spare2},</if>
</trim>
</insert>
<update id="updateViewStockinHistory" parameterType="ViewStockinHistory">
update view_stockin_history
<trim prefix="SET" suffixOverrides=",">
<if test="stockinId != null">stockin_id = #{stockinId},</if>
<if test="inType != null">in_type = #{inType},</if>
<if test="createDate != null">create_date = #{createDate},</if>
<if test="createManId != null">create_man_id = #{createManId},</if>
<if test="status != null">status = #{status},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="finishDate != null">finish_date = #{finishDate},</if>
<if test="erpBill != null">erp_bill = #{erpBill},</if>
<if test="stockSource != null">stock_source = #{stockSource},</if>
<if test="departmentNo != null">department_no = #{departmentNo},</if>
<if test="classNo != null">class_no = #{classNo},</if>
<if test="stockinDetailId != null">stockin_detail_id = #{stockinDetailId},</if>
<if test="productId != null">product_id = #{productId},</if>
<if test="productName != null">product_name = #{productName},</if>
<if test="spec != null">spec = #{spec},</if>
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
<if test="productType != null">productType = #{productType},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="scanNum != null">scan_num = #{scanNum},</if>
<if test="assignNum != null">assign_num = #{assignNum},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="price != null">price = #{price},</if>
<if test="priceTotal != null">priceTotal = #{priceTotal},</if>
<if test="supplierNo != null">supplier_no = #{supplierNo},</if>
<if test="supplierName != null">supplier_name = #{supplierName},</if>
<if test="simpleName != null">simple_name = #{simpleName},</if>
<if test="contactName != null">contact_name = #{contactName},</if>
<if test="contactNumber != null">contact_number = #{contactNumber},</if>
<if test="address != null">address = #{address},</if>
<if test="stockinDetailId != null">stockin_detail_id = #{stockinDetailId},</if>
<if test="lotNo != null">lot_no = #{lotNo},</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="scanNum != null">scan_num = #{scanNum},</if>
<if test="scanNumX != null">scan_num_x = #{scanNumX},</if>
<if test="scanNumJ != null">scan_num_j = #{scanNumJ},</if>
<if test="printDate != null">print_date = #{printDate},</if>
<if test="stockStatus != null">stock_status = #{stockStatus},</if>
<if test="productGuid != null">product_guid = #{productGuid},</if>
<if test="productId != null">product_id = #{productId},</if>
<if test="parentId != null">parent_id = #{parentId},</if>
<if test="price != null">price = #{price},</if>
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="spec != null">spec = #{spec},</if>
<if test="spare6 != null">spare6 = #{spare6},</if>
<if test="spare5 != null">spare5 = #{spare5},</if>
<if test="spare7 != null">spare7 = #{spare7},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
<if test="createManId != null">create_man_id = #{createManId},</if>
<if test="createDate != null and createDate != ''">create_date = #{createDate},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="spare8 != null">spare8 = #{spare8},</if>
<if test="remark != null">remark = #{remark},</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="productName != null">product_name = #{productName},</if>
<if test="spare7 != null">spare7 = #{spare7},</if>
<if test="spare8 != null">spare8 = #{spare8},</if>
<if test="spare9 != null">spare9 = #{spare9},</if>
<if test="spare10 != null">spare10 = #{spare10},</if>
<if test="spare11 != null">spare11 = #{spare11},</if>
<if test="spare12 != null">spare12 = #{spare12},</if>
<if test="spare13 != null">spare13 = #{spare13},</if>
<if test="spare14 != null">spare14 = #{spare14},</if>
<if test="spare15 != null">spare15 = #{spare15},</if>
<if test="spare16 != null">spare16 = #{spare16},</if>
<if test="spare17 != null">spare17 = #{spare17},</if>
<if test="spare18 != null">spare18 = #{spare18},</if>
<if test="spare19 != null">spare19 = #{spare19},</if>
<if test="spare20 != null">spare20 = #{spare20},</if>
<if test="spare21 != null">spare21 = #{spare21},</if>
<if test="spare22 != null">spare22 = #{spare22},</if>
<if test="spare23 != null">spare23 = #{spare23},</if>
<if test="spare24 != null">spare24 = #{spare24},</if>
<if test="spare25 != null">spare25 = #{spare25},</if>
<if test="spare26 != null">spare26 = #{spare26},</if>
<if test="spare27 != null">spare27 = #{spare27},</if>
<if test="spare28 != null">spare28 = #{spare28},</if>
<if test="spare29 != null">spare29 = #{spare29},</if>
<if test="spare30 != null">spare30 = #{spare30},</if>
<if test="spare31 != null">spare31 = #{spare31},</if>
<if test="spare32 != null">spare32 = #{spare32},</if>
<if test="spare33 != null">spare33 = #{spare33},</if>
<if test="spare34 != null">spare34 = #{spare34},</if>
<if test="spare35 != null">spare35 = #{spare35},</if>
<if test="spare36 != null">spare36 = #{spare36},</if>
<if test="spare37 != null">spare37 = #{spare37},</if>
<if test="spare38 != null">spare38 = #{spare38},</if>
<if test="spare39 != null">spare39 = #{spare39},</if>
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
</trim>
where stockin_guid = #{stockinGuid}
where stockin_id = #{stockinId}
</update>
<delete id="deleteViewStockinHistoryByStockinGuid" parameterType="String">
delete from view_stockin_history where stockin_guid = #{stockinGuid}
<delete id="deleteViewStockinHistoryByStockinId" parameterType="String">
delete from view_stockin_history where stockin_id = #{stockinId}
</delete>
<delete id="deleteViewStockinHistoryByStockinGuids" parameterType="String">
delete from view_stockin_history where stockin_guid in
<foreach item="stockinGuid" collection="array" open="(" separator="," close=")">
#{stockinGuid}
<delete id="deleteViewStockinHistoryByStockinIds" parameterType="String">
delete from view_stockin_history where stockin_id in
<foreach item="stockinId" collection="array" open="(" separator="," close=")">
#{stockinId}
</foreach>
</delete>
</mapper>