Explorar el Código

注释添加。

Jay Lee hace 6 años
padre
commit
8d65656d22

+ 30 - 1
collect/src/main/java/com/saga/main/Main.java

@@ -20,7 +20,6 @@ import com.saga.util.Constant;
 import com.zillion.database.agent.ZillionAgent;
 
 public class Main {
-
 	public static void main(String[] args) {
 		// TODO Auto-generated method stub
 		// 初始化
@@ -29,6 +28,9 @@ public class Main {
 		threadStart();
 	}
 
+	/**
+	 * 启动各业务线程
+	 */
 	private static void threadStart() {
 		// TODO Auto-generated method stub
 		// 点位状态监控
@@ -95,6 +97,9 @@ public class Main {
 		}
 	}
 
+	/**
+	 * 初始化
+	 */
 	private static void init(String[] args) {
 		// TODO Auto-generated method stub
 		try {
@@ -141,6 +146,9 @@ public class Main {
 	// }
 	// }
 
+	/**
+	 * DB 连接
+	 */
 	private static void dbConnect() {
 		// TODO Auto-generated method stub
 		if (Constant.DbConnection.containsKey("Db-Mysql")) {
@@ -150,6 +158,9 @@ public class Main {
 		}
 	}
 
+	/**
+	 * MySQL 连接
+	 */
 	private static void mysqlConnect() {
 		// TODO Auto-generated method stub
 		try {
@@ -165,6 +176,9 @@ public class Main {
 		}
 	}
 
+	/**
+	 * 加载DB配置
+	 */
 	private static void loadDB() {
 		// TODO Auto-generated method stub
 		// // V1.0点位日志结构
@@ -199,6 +213,9 @@ public class Main {
 	// }
 	// }
 
+	/**
+	 * 加载点位列表
+	 */
 	private static void loadPointList2() {
 		// TODO Auto-generated method stub
 		// 重新启动加载点位列表
@@ -247,6 +264,9 @@ public class Main {
 	// }
 	// }
 
+	/**
+	 * 加载点位状态
+	 */
 	private static void loadStatus2() {
 		// TODO Auto-generated method stub
 		// 重新启动加载节点、点位状态
@@ -262,6 +282,9 @@ public class Main {
 		}
 	}
 
+	/**
+	 * 初始化数据库环境
+	 */
 	private static void initDB() {
 		// TODO Auto-generated method stub
 		try {
@@ -360,6 +383,9 @@ public class Main {
 	// }
 	// }
 
+	/**
+	 * 初始化建表
+	 */
 	private static void createTB2(String db) {
 		// TODO Auto-generated method stub
 		try {
@@ -594,6 +620,9 @@ public class Main {
 	// }
 	// }
 
+	/**
+	 * HBase 连接
+	 */
 	private static void hbaseConnect() {
 		// TODO Auto-generated method stub
 		// try {

+ 33 - 1
collect/src/main/java/com/saga/thread/common/CheckThread.java

@@ -13,6 +13,11 @@ import org.zillion.util.log.LogUtil;
 import com.saga.entity.Server;
 import com.saga.util.Constant;
 
+/**
+ * 点位状态监控
+ *
+ * @author 李井强
+ */
 public class CheckThread extends Thread {
 	// ZillionAgent agent;
 	long realCheck = 0;
@@ -57,6 +62,9 @@ public class CheckThread extends Thread {
 		}
 	}
 
+	/**
+	 * 加载DB中点位状态
+	 */
 	private void loadDBStatus() {
 		// TODO Auto-generated method stub
 		try {
@@ -76,6 +84,9 @@ public class CheckThread extends Thread {
 
 	}
 
+	/**
+	 * 生成点位状态
+	 */
 	private void excuteDBStatus() {
 		// TODO Auto-generated method stub
 		// for (Entry<String, Long> pns : Constant.ps_NodeStatus.entrySet()) {
@@ -137,6 +148,9 @@ public class CheckThread extends Thread {
 		}
 	}
 
+	/**
+	 * 检查点位状态
+	 */
 	private void realCheck2() {
 		// TODO Auto-generated method stub
 
@@ -159,6 +173,9 @@ public class CheckThread extends Thread {
 		}
 	}
 
+	/**
+	 * 检查点位状态-project
+	 */
 	private void virtual_project_status_up_Check() {
 		// TODO Auto-generated method stub
 		synchronized (Constant.ps_ProjectList) {
@@ -192,6 +209,9 @@ public class CheckThread extends Thread {
 		}
 	}
 
+	/**
+	 * 检查点位状态-meter
+	 */
 	private void virtual_meter_status_up_Check() {
 		// TODO Auto-generated method stub
 		synchronized (Constant.ps_MeterList) {
@@ -227,7 +247,10 @@ public class CheckThread extends Thread {
 			}
 		}
 	}
-
+	
+	/**
+	 * 检查点位状态-物理结构
+	 */
 	private void physical_status_address_Check() {
 		// TODO Auto-generated method stub
 		synchronized (Constant.ps_PhysicalList) {
@@ -281,6 +304,9 @@ public class CheckThread extends Thread {
 		}
 	}
 
+	/**
+	 * 根据下级统计状态
+	 */
 	private String gatherStatus(List<String> l) {
 		// TODO Auto-generated method stub
 		for (String s : l) {
@@ -291,6 +317,9 @@ public class CheckThread extends Thread {
 		return "disconn";
 	}
 
+	/**
+	 * 检查点位状态-point
+	 */
 	private void virtual_point_status_down_Check() {
 		// TODO Auto-generated method stub
 		// down
@@ -407,6 +436,9 @@ public class CheckThread extends Thread {
 		}
 	}
 
+	/**
+	 * 检查点位状态-point
+	 */
 	private void virtual_point_status_up_Check() {
 		// TODO Auto-generated method stub
 		// PointStatus

+ 40 - 7
collect/src/main/java/com/saga/thread/common/LoadConfigThread.java

@@ -5,18 +5,19 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
-
 import org.zillion.util.log.LogUtil;
-
 import com.saga.entity.EntityHbase;
 import com.saga.entity.EntityMysql;
 import com.saga.entity.Server;
 import com.saga.util.Constant;
 import com.saga.util.ExcelUtil;
 
+/**
+ * 加载配置信息
+ *
+ * @author 李井强
+ */
 public class LoadConfigThread extends Thread {
-
 	public LoadConfigThread() {
 		try {
 		} catch (Exception e) {
@@ -46,6 +47,9 @@ public class LoadConfigThread extends Thread {
 		}
 	}
 
+	/**
+	 * 加载DB点位列表
+	 */
 	private void loadPointList2() {
 		// TODO Auto-generated method stub
 		LogUtil.info("Clear Project Point List" + " Begin...");
@@ -107,6 +111,9 @@ public class LoadConfigThread extends Thread {
 	// }
 	// }
 
+	/**
+	 * 加载config配置文件
+	 */
 	public static void loadExcelConfig() {
 		// TODO Auto-generated method stub
 		String resource = "/config.xls";
@@ -133,6 +140,9 @@ public class LoadConfigThread extends Thread {
 		}
 	}
 
+	/**
+	 * 加载黑名单
+	 */
 	private static void excuteRulesBlackList(File file) {
 		// TODO Auto-generated method stub
 
@@ -174,6 +184,9 @@ public class LoadConfigThread extends Thread {
 		}
 	}
 
+	/**
+	 * 加载白名单
+	 */
 	private static void excuteRulesWhiteList(File file) {
 		// TODO Auto-generated method stub
 
@@ -215,6 +228,9 @@ public class LoadConfigThread extends Thread {
 		}
 	}
 
+	/**
+	 * 加载表号转换规则
+	 */
 	private static void excuteRulesFuncConvert(File file) {
 		// TODO Auto-generated method stub
 
@@ -248,17 +264,19 @@ public class LoadConfigThread extends Thread {
 					}
 
 					pty = Constant.toLower(pty);
-					String buildingOld = rowData.get(pty.get("building"));
 					String funcidOld = rowData.get(pty.get("oldfuncid"));
 					String funcidNew = rowData.get(pty.get("newfuncid"));
 
-					Constant.FunctionConv.put(buildingOld + "-" + funcidOld, funcidNew);
-					Constant.FunctionConvReverse.put(buildingOld + "-" + funcidNew, funcidOld);
+					Constant.FunctionConv.put(funcidOld, funcidNew);
+					Constant.FunctionConvReverse.put(funcidNew, funcidOld);
 				}
 			}
 		}
 	}
 
+	/**
+	 * 加载建筑转换规则
+	 */
 	private static void excuteRulesBuildingConvert(File file) {
 		// TODO Auto-generated method stub
 
@@ -306,6 +324,9 @@ public class LoadConfigThread extends Thread {
 		}
 	}
 
+	/**
+	 * 加载全局配置
+	 */
 	private static void excuteRulesGlobal(File file) {
 		// TODO Auto-generated method stub
 		int begin = 65535;
@@ -349,6 +370,9 @@ public class LoadConfigThread extends Thread {
 		}
 	}
 
+	/**
+	 * 加载网络配置(对下)
+	 */
 	private static void excuteNetworkDown(File file) {
 		// TODO Auto-generated method stub
 		int begin = 65535;
@@ -391,6 +415,9 @@ public class LoadConfigThread extends Thread {
 		}
 	}
 
+	/**
+	 * 加载网络配置(对上)
+	 */
 	private static void excuteNetworkUp(File file) {
 		// TODO Auto-generated method stub
 
@@ -433,6 +460,9 @@ public class LoadConfigThread extends Thread {
 		}
 	}
 
+	/**
+	 * 加载HBase配置
+	 */
 	private static void excuteDbHbase(File file) {
 		// TODO Auto-generated method stub
 
@@ -474,6 +504,9 @@ public class LoadConfigThread extends Thread {
 		}
 	}
 
+	/**
+	 * 加载mysql配置
+	 */
 	private static void excuteDbMysql(File file) {
 		// TODO Auto-generated method stub
 

+ 17 - 0
collect/src/main/java/com/saga/thread/common/SaveThread.java

@@ -10,6 +10,11 @@ import org.zillion.util.log.LogUtil;
 import com.saga.entity.Record;
 import com.saga.util.Constant;
 
+/**
+ * 数据处理
+ *
+ * @author 李井强
+ */
 public class SaveThread extends Thread {
 	// private List<String> pointCommunicationList = new ArrayList<String>();
 	// private String ip = null;
@@ -62,6 +67,9 @@ public class SaveThread extends Thread {
 	// }
 	// }
 
+	/**
+	 * 报文处理
+	 */
 	private void handleCollectReportList2() {
 		// TODO Auto-generated method stub
 		try {
@@ -220,6 +228,9 @@ public class SaveThread extends Thread {
 		}
 	}
 
+	/**
+	 * 是否需要进库
+	 */
 	private boolean toDB(String buildingSign, int funcID) {
 		// TODO Auto-generated method stub
 		if (toDB_building(buildingSign) && toDB_funcid(funcID)) {
@@ -228,6 +239,9 @@ public class SaveThread extends Thread {
 		return false;
 	}
 
+	/**
+	 * 是否需要进库
+	 */
 	private boolean toDB_funcid(int funcID) {
 		// TODO Auto-generated method stub
 		if (Constant.whilte_Funcs == null || Constant.whilte_Funcs.size() == 0) {
@@ -239,6 +253,9 @@ public class SaveThread extends Thread {
 		return false;
 	}
 
+	/**
+	 * 是否需要进库
+	 */
 	private boolean toDB_building(String buildingSign) {
 		// TODO Auto-generated method stub
 		if (!Constant.black_Buildings.containsKey(buildingSign)) {

+ 14 - 0
collect/src/main/java/com/saga/thread/common/StatsThread.java

@@ -6,6 +6,11 @@ import org.zillion.util.log.LogUtil;
 
 import com.saga.util.Constant;
 
+/**
+ * 统计
+ *
+ * @author 李井强
+ */
 public class StatsThread extends Thread {
 	private Date from = new Date();
 
@@ -37,6 +42,9 @@ public class StatsThread extends Thread {
 		}
 	}
 
+	/**
+	 * 入库统计
+	 */
 	private void statsWTDB(Date to) {
 		// TODO Auto-generated method stub
 		LogUtil.warn("StatsThread: " + this.from + " ~ " + to + " Report received :" + Constant.collectCount
@@ -49,6 +57,9 @@ public class StatsThread extends Thread {
 		Constant.writeDB = 0;
 	}
 
+	/**
+	 * 报文发送统计
+	 */
 	private void statsSend(Date to) {
 		// TODO Auto-generated method stub
 		LogUtil.warn("StatsThread: " + this.from + " ~ " + to + " SEND received :" + Constant.sendRec + " sent :"
@@ -57,6 +68,9 @@ public class StatsThread extends Thread {
 		Constant.sendSend = 0;
 	}
 
+	/**
+	 * 报文接收统计
+	 */
 	private void statsCollect(Date to) {
 		// TODO Auto-generated method stub
 		LogUtil.warn("StatsThread: " + this.from + " ~ " + to + " Collect received :" + Constant.collectRec + " sent :"

+ 5 - 0
collect/src/main/java/com/saga/thread/common/WTDBThread.java

@@ -13,6 +13,11 @@ import org.zillion.util.log.LogUtil;
 import com.saga.entity.Record;
 import com.saga.util.Constant;
 
+/**
+ * д¿â
+ *
+ * @author Àǿ
+ */
 public class WTDBThread extends Thread {
 	// ZillionAgent agent;
 	long realCheck = 0;

+ 44 - 0
collect/src/main/java/com/saga/thread/down/DownThread.java

@@ -18,6 +18,11 @@ import com.saga.entity.Record;
 import com.saga.entity.Server;
 import com.saga.util.Constant;
 
+/**
+ * 下层通信
+ *
+ * @author 李井强
+ */
 public class DownThread extends Thread {
 	// private int port = 0;
 	// private long getPointList = 0;
@@ -79,6 +84,9 @@ public class DownThread extends Thread {
 		}
 	}
 
+	/**
+	 * 指令处理
+	 */
 	private void handlePointSet2() {
 		// TODO Auto-generated method stub
 		try {
@@ -215,6 +223,9 @@ public class DownThread extends Thread {
 	//
 	// }
 
+	/**
+	 * 数据报文处理
+	 */
 	private void handlePacket2(IServerManager server, PacketEntity p) {
 		// TODO Auto-generated method stub
 		try {
@@ -535,6 +546,9 @@ public class DownThread extends Thread {
 		}
 	}
 
+	/**
+	 * 生成pointlist
+	 */
 	private void getPointList(String address, String[] rList) {
 		// TODO Auto-generated method stub
 		String key = rList[0] + "-" + rList[1] + "-" + address;
@@ -902,6 +916,9 @@ public class DownThread extends Thread {
 	// }
 	// }
 
+	/**
+	 * 是否需要获取pointlist
+	 */
 	private boolean needGetPointList(Long getTime) {
 		// TODO Auto-generated method stub
 		LogUtil.info(System.currentTimeMillis() + " " + getTime + " "
@@ -942,6 +959,9 @@ public class DownThread extends Thread {
 	// }
 	// }
 
+	/**
+	 * 数据解析
+	 */
 	private void pushData(String[] rList) {
 		// TODO Auto-generated method stub
 		// 1101070037;1;report;20010203040506;123;1001;2;11;3.1;12;3.2
@@ -975,6 +995,9 @@ public class DownThread extends Thread {
 		}
 	}
 
+	/**
+	 * 数据解析
+	 */
 	private void pushDataAddtion(String[] rList) {
 		// TODO Auto-generated method stub
 		// 1101070037;1;report;20010203040506;123;1001;2;11;3.1;12;3.2
@@ -1066,6 +1089,9 @@ public class DownThread extends Thread {
 	// }
 	// }
 
+	/**
+	 * 数据写入缓存
+	 */
 	private void handleDataAddtion(String buildingSign, String mac, String meterSign, int funcID, String receivetime,
 			double data, String seq, String addtion) {
 		// TODO Auto-generated method stub
@@ -1120,6 +1146,9 @@ public class DownThread extends Thread {
 		}
 	}
 
+	/**
+	 * 更新设定信息
+	 */
 	private void updatePointSet(String[] rList) {
 		// TODO Auto-generated method stub
 		// 7777777777;1;senddownsetack;20171102152549;123;1001;0;success
@@ -1144,6 +1173,9 @@ public class DownThread extends Thread {
 	// }
 	// }
 
+	/**
+	 * 更新Meter-Collector记录
+	 */
 	private void updateMeterCollectorControl(String building, Map<String, String> meterList, String address) {
 		// TODO Auto-generated method stub
 		for (Entry<String, String> meter : meterList.entrySet()) {
@@ -1151,6 +1183,9 @@ public class DownThread extends Thread {
 		}
 	}
 
+	/**
+	 * 更新Meter-Collector记录
+	 */
 	private void updateMeterCollector(String building, String meter, String address) {
 		// TODO Auto-generated method stub
 		try {
@@ -1173,6 +1208,9 @@ public class DownThread extends Thread {
 		}
 	}
 
+	/**
+	 * 更新Meter-Collector记录
+	 */
 	private void updateMeterCollectorControl(String building, String meter, String address) {
 		// TODO Auto-generated method stub
 		try {
@@ -1211,6 +1249,9 @@ public class DownThread extends Thread {
 	// return true;
 	// }
 
+	/**
+	 * 获取缓存数据
+	 */
 	private StringBuffer getCacheData(String[] rList) {
 		// TODO Auto-generated method stub
 		Record record = new Record();
@@ -1235,6 +1276,9 @@ public class DownThread extends Thread {
 		return sb;
 	}
 
+	/**
+	 * 获取缓存数据
+	 */
 	private StringBuffer getCacheData2(String[] rList) {
 		// TODO Auto-generated method stub
 		Record record = new Record();

+ 20 - 0
collect/src/main/java/com/saga/thread/up/UpThread.java

@@ -18,6 +18,11 @@ import com.saga.entity.Record;
 import com.saga.entity.Server;
 import com.saga.util.Constant;
 
+/**
+ * 上层通信
+ *
+ * @author 李井强
+ */
 public class UpThread extends Thread {
 
 	// private IServerManager uploadServer = null;
@@ -218,6 +223,9 @@ public class UpThread extends Thread {
 	// }
 	// }
 
+	/**
+	 * 数据报文处理
+	 */
 	private void handlePopRece2(IServerManager server, PacketEntity packageRece) {
 		// TODO Auto-generated method stub
 		if ((packageRece != null) && (packageRece.content.packetString != null)
@@ -391,6 +399,9 @@ public class UpThread extends Thread {
 		}
 	}
 
+	/**
+	 * 指令处理
+	 */
 	private void returnPointSet2(IServerManager server) {
 		// TODO Auto-generated method stub
 		try {
@@ -691,6 +702,9 @@ public class UpThread extends Thread {
 	// }
 	// }
 
+	/**
+	 * 判断报文发起来源
+	 */
 	private String getupdown(String function) {
 		// TODO Auto-generated method stub
 		if ("report".equalsIgnoreCase(function)) {
@@ -703,6 +717,9 @@ public class UpThread extends Thread {
 
 	}
 
+	/**
+	 * 获取缓存数据
+	 */
 	private StringBuffer getCacheData(String[] rList) {
 		// TODO Auto-generated method stub
 		Record record = new Record();
@@ -727,6 +744,9 @@ public class UpThread extends Thread {
 		return sb;
 	}
 
+	/**
+	 * 获取缓存数据
+	 */
 	private StringBuffer getCacheData2(String[] rList) {
 		// TODO Auto-generated method stub
 		Record record = new Record();

+ 2 - 3
collect/src/main/java/com/saga/util/Constant.java

@@ -1140,9 +1140,8 @@ public class Constant {
 
 	public static int getFunctionConv(Record record) {
 		// TODO Auto-generated method stub
-		if (Constant.FunctionConv.containsKey(record.buildingSign + "-" + record.funcID)
-				&& Constant.FunctionConv.containsKey(record.buildingSign + "-" + record.funcID)) {
-			return Integer.valueOf(Constant.FunctionConv.get(record.buildingSign + "-" + record.funcID));
+		if (Constant.FunctionConv.containsKey(record.funcID) && Constant.FunctionConv.get(record.funcID) != null) {
+			return Integer.valueOf(Constant.FunctionConv.get(record.funcID));
 		}
 		return record.funcID;
 	}

+ 147 - 0
collect/src/main/java/com/saga/util/HBaseUtil.java

@@ -13,7 +13,16 @@ import com.saga.entity.Record;
 import com.sagacloud.json.JSONArray;
 import com.sagacloud.json.JSONObject;
 
+/**
+ * HBase工具
+ *
+ * @author 李井强
+ */
 public class HBaseUtil {
+
+	/**
+	 * 加载状态-物理结构
+	 */
 	public static Map<String, String> ps_physical_status(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -50,6 +59,9 @@ public class HBaseUtil {
 		return dbPhysicalStatus;
 	}
 
+	/**
+	 * 加载状态-点位
+	 */
 	public static Map<String, String> ps_virtual_point_status(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -87,6 +99,9 @@ public class HBaseUtil {
 		return dbPointStatus;
 	}
 
+	/**
+	 * 加载状态-meter
+	 */
 	public static Map<String, String> ps_virtual_meter_status(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -123,6 +138,9 @@ public class HBaseUtil {
 		return dbMeterStatus;
 	}
 
+	/**
+	 * 加载状态-project
+	 */
 	public static Map<String, String> ps_virtual_project_status(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -154,6 +172,9 @@ public class HBaseUtil {
 		return dbProjectStatus;
 	}
 
+	/**
+	 * 加载配置点表
+	 */
 	public static void LoadDB2Cache_dy_pointlist(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 building String 楼号 主键
@@ -247,6 +268,9 @@ public class HBaseUtil {
 
 	}
 
+	/**
+	 * 记录状态
+	 */
 	private static void checkStatus(String project, String meter, long funcid, String address_1, String address_2,
 			String address_3, String address_4) {
 		// TODO Auto-generated method stub
@@ -277,6 +301,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 加载状态-物理结构
+	 */
 	public static void LoadDB2Cache_ps_physical_status(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -314,6 +341,9 @@ public class HBaseUtil {
 
 	}
 
+	/**
+	 * 加载状态-point
+	 */
 	public static void LoadDB2Cache_ps_virtual_point_status(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -353,6 +383,9 @@ public class HBaseUtil {
 		LogUtil.info(Constant.agent.getFull_name() + " Reload :" + "  ps_virtual_point_status End...");
 	}
 
+	/**
+	 * 加载状态-meter
+	 */
 	public static void LoadDB2Cache_ps_virtual_meter_status(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -389,6 +422,9 @@ public class HBaseUtil {
 		LogUtil.info(Constant.agent.getFull_name() + " Reload :" + "  ps_virtual_meter_status End...");
 	}
 
+	/**
+	 * 加载状态-project
+	 */
 	public static void LoadDB2Cache_ps_virtual_project_status(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -493,6 +529,9 @@ public class HBaseUtil {
 	// LogUtil.info("Reload Project:" + project + " PointStatus End...");
 	// }
 
+	/**
+	 * 加载状态-配置点表
+	 */
 	public static Map<String, List<Integer>> GetDBPointList(String db, String tb, String building) throws Exception {
 
 		Map<String, List<Integer>> dbPointList = new HashMap<String, List<Integer>>();
@@ -524,6 +563,9 @@ public class HBaseUtil {
 
 	}
 
+	/**
+	 * 加载指令列表
+	 */
 	public static void Getset(String db, String tb, String building, String meter, long funcid, String query_from,
 			String query_to) throws Exception {
 
@@ -561,6 +603,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 加载当前指令
+	 */
 	public static void Getset_present(String db, String tb, String building, String meter, long funcid)
 			throws Exception {
 
@@ -659,6 +704,9 @@ public class HBaseUtil {
 	// }
 	// }
 
+	/**
+	 * 生成json
+	 */
 	public static JSONObject CreateJSON(String Name, String Type) {
 		JSONObject result = new JSONObject();
 		result.put("Name", Name);
@@ -666,11 +714,17 @@ public class HBaseUtil {
 		return result;
 	}
 
+	/**
+	 * 建库
+	 */
 	public static void CreateDB(String DB) throws Exception {
 		LogUtil.info(Constant.agent.getFull_name() + " CreateDB:" + DB);
 		Constant.agent.NDL_AddDatabase(DB);
 	}
 
+	/**
+	 * 判断表是否存在
+	 */
 	public static boolean tableExist(String DBName, String tableName) throws Exception {
 		JSONObject wrapperObject = new JSONObject();
 		wrapperObject.put("QueryType", "table_list");
@@ -687,6 +741,9 @@ public class HBaseUtil {
 		return false;
 	}
 
+	/**
+	 * 建表-monthdata
+	 */
 	public static void CreateTable(String DB, String tableName) throws Exception {
 		if (!tableExist(DB, tableName)) {
 			JSONArray Columns = new JSONArray();
@@ -711,6 +768,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 建表-detail
+	 */
 	public static void CreateTable_detail(String DB, String tableName) throws Exception {
 		if (!tableExist(DB, tableName)) {
 			JSONArray Columns = new JSONArray();
@@ -735,6 +795,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 建表-upload
+	 */
 	public static void CreateTable_upload(String DB, List<String> uploadList) throws Exception {
 		for (String tableName : uploadList) {
 			if (!tableExist(DB, tableName)) {
@@ -759,6 +822,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 建表-present
+	 */
 	public static void CreateTable_present(String DB, String tableName) throws Exception {
 		if (!tableExist(DB, tableName)) {
 
@@ -781,6 +847,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 建表-指令记录
+	 */
 	public static void CreateTable_set(String DB, String tableName) throws Exception {
 		if (!tableExist(DB, tableName)) {
 
@@ -805,6 +874,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 建表-当前指令
+	 */
 	public static void CreateTable_setpresent(String DB, String tableName) throws Exception {
 		if (!tableExist(DB, tableName)) {
 
@@ -876,6 +948,9 @@ public class HBaseUtil {
 	// }
 	// }
 
+	/**
+	 * 建表-fjd_0_buildingcomputetime
+	 */
 	public static void CreateTable_fjd_0_buildingcomputetime(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 building String 楼号 主键
@@ -899,6 +974,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 建表-dy_pointlist
+	 */
 	public static void CreateTable_dy_pointlist(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 building String 楼号 主键
@@ -959,6 +1037,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 建表-physical_status
+	 */
 	public static void CreateTable_ps_physical_status(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -998,6 +1079,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 建表-physical_log
+	 */
 	public static void CreateTable_ps_physical_log(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -1037,6 +1121,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 建表-ps_virtual_point_status
+	 */
 	public static void CreateTable_ps_virtual_point_status(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -1073,6 +1160,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 建表-ps_virtual_point_log
+	 */
 	public static void CreateTable_ps_virtual_point_log(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -1120,6 +1210,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 建表-ps_virtual_meter_status
+	 */
 	public static void CreateTable_ps_virtual_meter_status(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -1153,6 +1246,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 建表-ps_virtual_meter_log
+	 */
 	public static void CreateTable_ps_virtual_meter_log(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -1186,6 +1282,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 建表-ps_virtual_project_status
+	 */
 	public static void CreateTable_ps_virtual_project_status(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -1213,6 +1312,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 建表-ps_virtual_project_log
+	 */
 	public static void CreateTable_ps_virtual_project_log(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -1550,6 +1652,9 @@ public class HBaseUtil {
 	// }
 	// }
 
+	/**
+	 * 写fjd_0_buildingcomputetime
+	 */
 	public static void Insert_fjd_0_buildingcomputetime(String DB, String building, String compute_time,
 			String first_compute_time) throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -1587,6 +1692,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 写dy_pointlist
+	 */
 	public static void Insert_dy_pointlist(String DB, String building, String meter, long funcid, String system,
 			String source, String address_1, String ip_port, String address_2, String address_3, String address_4,
 			String collect_cycle, String data_type, String unit) throws Exception {
@@ -1651,6 +1759,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 判断地址是否为空
+	 */
 	private static boolean addressNull(String address_1, String address_2, String address_3, String address_4) {
 		// TODO Auto-generated method stub
 		if ("null".equalsIgnoreCase(address_1) || "null".equalsIgnoreCase(address_2)
@@ -1660,6 +1771,9 @@ public class HBaseUtil {
 		return false;
 	}
 
+	/**
+	 * 写ps_physical_status
+	 */
 	public static void Insert_ps_physical_status(String DB, String project, String address_1, String address_2,
 			String address_3, String address_4, String status, String receivetime, String detail) throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -1711,6 +1825,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 写ps_physical_log
+	 */
 	public static void Insert_ps_physical_log(String DB, String project, String address_1, String address_2,
 			String address_3, String address_4, String receivetime, String function) throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -1759,6 +1876,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 写ps_virtual_point_status
+	 */
 	public static void Insert_ps_virtual_point_status(String DB, String project, String meter, long funcid,
 			String updown, String status, String receivetime, String detail) throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -1806,6 +1926,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 写ps_virtual_point_log
+	 */
 	public static void Insert_ps_virtual_point_log(String DB, String project, String meter, long funcid, String updown,
 			String receivetime, long seq, String function, String feedback) throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -1860,6 +1983,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 写ps_virtual_meter_status
+	 */
 	public static void Insert_ps_virtual_meter_status(String DB, String project, String meter, String updown,
 			String status, String receivetime, String detail) throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -1905,6 +2031,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 写ps_virtual_meter_log
+	 */
 	public static void Insert_ps_virtual_meter_log(String DB, String project, String meter, String updown,
 			String receivetime, String function) throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -1946,6 +2075,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 写ps_virtual_project_status
+	 */
 	public static void Insert_ps_virtual_project_status(String DB, String project, String status, String receivetime,
 			String detail) throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -1987,6 +2119,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 写ps_virtual_project_log
+	 */
 	public static void Insert_ps_virtual_project_log(String DB, String project, String receivetime, String function)
 			throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -2073,6 +2208,9 @@ public class HBaseUtil {
 	// }
 	// }
 
+	/**
+	 * 写数据
+	 */
 	public static void BatchInsert(String DB, List<Record> dataList) throws Exception {
 		JSONArray InsertObjects = new JSONArray();
 		JSONArray InsertLogObjects = new JSONArray();
@@ -2150,6 +2288,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 写指令记录-sent
+	 */
 	public static void BatchInsert_Set1(String DB, PointSet ps) throws Exception {
 		JSONArray InsertObjects = new JSONArray();
 		try {
@@ -2197,6 +2338,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 写指令记录-其他状态
+	 */
 	public static void BatchInsert_Set2(String DB, PointSet ps) throws Exception {
 		JSONArray InsertObjects = new JSONArray();
 		try {
@@ -2245,6 +2389,9 @@ public class HBaseUtil {
 		}
 	}
 
+	/**
+	 * 写指令记录-timeout
+	 */
 	public static void BatchInsert_Set3(String DB, PointSet ps) throws Exception {
 		JSONArray InsertObjects = new JSONArray();
 		try {

+ 143 - 0
collect/src/main/java/com/saga/util/MySQLUtil.java

@@ -13,6 +13,11 @@ import org.zillion.util.log.LogUtil;
 import com.saga.entity.PointSet;
 import com.saga.entity.Record;
 
+/**
+ * Mysql工具
+ *
+ * @author 李井强
+ */
 public class MySQLUtil {
 	public static List<String> select(String SqlContent) {
 		List<String> result = new ArrayList<String>();
@@ -33,6 +38,9 @@ public class MySQLUtil {
 		return result;
 	}
 
+	/**
+	 * 加载状态-物理结构
+	 */
 	public static Map<String, String> ps_physical_status(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -66,6 +74,9 @@ public class MySQLUtil {
 		return dbPhysicalStatus;
 	}
 
+	/**
+	 * 加载状态-点位
+	 */
 	public static Map<String, String> ps_virtual_point_status(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -99,6 +110,9 @@ public class MySQLUtil {
 		return dbPointStatus;
 	}
 
+	/**
+	 * 加载状态-meter
+	 */
 	public static Map<String, String> ps_virtual_meter_status(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -132,6 +146,9 @@ public class MySQLUtil {
 		return dbMeterStatus;
 	}
 
+	/**
+	 * 加载状态-project
+	 */
 	public static Map<String, String> ps_virtual_project_status(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -158,6 +175,9 @@ public class MySQLUtil {
 		return dbProjectStatus;
 	}
 
+	/**
+	 * 加载状态-配置点表
+	 */
 	public static void LoadDB2Cache_dy_pointlist(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 building String 楼号 主键
@@ -247,6 +267,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 记录状态
+	 */
 	private static void checkStatus(String project, String meter, long funcid, String address_1, String address_2,
 			String address_3, String address_4) {
 		// TODO Auto-generated method stub
@@ -277,6 +300,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 加载状态-物理结构
+	 */
 	public static void LoadDB2Cache_ps_physical_status(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -310,6 +336,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 加载状态-点位
+	 */
 	public static void LoadDB2Cache_ps_virtual_point_status(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -340,6 +369,9 @@ public class MySQLUtil {
 		LogUtil.info("Reload Project:" + "  ps_virtual_point_status End...");
 	}
 
+	/**
+	 * 加载状态-meter
+	 */
 	public static void LoadDB2Cache_ps_virtual_meter_status(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -374,6 +406,9 @@ public class MySQLUtil {
 		LogUtil.info("Reload Project:" + "  ps_virtual_meter_status End...");
 	}
 
+	/**
+	 * 加载状态-project
+	 */
 	public static void LoadDB2Cache_ps_virtual_project_status(String db, String tb) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -401,6 +436,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 加载状态-配置点表
+	 */
 	public static Map<String, List<Integer>> GetDBPointList(String db, String tb, String building) throws Exception {
 
 		Map<String, List<Integer>> dbPointList = new HashMap<String, List<Integer>>();
@@ -425,6 +463,9 @@ public class MySQLUtil {
 		return dbPointList;
 	}
 
+	/**
+	 * 加载状态-指令记录
+	 */
 	public static void Getset(String db, String tb, String building, String meter, long funcid, String query_from,
 			String query_to) throws Exception {
 		try {
@@ -448,6 +489,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 加载状态-当前指令
+	 */
 	public static void Getset_present(String db, String tb, String building, String meter, long funcid)
 			throws Exception {
 		try {
@@ -532,6 +576,9 @@ public class MySQLUtil {
 	// }
 	// }
 
+	/**
+	 * 建库
+	 */
 	public static void CreateDB(String DB) throws Exception {
 		LogUtil.info("CreateDB:" + DB);
 		try {
@@ -545,6 +592,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 判断表是否存在
+	 */
 	public static boolean tableExist(String DBName, String tableName) throws Exception {
 		boolean result = false;
 		try {
@@ -564,6 +614,9 @@ public class MySQLUtil {
 		return result;
 	}
 
+	/**
+	 * 建表-monthdata
+	 */
 	public static void CreateTable(String DB, String tableName) throws Exception {
 		try {
 			if (!tableExist(DB, tableName)) {
@@ -578,6 +631,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 建表-detail
+	 */
 	public static void CreateTable_detail(String DB, String tableName) throws Exception {
 		try {
 			if (!tableExist(DB, tableName)) {
@@ -592,6 +648,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 建表-upload
+	 */
 	public static void CreateTable_upload(String DB, List<String> uploadList) throws Exception {
 		try {
 			for (String tableName : uploadList) {
@@ -608,6 +667,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 建表-present
+	 */
 	public static void CreateTable_present(String DB, String tableName) throws Exception {
 		try {
 			if (!tableExist(DB, tableName)) {
@@ -623,6 +685,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 建表-指令记录
+	 */
 	public static void CreateTable_set(String DB, String tableName) throws Exception {
 		try {
 			if (!tableExist(DB, tableName)) {
@@ -640,6 +705,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 建表-当前指令
+	 */
 	public static void CreateTable_setpresent(String DB, String tableName) throws Exception {
 		try {
 			if (!tableExist(DB, tableName)) {
@@ -657,6 +725,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 建表-fjd_0_buildingcomputetime
+	 */
 	public static void CreateTable_fjd_0_buildingcomputetime(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 building String 楼号 主键
@@ -677,6 +748,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 建表-dy_pointlist
+	 */
 	public static void CreateTable_dy_pointlist(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 building String 楼号 主键
@@ -715,6 +789,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 建表-ps_physical_status
+	 */
 	public static void CreateTable_ps_physical_status(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -744,6 +821,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 建表-ps_physical_log
+	 */
 	public static void CreateTable_ps_physical_log(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -772,6 +852,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 建表-ps_virtual_point_status
+	 */
 	public static void CreateTable_ps_virtual_point_status(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -799,6 +882,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 建表-ps_virtual_point_log
+	 */
 	public static void CreateTable_ps_virtual_point_log(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -834,6 +920,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 建表-ps_virtual_meter_status
+	 */
 	public static void CreateTable_ps_virtual_meter_status(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -860,6 +949,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 建表-ps_virtual_meter_log
+	 */
 	public static void CreateTable_ps_virtual_meter_log(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -885,6 +977,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 建表-ps_virtual_project_status
+	 */
 	public static void CreateTable_ps_virtual_project_status(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -907,6 +1002,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 建表-ps_virtual_project_log
+	 */
 	public static void CreateTable_ps_virtual_project_log(String DB, String tableName) throws Exception {
 		// 序号 名称 数据类型 释义 备注
 		// 1 project String 项目名 主键
@@ -928,6 +1026,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 写fjd_0_buildingcomputetime
+	 */
 	public static void Insert_fjd_0_buildingcomputetime(String DB, String building, String compute_time,
 			String first_compute_time) throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -946,6 +1047,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 写dy_pointlist
+	 */
 	public static void Insert_dy_pointlist(String DB, String building, String meter, long funcid, String system,
 			String source, String address_1, String ip_port, String address_2, String address_3, String address_4,
 			String collect_cycle, String data_type, String unit) throws Exception {
@@ -985,6 +1089,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 判断地址是否为空
+	 */
 	private static boolean addressNull(String address_1, String address_2, String address_3, String address_4) {
 		// TODO Auto-generated method stub
 		if ("null".equalsIgnoreCase(address_1) || "null".equalsIgnoreCase(address_2)
@@ -994,6 +1101,9 @@ public class MySQLUtil {
 		return false;
 	}
 
+	/**
+	 * 写ps_physical_status
+	 */
 	public static void Insert_ps_physical_status(String DB, String project, String address_1, String address_2,
 			String address_3, String address_4, String status, String receivetime, String detail) throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -1022,6 +1132,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 写ps_physical_log
+	 */
 	public static void Insert_ps_physical_log(String DB, String project, String address_1, String address_2,
 			String address_3, String address_4, String receivetime, String function) throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -1050,6 +1163,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 写ps_virtual_point_status
+	 */
 	public static void Insert_ps_virtual_point_status(String DB, String project, String meter, long funcid,
 			String updown, String status, String receivetime, String detail) throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -1074,6 +1190,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 写ps_virtual_point_log
+	 */
 	public static void Insert_ps_virtual_point_log(String DB, String project, String meter, long funcid, String updown,
 			String receivetime, long seq, String function, String feedback) throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -1104,6 +1223,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 写ps_virtual_meter_status
+	 */
 	public static void Insert_ps_virtual_meter_status(String DB, String project, String meter, String updown,
 			String status, String receivetime, String detail) throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -1127,6 +1249,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 写ps_virtual_meter_log
+	 */
 	public static void Insert_ps_virtual_meter_log(String DB, String project, String meter, String updown,
 			String receivetime, String function) throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -1147,6 +1272,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 写ps_virtual_project_status
+	 */
 	public static void Insert_ps_virtual_project_status(String DB, String project, String status, String receivetime,
 			String detail) throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -1167,6 +1295,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 写ps_virtual_project_log
+	 */
 	public static void Insert_ps_virtual_project_log(String DB, String project, String receivetime, String function)
 			throws Exception {
 		// 序号 名称 数据类型 释义 备注
@@ -1185,6 +1316,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 写数据
+	 */
 	public static void BatchInsert(String DB, List<Record> dataList) throws Exception {
 		try {
 			Statement stmt = Constant.conn.createStatement();
@@ -1230,6 +1364,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 写指令记录-sent
+	 */
 	public static void BatchInsert_Set1(String DB, PointSet ps) throws Exception {
 		try {
 			Statement stmt = Constant.conn.createStatement();
@@ -1250,6 +1387,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 写指令记录-其他状态
+	 */
 	public static void BatchInsert_Set2(String DB, PointSet ps) throws Exception {
 		try {
 			Statement stmt = Constant.conn.createStatement();
@@ -1272,6 +1412,9 @@ public class MySQLUtil {
 		}
 	}
 
+	/**
+	 * 写指令记录-timeout
+	 */
 	public static void BatchInsert_Set3(String DB, PointSet ps) throws Exception {
 		try {
 			Statement stmt = Constant.conn.createStatement();