|
|
|
@ -17,6 +17,7 @@
|
|
|
|
|
<result property="updateBy" column="Update_By" />
|
|
|
|
|
<result property="updateTime" column="Update_Time" />
|
|
|
|
|
<result property="parentName" column="parent_name" />
|
|
|
|
|
<result property="monitorunitStatus" column="Monitorunit_Status" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<resultMap type="BaseMonitorunitInfoDto" id="BaseMonitorunitInfoDtoResult">
|
|
|
|
@ -33,11 +34,12 @@
|
|
|
|
|
<result property="updateTime" column="Update_Time" />
|
|
|
|
|
<result property="parentName" column="parent_name" />
|
|
|
|
|
<result property="monitorunitTypeName" column="MonitorUnitType_Name" />
|
|
|
|
|
<result property="monitorunitStatus" column="Monitorunit_Status" />
|
|
|
|
|
<result property="substationName" column="Substation_Name" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectBaseMonitorunitInfoVo">
|
|
|
|
|
select ObjId, MonitorUnit_Id, MonitorUnit_Name, Parent_Id, MonitorUnit_Type, Substation_Id, Enable_Flag, Create_By, Create_Time, Update_By, Update_Time from base_monitorunit_info
|
|
|
|
|
select ObjId, MonitorUnit_Id, MonitorUnit_Name, Parent_Id, MonitorUnit_Type, Substation_Id, Enable_Flag, Create_By, Create_Time, Update_By, Update_Time,Monitorunit_Status from base_monitorunit_info
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseMonitorunitInfoList" parameterType="BaseMonitorunitInfo" resultMap="BaseMonitorunitInfoResult">
|
|
|
|
@ -49,12 +51,13 @@
|
|
|
|
|
<if test="monitorunitType != null "> and MonitorUnit_Type = #{monitorunitType}</if>
|
|
|
|
|
<if test="substationId != null and substationId != ''"> and Substation_Id = #{substationId}</if>
|
|
|
|
|
<if test="enableFlag != null "> and Enable_Flag = #{enableFlag}</if>
|
|
|
|
|
<if test="monitorunitStatus != null "> and Monitorunit_Status = #{monitorunitStatus}</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by Parent_Id
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseMonitorunitInfoDtoList" parameterType="BaseMonitorunitInfo" resultMap="BaseMonitorunitInfoDtoResult">
|
|
|
|
|
select t1.objid, t1.monitorunit_id, t1.monitorunit_name, t1.parent_id, t3.MonitorUnit_Name as parent_name,
|
|
|
|
|
select t1.objid, t1.monitorunit_id, t1.monitorunit_name,t1.monitorunit_Status, t1.parent_id, t3.MonitorUnit_Name as parent_name,
|
|
|
|
|
t1.monitorunit_type,t2.MonitorUnitType_Name, t1.substation_id,t4.Substation_Name,
|
|
|
|
|
t1.enable_flag from base_monitorunit_info t1
|
|
|
|
|
left join base_monitorunit_type t2 on t1.MonitorUnit_Type = t2.MonitorUnitType_Id
|
|
|
|
@ -67,12 +70,13 @@
|
|
|
|
|
<if test="monitorunitType != null "> and t1.MonitorUnit_Type = #{monitorunitType}</if>
|
|
|
|
|
<if test="substationId != null and substationId != ''"> and t1.Substation_Id = #{substationId}</if>
|
|
|
|
|
<if test="enableFlag != null "> and t1.Enable_Flag = #{enableFlag}</if>
|
|
|
|
|
<if test="monitorunitStatus != null "> and Monitorunit_Status = #{monitorunitStatus}</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by t1.objId
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseMonitorunitInfoByObjId" parameterType="Long" resultMap="BaseMonitorunitInfoResult">
|
|
|
|
|
select t.ObjId, t.MonitorUnit_Id, t.MonitorUnit_Name, t.Parent_Id, t.MonitorUnit_Type, t.Substation_Id, t.Enable_Flag, t.Create_By, t.Create_Time, t.Update_By, t.Update_Time, p.MonitorUnit_Name as parent_name
|
|
|
|
|
select t.ObjId, t.MonitorUnit_Id, t.MonitorUnit_Name,t.monitorunit_status, t.Parent_Id, t.MonitorUnit_Type, t.Substation_Id, t.Enable_Flag, t.Create_By, t.Create_Time, t.Update_By, t.Update_Time, p.MonitorUnit_Name as parent_name
|
|
|
|
|
from base_monitorunit_info t
|
|
|
|
|
left join base_monitorunit_info p on p.MonitorUnit_Id = t.Parent_Id
|
|
|
|
|
where t.ObjId = #{objId}
|
|
|
|
@ -85,6 +89,7 @@
|
|
|
|
|
<if test="monitorunitName != null">MonitorUnit_Name,</if>
|
|
|
|
|
<if test="parentId != null">Parent_Id,</if>
|
|
|
|
|
<if test="monitorunitType != null">MonitorUnit_Type,</if>
|
|
|
|
|
<if test="monitorunitStatus != null">Monitorunit_Status,</if>
|
|
|
|
|
<if test="substationId != null">Substation_Id,</if>
|
|
|
|
|
<if test="enableFlag != null">Enable_Flag,</if>
|
|
|
|
|
<if test="createBy != null">Create_By,</if>
|
|
|
|
@ -97,6 +102,7 @@
|
|
|
|
|
<if test="monitorunitName != null">#{monitorunitName},</if>
|
|
|
|
|
<if test="parentId != null">#{parentId},</if>
|
|
|
|
|
<if test="monitorunitType != null">#{monitorunitType},</if>
|
|
|
|
|
<if test="monitorunitStatus != null">#{monitorunitStatus},</if>
|
|
|
|
|
<if test="substationId != null">#{substationId},</if>
|
|
|
|
|
<if test="enableFlag != null">#{enableFlag},</if>
|
|
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
|
@ -113,6 +119,7 @@
|
|
|
|
|
<if test="monitorunitName != null">MonitorUnit_Name = #{monitorunitName},</if>
|
|
|
|
|
<if test="parentId != null">Parent_Id = #{parentId},</if>
|
|
|
|
|
<if test="monitorunitType != null">MonitorUnit_Type = #{monitorunitType},</if>
|
|
|
|
|
<if test="monitorunitStatus != null">Monitorunit_Status = #{monitorunitStatus},</if>
|
|
|
|
|
<if test="substationId != null">Substation_Id = #{substationId},</if>
|
|
|
|
|
<if test="enableFlag != null">Enable_Flag = #{enableFlag},</if>
|
|
|
|
|
<if test="createBy != null">Create_By = #{createBy},</if>
|
|
|
|
|