港口开发部分修改

This commit is contained in:
gongjiale 2024-09-09 17:22:18 +08:00
parent 6d7c2e9ce8
commit 9568f7b59c
14 changed files with 129 additions and 49 deletions

View File

@ -68,6 +68,11 @@ public class ThDevice extends BaseEntity {
*/ */
private String deptName; private String deptName;
/**
* 港区
*/
private String gangqu;
/** /**
* 经度 * 经度
*/ */
@ -127,6 +132,14 @@ public class ThDevice extends BaseEntity {
*/ */
private BigDecimal ds; private BigDecimal ds;
public String getGangqu() {
return gangqu;
}
public void setGangqu(String gangqu) {
this.gangqu = gangqu;
}
/** /**
* 单位 * 单位
*/ */

View File

@ -19,6 +19,14 @@ public class ThDeviceReport extends BaseEntity {
* 设备sn码 * 设备sn码
*/ */
private String sn; private String sn;
/**
* 港区
*/
private String gangqu;
private String deptName;
private Long deptId;
/** /**
* 上报时间 * 上报时间
@ -109,6 +117,32 @@ public class ThDeviceReport extends BaseEntity {
return id; 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) { public void setId(Long id) {
this.id = id; this.id = id;
} }

View File

@ -30,6 +30,10 @@ public class SysDept extends BaseEntity
/** 部门名称 */ /** 部门名称 */
private String deptName; private String deptName;
/**
* 层级
*/
private String deptLevel;
/** 显示顺序 */ /** 显示顺序 */
private Integer orderNum; private Integer orderNum;
@ -108,6 +112,14 @@ public class SysDept extends BaseEntity
this.orderNum = orderNum; this.orderNum = orderNum;
} }
public String getDeptLevel() {
return deptLevel;
}
public void setDeptLevel(String deptLevel) {
this.deptLevel = deptLevel;
}
public String getLeader() public String getLeader()
{ {
return leader; return leader;
@ -141,6 +153,8 @@ public class SysDept extends BaseEntity
this.email = email; this.email = email;
} }
public String getStatus() public String getStatus()
{ {
return status; return status;

View File

@ -237,14 +237,14 @@ public class SysDeptServiceImpl implements ISysDeptService
String newAncestors = newParentDept.getAncestors() + "," + newParentDept.getDeptId(); String newAncestors = newParentDept.getAncestors() + "," + newParentDept.getDeptId();
String oldAncestors = oldDept.getAncestors(); String oldAncestors = oldDept.getAncestors();
dept.setAncestors(newAncestors); dept.setAncestors(newAncestors);
updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors); // updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors);
} }
int result = deptMapper.updateDept(dept); int result = deptMapper.updateDept(dept);
if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()) && StringUtils.isNotEmpty(dept.getAncestors()) if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()) && StringUtils.isNotEmpty(dept.getAncestors())
&& !StringUtils.equals("0", dept.getAncestors())) && !StringUtils.equals("0", dept.getAncestors()))
{ {
// 如果该部门是启用状态则启用该部门的所有上级部门 // 如果该部门是启用状态则启用该部门的所有上级部门
updateParentDeptStatusNormal(dept); // updateParentDeptStatusNormal(dept);
} }
return result; return result;
} }

View File

@ -74,11 +74,13 @@ spring:
redis: redis:
# 地址 # 地址
host: 192.168.31.105 host: 192.168.31.105
#host: 127.0.0.1
# 端口默认为6379 # 端口默认为6379
port: 6379 port: 6379
# 数据库索引 # 数据库索引
database: 0 database: 0
# 密码 # 密码
#password: 123456
password: admin123! password: admin123!
# 连接超时时间 # 连接超时时间
timeout: 10s timeout: 10s

View File

