港口开发部分修改
This commit is contained in:
parent
6d7c2e9ce8
commit
9568f7b59c
|
@ -68,6 +68,11 @@ public class ThDevice extends BaseEntity {
|
|||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 港区
|
||||
*/
|
||||
private String gangqu;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
|
@ -127,6 +132,14 @@ public class ThDevice extends BaseEntity {
|
|||
*/
|
||||
private BigDecimal ds;
|
||||
|
||||
public String getGangqu() {
|
||||
return gangqu;
|
||||
}
|
||||
|
||||
public void setGangqu(String gangqu) {
|
||||
this.gangqu = gangqu;
|
||||
}
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
|
|
|
@ -19,6 +19,14 @@ public class ThDeviceReport extends BaseEntity {
|
|||
* 设备sn码
|
||||
*/
|
||||
private String sn;
|
||||
/**
|
||||
* 港区
|
||||
*/
|
||||
private String gangqu;
|
||||
|
||||
private String deptName;
|
||||
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 上报时间
|
||||
|
@ -109,6 +117,32 @@ public class ThDeviceReport extends BaseEntity {
|
|||
return id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getGangqu() {
|
||||
return gangqu;
|
||||
}
|
||||
|
||||
public void setGangqu(String gangqu) {
|
||||
this.gangqu = gangqu;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,10 @@ public class SysDept extends BaseEntity
|
|||
|
||||
/** 部门名称 */
|
||||
private String deptName;
|
||||
/**
|
||||
* 层级
|
||||
*/
|
||||
private String deptLevel;
|
||||
|
||||
/** 显示顺序 */
|
||||
private Integer orderNum;
|
||||
|
@ -108,6 +112,14 @@ public class SysDept extends BaseEntity
|
|||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public String getDeptLevel() {
|
||||
return deptLevel;
|
||||
}
|
||||
|
||||
public void setDeptLevel(String deptLevel) {
|
||||
this.deptLevel = deptLevel;
|
||||
}
|
||||
|
||||
public String getLeader()
|
||||
{
|
||||
return leader;
|
||||
|
@ -141,6 +153,8 @@ public class SysDept extends BaseEntity
|
|||
this.email = email;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
|
|
|
@ -237,14 +237,14 @@ public class SysDeptServiceImpl implements ISysDeptService
|
|||
String newAncestors = newParentDept.getAncestors() + "," + newParentDept.getDeptId();
|
||||
String oldAncestors = oldDept.getAncestors();
|
||||
dept.setAncestors(newAncestors);
|
||||
updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors);
|
||||
// updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors);
|
||||
}
|
||||
int result = deptMapper.updateDept(dept);
|
||||
if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()) && StringUtils.isNotEmpty(dept.getAncestors())
|
||||
&& !StringUtils.equals("0", dept.getAncestors()))
|
||||
{
|
||||
// 如果该部门是启用状态,则启用该部门的所有上级部门
|
||||
updateParentDeptStatusNormal(dept);
|
||||
// updateParentDeptStatusNormal(dept);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -74,11 +74,13 @@ spring:
|
|||
redis:
|
||||
# 地址
|
||||
host: 192.168.31.105
|
||||
#host: 127.0.0.1
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 密码
|
||||
#password: 123456
|
||||
password: admin123!
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
|
|
|
@ -82,7 +82,6 @@
|
|||
select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t.dept_id,d.dept_name,longitude,latitude
|
||||
from th_device t left join sys_dept d on t.dept_id=d.dept_id
|
||||
<where>
|
||||
t.status=1
|
||||
<if test="id != null and id != ''">and t.id=#{id}</if>
|
||||
<if test="monitorName != null and monitorName != ''">and t.name like concat('%', #{monitorName},'%') </if>
|
||||
<if test="monitorNo != null and monitorNo != ''">and t.sn= #{monitorNo} </if>
|
||||
|
@ -97,7 +96,7 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t
|
|||
<insert id="insertOilMonitor">
|
||||
insert into th_device
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
status,
|
||||
|
||||
<if test="monitorName != null">name,</if>
|
||||
<if test="monitorNo != null">sn,</if>
|
||||
<if test="note != null">note,</if>
|
||||
|
@ -110,7 +109,6 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t
|
|||
<if test="latitude != null">latitude,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
1,
|
||||
<if test="monitorName != null">#{monitorName},</if>
|
||||
<if test="monitorNo != null">#{monitorNo},</if>
|
||||
<if test="note != null">#{note},</if>
|
||||
|
@ -141,10 +139,8 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t
|
|||
</update>
|
||||
|
||||
<delete id="deleteOilMonitorByIds">
|
||||
update th_device
|
||||
set status=0
|
||||
where id in
|
||||
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
||||
delete from th_device where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
@ -428,7 +424,7 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t
|
|||
</select>
|
||||
|
||||
<select id="querryMinitorTotal" resultType="java.lang.Integer">
|
||||
select count(*) from th_device where status='1'
|
||||
select count(*) from th_device
|
||||
</select>
|
||||
|
||||
<select id="querryAlarmTotal" resultType="java.lang.Integer">
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
<result property="longitude" column="longitude" jdbcType="VARCHAR"/>
|
||||
<result property="latitude" column="latitude" jdbcType="VARCHAR"/>
|
||||
<result property="deptName" column="dept_name" jdbcType="VARCHAR"/>
|
||||
<result property="gangqu" column="gangqu" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
|
@ -37,9 +38,11 @@
|
|||
d.dept_id,
|
||||
d.longitude,
|
||||
d.latitude,
|
||||
p.dept_name
|
||||
p.dept_name,
|
||||
pp.dept_name as "gangqu"
|
||||
from th_device d
|
||||
left join sys_dept p on d.dept_id = p.dept_id
|
||||
left join sys_dept pp on p.parent_id = pp.dept_id
|
||||
</sql>
|
||||
|
||||
<select id="selectDeviceListByDeptId" parameterType="long" resultMap="BaseResultMap">
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.project.system.mapper.SysDeptMapper">
|
||||
|
||||
<resultMap type="SysDept" id="SysDeptResult">
|
||||
<resultMap type="com.ruoyi.project.system.domain.SysDept" id="SysDeptResult">
|
||||
<id property="deptId" column="dept_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="ancestors" column="ancestors" />
|
||||
|
@ -20,14 +20,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="deptLevel" column="dept_level" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeptVo">
|
||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
|
||||
select d.dept_id,d.dept_level, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
|
||||
from sys_dept d
|
||||
</sql>
|
||||
|
||||
<select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
|
||||
<select id="selectDeptList" parameterType="com.ruoyi.project.system.domain.SysDept" resultMap="SysDeptResult">
|
||||
<include refid="selectDeptVo"/>
|
||||
where d.del_flag = '0'
|
||||
<if test="deptId != null and deptId != 0">
|
||||
|
@ -59,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
|
||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,
|
||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,d.dept_level,
|
||||
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
|
||||
from sys_dept d
|
||||
where d.dept_id = #{deptId}
|
||||
|
@ -87,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' and rownum <![CDATA[ <= ]]> 1
|
||||
</select>
|
||||
|
||||
<insert id="insertDept" parameterType="SysDept">
|
||||
<insert id="insertDept" parameterType="com.ruoyi.project.system.domain.SysDept">
|
||||
<selectKey keyProperty="deptId" order="BEFORE" resultType="Long">
|
||||
select seq_sys_dept.nextval as deptId from DUAL
|
||||
</selectKey>
|
||||
|
@ -102,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="email != null and email != ''">email,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="deptevel != null and deptLevel != ''">dept_level,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="deptId != null and deptId != 0">#{deptId},</if>
|
||||
|
@ -114,11 +116,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="email != null and email != ''">#{email},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="deptLevel != null and deptLevel != ''">#{deptLevel},</if>
|
||||
sysdate
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateDept" parameterType="SysDept">
|
||||
<update id="updateDept" parameterType="com.ruoyi.project.system.domain.SysDept">
|
||||
update sys_dept
|
||||
<set>
|
||||
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
|
||||
|
@ -130,6 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="email != null">email = #{email},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="deptLevel != null and deptLevel != ''">dept_level=#{deptLevel},</if>
|
||||
update_time = sysdate
|
||||
</set>
|
||||
where dept_id = #{deptId}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<div class="data-monitor">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="18">
|
||||
<el-col :span="16">
|
||||
<SearchBar @queryChange="handleQueryChange" />
|
||||
<LeftTop :queryParam="queryParam" :selectedDept="selectedDept" />
|
||||
<LeftBottom :queryParam="queryParam" :selectedDept="selectedDept" />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="8">
|
||||
<RightTop :queryParam="queryParam" @deptSelect="deptSelect" />
|
||||
<RightBottom :selectedDept="selectedDept" />
|
||||
</el-col>
|
||||
|
|
|
@ -57,30 +57,25 @@ export default {
|
|||
return {
|
||||
tableData: [],
|
||||
tableColumns: [
|
||||
{
|
||||
label: "序号",
|
||||
prop: "id",
|
||||
},
|
||||
{
|
||||
label: "设备编号",
|
||||
prop: "sn",
|
||||
},
|
||||
// {
|
||||
// label: "序号",
|
||||
// prop: "id",
|
||||
// },
|
||||
{
|
||||
label: "上报时间",
|
||||
prop: "reportTime",
|
||||
},
|
||||
|
||||
{
|
||||
label: "设备编号",
|
||||
prop: "sn",
|
||||
},
|
||||
|
||||
{
|
||||
label: "读数",
|
||||
prop: "ds",
|
||||
},
|
||||
{
|
||||
label: "低报值",
|
||||
prop: "dbz",
|
||||
},
|
||||
{
|
||||
label: "高报值",
|
||||
prop: "gbz",
|
||||
},
|
||||
|
||||
],
|
||||
pager: {
|
||||
pageNum: 1,
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<div>
|
||||
<baidu-map
|
||||
:center="position"
|
||||
:zoom="13"
|
||||
:scroll-wheel-zoom="true"
|
||||
style="width: auto; height: 40vh"
|
||||
:zoom="16" :scroll-wheel-zoom=true
|
||||
style="width: auto; height: 40vh;"
|
||||
:map-type="currentMapType"
|
||||
>
|
||||
<bm-map-type
|
||||
:map-types="['BMAP_NORMAL_MAP', 'BMAP_HYBRID_MAP']"
|
||||
|
@ -37,5 +37,10 @@ export default {
|
|||
};
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentMapType: 'BMAP_HYBRID_MAP',
|
||||
|
||||
}}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="name" label="名称" show-overflow-tooltip>
|
||||
<el-table-column property="sn" label="设备编号" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column property="address" label="地址" show-overflow-tooltip>
|
||||
<el-table-column property="gangqu" label="港区" show-overflow-tooltip/>
|
||||
<el-table-column property="deptName" label="归属企业" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
|
|
|
@ -6,16 +6,19 @@
|
|||
</el-col>
|
||||
<el-col :span="6" style="margin-top: 10px; margin-bottom: 10px">
|
||||
<!-- 时间范围选择 -->
|
||||
<el-date-picker
|
||||
v-model="dateValue"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="handleDateChange"
|
||||
>
|
||||
<el-date-picker v-model="dateValue" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" @change="handleDateChange">
|
||||
</el-date-picker>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-radio-group v-model="deptId" @change="handleRadioDeptChange">
|
||||
<el-radio-button :label="229">青岛港</el-radio-button>
|
||||
<el-radio-button :label="230">日照港</el-radio-button>
|
||||
<el-radio-button :label="231">烟台港</el-radio-button>
|
||||
<el-radio-button :label="232">渤海湾港</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -30,6 +33,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
// chooseDept:null,
|
||||
deptId: "",
|
||||
dateValue: [],
|
||||
normalizer(node) {
|
||||
|
@ -59,6 +63,10 @@ export default {
|
|||
`${year}-${month}-${day} 23:59:59`,
|
||||
];
|
||||
},
|
||||
handleRadioDeptChange(value) {
|
||||
this.deptId = value
|
||||
this.emitChange();
|
||||
},
|
||||
handleDeptChange(value) {
|
||||
this.deptId = value.deptId;
|
||||
this.emitChange();
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
>
|
||||
<el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
|
||||
<el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
|
||||
<el-table-column prop="deptLevel" label="层级" width="200"></el-table-column>
|
||||
<el-table-column prop="status" label="状态" width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
||||
|
@ -136,6 +137,11 @@
|
|||
<el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="部门层级" prop="deptLevel">
|
||||
<el-input v-model="form.deptLevel" placeholder="请输入部门层级" maxlength="50" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="部门状态">
|
||||
<el-radio-group v-model="form.status">
|
||||
|
|
Loading…
Reference in New Issue