From 65b25fde603de187efc3db827c9d384e35f00014 Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期二, 10 六月 2025 15:17:17 +0800
Subject: [PATCH] refactor(system): 优化节假日管理功能
---
zhitan-system/src/main/resources/mapper/model/ModelNodeMapper.xml | 35 +++++++++++++++++++++++++++--------
1 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/zhitan-system/src/main/resources/mapper/model/ModelNodeMapper.xml b/zhitan-system/src/main/resources/mapper/model/ModelNodeMapper.xml
index f0fe5ef..d8486ec 100644
--- a/zhitan-system/src/main/resources/mapper/model/ModelNodeMapper.xml
+++ b/zhitan-system/src/main/resources/mapper/model/ModelNodeMapper.xml
@@ -292,7 +292,7 @@
</select>
<select id="getModelNodeIndexIdRelationInforByCode"
- resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfor">
+ resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfo">
SELECT mn.node_id nodeId,
mn."name" "name",
ni.index_id indexId
@@ -303,7 +303,7 @@
</select>
<select id="listModelNodeIndexIdRelationInforByParentId"
- resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfor">
+ resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfo">
SELECT mn.node_id nodeId,
mn."name" "name",
ni.index_id indexId
@@ -313,7 +313,7 @@
</select>
<select id="getModelNodeIndexIdRelationInforByNodeId"
- resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfor">
+ resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfo">
SELECT mn.node_id nodeId,
mn."name" "name",
ni.index_id indexId
@@ -336,7 +336,7 @@
LIMIT 1;
</select>
<select id="selectIndexByModelCodeAndNodeId"
- resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfor">
+ resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfo">
SELECT mn.node_id nodeId,
mn."name",
ni.index_id indexId
@@ -380,12 +380,13 @@
</foreach>
</insert>
- <select id="getModelNodeIndexIdByNodeId" resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfor">
+ <select id="getModelNodeIndexIdByNodeId" resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfo">
SELECT mn.node_id nodeId,
mn."name" "name",
ni.index_id indexId,
ei.energy_id energyId,
- ei.index_type indexType
+ ei.index_type indexType,
+ ei.unit_id unitId
FROM "model_node" mn
LEFT JOIN "node_index" ni ON mn.node_id = ni.node_id
LEFT JOIN energy_index ei on ni.index_id = ei.index_id
@@ -394,7 +395,7 @@
and ei.energy_id = #{energyType}
</if>
</select>
- <select id="getModelNodeByParentId" resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfor">
+ <select id="getModelNodeByParentId" resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfo">
SELECT mn.node_id nodeId,
mn."name" "name",
ni.index_id indexId,
@@ -410,7 +411,7 @@
where model_code = #{modelCode} AND parent_id is null
order by order_num
</select>
- <select id="selectIndexByNodeIds" resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfor">
+ <select id="selectIndexByNodeIds" resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfo">
SELECT mn.node_id nodeId,
mn."name" "name",
ni.index_id indexId,
@@ -465,4 +466,22 @@
AND di.data_time >= #{dateTimeMap.startTime}
AND di.data_time <= #{dateTimeMap.endTime}
</select>
+ <select id="getAllModelNodeIndexByAddress" resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfo">
+ SELECT
+ mn.node_id nodeId,
+ mn.code nodeCode,
+ mn."name" nodeName,
+ ni.index_id indexId,
+ ei."name" indexName,
+ ei.index_type indexType,
+ mi.energy_type
+ FROM
+ "model_node" mn
+ LEFT JOIN "node_index" ni ON mn.node_id = ni.node_id
+ LEFT JOIN energy_index ei ON ni.index_id = ei.index_id
+ LEFT JOIN meter_implement mi ON mi."id" = ei.meter_id
+ WHERE
+ mn.model_code = #{modelCode}
+ AND mn.address LIKE concat( #{address} , '%' )
+ </select>
</mapper>
--
Gitblit v1.9.3