You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

486 lines
18 KiB

/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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.dto.result.resi.ResiPortrayalDetailDTO;
import com.epmet.dto.result.resi.ResiPortrayalResultDTO;
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<IcResiUserEntity> {
/**
* @Author sun
* @Description 居民信息各表新增数据
**/
void add(@Param("tableName") String tableName, @Param("map") Map<String, String> 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<String, ?> map);
List<Map<String, Object>> selectListResiMap(@Param("customerId") String customerId,
@Param("formCode") String formCode,
@Param("conditions") List<ResiUserQueryValueDTO> conditions,
@Param("resultColumns") List<IcFormResColumnDTO> resultColumns,
@Param("subTables") List<String> subTables,
@Param("currentStaffAgencyId") List<String> currentStaffAgencyIds,
@Param("staffOrgPaths") List<String> staffOrgPaths,
@Param("gridIds") Set<String> gridIds,
@Param("resultTableName") String resultTableName,
@Param("keyword") String keyword,
@Param("groupByTables") Set<String> groupByTables);
/**
* 查询主表
*
* @param icResiUserId
* @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
* @author yinzuomei
* @date 2021/10/28 11:20 上午
*/
List<Map<String, Object>> selectListMapById(@Param("customerId") String customerId,
@Param("icResiUserId") String icResiUserId);
/**
* 根据ic_resi_user.id去查询各个子表记录,动态传入表名
*
* @param icResiUserId
* @param subTableName
* @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
* @author yinzuomei
* @date 2021/10/28 11:19 上午
*/
List<Map<String, Object>> 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<java.util.Map < java.lang.String, java.lang.Object>>
* @author yinzuomei
* @date 2021/11/2 10:35 上午
*/
List<Map<String, Object>> dynamicQuery(@Param("customerId") String customerId,
@Param("resultTableName") String resultTableName,
@Param("conditions") List<ResiUserQueryValueDTO> conditions,
@Param("subTables") List<String> subTables,
@Param("showSqlColumns") List<IcCustomExportResultDTO.SqlColumn> showSqlColumns,
@Param("currentStaffAgencyId") String currentStaffAgencyId,
@Param("staffOrgPaths") List<String> staffOrgPaths,
@Param("gridIds") List<String> gridIds,
@Param("groupByTables") List<String> 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<SearchByNameResultDTO> 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<String> selectUserDemandCode(String icResiUserId);
String selectCategoryNames(@Param("customerId") String customerId, @Param("codeSet") Set<String> codeSet);
@MapKey("HOME_ID")
Map<String, Map<String, String>> getHomeUserCategoryCount(@Param("buildId") String buildId);
/**
* @param userId
* @Description 根据userId查询志愿者
* @author zxc
* @date 2021/11/5 5:44 下午
*/
List<String> selectVolunteerByUserId(@Param("userId") String userId);
/**
* @param columns
* @Description 查询人员类别
* @author zxc
* @date 2021/11/8 1:50 下午
*/
Map<String, String> selectPersonType(@Param("columns") List<String> 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<DemandUserResDTO> 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<HouseUserDTO> 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<OptionDataResultDTO> 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<PartyMemberAgeResultDTO> 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<OptionDataResultDTO> 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<PartyMemberEducationResultDTO> getPartyMemberEducationList(@Param("orgType") String orgType, @Param("orgId") String orgId,
@Param("code") String code);
List<VolunteerDistributionResultDTO.Distribution> listIcResiInfosByUserIds(@Param("userIds") List<String> userIds);
Map<String, String> getCategoryListMap(@Param("columns") List<String> columns, @Param("icUserId") String icUserId);
Map<String, String> selectResiInfoMap(@Param("customerId") String customerId, @Param("idCard") String idCard, @Param("resiId") String resiId);
List<Map<String, Object>> selectResiUsers(@Param("types") List<String> types, @Param("orgId") String orgId);
List<String> icUserCustomerIds();
/**
* desc: 获取数据分析列中的 各类居民数据
*
* @param customerId
* @param tableName
* @param columnList
* @param id 非必填 leve有值时 必填
* @param level 非必填
* @return java.util.Map<java.lang.String, java.math.BigDecimal> 字段名:数量
* @author LiuJanJun
* @date 2022/2/12 3:03 下午
*/
Map<String, BigDecimal> getDataAnalyseCount(@Param("customerId") String customerId,
@Param("tableName") String tableName,
@Param("columnList") List<String> columnList,
@Param("id") String id,
@Param("level") String level,
@Param("idList")List<String> idList);
List<Map<String, String>> getIcUserList(@Param("customerId") String customerId, @Param("columns") List<String> columns);
/**
* Desc: 根据房屋IDs查询房屋下是否有存在居民的
*
* @param ids
* @author zxc
* @date 2022/3/2 10:32 上午
*/
List<String> getExistUserByHouseIds(@Param("ids") List<String> ids);
/**
* 居民防疫信息查询
*
* @Param formDTO
* @Return {@link List< EpidemicPreventionResultDTO>}
* @Author zhaoqifeng
* @Date 2022/3/29 14:52
*/
List<EpidemicPreventionResultDTO> getEpidemicPreventionList(EpidemicPreventionFormDTO formDTO);
List<EpidemicPreventionResultDTO> natList(EpidemicPreventionFormDTO formDTO);
List<EpidemicPreventionResultDTO> vaccineList(EpidemicPreventionFormDTO formDTO);
IcResiUserEntity selectResiNoDelFlag(@Param("icResiUserId") String icResiUserId);
List<UserChartResultDTO> userChart(@Param("orgId") String orgId, @Param("orgType") String orgType, @Param("agencyIdList") List<String> agencyIdList, @Param("gridIdList") List<String> gridIdList);
/**
* desc:根据维度获取居民信息表的数据[正常状态的居民]
*
* @param formDTO
* @return
*/
List<HouseIcResiUserResultDTO> getResiUserGroupHomeId(RentTenantDataFormDTO formDTO);
/**
* desc:条件获取居民Id列表 所有状态的包含死亡等状态
*
* @param customerId
* @param gridId
* @param neighborhoodId
* @return
*/
List<String> listUserIds(@Param("customerId") String customerId, @Param("gridId") String gridId, @Param("neighborhoodId") String neighborhoodId);
List<String> getAllUserIds(@Param("idCard") String idCard, @Param("customerId") String customerId);
/**
* 获取客户下志愿者信息
*
* @Param customerId
* @Return {@link List< IcVolunteerPolyDTO>}
* @Author zhaoqifeng
* @Date 2022/5/19 10:40
*/
List<IcVolunteerPolyDTO> 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<IcResiUserDTO> getListIcResiUserDTO(@Param("icResiUserIdList") List<String> icResiUserIdList);
/**
* desc:获取客户内 每个房屋内的居民数和人均收入
*
* @param customerId
* @return
*/
List<Map<String, Object>> getResiUserCountGroupHomeId(@Param("customerId") String customerId);
/**
* 通过社区ID获取所属人员
*
* @param communityId
* @return
*/
List<SendPointNoticeResultDTO> getUserListByCommunityId(@Param("communityId") String communityId);
/**
* 获取录入居民的数量
*
* @Param formDTO
* @Return {@link Map<String, Integer>}
* @Author zhaoqifeng
* @Date 2022/6/29 17:37
*/
List<IcUserCountResultDTO> getIcUserCount(IcUserCountFormDTO formDTO);
List<SearchByNameResultDTO> 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<IcResiUserDTO> getResiUserList(ComparisonFormDTO formDTO);
List<RHZKStatisticsResultDTO> getUserByRenHu(RHZKStatisticsFormDTO formDTO);
List<IcResiUserDTO> getImportUserList(@Param("customerId")String customerId,@Param("agencyId")String agencyId);
/**
* 烟台居民画像:按照学历分组,查询居民数量
* @param customerId
* @param orgId
* @param orgType:agency/grid
* @return
*/
List<ResiPortrayalResultDTO> queryEducationDistribute(@Param("customerId") String customerId,
@Param("orgId") String orgId,
@Param("orgType") String orgType);
List<ResiPortrayalResultDTO> selectAgeAgeDistribute(@Param("customerId") String customerId,
@Param("orgId") String orgId,
@Param("orgType") String orgType);
/**
* @param customerId
* @param orgId
* @param orgType
* @param codeType 学历:education 年龄:age
* @param code
* @return 居民画像,居民列表
*/
List<ResiPortrayalDetailDTO> selectPortrayalResiList(@Param("customerId") String customerId,
@Param("orgId") String orgId,
@Param("orgType") String orgType,
@Param("codeType")String codeType,
@Param("code") String code);
}