From 1f15333b0a97a327865f7aab8f1e3f9ba8fc16f8 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 18 十月 2024 12:45:59 +0800
Subject: [PATCH] 电路站点报告调试+总报告ing

---
 inspect-server/src/main/resources/mapper/InsSampleMapper.xml |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
index 46551d7..a52c2d0 100644
--- a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
@@ -367,6 +367,7 @@
           and state = 1
           and ip.son_laboratory = #{laboratory}
           and ios.laboratory = #{laboratory}
+          and (ipr2.num is null or ipr.num is null)
     </select>
     <select id="getSampleEn" resultType="java.lang.String">
         select name_en
@@ -536,6 +537,7 @@
         ip.sample ip_sample,
         ip.model ip_model,
         ip.state,
+        io.issue_time,
         ins_sample_id
         from ins_sample isa
         left join ins_product ip on isa.id = ip.ins_sample_id
@@ -619,7 +621,7 @@
           and ios.laboratory = #{laboratory}
           and (ipr2.num = ios.num or ipr2.num is null)
           and (ipr.num = ios.num or ipr.num is null)
-        order by ipr.id, ipr2.id
+        order by ip.id, ipr.id, ipr2.id
     </select>
     <select id="getIns2Product1" resultMap="product">
         select ip.id            ip_id,
@@ -685,7 +687,7 @@
           and ip.son_laboratory = #{laboratory}
           and ip.standard_method_list_id is not null
           and ios.laboratory = #{laboratory}
-        order by ipr.id, ipr2.id
+        order by ip.id, ipr.id, ipr2.id
     </select>
     <select id="get2InsProduct1" resultMap="product">
         select ip.id            ip_id,
@@ -752,7 +754,7 @@
           and ip.standard_method_list_id is not null
           and ios.laboratory = #{laboratory}
           and (ipr2.num = #{num} or ipr.num = #{num})
-        order by ipr.id, ipr2.id
+        order by ip.id, ipr.id, ipr2.id
     </select>
 
     <select id="getReportModel" resultType="java.util.Map">
@@ -851,6 +853,7 @@
         <result property="insState" column="ins_state" jdbcType="INTEGER"/>
         <result property="joinNum" column="join_num" jdbcType="INTEGER"/>
         <result property="remark" column="remark" jdbcType="VARCHAR"/>
+        <result property="issueTime" column="issue_time" />
         <result property="createUser" column="create_user" jdbcType="INTEGER"/>
         <result property="updateUser" column="update_user" jdbcType="INTEGER"/>
         <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
@@ -931,7 +934,8 @@
           and ip.id is not null
     </select>
     <select id="selectInsSample" resultType="com.yuanchu.mom.pojo.InsSample">
-        select isa.*,entrust_code
+        select isa.*,
+        case when entrust_code is null then out_entrust_code else entrust_code end as  entrust_code
         from ins_sample isa
         left join ins_order io on isa.ins_order_id = io.id
         where ins_order_id in
@@ -947,4 +951,8 @@
           and state = 1
           and ins_order_id = #{insOrderId}
     </select>
+    <select id="selectList1" resultType="com.yuanchu.mom.dto.SampleProductDto">
+        select * from ins_sample where ins_order_id=#{id
+}
+    </select>
 </mapper>

--
Gitblit v1.9.3