| | |
| | | " WHERE" + |
| | | " t.id_card = #{idCard}") |
| | | List<ComMngStructHouseVO> selectUserHouseList(@Param("idCard") String idCard); |
| | | |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | " t.`name`, " + |
| | | "CASE " + |
| | | " IF " + |
| | | " ( " + |
| | | " length( t.id_card ) = 18, " + |
| | | " cast( substring( t.id_card, 17, 1 ) AS UNSIGNED ) % 2, " + |
| | | " IF " + |
| | | " ( " + |
| | | " length( t.id_card ) = 15, " + |
| | | " cast( substring( t.id_card, 15, 1 ) AS UNSIGNED ) % 2, " + |
| | | " 3 " + |
| | | " ) " + |
| | | " ) " + |
| | | " WHEN 1 THEN " + |
| | | " 1 " + |
| | | " WHEN 0 THEN " + |
| | | " 2 ELSE 0 " + |
| | | " END AS sex, " + |
| | | " t.phone, " + |
| | | " YEAR ( now( ) ) - YEAR ( substring( t.id_card, 7, 8 ) ) age, " + |
| | | " t1.area_name, " + |
| | | " t.political_outlook politicalOutlook, " + |
| | | " CONCAT( " + |
| | | " IF " + |
| | | " ( t.soldier = 1, '军人,', '' ), " + |
| | | " IF " + |
| | | " ( t.lowIncome_households = 1, '低保户,', '' ), " + |
| | | " IF " + |
| | | " ( t.lowIncome_people = 1, '低收入,', '' ), " + |
| | | " IF " + |
| | | " ( t.old_people = 1, '特服家庭,', '' ), " + |
| | | " IF " + |
| | | " ( t.key_personnel = 1, '重点人员,', '' ) " + |
| | | " ) tags " + |
| | | "FROM " + |
| | | " sys_user_input t " + |
| | | " LEFT JOIN com_mng_struct_area t1 ON t.area_id = t1.id " + |
| | | "WHERE " + |
| | | " t.community_id = #{pageInputUserDTO.communityId}"+ |
| | | " AND " + |
| | | "(t.soldier=1 OR t.lowIncome_households=1 OR t.lowIncome_people=1 or t.old_people=1 OR t.special_service_family=1 OR t.key_personnel=1 OR (t.tags IS NOT NULL AND TRIM(t.tags)!=''))"+ |
| | | "<if test='pageInputUserDTO.name != null and pageInputUserDTO.name.trim() != ""'>" + |
| | | " and t.`name` like concat(#{pageInputUserDTO.name},'%') " + |
| | | " </if> " + |
| | | "<if test='pageInputUserDTO.phone != null and pageInputUserDTO.phone.trim() != ""'>" + |
| | | " and t.phone like concat(#{pageInputUserDTO.phone},'%') " + |
| | | " </if> " + |
| | | "<if test='pageInputUserDTO.areaId != null and pageInputUserDTO.areaId.trim() != ""'>" + |
| | | " and t.area_id = #{pageInputUserDTO.areaId} " + |
| | | " </if> " + |
| | | "<if test='pageInputUserDTO.tags != null and pageInputUserDTO.tags.trim() != ""'>" + |
| | | " and t.tags like concat('%',#{pageInputUserDTO.tags},'%') " + |
| | | " </if> " + |
| | | " group by t.id_card "+ |
| | | "</script>") |
| | | IPage<InputUserInfoVO> specialInputUser(Page page, @Param("pageInputUserDTO") PageInputUserDTO pageInputUserDTO); |
| | | } |