@ -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 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 from th_device t left join sys_dept d on t.dept_id=d.dept_id
<where> <where>
t.status=1
<if test="id != null and id != ''">and t.id=#{id}</if> <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="monitorName != null and monitorName != ''">and t.name like concat('%', #{monitorName},'%') </if>
<if test="monitorNo != null and monitorNo != ''">and t.sn= #{monitorNo} </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 id="insertOilMonitor">
insert into th_device insert into th_device
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
status,
<if test="monitorName != null">name,</if> <if test="monitorName != null">name,</if>
<if test="monitorNo != null">sn,</if> <if test="monitorNo != null">sn,</if>
<if test="note != null">note,</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> <if test="latitude != null">latitude,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
1,
<if test="monitorName != null">#{monitorName},</if> <if test="monitorName != null">#{monitorName},</if>
<if test="monitorNo != null">#{monitorNo},</if> <if test="monitorNo != null">#{monitorNo},</if>
<if test="note != null">#{note},</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> </update>
<delete id="deleteOilMonitorByIds"> <delete id="deleteOilMonitorByIds">
update th_device delete from th_device where id in
set status=0 <foreach item="id" collection="array" open="(" separator="," close=")">
where id in
<foreach item="id" collection="ids" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</delete> </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>
<select id="querryMinitorTotal" resultType="java.lang.Integer"> <select id="querryMinitorTotal" resultType="java.lang.Integer">
select count(*) from th_device where status='1' select count(*) from th_device
</select> </select>
<select id="querryAlarmTotal" resultType="java.lang.Integer"> <select id="querryAlarmTotal" resultType="java.lang.Integer">

View File

@ -20,6 +20,7 @@
<result property="longitude" column="longitude" jdbcType="VARCHAR"/> <result property="longitude" column="longitude" jdbcType="VARCHAR"/>
<result property="latitude" column="latitude" jdbcType="VARCHAR"/> <result property="latitude" column="latitude" jdbcType="VARCHAR"/>
<result property="deptName" column="dept_name" jdbcType="VARCHAR"/> <result property="deptName" column="dept_name" jdbcType="VARCHAR"/>
<result property="gangqu" column="gangqu" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
@ -37,9 +38,11 @@
d.dept_id, d.dept_id,
d.longitude, d.longitude,
d.latitude, d.latitude,
p.dept_name p.dept_name,
pp.dept_name as "gangqu"
from th_device d from th_device d
left join sys_dept p on d.dept_id = p.dept_id 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> </sql>
<select id="selectDeviceListByDeptId" parameterType="long" resultMap="BaseResultMap"> <select id="selectDeviceListByDeptId" parameterType="long" resultMap="BaseResultMap">

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.project.system.mapper.SysDeptMapper"> <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" /> <id property="deptId" column="dept_id" />
<result property="parentId" column="parent_id" /> <result property="parentId" column="parent_id" />
<result property="ancestors" column="ancestors" /> <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="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="deptLevel" column="dept_level" />
</resultMap> </resultMap>
<sql id="selectDeptVo"> <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 from sys_dept d
</sql> </sql>
<select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult"> <select id="selectDeptList" parameterType="com.ruoyi.project.system.domain.SysDept" resultMap="SysDeptResult">
<include refid="selectDeptVo"/> <include refid="selectDeptVo"/>
where d.del_flag = '0' where d.del_flag = '0'
<if test="deptId != null and deptId != 0"> <if test="deptId != null and deptId != 0">
@ -59,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult"> <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 (select dept_name from sys_dept where dept_id = d.parent_id) parent_name
from sys_dept d from sys_dept d
where d.dept_id = #{deptId} 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 where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' and rownum <![CDATA[ <= ]]> 1
</select> </select>
<insert id="insertDept" parameterType="SysDept"> <insert id="insertDept" parameterType="com.ruoyi.project.system.domain.SysDept">
<selectKey keyProperty="deptId" order="BEFORE" resultType="Long"> <selectKey keyProperty="deptId" order="BEFORE" resultType="Long">
select seq_sys_dept.nextval as deptId from DUAL select seq_sys_dept.nextval as deptId from DUAL
</selectKey> </selectKey>
@ -102,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="email != null and email != ''">email,</if> <if test="email != null and email != ''">email,</if>
<if test="status != null">status,</if> <if test="status != null">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
<if test="deptevel != null and deptLevel != ''">dept_level,</if>
create_time create_time
)values( )values(
<if test="deptId != null and deptId != 0">#{deptId},</if> <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="email != null and email != ''">#{email},</if>
<if test="status != null">#{status},</if> <if test="status != null">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="deptLevel != null and deptLevel != ''">#{deptLevel},</if>
sysdate sysdate
) )
</insert> </insert>
<update id="updateDept" parameterType="SysDept"> <update id="updateDept" parameterType="com.ruoyi.project.system.domain.SysDept">
update sys_dept update sys_dept
<set> <set>
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if> <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="email != null">email = #{email},</if>
<if test="status != null and status != ''">status = #{status},</if> <if test="status != null and status != ''">status = #{status},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="deptLevel != null and deptLevel != ''">dept_level=#{deptLevel},</if>
update_time = sysdate update_time = sysdate
</set> </set>
where dept_id = #{deptId} where dept_id = #{deptId}

