EquipmentCenterController.java
9.5 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
package com.skua.modules.equipment.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.skua.core.api.vo.Result;
import com.skua.core.aspect.annotation.AutoLog;
import com.skua.modules.equipment.dto.ReportStatisticsDTO;
import com.skua.modules.equipment.service.IProductionEquipmentService;
import com.skua.modules.equipment.vo.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
@Slf4j
@Api(tags = "设备中心")
@RestController
@RequestMapping("/web/equipment/equipmentCenter")
public class EquipmentCenterController {
@Autowired
private IProductionEquipmentService iProductionEquipmentService;
@AutoLog(value = "设备中心-顶部总览")
@ApiOperation(value = "设备中心-顶部总览", notes = "设备中心-顶部总览")
@GetMapping(value = "/topOverview")
public Result<ProductionEquipmentVO> topOverview(ReportStatisticsDTO reportStatisticsDTO) {
Result<ProductionEquipmentVO> result = new Result<ProductionEquipmentVO>();
ProductionEquipmentVO productionEquipmentVO = iProductionEquipmentService.getProductionEquipmentVO(reportStatisticsDTO);
result.setResult(productionEquipmentVO);
return result;
}
@AutoLog(value = "设备中心-设备统计")
@ApiOperation(value = "设备中心-设备统计", notes = "设备中心-设备统计")
@GetMapping(value = "/equipmentStatistics")
public Result<FaultStatisticsVO> equipmentStatistics(ReportStatisticsDTO reportStatisticsDTO) {
Result<FaultStatisticsVO> result = new Result<>();
FaultStatisticsVO equipmentStatistics = iProductionEquipmentService.getEquipmentStatistics(reportStatisticsDTO);
result.setResult(equipmentStatistics);
result.setSuccess(true);
return result;
}
@AutoLog(value = "设备中心-设备统计详情")
@ApiOperation(value = "设备中心-设备统计详情", notes = "设备中心-设备统计详情")
@GetMapping(value = "/equipmentStatisticsDetails")
public Result<IPage<EquipmentNewMaintenancePlanVO>> equipmentStatisticsDetails(ReportStatisticsDTO reportStatisticsDTO,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
Result<IPage<EquipmentNewMaintenancePlanVO>> result = new Result<IPage<EquipmentNewMaintenancePlanVO>>();
Page<EquipmentNewMaintenancePlanVO> pageList = new Page<EquipmentNewMaintenancePlanVO>(pageNo, pageSize);
pageList = iProductionEquipmentService.getEquipmentStatisticsDetails(pageList, reportStatisticsDTO);
result.setSuccess(true);
result.setResult(pageList);
return result;
}
@AutoLog(value = "设备中心-设备状态")
@ApiOperation(value = "设备中心-设备状态", notes = "设备中心-设备状态")
@GetMapping(value = "/equipmentState")
public Result<List<TOPTenVO>> equipmentState(ReportStatisticsDTO reportStatisticsDTO) {
Result<List<TOPTenVO>> result = new Result<>();
List<TOPTenVO> equipmentState = iProductionEquipmentService.getEquipmentState(reportStatisticsDTO);
result.setSuccess(true);
result.setResult(equipmentState);
return result;
}
@AutoLog(value = "设备中心-设备状态详情")
@ApiOperation(value = "设备中心-设备状态详情", notes = "设备中心-设备状态详情")
@GetMapping(value = "/equipmentStateDetails")
public Result<IPage<EquipmentNewMaintenancePlanVO>> equipmentStateDetails(ReportStatisticsDTO reportStatisticsDTO,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
Result<IPage<EquipmentNewMaintenancePlanVO>> result = new Result<IPage<EquipmentNewMaintenancePlanVO>>();
Page<EquipmentNewMaintenancePlanVO> pageList = new Page<EquipmentNewMaintenancePlanVO>(pageNo, pageSize);
pageList = iProductionEquipmentService.getEquipmentStateDetails(pageList, reportStatisticsDTO);
result.setSuccess(true);
result.setResult(pageList);
return result;
}
@AutoLog(value = "设备中心-设备完好率")
@ApiOperation(value = "设备中心-设备完好率", notes = "设备中心-设备完好率")
@GetMapping(value = "/equipmentIntactRate")
public Result<List<ContrastVO>> equipmentIntactRate(ReportStatisticsDTO reportStatisticsDTO) {
Result<List<ContrastVO>> result = new Result<List<ContrastVO>>();
List<ContrastVO> equipmentIntactRate = iProductionEquipmentService.getEquipmentIntactRate(reportStatisticsDTO);
result.setSuccess(true);
result.setResult(equipmentIntactRate);
return result;
}
@AutoLog(value = "设备中心-设备完好率详情")
@ApiOperation(value = "设备中心-设备完好率详情", notes = "设备中心-设备完好率详情")
@GetMapping(value = "/equipmentIntactRateDetails")
public Result<List<Map>> equipmentIntactRateDetails(ReportStatisticsDTO reportStatisticsDTO) {
Result<List<Map>> result = new Result<List<Map>>();
List<Map> equipmentIntactRateDetails = iProductionEquipmentService.getEquipmentIntactRateDetails(reportStatisticsDTO);
result.setResult(equipmentIntactRateDetails);
result.setSuccess(true);
return result;
}
@AutoLog(value = "设备中心-MTTR&MTBF")
@ApiOperation(value = "设备中心-MTTR&MTBF", notes = "设备中心-MTTR&MTBF")
@GetMapping(value = "/equipmentMF")
public Result<List<ContrastVO>> equipmentMF(ReportStatisticsDTO reportStatisticsDTO) {
Result<List<ContrastVO>> result = new Result<List<ContrastVO>>();
List<ContrastVO> equipmentMF = iProductionEquipmentService.getEquipmentMF(reportStatisticsDTO);
result.setResult(equipmentMF);
result.setSuccess(true);
return result;
}
@AutoLog(value = "设备中心-MTTR&MTBF详情")
@ApiOperation(value = "设备中心-MTTR&MTBF详情", notes = "设备中心-MTTR&MTBF详情")
@GetMapping(value = "/equipmentMFDetails")
public Result<List<Map>> equipmentMFDetails(ReportStatisticsDTO reportStatisticsDTO) {
Result<List<Map>> result = new Result<List<Map>>();
List<Map> equipmentMFDetails = iProductionEquipmentService.getEquipmentMFDetails(reportStatisticsDTO);
result.setResult(equipmentMFDetails);
result.setSuccess(true);
return result;
}
@AutoLog(value = "设备中心-维护完成率趋势")
@ApiOperation(value = "设备中心-维护完成率趋势", notes = "设备中心-维护完成率趋势")
@GetMapping(value = "/maintainCompleteRate")
public Result<List<ContrastVO>> maintainCompleteRate(ReportStatisticsDTO reportStatisticsDTO) {
Result<List<ContrastVO>> result = new Result<List<ContrastVO>>();
List<ContrastVO> maintainCompleteRate = iProductionEquipmentService.getMaintainCompleteRate(reportStatisticsDTO);
result.setResult(maintainCompleteRate);
result.setSuccess(true);
return result;
}
@AutoLog(value = "设备中心-维护完成率趋势详情")
@ApiOperation(value = "设备中心-维护完成率趋势详情", notes = "设备中心-维护完成率趋势详情")
@GetMapping(value = "/maintainCompleteRateDetails")
public Result<List<Map>> maintainCompleteRateDetails(ReportStatisticsDTO reportStatisticsDTO) {
Result<List<Map>> result = new Result<>();
List<Map> maintainCompleteRateDetails = iProductionEquipmentService.getMaintainCompleteRateDetails(reportStatisticsDTO);
result.setResult(maintainCompleteRateDetails);
result.setSuccess(true);
return result;
}
@AutoLog(value = "设备中心-维护维修费用")
@ApiOperation(value = "设备中心-维护维修费用", notes = "设备中心-维护维修费用")
@GetMapping(value = "/maintainRepairCost")
public Result<List<ContrastVO>> maintainRepairCost(ReportStatisticsDTO reportStatisticsDTO) {
Result<List<ContrastVO>> result = new Result<List<ContrastVO>>();
List<ContrastVO> maintainCompleteRate = iProductionEquipmentService.getContrastCost(reportStatisticsDTO);
result.setResult(maintainCompleteRate);
result.setSuccess(true);
return result;
}
@AutoLog(value = "设备中心-维护维修费用详情")
@ApiOperation(value = "设备中心-维护维修费用详情", notes = "设备中心-维护维修费用详情")
@GetMapping(value = "/maintainRepairCostDetails")
public Result<List<Map>> maintainRepairCostDetails(ReportStatisticsDTO reportStatisticsDTO) {
Result<List<Map>> result = new Result<>();
List<Map> contrastCostDetails = iProductionEquipmentService.getContrastCostDetails(reportStatisticsDTO);
result.setResult(contrastCostDetails);
result.setSuccess(true);
return result;
}
}