| | |
| | | */ |
| | | private BigDecimal powerC; |
| | | /** |
| | | * 电力产生 |
| | | */ |
| | | private BigDecimal powerP; |
| | | /** |
| | | * 电力单耗 |
| | | */ |
| | | private BigDecimal powerOnlyC; |
| | |
| | | */ |
| | | private BigDecimal powerC; |
| | | /** |
| | | * 电力产生 |
| | | */ |
| | | private BigDecimal powerP; |
| | | /** |
| | | * 电力单耗 |
| | | */ |
| | | private BigDecimal powerOnlyC; |
| | |
| | | QueryWrapper<CokingOverviewEntity> queryWrapperMonth = new QueryWrapper<>(); |
| | | queryWrapperMonth.eq("process_type", processType); |
| | | queryWrapperMonth.between("clock", monthStartClock,clock); |
| | | queryWrapperMonth.select("sub_process_type","ROUND(AVG(steam_p)*30, 2) as steam_p","ROUND(AVG(dj_steam_p)*30, 2) as dj_steam_p","ROUND(AVG(steam_c)*30, 2) as steam_c","ROUND(AVG(steam_only_c)*30, 2) as steam_only_c","ROUND(AVG(steam_v)*30, 2) as steam_v","ROUND(AVG(gas_p)*30, 2) as gas_p","ROUND(AVG(gas_c)*30, 2) as gas_c","ROUND(AVG(power_c)*30, 2) as power_c","ROUND(AVG(power_only_c)*30, 2) as power_only_c","ROUND(AVG(power_c_standard)*30, 2) as power_c_standard","ROUND(AVG(idle_time)*30, 0) as idle_time","ROUND(AVG(bfg_c)*30, 2) as bfg_c","ROUND(AVG(cog_p)*30, 2) as cog_p","ROUND(AVG(cog_c)*30, 2) as cog_c","ROUND(AVG(bfg_only_c)*30, 2) as bfg_only_c","ROUND(AVG(cog_only_c)*30, 2) as cog_only_c","ROUND(AVG(gxls)*30, 0) as gxls","ROUND(AVG(run_time)*30, 0) as run_time","ROUND(AVG(work_ratio), 2) as work_ratio") |
| | | queryWrapperMonth.select("sub_process_type","ROUND(AVG(steam_p)*30, 2) as steam_p","ROUND(AVG(dj_steam_p)*30, 2) as dj_steam_p","ROUND(AVG(steam_c)*30, 2) as steam_c","ROUND(AVG(steam_only_c)*30, 2) as steam_only_c","ROUND(AVG(steam_v)*30, 2) as steam_v","ROUND(AVG(gas_p)*30, 2) as gas_p","ROUND(AVG(gas_c)*30, 2) as gas_c","ROUND(AVG(power_c)*30, 2) as power_c","ROUND(AVG(power_p)*30, 2) as power_p","ROUND(AVG(power_only_c)*30, 2) as power_only_c","ROUND(AVG(power_c_standard)*30, 2) as power_c_standard","ROUND(AVG(idle_time)*30, 0) as idle_time","ROUND(AVG(bfg_c)*30, 2) as bfg_c","ROUND(AVG(cog_p)*30, 2) as cog_p","ROUND(AVG(cog_c)*30, 2) as cog_c","ROUND(AVG(bfg_only_c)*30, 2) as bfg_only_c","ROUND(AVG(cog_only_c)*30, 2) as cog_only_c","ROUND(AVG(gxls)*30, 0) as gxls","ROUND(AVG(run_time)*30, 0) as run_time","ROUND(AVG(work_ratio), 2) as work_ratio") |
| | | .groupBy("sub_process_type"); |
| | | |
| | | List<CokingOverviewEntity> monthList = cokingOverviewDao.selectList(queryWrapperMonth); |
| | |
| | | GXJ_1("GXJ_1", "1#干熄焦"), |
| | | GXJ_2("GXJ_2", "2#干熄焦"), |
| | | GXJ_3("GXJ_3", "3#干熄焦"), |
| | | MW_15_1("MW_15_1", "1#15MW机组"), |
| | | MW_15_2("MW_15_2", "2#15MW机组"), |
| | | BMGX("BMGX", "备煤工序"), |
| | | JLLQ("JLLQ", "焦炉炉区"), |
| | | GXJ("GXJ", "干熄焦"), |
| | |
| | | package com.iailab.module.ansteel.job.task; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.iailab.module.model.api.mcs.McsApi; |
| | | import com.iailab.module.model.api.mcs.dto.ScheduleSuggestRespDTO; |
| | | import com.iailab.module.model.api.mdk.MdkApi; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 执行天粒度调度方案定时任务 |
| | |
| | | private String AnStellCOAL = "AnStellCOAL"; //焦化备煤管控 |
| | | private String AnSteelCDQTrackImplv3 = "AnSteelCDQTrackImplv3"; //焦化干熄焦产蒸汽模型 |
| | | private String AnSteelChemProSteamTrack = "AnSteelChemProSteamTrack"; //焦化化产蒸汽消耗模型 |
| | | private String lianjiaoguankong = "lianjiaoguankong"; //焦化炼焦管控模型 |
| | | |
| | | @Autowired |
| | | private MdkApi mdkApi; |
| | | @Autowired |
| | | private McsApi mcsApi; |
| | | |
| | | private final String finalResultStrKey = "finalResultStr"; |
| | | private final String resultListKey = "resultList"; |
| | | |
| | | |
| | | @Override |
| | |
| | | mcsApi.createScheduleSuggest(suggestDto); |
| | | } |
| | | } |
| | | //干熄焦产蒸汽 建议保存 |
| | | //焦化干熄焦产蒸汽模型 建议保存 |
| | | if (AnSteelCDQTrackImplv3.equals(code)) { |
| | | Object finalResultStr = mdkScheduleRespDTO.getResult().get("finalResultStr"); |
| | | Object finalResultStr = mdkScheduleRespDTO.getResult().get(finalResultStrKey); |
| | | if(finalResultStr != null && StringUtils.isNotBlank(finalResultStr.toString())) { |
| | | ScheduleSuggestRespDTO suggestDto = new ScheduleSuggestRespDTO(); |
| | | suggestDto.setTitle("干熄焦产蒸汽建议"); |
| | |
| | | mcsApi.createScheduleSuggest(suggestDto); |
| | | } |
| | | |
| | | Object resultList = mdkScheduleRespDTO.getResult().get("resultList"); |
| | | Object resultList = mdkScheduleRespDTO.getResult().get(resultListKey); |
| | | if(resultList != null && StringUtils.isNotBlank(resultList.toString())) { |
| | | ScheduleSuggestRespDTO suggestDto = new ScheduleSuggestRespDTO(); |
| | | suggestDto.setTitle("干熄焦产蒸汽异常溯源"); |
| | |
| | | mcsApi.createScheduleSuggest(suggestDto); |
| | | } |
| | | } |
| | | //化产蒸汽消耗 建议保存 |
| | | //焦化化产蒸汽消耗模型 建议保存 |
| | | if (AnSteelChemProSteamTrack.equals(code)) { |
| | | Object finalResultStr = mdkScheduleRespDTO.getResult().get("finalResultStr"); |
| | | Object finalResultStr = mdkScheduleRespDTO.getResult().get(finalResultStrKey); |
| | | if(finalResultStr != null && StringUtils.isNotBlank(finalResultStr.toString())) { |
| | | ScheduleSuggestRespDTO suggestDto = new ScheduleSuggestRespDTO(); |
| | | suggestDto.setTitle("化产蒸汽消耗建议"); |
| | |
| | | mcsApi.createScheduleSuggest(suggestDto); |
| | | } |
| | | |
| | | Object resultList = mdkScheduleRespDTO.getResult().get("resultList"); |
| | | Object resultList = mdkScheduleRespDTO.getResult().get(resultListKey); |
| | | if(resultList != null && StringUtils.isNotBlank(resultList.toString())) { |
| | | ScheduleSuggestRespDTO suggestDto = new ScheduleSuggestRespDTO(); |
| | | suggestDto.setTitle("化产蒸汽消耗异常溯源"); |
| | |
| | | mcsApi.createScheduleSuggest(suggestDto); |
| | | } |
| | | } |
| | | //焦化炼焦管控模型 建议保存 |
| | | if (lianjiaoguankong.equals(code)) { |
| | | Object finalResultStr = mdkScheduleRespDTO.getResult().get(finalResultStrKey); |
| | | if(finalResultStr != null && StringUtils.isNotBlank(finalResultStr.toString())) { |
| | | ScheduleSuggestRespDTO suggestDto = new ScheduleSuggestRespDTO(); |
| | | suggestDto.setTitle("炼焦管控建议"); |
| | | suggestDto.setContent(finalResultStr.toString()); |
| | | suggestDto.setScheduleObj("LJGK"); |
| | | suggestDto.setScheduleTime(dto.getScheduleTime()); |
| | | suggestDto.setCreateTime(new Date()); |
| | | mcsApi.createScheduleSuggest(suggestDto); |
| | | } |
| | | |
| | | Object resultList = mdkScheduleRespDTO.getResult().get(resultListKey); |
| | | if(resultList != null && StringUtils.isNotBlank(resultList.toString())) { |
| | | ScheduleSuggestRespDTO suggestDto = new ScheduleSuggestRespDTO(); |
| | | suggestDto.setTitle("炼焦管控异常溯源"); |
| | | suggestDto.setContent(resultList.toString()); |
| | | suggestDto.setScheduleObj("LJGK_YCSY"); |
| | | suggestDto.setScheduleTime(dto.getScheduleTime()); |
| | | suggestDto.setCreateTime(new Date()); |
| | | mcsApi.createScheduleSuggest(suggestDto); |
| | | } |
| | | } |
| | | } catch (Exception ex) { |
| | | logger.error("runDayScheduleModuleTask运行异常",ex); |
| | | } |