| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.modules.eam.entity.FaultIntervalTime; |
| | | import org.jeecg.modules.eam.service.IFaultIntervalTimeService; |
| | | import org.jeecg.modules.eam.vo.EquipmentAvailabilityVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.text.ParseException; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | /** |
| | | * @Description: mom_eam_fault_interval_time |
| | | * @Author: jeecg-boot |
| | | * @Date: 2023-08-30 |
| | |
| | | return super.importExcel(request, response, FaultIntervalTime.class); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 生产设备平均故障间隔时间MTBF |
| | | * (说明:设备平均技障间隔期 (MTBF): 指在规定期内,设备无故障工作时间的平均值。设备的平均故障同隔期指标越大好,表明设备无故障运行时间长。 |
| | | * 设备平均故障间隔期(MTBP)=(日历时间-总故障停机时间)/总故障次数) |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/getMTBF") |
| | | public JSONObject getMTBF(@RequestParam Map<String, String> query) throws ParseException { |
| | | Map<String,Object> result= new HashMap<>(); |
| | | IPage<FaultIntervalTime> pageData = new Page<FaultIntervalTime>(); |
| | | List<FaultIntervalTime> list = faultIntervalTimeService.getMTBF(query); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("data",list); |
| | | return jsonObject; |
| | | } |
| | | |
| | | } |