Commit 6af257a9 authored by 耿迪迪's avatar 耿迪迪

居民安检

parent dcda21a8
......@@ -79,6 +79,8 @@ public class TTask extends BaseEntity
private List<TTaskRelationInfo> relationInfoList;
private String beyondVillage;
public Integer getIsjian() {
return isjian;
......@@ -236,6 +238,14 @@ public class TTask extends BaseEntity
this.relationInfoList = relationInfoList;
}
public String getBeyondVillage() {
return beyondVillage;
}
public void setBeyondVillage(String beyondVillage) {
this.beyondVillage = beyondVillage;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
......@@ -166,7 +166,11 @@ public class TTaskServiceImpl implements ITTaskService
*/
@Override
public Map<String,Object> taskDetailInfo(Long taskId){
return tTaskMapper.taskDetailInfo(taskId);
Map<String,Object> taskInfo = tTaskMapper.taskDetailInfo(taskId);
TTaskRelationInfo relationInfo = new TTaskRelationInfo();
relationInfo.setTaskId(taskId);
taskInfo.put("relationInfo",tTaskRelationInfoMapper.selectTTaskRelationInfoList(relationInfo));
return taskInfo;
}
/**
......
......@@ -124,7 +124,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="taskType!=null and taskType != ''"> and u.task_type = #{taskType}</if>
<if test="village!=null"> and u.village = #{village}</if>
<if test="missNum != 0">and inspect.totalMissNum = #{ missNum }</if>
and u.village in (SELECT re.relation_id FROM t_task_relation_info re WHERE re.task_id = #{taskId} and re.type = '1' )
<if test="village == null ">
and u.village in (SELECT re.relation_id FROM t_task_relation_info re WHERE re.task_id = #{taskId} and re.type = '1' )
</if>
</where>
order by inspect.create_time desc
</select>
......
......@@ -151,7 +151,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
task.admin_id,
task.create_time,
task.remarks,
us.nick_name AS nickname
us.nick_name AS nickname,
(SELECT GROUP_CONCAT(re.relation_id) FROM t_task_relation_info re WHERE re.task_id = task.id AND re.type = '1')as beyondVillage
FROM
t_task task
LEFT JOIN sys_user us ON us.user_id = task.admin_id
......@@ -209,10 +210,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t.type,
IF(type=1,(SELECT COUNT(1) FROM t_community),0) AS coummunityNum,
(case type
when 1 then IF(ISNULL(t.task_type),(select count(1) from t_user u),(select count(1) from t_user u WHERE u.task_type = t.task_type))
when 3 then (select count(1) from t_industry)
else (select count(1) from t_business)
end)as totalInspectNum
when 1 then
IF(ISNULL(t.task_type),
(select count(1) from t_user u where u.village in (select re.relation_id from t_task_relation_info re where re.task_id = t.id and re.type = '1')),
(select count(1) from t_user u WHERE u.task_type = t.task_type and u.village in (select re.relation_id from t_task_relation_info re where re.task_id = t.id and re.type = '1'))
)
when 3 then (select count(1) from t_industry)
else (select count(1) from t_business)
end)as totalInspectNum
FROM
t_task t
<where>
......@@ -245,6 +250,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) ti ON us.id = ti.receive_id
<where>
<if test="taskType != null and taskType != ''">us.task_type = #{taskType}</if>
<if test="type == 1">
and us.village in (SELECT re.relation_id FROM t_task_relation_info re WHERE re.task_id = #{taskId} and re.type = '1' )
</if>
</where>
</select>
......
......@@ -56,6 +56,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="county != null "> and u.county = #{county}</if>
<if test="street != null "> and u.street = #{street}</if>
<if test="village != null "> and u.village = #{village}</if>
<if test="village == null ">
and u.village in (SELECT re.relation_id FROM t_task_relation_info re WHERE re.task_id = #{taskId} and re.type = '1' )
</if>
<if test="username != null and username != ''"> and u.username like concat('%', #{username}, '%')</if>
<if test="phone != null and phone != ''"> and u.phone = #{phone}</if>
<if test="status != null and status != ''"> and u.status = #{status}</if>
......
......@@ -500,7 +500,6 @@ export default {
this.taskDetail();
this.taskInspectDetail();
this.taskInspectDangerDetail();
this.getCommunityInfo();
},
methods: {
/** 查询安检任务执行列表 */
......@@ -654,6 +653,7 @@ export default {
taskDetailInfo({taskId:this.$route.query.taskId}).then(res =>{
if(res.code == 200){
this.taskDetailData = res.data;
this.getCommunityInfo();
}
})
},
......@@ -681,7 +681,8 @@ export default {
getCommunityInfo(){
communityList().then(res =>{
if(res.code == 200 && res.data){
this.communityInfos = res.data;
this.communityInfos = this.taskDetailData.relationInfo ? res.data.filter(community => this.taskDetailData.relationInfo.find(belongArea => belongArea.type == '1' && belongArea.relationId == community.id)) : [];
//this.communityInfos = res.data;
}
})
},
......
......@@ -223,11 +223,11 @@
<div style="text-align: center;font-size: 26px;margin-bottom: 18px;">入户安检及整改作业单</div>
<div class="user-info">
<div class="item">用户名:</div>
<div class="item">联系电话:</div>
<div class="item">村庄:</div>
<div class="item">燃气表号:</div>
<div class="item">表底数:</div>
<div class="item">用户名:{{ detailInfo.username }}</div>
<div class="item" style="flex:1.5">联系电话:{{ detailInfo.phone }}</div>
<div class="item">村庄:{{ detailInfo.villageName }}</div>
<div class="item" style="flex:1.5">燃气表号:{{ detailInfo.usernum }}</div>
<div class="item">表底数:{{ jsondata.userInfo.biaodishuzhi }}</div>
</div>
<table class="inspect" border="1" cellspacing="0" cellpadding="0">
......@@ -240,158 +240,161 @@
<tr>
<td rowspan="3">户外管道</td>
<td>户外管道焊口未刷漆</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.huwaiguandao.valueArr2[0]" class="input-disabled"/></td>
</tr>
<tr>
<td>户外管道多余燃气接头</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.huwaiguandao.valueArr2[1]" class="input-disabled"/></td>
</tr>
<tr>
<td>漏气</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.huwaiguandao.valueArr2[2]" class="input-disabled"/></td>
</tr>
<tr>
<td rowspan="4">燃气表</td>
<td>锁闭阀损坏</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.ranqibiao.valueArr2[0]" class="input-disabled"/></td>
</tr>
<tr>
<td>燃气表故障</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.ranqibiao.valueArr2[1]" class="input-disabled"/></td>
</tr>
<tr>
<td>燃气表接头漏气</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.ranqibiao.valueArr2[2]" class="input-disabled"/></td>
</tr>
<tr>
<td>表封损坏</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.ranqibiao.valueArr2[3]" class="input-disabled"/></td>
</tr>
<tr>
<td rowspan="7">燃气管道</td>
<td>漏气</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.ranqiguandao.valueArr2[0]" class="input-disabled"/></td>
</tr>
<tr>
<td>燃气设施包封在橱柜内</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.ranqiguandao.valueArr2[1]" class="input-disabled"/></td>
</tr>
<tr>
<td>燃气管道、阀门及其他设备未使用国标材料</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.ranqiguandao.valueArr2[2]" class="input-disabled"/></td>
</tr>
<tr>
<td>搭接电线、作为电气接地线或悬挂重物</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.ranqiguandao.valueArr2[3]" class="input-disabled"/></td>
</tr>
<tr>
<td>使用不合格软管</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.ranqiguandao.valueArr2[4]" class="input-disabled"/></td>
</tr>
<tr>
<td>波纹管超 2 米</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.ranqiguandao.valueArr2[5]" class="input-disabled"/></td>
</tr>
<tr>
<td>波纹管穿墙</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.ranqiguandao.valueArr2[6]" class="input-disabled"/></td>
</tr>
<tr>
<td rowspan="3">燃气灶</td>
<td>未安装自闭阀</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.ranqizao.valueArr2[0]" class="input-disabled"/></td>
</tr>
<tr>
<td>燃气灶具无熄火保护装置</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.ranqizao.valueArr2[1]" class="input-disabled"/></td>
</tr>
<tr>
<td>燃气灶具超过 8 年使用年限</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.ranqizao.valueArr2[2]" class="input-disabled"/></td>
</tr>
<tr>
<td rowspan="5">采暖设备</td>
<td>未安装烟道/烟道未伸出室外</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.cainuanshebei.valueArr2[0]" class="input-disabled"/></td>
</tr>
<tr>
<td>使用国家禁用的热水器</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.cainuanshebei.valueArr2[1]" class="input-disabled"/></td>
</tr>
<tr>
<td>未安装壁挂炉</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.cainuanshebei.valueArr2[2]" class="input-disabled"/></td>
</tr>
<tr>
<td>壁挂炉安装在灶台正上方</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.cainuanshebei.valueArr2[3]" class="input-disabled"/></td>
</tr>
<tr>
<td>安装在浴室/卧室内</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.cainuanshebei.valueArr2[4]" class="input-disabled"/></td>
</tr>
<tr>
<td rowspan="7">其他</td>
<td>以营利为目的使用天然气且未商用登记的</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.qita.valueArr2[0]" class="input-disabled"/></td>
</tr>
<tr>
<td>私自改动燃气设施</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.qita.valueArr2[1]" class="input-disabled"/></td>
</tr>
<tr>
<td>偷盗气的违法行为</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.qita.valueArr2[2]" class="input-disabled"/></td>
</tr>
<tr>
<td>破坏燃气设施等违法行为</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.qita.valueArr2[3]" class="input-disabled"/></td>
</tr>
<tr>
<td>双火源/双气源</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.qita.valueArr2[4]" class="input-disabled"/></td>
</tr>
<tr>
<td>其他问题</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td>其他问题{{ ': ' + jsondata.obj.qitawenti.textarea}}</td>
<td><input type="checkbox" :checked="jsondata.obj.qitawenti.valueArr2[0]" class="input-disabled"/></td>
</tr>
<tr>
<td>正常</td>
<td><input type="checkbox" :checked="true" class="input-disabled"/></td>
<td><input type="checkbox" :checked="jsondata.obj.dangerNumber == 0" class="input-disabled"/></td>
</tr>
</table>
<div class="sign">
<div class="item">安检员:</div>
<div class="item">用户签字:</div>
<div class="item">安检日期:</div>
<div class="item">安检员:{{map.username}}</div>
<div class="item" style="display: flex">
<div style="width: 90px">用户签字:</div>
<img style="position: relative;top:-13px;" class="qianm" :src="jsondata.qmUrl"/>
</div>
<div class="item">安检日期:{{map.createTime.substr(0,10)}}</div>
</div>
</div>
</el-dialog>
......@@ -473,6 +476,7 @@
}
.user-info{
margin-bottom: 8px;
display: flex;
.item{
flex: 1;
......@@ -480,6 +484,7 @@
}
.sign{
margin-top: 8px;
display: flex;
.item{
flex: 1;
......
......@@ -639,6 +639,7 @@ export default {
this.$refs.cyRecordDetail.map = row;
this.$refs.cyRecordDetail.jsondata = JSON.parse(row.content);
this.$refs.cyRecordDetail.detailInfo = this.detailInfo;
console.log(">>>>>>>>>>>>>>",JSON.parse(row.content))
if (row.type == 2) {
this.$refs.cyRecordDetail.device = JSON.parse(this.detailInfo.device);
}
......
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