盘点差异,入库联查字段修改,历史单据作业查询

This commit is contained in:
liuhanqing
2025-05-29 08:41:12 +08:00
parent 91d042e4e5
commit 4e4c64439c
50 changed files with 2477 additions and 336 deletions

View File

@@ -10,15 +10,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="inType" column="in_type" />
<result property="createDate" column="create_date" />
<result property="createManId" column="create_man_id" />
<result property="createManName" column="user_name" />
<result property="status" column="status" />
<result property="warehouseId" column="warehouse_id" />
<result property="warehouseName" column="warehouse_name" />
<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="departmentName" column="dept_name" />
<result property="customerNo" column="customer_no" />
<result property="classNo" column="class_no" />
<result property="supplierNo" column="supplier_no" />
<result property="supplierName" column="supplier_name" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare4" column="spare4" />
@@ -27,36 +31,63 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectInStockinVo">
select stockin_guid, stockin_id, in_type, create_date, create_man_id, status, warehouse_id, finish_date, erp_bill, stock_source, department_no, customer_no, class_no, supplier_no, spare1, spare2, spare4, spare3, spare5 from in_stockin
select is2.stockin_guid,
is2.stockin_id,
is2.in_type,
is2.create_date,
is2.create_man_id,
is2.status,
is2.warehouse_id,
is2.finish_date,
is2.erp_bill,
is2.stock_source,
is2.department_no,
is2.customer_no,
is2.class_no,
is2.supplier_no,
is2.spare1,
is2.spare2,
is2.spare4,
is2.spare3,
is2.spare5,
bw.warehouse_name,
bs.supplier_name,
sd.dept_name ,
su.user_name
from in_stockin is2
left join bas_warehouse bw on is2.warehouse_id = bw.warehouse_id
left join bas_supplier bs on bs.supplier_no = is2.supplier_no
left join sys_dept sd on is2.department_no = sd.dept_id
left join sys_user su on su.user_id = is2.create_man_id
</sql>
<select id="selectInStockinList" parameterType="InStockin" resultMap="InStockinResult">
<include refid="selectInStockinVo"/>
<where>
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
<if test="inType != null and inType != ''"> and in_type = #{inType}</if>
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</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="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if>
<if test="erpBill != null and erpBill != ''"> and erp_bill = #{erpBill}</if>
<if test="stockSource != null and stockSource != ''"> and stock_source = #{stockSource}</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="classNo != null and classNo != ''"> and class_no = #{classNo}</if>
<if test="supplierNo != null and supplierNo != ''"> and supplier_no = #{supplierNo}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="stockinId != null and stockinId != ''"> and is2.stockin_id = #{stockinId}</if>
<if test="inType != null and inType != ''"> and is2.in_type = #{inType}</if>
<if test="createDate != null and createDate != ''"> and is2.create_date = #{createDate}</if>
<if test="createManId != null and createManId != ''"> and is2.create_man_id = #{createManId}</if>
<if test="status != null and status != ''"> and is2.status = #{status}</if>
<if test="warehouseId != null and warehouseId != ''"> and is2.warehouse_id = #{warehouseId}</if>
<if test="finishDate != null and finishDate != ''"> and is2.finish_date = #{finishDate}</if>
<if test="erpBill != null and erpBill != ''"> and is2.erp_bill = #{erpBill}</if>
<if test="stockSource != null and stockSource != ''"> and is2.stock_source = #{stockSource}</if>
<if test="departmentNo != null and departmentNo != ''"> and is2.department_no = #{departmentNo}</if>
<if test="customerNo != null and customerNo != ''"> and is2.customer_no = #{customerNo}</if>
<if test="classNo != null and classNo != ''"> and is2.class_no = #{classNo}</if>
<if test="supplierNo != null and supplierNo != ''"> and is2.supplier_no = #{supplierNo}</if>
<if test="spare1 != null and spare1 != ''"> and is2.spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and is2.spare2 = #{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>
</select>
<select id="selectInStockinByStockinGuid" parameterType="String" resultMap="InStockinResult">
<include refid="selectInStockinVo"/>
where stockin_guid = #{stockinGuid}
where is2.stockin_guid = #{stockinGuid}
</select>
<insert id="insertInStockin" parameterType="InStockin">