Commit bc2add3b authored by yaqizhang's avatar yaqizhang

Merge branch 'master' of ssh://111.61.77.35:15/gengdidi/gassafety-progress into master

parents 4e9040e7 5681ae07
......@@ -12,6 +12,7 @@ import com.zehong.system.service.ITDetectorInfoService;
import com.zehong.system.service.ITDetectorUserService;
import com.zehong.system.service.ITEmployedPeopleInfoService;
import com.zehong.web.codeconfig.CodeConFig;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
......@@ -90,11 +91,12 @@ public class TDeviceInfoController extends BaseController
{
//生成四位随机码
String code = CodeConFig.RandomCode();
listaw.gettDeviceInfo().setDeviceCode(code);
String intFlag = String.valueOf((int)(Math.random() * 1000000));
listaw.gettDeviceInfo().setDeviceCode(intFlag);
//添加设备信息表数据 并且返回新增id
tDeviceInfoService.insertTDeviceInfo(listaw.gettDeviceInfo());
if (listaw.gettDeviceInfoS()!=null){
if (CollectionUtils.isNotEmpty(listaw.gettDeviceInfoS())){
//将关联设备信息与设备进行绑定
tDeviceInfoService.updatetRelationDeviceDetailInfo(listaw.gettDeviceInfoS(),listaw.gettDeviceInfo().getDeviceId(),listaw.gettDeviceInfo().getRelationDeviceType());
}
......
......@@ -4,6 +4,7 @@ import java.util.List;
import com.zehong.system.domain.TTSiteStationInfoList;
import com.zehong.system.service.ITDeviceInfoService;
import com.zehong.system.service.ITEmployedPeopleInfoService;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -88,7 +89,7 @@ public class TSiteStationInfoController extends BaseController {
String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tSiteStationInfos.gettDeviceInfo().getBeyondEnterpriseId());
tSiteStationInfos.gettDeviceInfo().setBeyondEnterpriseName(EnterpriseName);
tSiteStationInfoService.insertTSiteStationInfo(tSiteStationInfos.gettDeviceInfo());
if (tSiteStationInfos.gettDeviceInfoS()!=null){
if (CollectionUtils.isNotEmpty(tSiteStationInfos.gettDeviceInfoS())){
//将关联设备信息与设备进行绑定
tDeviceInfoService.updatetRelationDeviceDetailInfo(tSiteStationInfos.gettDeviceInfoS(),tSiteStationInfos.gettDeviceInfo().getSiteStationId(),tSiteStationInfos.gettDeviceInfo().getRelationDeviceType());
}
......
......@@ -40,6 +40,9 @@ public class TSafeEquipmentStandingBook extends BaseEntity
@Excel(name = "联系电话")
private String linkMobile;
/** 安全装置类型 */
private String equipmentType;
/** 安装时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
......@@ -120,7 +123,16 @@ public class TSafeEquipmentStandingBook extends BaseEntity
{
return installTime;
}
public void setBrandName(String brandName)
public String getEquipmentType() {
return equipmentType;
}
public void setEquipmentType(String equipmentType) {
this.equipmentType = equipmentType;
}
public void setBrandName(String brandName)
{
this.brandName = brandName;
}
......
......@@ -21,6 +21,9 @@ public class TSafeEquipmentStandingBookForm
/** 联系电话 */
private String linkMobile;
/** 安全装置类型 */
private String equipmentType;
/** 安装起始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date installTimeStart;
......
......@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="userAddress" column="user_address" />
<result property="idCard" column="id_card" />
<result property="linkMobile" column="link_mobile" />
<result property="equipmentType" column="equipment_type" />
<result property="installTime" column="install_time" />
<result property="brandName" column="brand_name" />
<result property="createBy" column="create_by" />
......@@ -22,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTSafeEquipmentStandingBookVo">
select safe_equipment_id, user_name, user_no, user_address, id_card, link_mobile, install_time, brand_name, create_by, create_time, update_by, update_time, is_del, remarks from t_safe_equipment_standing_book
select safe_equipment_id, user_name, user_no, user_address, id_card, link_mobile, equipment_type, install_time, brand_name, create_by, create_time, update_by, update_time, is_del, remarks from t_safe_equipment_standing_book
</sql>
<select id="selectTSafeEquipmentStandingBookList" parameterType="TSafeEquipmentStandingBookForm" resultMap="TSafeEquipmentStandingBookResult">
......@@ -30,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> is_del = '0'
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="linkMobile != null and linkMobile != ''"> and link_mobile like concat('%', #{linkMobile}, '%')</if>
<if test="equipmentType != null and equipmentType != ''"> and equipment_type like concat('%', #{equipmentType}, '%')</if>
<if test="installTimeStart != null "> and install_time &gt;= #{installTimeStart}</if>
<if test="installTimeEnd != null "> and install_time &lt;= #{installTimeEnd}</if>
</where>
......@@ -50,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="idCard != null">id_card,</if>
<if test="linkMobile != null">link_mobile,</if>
<if test="installTime != null">install_time,</if>
<if test="equipmentType != null">equipment_type,</if>
<if test="brandName != null">brand_name,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
......@@ -65,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="idCard != null">#{idCard},</if>
<if test="linkMobile != null">#{linkMobile},</if>
<if test="installTime != null">#{installTime},</if>
<if test="equipmentType != null">#{equipmentType},</if>
<if test="brandName != null">#{brandName},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
......@@ -84,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="idCard != null">id_card = #{idCard},</if>
<if test="linkMobile != null">link_mobile = #{linkMobile},</if>
<if test="installTime != null">install_time = #{installTime},</if>
<if test="equipmentType != null">equipment_type = #{equipmentType},</if>
<if test="brandName != null">brand_name = #{brandName},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
......
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-03-10 10:33:35
* @LastEditTime: 2022-03-16 17:32:38
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
......@@ -18,7 +18,7 @@
<img src="@/assets/mapImages/closeBtn.png" alt="" />
</div>
<div class="top flex">
<!-- <div class="top flex">
<div class="group">
<div class="left">所属公司:</div>
<div class="right zzz">{{ companyType[deviceData.companyType] }}</div>
......@@ -47,6 +47,50 @@
</div>
<div v-else>-</div>
</div>
</div> -->
<div class="top flex">
<div class="top-left">
<div class="group">
<div class="left">所属公司:</div>
<div class="right zzz">{{ companyType[deviceData.companyType] }}</div>
</div>
<div class="group">
<div class="left">设备类型:</div>
<div class="right zzz">
{{ deviceType[deviceData.iconType] }}
</div>
</div>
<div class="group">
<div class="left last">设备地址:</div>
<div
v-if="deviceData.deviceAddr"
:title="deviceData.deviceAddr"
class="right last zzz"
>
{{ deviceData.deviceAddr || "-" }}
</div>
<div
v-else-if="deviceData.stationAddr"
:title="deviceData.stationAddr"
class="right last zzz"
>
{{ deviceData.stationAddr || "-" }}
</div>
<div v-else>-</div>
</div>
</div>
<div class="top-right">
<el-image
v-if="deviceData.pictureAddress"
style="width: 100px; height: 100px"
:src="deviceData.pictureAddress"
:preview-src-list="[deviceData.pictureAddress ]"
z-index=99999
>
</el-image>
<div class="imgtext" v-else>暂无图片</div>
</div>
</div>
<div class="middle">{{ profile }}</div>
......@@ -57,8 +101,8 @@
<div>设备数量</div>
<div>在线设备</div>
<div>离线设备</div>
<div>历史报警</div>
<div>已处理报警</div>
<!-- <div>历史报警</div>
<div>已处理报警</div> -->
<div class="last">报警中</div>
</div>
<template v-if="list.length > 0">
......@@ -77,12 +121,12 @@
<div v-unValue class="">
{{ deviceData.offlineEquipment }}
</div>
<div v-unValue class="">
<!-- <div v-unValue class="">
{{ deviceData.historicalAlarm }}
</div>
<div v-unValue class="">
{{ deviceData.alarmProcessed }}
</div>
</div> -->
<div v-unValue class="last">
{{ deviceData.inAlarm }}
</div>
......@@ -160,6 +204,8 @@ export default {
});
}
this.myHttp()
console.log(this.deviceData);
},
methods: {
......@@ -191,7 +237,7 @@ export default {
background-color: rgba(9, 18, 32, 0.6);
padding: 10px;
position: relative;
width: 700px;
width: 600px;
.title {
// padding-top: 10px;
// padding-left: 10px;
......@@ -211,28 +257,42 @@ export default {
margin-bottom: 10px;
border: 1px solid #cccccc;
box-sizing: border-box;
.group {
height: 30px;
.top-left {
flex: 1;
display: flex;
justify-content: space-between;
box-sizing: border-box;
div {
.group {
height: 40px;
flex: 1;
display: flex;
justify-content: space-between;
box-sizing: border-box;
border-right: 1px solid #cccccc;
text-align: center;
font-size: 14px;
color: #ffffff;
line-height: 30px;
padding: 0 5px;
&.last {
border-right: none;
div {
flex: 1;
box-sizing: border-box;
border-right: 1px solid #cccccc;
border-bottom: 1px solid #cccccc;
text-align: center;
font-size: 14px;
color: #ffffff;
line-height: 40px;
padding: 0 5px;
&.last {
border-bottom: none;
}
}
.left {
text-align: right;
background-color: rgba(255, 255, 255, 0.1);
}
}
.left {
text-align: right;
background-color: rgba(255, 255, 255, 0.1);
}
.top-right {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
.imgtext {
color: #ffffff;
font-size: 30px;
}
}
}
......
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-03-10 10:33:28
* @LastEditTime: 2022-03-16 17:29:11
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
......@@ -19,33 +19,47 @@
</div>
<div class="top flex">
<div class="group">
<div class="left">所属公司:</div>
<div class="right zzz">{{ companyType[deviceData.companyType] }}</div>
</div>
<div class="group">
<div class="left">设备类型:</div>
<div class="right zzz">
{{ deviceType[deviceData.iconType] }}
<div class="top-left">
<div class="group">
<div class="left">所属公司:</div>
<div class="right zzz">{{ companyType[deviceData.companyType] }}</div>
</div>
</div>
<div class="group">
<div class="left">设备地址:</div>
<div
v-if="deviceData.deviceAddr"
:title="deviceData.deviceAddr"
class="right last zzz"
>
{{ deviceData.deviceAddr || "-" }}
<div class="group">
<div class="left">设备类型:</div>
<div class="right zzz">
{{ deviceType[deviceData.iconType] }}
</div>
</div>
<div
v-else-if="deviceData.stationAddr"
:title="deviceData.stationAddr"
class="right last zzz"
>
{{ deviceData.stationAddr || "-" }}
<div class="group">
<div class="left last">设备地址:</div>
<div
v-if="deviceData.deviceAddr"
:title="deviceData.deviceAddr"
class="right last zzz"
>
{{ deviceData.deviceAddr || "-" }}
</div>
<div
v-else-if="deviceData.stationAddr"
:title="deviceData.stationAddr"
class="right last zzz"
>
{{ deviceData.stationAddr || "-" }}
</div>
<div v-else>-</div>
</div>
<div v-else>-</div>
</div>
<div class="top-right">
<el-image
v-if="deviceData.iconUrl"
style="width: 100px; height: 100px"
:src="deviceData.iconUrl"
:preview-src-list="[deviceData.iconUrl ]"
z-index=99999
>
</el-image>
<div class="imgtext" v-else>暂无图片</div>
</div>
</div>
......@@ -57,8 +71,8 @@
<div>设备数量</div>
<div>在线设备</div>
<div>离线设备</div>
<div>历史报警</div>
<div>已处理报警</div>
<!-- <div>历史报警</div>
<div>已处理报警</div> -->
<div class="last">报警中</div>
</div>
<template v-if="list.length > 0">
......@@ -77,12 +91,12 @@
<div v-unValue class="">
{{ deviceData.offlineEquipment }}
</div>
<div v-unValue class="">
<!-- <div v-unValue class="">
{{ deviceData.historicalAlarm }}
</div>
<div v-unValue class="">
{{ deviceData.alarmProcessed }}
</div>
</div> -->
<div v-unValue class="last">
{{ deviceData.inAlarm }}
</div>
......@@ -90,7 +104,7 @@
</template>
</div>
<div class="btn" v-if="list.length>0">
<div class="btn" v-if="list.length > 0">
<div @click="btnClick">感知设备</div>
</div>
</div>
......@@ -160,7 +174,7 @@ export default {
}
// 当点开infowindow的时候,重新调接口
this.myHttp();
// console.log(this.deviceData);
console.log(this.deviceData);
},
methods: {
close() {
......@@ -206,7 +220,7 @@ export default {
background-color: rgba(9, 18, 32, 0.6);
padding: 10px;
position: relative;
width: 700px;
width: 600px;
.title {
// padding-top: 10px;
// padding-left: 10px;
......@@ -226,28 +240,42 @@ export default {
margin-bottom: 10px;
border: 1px solid #cccccc;
box-sizing: border-box;
.group {
height: 30px;
.top-left {
flex: 1;
display: flex;
justify-content: space-between;
box-sizing: border-box;
div {
.group {
height: 40px;
flex: 1;
display: flex;
justify-content: space-between;
box-sizing: border-box;
border-right: 1px solid #cccccc;
text-align: center;
font-size: 14px;
color: #ffffff;
line-height: 30px;
padding: 0 5px;
&.last {
border-right: none;
div {
flex: 1;
box-sizing: border-box;
border-right: 1px solid #cccccc;
border-bottom: 1px solid #cccccc;
text-align: center;
font-size: 14px;
color: #ffffff;
line-height: 40px;
padding: 0 5px;
&.last {
border-bottom: none;
}
}
.left {
text-align: right;
background-color: rgba(255, 255, 255, 0.1);
}
}
.left {
text-align: right;
background-color: rgba(255, 255, 255, 0.1);
}
.top-right {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
.imgtext {
color: #ffffff;
font-size: 30px;
}
}
}
......
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-03-07 14:02:43
* @LastEditTime: 2022-03-17 09:05:30
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
......@@ -16,10 +16,10 @@
<img src="@/assets/mapImages/closeBtn.png" alt="" />
</div>
<div class="top flex">
<div class="top flex top-top">
<div class="group">
<div class="left">联系人:</div>
<div class="right zzz">{{ deviceData.nickName }}</div>
<div class="right zzz">{{ 1 }}</div>
</div>
<div class="group">
<div class="left">联系电话:</div>
......@@ -35,6 +35,15 @@
</div>
</div>
<div class="top flex top-bottom">
<div class="group">
<div class="left">联系地址:</div>
<div :title="deviceData.address" class="right last zzz">
{{ deviceData.address || "-" }}
</div>
</div>
</div>
<template v-if="deviceData.detectorCountList">
<div class="foot">
<div class="thead flex">
......@@ -42,8 +51,8 @@
<div>设备数量</div>
<div>在线设备</div>
<div>离线设备</div>
<div>历史报警</div>
<div>已处理报警</div>
<!-- <div>历史报警</div>
<div>已处理报警</div> -->
<div class="last">报警中</div>
</div>
<div
......@@ -59,12 +68,12 @@
<div v-unValue class="">
{{ data.offLineNum }}
</div>
<div v-unValue class="">
<!-- <div v-unValue class="">
{{ data.historyAlarmNum }}
</div>
<div v-unValue class="">
{{ data.cancelAlarmNum }}
</div>
</div> -->
<div v-unValue class="last zzz">
{{ data.processingAlarmNum }}
</div>
......@@ -140,7 +149,7 @@ export default {
background-color: rgba(9, 18, 32, 0.6);
padding: 10px;
position: relative;
width: 700px;
width: 600px;
.title {
// padding-top: 10px;
// padding-left: 10px;
......@@ -160,6 +169,11 @@ export default {
margin-bottom: 10px;
border: 1px solid #cccccc;
box-sizing: border-box;
&.top-top {
div{
width: 33%;
}
}
.group {
height: 30px;
flex: 1;
......@@ -175,6 +189,7 @@ export default {
color: #ffffff;
line-height: 30px;
padding: 0 5px;
&.last {
border-right: none;
}
......@@ -184,6 +199,15 @@ export default {
background-color: rgba(255, 255, 255, 0.1);
}
}
&.top-bottom {
.left {
flex: none;
width: 192px !important;
}
.right {
flex: 1;
}
}
}
.middle {
width: 100%;
......
/*
* @Author: your name
* @Date: 2022-01-11 13:45:12
* @LastEditTime: 2022-03-15 13:50:27
* @LastEditTime: 2022-03-16 15:06:43
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/utils/mapClass.js
......@@ -79,17 +79,25 @@ export class EditorMap {
// 获取朝阳区的边界信息
var bounds = result.districtList[0].boundaries;
var polygons = [];
console.log("boundsboundsboundsboundsbounds",bounds)
if (bounds) {
for (var i = 0, l = bounds.length; i < l; i++) {
//生成行政区划polygon
new AMap.Polygon({
// new AMap.Polygon({
// map: this.map,
// strokeWeight: 2,
// path: bounds[i],
// fillOpacity: 1,
// fillColor: "transparent",
// strokeColor: "#09f",
// });
new AMap.Polyline({
map: this.map,
strokeWeight: 2,
path: bounds[i],
fillOpacity: 1,
fillColor: "transparent",
strokeWeight: 4,
strokeColor: "#09f",
});
path: bounds[i],
})
// polygons.push(polygon);
}
}
......
......@@ -162,6 +162,20 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="装置类型" prop="equipments">
<el-select placeholder="请选择装置类型" v-model="form.equipments" multiple filterable clearable style="width: 100%" onchange="change()">
<el-option
v-for="dict in options"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="备注信息" prop="remarks">
......@@ -203,6 +217,20 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="装置类型" prop="equipments">
<el-select placeholder="请选择装置类型" v-model="detailForm.equipments" multiple filterable style="width: 100%" disabled>
<el-option
v-for="dict in options"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="详细地址:">
......@@ -239,14 +267,14 @@ export default {
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 用户加装安全装置台账表格数据
equipmentList: [],
// 装置类型字典
options: [],
// 弹出层标题
title1: "",
title2: "",
......@@ -282,6 +310,9 @@ export default {
{ required: true, message: "请输入身份证号", trigger: "blur" },
{ min: 18, max: 18, message: "长度18位", trigger: "blur" },
],
equipments: [
{ required: true, message: "请选择装置类型", trigger: "blur" }
],
installTime: [
{ required: true, message: "选择安装时间", trigger: "change" },
],
......@@ -292,6 +323,9 @@ export default {
this.getList();
},
methods: {
change(){
},
/** 查询用户加装安全装置台账列表 */
getList() {
this.loading = true;
......@@ -320,6 +354,8 @@ export default {
idCard: null,
linkMobile: null,
installTime: null,
equipmentType: null,
equipments: [],
brandName: null,
createBy: null,
createTime: null,
......@@ -339,6 +375,8 @@ export default {
idCard: null,
linkMobile: null,
installTime: null,
equipmentType: null,
equipments: [],
brandName: null,
createBy: null,
createTime: null,
......@@ -371,14 +409,25 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset1();
this.getDicts("t_equipment_type").then(response => {
this.options = response.data;
});
this.open1 = true;
this.title1 = "添加用户加装安全装置台账";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset1();
this.getDicts("t_equipment_type").then(response => {
this.options = response.data;
});
getEquipment(row.safeEquipmentId).then(response => {
this.form = response.data;
let data = response.data;
data.equipments = [];
this.form = data;
if(this.form.equipmentType){
this.form.equipments = this.form.equipmentType.split(",");
}
this.open1 = true;
this.title1 = "修改用户加装安全装置台账";
});
......@@ -387,6 +436,8 @@ export default {
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
var str = this.form.equipments.toString();
this.form.equipmentType = str;
if (this.form.safeEquipmentId != null) {
updateEquipment(this.form).then(response => {
this.msgSuccess("修改成功");
......@@ -438,6 +489,7 @@ export default {
this.reset2();
getEquipment(row.safeEquipmentId).then(response => {
this.detailForm = response.data;
this.detailForm.equipments = this.detailForm.equipmentType.split(",");
this.open2 = true;
this.title2 = "用户加装安全装置台账详情";
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment