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);
|
}
|
}
|