| | |
| | | reqVO.setItemId(itemId); |
| | | try { |
| | | if (startTime == "") { |
| | | reqVO.setStartTime(new Date((new Date()).getTime() - 60 * 60 * 1000)); |
| | | reqVO.setStartTime(null); |
| | | } else { |
| | | reqVO.setStartTime(formatter.parse(startTime)); |
| | | |
| | | } |
| | | if (endTime == "") { |
| | | reqVO.setEndTime(new Date((new Date()).getTime() + 60 * 60 * 1000)); |
| | | reqVO.setEndTime(null); |
| | | } else { |
| | | reqVO.setEndTime(formatter.parse(endTime)); |
| | | } |
| | |
| | | mcsApi.updateScheduleModelSetting(modelCode, key, value); |
| | | return success( true); |
| | | } |
| | | |
| | | @GetMapping("/alarm-config/update") |
| | | @Operation(summary = "修改预警配置列表") |
| | | public CommonResult<Boolean> updateAlarmConfig(@RequestParam("alarmObj")String alarmObj, @RequestParam("upperLimit")String upperLimit, @RequestParam("lowerLimit")String lowerLimit){ |
| | | mcsApi.updateAlarmConfig(alarmObj, upperLimit, lowerLimit); |
| | | return success( true); |
| | | } |
| | | |
| | | @PostMapping("/chart/param/update") |
| | | @Operation(summary = "修改图表参数配置") |
| | | public CommonResult<Boolean> updateChartParam(@RequestBody ChartDTO chartDTO){ |
| | | mcsApi.updateChartParam(chartDTO); |
| | | return success( true); |
| | | } |
| | | |
| | | @PostMapping("/item/result") |
| | | public CommonResult<List<Object[]>> getItemResult(@RequestBody PreItemResultReqVO reqVO){ |
| | | List<Object[]> list = mcsApi.getItemResult(reqVO); |
| | | return CommonResult.success(list); |
| | | } |
| | | |
| | | @GetMapping("/predict-item/itemNo") |
| | | public CommonResult<PredictItemVO> getPredictItemByItemNo(@RequestParam("itemNo") String itemNo){ |
| | | PredictItemVO proVo = mcsApi.getPredictItemByItemNo(itemNo); |
| | | return CommonResult.success(proVo); |
| | | } |
| | | |
| | | @PostMapping("/item/result/last-point") |
| | | public CommonResult<List<Object[]>> getItemResultLastPoint(@RequestBody PreItemResultReqVO reqVO){ |
| | | List<Object[]> list = mcsApi.getItemResultLastPoint(reqVO); |
| | | return CommonResult.success(list); |
| | | } |
| | | |
| | | @GetMapping("/schedule-suggest/last-one") |
| | | @Operation(summary = "获取15分钟内最新预警建议信息") |
| | | public CommonResult<List<ScheduleSuggestRespDTO>> getLastSuggest(@RequestParam Map<String, Object> params) { |
| | | List<ScheduleSuggestRespDTO> data = mcsApi.getLastSuggest(params); |
| | | return CommonResult.success(data); |
| | | } |
| | | } |