From de0494d7a6f99f50fa33b9487dd2ffefca82e8b6 Mon Sep 17 00:00:00 2001
From: chenrui <1187576398@qq.com>
Date: 星期二, 08 四月 2025 17:44:47 +0800
Subject: [PATCH] 标准库功能修改
---
basic-server/src/main/resources/mapper/StandardTreeMapper.xml | 34 ++++++++++++++++++++++++++++------
1 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/basic-server/src/main/resources/mapper/StandardTreeMapper.xml b/basic-server/src/main/resources/mapper/StandardTreeMapper.xml
index e97a9cd..ee3daa5 100644
--- a/basic-server/src/main/resources/mapper/StandardTreeMapper.xml
+++ b/basic-server/src/main/resources/mapper/StandardTreeMapper.xml
@@ -35,6 +35,8 @@
<result property="sort" column="sort"/>
<result property="partNo" column="part_no"/>
<result property="sampleTypeEn" column="sample_type_en"/>
+ <result property="workShopName" column="workShopName"/>
+ <result property="workShopId" column="workShopId"/>
<collection property="children" resultMap="SampleDto"/>
</resultMap>
@@ -99,12 +101,15 @@
sto.id sample_type_id,
sto.sort,
sto.specimen_name_en sample_type_en,
- p.name_en sample_en
+ p.name_en sample_en,
+ ws.`name` workShopName,
+ ws.id workShopId
from laboratory l
left join structure_test_object sto on sto.laboratory_id = l.id
left join product p on p.object_id = sto.id
left join standard_tree st on st.sample_type = sto.specimen_name
and st.sample = p.name
+ LEFT JOIN work_shop ws ON ws.id = sto.work_shop_id
order by l.id, CAST(sto.code AS DECIMAL), p.id, ISNULL(st.id), st.id
</select>
@@ -249,7 +254,9 @@
l.laboratory_name laboratory,
sto.specimen_name sample_type,
p.name sample,
- st.model,
+ m.model_name model,
+ ws.`name` workShopName,
+ ws.id workShopId,
CASE
WHEN p.id = (SELECT pp.product_id
FROM product_part pp
@@ -269,6 +276,8 @@
left join product p on p.object_id = sto.id
left join standard_tree st on st.sample_type = sto.specimen_name
and st.sample = p.name
+ LEFT JOIN model m ON m.product_id = p.id
+ LEFT JOIN work_shop ws ON ws.id = sto.work_shop_id
where (p.id = (select pp.product_id
from product_part pp
where pp.part_no = #{partNo})
@@ -322,6 +331,7 @@
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
${ew.customSqlSegment}
</if>
+ order by send_time desc
</select>
<select id="selectIfsPage" resultType="com.ruoyi.basic.pojo.IfsInventoryQuantity">
@@ -329,6 +339,7 @@
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
${ew.customSqlSegment}
</if>
+ ORDER BY declare_date DESC
</select>
<select id="selectIfsInventoryQuantity" resultType="com.ruoyi.basic.dto.IfsInventoryQuantityCheckDto">
SELECT * from ifs_inventory_quantity ifs
@@ -347,6 +358,7 @@
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
${ew.customSqlSegment}
</if>
+ order by send_time desc
</select>
<select id="getIfsByOverList" resultType="com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto">
select * from (<include refid="getIfsOrder"/>
@@ -378,10 +390,20 @@
select model label,
model value
from standard_tree
- where sample_type in
- <foreach item="item" collection="sampleTypeValues" open="(" separator="," close=")">
- #{item}
- </foreach>
+ where sample is null
+ <if test="sampleTypeValues != null and sampleTypeValues.size() > 0">
+ and sample_type in
+ <foreach item="item" collection="sampleTypeValues" open="(" separator="," close=")">
+ #{item}
+ </foreach>
+ </if>
+ </select>
+
+ <select id="getStandardTree3" resultType="com.ruoyi.basic.dto.SampleDto">
+ select model label,
+ model value
+ from standard_tree
+ where sample_type = #{sampleType}
and sample is null
</select>
</mapper>
--
Gitblit v1.9.3