入库部分和接口

This commit is contained in:
张怡蓉
2026-01-05 16:09:50 +08:00
parent f5f4d1007a
commit 9ffd5c01a3
25 changed files with 504 additions and 202 deletions

View File

@@ -94,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
isd.assign_num, isd.assign_num_x, isd.assign_num_j, isd.print_date, isd.stock_status,
isd.supplier_id, isd.customer_id, isd.unit, isd.spec, isd.spare1, isd.spare2, isd.spare3, isd.spare4,
isd.spare5, isd.spare6, isd.scan_num, isd.scan_num_x, isd.scan_num_j,
bp.product_name,
isd.product_name,
isd.spare7,isd.spare8,isd.spare9
from in_stockin_detail_finish isd
left join bas_product bp on bp.product_id = isd.product_id

View File

@@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
isd.assign_num, isd.assign_num_x, isd.assign_num_j, isd.print_date, isd.stock_status,
isd.supplier_id, isd.customer_id, isd.unit, isd.spec, isd.spare1, isd.spare2, isd.spare3, isd.spare4,
isd.spare5, isd.spare6, isd.scan_num, isd.scan_num_x, isd.scan_num_j,
bp.product_name,
isd.product_name,
isd.spare7,isd.spare8,isd.spare9
from in_stockin_detail isd
left join bas_product bp on bp.product_id = isd.product_id
@@ -138,7 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare7 != null">spare7,</if>
<if test="spare8 != null">spare8,</if>
<if test="spare9 != null">spare9,</if>
<if test="spec != null">spec,</if>
<if test="scanNum != null">scan_num,</if>
<if test="scanNumX != null">scan_num_x,</if>
<if test="scanNumJ != null">scan_num_j,</if>
@@ -174,7 +174,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare7 != null">#{spare7},</if>
<if test="spare8 != null">#{spare8},</if>
<if test="spare9 != null">#{spare9},</if>
<if test="spec != null">#{spec},</if>
<if test="scanNum != null">#{scanNum},</if>
<if test="scanNumX != null">#{scanNumX},</if>
<if test="scanNumJ != null">#{scanNumJ},</if>

View File

