From a3e0493b2f597e8c49ee80a0c7ab92bc30dc60a3 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期四, 10 四月 2025 11:13:36 +0800
Subject: [PATCH] 检验任务,进货检验车间文件选择去掉后缀
---
basic-server/src/main/resources/mapper/StandardTreeMapper.xml | 66 ++++++++++++++++++++++++++------
1 files changed, 53 insertions(+), 13 deletions(-)
diff --git a/basic-server/src/main/resources/mapper/StandardTreeMapper.xml b/basic-server/src/main/resources/mapper/StandardTreeMapper.xml
index 74ded82..ffe58e3 100644
--- a/basic-server/src/main/resources/mapper/StandardTreeMapper.xml
+++ b/basic-server/src/main/resources/mapper/StandardTreeMapper.xml
@@ -25,6 +25,18 @@
<resultMap id="LaboratoryDto" type="com.ruoyi.basic.dto.LaboratoryDto">
<result property="label" column="laboratory"/>
<result property="value" column="laboratory"/>
+ <collection property="children" resultMap="ObjectTypeDto"/>
+ </resultMap>
+
+ <resultMap id="ObjectTypeDto" type="com.ruoyi.basic.dto.ObjectTypeDto">
+ <result property="label" column="object_type"/>
+ <result property="value" column="object_type"/>
+ <collection property="children" resultMap="workShopNameDto"/>
+ </resultMap>
+
+ <resultMap id="workShopNameDto" type="com.ruoyi.basic.dto.WorkShopNameDto">
+ <result property="label" column="workShopName"/>
+ <result property="value" column="workShopName"/>
<collection property="children" resultMap="SampleTypeDto"/>
</resultMap>
@@ -35,6 +47,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>
@@ -90,8 +104,10 @@
</sql>
<select id="selectStandardTreeList" resultMap="FactoryDto">
- select '涓ぉ绉戞妧妫�娴嬩腑蹇�' factory,
+ select '涓ぉ绉戞妧' factory,
l.laboratory_name laboratory,
+ sto.object_type object_type,
+ ws.`name` workShopName,
sto.specimen_name sample_type,
p.name sample,
st.model,
@@ -99,12 +115,14 @@
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.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>
@@ -164,7 +182,7 @@
</if>
</select>
<select id="selectStandardTreeList2" resultType="com.ruoyi.basic.pojo.StandardTree">
- select '涓ぉ绉戞妧妫�娴嬩腑蹇�' factory,
+ select '涓ぉ绉戞妧' factory,
l.laboratory_name laboratory,
sto.specimen_name sample_type,
p.name sample
@@ -212,14 +230,6 @@
and st.sample = p.name
</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>
-
<select id="getLaboratory" resultType="java.lang.String">
select l.laboratory_name
from structure_test_object sto
@@ -253,11 +263,15 @@
where name = #{name}
</select>
<select id="selectStandardTreeListByPartNo" resultMap="FactoryDto">
- select '涓ぉ绉戞妧妫�娴嬩腑蹇�' factory,
+ select '涓ぉ绉戞妧' factory,
l.laboratory_name laboratory,
+ sto.object_type object_type,
+ ws.`name` workShopName,
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
@@ -277,6 +291,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})
@@ -330,6 +346,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">
@@ -337,6 +354,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
@@ -355,6 +373,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"/>
@@ -381,4 +400,25 @@
${ew.customSqlSegment}
</if>
</select>
+
+ <select id="getStandardTree3Batch" resultType="com.ruoyi.basic.dto.SampleDto">
+ select model label,
+ model value
+ from standard_tree
+ 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