liuxiaolong
2019-05-06 f99bc8c6a1d10610373738edd7d0aa0181c81d99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
package com.cloud.user.dao;
 
import com.cloud.model.sys.BbEmployee;
import com.cloud.user.model.CServerPerson;
import com.cloud.user.model.MergePersonView;
import com.cloud.user.vo.BbEmployeeVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
import java.util.Map;
import java.util.Set;
 
/**
 * 人员
 * Dao层
 */
@Mapper
public interface BbEmployeeDao {
    
    // 添加
    String  add(BbEmployee entity);
    
    // 修改
     void update(BbEmployee entity);
    //查询单人详情 wp 19-02-12
    Map<String,Object> selectPersonDetailById(@Param(value = "personId") String personId,
                                              @Param(value = "delFlag") Boolean delFlag);
    // 根据主键查询
    BbEmployee findById(Map<String, Object> params);
 
    // 根据主键从临时库查询
    BbEmployee findByIdFromTemp(String id);
    
    // 根据主键删除
    Integer deleteById(Map<String, Object> params);
 
    // 从临时库删除
    Integer deleteByIdFromTemp(String id);
    
    // 得到总条数    
    int count(Map<String, Object> params);
 
    // 得到临时库总条数
    int countTemp(Map<String, Object> params);
 
    // 得到总库总条数
    int countBase(Map<String, Object> params);
 
    // 查询总库中是否有重复的身份证号
    int isRepeatIdCard(Map<String,Object> param);
 
    Map anyThingToUpdate(String id);
 
    Map tempToUpdate(String id);
    
    // 查询列表
    List<BbEmployee> findData(Map<String, Object> params);
 
    // 查询总库全部人员列表
    List<BbEmployee> findDataFromBase(Map<String, Object> params);
 
    // 查询临时库全部人员列表
    List<BbEmployee> findDataFromTemp(Map<String, Object> params);
 
    Integer deleteByIds(Map<String, Object> params);
 
    //查询组织下的人员数
    int findOrgEmployeeByTypeCount(Map<String, Object> params);
 
    //查询组织下的人员数
    List<BbEmployee> findOrgEmployeeByTypeData(Map<String, Object> params);
 
    //通过id查询本人及家人信息
    Map<String,Object> findInfoByEmployeeId(Map<String, Object> params);
 
    //feign对外接口查询人员ID集合
    List<Integer> findOrgEmpIds(Map<String, Object> params);
 
    // 查找学生和老师
    List<BbEmployee> findStudentAndTeachers(Map<String, Object> params);
 
    List<Map<String,Object>> findOrgEmpMap(Map<String, Object> params);
 
    //根据家长ID查询学生信息
    List<BbEmployee> findStuByEmpId(Map<String, Object> params);
 
    //教师模糊查询根据拼音
    List<BbEmployee> findTeacherByPin(Map<String, Object> params);
    //教师模糊查询根据拼音
    List<Map<String,Object>> findOfficeNameById(Map<String, Object> params);
 
    //根据电话查询人员表是否存在此人
    BbEmployee isExistEmp(@Param("orgId") Long orgId, @Param("phone") String phone);
 
    List<Map<String,Object>> findOrgTeaMap(Map<String, Object> params);
 
    Integer findOrgEmpMapCount(Map<String, Object> params);
 
    void updateByPhone(BbEmployee bbEmployee);
 
    BbEmployee isExistEmployee(@Param("orgId") Long orgId, @Param("phone") String phone);
 
    int addVisitor(BbEmployee bean);
 
    BbEmployee findEmpById(Map<String, Object> params);
 
    int findOrgEmpInVisitCount(Map<String, Object> params);
 
    List<BbEmployee> findOrgEmpInVisitData(Map<String, Object> params);
 
    void updateBbEmpId(BbEmployee dbBean);
 
    //通过组织机构id查询该机构下的所有人员
    List<BbEmployee> findDataByOfficeId(Map<String, Object> params);
 
    //组织机构变更
    int updateOfficeId(Map<String, Object> params);
 
    /**
     * wp
     * 根据多主键查询 多人信息
     * wp
     * 2018-12-01
     */
    List<CServerPerson> findByPersonIds(@Param("personIds") Set<String> personIds,@Param("personLike") String personLike);
 
    /**
     * wp
     * 查询全部 待更新人员
     * @return
     */
    List<MergePersonView> findAllMergePerson();
 
    /**
     * wp  待更新人员总数
     * @return
     */
    Integer queryUpdatingPersonCount();
 
    /**
     * wp
     * @param personId
     * @return
     */
    Integer deleteMergePerson(String personId);
 
    /**
     * wp  将 集群信息 插入 数据表中
     * @param cluInfo
     * @return
     */
    int updateBbPersonBaseForCluInfo(@Param(value = "cluInfos") Set<String> cluInfo,@Param(value = "personId") String personId);
 
}