feat(data): 增加除尘器压差计算与标签描述
- 在MesDataScheduled中增加1#、2#、3#除尘器进出风口压差计算逻辑 - 为除尘器相关参数添加新的枚举标签描述 - 修改未找到变量key描述信息的默认返回值-优化数据处理流程中的异常日志记录 - 在AppPosiDeviceController中增加数据对比处理的TODO注释dev
							parent
							
								
									a5d84287cf
								
							
						
					
					
						commit
						a3bdecbc9e
					
				|  | @ -22,6 +22,7 @@ public class AppPosiDeviceController { | |||
|     @Resource | ||||
|     private TbIronPlcMapper tbIronPlcMapper; | ||||
| 
 | ||||
| 
 | ||||
|     @Resource | ||||
|     private MesDeviceMonitoringMapper mesDeviceMonitoringMapper; | ||||
| 
 | ||||
|  | @ -160,6 +161,7 @@ public class AppPosiDeviceController { | |||
|         List<PageData> targetAllList = tbIronPlcMapper.listTargetByEquId(equPd); | ||||
|         // 定义一个存储集合用于存储要入库的数据
 | ||||
|         List<Map<String, Object>> dataList = new ArrayList<>(); | ||||
|         // TODO: 这里要读表作对比然后存入数据库
 | ||||
|         if (location.equals("1#高炉中控室")) { | ||||
|             // 如果是1#高炉中控室,td1的值为1#高炉中控室(上)的CO浓度,t2td1的值为1#高炉中控室(下)的CO浓度。
 | ||||
|             if (parma.containsKey("td1")) { | ||||
|  |  | |||
|  | @ -89,10 +89,49 @@ public class MesDataScheduled extends IJobHandler { | |||
|             HashMap<String, Object> mesPreMap = new HashMap<>(); | ||||
|             Set<String> keySet = map.keySet(); | ||||
|             for (String key : keySet) { | ||||
|                 if (TagDescription.getDescriptionByTag(key) != "未找到对应的高炉变量key描述信息") { | ||||
|                 if (TagDescription.getDescriptionByTag(key) != "未找到对应的变量key描述信息") { | ||||
|                     mesPreMap.put(TagDescription.getDescriptionByTag(key), map.get(key)); | ||||
|                 } | ||||
|             } | ||||
|             if(mesPreMap.get("1#除尘器进风口压力")!=null && mesPreMap.get("1#除尘器出风口压力")!=null){ | ||||
|                 Object inPressureObj = mesPreMap.get("1#除尘器进风口压力"); | ||||
|                 Object outPressureObj = mesPreMap.get("1#除尘器出风口压力"); | ||||
| 
 | ||||
|                 try { | ||||
|                     double inPressure = Double.parseDouble(inPressureObj.toString()); | ||||
|                     double outPressure = Double.parseDouble(outPressureObj.toString()); | ||||
|                     double pressureDiff = inPressure - outPressure; | ||||
|                     mesPreMap.put("1#除尘器进出风口压差", pressureDiff); | ||||
|                 } catch (NumberFormatException e) { | ||||
|                     XxlJobHelper.log("压力值转换失败: 进风口压力={}, 出风口压力={}", inPressureObj, outPressureObj); | ||||
|                 } | ||||
|             } | ||||
|             if(mesPreMap.get("2#除尘器进风口压力")!=null && mesPreMap.get("2#除尘器出风口压力")!=null){ | ||||
|                 Object inPressureObj = mesPreMap.get("2#除尘器进风口压力"); | ||||
|                 Object outPressureObj = mesPreMap.get("2#除尘器出风口压力"); | ||||
| 
 | ||||
|                 try { | ||||
|                     double inPressure = Double.parseDouble(inPressureObj.toString()); | ||||
|                     double outPressure = Double.parseDouble(outPressureObj.toString()); | ||||
|                     double pressureDiff = inPressure - outPressure; | ||||
|                     mesPreMap.put("2#除尘器进出风口压差", pressureDiff); | ||||
|                 } catch (NumberFormatException e) { | ||||
|                     XxlJobHelper.log("压力值转换失败: 进风口压力={}, 出风口压力={}", inPressureObj, outPressureObj); | ||||
|                 } | ||||
|             } | ||||
|             if(mesPreMap.get("3#除尘器进风口压力")!=null && mesPreMap.get("3#除尘器出风口压力")!=null){ | ||||
|                 Object inPressureObj = mesPreMap.get("3#除尘器进风口压力"); | ||||
|                 Object outPressureObj = mesPreMap.get("3#除尘器出风口压力"); | ||||
| 
 | ||||
|                 try { | ||||
|                     double inPressure = Double.parseDouble(inPressureObj.toString()); | ||||
|                     double outPressure = Double.parseDouble(outPressureObj.toString()); | ||||
|                     double pressureDiff = inPressure - outPressure; | ||||
|                     mesPreMap.put("3#除尘器进出风口压差", pressureDiff); | ||||
|                 } catch (NumberFormatException e) { | ||||
|                     XxlJobHelper.log("压力值转换失败: 进风口压力={}, 出风口压力={}", inPressureObj, outPressureObj); | ||||
|                 } | ||||
|             } | ||||
|             mesDataList.add(mesPreMap); | ||||
|         } | ||||
| 
 | ||||
|  |  | |||
|  | @ -19,7 +19,29 @@ public enum TagDescription { | |||
|     TAG333("4#煤气上升管西北压力"), | ||||
|     TAG334("4#煤气上升管西南压力"), | ||||
|     TAG323("4#高炉南放散开关"), | ||||
|     TAG324("4#高炉北放散开关"); | ||||
|     TAG324("4#高炉北放散开关"), | ||||
|     // 除尘器参数枚举
 | ||||
|     TAG335("1#除尘器进风口压力"), | ||||
|     TAG336("1#除尘器出风口压力"), | ||||
|     TAG337("2#除尘器进风口压力"), | ||||
|     TAG338("2#除尘器出风口压力"), | ||||
|     TAG347("3#除尘器进风口压力"), | ||||
|     TAG348("3#除尘器出风口压力"), | ||||
|     TAG339("1#除尘器灰斗温度1#东南温度"), | ||||
|     TAG340("1#除尘器灰斗温度1#东北温度"), | ||||
|     TAG341("1#除尘器灰斗温度1#西南温度"), | ||||
|     TAG342("1#除尘器灰斗温度1#西北温度"), | ||||
|     TAG343("2#除尘器灰斗温度2#东南温度"), | ||||
|     TAG344("2#除尘器灰斗温度2#东北温度"), | ||||
|     TAG345("2#除尘器灰斗温度2#西南温度"), | ||||
|     TAG346("2#除尘器灰斗温度2#西北温度"), | ||||
|     TAG349("3#除尘器灰斗温度4#TE210A温度"), | ||||
|     TAG350("3#除尘器灰斗温度4#TE210B温度"), | ||||
|     TAG351("3#除尘器灰斗温度4#TE210C温度"), | ||||
|     TAG352("3#除尘器灰斗温度4#TE205A温度"), | ||||
|     TAG353("3#除尘器灰斗温度4#TE205B温度"), | ||||
|     TAG354("3#除尘器灰斗温度4#TE205C温度"); | ||||
| 
 | ||||
| 
 | ||||
|     // 存储描述信息的成员变量
 | ||||
|     private final String description; | ||||
|  | @ -41,7 +63,7 @@ public enum TagDescription { | |||
|             return TagDescription.valueOf(tag).getDescription(); | ||||
|         } catch (IllegalArgumentException e) { | ||||
|             // 如果没有找到对应的TAG,返回默认信息或抛出异常
 | ||||
|             return "未找到对应的高炉变量key描述信息"; | ||||
|             return "未找到对应的变量key描述信息"; | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue