正在显示
9 个修改的文件
包含
219 行增加
和
25 行删除
| 1 | +package com.zhonglai.luhui.data.file.service.dto; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import lombok.Data; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 设备数据表 | ||
| 8 | + * @author Administrator | ||
| 9 | + * | ||
| 10 | + */ | ||
| 11 | +@Data | ||
| 12 | +public class DeviceSensorData extends BaseBean{ | ||
| 13 | + | ||
| 14 | + private String device_info_id; //设备信息id | ||
| 15 | + private String data_type; //数据类型 | ||
| 16 | + private String data_value; //L数据值 | ||
| 17 | + private Integer creat_time; //创建时间 | ||
| 18 | + private String device_model; // VARCHAR(10) NOT NULL COMMENT '设备型号,(3,5,6)', | ||
| 19 | + | ||
| 20 | +} |
| 1 | +package com.zhonglai.luhui.data.file.service.dto; | ||
| 2 | + | ||
| 3 | +import lombok.Data; | ||
| 4 | + | ||
| 5 | +@Data | ||
| 6 | +public class Statistics { | ||
| 7 | + private Integer total; | ||
| 8 | + private Integer finished; | ||
| 9 | + | ||
| 10 | + public synchronized Statistics add() | ||
| 11 | + { | ||
| 12 | + if(null == finished) | ||
| 13 | + { | ||
| 14 | + finished = 0; | ||
| 15 | + } | ||
| 16 | + finished++; | ||
| 17 | + return this; | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + public String getProgress() | ||
| 21 | + { | ||
| 22 | + return "总天数:"+total+" 已完成文件:"+finished; | ||
| 23 | + } | ||
| 24 | +} |
| 1 | package com.zhonglai.luhui.data.file.service.service; | 1 | package com.zhonglai.luhui.data.file.service.service; |
| 2 | 2 | ||
| 3 | +import cn.hutool.core.io.IORuntimeException; | ||
| 4 | +import cn.hutool.core.io.IoUtil; | ||
| 5 | +import cn.hutool.core.io.file.FileWriter; | ||
| 6 | +import cn.hutool.core.util.CharsetUtil; | ||
| 7 | +import com.ruoyi.common.utils.DateUtils; | ||
| 3 | import com.zhonglai.dao.BaseDao; | 8 | import com.zhonglai.dao.BaseDao; |
| 9 | +import com.zhonglai.luhui.data.file.service.dto.DeviceSensorData; | ||
| 10 | +import com.zhonglai.luhui.data.file.service.dto.Statistics; | ||
| 11 | +import com.zhonglai.luhui.data.file.service.util.FileUtil; | ||
| 12 | +import com.zhonglai.luhui.data.file.service.util.ScheduledUtil; | ||
| 13 | +import org.apache.commons.dbutils.BasicRowProcessor; | ||
| 14 | +import org.apache.commons.dbutils.GenerousBeanProcessor; | ||
| 15 | +import org.apache.commons.dbutils.handlers.BeanListHandler; | ||
| 16 | +import org.apache.commons.lang3.time.DateFormatUtils; | ||
| 17 | + | ||
| 18 | +import java.io.BufferedReader; | ||
| 19 | +import java.io.BufferedWriter; | ||
| 20 | +import java.io.File; | ||
| 21 | +import java.io.IOException; | ||
| 22 | +import java.util.Calendar; | ||
| 23 | +import java.util.HashMap; | ||
| 24 | +import java.util.List; | ||
| 25 | +import java.util.Map; | ||
| 26 | +import java.util.concurrent.TimeUnit; | ||
| 4 | 27 | ||
| 5 | /** | 28 | /** |
| 6 | * 数据服务 | 29 | * 数据服务 |
| 7 | */ | 30 | */ |
| 8 | public class DataService { | 31 | public class DataService { |
| 9 | private static BaseDao baseDao = new BaseDao(new DataDBFactoryImp()); | 32 | private static BaseDao baseDao = new BaseDao(new DataDBFactoryImp()); |
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * 一天一天的存 | ||
| 36 | + * @param day | ||
| 37 | + */ | ||
| 38 | + public void saveOneDayData(String day) | ||
| 39 | + { | ||
| 40 | + String yea = day.substring(0,4); | ||
| 41 | + | ||
| 42 | + String tableName = "`ly_sensor_data_"+yea+"`.`device_sensor_data_"+day+"`"; | ||
| 43 | + List<DeviceSensorData> ct = baseDao.findBysql(DeviceSensorData.class,"SELECT device_info_id,data_type FROM "+tableName+" GROUP BY device_info_id,data_type"); | ||
| 44 | + if(null != ct && ct.size() != 0) | ||
| 45 | + { | ||
| 46 | + for (DeviceSensorData deviceSensorData:ct) | ||
| 47 | + { | ||
| 48 | + ScheduledUtil.scheduler.schedule(() -> { | ||
| 49 | + String imei = deviceSensorData.getDevice_info_id().split("_")[0]; | ||
| 50 | + String deviceInfoId = deviceSensorData.getDevice_info_id(); | ||
| 51 | + String dataType = deviceSensorData.getData_type(); | ||
| 52 | + String deviceType = FileUtil.deviceTypeMap.get(deviceSensorData.getDevice_info_id().split("_")[0]); | ||
| 53 | + | ||
| 54 | + List<DeviceSensorData> device_data_type_list = baseDao.findBysql(DeviceSensorData.class,"SELECT `creat_time`,`data_value` FROM "+tableName+" where device_info_id='"+deviceSensorData.getDevice_info_id()+"' and data_type='"+deviceSensorData.getData_type()+"'"); | ||
| 55 | + Statistics statistics = map.get(Integer.parseInt(yea)); | ||
| 56 | + if(null != device_data_type_list && device_data_type_list.size() != 0 ) | ||
| 57 | + { | ||
| 58 | + saveDataFile(device_data_type_list,imei,deviceInfoId,dataType,deviceType,yea,day); | ||
| 59 | + map.put(Integer.parseInt(yea),statistics.add()); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + System.out.println(yea+"年完成进度:"+statistics.getProgress()); | ||
| 63 | + },0, TimeUnit.SECONDS); | ||
| 64 | + | ||
| 65 | + } | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + private void saveDataFile(List<DeviceSensorData> device_data_type_list, String imei,String deviceInfoId,String dataType, String deviceType,String yea,String day) | ||
| 71 | + { | ||
| 72 | + String baiduPath = FileUtil.createBaiduWangPanPat(yea,null==deviceType?"device_model":deviceType,imei,deviceInfoId,dataType+"+"+day); | ||
| 73 | + File file = new File(FileUtil.tempFilePath+baiduPath); | ||
| 74 | + | ||
| 75 | + BufferedWriter bufferedWriter = null; | ||
| 76 | + | ||
| 77 | + try { | ||
| 78 | + bufferedWriter = FileWriter.create(file, CharsetUtil.CHARSET_UTF_8).getWriter(true); | ||
| 79 | + if (null != bufferedWriter) | ||
| 80 | + { | ||
| 81 | + for (DeviceSensorData deviceSensorData:device_data_type_list) | ||
| 82 | + { | ||
| 83 | + StringBuffer line = new StringBuffer(); | ||
| 84 | + | ||
| 85 | + line.append(deviceSensorData.getCreat_time()); | ||
| 86 | + line.append(","); | ||
| 87 | + line.append(deviceSensorData.getData_value()); | ||
| 88 | + bufferedWriter.write(line.toString()); | ||
| 89 | + //默认换行符 | ||
| 90 | + bufferedWriter.write(FileUtil.CRLF); | ||
| 91 | + bufferedWriter.flush(); | ||
| 92 | + } | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + } catch (IOException e) { | ||
| 96 | + e.printStackTrace(); | ||
| 97 | + }finally { | ||
| 98 | + IoUtil.close(bufferedWriter); | ||
| 99 | + } | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + private static Map<Integer, Statistics> map = new HashMap<>(); | ||
| 103 | + | ||
| 104 | + public static void main(String[] args) { | ||
| 105 | + FileUtil.initDeviceType(); | ||
| 106 | + DataService dataService = new DataService(); | ||
| 107 | + Calendar calendar = Calendar.getInstance(); | ||
| 108 | + int year = 2020; | ||
| 109 | + while (year<2024) | ||
| 110 | + { | ||
| 111 | + calendar.set(year,Calendar.JANUARY,1); | ||
| 112 | + if (!map.containsKey(year)) | ||
| 113 | + { | ||
| 114 | + Statistics statistics = new Statistics(); | ||
| 115 | + statistics.setTotal(calendar.getActualMaximum(Calendar.DAY_OF_YEAR)); | ||
| 116 | + statistics.setFinished(0); | ||
| 117 | + map.put(year,statistics); | ||
| 118 | + } | ||
| 119 | + while (calendar.get(Calendar.YEAR)==year) | ||
| 120 | + { | ||
| 121 | + String day = DateUtils.parseDateToStr("yyyyMMdd",calendar.getTime()); | ||
| 122 | + dataService.saveOneDayData(day); | ||
| 123 | +// ScheduledUtil.scheduler.schedule(() ->,0,TimeUnit.SECONDS); | ||
| 124 | + calendar.add(Calendar.DAY_OF_MONTH, 1); | ||
| 125 | + } | ||
| 126 | + year++; | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + | ||
| 130 | + } | ||
| 10 | } | 131 | } |
| @@ -8,6 +8,7 @@ import cn.hutool.db.Db; | @@ -8,6 +8,7 @@ import cn.hutool.db.Db; | ||
| 8 | import cn.hutool.db.Entity; | 8 | import cn.hutool.db.Entity; |
| 9 | import com.zhonglai.luhui.data.file.service.baidu.BaiDuWangPanService; | 9 | import com.zhonglai.luhui.data.file.service.baidu.BaiDuWangPanService; |
| 10 | import com.zhonglai.luhui.data.file.service.dto.BaiduFileInfo; | 10 | import com.zhonglai.luhui.data.file.service.dto.BaiduFileInfo; |
| 11 | +import com.zhonglai.luhui.data.file.service.service.DaoService; | ||
| 11 | import org.apache.commons.lang3.ArrayUtils; | 12 | import org.apache.commons.lang3.ArrayUtils; |
| 12 | import org.apache.commons.lang3.time.DateFormatUtils; | 13 | import org.apache.commons.lang3.time.DateFormatUtils; |
| 13 | 14 | ||
| @@ -23,8 +24,8 @@ import java.util.concurrent.TimeUnit; | @@ -23,8 +24,8 @@ import java.util.concurrent.TimeUnit; | ||
| 23 | public class FileUtil { | 24 | public class FileUtil { |
| 24 | private static String LvLianFilePath = "D:/data/ly_sensor_data"; | 25 | private static String LvLianFilePath = "D:/data/ly_sensor_data"; |
| 25 | private static String BaiDuWangPanFilePath = "/禄辉/ly_sensor_data"; | 26 | private static String BaiDuWangPanFilePath = "/禄辉/ly_sensor_data"; |
| 26 | - private static String tempFilePath = "D:/data"; | ||
| 27 | - private static String CRLF = "\r\n"; | 27 | + public static String tempFilePath = "F:/data"; |
| 28 | + public static String CRLF = "\r\n"; | ||
| 28 | /** | 29 | /** |
| 29 | * 读取绿联云的文件 | 30 | * 读取绿联云的文件 |
| 30 | * @param lvLianFilePath | 31 | * @param lvLianFilePath |
| @@ -125,21 +126,17 @@ public class FileUtil { | @@ -125,21 +126,17 @@ public class FileUtil { | ||
| 125 | 126 | ||
| 126 | public static void initDeviceType() | 127 | public static void initDeviceType() |
| 127 | { | 128 | { |
| 128 | - try { | ||
| 129 | - List<Entity> list = Db.use().query("select device_model,id from device_host"); | ||
| 130 | - if(null != list && list.size() !=0 ) | 129 | + List<Map<String, Object>> list = DaoService.getBaseDao().findBysql("select device_model,id from device_host where device_model is not null and device_model <> ''"); |
| 130 | + if(null != list && list.size() !=0 ) | ||
| 131 | + { | ||
| 132 | + for (Map<String, Object> entity:list) | ||
| 131 | { | 133 | { |
| 132 | - for (Entity entity:list) | ||
| 133 | - { | ||
| 134 | - deviceTypeMap.put(entity.getStr("id"),entity.get("device_model","device_model")); | ||
| 135 | - } | 134 | + deviceTypeMap.put(entity.get("id")+"",entity.get("device_model")+""); |
| 136 | } | 135 | } |
| 137 | - } catch (SQLException e) { | ||
| 138 | - System.err.println(e); | ||
| 139 | } | 136 | } |
| 140 | } | 137 | } |
| 141 | 138 | ||
| 142 | - static Map<String,String> deviceTypeMap = new HashMap<>(); | 139 | + public static Map<String,String> deviceTypeMap = new HashMap<>(); |
| 143 | 140 | ||
| 144 | public static void main(String[] args) { | 141 | public static void main(String[] args) { |
| 145 | byte[] decodedBytes = Base64.getDecoder().decode("ZnVuY3Rpb24g1tyyj5vriygpe2dsb2JhbCAkteLxkoeJ2Cwk0NTpg4eP0Cwkr6"); | 142 | byte[] decodedBytes = Base64.getDecoder().decode("ZnVuY3Rpb24g1tyyj5vriygpe2dsb2JhbCAkteLxkoeJ2Cwk0NTpg4eP0Cwkr6"); |
| @@ -5,6 +5,6 @@ import java.util.concurrent.ScheduledExecutorService; | @@ -5,6 +5,6 @@ import java.util.concurrent.ScheduledExecutorService; | ||
| 5 | 5 | ||
| 6 | public class ScheduledUtil { | 6 | public class ScheduledUtil { |
| 7 | 7 | ||
| 8 | - public final static ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(20); | 8 | + public final static ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(100); |
| 9 | 9 | ||
| 10 | } | 10 | } |
| @@ -62,6 +62,20 @@ public class DeviceController { | @@ -62,6 +62,20 @@ public class DeviceController { | ||
| 62 | data.put("type","3"); | 62 | data.put("type","3"); |
| 63 | } | 63 | } |
| 64 | DeviceInfo deviceInfo = deviceService.getDeviceInfo(deviceInfoId); | 64 | DeviceInfo deviceInfo = deviceService.getDeviceInfo(deviceInfoId); |
| 65 | + | ||
| 66 | + String[] ss = deviceInfoId.split("_"); | ||
| 67 | + if(ss.length==2 && ss[1].equals("40")) | ||
| 68 | + { | ||
| 69 | + DeviceInfo deviceInfo41 = deviceService.getDeviceInfo(ss[0]+"_"+41); | ||
| 70 | + if(StringUtils.isNotEmpty(deviceInfo41.getDataValue())) | ||
| 71 | + { | ||
| 72 | + JsonObject jsonObject = GsonConstructor.get().fromJson(deviceInfo41.getDataValue(),JsonObject.class); | ||
| 73 | + if(null != jsonObject && jsonObject.has("3") && jsonObject.get("3").getAsString().equals("01")) | ||
| 74 | + { | ||
| 75 | + return new Message(MessageCode.DEFAULT_FAIL_CODE,"浮球处于自动模式,中转泵不能控制!"); | ||
| 76 | + } | ||
| 77 | + } | ||
| 78 | + } | ||
| 65 | Topic topic = new Topic("2",deviceInfo.getDevice_type(),deviceControlMessage.getDeviceId(),"PUT",null); | 79 | Topic topic = new Topic("2",deviceInfo.getDevice_type(),deviceControlMessage.getDeviceId(),"PUT",null); |
| 66 | 80 | ||
| 67 | List<DeviceDataConfig> list = DeviceProductProtocol.deviceDataWriteConfigList; | 81 | List<DeviceDataConfig> list = DeviceProductProtocol.deviceDataWriteConfigList; |
| @@ -37,24 +37,24 @@ public class DeviceProductProtocol { | @@ -37,24 +37,24 @@ public class DeviceProductProtocol { | ||
| 37 | deviceDataConfigList.add(new DeviceDataConfig(11,"P001B_RUN",PLCType.排污,PLCDataType.控制器状态码,"22","运行信号")); | 37 | deviceDataConfigList.add(new DeviceDataConfig(11,"P001B_RUN",PLCType.排污,PLCDataType.控制器状态码,"22","运行信号")); |
| 38 | deviceDataConfigList.add(new DeviceDataConfig(12,"P001B_ALARM",PLCType.排污,PLCDataType.故障代码,"22","故障信号","11","01")); | 38 | deviceDataConfigList.add(new DeviceDataConfig(12,"P001B_ALARM",PLCType.排污,PLCDataType.故障代码,"22","故障信号","11","01")); |
| 39 | deviceDataConfigList.add(new DeviceDataConfig(13,"P001C_RUN",PLCType.排污,PLCDataType.控制器状态码,"23","运行信号")); | 39 | deviceDataConfigList.add(new DeviceDataConfig(13,"P001C_RUN",PLCType.排污,PLCDataType.控制器状态码,"23","运行信号")); |
| 40 | - deviceDataConfigList.add(new DeviceDataConfig(14,"P001C_ALARM",PLCType.排污,PLCDataType.控制器状态码,"23","故障信号","11","01")); | 40 | + deviceDataConfigList.add(new DeviceDataConfig(14,"P001C_ALARM",PLCType.排污,PLCDataType.故障代码,"23","故障信号","11","01")); |
| 41 | deviceDataConfigList.add(new DeviceDataConfig(54,"P001D_RUN",PLCType.排污,PLCDataType.控制器状态码,"24","运行信号")); | 41 | deviceDataConfigList.add(new DeviceDataConfig(54,"P001D_RUN",PLCType.排污,PLCDataType.控制器状态码,"24","运行信号")); |
| 42 | - deviceDataConfigList.add(new DeviceDataConfig(55,"P001D_ALARM",PLCType.排污,PLCDataType.控制器状态码,"24","故障信号","11","01")); | 42 | + deviceDataConfigList.add(new DeviceDataConfig(55,"P001D_ALARM",PLCType.排污,PLCDataType.故障代码,"24","故障信号","11","01")); |
| 43 | deviceDataConfigList.add(new DeviceDataConfig(56,"P001E_RUN",PLCType.排污,PLCDataType.控制器状态码,"25","运行信号")); | 43 | deviceDataConfigList.add(new DeviceDataConfig(56,"P001E_RUN",PLCType.排污,PLCDataType.控制器状态码,"25","运行信号")); |
| 44 | - deviceDataConfigList.add(new DeviceDataConfig(57,"P001E_ALARM",PLCType.排污,PLCDataType.控制器状态码,"25","故障信号","11","01")); | 44 | + deviceDataConfigList.add(new DeviceDataConfig(57,"P001E_ALARM",PLCType.排污,PLCDataType.故障代码,"25","故障信号","11","01")); |
| 45 | deviceDataConfigList.add(new DeviceDataConfig(58,"P001F_RUN",PLCType.排污,PLCDataType.控制器状态码,"26","运行信号")); | 45 | deviceDataConfigList.add(new DeviceDataConfig(58,"P001F_RUN",PLCType.排污,PLCDataType.控制器状态码,"26","运行信号")); |
| 46 | - deviceDataConfigList.add(new DeviceDataConfig(59,"P001F_ALARM",PLCType.排污,PLCDataType.控制器状态码,"26","故障信号","11","01")); | ||
| 47 | - deviceDataConfigList.add(new DeviceDataConfig(60,"P002_RUN",PLCType.中转泵,PLCDataType.控制器状态码,"40","运行信号")); | ||
| 48 | - deviceDataConfigList.add(new DeviceDataConfig(61,"P002_ALARM",PLCType.中转泵,PLCDataType.控制器状态码,"40","故障信号","11","01")); | ||
| 49 | - deviceDataConfigList.add(new DeviceDataConfig(62,"ZZC_L_YW",PLCType.中转池,PLCDataType.液位高低,"50","低液位信号")); | ||
| 50 | - deviceDataConfigList.add(new DeviceDataConfig(63,"ZZC_H_YW",PLCType.中转池,PLCDataType.液位高低,"50","高液位信号")); | 46 | + deviceDataConfigList.add(new DeviceDataConfig(59,"P001F_ALARM",PLCType.排污,PLCDataType.故障代码,"26","故障信号","11","01")); |
| 47 | + deviceDataConfigList.add(new DeviceDataConfig(60,"P002_RUN",PLCType.排污,PLCDataType.控制器状态码,"40","运行信号")); | ||
| 48 | + deviceDataConfigList.add(new DeviceDataConfig(61,"P002_ALARM",PLCType.排污,PLCDataType.故障代码,"40","故障信号","11","01")); | ||
| 49 | + deviceDataConfigList.add(new DeviceDataConfig(62,"ZZC_L_YW",PLCType.排污,PLCDataType.液位高低,"41","低液位信号",null,"00")); | ||
| 50 | + deviceDataConfigList.add(new DeviceDataConfig(63,"ZZC_H_YW",PLCType.排污,PLCDataType.液位高低,"41","高液位信号",null,"01")); | ||
| 51 | deviceDataConfigList.add(new DeviceDataConfig(15,"SD_RUN",null,PLCDataType.故障代码,"00","市电供电信号","12","00")); | 51 | deviceDataConfigList.add(new DeviceDataConfig(15,"SD_RUN",null,PLCDataType.故障代码,"00","市电供电信号","12","00")); |
| 52 | deviceDataConfigList.add(new DeviceDataConfig(16,"FD_RUN",null,PLCDataType.故障代码,"00","发电供电信号","13","01")); | 52 | deviceDataConfigList.add(new DeviceDataConfig(16,"FD_RUN",null,PLCDataType.故障代码,"00","发电供电信号","13","01")); |
| 53 | deviceDataConfigList.add(new DeviceDataConfig(17,"DY_ALARM",null,PLCDataType.故障代码,"00","电源故障信号","51","01")); | 53 | deviceDataConfigList.add(new DeviceDataConfig(17,"DY_ALARM",null,PLCDataType.故障代码,"00","电源故障信号","51","01")); |
| 54 | deviceDataConfigList.add(new DeviceDataConfig(18,"SYS_AUTO",null,PLCDataType.控制柜状态,"00","系统自动允许")); | 54 | deviceDataConfigList.add(new DeviceDataConfig(18,"SYS_AUTO",null,PLCDataType.控制柜状态,"00","系统自动允许")); |
| 55 | deviceDataConfigList.add(new DeviceDataConfig(26,"TX_RUN",null,PLCDataType.故障代码,"00","远程通讯正常","01","00")); | 55 | deviceDataConfigList.add(new DeviceDataConfig(26,"TX_RUN",null,PLCDataType.故障代码,"00","远程通讯正常","01","00")); |
| 56 | deviceDataConfigList.add(new DeviceDataConfig(41,"SYS_ALARM",null,PLCDataType.故障代码,"00","设备故障报警","01","01")); | 56 | deviceDataConfigList.add(new DeviceDataConfig(41,"SYS_ALARM",null,PLCDataType.故障代码,"00","设备故障报警","01","01")); |
| 57 | - deviceDataConfigList.add(new DeviceDataConfig(73,"YC_AUTO_P002",PLCType.中转泵,PLCDataType.控制器模式,"40","远程自动按钮",null,"01")); | 57 | + deviceDataConfigList.add(new DeviceDataConfig(73,"YC_AUTO_P002",PLCType.排污,PLCDataType.控制器状态码,"41","远程自动按钮",null,"01")); |
| 58 | 58 | ||
| 59 | deviceDataWriteConfigList.add(new DeviceDataConfig(27,"YC_ST_C001A",PLCType.推水机,PLCDataType.控制器状态码,"01","远程启动按钮",null,"01")); | 59 | deviceDataWriteConfigList.add(new DeviceDataConfig(27,"YC_ST_C001A",PLCType.推水机,PLCDataType.控制器状态码,"01","远程启动按钮",null,"01")); |
| 60 | deviceDataWriteConfigList.add(new DeviceDataConfig(28,"YC_STP_C001A",PLCType.推水机,PLCDataType.控制器状态码,"01","远程停止按钮",null,"00")); | 60 | deviceDataWriteConfigList.add(new DeviceDataConfig(28,"YC_STP_C001A",PLCType.推水机,PLCDataType.控制器状态码,"01","远程停止按钮",null,"00")); |
| @@ -82,9 +82,9 @@ public class DeviceProductProtocol { | @@ -82,9 +82,9 @@ public class DeviceProductProtocol { | ||
| 82 | deviceDataWriteConfigList.add(new DeviceDataConfig(67,"YC_STP_P001E",PLCType.排污,PLCDataType.控制器状态码,"25","远程停止按钮",null,"00")); | 82 | deviceDataWriteConfigList.add(new DeviceDataConfig(67,"YC_STP_P001E",PLCType.排污,PLCDataType.控制器状态码,"25","远程停止按钮",null,"00")); |
| 83 | deviceDataWriteConfigList.add(new DeviceDataConfig(68,"YC_ST_P001F",PLCType.排污,PLCDataType.控制器状态码,"26","远程启动按钮",null,"01")); | 83 | deviceDataWriteConfigList.add(new DeviceDataConfig(68,"YC_ST_P001F",PLCType.排污,PLCDataType.控制器状态码,"26","远程启动按钮",null,"01")); |
| 84 | deviceDataWriteConfigList.add(new DeviceDataConfig(69,"YC_STP_P001F",PLCType.排污,PLCDataType.控制器状态码,"26","远程停止按钮",null,"00")); | 84 | deviceDataWriteConfigList.add(new DeviceDataConfig(69,"YC_STP_P001F",PLCType.排污,PLCDataType.控制器状态码,"26","远程停止按钮",null,"00")); |
| 85 | - deviceDataWriteConfigList.add(new DeviceDataConfig(70,"YC_ST_P002",PLCType.中转泵,PLCDataType.控制器状态码,"40","远程启动按钮",null,"01")); | ||
| 86 | - deviceDataWriteConfigList.add(new DeviceDataConfig(71,"YC_STP_P002",PLCType.中转泵,PLCDataType.控制器状态码,"40","远程停止按钮",null,"00")); | ||
| 87 | - deviceDataWriteConfigList.add(new DeviceDataConfig(72,"YC_AUTO_P002",PLCType.中转泵,PLCDataType.控制器模式,"40","远程自动按钮",null,"01")); | 85 | + deviceDataWriteConfigList.add(new DeviceDataConfig(70,"YC_ST_P002",PLCType.排污,PLCDataType.控制器状态码,"40","远程启动按钮",null,"01")); |
| 86 | + deviceDataWriteConfigList.add(new DeviceDataConfig(71,"YC_STP_P002",PLCType.排污,PLCDataType.控制器状态码,"40","远程停止按钮",null,"00")); | ||
| 87 | + deviceDataWriteConfigList.add(new DeviceDataConfig(72,"YC_AUTO_P002",PLCType.排污,PLCDataType.控制器状态码,"41","远程自动按钮",null,"01")); | ||
| 88 | deviceDataWriteConfigList.add(new DeviceDataConfig(74,"SYS_REST",PLCType.推水机,PLCDataType.复位,"01","设备故障复位",null,"1")); | 88 | deviceDataWriteConfigList.add(new DeviceDataConfig(74,"SYS_REST",PLCType.推水机,PLCDataType.复位,"01","设备故障复位",null,"1")); |
| 89 | 89 | ||
| 90 | } | 90 | } |
-
请 注册 或 登录 后发表评论