From 55db6f66c093c07df100cb0e609091030c2a4925 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期四, 24 九月 2026 09:19:20 +0800
Subject: [PATCH] feat(process): 完善检验委托单功能实现绑定和关联管理 - 实现检验委托单与成品下单的绑定功能,包括新增绑定、解除绑定和变更绑定关系 - 添加检验委托单关联状态查询和未绑定委托单筛选功能 - 实现检验委托单绑定日志记录和报告同步功能
---
inspect-server/src/main/resources/mapper/InsOrderMapper.xml | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/inspect-server/src/main/resources/mapper/InsOrderMapper.xml b/inspect-server/src/main/resources/mapper/InsOrderMapper.xml
index 667f233..50e8de1 100644
--- a/inspect-server/src/main/resources/mapper/InsOrderMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsOrderMapper.xml
@@ -396,13 +396,18 @@
io2.entrust_code,
io2.test_quantity,
io2.ins_state,
- sto.color AS part_color,
+ CASE
+ WHEN pp.color IS NOT NULL
+ THEN pp.color
+ ELSE sto.color
+ END part_color,
JSON_OBJECT(
'sample_name', io2.sample_view,
'entrust_code', io2.entrust_code
) labelBarCode
from ins_order io2
LEFT JOIN ins_sample isa ON io2.id = isa.ins_order_id
+ LEFT JOIN product_part pp ON pp.part_no = io2.part_no COLLATE utf8mb4_general_ci
LEFT JOIN structure_test_object_part sto ON sto.part_no = io2.part_no COLLATE utf8mb4_general_ci
where type_source = -1
GROUP BY io2.id) a
@@ -613,4 +618,20 @@
AND io.id = #{id}
LIMIT 1
</select>
+ <select id="selectOrderInfoByIds" resultType="java.util.Map">
+ select
+ io.sample_type AS sampleType,
+ io.part_detail AS partDetail,
+ GROUP_CONCAT(iiq.update_batch_no SEPARATOR '銆�') AS updateBatchNo,
+ SUM(iiq.pur_qty_in_store) AS qtyArrived,
+ iiq.buy_unit_meas AS buyUnitMeas,
+ iiq.supplier_name AS supplierName,
+ DATE_FORMAT(io.send_time,'%Y-%m-%d') AS sendTime
+ from ins_order io left join ifs_inventory_quantity iiq on io.ifs_inventory_id=iiq.id
+ where io.state !=-1
+ AND io.id in
+ <foreach collection="selectOrderIds" separator="," item="id" open="(" close=")">
+ #{id}
+ </foreach>
+ </select>
</mapper>
--
Gitblit v1.9.3