change - 监控单元添加当前状态

main
wenjy 3 years ago
parent 91a5157fb7
commit 6fad6e7bfa

@ -47,6 +47,14 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">当前状态:</label>
<div class="col-sm-8">
<select name="monitorunitStatus" class="form-control m-b" th:with="type=${@dict.getType('monitorunit_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否启用:</label>
<div class="col-sm-8">

@ -47,6 +47,15 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">当前状态:</label>
<div class="col-sm-8">
<select name="monitorunitStatus" class="form-control m-b" th:with="type=${@dict.getType('monitorunit_status')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{monitorunitStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否启用:</label>
<div class="col-sm-8">

@ -36,6 +36,14 @@
th:value="${substation.substationId}"></option>
</select>
</li>
<li>
<label>当前状态:</label>
<select name="monitorunitStatus" th:with="type=${@dict.getType('monitorunit_status')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>是否启用:</label>
<select name="enableFlag" th:with="type=${@dict.getType('enable_flag')}">
@ -80,6 +88,7 @@
var editFlag = [[${@permission.hasPermi('base:monitorUnitInfo:edit')}]];
var removeFlag = [[${@permission.hasPermi('base:monitorUnitInfo:remove')}]];
var enableFlagDatas = [[${@dict.getType('enable_flag')}]];
var monitorunitStatusDatas = [[${@dict.getType('monitorunit_status')}]];
var prefix = ctx + "base/monitorUnitInfo";
$(function () {
@ -129,6 +138,13 @@
field: 'substationName',
title: '所属变电站',
align: 'left'
},{
field: 'monitorunitStatus',
title: '是否启用',
align: 'left',
formatter: function (value, row, index) {
return $.table.selectDictLabel(monitorunitStatusDatas, value);
}
},
{
field: 'enableFlag',

@ -45,6 +45,10 @@ public class BaseMonitorunitInfo extends TreeEntity
@Excel(name = "是否启用")
private Long enableFlag;
/** 监控单元状态 */
@Excel(name = "监控单元状态")
private Long monitorunitStatus;
public void setObjId(Long objId)
{
this.objId = objId;
@ -100,6 +104,14 @@ public class BaseMonitorunitInfo extends TreeEntity
return enableFlag;
}
public Long getMonitorunitStatus() {
return monitorunitStatus;
}
public void setMonitorunitStatus(Long monitorunitStatus) {
this.monitorunitStatus = monitorunitStatus;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -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>

Loading…
Cancel
Save