| | |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.common.util.DateUtils; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.entity.*; |
| | | import org.jeecg.modules.eam.mapper.RepairOrderMapper; |
| | |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | repairOrder.getCreateStartTime(), |
| | | repairOrder.getCreateEndTime(), |
| | | repairOrder.getEquipmentImportanceId(), |
| | | repairOrder.getFaultCause()); |
| | | repairOrder.getFaultCause(), |
| | | null |
| | | ); |
| | | |
| | | // Step.3 AutoPoi 导出Excel |
| | | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); |
| | |
| | | return Result.ok(faultCauseBar); |
| | | } |
| | | |
| | | /** |
| | | * 设备故障折现图 |
| | | * qsw 2024-7-24 |
| | | */ |
| | | @GetMapping("getEquipmentFaultCause") |
| | | public Result<?> getEquipmentFaultCause(@RequestParam Map<String, Object> params) { |
| | | String faultStartTime = (String)params.get("faultStartTime"); |
| | | if(StringUtils.isBlank(faultStartTime)){ |
| | | Date dayAfter = DateUtils.getDayAfter(new Date(),15); |
| | | params.put("faultStartTime",DateUtils.date2Str(DateUtils.getDayAfter(new Date(),-15),new SimpleDateFormat("yyyy-MM-dd hh:MM:ss"))); |
| | | params.put("faultEndTime", DateUtils.getCurrentDateStr()+" 23:59:59"); |
| | | } |
| | | List<Map<String, Object>> equipmentFaultCause = repairOrderService.getEquipmentFaultCause(params); |
| | | return Result.ok(equipmentFaultCause); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * MTPF |