Commit 42cfe44a authored by xulihui's avatar xulihui

修改所有的企业id比较时转换异常问题

parent 72690699
......@@ -132,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join t_user_manage_village v on a.f_village_id=v.f_village_id
left join t_gasuser_safety_device_info deviceInfo on a.user_id = deviceInfo.f_relation_gasUser_id
<where> a.is_del = '0' and a.error_msg is null
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != '-2'"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if>
<if test="gasType != null and gasType == 1"> and a.gas_type =#{gasType}</if>
<if test="gasType != null and gasType == 0"> and (a.gas_type =#{gasType} or a.gas_type is null)</if>
<if test="username != null and username != ''"> and a.username like concat('%', #{username}, '%')</if>
......@@ -164,7 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from t_detector_user a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
left join t_user_manage_village v on a.f_village_id=v.f_village_id
<where> a.is_del = '0' and a.error_msg is null
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != '-2'"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if>
<if test="gasType != null and gasType == 1"> and a.gas_type =#{gasType}</if>
<if test="gasType != null and gasType == 0"> and (a.gas_type =#{gasType} or a.gas_type is null)</if>
<if test="username != null and username != ''"> and a.username like concat('%', #{username}, '%')</if>
......@@ -196,7 +196,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from t_detector_user a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
left join t_user_manage_village v on a.f_village_id=v.f_village_id
<where> a.is_del = '0' and a.error_msg is null
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != '-2'"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if>
<if test="username != null and username != ''"> and a.username like concat('%', #{username}, '%')</if>
<if test="nickName != null and nickName != ''"> and (a.nick_name like concat('%', #{nickName}, '%') or a.username like concat('%', #{nickName}, '%'))</if>
<if test="isInspect != null and isInspect == 0">
......@@ -228,7 +228,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN t_work_task_inspect t ON t1.inId = t.inspect_id
) inspect ON inspect.receive_id = a.user_id
<where> a.is_del = '0' and a.error_msg is null
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != '-2'"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if>
<if test="username != null and username != ''"> and a.username like concat('%', #{username}, '%')</if>
<if test="nickName != null and nickName != ''"> and (a.nick_name like concat('%', #{nickName}, '%') or a.username like concat('%', #{nickName}, '%'))</if>
</where>
......@@ -653,7 +653,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)recent ON a.user_id = recent.receive_id
LEFT JOIN t_line_patrol_person person ON person.person_id = recent.member_id
<where> a.is_del = '0' and a.error_msg is null
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != '-2'"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if>
<if test="username != null and username != ''"> and a.username like concat('%', #{username}, '%')</if>
<if test="nickName != null and nickName != ''"> and a.nick_name like concat('%', #{nickName}, '%')</if>
<if test="linkman != null and linkman != ''"> and a.linkman = #{linkman}</if>
......
......@@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectTDeviceInfoVo"/>
<where>
a.is_del='0'
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != '-2'"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
<if test="deviceAddr != null and deviceAddr != ''"> and device_addr = #{deviceAddr}</if>
......
......@@ -163,7 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--企业信息查询(下拉框数据)-->
<select id="selectTEnterprise" resultMap="TEnterpriseInfoResult">
select enterprise_id,enterprise_name from t_enterprise_info where
<if test="deptId!=null and deptId!= -2">
<if test="deptId!=null and deptId!= '-2'">
enterprise_id =#{deptId} and
</if>
is_del='0'
......
......@@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="pictureUrl != null and pictureUrl != ''"> and picture_url = #{pictureUrl}</if>
<if test="hiddenTroubleDescribe != null and hiddenTroubleDescribe != ''"> and hidden_trouble_describe = #{hiddenTroubleDescribe}</if>
<if test="reportTime != null "> and report_time = #{reportTime}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != '-2'"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="hiddenTroubleName != null and hiddenTroubleName != ''"> and hidden_trouble_name like concat('%', #{hiddenTroubleName}, '%')</if>
<if test="reportPerson != null and reportPerson != ''"> and suer.nick_name like concat('%', #{reportPerson}, '%')</if>
<if test="hiddenTroubleDealStatus != null and hiddenTroubleDealStatus != ''"> and hidden_trouble_deal_status = #{hiddenTroubleDealStatus}</if>
......@@ -90,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workId != null "> and work_id = #{workId}</if>
<if test="hiddenTroubleLevel != null and hiddenTroubleLevel != ''"> and hidden_trouble_level = #{hiddenTroubleLevel}</if>
<if test="hiddenTroubleType != null and hiddenTroubleType != ''"> and hidden_trouble_type = #{hiddenTroubleType}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != '-2'"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="hiddenTroubleName != null and hiddenTroubleName != ''"> and hidden_trouble_name like concat('%', #{hiddenTroubleName}, '%')</if>
<if test="reportPerson != null and reportPerson != ''"> and suer.nick_name like concat('%', #{reportPerson}, '%')</if>
<if test="hiddenTroubleDealStatus != null and hiddenTroubleDealStatus != ''"> and hidden_trouble_deal_status = #{hiddenTroubleDealStatus}</if>
......@@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from t_hidden_trouble_info info left join sys_user suer on info.report_person_id = suer.user_id
<where>
is_del='0'
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != '-2'"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="hiddenTroubleName != null and hiddenTroubleName != ''"> and hidden_trouble_name like concat('%', #{hiddenTroubleName}, '%')</if>
<if test="reportPerson != null and reportPerson != ''"> and suer.nick_name like concat('%', #{reportPerson}, '%')</if>
<if test="hiddenSource!=null"> and hidden_source = #{hiddenSource}</if>
......
......@@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectTSiteStationInfoVo"/>
<where>
is_del='0'
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2">
<if test="beyondEnterpriseId != null and beyondEnterpriseId != '-2'">
and beyond_enterprise_id = #{beyondEnterpriseId}
</if>
<if test="siteStationName != null and siteStationName != ''"> and site_station_name like concat('%', #{siteStationName}, '%')</if>
......
......@@ -95,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from t_yehuaqi_user a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
left join t_user_manage_village v on a.f_village_id=v.f_village_id
<where> a.is_del = '0' and a.error_msg is null
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != '-2'"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if>
<if test="username != null and username != ''"> and a.username like concat('%', #{username}, '%')</if>
<if test="nickName != null and nickName != ''"> and (a.nick_name like concat('%', #{nickName}, '%') or a.username like concat('%', #{nickName}, '%'))</if>
</where>
......@@ -169,7 +169,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join t_user_manage_village v on a.f_village_id=v.f_village_id
left join t_yehuaqiuser_safety_device_info deviceInfo on a.user_id = deviceInfo.f_relation_user_id
<where> a.is_del = '0' and a.error_msg is null
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != '-2'"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if>
<if test="username != null and username != ''"> and a.username like concat('%', #{username}, '%')</if>
<if test="nickName != null and nickName != ''"> and (a.nick_name like concat('%', #{nickName}, '%') or a.username like concat('%', #{nickName}, '%'))</if>
</where>
......
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