Commit d63ed985 authored by zhangjianqian's avatar zhangjianqian

重大隐患跟踪,特殊人员上报接口

parent 1b8f23b3
...@@ -3160,7 +3160,7 @@ public class lpgGasController { ...@@ -3160,7 +3160,7 @@ public class lpgGasController {
* 封装一个 失败的接口对象 * 封装一个 失败的接口对象
* @return r * @return r
*/ */
private TLpgThirdPartyDockingInterfaceRecord errorRecord(String interfaceName,String receiveData, public TLpgThirdPartyDockingInterfaceRecord errorRecord(String interfaceName,String receiveData,
String failureReason,String qybm){ String failureReason,String qybm){
TLpgThirdPartyDockingInterfaceRecord lpgThirdPartyDockingInterfaceRecord = new TLpgThirdPartyDockingInterfaceRecord(); TLpgThirdPartyDockingInterfaceRecord lpgThirdPartyDockingInterfaceRecord = new TLpgThirdPartyDockingInterfaceRecord();
...@@ -3179,7 +3179,7 @@ public class lpgGasController { ...@@ -3179,7 +3179,7 @@ public class lpgGasController {
* 返回一个 成功的接口对象 * 返回一个 成功的接口对象
* @return r * @return r
*/ */
private TLpgThirdPartyDockingInterfaceRecord successRecord(String interfaceName,String receiveData,String qybm) { public TLpgThirdPartyDockingInterfaceRecord successRecord(String interfaceName,String receiveData,String qybm) {
TLpgThirdPartyDockingInterfaceRecord lpgThirdPartyDockingInterfaceRecord = new TLpgThirdPartyDockingInterfaceRecord(); TLpgThirdPartyDockingInterfaceRecord lpgThirdPartyDockingInterfaceRecord = new TLpgThirdPartyDockingInterfaceRecord();
lpgThirdPartyDockingInterfaceRecord.setInterfaceName(interfaceName); lpgThirdPartyDockingInterfaceRecord.setInterfaceName(interfaceName);
......
...@@ -52,6 +52,16 @@ public class TSpecialUser extends BaseEntity ...@@ -52,6 +52,16 @@ public class TSpecialUser extends BaseEntity
/** 上报用户id */ /** 上报用户id */
private String userOwnId; private String userOwnId;
private String enterpriseId;
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getNickName() { public String getNickName() {
return nickName; return nickName;
} }
...@@ -112,25 +122,25 @@ public class TSpecialUser extends BaseEntity ...@@ -112,25 +122,25 @@ public class TSpecialUser extends BaseEntity
{ {
return controlPlan; return controlPlan;
} }
public void setConStartTime(Date conStartTime) public void setConStartTime(Date conStartTime)
{ {
this.conStartTime = conStartTime; this.conStartTime = conStartTime;
} }
public Date getConStartTime() public Date getConStartTime()
{ {
return conStartTime; return conStartTime;
} }
public void setConEndTime(Date conEndTime) public void setConEndTime(Date conEndTime)
{ {
this.conEndTime = conEndTime; this.conEndTime = conEndTime;
} }
public Date getConEndTime() public Date getConEndTime()
{ {
return conEndTime; return conEndTime;
} }
public void setUserOwnId(String userOwnId) public void setUserOwnId(String userOwnId)
{ {
this.userOwnId = userOwnId; this.userOwnId = userOwnId;
} }
......
...@@ -28,6 +28,13 @@ public interface TDetectorUserMapper ...@@ -28,6 +28,13 @@ public interface TDetectorUserMapper
*/ */
public TDetectorUser selectTDetectorUserById(Long userId); public TDetectorUser selectTDetectorUserById(Long userId);
/**
* 根据自有编号查询是否存在
* @param userOwnId
* @return
*/
public TDetectorUser selectUserByOwnId(String userOwnId);
/** /**
* 查询燃气用户统计信息 * 查询燃气用户统计信息
* *
......
...@@ -46,6 +46,7 @@ public interface THiddenDangerStandingBookMapper ...@@ -46,6 +46,7 @@ public interface THiddenDangerStandingBookMapper
* @return 结果 * @return 结果
*/ */
public int insertTHiddenDangerStandingBook(THiddenDangerStandingBook tHiddenDangerStandingBook); public int insertTHiddenDangerStandingBook(THiddenDangerStandingBook tHiddenDangerStandingBook);
public int inserts(List<THiddenDangerStandingBook> list);
/** /**
* 修改隐患整治台账 * 修改隐患整治台账
......
...@@ -35,6 +35,13 @@ public interface TSpecialUserMapper ...@@ -35,6 +35,13 @@ public interface TSpecialUserMapper
*/ */
public int insertTSpecialUser(TSpecialUser tSpecialUser); public int insertTSpecialUser(TSpecialUser tSpecialUser);
/**
* 批量新增
* @param list
* @return
*/
public int inserts(List<TSpecialUser> list);
/** /**
* 修改特殊用户管控 * 修改特殊用户管控
* *
......
...@@ -256,6 +256,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -256,6 +256,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from t_detector_user a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id from t_detector_user a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
where a.user_id = #{userId} and a.error_msg is null where a.user_id = #{userId} and a.error_msg is null
</select> </select>
<select id="selectUserByOwnId" parameterType="string" resultMap="TDetectorUserResult">
select a.user_id, a.beyond_enterprise_id,a.username, a.nick_name, a.user_type,a.gas_type, a.address, a.longitude, a.latitude,
a.linkman, a.phone, a.email, a.create_time, a.update_time, a.is_del, a.remarks, b.enterprise_name,a.f_village_id
from t_detector_user a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
where a.user_own_id = #{userOwnId}
</select>
<select id="countTDetectorUserForMassMarks" resultType="TDetectorUserVO" parameterType="TDetectorUser"> <select id="countTDetectorUserForMassMarks" resultType="TDetectorUserVO" parameterType="TDetectorUser">
select a.user_id AS userId, select a.user_id AS userId,
......
...@@ -116,6 +116,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -116,6 +116,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
</insert> </insert>
<insert id="inserts" parameterType="THiddenDangerStandingBook" >
insert into t_hidden_danger_standing_book
<trim prefix="(" suffix=")" suffixOverrides=",">
hidden_title,
hidden_content,
hidden_location,
source,
longitude,
latitude,
hidden_type,
hidden_find_people,
hidden_find_date,
deal_plan,
beyondEnterprise_id,
remediation,
create_time,
remarks
</trim>
values
<foreach collection="list" item="item" index="index" separator=",">
(#{item.hiddenTitle},
#{item.hiddenContent},
#{item.hiddenLocation},
#{item.source},
#{item.longitude},
#{item.latitude},
#{item.hiddenType},
#{item.hiddenFindPeople},
#{item.hiddenFindDate},
#{item.dealPlan},
#{item.beyondEnterpriseId},
#{item.remediation},
#{item.createTime},
#{item.remarks})
</foreach>
</insert>
<update id="updateTHiddenDangerStandingBook" parameterType="THiddenDangerStandingBook"> <update id="updateTHiddenDangerStandingBook" parameterType="THiddenDangerStandingBook">
update t_hidden_danger_standing_book update t_hidden_danger_standing_book
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
......
...@@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
<if test="userOwnId != null">user_own_id,</if> <if test="userOwnId != null">user_own_id,</if>
<if test="enterpriseId != null">enterprise_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if> <if test="userId != null">#{userId},</if>
...@@ -65,9 +66,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -65,9 +66,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="userOwnId != null">#{userOwnId},</if> <if test="userOwnId != null">#{userOwnId},</if>
<if test="enterpriseId != null">#{enterpriseId},</if>
</trim> </trim>
</insert> </insert>
<insert id="inserts" parameterType="TSpecialUser">
insert into t_special_user
<trim prefix="(" suffix=")" suffixOverrides=",">
user_id,
user_type,
control_plan,
con_start_time,
con_end_time,
create_time,
update_time,
remark,
user_own_id,
enterprise_id
</trim>
values
<foreach collection="list" item="item" index="index" separator=",">
(#{item.userId},
#{item.userType},
#{item.controlPlan},
#{item.conStartTime},
#{item.conEndTime},
#{item.createTime},
#{item.updateTime},
#{item.remark},
#{item.userOwnId},
#{item.enterpriseId})
</foreach>
</insert>
<update id="updateTSpecialUser" parameterType="TSpecialUser"> <update id="updateTSpecialUser" parameterType="TSpecialUser">
update t_special_user update t_special_user
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
...@@ -80,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -80,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="userOwnId != null">user_own_id = #{userOwnId},</if> <if test="userOwnId != null">user_own_id = #{userOwnId},</if>
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
</trim> </trim>
where special_id = #{specialId} where special_id = #{specialId}
</update> </update>
......
<template>
<el-dialog title="详情" :visible.sync="detailOpen" width="1200px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-row>
<el-col :span="14">
<el-form label-width="120px">
<el-row>
<el-col :span="10">
<el-form-item label="隐患名称:" >
<span v-if="detailInfo.hiddenTitle">{{ detailInfo.hiddenTitle }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="隐患发现人员:">
<span v-if="detailInfo.hiddenFindPeople">{{ detailInfo.hiddenFindPeople }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="发现时间:" >
<span v-if="detailInfo.hiddenFindDate">{{ detailInfo.hiddenFindDate }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="13">
<el-form-item label="隐患等级:" >
<span v-if="detailInfo.hiddenType == '1'">一级隐患</span>
<span v-else-if="detailInfo.hiddenType == '2'">二级隐患</span>
<span v-else-if="detailInfo.hiddenType == '3'">三级隐患</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="隐患位置:" >
<span v-if="detailInfo.hiddenLocation">{{ detailInfo.hiddenLocation }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="整治情况:" >
<span v-if="detailInfo.remediation == '1'">已完成</span>
<span v-else-if="detailInfo.remediation == '2'">未完成</span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<!--<el-col :span="10">-->
<!--<el-form-item label="处理方案:" >-->
<!--<span class="dbtn" @click="checkFile(detailInfo.dealPlanUrl)" v-if="detailInfo.dealPlan != ''">-->
<!--<i class="el-icon el-icon-view"></i>查看/下载-->
<!--</span>-->
<!--<span v-else><el-input disabled/></span>-->
<!--</el-form-item>-->
<!--</el-col>-->
<el-col :span="10">
<el-form-item label="隐患来源:" >
<span v-if="detailInfo.hiddenLocation">{{ detailInfo.hiddenLocation }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患类型:" >
<span v-if="detailInfo.hiddenTroubleType == 1">漏气</span>
<span v-else-if="detailInfo.hiddenTroubleType == 2">腐蚀</span>
<span v-else-if="detailInfo.hiddenTroubleType == 3">裂缝</span>
<span v-else-if="detailInfo.hiddenTroubleType == 4">设备故障</span>
<span v-else-if="detailInfo.hiddenTroubleType == 5">安全距离不足</span>
<span v-else-if="detailInfo.hiddenTroubleType == 6">管道承重</span>
<span v-else-if="detailInfo.hiddenTroubleType == 7">其他</span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="所属单位:" >
<span v-if="detailInfo.enterpriseName">{{ detailInfo.enterpriseName }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="隐患内容:" >
<span v-if="detailInfo.hiddenContent">{{ detailInfo.hiddenContent }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="处置结果:" >
<span v-if="detailInfo.dealPlan">{{ detailInfo.dealPlan }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="备注信息:" >
<span v-if="detailInfo.remarks">{{ detailInfo.remarks }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-col>
<el-col :span="9">
<div style="width: 100%;height: 390px; border: 1px solid rgb(218, 213, 213);margin-bottom: 10px;">
<div style="width: 100%;height: 100%" id="hiddenContainer"></div>
</div>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { EditorMap } from "@/utils/mapClass/getPath.js";
import { getHidden } from "@/api/standingBook/hidden";
import { enterpriseLists } from "@/api/regulation/info";
export default {
name: "detail-info",
data(){
return{
detailInfo: {},
enterpriseName:"",
detailOpen: false,
devicePos: [],
map: null,
reasonOptions:[],
}
},
created() {
this.getDicts("t_trouble_reason").then(response => {
this.reasonOptions = response.data;
});
},
methods:{
checkFile(url) {
window.open(url,'_blank');
},
//所属单位
getEnterpriseLists(){
const param = {};
// this.judgeOperateType(param);
enterpriseLists(param).then(response => {
this.enterprises = response.rows;
// 如果是企业,则直接把查询条件的的所在单位赋值
if (this.$store.state.user.roleId == 5) {
this.queryParams.beyondEnterpriseId = this.enterprises[0].enterpriseId
}
});
},
getDetailInfo(id){
getHidden(id).then(response => {
this.detailInfo = response.data;
this.getEnterpriseLists();
this.devicePos = [this.detailInfo.longitude, this.detailInfo.latitude];
this.detailOpen = true;
this.$nextTick(() => {
this.map = new EditorMap("hiddenContainer", {}, this);
this.map.addDevice({ path: this.devicePos });
this.map.nowMouseTarget = null;
this.map.mousetoolClose(false);
});
});
}
}
}
</script>
<style scoped>
</style>
This diff is collapsed.
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