| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.entity.*; |
| | | import org.jeecg.modules.eam.service.*; |
| | | import org.jeecg.modules.eam.vo.EquipmentAvailabilityVo; |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | repairOrderService.updateById(repairOrder); |
| | | return Result.OK("操作成功"); |
| | | } |
| | | |
| | | /** |
| | | * 设备完好率 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/equipmentAvailability") |
| | | public JSONObject equipmentAvailability(@RequestParam Map<String, String> query) throws ParseException { |
| | | List<EquipmentAvailabilityVo> list = repairOrderService.equipmentAvailability(query); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("data",list); |
| | | return jsonObject; |
| | | } |
| | | |
| | | /** |
| | | * 设备可开动率 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/getStartRate") |
| | | public JSONObject getStartRate(@RequestParam Map<String, String> query) throws ParseException { |
| | | List<EquipmentAvailabilityVo> list = repairOrderService.getStartRate(query); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("data",list); |
| | | return jsonObject; |
| | | } |
| | | } |