LaborServiceDictController.java
4.1 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
96
97
98
99
100
101
102
103
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.dto.labor.AbnormalRecordDTO;
import com.subsidy.dto.labor.AddProjectDTO;
import com.subsidy.dto.labor.ProjectManageDTO;
import com.subsidy.dto.labor.ProjectsDTO;
import com.subsidy.model.AdministerDO;
import com.subsidy.model.ProjectDO;
import com.subsidy.model.ProjectMemberMappingDO;
import com.subsidy.service.LaborServiceDictService;
import com.subsidy.vo.labor.ProjectManageVO;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
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;
import io.swagger.annotations.Api;
/**
* <p>
* 劳务公司字典表 前端控制器
* </p>
*
* @author Tuyp
* @since 2024-07-18
*/
@RestController
@Api(tags = "劳务公司字典表")
@RequestMapping("/laborServiceDict")
public class LaborServiceDictController {
@Autowired
private LaborServiceDictService laborServiceDictService;
@PostMapping("login")
@ApiOperation("登录 accountName password ")
public ResponseVO login(@RequestBody AdministerDO administerDO){
return ResponseData.generateCreatedResponse(0,laborServiceDictService.login(administerDO));
}
@PostMapping("projects")
@ApiOperation("项目列表 userId 当前用户id projectName pageSize pageNum")
public ResponseVO projects(@RequestBody ProjectsDTO projectsDTO){
return ResponseData.generateCreatedResponse(0,laborServiceDictService.projects(projectsDTO));
}
@PostMapping("addProject")
@ApiOperation("添加项目 userId projectName companyId laborServiceId salaryDate startDate endDate")
public ResponseVO addProject(@RequestBody AddProjectDTO addProjectDTO){
laborServiceDictService.addProject(addProjectDTO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("updateProject")
@ApiOperation("修改项目 id userId projectName companyId laborServiceId salaryDate startDate endDate")
public ResponseVO updateProject(@RequestBody AddProjectDTO addProjectDTO){
laborServiceDictService.updateProject(addProjectDTO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("deleteProject")
@ApiOperation("删除项目 id userId")
public ResponseVO deleteProject(@RequestBody AddProjectDTO addProjectDTO){
laborServiceDictService.deleteProject(addProjectDTO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("projectManage")
@ApiOperation("详情--项目管理 projectId 项目id userInfo 姓名或手机号")
public ResponseVO projectManage(@RequestBody ProjectManageDTO projectManageDTO){
return ResponseData.generateCreatedResponse(0,laborServiceDictService.projectManage(projectManageDTO));
}
@PostMapping("updateJobName")
@ApiOperation("id : projectManage接口返回的mappingId jobName 修改职位")
public ResponseVO updateJobName(@RequestBody ProjectMemberMappingDO projectMemberMappingDO){
laborServiceDictService.updateJobName(projectMemberMappingDO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("fireMember")
@ApiOperation("操作离职 id : projectManage接口返回的mappingId ")
public ResponseVO fireMember(@RequestBody ProjectMemberMappingDO projectMemberMappingDO){
laborServiceDictService.fireMember(projectMemberMappingDO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("abnormalRecord")
@ApiOperation("异动记录 projectId 项目id pageSize pageNum userInfo 姓名或者手机号")
public ResponseVO abnormalRecord(@RequestBody AbnormalRecordDTO abnormalRecordDTO ){
return ResponseData.generateCreatedResponse(0,laborServiceDictService.abnormalRecord(abnormalRecordDTO));
}
}