Commit 013bba33 authored by 耿迪迪's avatar 耿迪迪

居民工商业安检量统计任务查询新增

parent 9bf60340
......@@ -455,8 +455,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SUM(IF(inspect.status = 1,1,0)) AS refuseInspectNum,
SUM(IF(inspect.status = 2,1,0)) AS normalInspectNum,
SUM(IF(inspect.status = 3,1,0)) AS stopInspectNum,
SUM(IF(inspect.danger = 1,1,0)) AS dangerNum,
SUM(IF(inspect.danger = 1,0,1)) AS noDangerNum,
SUM(IF(inspect.danger = 1 and inspect.status = 2,1,0)) AS dangerNum,
SUM(IF(inspect.danger = 1 and inspect.status = 2,0,1)) AS noDangerNum,
inspect.member_id as memberId,
inspect.task_id as taskId,
(select nick_name from sys_user where user_id = inspect.member_id)as inspector
......@@ -473,7 +473,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
INNER JOIN (
SELECT receive_id, MAX(id) AS max_id
FROM t_task_inspect
WHERE `status` != -1 and `type` = '1'
<where>
`status` != -1 and `type` = '1'
<if test="taskId != null and taskId != ''"> and task_id = #{taskId}</if>
</where>
GROUP BY receive_id
) latest ON i.id = latest.max_id
) inspect
......@@ -512,8 +515,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SUM(IF(inspect.status = 1,1,0)) AS refuseInspectNum,
SUM(IF(inspect.status = 2,1,0)) AS normalInspectNum,
SUM(IF(inspect.status = 3,1,0)) AS stopInspectNum,
SUM(IF(inspect.danger = 1,1,0)) AS dangerNum,
SUM(IF(inspect.danger = 1,0,1)) AS noDangerNum
SUM(IF(inspect.danger = 1 and inspect.status = 2,1,0)) AS dangerNum,
SUM(IF(inspect.danger = 1 and inspect.status = 2,0,1)) AS noDangerNum
FROM (
SELECT
i.id,
......@@ -527,7 +530,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
INNER JOIN (
SELECT receive_id, MAX(id) AS max_id
FROM t_task_inspect
WHERE `status` != -1 and `type` = '1'
<where>
`status` != -1 and `type` = '1'
<if test="taskId != null and taskId != ''"> and task_id = #{taskId}</if>
</where>
GROUP BY receive_id
) latest ON i.id = latest.max_id
) inspect
......@@ -599,6 +605,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="village != null"> and u.village = #{village}</if>
<if test="street != null"> and u.street = #{street}</if>
<if test="memberId != null"> and gr.user_id = #{memberId}</if>
<if test="taskId != null and taskId != ''"> and task.id = #{taskId}</if>
</where>
GROUP BY task.id
)statistic
......@@ -613,8 +620,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SUM(IF(inspect. STATUS = 1, 1, 0)) AS refuseInspectNum,
SUM(IF(inspect. STATUS = 2, 1, 0)) AS normalInspectNum,
SUM(IF(inspect. STATUS = 3, 1, 0)) AS stopInspectNum,
SUM(IF(inspect.danger = 1, 1, 0)) AS dangerNum,
SUM(IF(inspect.danger = 1, 0, 1)) AS noDangerNum,
SUM(IF(inspect.danger = 1 and inspect.status = 2, 1, 0)) AS dangerNum,
SUM(IF(inspect.danger = 1 and inspect.status = 2, 0, 1)) AS noDangerNum,
inspect.member_id AS memberId,
inspect.task_id AS taskId,
(
......@@ -643,8 +650,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
MAX(id) AS max_id
FROM
t_task_inspect
WHERE
`status` != - 1 and type = #{type}
<where>
`status` != -1 and type = #{type}
<if test="taskId != null and taskId != ''"> and task_id = #{taskId}</if>
</where>
GROUP BY
receive_id
) latest ON i.id = latest.max_id
......
......@@ -12,11 +12,29 @@
size="small"
@change="timeChange"
value-format="yyyy-MM-dd"
:clearable="false"
clearable
>
</el-date-picker>
</el-form-item>
<el-form-item label="任务标题" prop="taskId">
<el-select
v-model="queryParams.taskId"
placeholder="请选择任务标题"
size="small"
style="width: 198px"
clearable
@keyup.enter.native="handleQuery"
>
<el-option
v-for="task in taskInfoList"
:key="task.id"
:label="task.title"
:value="task.id"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
......@@ -53,6 +71,7 @@
<script>
import {inspectNumStatisticByInspectorAndType, inspectNumStatisticByInspectorAndTypeExport} from "@/api/checktask/inspect";
import moment from 'moment';
import { taskInfoList }from "@/api/checktask/task";
export default {
name: "inspect-statistic-index",
data(){
......@@ -67,11 +86,13 @@
time: [moment(moment().startOf('day').toDate()).format("YYYY-MM-DD HH:mm:ss"),moment(moment().endOf('day').toDate()).format("YYYY-MM-DD HH:mm:ss")],
communityData: [],
streetData: [],
exportLoading: false
exportLoading: false,
taskInfoList: []
}
},
created(){
this.getList();
this.getTaskInfoList();
},
methods:{
/** 搜索按钮操作 */
......@@ -112,8 +133,13 @@
})
},
timeChange(val){
this.queryParams.beginTime = val[0] + " 00:00:00";
this.queryParams.endTime = val[1] + " 23:59:59";
if(val){
this.queryParams.beginTime = val[0] + " 00:00:00";
this.queryParams.endTime = val[1] + " 23:59:59";
}else{
this.queryParams.beginTime = null;
this.queryParams.endTime = null;
}
},
/** 导出按钮操作 */
handleExport() {
......@@ -130,6 +156,14 @@
this.exportLoading = false;
}).catch(() => {});
},
//获取任务列表
getTaskInfoList(){
taskInfoList({type:'2'}).then(res =>{
if(res.code == 200){
this.taskInfoList = res.data;
}
})
},
}
}
</script>
......
......@@ -10,13 +10,32 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
size="small"
clearable
@change="timeChange"
value-format="yyyy-MM-dd"
:clearable="false"
>
</el-date-picker>
</el-form-item>
<el-form-item label="任务标题" prop="taskId">
<el-select
v-model="queryParams.taskId"
placeholder="请选择任务标题"
size="small"
clearable
style="width: 198px"
@keyup.enter.native="handleQuery"
>
<el-option
v-for="task in taskInfoList"
:key="task.id"
:label="task.title"
:value="task.id"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
......@@ -53,6 +72,7 @@
<script>
import {inspectNumStatisticByInspectorAndType, inspectNumStatisticByInspectorAndTypeExport} from "@/api/checktask/inspect";
import moment from 'moment';
import { taskInfoList }from "@/api/checktask/task";
export default {
name: "inspect-statistic-index",
data(){
......@@ -67,11 +87,13 @@
time: [moment(moment().startOf('day').toDate()).format("YYYY-MM-DD HH:mm:ss"),moment(moment().endOf('day').toDate()).format("YYYY-MM-DD HH:mm:ss")],
communityData: [],
streetData: [],
exportLoading: false
exportLoading: false,
taskInfoList: []
}
},
created(){
this.getList();
this.getTaskInfoList();
},
methods:{
/** 搜索按钮操作 */
......@@ -112,8 +134,14 @@
})
},
timeChange(val){
this.queryParams.beginTime = val[0] + " 00:00:00";
this.queryParams.endTime = val[1] + " 23:59:59";
if(val){
this.queryParams.beginTime = val[0] + " 00:00:00";
this.queryParams.endTime = val[1] + " 23:59:59";
}else{
this.queryParams.beginTime = null;
this.queryParams.endTime = null;
}
},
/** 导出按钮操作 */
handleExport() {
......@@ -130,6 +158,14 @@
this.exportLoading = false;
}).catch(() => {});
},
//获取任务列表
getTaskInfoList(){
taskInfoList({type:'3'}).then(res =>{
if(res.code == 200){
this.taskInfoList = res.data;
}
})
},
}
}
</script>
......
......@@ -12,17 +12,36 @@
size="small"
@change="timeChange"
value-format="yyyy-MM-dd"
:clearable="false"
clearable
>
</el-date-picker>
</el-form-item>
<el-form-item label="任务标题" prop="taskId">
<el-select
v-model="queryParams.taskId"
placeholder="请选择任务标题"
size="small"
style="width: 198px"
clearable
@keyup.enter.native="handleQuery"
>
<el-option
v-for="task in taskInfoList"
:key="task.id"
:label="task.title"
:value="task.id"
/>
</el-select>
</el-form-item>
<el-form-item label="所属区域(区县)" prop="street">
<el-select
v-model="queryParams.street"
placeholder="所属区域(区县)"
@change="changeStreet"
filterable
clearable
>
<el-option
v-for="item in streetData"
......@@ -38,6 +57,7 @@
v-model="queryParams.village"
placeholder="所属区域(村)"
filterable
clearable
>
<el-option
v-for="item in communityData"
......@@ -86,6 +106,7 @@
import { communityList } from "@/api/baseinfo/community";
import { aLLAreaListInfo } from "@/api/baseinfo/area";
import moment from 'moment';
import { taskInfoList }from "@/api/checktask/task";
export default {
name: "inspect-statistic-index",
data(){
......@@ -94,20 +115,23 @@
beginTime: moment(moment().startOf('day').toDate()).format("YYYY-MM-DD HH:mm:ss"),
endTime: moment(moment().endOf('day').toDate()).format("YYYY-MM-DD HH:mm:ss"),
village: null,
street: null
street: null,
taskId: null
},
loading: true,
inspectStatisticInfoList: [],
time: [moment(moment().startOf('day').toDate()).format("YYYY-MM-DD HH:mm:ss"),moment(moment().endOf('day').toDate()).format("YYYY-MM-DD HH:mm:ss")],
communityData: [],
streetData: [],
exportLoading: false
exportLoading: false,
taskInfoList: []
}
},
created(){
this.getList();
this.getCommunityInfo();
this.getStreet();
this.getTaskInfoList();
},
methods:{
/** 搜索按钮操作 */
......@@ -149,8 +173,13 @@
})
},
timeChange(val){
this.queryParams.beginTime = val[0] + " 00:00:00";
this.queryParams.endTime = val[1] + " 23:59:59";
if(val){
this.queryParams.beginTime = val[0] + " 00:00:00";
this.queryParams.endTime = val[1] + " 23:59:59";
}else{
this.queryParams.beginTime = null;
this.queryParams.endTime = null;
}
},
//获取小区信息
getCommunityInfo(){
......@@ -187,6 +216,14 @@
this.exportLoading = false;
}).catch(() => {});
},
//获取任务列表
getTaskInfoList(){
taskInfoList({type:'1'}).then(res =>{
if(res.code == 200){
this.taskInfoList = res.data;
}
})
},
}
}
</script>
......
......@@ -12,17 +12,36 @@
size="small"
@change="timeChange"
value-format="yyyy-MM-dd"
:clearable="false"
clearable
>
</el-date-picker>
</el-form-item>
<el-form-item label="任务标题" prop="taskId">
<el-select
v-model="queryParams.taskId"
placeholder="请选择任务标题"
size="small"
style="width: 198px"
clearable
@keyup.enter.native="handleQuery"
>
<el-option
v-for="task in taskInfoList"
:key="task.id"
:label="task.title"
:value="task.id"
/>
</el-select>
</el-form-item>
<el-form-item label="所属区域(区县)" prop="street">
<el-select
v-model="queryParams.street"
placeholder="所属区域(区县)"
@change="changeStreet"
filterable
clearable
>
<el-option
v-for="item in streetData"
......@@ -38,6 +57,7 @@
v-model="queryParams.village"
placeholder="所属区域(村)"
filterable
clearable
>
<el-option
v-for="item in communityData"
......@@ -86,6 +106,7 @@
import { communityList } from "@/api/baseinfo/community";
import { aLLAreaListInfo } from "@/api/baseinfo/area";
import moment from 'moment';
import { taskInfoList }from "@/api/checktask/task";
export default {
name: "inspect-statistic-index",
data(){
......@@ -101,13 +122,15 @@
time: [moment(moment().startOf('day').toDate()).format("YYYY-MM-DD HH:mm:ss"),moment(moment().endOf('day').toDate()).format("YYYY-MM-DD HH:mm:ss")],
communityData: [],
streetData: [],
exportLoading: false
exportLoading: false,
taskInfoList: []
}
},
created(){
this.getList();
this.getCommunityInfo();
this.getStreet();
this.getTaskInfoList();
},
methods:{
/** 搜索按钮操作 */
......@@ -149,8 +172,13 @@
})
},
timeChange(val){
this.queryParams.beginTime = val[0] + " 00:00:00";
this.queryParams.endTime = val[1] + " 23:59:59";
if(val){
this.queryParams.beginTime = val[0] + " 00:00:00";
this.queryParams.endTime = val[1] + " 23:59:59";
}else{
this.queryParams.beginTime = null;
this.queryParams.endTime = null;
}
},
//获取小区信息
getCommunityInfo(){
......@@ -187,6 +215,14 @@
this.exportLoading = false;
}).catch(() => {});
},
//获取任务列表
getTaskInfoList(){
taskInfoList({type:'1'}).then(res =>{
if(res.code == 200){
this.taskInfoList = res.data;
}
})
},
}
}
</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