ProjectController.java
4.87 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
104
105
106
107
108
109
110
package com.order.erp.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.order.erp.common.constant.ServerResult;
import com.order.erp.domain.vo.OrderProfitAnalysisVo;
import com.order.erp.domain.vo.order.*;
import com.order.erp.service.order.IOrderCostInfoService;
import com.order.erp.service.order.IProjectBaseInfoService;
import com.order.erp.service.order.OrderProfitAnalysisService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.catalina.Server;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.Collections;
/**
* @author zhongnanhuang
* @version 1.0
* @project order-erp
* @description 订单利润表控制层
* @date 2023/10/23 11:48:36
*/
@RestController
@RequestMapping("/project")
@Api(tags = "项目信息")
public class ProjectController {
@Autowired
IOrderCostInfoService orderCostInfoService;
@Autowired
IProjectBaseInfoService projectBaseInfoService;
@PostMapping("/edit")
@ApiOperation("编辑")
public ServerResult<OrderProfitAnalysisVO> edit(@RequestBody @Validated ProjectBaseInfoVO vo) {
return projectBaseInfoService.edit(vo);
}
@PostMapping("/applyEditFileds")
@ApiOperation("申请修改")
public ServerResult<OrderProfitAnalysisVO> applyEditFileds(@RequestBody @Validated ProjectBaseInfoLockFieldVO vo) {
return projectBaseInfoService.applyEditFileds(vo);
}
@PostMapping("/pageProjectLockFieldApply")
@ApiOperation("分页查询项目字段申请记录")
public ServerResult<OrderProfitAnalysisVO> pageProjectLockFieldApply(@RequestBody @Validated QueryProjectLockFieldVO vo) {
return projectBaseInfoService.pageProjectLockFieldApply(vo);
}
@PostMapping("/audit")
@ApiOperation("审核")
public ServerResult<OrderProfitAnalysisVO> audit(@RequestBody @Validated AuditVO vo) {
return projectBaseInfoService.audit(vo);
}
@PostMapping("/InnerProfitInfo/listByPage")
@ApiOperation("内部生产利润分析表")
public ServerResult<Page<InnerProfitInfoVO>> listInnerProfitInfoByPage(@RequestBody @Validated OrderBaseInfoQueryVO queryVO) {
queryVO.setProductionDepartment(Collections.singletonList("内部"));
return projectBaseInfoService.listInnerProfitInfoByPage(queryVO);
}
@PostMapping("/BusinessProfitInfo/listByPage")
@ApiOperation("业务研发净利润分析表")
public ServerResult<Page<BusinessProfitInfoVO>> listBusinessProfitInfosByPage(@RequestBody @Validated OrderBaseInfoQueryVO queryVO) {
return projectBaseInfoService.listBusinessProfitInfoByPage(queryVO);
}
@PostMapping("/businessProfit/export")
@ApiOperation("业务研发净利润分析表单个导出")
public void exportBusinessProfitInfo(HttpServletResponse response, @RequestParam("projectNoPrefix") String projectNoPrefix) throws Exception {
projectBaseInfoService.exportBusinessProfitInfo(response, projectNoPrefix);
}
@PostMapping("/innerProfit/export")
@ApiOperation("内部研发净利润分析表导出")
public void exportInnerProfitInfo(HttpServletResponse response, @RequestParam("projectNoPrefix") String projectNoPrefix) throws Exception {
projectBaseInfoService.exportInnerProfitInfo(response, projectNoPrefix);
}
//直接通过查询传递多个projectNo去查询。
@PostMapping("/businessProfit/exportExcel")
@ApiOperation("业务研发净利润分析表多个导出")
public void exportBusinessProfitExcel(HttpServletResponse response, @RequestBody ProjectBaseInfoQueryVO queryVO) throws Exception {
projectBaseInfoService.exportBusinessProfitExcel(response, queryVO);
}
//直接通过查询传递多个projectNo去查询。
@PostMapping("/innerProfitInfo/exportExcel")
@ApiOperation("内部生产净利润分析表多个导出")
public void exportInnerProfitInfoExcel(HttpServletResponse response, @RequestBody ProjectBaseInfoQueryVO queryVO) throws Exception {
projectBaseInfoService.exportInnerProfitInfoExcel(response, queryVO);
}
@PostMapping("/businessProfit/setStatus")
@ApiOperation("业务研发净利润分析表审核状态设置")
public ServerResult setProjectBaseInfoDevelopmentStatus(@RequestBody OrderBaseInfoVO vo) {
return projectBaseInfoService.setProjectBaseInfoDevelopmentStatus(vo);
}
//直接通过查询传递多个projectNo去查询。
@PostMapping("/innerProfitInfo/setStatus")
@ApiOperation("内部生产净利润分析表审核状态设置")
public ServerResult setInnerProductionStatus(@RequestBody OrderBaseInfoVO vo) {
return projectBaseInfoService.setInnerProductionStatus(vo);
}
}