EntmicroStaffDepartRelationService.java
2.78 KB
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
package cn.com.glsx.entmicro.service;
import cn.com.glsx.entmicro.entity.EntmicroStaffDepartRelation;
import cn.com.glsx.entmicro.mapper.EntmicroStaffDepartRelationMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* @author zhouhaibao
* @version 1.0
* @description: 员工部门关系表
* @date 2021/11/8 16:10
*/
@Service
public class EntmicroStaffDepartRelationService {
@Resource
private EntmicroStaffDepartRelationMapper entmicroStaffDepartRelationMapper;
public void insertList(List<EntmicroStaffDepartRelation> entmicroStaffDepartRelationList) {
//TODO 重复数据判断
entmicroStaffDepartRelationMapper.insertList(entmicroStaffDepartRelationList);
}
/**
* 根据员工id查询员工的部门
*
* @param staffId 员工id
* @return
*/
public List<EntmicroStaffDepartRelation> findDepartByStaffId(Integer staffId) {
return entmicroStaffDepartRelationMapper.findDepartByStaffId(staffId);
}
/**
* 根据员工id查询关联商户
*
* @param staffId 员工id
* @return 商户列表
*/
public List<Integer> findRelevanceMerchantByStaffId(Integer staffId) {
return entmicroStaffDepartRelationMapper.findRelevanceMerchantByStaffId(staffId);
}
/**
* 根据员工id查询员工的部门
*
* @param integerList 员工id
* @return
*/
public Map<Integer, EntmicroStaffDepartRelation> findByIds(List<Integer> integerList) {
return entmicroStaffDepartRelationMapper.findByIds(integerList);
}
/**
* 根据员工id查询员工的部门
*
* @param oneIds 员工id
* @return
*/
public EntmicroStaffDepartRelation findByoneIds(String oneIds) {
return entmicroStaffDepartRelationMapper.findByoneIds(oneIds);
}
/**
* 删除员工部门
*
* @param deletelist 部门集合
*/
public void deleteStaffDepartment(List<EntmicroStaffDepartRelation> deletelist) {
entmicroStaffDepartRelationMapper.deleteStaffDepartment(deletelist);
}
public void deleteStaff(Integer staffId) {
entmicroStaffDepartRelationMapper.deleteStaff(staffId);
}
public List<EntmicroStaffDepartRelation> findStaffUidDepartForMerchant(List<Integer> staffIdList, Integer merchantId) {
List<EntmicroStaffDepartRelation> staffDepartRelationList = entmicroStaffDepartRelationMapper.findStaffUidDepartForMerchantList(staffIdList, merchantId);
return staffDepartRelationList;
}
public EntmicroStaffDepartRelation findDepartByStaffIdForMerchant(Integer staffId, Integer merchantId) {
return entmicroStaffDepartRelationMapper.findDepartByStaffIdForMerchant(staffId, merchantId);
}
}