From c19bcccbe4f091b4286a3ff40ee4a97c4e9848d6 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 19 三月 2026 10:22:37 +0800
Subject: [PATCH] 修改bom产品信息,如果有关联生成订单完成数量>0,则不许改;否则修改关联的产品结构,订单产品信息,工艺路线产品信息
---
src/main/resources/mapper/stock/StockOutRecordMapper.xml | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/stock/StockOutRecordMapper.xml b/src/main/resources/mapper/stock/StockOutRecordMapper.xml
index 28e61e4..10a60c2 100644
--- a/src/main/resources/mapper/stock/StockOutRecordMapper.xml
+++ b/src/main/resources/mapper/stock/StockOutRecordMapper.xml
@@ -15,9 +15,38 @@
<result column="update_time" property="updateTime" />
<result column="create_user" property="createUser" />
<result column="update_user" property="updateUser" />
+ <result column="license_plate_no" property="licensePlateNo" />
</resultMap>
<select id="listPage" resultType="com.ruoyi.stock.dto.StockOutRecordDto">
+ SELECT
+ sor.*,
+ p.product_name as productName,
+ pm.model,
+ pm.unit,
+ sor.weighbridge_doc_path,
+ u.nick_name as createBy
+ FROM stock_out_record as sor
+ LEFT JOIN product_model as pm on sor.product_model_id = pm.id
+ LEFT JOIN product as p on pm.product_id = p.id
+ LEFT JOIN sys_user as u on sor.create_user = u.user_id
+ <where>
+ <if test="params.timeStr != null and params.timeStr != ''">
+ and sor.create_time like concat('%',#{params.timeStr},'%')
+ </if>
+ <if test="params.productName != null and params.productName != ''">
+ and p.product_name like concat('%',#{params.productName},'%')
+ </if>
+ <if test="params.type != null and params.type != ''">
+ and sor.type = #{params.type}
+ </if>
+ <if test="params.recordType != null and params.recordType != ''">
+ and sor.record_type = #{params.recordType}
+ </if>
+ </where>
+ order by sor.id desc
+ </select>
+ <select id="listStockOutRecordExportData" resultType="com.ruoyi.stock.execl.StockOutRecordExportData">
SELECT
sor.*,
p.product_name as productName,
@@ -38,6 +67,9 @@
<if test="params.type != null and params.type != ''">
and sor.type = #{params.type}
</if>
+ <if test="params.recordType != null and params.recordType != ''">
+ and sor.record_type = #{params.recordType}
+ </if>
</where>
order by sor.id desc
</select>
--
Gitblit v1.9.3