CompanyDictController.java
3.36 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
package com.laowu.controller;
import com.laowu.dto.company.AddCompanyDTO;
import com.laowu.dto.company.CompanyDTO;
import com.laowu.dto.company.DeleteCompanyDTO;
import com.laowu.dto.company.StationCompanyDTO;
import com.laowu.model.CompanyDictDO;
import com.laowu.model.WorkstationDictDO;
import com.laowu.service.CompanyDictService;
import com.laowu.util.ResponseData;
import com.laowu.util.ResponseVO;
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 2023-02-16
*/
@RestController
@Api(tags = "企业管理表")
@RequestMapping("/companyDict")
public class CompanyDictController {
@Autowired
private CompanyDictService companyDictService;
@PostMapping("/company")
@ApiOperation("获取所有企业 pageSize pageNum province city county companyName")
public ResponseVO company(@RequestBody CompanyDTO companyDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.company(companyDTO));
}
@PostMapping("deleteCompany")
@ApiOperation("删除某个企业 userId module id")
public ResponseVO deleteCompany(@RequestBody DeleteCompanyDTO deleteCompanyDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.deleteCompany(deleteCompanyDTO));
}
@PostMapping("addCompany")
@ApiOperation("添加企业 userId module 模块 companyName companyLogo province city county positionId companyCode account companyDesc companyOrigin companyPhotoDOS[ photo] companyLabelDOS[ label] 关联业务 stationId")
public ResponseVO addCompany(@RequestBody AddCompanyDTO addCompanyDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.addCompany(addCompanyDTO));
}
@PostMapping("updateCompany")
@ApiOperation("更新企业 userId module id companyName companyLogo province city county positionId companyCode account companyDesc companyOrigin companyPhotoDOS[ photo] companyLabelDOS[ label] 关联业务 stationId")
public ResponseVO updateCompany(@RequestBody AddCompanyDTO addCompanyDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.updateCompany(addCompanyDTO));
}
@PostMapping("oneCompany")
@ApiOperation("查询一个企业 id")
public ResponseVO oneCompany(@RequestBody CompanyDictDO companyDictDO){
return ResponseData.generateCreatedResponse(0,companyDictService.oneCompany(companyDictDO));
}
@PostMapping("totalCount")
@ApiOperation("查看某个省某个工作站的企业数 id 工作站id")
public ResponseVO totalCount(@RequestBody WorkstationDictDO workstationDictDO){
return ResponseData.generateCreatedResponse(0,companyDictService.totalCount(workstationDictDO));
}
@PostMapping("stationCompany")
@ApiOperation("查看工作站下的企业 id 工作站id")
public ResponseVO stationCompany(@RequestBody StationCompanyDTO stationCompanyDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.stationCompany(stationCompanyDTO));
}
}