From 2bb12b1ca40b29b7edcf06ef3f3d6de24dde1c4c Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 24 九月 2025 14:59:17 +0800
Subject: [PATCH] 原材料订单拆分功能v1
---
cnas-device/src/main/resources/mapper/DeviceMapper.xml | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/cnas-device/src/main/resources/mapper/DeviceMapper.xml b/cnas-device/src/main/resources/mapper/DeviceMapper.xml
index 2d5c6c8..2c2436a 100644
--- a/cnas-device/src/main/resources/mapper/DeviceMapper.xml
+++ b/cnas-device/src/main/resources/mapper/DeviceMapper.xml
@@ -89,13 +89,8 @@
, #{createUser}
, #{createTime})
</select>
- <select id="selectDevicePrincipal" resultType="com.ruoyi.device.pojo.Device">
- select id,
- equipment_manager
- from device
- </select>
- <select id="selectDeviceParameterPage" resultType="com.ruoyi.device.pojo.Device">
+ <select id="selectDeviceParameterPage" resultType="com.ruoyi.device.dto.DeviceDto">
select * from(
SELECT
d.*,
@@ -147,6 +142,7 @@
<resultMap id="deviceNameMap" type="map">
<result property="value" column="id"/>
<result property="label" column="device_name"/>
+ <result property="activationDate" column="activation_date"/>
<result property="managementNumber" column="management_number"/>
</resultMap>
@@ -157,7 +153,8 @@
case when d.storage_point is null || d.storage_point ='' then '鍏朵粬' else d.storage_point end as storage_point,
d.device_name,
d.management_number,
- null as value
+ null as value,
+ d.activation_date
from device d
LEFT JOIN laboratory l ON l.id = d.subordinate_departments_id
<where>
@@ -165,7 +162,6 @@
and device_name like concat('%',#{deviceName},'%')
</if>
</where>
- order by l.laboratory_name desc, d.storage_point desc
</select>
<select id="selectDeviceByCode" resultType="com.ruoyi.device.dto.DeviceDto">
@@ -186,4 +182,15 @@
u1.name,
u2.name
</select>
+
+ <!-- 鏌ヨ鍒拌揪鏍″噯鏈夋晥鏈熺殑璁惧-鎻愬墠5澶� -->
+ <select id="selectOverdueDevice" resultType="com.ruoyi.device.pojo.Device">
+ SELECT *
+ FROM device
+ WHERE
+ -- 绛涢�夊嚭 activation_date 鍦ㄥ綋鍓嶆棩鏈熷墠浜斿ぉ鍐呯殑鏁版嵁
+ activation_date BETWEEN now() AND now() + INTERVAL 5 DAY
+ -- 绛涢�夊嚭 activation_date 宸茬粡瓒呰繃褰撳墠鏃ユ湡鐨勬暟鎹�
+ OR activation_date < now()
+ </select>
</mapper>
--
Gitblit v1.9.3