@@ -110,6 +110,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectInStockinFinishVo"/>
where is2.stockin_guid = #{stockinGuid}
</select>
<select id="selectInStockinFinishByStockinId" parameterType="String" resultMap="InStockinFinishResult">
<include refid="selectInStockinFinishVo"/>
where is2.stockin_id = #{stockinId}
</select>
<select id="selectInStockinFinishListByInStockin" resultMap="InStockinResult">
<include refid="selectInStockinFinishVo"/>
<where>
@@ -135,7 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and is2.stockin_id in (
select distinct stockin_id from in_stockin_detail_finish isd
left join bas_product bp on isd.product_id = bp.product_id
where bp.product_name like concat('%',#{materialDesc},'%')
where isd.product_name like concat('%',#{materialDesc},'%')
)
</if>
<if test="lotNo !=null and lotNo!=''">

View File

@@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and is2.stockin_id in (
select distinct stockin_id from in_stockin_detail isd
left join bas_product bp on isd.product_id = bp.product_id
where bp.product_name like concat('%',#{materialDesc},'%')
where isd.product_name like concat('%',#{materialDesc},'%')
)
</if>
<if test="lotNo !=null and lotNo!=''">
@@ -111,6 +111,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where is2.stockin_guid = #{stockinGuid}
</select>
<select id="selectInStockinByStockinId" parameterType="String" resultMap="InStockinResult">
<include refid="selectInStockinVo"/>
where is2.stockin_id = #{stockinId}
</select>
<insert id="insertInStockin" parameterType="InStockin">
insert into in_stockin
<trim prefix="(" suffix=")" suffixOverrides=",">

View File

@@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="cargoSpaceName" column="cargo_space_name" />
<result property="targetCargoSpaceName" column="target_cargo_space_name" />
<result property="warehouseName" column="warehouse_name" />
<result property="departmentName" column="dept_name" />
</resultMap>
<sql id="selectMydoJobVo">
@@ -46,14 +46,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mj.exit_id, mj.class_id, mj.warehouse_id, mj.fault_flag,
bs.supplier_name as supplier_name, bc.customer_name as customer_name,
bcs.cargo_space_name as cargo_space_name, bcst.cargo_space_name as target_cargo_space_name,
bw.warehouse_name as warehouse_name,sd.dept_name
bw.warehouse_name as warehouse_name
from mydo_job mj
left join bas_supplier bs on mj.supplier_id = bs.id
left join bas_customer bc on mj.customer_id = bc.id
left join bas_cargo_space bcs on mj.cargo_space_id = bcs.cargo_space_id
left join bas_cargo_space bcst on mj.target_cargo_space_id = bcst.cargo_space_id
left join bas_warehouse bw on mj.warehouse_id = bw.warehouse_id
left join sys_dept sd on mj.department_id = sd.dept_id
</sql>

View File

@@ -33,18 +33,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="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="spare7" column="spare7" />
<result property="spare8" column="spare8" />
<result property="spare9" column="spare9" />
</resultMap>
@@ -52,9 +49,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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
d.erp_stockout_id, d.unit, d.spec,
d.product_name ,d.spare1, d.spare2, d.spare3, d.spare4,d.spare5, d.spare6,d.spare7,d.spare8,d.spare9
from out_stockout_detail d
</sql>
@@ -88,17 +84,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
<if test="spare1 != null and spare1 != ''"> and isd.spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and isd.spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and isd.spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and isd.spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and isd.spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and isd.spare6 = #{spare6}</if>
<if test="spare7 != null and spare7 != ''"> and isd.spare7 = #{spare7}</if>
<if test="spare8 != null and spare8 != ''"> and isd.spare8 = #{spare8}</if>
<if test="spare9 != null and spare9 != ''"> and isd.spare9 = #{spare9}</if>
</where>
</select>
@@ -138,61 +132,56 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="createTime != null">create_time,</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>
<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="spare7 != null">spare7,</if>
<if test="spare8 != null">spare8,</if>
<if test="spare9 != null">spare9,</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="productName != null">#{productName},</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="createTime != null">#{createTime},</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>
<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="productName != null">#{productName},</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="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="spare7 != null">#{spare7},</if>
<if test="spare8 != null">#{spare8},</if>
<if test="spare9 != null">#{spare9},</if>
</trim>
</insert>
<update id="updateOutStockoutDetail" parameterType="OutStockoutDetail">
@@ -224,18 +213,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
<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="spare7 != null">spare7 = #{spare7},</if>
<if test="spare8 != null">spare8 = #{spare8},</if>
<if test="spare9 != null">spare9 = #{spare9},</if>
</trim>
where stockout_detail_id = #{stockoutDetailId}
</update>
@@ -255,9 +242,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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,
p.product_name
d.erp_stockout_id, d.unit, d.spec,
p.product_name,d.spare1, d.spare2, d.spare3, d.spare4,d.spare5, d.spare6,d.spare7,d.spare8,d.spare9
from out_stockout_detail d left join bas_product p on d.product_id = p.product_id
where d.stockout_guid = #{stockoutGuid}
</select>

View File

@@ -24,15 +24,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="finishDate" column="finish_date" />
<result property="warehouseName" column="warehouse_name" />
<result property="customerName" column="customer_name" />
<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" />
</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 from out_stockout
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,spare1,spare2,spare3,spare4,spare5 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.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 from out_stockout o
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.spare1,o.spare2,o.spare3,o.spare4,o.spare5 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
@@ -57,6 +62,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productId != null and productId != ''"> and d.product_id = #{productId}</if>
<if test="productName != null and productName != ''"> and d.product_name like concat('%', #{productName}, '%')</if>
<if test="customerName != null and customerName != ''"> and bc.customer_name like concat('%', #{customerName}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and is2.spare1 like concat('%', #{spare1},'%')</if>
<if test="spare2 != null and spare2 != ''"> and is2.spare2 like concat('%', #{spare2},'%')</if>
<if test="spare4 != null and spare4 != ''"> and is2.spare4 = #{spare4}</if>
<if test="spare3 != null and spare3 != ''"> and is2.spare3 = #{spare3}</if>
<if test="spare5 != null and spare5 != ''"> and is2.spare5 = #{spare5}</if>
</where>
order by o.create_date desc
</select>
@@ -84,6 +95,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="carNumber != null">car_number,</if>
<if test="FID != null">FID,</if>
<if test="erpStockoutId != null">erp_stockout_id,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare4 != null">spare4,</if>
<if test="spare3 != null">spare3,</if>
<if test="spare5 != null">spare5,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockoutGuid != null and stockoutGuid != ''">#{stockoutGuid},</if>
@@ -101,6 +117,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="carNumber != null">#{carNumber},</if>
<if test="FID != null">#{FID},</if>
<if test="erpStockoutId != null">#{erpStockoutId},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare4 != null">#{spare4},</if>
<if test="spare3 != null">#{spare3},</if>
<if test="spare5 != null">#{spare5},</if>
</trim>
</insert>
@@ -123,6 +144,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare4 != null">spare4 = #{spare4},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
<if test="spare5 != null">spare5 = #{spare5},</if>
</trim>
where stockout_guid = #{stockoutGuid}
</update>
@@ -188,6 +214,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
o.erp_stockout_id,
o.start_date,
o.finish_date,
o.spare1,
o.spare2,
o.spare4,
o.spare3,
o.spare5,
bw.warehouse_name,
bc.customer_name
from out_stockout o