|
@@ -41,8 +41,32 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
|
|
"where b.house_id = #{houseId} and DATE_FORMAT(a.time_update,'%Y-%m-%d') = #{dateStr}")
|
|
"where b.house_id = #{houseId} and DATE_FORMAT(a.time_update,'%Y-%m-%d') = #{dateStr}")
|
|
List<MsSuspected> selectYcXq(@Param("houseId") Long houseId, @Param("dateStr") String dateStr);
|
|
List<MsSuspected> selectYcXq(@Param("houseId") Long houseId, @Param("dateStr") String dateStr);
|
|
|
|
|
|
- @Select("")
|
|
|
|
- List<MsSuspected> selecthuiz(@Param("userId") Long userId);
|
|
|
|
|
|
+ @Select("select * from " +
|
|
|
|
+ "(" +
|
|
|
|
+ "select count(*) as num,d.user_id as userId from sys_uptown_house a " +
|
|
|
|
+ "inner join sys_uptown_unit b on b.unit_id = a.unit_id " +
|
|
|
|
+ "inner join sys_owner c on c.uptown_id = b.uptown_id " +
|
|
|
|
+ "inner join sys_user_role d on d.property_id = c.owner_id and d.role_id = 2 " +
|
|
|
|
+ "GROUP BY d.user_id " +
|
|
|
|
+ "union all " +
|
|
|
|
+ "select DISTINCT count(*) as num,e.user_id as userId from ms_report a " +
|
|
|
|
+ "inner join sys_uptown_house b on a.house_id = b.house_id " +
|
|
|
|
+ "inner join sys_uptown_unit c on c.unit_id = b.unit_id " +
|
|
|
|
+ "inner join sys_owner d on d.uptown_id = c.uptown_id " +
|
|
|
|
+ "inner join sys_user_role e on e.property_id = d.owner_id and e.role_id = 2 " +
|
|
|
|
+ "where a.report_status = 1 and a.report_date = #{reportDate} " +
|
|
|
|
+ "GROUP BY e.user_id " +
|
|
|
|
+ "union all " +
|
|
|
|
+ "select DISTINCT count(*) as num,e.user_id as userId from ms_report a " +
|
|
|
|
+ "inner join sys_uptown_house b on a.house_id = b.house_id " +
|
|
|
|
+ "inner join sys_uptown_unit c on c.unit_id = b.unit_id " +
|
|
|
|
+ "inner join sys_owner d on d.uptown_id = c.uptown_id " +
|
|
|
|
+ "inner join sys_user_role e on e.property_id = d.owner_id and e.role_id = 2 " +
|
|
|
|
+ "where a.report_status = 1 and a.ms_status = 2 and a.report_date = #{reportDate} " +
|
|
|
|
+ "GROUP BY e.user_id " +
|
|
|
|
+ ") tt " +
|
|
|
|
+ "where tt.userId = #{userId}")
|
|
|
|
+ List<MsSuspected> selecthuiz(@Param("userId") Long userId,@Param("reportDate") String reportDate);
|
|
|
|
|
|
@Select(
|
|
@Select(
|
|
"select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num," +
|
|
"select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num," +
|