From 56e6e0bf18c39a933aec78762b636fdf2efa8d68 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 08 十二月 2025 17:59:24 +0800
Subject: [PATCH] 外购成品检验报告生成功能

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

diff --git a/inspect-server/src/main/resources/mapper/InsSampleUserMapper.xml b/inspect-server/src/main/resources/mapper/InsSampleUserMapper.xml
index 5cad2d2..aaf0cb2 100644
--- a/inspect-server/src/main/resources/mapper/InsSampleUserMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsSampleUserMapper.xml
@@ -1,4 +1,16 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.ruoyi.inspect.mapper.InsSampleUserMapper">
+    <select id="selectUserNameByOrderId" resultType="com.ruoyi.inspect.vo.InsSampleUserVO">
+        select
+            group_concat(DISTINCT u.name separator ',') AS inspector,
+            date_format(isu.create_time,'%Y-%m-%d') AS inspect_date,
+            isa.model
+        from ins_sample_user isu
+            left join ins_sample isa on isu.ins_sample_id = isa.ins_order_id
+            left join user u on isu.user_id=u.id
+        where isu.ins_sample_id=#{orderId} and isu.state=0
+        group by isu.ins_sample_id
+        order by isu.create_time
+    </select>
 </mapper>

--
Gitblit v1.9.3