| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | | import com.panzhihua.common.model.vos.area.AreaAddressVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageVO; |
| | |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataVO; |
| | | import com.panzhihua.common.model.vos.grid.PopulationDetailVO; |
| | | import com.panzhihua.common.model.vos.grid.PopulationListVO; |
| | | import com.panzhihua.common.model.vos.grid.admin.ComMngPopulationListVO; |
| | | import com.panzhihua.common.model.vos.user.*; |
| | | import com.panzhihua.common.model.vos.community.PageComActMessageVO; |
| | | import com.panzhihua.common.model.vos.user.ComHouseMemberVo; |
| | |
| | | " id = #{populationId}") |
| | | PopulationDetailVO getPopulationDetailApp(@Param("populationId") Long populationId); |
| | | |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | " * " + |
| | | "FROM " + |
| | | " ( " + |
| | | " SELECT " + |
| | | " cmp.id, " + |
| | | " cmp.`name` AS userName, " + |
| | | " cmp.label, " + |
| | | " cmp.card_no, " + |
| | | " cmp.card_no_str, " + |
| | | " cmp.sex, " + |
| | | " cmp.address, " + |
| | | " cmp.political_outlook, " + |
| | | " cmp.census_register, " + |
| | | " cmp.house_id, " + |
| | | " cmp.phone, " + |
| | | " IFNULL(cmp.house_id,0) as isHouse, " + |
| | | " ( SELECT event_status FROM event_visiting_tasks WHERE event_status in (1,2,3,5) AND visiter_id = cmp.id ORDER BY create_at DESC LIMIT 1 ) AS eventStatus, " + |
| | | " ( SELECT create_at FROM event_visiting_tasks WHERE event_status in (1,2,3,5) AND visiter_id = cmp.id ORDER BY create_at DESC LIMIT 1 ) AS createAt " + |
| | | " FROM " + |
| | | " com_mng_population AS cmp where 1=1 " + |
| | | "<if test='populationListDTO.keyWord != null and populationListDTO.keyWord != ""'>" + |
| | | "AND (cmp.name like concat (#{populationListDTO.keyWord},'%') or cmp.card_no_str like concat (#{populationListDTO.keyWord},'%') or cmp.address like concat (#{populationListDTO.keyWord},'%')) " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.label != null and populationListDTO.label != ""'>" + |
| | | "AND cmp.label like concat ('%',#{populationListDTO.label},'%') " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.sex != null'>" + |
| | | "AND cmp.sex = #{populationListDTO.sex} " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.isHouse != null and populationListDTO.isHouse == 1'>" + |
| | | "AND cmp.house_id is not null " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.isHouse != null and populationListDTO.isHouse == 2'>" + |
| | | "AND cmp.house_id is null " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.communityId != null'>" + |
| | | "AND cmp.community_id = #{populationListDTO.communityId} " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.politicalOutlook != null'>" + |
| | | "AND cmp.political_outlook = #{populationListDTO.politicalOutlook} " + |
| | | " </if> " + |
| | | " ) as population where 1=1 " + |
| | | "<if test='populationListDTO.eventStatus != null'>" + |
| | | "AND population.eventStatus = #{populationListDTO.eventStatus} " + |
| | | " </if> " + |
| | | " </script>") |
| | | IPage<ComMngPopulationListVO> getGridPopulationAdminList(Page page,@Param("populationListDTO") ComMngPopulationListDTO populationListDTO); |
| | | |
| | | @Select("select relation from com_mng_population_house_user where house_id = #{houseId} and popul_id = #{populationId}") |
| | | Integer getPopulationRelationByHouseId(@Param("houseId") Long houseId, @Param("populationId") Long populationId); |
| | | |
| | | } |