lyh
22 小时以前 582bb2627712f66157b5608c8f5798775fc38266
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
package org.jeecg.modules.eam.controller;
 
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.eam.dto.EchartsDto;
import org.jeecg.modules.eam.entity.EamFactorySecondMaintPlan;
import org.jeecg.modules.eam.service.IEamEquipmentService;
import org.jeecg.modules.eam.service.IEamFactorySecondMaintPlanService;
import org.jeecg.modules.eam.service.IEamReportRepairService;
import org.jeecg.modules.eam.service.IEamThirdMaintenanceOrderService;
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.RestController;
 
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
/**
 * @author Lyh
 * @Description: EAM首页接口
 * @date 2024/3/13 14:27
 */
@Slf4j
@Api(tags = "EAM首页接口")
@RestController
@RequestMapping("/eam/home")
public class EamHomeController {
    @Autowired
    private IEamEquipmentService iEamEquipmentService;
 
    @Autowired
    private IEamReportRepairService iEamReportRepairService;
 
    @Autowired
    private IEamThirdMaintenanceOrderService iEamThirdMaintenanceOrderService;
 
    @Autowired
    private IEamFactorySecondMaintPlanService iEamFactorySecondMaintPlanService;
 
    /**
     * 设备管理首页-技术状态与设备报修故障情况
     * @param
     * @return
     */
    @ApiOperation(value = "设备管理首页-技术状态与设备报修故障情况", notes = "设备管理首页-技术状态与设备报修故障情况")
    @GetMapping(value = "/techornology")
    public Result<?> techOrNology() {
        //技术状态
        List<EchartsDto> echartsDtoList=iEamEquipmentService.echartsList();
        //设备报修故障情况
        List<EchartsDto> echartsDtoList1=iEamReportRepairService.reportRepairList();
        Map<String,Object> map=new HashMap<>();
        map.put("jszt",echartsDtoList);
        map.put("bxqk",echartsDtoList1);
        return Result.ok(map);
    }
 
    /**
     * 设备管理首页-三级保养
     * @param
     * @return
     */
    @ApiOperation(value = "设备管理首页-三级保养", notes = "设备管理首页-三级保养")
    @GetMapping(value = "/maintenance")
    public Result<?> maintenance() {
        //三级保养
        List<EchartsDto> echartsDtoList = iEamThirdMaintenanceOrderService.selectList();
        return Result.ok(echartsDtoList);
    }
 
    /**
     * 设备管理首页-二保列表
     * @param
     */
    @ApiOperation(value = "设备管理首页-二保列表", notes = "设备管理首页-二保列表")
    @GetMapping(value = "/secondmaintenance")
    public Result<?> secondmaintenance() {
        //二级保养
        List<EamFactorySecondMaintPlan> echartsDtoList = iEamFactorySecondMaintPlanService.list();
        return Result.ok(echartsDtoList);
    }
}