出库确认

This commit is contained in:
猫猫guowen
2025-12-06 15:51:55 +08:00
parent 7883e2ab18
commit 0cff9b5af6
15 changed files with 1316 additions and 30 deletions

View File

@@ -0,0 +1,216 @@
<?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.ErpOutStockDetail.mapper.ErpOutStockDetailMapper">
<resultMap type="ErpOutStockDetail" id="ErpOutStockDetailResult">
<result property="id" column="id" />
<result property="productName" column="product_name" />
<result property="productCode" column="product_code" />
<result property="productModel" column="product_model" />
<result property="quantity" column="quantity" />
<result property="unitPrice" column="unit_price" />
<result property="totalPrice" column="total_price" />
<result property="auxiliaryQuantity" column="auxiliary_quantity" />
<result property="costUnitPrice" column="cost_unit_price" />
<result property="costTotalPrice" column="cost_total_price" />
<result property="accountingCostTotalPrice" column="accounting_cost_total_price" />
<result property="accountingQuantity" column="accounting_quantity" />
<result property="accountingStatus" column="accounting_status" />
<result property="batchNumber" column="batch_number" />
<result property="serialNumber" column="serial_number" />
<result property="productionDate" column="production_date" />
<result property="expiryDate" column="expiry_date" />
<result property="unitId" column="unit_id" />
<result property="productAttribute1" column="product_attribute1" />
<result property="productAttribute2" column="product_attribute2" />
<result property="remark" column="remark" />
<result property="packaging" column="packaging" />
<result property="packageCount" column="package_count" />
<result property="warehouseId" column="warehouse_id" />
<result property="storageLocationId" column="storage_location_id" />
<result property="parentInboundOrderId" column="parent_inbound_order_id" />
<result property="relatedDocumentId" column="related_document_id" />
<result property="customField1" column="custom_field1" />
<result property="customField2" column="custom_field2" />
<result property="customField3" column="custom_field3" />
<result property="customField4" column="custom_field4" />
<result property="customField5" column="custom_field5" />
<result property="customField6" column="custom_field6" />
<result property="handlerId" column="handler_id" />
</resultMap>
<sql id="selectErpOutStockDetailVo">
select id, product_name, product_code, product_model, quantity, unit_price, total_price, auxiliary_quantity, cost_unit_price, cost_total_price, accounting_cost_total_price, accounting_quantity, accounting_status, batch_number, serial_number, production_date, expiry_date, unit_id, product_attribute1, product_attribute2, remark, packaging, package_count, warehouse_id, storage_location_id, parent_inbound_order_id, related_document_id, custom_field1, custom_field2, custom_field3, custom_field4, custom_field5, custom_field6, handler_id from erp_out_stock_detail
</sql>
<select id="selectErpOutStockDetailList" parameterType="ErpOutStockDetail" resultMap="ErpOutStockDetailResult">
<include refid="selectErpOutStockDetailVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
<if test="productModel != null and productModel != ''"> and product_model = #{productModel}</if>
<if test="quantity != null "> and quantity = #{quantity}</if>
<if test="unitPrice != null "> and unit_price = #{unitPrice}</if>
<if test="totalPrice != null "> and total_price = #{totalPrice}</if>
<if test="auxiliaryQuantity != null "> and auxiliary_quantity = #{auxiliaryQuantity}</if>
<if test="costUnitPrice != null "> and cost_unit_price = #{costUnitPrice}</if>
<if test="costTotalPrice != null "> and cost_total_price = #{costTotalPrice}</if>
<if test="accountingCostTotalPrice != null "> and accounting_cost_total_price = #{accountingCostTotalPrice}</if>
<if test="accountingQuantity != null "> and accounting_quantity = #{accountingQuantity}</if>
<if test="accountingStatus != null "> and accounting_status = #{accountingStatus}</if>
<if test="batchNumber != null and batchNumber != ''"> and batch_number = #{batchNumber}</if>
<if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
<if test="productionDate != null and productionDate != ''"> and production_date = #{productionDate}</if>
<if test="expiryDate != null and expiryDate != ''"> and expiry_date = #{expiryDate}</if>
<if test="unitId != null "> and unit_id = #{unitId}</if>
<if test="productAttribute1 != null "> and product_attribute1 = #{productAttribute1}</if>
<if test="productAttribute2 != null "> and product_attribute2 = #{productAttribute2}</if>
<if test="packaging != null and packaging != ''"> and packaging = #{packaging}</if>
<if test="packageCount != null "> and package_count = #{packageCount}</if>
<if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if>
<if test="storageLocationId != null "> and storage_location_id = #{storageLocationId}</if>
<if test="parentInboundOrderId != null "> and parent_inbound_order_id = #{parentInboundOrderId}</if>
<if test="relatedDocumentId != null "> and related_document_id = #{relatedDocumentId}</if>
<if test="customField1 != null and customField1 != ''"> and custom_field1 = #{customField1}</if>
<if test="customField2 != null and customField2 != ''"> and custom_field2 = #{customField2}</if>
<if test="customField3 != null and customField3 != ''"> and custom_field3 = #{customField3}</if>
<if test="customField4 != null and customField4 != ''"> and custom_field4 = #{customField4}</if>
<if test="customField5 != null and customField5 != ''"> and custom_field5 = #{customField5}</if>
<if test="customField6 != null and customField6 != ''"> and custom_field6 = #{customField6}</if>
<if test="handlerId != null "> and handler_id = #{handlerId}</if>
</where>
</select>
<select id="selectErpOutStockDetailById" parameterType="Long" resultMap="ErpOutStockDetailResult">
<include refid="selectErpOutStockDetailVo"/>
where id = #{id}
</select>
<insert id="insertErpOutStockDetail" parameterType="ErpOutStockDetail" useGeneratedKeys="true" keyProperty="id">
insert into erp_out_stock_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="productName != null">product_name,</if>
<if test="productCode != null">product_code,</if>
<if test="productModel != null">product_model,</if>
<if test="quantity != null">quantity,</if>
<if test="unitPrice != null">unit_price,</if>
<if test="totalPrice != null">total_price,</if>
<if test="auxiliaryQuantity != null">auxiliary_quantity,</if>
<if test="costUnitPrice != null">cost_unit_price,</if>
<if test="costTotalPrice != null">cost_total_price,</if>
<if test="accountingCostTotalPrice != null">accounting_cost_total_price,</if>
<if test="accountingQuantity != null">accounting_quantity,</if>
<if test="accountingStatus != null">accounting_status,</if>
<if test="batchNumber != null">batch_number,</if>
<if test="serialNumber != null">serial_number,</if>
<if test="productionDate != null">production_date,</if>
<if test="expiryDate != null">expiry_date,</if>
<if test="unitId != null">unit_id,</if>
<if test="productAttribute1 != null">product_attribute1,</if>
<if test="productAttribute2 != null">product_attribute2,</if>
<if test="remark != null">remark,</if>
<if test="packaging != null">packaging,</if>
<if test="packageCount != null">package_count,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="storageLocationId != null">storage_location_id,</if>
<if test="parentInboundOrderId != null">parent_inbound_order_id,</if>
<if test="relatedDocumentId != null">related_document_id,</if>
<if test="customField1 != null">custom_field1,</if>
<if test="customField2 != null">custom_field2,</if>
<if test="customField3 != null">custom_field3,</if>
<if test="customField4 != null">custom_field4,</if>
<if test="customField5 != null">custom_field5,</if>
<if test="customField6 != null">custom_field6,</if>
<if test="handlerId != null">handler_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="productName != null">#{productName},</if>
<if test="productCode != null">#{productCode},</if>
<if test="productModel != null">#{productModel},</if>
<if test="quantity != null">#{quantity},</if>
<if test="unitPrice != null">#{unitPrice},</if>
<if test="totalPrice != null">#{totalPrice},</if>
<if test="auxiliaryQuantity != null">#{auxiliaryQuantity},</if>
<if test="costUnitPrice != null">#{costUnitPrice},</if>
<if test="costTotalPrice != null">#{costTotalPrice},</if>
<if test="accountingCostTotalPrice != null">#{accountingCostTotalPrice},</if>
<if test="accountingQuantity != null">#{accountingQuantity},</if>
<if test="accountingStatus != null">#{accountingStatus},</if>
<if test="batchNumber != null">#{batchNumber},</if>
<if test="serialNumber != null">#{serialNumber},</if>
<if test="productionDate != null">#{productionDate},</if>
<if test="expiryDate != null">#{expiryDate},</if>
<if test="unitId != null">#{unitId},</if>
<if test="productAttribute1 != null">#{productAttribute1},</if>
<if test="productAttribute2 != null">#{productAttribute2},</if>
<if test="remark != null">#{remark},</if>
<if test="packaging != null">#{packaging},</if>
<if test="packageCount != null">#{packageCount},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="storageLocationId != null">#{storageLocationId},</if>
<if test="parentInboundOrderId != null">#{parentInboundOrderId},</if>
<if test="relatedDocumentId != null">#{relatedDocumentId},</if>
<if test="customField1 != null">#{customField1},</if>
<if test="customField2 != null">#{customField2},</if>
<if test="customField3 != null">#{customField3},</if>
<if test="customField4 != null">#{customField4},</if>
<if test="customField5 != null">#{customField5},</if>
<if test="customField6 != null">#{customField6},</if>
<if test="handlerId != null">#{handlerId},</if>
</trim>
</insert>
<update id="updateErpOutStockDetail" parameterType="ErpOutStockDetail">
update erp_out_stock_detail
<trim prefix="SET" suffixOverrides=",">
<if test="productName != null">product_name = #{productName},</if>
<if test="productCode != null">product_code = #{productCode},</if>
<if test="productModel != null">product_model = #{productModel},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="unitPrice != null">unit_price = #{unitPrice},</if>
<if test="totalPrice != null">total_price = #{totalPrice},</if>
<if test="auxiliaryQuantity != null">auxiliary_quantity = #{auxiliaryQuantity},</if>
<if test="costUnitPrice != null">cost_unit_price = #{costUnitPrice},</if>
<if test="costTotalPrice != null">cost_total_price = #{costTotalPrice},</if>
<if test="accountingCostTotalPrice != null">accounting_cost_total_price = #{accountingCostTotalPrice},</if>
<if test="accountingQuantity != null">accounting_quantity = #{accountingQuantity},</if>
<if test="accountingStatus != null">accounting_status = #{accountingStatus},</if>
<if test="batchNumber != null">batch_number = #{batchNumber},</if>
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
<if test="productionDate != null">production_date = #{productionDate},</if>
<if test="expiryDate != null">expiry_date = #{expiryDate},</if>
<if test="unitId != null">unit_id = #{unitId},</if>
<if test="productAttribute1 != null">product_attribute1 = #{productAttribute1},</if>
<if test="productAttribute2 != null">product_attribute2 = #{productAttribute2},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="packaging != null">packaging = #{packaging},</if>
<if test="packageCount != null">package_count = #{packageCount},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="storageLocationId != null">storage_location_id = #{storageLocationId},</if>
<if test="parentInboundOrderId != null">parent_inbound_order_id = #{parentInboundOrderId},</if>
<if test="relatedDocumentId != null">related_document_id = #{relatedDocumentId},</if>
<if test="customField1 != null">custom_field1 = #{customField1},</if>
<if test="customField2 != null">custom_field2 = #{customField2},</if>
<if test="customField3 != null">custom_field3 = #{customField3},</if>
<if test="customField4 != null">custom_field4 = #{customField4},</if>
<if test="customField5 != null">custom_field5 = #{customField5},</if>
<if test="customField6 != null">custom_field6 = #{customField6},</if>
<if test="handlerId != null">handler_id = #{handlerId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteErpOutStockDetailById" parameterType="Long">
delete from erp_out_stock_detail where id = #{id}
</delete>
<delete id="deleteErpOutStockDetailByIds" parameterType="String">
delete from erp_out_stock_detail where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into out_stock_middle
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockoutId != null and stockoutId != ''">stockout_id,</if>
<if test="status != null and status != ''">status,</if>
<if test="status != null">status,</if>
<if test="createDate != null and createDate != ''">create_date,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
@@ -45,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockoutId != null and stockoutId != ''">#{stockoutId},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="status != null">#{status},</if>
<if test="createDate != null and createDate != ''">#{createDate},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
@@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateOutStockMiddle" parameterType="OutStockMiddle">
update out_stock_middle
<trim prefix="SET" suffixOverrides=",">
<if test="status != null and status != ''">status = #{status},</if>
<if test="status != null">status = #{status},</if>
<if test="createDate != null and createDate != ''">create_date = #{createDate},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>

View File

@@ -127,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="lotNo != null">lot_no,</if>
<if test="productGuid != null">product_guid,</if>
<if test="productId != null">product_id,</if>
<if test="productName != null">product_name,</if>
<if test="quantity != null">quantity,</if>
<if test="quantityX != null">quantity_x,</if>
<if test="quantityJ != null">quantity_j,</if>
@@ -151,7 +151,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
@@ -169,7 +168,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="lotNo != null">#{lotNo},</if>
<if test="productGuid != null">#{productGuid},</if>
<if test="productId != null">#{productId},</if>
<if test="productName != null">#{productName},</if>
<if test="quantity != null">#{quantity},</if>
<if test="quantityX != null">#{quantityX},</if>
<if test="quantityJ != null">#{quantityJ},</if>
@@ -214,6 +213,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="productName != null">product_name = #{productName},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="quantityX != null">quantity_x = #{quantityX},</if>
<if test="quantityJ != null">quantity_j = #{quantityJ},</if>