From 4f45f29e6b53f4c01b414409c5000ff4e212b3d9 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期五, 05 六月 2026 13:36:54 +0800
Subject: [PATCH] 增加eip
---
report-server/src/main/resources/mapper/SampleRecordMapper.xml | 67 +++++++++++++++++++++++++++++++++
1 files changed, 67 insertions(+), 0 deletions(-)
diff --git a/report-server/src/main/resources/mapper/SampleRecordMapper.xml b/report-server/src/main/resources/mapper/SampleRecordMapper.xml
new file mode 100644
index 0000000..d48f083
--- /dev/null
+++ b/report-server/src/main/resources/mapper/SampleRecordMapper.xml
@@ -0,0 +1,67 @@
+<?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.report.mapper.SampleRecordMapper">
+
+ <!-- 鍒嗛〉鏌ヨ棰嗘牱璁板綍 -->
+ <select id="pageSampleRecord" resultType="com.ruoyi.report.vo.SampleRecordVo">
+ SELECT
+ h.id AS id,
+ s.id AS sampleId,
+ s.sample_code AS sampleCode,
+ s.sample_name AS sampleName,
+ o.custom AS custom,
+ h.operate_type AS operateType,
+ u.name AS operateUser,
+ h.operate_time AS operateTime,
+ h.from_cell AS fromCell,
+ h.to_cell AS toCell,
+ h.remark AS remark
+ FROM warehouse_history h
+ LEFT JOIN ins_sample s ON h.sample_id = s.id
+ LEFT JOIN ins_order o ON s.ins_order_id = o.id
+ LEFT JOIN user u ON h.operate_user_id = u.id
+ WHERE 1=1
+ <if test="dto.sampleCode != null and dto.sampleCode != ''">
+ AND s.sample_code LIKE CONCAT('%', #{dto.sampleCode}, '%')
+ </if>
+ <if test="dto.sampleName != null and dto.sampleName != ''">
+ AND s.sample_name LIKE CONCAT('%', #{dto.sampleName}, '%')
+ </if>
+ <if test="dto.custom != null and dto.custom != ''">
+ AND o.custom LIKE CONCAT('%', #{dto.custom}, '%')
+ </if>
+ <if test="dto.receiveUser != null and dto.receiveUser != ''">
+ AND u.name LIKE CONCAT('%', #{dto.receiveUser}, '%')
+ </if>
+ <if test="dto.startTime != null and dto.startTime != ''">
+ AND h.operate_time >= #{dto.startTime}
+ </if>
+ <if test="dto.endTime != null and dto.endTime != ''">
+ AND h.operate_time <= #{dto.endTime}
+ </if>
+ ORDER BY h.operate_time DESC
+ </select>
+
+ <!-- 鏌ヨ鏍峰搧娴佽浆璁板綍 -->
+ <select id="getFlowRecord" resultType="com.ruoyi.report.vo.SampleRecordVo">
+ SELECT
+ h.id AS id,
+ s.id AS sampleId,
+ s.sample_code AS sampleCode,
+ s.sample_name AS sampleName,
+ o.custom AS custom,
+ h.operate_type AS operateType,
+ u.name AS operateUser,
+ h.operate_time AS operateTime,
+ h.from_cell AS fromCell,
+ h.to_cell AS toCell,
+ h.remark AS remark
+ FROM warehouse_history h
+ LEFT JOIN ins_sample s ON h.sample_id = s.id
+ LEFT JOIN ins_order o ON s.ins_order_id = o.id
+ LEFT JOIN user u ON h.operate_user_id = u.id
+ WHERE s.id = #{sampleId}
+ ORDER BY h.operate_time ASC
+ </select>
+
+</mapper>
\ No newline at end of file
--
Gitblit v1.9.3