MemberController.java
3.96 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
90
91
92
93
94
95
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.dto.company.AttendMembersDTO;
import com.subsidy.dto.member.*;
import com.subsidy.model.CompanyMemberMappingDO;
import com.subsidy.model.MemberDO;
import com.subsidy.service.MemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 学生表 前端控制器
* </p>
*
* @author Tuyp
* @since 2024-01-11
*/
@RestController
@Api(tags = "学生表")
@RequestMapping("/member")
public class MemberController {
@Autowired
private MemberService memberService;
@PostMapping("departMembers")
@ApiOperation("某公司的离职记录 pageSize pageNum companyId userName 姓名/手机号/身份证号")
public ResponseVO departMembers(@RequestBody DepartMembersDTO departMembersDTO){
return ResponseData.generateCreatedResponse(0,memberService.departMembers(departMembersDTO));
}
@PostMapping("exportDepartMembers")
@ApiOperation("导出离职人员记录 companyId userName 姓名/手机号/身份证号 ")
public void exportDepartMembers(@RequestBody DepartMembersDTO departMembersDTO){
memberService.exportDepartMembers(departMembersDTO);
}
@PostMapping("attendMembers")
@ApiOperation("查看某个企业已经参加过该培训的学生 companyId departmentId userName pageSize pageNum")
public ResponseVO attendMembers(@RequestBody AttendMembersDTO attendMembersDTO){
return ResponseData.generateCreatedResponse(0,memberService.attendMembers(attendMembersDTO));
}
@PostMapping("memberAttendInfo")
@ApiOperation("某个学员在该企业参加培训的详情 memberId 学员id companyId 公司id")
public ResponseVO memberAttendInfo(@RequestBody CompanyMemberMappingDO companyMemberMappingDO){
return ResponseData.generateCreatedResponse(0,memberService.memberAttendInfo(companyMemberMappingDO));
}
@PostMapping("getAll")
@ApiOperation("查询某部门成员 pageNum pageSize departmentId userName status startDate endDate")
@LoginRequired
public ResponseVO getAll(@RequestBody GetAllDTO getAllDTO){
return ResponseData.generateCreatedResponse(0,memberService.getAll(getAllDTO));
}
@PostMapping("deleteMember")
@ApiOperation("删除成员 id ")
@LoginRequired
public ResponseVO deleteMember(@RequestBody MemberDO memberDO){
return ResponseData.generateCreatedResponse(0,memberService.deleteMember(memberDO));
}
@PostMapping("addMember")
@ApiOperation("新增成员 companyId userName accountName accountNameEn telephone gender image idCard departmentIds jobIds workNo inductionDate email")
@LoginRequired
public ResponseVO addMember(@RequestBody AddMemberDTO addMemberDTO){
return ResponseData.generateCreatedResponse(0,memberService.addMember(addMemberDTO));
}
@PostMapping("updateMember")
@ApiOperation("编辑成员 {id companyId userName accountName accountNameEn telephone gender image idCard idCardPhoto status departmentIds jobIds}")
@LoginRequired
public ResponseVO updateMember(@RequestBody AddMemberDTO addMemberDTO){
return ResponseData.generateCreatedResponse(0,memberService.updateMember(addMemberDTO));
}
@PostMapping("changeDepartments")
@ApiOperation("修改部门 desDepId[] 目的部门 memberIds[] 成员id")
@LoginRequired
public ResponseVO changeDepartments(@RequestBody ChangeDepartmentsDTO changeDepartmentsDTO){
return ResponseData.generateCreatedResponse(0,memberService.changeDepartments(changeDepartmentsDTO));
}
}