Commit 07c4c10b authored by zhangjianqian's avatar zhangjianqian

Merge remote-tracking branch 'origin/master'

parents a1936063 6b06b82e
...@@ -13,8 +13,13 @@ public class UserTaskInspect { ...@@ -13,8 +13,13 @@ public class UserTaskInspect {
private String username; private String username;
@Excel(name="联系方式") @Excel(name="联系方式")
private String phone; private String phone;
@Excel(name="表号")
//@Excel(name="表号")
private String usernum; private String usernum;
@Excel(name = "表具编号")
private String meternum;
private Long userId; private Long userId;
@Excel(name="所属区/县") @Excel(name="所属区/县")
private String countyName; private String countyName;
...@@ -224,4 +229,12 @@ public class UserTaskInspect { ...@@ -224,4 +229,12 @@ public class UserTaskInspect {
public void setMissNum(int missNum) { public void setMissNum(int missNum) {
this.missNum = missNum; this.missNum = missNum;
} }
public String getMeternum() {
return meternum;
}
public void setMeternum(String meternum) {
this.meternum = meternum;
}
} }
...@@ -294,7 +294,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -294,7 +294,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if> </if>
</delete> </delete>
<update id="updateByInspect"> <update id="updateByInspect">
UPDATE t_danger SET status = 0 UPDATE t_danger SET STATUS = IF(ISNULL(reform_id),0,3)
WHERE inspect_id =#{inspectId} WHERE inspect_id =#{inspectId}
<if test="type &gt; 3"> <if test="type &gt; 3">
and `type` = #{type} and `type` = #{type}
......
...@@ -97,7 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -97,7 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT inspect.id, SELECT inspect.id,
IFNULL(inspect.status,-1) AS inspectStatus, IFNULL(inspect.status,-1) AS inspectStatus,
inspect.satisfy , inspect.satisfy ,
u.usernum,u.username,u.phone,u.id AS userId, u.usernum,u.username,u.meternum,u.phone,u.id AS userId,
u.type as btype,u.address,u.create_time as userTime,u.status as ustatus, u.type as btype,u.address,u.create_time as userTime,u.status as ustatus,
t.`area_name` AS countyName, t.`area_name` AS countyName,
ts.`area_name` AS streetName, ts.`area_name` AS streetName,
...@@ -117,6 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -117,6 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="username!=null and username!=''"> and u.username like concat('%',#{username},'%')</if> <if test="username!=null and username!=''"> and u.username like concat('%',#{username},'%')</if>
<if test="usernum!=null and usernum!=''"> and u.usernum like concat('%',#{usernum},'%')</if> <if test="usernum!=null and usernum!=''"> and u.usernum like concat('%',#{usernum},'%')</if>
<if test="meternum!=null and meternum!=''"> and u.meternum like concat('%',#{meternum},'%')</if>
<if test="satisfy!=null"> and inspect.satisfy = #{satisfy}</if> <if test="satisfy!=null"> and inspect.satisfy = #{satisfy}</if>
<if test="inspectStatus!=null and inspectStatus != -1" > and inspect.status = #{inspectStatus}</if> <if test="inspectStatus!=null and inspectStatus != -1" > and inspect.status = #{inspectStatus}</if>
<if test="inspectStatus!=null and inspectStatus== -1"> and inspect.status is null</if> <if test="inspectStatus!=null and inspectStatus== -1"> and inspect.status is null</if>
...@@ -275,7 +276,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -275,7 +276,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status == 1">and p.status is null</if> <if test="status == 1">and p.status is null</if>
<if test="status == 2">and p.status = 0</if> <if test="status == 2">and p.status = 0</if>
<if test="status == 3">and p.status = 1 </if> <if test="status == 3">and p.status = 1 </if>
<if test="status == 4">and p.status &gt;= 2 </if> <if test="status == 4">and p.status = 2 </if>
<if test="status == 5">and p.status = 3 </if>
<if test="username != null and username != ''">and u.username like concat('%',#{username},'%')</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="phone != null and phone != ''">and u.phone = #{phone} </if>
<if test="taskType != null and taskType != ''">and u.task_type = #{taskType} </if> <if test="taskType != null and taskType != ''">and u.task_type = #{taskType} </if>
......
...@@ -184,7 +184,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -184,7 +184,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
COUNT(p.id) AS isjian, COUNT(p.id) AS isjian,
</if> </if>
CASE t.type CASE t.type
WHEN 1 THEN (SELECT COUNT(us.id) FROM t_user us WHERE us.task_type = t.task_type) WHEN 1 THEN (SELECT COUNT(us.id) FROM t_user us WHERE us.task_type = t.task_type and us.village in (SELECT re.relation_id FROM t_task_relation_info re WHERE re.task_id = t.id and re.type = '1' ))
WHEN 2 THEN (SELECT COUNT(id) FROM t_business) WHEN 2 THEN (SELECT COUNT(id) FROM t_business)
ELSE (SELECT COUNT(id) FROM t_industry) ELSE (SELECT COUNT(id) FROM t_industry)
END AS allnum END AS allnum
...@@ -259,7 +259,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -259,7 +259,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT SELECT
count(1)AS totalDangerNum, count(1)AS totalDangerNum,
SUM(IF(danger.status=0,1,0))AS toDoNum, SUM(IF(danger.status=0,1,0))AS toDoNum,
SUM(IF(danger.status=2,1,0))AS dealNum SUM(IF(danger.status>2,1,0))AS dealNum
FROM FROM
t_task_inspect inspect,t_danger danger t_task_inspect inspect,t_danger danger
<where> <where>
......
...@@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="community != null "> and c.id = #{community}</if> <if test="community != null "> and c.id = #{community}</if>
<if test="position != null and position != ''"> and u.position = #{position}</if> <if test="position != null and position != ''"> and u.position = #{position}</if>
<if test="taskType != null and taskType != ''"> and u.task_type = #{taskType}</if> <if test="taskType != null and taskType != ''"> and u.task_type = #{taskType}</if>
<if test="userInfo != null and userInfo != ''"> and (u.username like concat('%', #{userInfo}, '%') or u.usernum like concat('%', #{userInfo}, '%') or u.address like concat('%', #{userInfo}, '%'))</if> <if test="userInfo != null and userInfo != ''"> and (u.username like concat('%', #{userInfo}, '%') or u.meternum like concat('%', #{userInfo}, '%') or u.address like concat('%', #{userInfo}, '%'))</if>
<if test="meterCompany != null and meterCompany != ''"> and u.meter_company = #{meterCompany}</if> <if test="meterCompany != null and meterCompany != ''"> and u.meter_company = #{meterCompany}</if>
<if test="meterType != null and meterType != ''"> and u.meter_type = #{meterType}</if> <if test="meterType != null and meterType != ''"> and u.meter_type = #{meterType}</if>
<if test="meternum != null and meternum != ''"> and u.meternum = #{meternum}</if> <if test="meternum != null and meternum != ''"> and u.meternum = #{meternum}</if>
......
...@@ -88,9 +88,9 @@ ...@@ -88,9 +88,9 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="表号" prop="usernum"> <el-form-item label="表具编号" prop="meternum">
<el-input <el-input
v-model="queryParams.usernum" v-model="queryParams.meternum"
placeholder="请输入表号" placeholder="请输入表号"
clearable clearable
size="small" size="small"
...@@ -212,7 +212,7 @@ ...@@ -212,7 +212,7 @@
> >
<el-table-column label="用户姓名" align="center" prop="username" /> <el-table-column label="用户姓名" align="center" prop="username" />
<el-table-column label="联系方式" align="center" prop="phone" /> <el-table-column label="联系方式" align="center" prop="phone" />
<el-table-column label="表号" align="center" prop="usernum" /> <el-table-column label="表具编号" align="center" prop="meternum" />
<!--<el-table-column label="表计类型" align="center" prop="btype" :formatter="typeFormat"/>--> <!--<el-table-column label="表计类型" align="center" prop="btype" :formatter="typeFormat"/>-->
<el-table-column label="所属区域" align="center" prop="phone"> <el-table-column label="所属区域" align="center" prop="phone">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -378,7 +378,7 @@ export default { ...@@ -378,7 +378,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
taskId: null, taskId: null,
usernum: "", meternum: "",
username: "", username: "",
satisfy: "", satisfy: "",
inspectStatus: "", inspectStatus: "",
......
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