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

安检隐患接口修改

parent 71356ed1
......@@ -184,6 +184,10 @@ public class TDanger extends BaseEntity
@Excel(name = "表具编号")
private String meterNum;
private String userInfo;
private Long village;
public void setId(Long id)
{
this.id = id;
......@@ -581,6 +585,22 @@ public class TDanger extends BaseEntity
this.meterNum = meterNum;
}
public String getUserInfo() {
return userInfo;
}
public void setUserInfo(String userInfo) {
this.userInfo = userInfo;
}
public Long getVillage() {
return village;
}
public void setVillage(Long village) {
this.village = village;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
......@@ -357,7 +357,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
danger.deal_method,
(SELECT nick_name FROM sys_user where user_id = danger.file_id) as fileName,
(
case type
case danger.type
when '1' then tu.username
when '2' then (select username from t_business bu where bu.id = danger.receive_id)
when '3' then (select username from t_industry ind where ind.id = danger.receive_id)
......@@ -367,7 +367,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
end
) as receiveName,
(
case type
case danger.type
when '1' then (select tu.meternum from t_user tu where tu.id = danger.receive_id)
else '-'
end
......@@ -378,7 +378,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM
t_danger danger
LEFT JOIN sys_user us ON us.user_id = danger.admin_id
<if test="type == '1'">
<if test="type == 1">
LEFT JOIN t_user tu ON tu.id = danger.receive_id
LEFT JOIN t_community com ON com.id = tu.village
</if>
......@@ -415,7 +415,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="type == '1' and userInfo != null ">
and (tu.username like concat('%',#{userInfo},'%') or tu.phone like concat('%',#{userInfo},'%') or tu.meternum like concat('%',#{userInfo},'%'))
</if>
<if test="type == '1' and village != null "> and com.id = #{village} </if>
<if test="type == 1 and village != null "> and com.id = #{village} </if>
</where>
ORDER BY create_time DESC
</select>
......
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