|
@@ -2,111 +2,192 @@
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.bofeng.dao.SweepCodeMapper">
|
|
<mapper namespace="com.bofeng.dao.SweepCodeMapper">
|
|
<select id="selectCode" resultType="com.bofeng.entity.SysUptownHouse">
|
|
<select id="selectCode" resultType="com.bofeng.entity.SysUptownHouse">
|
|
- select DISTINCT
|
|
|
|
- a.uptown_name,
|
|
|
|
- d.ridgepole,
|
|
|
|
- d.unit,
|
|
|
|
- e.doorplate,
|
|
|
|
- b.door_name,
|
|
|
|
- DATE_FORMAT(c.date,'%Y-%m-%d %H:%i:%s') as date,
|
|
|
|
- c.in_type,
|
|
|
|
- c.go_status as goStatus,
|
|
|
|
- c.error_info as errorInfo,
|
|
|
|
- g.linkman,
|
|
|
|
- g.phone,
|
|
|
|
- c.time_update
|
|
|
|
- from out_scan c
|
|
|
|
- inner join sys_user_role t on c.user_id = t.user_id and role_id =1
|
|
|
|
- inner join sys_uptown_home g on g.house_id = t.property_id
|
|
|
|
- inner join sys_uptown a on c.uptown_id = a.uptown_id
|
|
|
|
- inner join sys_uptown_door b on c.door_id = b.door_id
|
|
|
|
- inner join sys_uptown_house e on e.house_id = t.property_id
|
|
|
|
- inner join sys_uptown_unit d on d.unit_id = e.unit_id
|
|
|
|
|
|
+ select DISTINCT
|
|
|
|
+ a.uptown_name,
|
|
|
|
+ d.ridgepole,
|
|
|
|
+ d.unit,
|
|
|
|
+ e.doorplate,
|
|
|
|
+ b.door_name,
|
|
|
|
+ DATE_FORMAT(c.date,'%Y-%m-%d %H:%i:%s') as date,
|
|
|
|
+ c.in_type,
|
|
|
|
+ c.go_status as goStatus,
|
|
|
|
+ c.error_info as errorInfo,
|
|
|
|
+ g.linkman,
|
|
|
|
+ g.phone,
|
|
|
|
+ c.time_update
|
|
|
|
+ from out_scan c
|
|
|
|
+ inner join sys_user_role t on c.user_id = t.user_id and role_id =1
|
|
|
|
+ inner join sys_uptown_home g on g.house_id = t.property_id
|
|
|
|
+ inner join sys_uptown a on c.uptown_id = a.uptown_id
|
|
|
|
+ inner join sys_uptown_door b on c.door_id = b.door_id
|
|
|
|
+ inner join sys_uptown_house e on e.house_id = t.property_id
|
|
|
|
+ inner join sys_uptown_unit d on d.unit_id = e.unit_id
|
|
<where>
|
|
<where>
|
|
- <if test="queryProperties != null and queryProperties != ''">
|
|
|
|
- b.door_name like concat('%',#{queryProperties},'%')
|
|
|
|
- </if>
|
|
|
|
- <if test="uptownId != null and uptownId != ''">
|
|
|
|
- and a.uptown_id = #{uptownId}
|
|
|
|
- </if>
|
|
|
|
- <if test="goStatus != null and goStatus !=''">
|
|
|
|
- and c.go_status = #{goStatus}
|
|
|
|
- </if>
|
|
|
|
- <if test="dateSta != null and dateSta !=''">
|
|
|
|
- and c.date >= #{dateSta}
|
|
|
|
- </if>
|
|
|
|
- <if test="dateEnd != null and dateEnd !=''">
|
|
|
|
- and c.date < #{dateEnd}
|
|
|
|
- </if>
|
|
|
|
|
|
+ <if test="queryProperties != null and queryProperties != ''">
|
|
|
|
+ b.door_name like concat('%',#{queryProperties},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="uptownId != null and uptownId != ''">
|
|
|
|
+ and a.uptown_id = #{uptownId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="goStatus != null and goStatus !=''">
|
|
|
|
+ and c.go_status = #{goStatus}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dateSta != null and dateSta !=''">
|
|
|
|
+ and c.date >= #{dateSta}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dateEnd != null and dateEnd !=''">
|
|
|
|
+ and c.date < #{dateEnd}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
- order by c.time_update desc
|
|
|
|
|
|
+ order by c.time_update desc
|
|
</select>
|
|
</select>
|
|
<select id="selectLingyunUser" resultType="com.bofeng.entity.SysUptownHouse">
|
|
<select id="selectLingyunUser" resultType="com.bofeng.entity.SysUptownHouse">
|
|
- select
|
|
|
|
- b.user_id,
|
|
|
|
- a.linkman,
|
|
|
|
- a.phone,
|
|
|
|
- c.doorplate,
|
|
|
|
- e.uptown_name,
|
|
|
|
- concat(d.ridgepole,d.unit) as dept
|
|
|
|
- from sys_uptown_home a
|
|
|
|
- inner join sys_user_role b on a.house_id = b.property_id and b.role_id =1
|
|
|
|
- inner join sys_uptown_house c on c.house_id = b.property_id
|
|
|
|
- inner join sys_uptown_unit d on c.unit_id = d.unit_id
|
|
|
|
- inner join sys_uptown e on e.uptown_id = d.uptown_id
|
|
|
|
|
|
+ select
|
|
|
|
+ b.user_id,
|
|
|
|
+ a.linkman,
|
|
|
|
+ a.phone,
|
|
|
|
+ c.doorplate,
|
|
|
|
+ e.uptown_name,
|
|
|
|
+ concat(d.ridgepole,d.unit) as dept
|
|
|
|
+ from sys_uptown_home a
|
|
|
|
+ inner join sys_user_role b on a.house_id = b.property_id and b.role_id =1
|
|
|
|
+ inner join sys_uptown_house c on c.house_id = b.property_id
|
|
|
|
+ inner join sys_uptown_unit d on c.unit_id = d.unit_id
|
|
|
|
+ inner join sys_uptown e on e.uptown_id = d.uptown_id
|
|
<where>
|
|
<where>
|
|
- <if test="queryProperties != null and queryProperties != ''">
|
|
|
|
- (a.linkman like concat('%',#{queryProperties},'%')
|
|
|
|
- or a.phone like concat('%',#{queryProperties},'%'))
|
|
|
|
- </if>
|
|
|
|
- <if test="uptownId != null and uptownId != ''">
|
|
|
|
- and e.uptown_id = #{uptownId}
|
|
|
|
- </if>
|
|
|
|
- <if test="unitId != null and unitId != ''">
|
|
|
|
- and d.unit_id = #{unitId}
|
|
|
|
- </if>
|
|
|
|
|
|
+ <if test="queryProperties != null and queryProperties != ''">
|
|
|
|
+ (a.linkman like concat('%',#{queryProperties},'%')
|
|
|
|
+ or a.phone like concat('%',#{queryProperties},'%'))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="uptownId != null and uptownId != ''">
|
|
|
|
+ and e.uptown_id = #{uptownId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="unitId != null and unitId != ''">
|
|
|
|
+ and d.unit_id = #{unitId}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
<select id="export" resultType="com.bofeng.entity.SysUptownHouse">
|
|
<select id="export" resultType="com.bofeng.entity.SysUptownHouse">
|
|
- select DISTINCT
|
|
|
|
- a.uptown_name,
|
|
|
|
- d.ridgepole,
|
|
|
|
- d.unit,
|
|
|
|
- e.doorplate,
|
|
|
|
- b.door_name,
|
|
|
|
- DATE_FORMAT(c.date,'%Y-%m-%d %H:%i:%s') as date,
|
|
|
|
- c.in_type,
|
|
|
|
- c.go_status as goStatus,
|
|
|
|
- c.error_info as errorInfo,
|
|
|
|
- g.linkman,
|
|
|
|
- g.phone,
|
|
|
|
- c.time_update
|
|
|
|
- from out_scan c
|
|
|
|
- inner join sys_user_role t on c.user_id = t.user_id and role_id =1
|
|
|
|
- inner join sys_uptown_home g on g.house_id = t.property_id
|
|
|
|
- inner join sys_uptown a on c.uptown_id = a.uptown_id
|
|
|
|
- inner join sys_uptown_door b on c.door_id = b.door_id
|
|
|
|
- inner join sys_uptown_house e on e.house_id = t.property_id
|
|
|
|
- inner join sys_uptown_unit d on d.unit_id = e.unit_id
|
|
|
|
|
|
+ select DISTINCT
|
|
|
|
+ a.uptown_name,
|
|
|
|
+ d.ridgepole,
|
|
|
|
+ d.unit,
|
|
|
|
+ e.doorplate,
|
|
|
|
+ b.door_name,
|
|
|
|
+ DATE_FORMAT(c.date,'%Y-%m-%d %H:%i:%s') as date,
|
|
|
|
+ c.in_type,
|
|
|
|
+ c.go_status as goStatus,
|
|
|
|
+ c.error_info as errorInfo,
|
|
|
|
+ g.linkman,
|
|
|
|
+ g.phone,
|
|
|
|
+ c.time_update
|
|
|
|
+ from out_scan c
|
|
|
|
+ inner join sys_user_role t on c.user_id = t.user_id and role_id =1
|
|
|
|
+ inner join sys_uptown_home g on g.house_id = t.property_id
|
|
|
|
+ inner join sys_uptown a on c.uptown_id = a.uptown_id
|
|
|
|
+ inner join sys_uptown_door b on c.door_id = b.door_id
|
|
|
|
+ inner join sys_uptown_house e on e.house_id = t.property_id
|
|
|
|
+ inner join sys_uptown_unit d on d.unit_id = e.unit_id
|
|
<where>
|
|
<where>
|
|
- <if test="queryProperties != null and queryProperties != ''">
|
|
|
|
- b.door_name like concat('%',#{queryProperties},'%')
|
|
|
|
- </if>
|
|
|
|
- <if test="uptownId != null and uptownId != ''">
|
|
|
|
- and a.uptown_id = #{uptownId}
|
|
|
|
- </if>
|
|
|
|
- <if test="goStatus != null and goStatus !=''">
|
|
|
|
- and c.go_status = #{goStatus}
|
|
|
|
- </if>
|
|
|
|
- <if test="dateSta != null and dateSta !=''">
|
|
|
|
- and c.date >= #{dateSta}
|
|
|
|
- </if>
|
|
|
|
- <if test="dateEnd != null and dateEnd !=''">
|
|
|
|
- and c.date < #{dateEnd}
|
|
|
|
- </if>
|
|
|
|
|
|
+ <if test="queryProperties != null and queryProperties != ''">
|
|
|
|
+ b.door_name like concat('%',#{queryProperties},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="uptownId != null and uptownId != ''">
|
|
|
|
+ and a.uptown_id = #{uptownId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="goStatus != null and goStatus !=''">
|
|
|
|
+ and c.go_status = #{goStatus}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dateSta != null and dateSta !=''">
|
|
|
|
+ and c.date >= #{dateSta}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dateEnd != null and dateEnd !=''">
|
|
|
|
+ and c.date < #{dateEnd}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
- order by c.time_update desc
|
|
|
|
|
|
+ order by c.time_update desc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
+ <select id="selectCodeLY" resultType="com.bofeng.entity.SysUptownHouseLY">
|
|
|
|
+ select DISTINCT
|
|
|
|
+ a.uptown_name,
|
|
|
|
+ CONCAT(d.ridgepole,d.unit) as unit,
|
|
|
|
+ e.doorplate,
|
|
|
|
+ b.door_name,
|
|
|
|
+ DATE_FORMAT(c.date,'%Y-%m-%d %H:%i:%s') as date,
|
|
|
|
+ c.in_type,
|
|
|
|
+ c.go_status as goStatus,
|
|
|
|
+ c.error_info as errorInfo,
|
|
|
|
+ g.linkman,
|
|
|
|
+ g.phone,
|
|
|
|
+ c.time_update
|
|
|
|
+ from out_scan c
|
|
|
|
+ inner join sys_user_role t on c.user_id = t.user_id and role_id =1
|
|
|
|
+ inner join sys_uptown_home g on g.house_id = t.property_id
|
|
|
|
+ inner join sys_uptown a on c.uptown_id = a.uptown_id
|
|
|
|
+ inner join sys_uptown_door b on c.door_id = b.door_id
|
|
|
|
+ inner join sys_uptown_house e on e.house_id = t.property_id
|
|
|
|
+ inner join sys_uptown_unit d on d.unit_id = e.unit_id
|
|
|
|
+ <where>
|
|
|
|
+ a.uptown_id = 1238790987234
|
|
|
|
+ <if test="queryProperties != null and queryProperties != ''">
|
|
|
|
+ and b.door_name like concat('%',#{queryProperties},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="unitId != null and unitId != ''">
|
|
|
|
+ and d.unit_id = #{unitId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="goStatus != null and goStatus !=''">
|
|
|
|
+ and c.go_status = #{goStatus}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dateSta != null and dateSta !=''">
|
|
|
|
+ and c.date >= #{dateSta}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dateEnd != null and dateEnd !=''">
|
|
|
|
+ and c.date < #{dateEnd}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ order by c.time_update desc
|
|
|
|
+ </select>
|
|
|
|
+ <select id="exportLY" resultType="com.bofeng.entity.SysUptownHouseLY">
|
|
|
|
+ select DISTINCT
|
|
|
|
+ a.uptown_name,
|
|
|
|
+ CONCAT(d.ridgepole,d.unit) as unit,
|
|
|
|
+ e.doorplate,
|
|
|
|
+ b.door_name,
|
|
|
|
+ DATE_FORMAT(c.date,'%Y-%m-%d %H:%i:%s') as date,
|
|
|
|
+ c.in_type,
|
|
|
|
+ c.go_status as goStatus,
|
|
|
|
+ c.error_info as errorInfo,
|
|
|
|
+ g.linkman,
|
|
|
|
+ g.phone,
|
|
|
|
+ c.time_update
|
|
|
|
+ from out_scan c
|
|
|
|
+ inner join sys_user_role t on c.user_id = t.user_id and role_id =1
|
|
|
|
+ inner join sys_uptown_home g on g.house_id = t.property_id
|
|
|
|
+ inner join sys_uptown a on c.uptown_id = a.uptown_id
|
|
|
|
+ inner join sys_uptown_door b on c.door_id = b.door_id
|
|
|
|
+ inner join sys_uptown_house e on e.house_id = t.property_id
|
|
|
|
+ inner join sys_uptown_unit d on d.unit_id = e.unit_id
|
|
|
|
+ <where>
|
|
|
|
+ a.uptown_id = 1238790987234
|
|
|
|
+ <if test="queryProperties != null and queryProperties != ''">
|
|
|
|
+ and b.door_name like concat('%',#{queryProperties},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="unitId != null and unitId != ''">
|
|
|
|
+ and d.unit_id = #{unitId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="goStatus != null and goStatus !=''">
|
|
|
|
+ and c.go_status = #{goStatus}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dateSta != null and dateSta !=''">
|
|
|
|
+ and c.date >= #{dateSta}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dateEnd != null and dateEnd !=''">
|
|
|
|
+ and c.date < #{dateEnd}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ order by c.time_update desc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|