Commit c040eeff authored by 耿迪迪's avatar 耿迪迪

安检量统计筛选统计修改

parent a0d0ac5c
......@@ -242,6 +242,7 @@ public class TTaskInspectServiceImpl implements ITTaskInspectService
if(null != param.get("beginTime") || null != param.get("memberId")){
Map<String,String> newParam = new HashMap<>();
newParam.put("village",param.get("village"));
newParam.put("street",param.get("street"));
List<Map<String,Object>> statisticResultNew = tTaskInspectMapper.inspectNumStatisticByInspector(newParam);
groupByTask = statisticResultNew.stream().collect(Collectors.groupingBy(e ->e.get("taskId")));
}else{
......
......@@ -443,13 +443,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY relation.task_id
) user_counts ON user_counts.task_id = inspect.task_id
LEFT JOIN t_task task ON task.id = inspect.task_id
<if test="village != null">
<if test="village != null or street != null">
LEFT JOIN t_user u ON u.id = inspect.receive_id
</if>
<where>
task.status = 0
<if test="beginTime != null and endTime != null"> and inspect.create_time between #{beginTime} and #{endTime}</if>
<if test="village != null"> and u.village = #{village}</if>
<if test="street != null"> and u.street = #{street}</if>
<if test="memberId != null"> and inspect.member_id = #{memberId}</if>
</where>
GROUP BY inspect.member_id,inspect.task_id;
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="120px">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="130px">
<el-form-item label="起止时间">
<el-date-picker
v-model="time"
type="datetimerange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
size="small"
@change="timeChange"
value-format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd"
:clearable="false"
>
</el-date-picker>
</el-form-item>
<el-form-item label="所属区域(区县)" prop="street">
<el-select
v-model="queryParams.street"
placeholder="所属区域(区县)"
@change="changeStreet"
>
<el-option
v-for="item in streetData"
:key="item.id"
:label="item.areaName"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="所属区域(村)" prop="village">
<el-select v-model="queryParams.village" placeholder="所属区域(村)">
<el-option
......@@ -51,6 +66,7 @@
<script>
import {inspectNumStatisticByInspector} from "@/api/checktask/inspect";
import { communityList } from "@/api/baseinfo/community";
import { aLLAreaListInfo } from "@/api/baseinfo/area";
export default {
name: "inspect-statistic-index",
data(){
......@@ -58,17 +74,20 @@
queryParams:{
beginTime: null,
endTime: null,
village: null
village: null,
street: null
},
loading: true,
inspectStatisticInfoList: [],
time: [],
communityData: []
communityData: [],
streetData: []
}
},
created(){
this.getList();
this.getCommunityInfo();
this.getStreet();
},
methods:{
/** 搜索按钮操作 */
......@@ -81,6 +100,7 @@
this.resetForm("queryForm");
this.queryParams.beginTime = null;
this.queryParams.endTime = null;
this.getCommunityInfo();
this.time = [];
this.handleQuery();
},
......@@ -93,7 +113,7 @@
let statistic = {inspector: "汇总",noInspectNum: 0,normalInspectNum: 0,refuseInspectNum: 0,stopInspectNum: 0,
missInspectNum: 0,dangerNum: 0,noDangerNum: 0,total: 0};
this.inspectStatisticInfoList.forEach(item =>{
let total = item.noInspectNum + item.normalInspectNum + item.refuseInspectNum + item.stopInspectNum + item.missInspectNum + item.dangerNum + item.noDangerNum;
let total = item.normalInspectNum + item.refuseInspectNum + item.stopInspectNum + item.missInspectNum;
statistic.noInspectNum += item.noInspectNum;
statistic.normalInspectNum += item.normalInspectNum;
statistic.refuseInspectNum += item.refuseInspectNum;
......@@ -114,12 +134,24 @@
},
//获取小区信息
getCommunityInfo(){
communityList().then(res =>{
communityList({street: this.queryParams.street}).then(res =>{
if(res.code == 200){
this.communityData = res.data;
}
})
},
//获取街道镇信息
getStreet(){
aLLAreaListInfo({parentId: 8}).then(res =>{
if(res.code == 200){
this.streetData = res.data;
}
})
},
changeStreet(){
this.queryParams.village = null;
this.getCommunityInfo();
}
}
}
</script>
......
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