View File

@ -1,12 +1,12 @@
<template> <template>
<div class="data-monitor"> <div class="data-monitor">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="18"> <el-col :span="16">
<SearchBar @queryChange="handleQueryChange" /> <SearchBar @queryChange="handleQueryChange" />
<LeftTop :queryParam="queryParam" :selectedDept="selectedDept" /> <LeftTop :queryParam="queryParam" :selectedDept="selectedDept" />
<LeftBottom :queryParam="queryParam" :selectedDept="selectedDept" /> <LeftBottom :queryParam="queryParam" :selectedDept="selectedDept" />
</el-col> </el-col>
<el-col :span="6"> <el-col :span="8">
<RightTop :queryParam="queryParam" @deptSelect="deptSelect" /> <RightTop :queryParam="queryParam" @deptSelect="deptSelect" />
<RightBottom :selectedDept="selectedDept" /> <RightBottom :selectedDept="selectedDept" />
</el-col> </el-col>

View File

@ -57,30 +57,25 @@ export default {
return { return {
tableData: [], tableData: [],
tableColumns: [ tableColumns: [
{ // {
label: "序号", // label: "",
prop: "id", // prop: "id",
}, // },
{
label: "设备编号",
prop: "sn",
},
{ {
label: "上报时间", label: "上报时间",
prop: "reportTime", prop: "reportTime",
}, },
{
label: "设备编号",
prop: "sn",
},
{ {
label: "读数", label: "读数",
prop: "ds", prop: "ds",
}, },
{
label: "低报值",
prop: "dbz",
},
{
label: "高报值",
prop: "gbz",
},
], ],
pager: { pager: {
pageNum: 1, pageNum: 1,

View File

@ -2,9 +2,9 @@
<div> <div>
<baidu-map <baidu-map
:center="position" :center="position"
:zoom="13" :zoom="16" :scroll-wheel-zoom=true
:scroll-wheel-zoom="true" style="width: auto; height: 40vh;"
style="width: auto; height: 40vh" :map-type="currentMapType"
> >
<bm-map-type <bm-map-type
:map-types="['BMAP_NORMAL_MAP', 'BMAP_HYBRID_MAP']" :map-types="['BMAP_NORMAL_MAP', 'BMAP_HYBRID_MAP']"
@ -37,5 +37,10 @@ export default {
}; };
}, },
}, },
data() {
return {
currentMapType: 'BMAP_HYBRID_MAP',
}}
}; };
</script> </script>

View File

@ -22,10 +22,10 @@
> >
</template> </template>
</el-table-column> </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>
<el-table-column property="gangqu" label="港区" show-overflow-tooltip/>
<el-table-column property="address" label="地址" show-overflow-tooltip> <el-table-column property="deptName" label="归属企业" show-overflow-tooltip>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination

View File

@ -6,16 +6,19 @@
</el-col> </el-col>
<el-col :span="6" style="margin-top: 10px; margin-bottom: 10px"> <el-col :span="6" style="margin-top: 10px; margin-bottom: 10px">
<!-- 时间范围选择 --> <!-- 时间范围选择 -->
<el-date-picker <el-date-picker v-model="dateValue" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
v-model="dateValue" :default-time="['00:00:00', '23:59:59']" @change="handleDateChange">
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
@change="handleDateChange"
>
</el-date-picker> </el-date-picker>
</el-col> </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> </el-row>
</div> </div>
</template> </template>
@ -30,6 +33,7 @@ export default {
}, },
data() { data() {
return { return {
// chooseDept:null,
deptId: "", deptId: "",
dateValue: [], dateValue: [],
normalizer(node) { normalizer(node) {
@ -59,6 +63,10 @@ export default {
`${year}-${month}-${day} 23:59:59`, `${year}-${month}-${day} 23:59:59`,
]; ];
}, },
handleRadioDeptChange(value) {
this.deptId = value
this.emitChange();
},
handleDeptChange(value) { handleDeptChange(value) {
this.deptId = value.deptId; this.deptId = value.deptId;
this.emitChange(); this.emitChange();

View File

@ -58,6 +58,7 @@
> >
<el-table-column prop="deptName" label="部门名称" width="260"></el-table-column> <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="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"> <el-table-column prop="status" label="状态" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> <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-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
</el-form-item> </el-form-item>
</el-col> </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-col :span="12">
<el-form-item label="部门状态"> <el-form-item label="部门状态">
<el-radio-group v-model="form.status"> <el-radio-group v-model="form.status">