+ + + + + + + + + +
- +
- +
@@ -21,9 +31,9 @@
- +
- +
@@ -31,9 +41,19 @@
- +
- + +
+
+
+
+
+
+
+ +
+
diff --git a/ruoyi-admin/src/main/resources/templates/system/police/police.html b/ruoyi-admin/src/main/resources/templates/system/police/police.html index 36e4ebd..499d546 100644 --- a/ruoyi-admin/src/main/resources/templates/system/police/police.html +++ b/ruoyi-admin/src/main/resources/templates/system/police/police.html @@ -9,15 +9,6 @@
-
- - - -
- -
- -
@@ -78,21 +69,36 @@ checkbox: true }, { - field: 'station', + field: 'radarLocation', title: '工位' }, { field: 'alarmValue1', - title: '报警值', + title: '报警值A', sortable: true }, { - field: 'presetValue', - title: '预设报警值' + field: 'alarmValue2', + title: '报警值B', + sortable: true + }, + { + field: 'alarmValue3', + title: '报警值C', + sortable: true + }, + { + field: 'alarmValue4', + title: '报警值D', + sortable: true }, { - field: 'status', title: '状态', + visible: editFlag == 'hidden' ? false : true, + align: 'center', + formatter: function (value, row, index) { + return statusTools(row); + } }, { title: '操作', @@ -101,7 +107,7 @@ var actions = []; actions.push('编辑 '); - actions.push('编辑 '); + // actions.push('编辑 '); // actions.push('删除 '); // var more = []; // more.push("重置密码 "); @@ -114,6 +120,24 @@ }; $.table.init(options); } + function statusTools(row) { + if (row.status == 1) { + return ' '; + } else { + return ' '; + } + } + + function disable(id) { + $.modal.confirm("确认要禁用吗?", function() { + $.operate.post(prefix + "/changeStatus", { "id": id, "status": 1 }); + }) + } + function enable(id) { + $.modal.confirm("确认要启用吗?", function() { + $.operate.post(prefix + "/changeStatus", { "id": id, "status": 0 }); + }) + } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRadar.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRadar.java index d1046c8..f0358fe 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRadar.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRadar.java @@ -37,6 +37,13 @@ public class SysRadar extends BaseEntity private Integer sort; + private Integer alarmValue1; + private Integer alarmValue2; + private Integer alarmValue3; + private Integer alarmValue4; + + private Integer status; + /** 删除标志(0代表存在 2代表删除) */ private String delFlag; @@ -93,6 +100,46 @@ public class SysRadar extends BaseEntity } + public Integer getAlarmValue1() { + return alarmValue1; + } + + public void setAlarmValue1(Integer alarmValue1) { + this.alarmValue1 = alarmValue1; + } + + public Integer getAlarmValue2() { + return alarmValue2; + } + + public void setAlarmValue2(Integer alarmValue2) { + this.alarmValue2 = alarmValue2; + } + + public Integer getAlarmValue3() { + return alarmValue3; + } + + public void setAlarmValue3(Integer alarmValue3) { + this.alarmValue3 = alarmValue3; + } + + public Integer getAlarmValue4() { + return alarmValue4; + } + + public void setAlarmValue4(Integer alarmValue4) { + this.alarmValue4 = alarmValue4; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -101,6 +148,11 @@ public class SysRadar extends BaseEntity .append("radarLocation", getRadarLocation()) .append("stationCode", getStationCode()) .append("sort", getSort()) + .append("alarmValue1", getAlarmValue1()) + .append("alarmValue2", getAlarmValue2()) + .append("alarmValue3", getAlarmValue3()) + .append("alarmValue4", getAlarmValue4()) + .append("status", getStatus()) .append("delFlag", getDelFlag()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) diff --git a/ruoyi-system/pom.xml b/ruoyi-system/pom.xml index cfa579a..a2633d9 100644 --- a/ruoyi-system/pom.xml +++ b/ruoyi-system/pom.xml @@ -6,7 +6,7 @@ ruoyi com.ruoyi 4.7.8 - + org.apache.maven.pluginsmaven-compiler-plugin88 4.0.0 ruoyi-system diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRadarMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRadarMapper.java index 02fe0ef..77927df 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRadarMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRadarMapper.java @@ -38,4 +38,7 @@ public interface SysRadarMapper */ public int updateRadar(SysRadar radar); + public int updateRadarValue(SysRadar radar); + public int updateStatus(SysRadar radar); + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRadarService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRadarService.java index f31f521..bfc0827 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRadarService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRadarService.java @@ -28,4 +28,8 @@ public interface ISysRadarService public SysRadar selectRadarById(Long id); public int updateUser(SysRadar radar); + + public int updateRadarValue(SysRadar radar); + + int changeStatus(SysRadar radar); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IdentifierStatusServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IdentifierStatusServiceImpl.java index 4798f9a..724f582 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IdentifierStatusServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IdentifierStatusServiceImpl.java @@ -4,14 +4,11 @@ import com.ruoyi.common.core.domain.entity.SysIdentifier; import com.ruoyi.common.core.domain.entity.SysPolice; import com.ruoyi.system.mapper.SysIdentifierMapper; import com.ruoyi.system.mapper.SysPoliceMapper; -import com.ruoyi.system.service.ISysIdentifierService; import com.ruoyi.system.service.IdentifierStatusService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; - -import javax.validation.Validator; import java.util.List; /** diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRadarServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRadarServiceImpl.java index 51fb4f8..d1e0514 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRadarServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRadarServiceImpl.java @@ -89,4 +89,18 @@ public class SysRadarServiceImpl implements ISysRadarService public int updateUser(SysRadar radar) { return radarMapper.updateRadar(radar); } + + @Override + public int updateRadarValue(SysRadar radar) { + return radarMapper.updateRadarValue(radar); + } + + @Override + public int changeStatus(SysRadar radar) { + + return radarMapper.updateStatus(radar); + } + + } + diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRadarMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRadarMapper.xml index 0d2cb7d..3f1036d 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysRadarMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysRadarMapper.xml @@ -10,6 +10,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + @@ -17,19 +22,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - - select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.sex, u.password, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.pwd_update_date, u.create_by, u.create_time, u.update_by, u.update_time, u.remark, - d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status, - r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status - from sys_user u - left join sys_dept d on u.dept_id = d.dept_id - left join sys_user_role ur on u.user_id = ur.user_id - left join sys_role r on r.role_id = ur.role_id - + - select r.id,r.radar_ip,r.radar_location,r.station_code,r.sort,r.create_by,r.create_time,r.update_by,r.update_time,r.remark from sys_radar r + select r.id,r.radar_ip,r.radar_location,r.station_code,r.alarm_value1,r.alarm_value2,r.alarm_value3,r.alarm_value4,r.status,r.sort,r.create_by,r.create_time,r.update_by,r.update_time,r.remark from sys_radar r where r.id = #{id} @@ -82,144 +88,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + update sys_radar + + status = #{status}, + update_time = sysdate() + + where id = #{id} + + + + update sys_radar + + alarm_value1 = #{alarmValue1}, + alarm_value2 = #{alarmValue2}, + alarm_value3 = #{alarmValue3}, + alarm_value4 = #{alarmValue4}, + update_time = sysdate() + + where id = #{id} + \ No newline at end of file