/** * Copyright 2018 人人开源 https://www.renren.io *

* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. *

* This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. *

* You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.dto.IcResiUserConfirmDTO; import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.IcVolunteerPolyDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.IcResiUserEntity; import org.apache.ibatis.annotations.MapKey; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.math.BigDecimal; import java.util.List; import java.util.Map; import java.util.Set; /** * 用户基础信息 * * @author generator generator@elink-cn.com * @since v1.0.0 2021-10-26 */ @Mapper public interface IcResiUserDao extends BaseDao { /** * @Author sun * @Description 居民信息各表新增数据 **/ void add(@Param("tableName") String tableName, @Param("map") Map map); /** * @Author sun * @Description 居民信息修改先删除字表可能存在的数据 **/ void del(@Param("tableName") String tableName, @Param("resiUserId") String resiUserId); /** * @Author sun * @Description 更新或新增居民信息各表数据 **/ void upTable(@Param("tableName") String tableName, @Param("id") String id, @Param("map") Map map); List> selectListResiMap(@Param("customerId") String customerId, @Param("formCode") String formCode, @Param("conditions") List conditions, @Param("resultColumns") List resultColumns, @Param("subTables") List subTables, @Param("currentStaffAgencyId") String currentStaffAgencyId, @Param("staffOrgPath") String staffOrgPath, @Param("resultTableName") String resultTableName, @Param("keyword") String keyword, @Param("groupByTables") Set groupByTables); /** * 查询主表 * * @param icResiUserId * @return java.util.List> * @author yinzuomei * @date 2021/10/28 11:20 上午 */ List> selectListMapById(@Param("customerId") String customerId, @Param("icResiUserId") String icResiUserId); /** * 根据ic_resi_user.id去查询各个子表记录,动态传入表名 * * @param icResiUserId * @param subTableName * @return java.util.List> * @author yinzuomei * @date 2021/10/28 11:19 上午 */ List> selectSubTableRecords(@Param("customerId") String customerId, @Param("icResiUserId") String icResiUserId, @Param("subTableName") String subTableName); int updateToDel(@Param("icResiUserId") String icResiUserId,@Param("currentStaffId") String currentStaffId); int updateSubTableToDel(@Param("subTalbeName") String subTalbeName, @Param("icResiUserId") String icResiUserId,@Param("currentStaffId")String currentStaffId); /** * 接口名称 * * @param customerId 客户id * @param resultTableName 获取哪个表的数据??? * @param conditions 前端传入的查询入参 * @param showSqlColumns * @return java.util.List> * @author yinzuomei * @date 2021/11/2 10:35 上午 */ List> dynamicQuery(@Param("customerId") String customerId, @Param("resultTableName") String resultTableName, @Param("conditions") List conditions, @Param("subTables") List subTables, @Param("showSqlColumns") List showSqlColumns, @Param("currentStaffAgencyId") String currentStaffAgencyId, @Param("staffOrgPath") String staffOrgPath, @Param("groupByTables") List groupByTables); /** * @param userId * @Description 查询个人信息 * @author zxc * @date 2021/11/3 10:28 上午 */ PersonDataResultDTO personData(@Param("userId") String userId); /** * @param name * @param agencyId * @Description 根据名字,组织查询人 * @author zxc * @date 2021/11/3 2:05 下午 */ List searchByName(@Param("name") String name, @Param("columnName") String columnName, @Param("level") String level, @Param("id") String id, @Param("agencyId") String agencyId, @Param("pageNo") Integer pageNo, @Param("customerId") String customerId); Set selectUserDemandCode(String icResiUserId); String selectCategoryNames(@Param("customerId") String customerId, @Param("codeSet") Set codeSet); @MapKey("HOME_ID") Map> getHomeUserCategoryCount(@Param("buildId") String buildId); /** * @param userId * @Description 根据userId查询志愿者 * @author zxc * @date 2021/11/5 5:44 下午 */ List selectVolunteerByUserId(@Param("userId") String userId); /** * @param columns * @Description 查询人员类别 * @author zxc * @date 2021/11/8 1:50 下午 */ Map selectPersonType(@Param("columns") List columns, @Param("customerId") String customerId, @Param("tableName") String tableName, @Param("userId") String userId); /** * desc:根据身份证号获取居民信息 * * @param idCard * @param customerId * @return */ IcResiUserDTO getResiUserByIdCard(@Param("idCard") String idCard, @Param("customerId") String customerId); /** * @param agencyId * @param gridId * @param name * @return */ List selectDemandUsers(@Param("agencyId") String agencyId, @Param("gridId") String gridId, @Param("name") String name); IcResiUserDTO selectIdByIdCard(@Param("customerId") String customerId, @Param("idNum") String idNum, @Param("icResiUserId") String icResiUserId); /** * 获取居民名称,家属名称和id * * @param isResiUserId * @return */ IcResiUserBriefDTO selectIcResuUser(@Param("isResiUserId") String isResiUserId); /** * 除了本人以外,住在这个房子的人 * * @param currentIcResiUserId * @param homeId * @return */ List selectListFamilyMember(@Param("currentIcResiUserId") String currentIcResiUserId, @Param("homeId") String homeId); /** * 组织内党员年龄范围统计 * * @Param orgType * @Param orgId * @Return {@link List< OptionDataResultDTO>} * @Author zhaoqifeng * @Date 2021/12/10 17:11 */ List getPartyMemberAgeStatistics(@Param("orgType") String orgType, @Param("orgId") String orgId); /** * 获取年龄范围内党员列表 * * @Param orgType * @Param orgId * @Param min * @Param max * @Return {@link List< PartyMemberAgeResultDTO>} * @Author zhaoqifeng * @Date 2021/12/10 17:11 */ List getPartyMemberAgeList(@Param("orgType") String orgType, @Param("orgId") String orgId, @Param("code") String code); /** * 党员文化程度统计 * * @Param orgType * @Param orgId * @Return {@link List< OptionDataResultDTO>} * @Author zhaoqifeng * @Date 2021/12/10 17:29 */ List getPartyMemberEducationStatistics(@Param("orgType") String orgType, @Param("orgId") String orgId); /** * 按教育程度获取党员列表 * * @Param orgType * @Param orgId * @Param code * @Return {@link List< PartyMemberAgeResultDTO>} * @Author zhaoqifeng * @Date 2021/12/10 17:24 */ List getPartyMemberEducationList(@Param("orgType") String orgType, @Param("orgId") String orgId, @Param("code") String code); List listIcResiInfosByUserIds(@Param("userIds") List userIds); Map getCategoryListMap(@Param("columns") List columns, @Param("icUserId") String icUserId); Map selectResiInfoMap(@Param("customerId") String customerId, @Param("idCard") String idCard, @Param("resiId") String resiId); List> selectResiUsers(@Param("types") List types, @Param("orgId") String orgId); List icUserCustomerIds(); /** * desc: 获取数据分析列中的 各类居民数据 * * @param customerId * @param tableName * @param columnList * @param id 非必填 leve有值时 必填 * @param level 非必填 * @return java.util.Map 字段名:数量 * @author LiuJanJun * @date 2022/2/12 3:03 下午 */ Map getDataAnalyseCount(@Param("customerId") String customerId, @Param("tableName") String tableName, @Param("columnList") List columnList, @Param("id") String id, @Param("level") String level, @Param("idList")List idList); List> getIcUserList(@Param("customerId") String customerId, @Param("columns") List columns); /** * Desc: 根据房屋IDs查询房屋下是否有存在居民的 * * @param ids * @author zxc * @date 2022/3/2 10:32 上午 */ List getExistUserByHouseIds(@Param("ids") List ids); /** * 居民防疫信息查询 * * @Param formDTO * @Return {@link List< EpidemicPreventionResultDTO>} * @Author zhaoqifeng * @Date 2022/3/29 14:52 */ List getEpidemicPreventionList(EpidemicPreventionFormDTO formDTO); List natList(EpidemicPreventionFormDTO formDTO); List vaccineList(EpidemicPreventionFormDTO formDTO); IcResiUserEntity selectResiNoDelFlag(@Param("icResiUserId") String icResiUserId); List userChart(@Param("orgId") String orgId, @Param("orgType") String orgType, @Param("agencyIdList") List agencyIdList, @Param("gridIdList") List gridIdList); /** * desc:根据维度获取居民信息表的数据[正常状态的居民] * * @param formDTO * @return */ List getResiUserGroupHomeId(RentTenantDataFormDTO formDTO); /** * desc:条件获取居民Id列表 所有状态的包含死亡等状态 * * @param customerId * @param gridId * @param neighborhoodId * @return */ List listUserIds(@Param("customerId") String customerId, @Param("gridId") String gridId, @Param("neighborhoodId") String neighborhoodId); List getAllUserIds(@Param("idCard") String idCard, @Param("customerId") String customerId); /** * 获取客户下志愿者信息 * * @Param customerId * @Return {@link List< IcVolunteerPolyDTO>} * @Author zhaoqifeng * @Date 2022/5/19 10:40 */ List getVolunteerList(@Param("customerId") String customerId, @Param("userId") String userId); /** * 统计数据 * * @param idCard * @param customerId * @return int * @author LZN * @date 2022/6/23 9:47 */ int selectCountByIdCard(@Param("idCard") String idCard, @Param("customerId") String customerId); /** * 根据身份证号修改数据 * * @param entity * @return void * @author LZN * @date 2022/6/23 9:47 */ void updateIcResiUserByIdCard(@Param("entity") IcResiUserEntity entity); /** * 根据身份证号查询id * * @param customerId * @param idCard * @return */ String seletIdByIdCard(@Param("customerId") String customerId, @Param("idCard") String idCard); /** * @return com.epmet.dto.IcResiUserConfirmDTO * @describe: 查询家庭成员信息 * @author wangtong * @date 2022/6/1 16:16 * @params [icResiUserId] */ IcResiUserConfirmDTO selectMemberDetail(@Param("icResiUserId") String icResiUserId); /** * 【我的家庭】迁出家庭成员 查询缺失字段 * * @param icResiUserId * @param customerId * @return com.epmet.dto.form.MoveOutMemberFormDTO * @author LZN * @date 2022/6/10 11:03 */ MoveOutMemberFormDTO moveOutMember(@Param("icResiUserId") String icResiUserId, @Param("customerId") String customerId); /** * @return com.epmet.entity.IcResiUserEntity * @describe: 通过身份证号查询实体类 * @author wangtong * @date 2022/6/13 17:32 * @params [idCard, customerId] */ IcResiUserEntity selectResiUserEntityByIdCard(@Param("idCard") String idCard, @Param("customerId") String customerId); List getListIcResiUserDTO(@Param("icResiUserIdList") List icResiUserIdList); /** * desc:获取客户内 每个房屋内的居民数和人均收入 * * @param customerId * @return */ List> getResiUserCountGroupHomeId(@Param("customerId") String customerId); /** * 通过社区ID获取所属人员 * * @param communityId * @return */ List getUserListByCommunityId(@Param("communityId") String communityId); /** * 获取录入居民的数量 * * @Param formDTO * @Return {@link Map} * @Author zhaoqifeng * @Date 2022/6/29 17:37 */ List getIcUserCount(IcUserCountFormDTO formDTO); List icUserStatisList(UserChartFormDTO formDTO); /** * @Description 根据身份证获取组织下的居民个数 * @param agencyId * @param idCard * @Author zxc * @Date 2022/10/24 15:47 */ ResiAndLocalResiResultDTO getResiCount(@Param("agencyId")String agencyId,@Param("idCard")String idCard,@Param("customerId")String customerId); List getResiUserList(ComparisonFormDTO formDTO); List getUserByRenHu(RHZKStatisticsFormDTO formDTO); List getImportUserList(@Param("customerId")String customerId,@Param("agencyId")String agencyId); }