From 7b54a258fe2dc334da94985f8252608d646d63f0 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 19 八月 2024 18:15:48 +0800
Subject: [PATCH] 检验下单调整4
---
inspect-server/src/main/resources/mapper/InsSampleMapper.xml | 28 +++++++++++++++++++++++-----
1 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
index 6b49f8c..9caad82 100644
--- a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
@@ -191,7 +191,7 @@
LEFT JOIN user ON isu.user_id = user.id
WHERE
io.state = 1
- # AND io.ins_state != 5
+-- # AND io.ins_state != 5
and send_time is not null
<if test="userId !=null and userId!=''">
and (isu.user_id = #{userId} OR isu.user_id is NULL )
@@ -211,8 +211,8 @@
) isu2 on
isu2.ins_sample_id = a.id
where ins_state is not null
- <if test="laboratory != null and laboratory!=''">
- and laboratory=#{laboratory}
+ <if test="laboratory != null and laboratory != ''">
+ and a.laboratory=#{laboratory}
</if>
ORDER BY
<!--a.user_id DESC,-->
@@ -272,10 +272,16 @@
left join ins_product_result ipr on ip.id = ipr.ins_product_id
where ins_order_id = #{id}
and state = 1
- and ins_fiber_id is null
- and ins_fibers_id is null
+-- and ins_fiber_id is null
+-- and ins_fibers_id is null
and <!--isa.sample_code NOT REGEXP '/'-->
isa.id in(select id1 from (select is2.id id1 ,ip.id from ins_sample is2 left join ins_product ip on is2.id = ip.ins_sample_id where ip.id is not null)s )
+ order by case when man_hour_group is NULL then 1
+ when man_hour_group ='' then 1 else 0 end,
+ CASE
+ WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 濡傛灉浠ユ暟瀛楀紑澶达紝鍒欐寜鐓ф暟瀛楀ぇ灏忔帓搴�
+ WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- 鎻愬彇瀛楁瘝鍚庨潰鐨勬暟瀛楅儴鍒�
+ ,id asc
</select>
<select id="getInsOrderAndSample" resultMap="sampleDto">
select isa.*,
@@ -386,6 +392,12 @@
where ins_order_id = #{id}
and ip.standard_method_list_id is not null
and state = 1
+ order by case when man_hour_group is NULL then 1
+ when man_hour_group ='' then 1 else 0 end,
+ CASE
+ WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 濡傛灉浠ユ暟瀛楀紑澶达紝鍒欐寜鐓ф暟瀛楀ぇ灏忔帓搴�
+ WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- 鎻愬彇瀛楁瘝鍚庨潰鐨勬暟瀛楅儴鍒�
+ ,id asc
</select>
<select id="selectSampleProductListByOrderId3" resultMap="sampleDto3">
@@ -413,6 +425,12 @@
<foreach collection="ids" open="(" close=")" item="id" separator=",">
#{id}
</foreach>
+ order by case when man_hour_group is NULL then 1
+ when man_hour_group ='' then 1 else 0 end,
+ CASE
+ WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 濡傛灉浠ユ暟瀛楀紑澶达紝鍒欐寜鐓ф暟瀛楀ぇ灏忔帓搴�
+ WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- 鎻愬彇瀛楁瘝鍚庨潰鐨勬暟瀛楅儴鍒�
+ ,id asc
</select>
<select id="getInsProduct1" resultMap="product">
--
Gitblit v1.9.3