Quellcode durchsuchen

数据包丢包检测

vor 5 Jahren
Ursprung
Commit
11eff8efed

+ 1 - 0
cloud-socket/src/com/js/kbt/controller/FileController.java

@@ -141,6 +141,7 @@ public class FileController {
 		if(list.size()>0){
 			MouldHistory mouldHistory = mouldHistoryMapper.selectByPrimaryKey(list.get(0).getHistoryId());
 			mcr.setEquipmentNo(item.getEquipmentNo());
+			System.out.println("本次运行次数: " + item.getRunCnt()+" 上一小时的运行次数:"+mouldHistory.getRunCnt()+" 上一小时的historyId:"+mouldHistory.getId());
 			mcr.setRuntime(item.getRunCnt() - mouldHistory.getRunCnt());
 			if(hours==0){
 				mcr.setTimeSlot("00:00-01:00");

+ 1 - 12
cloud-socket/src/com/js/kbt/socket/UserHandler.java

@@ -272,18 +272,6 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 		return deviceNum;
 	}
 	
-	//下发传感器阈值20~200
-	public void sendThreshold(){
-		List<SensorThreshold> list = sensorThresholdMapper.selectByExample(new SensorThresholdExample());
-		if(list.size()>0){
-			SensorThreshold sensorThreshold = list.get(0);
-			String threshold = "#LIMIT VALUE="+sensorThreshold.getThreshold();
-			sendMsg(threshold);
-			//下发完处理掉数据
-			sensorThresholdMapper.deleteByPrimaryKey(sensorThreshold.getId());
-		}
-	}
-
 	public void sendPackage(String equipmentNo) {
 		if (equipmentNo.indexOf("FAAF") != -1) {
 			logger.info("非法云模盒编号,不作下发处理");
@@ -456,6 +444,7 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 		List<MouldHistoryTime> list = mouldHistoryTimeMapper.selectByExample(mExp);
 		if (list.size() > 0) {
 			MouldHistory mouldHistory = mouldHistoryMapper.selectByPrimaryKey(list.get(0).getHistoryId());
+			logger.info("本次运行次数: " + item.getRunCnt()+" 上一小时的运行次数:"+mouldHistory.getRunCnt()+" 上一小时的historyId:"+mouldHistory.getId());
 			mcr.setDateStr(sdf.format(openTime));
 			mcr.setEquipmentNo(item.getEquipmentNo());
 			mcr.setRuntime(item.getRunCnt() - mouldHistory.getRunCnt());