dev
姜玉琦 2024-11-10 11:43:59 +08:00
parent e849cfee4a
commit 95525f5d54
1 changed files with 11 additions and 11 deletions

View File

@ -37,11 +37,7 @@ public class TowerCraneApiController {
private final String HOST = "https://aqzg.makalu.cc";
private final String DEVSOURCE = "YF";
private Map<String, Object> cacheMap;
{
cacheMap = new HashMap<>();
}
private Map<String, Object> cacheMap = new HashMap<>();
@Autowired
private IIotDeviceInfoService iIotDeviceInfoService;
@ -87,8 +83,8 @@ public class TowerCraneApiController {
dataMap.put("base",rate);
dataMap.put("coordX",dataContent.get("coordinateX"));
dataMap.put("coordY",dataContent.get("coordinateY"));
dataMap.put("foreArmLength",dataContent.get("frontBrachium"));
dataMap.put("postArmLength",dataContent.get("afterBrachium"));
dataMap.put("foreArmLength",Convert.toStr(dataContent.get("frontBrachium"),"60"));
dataMap.put("postArmLength",Convert.toStr(dataContent.get("afterBrachium"),"12"));
dataMap.put("hatHeight",dataContent.get("towerCapHeight"));
double remotePullRod = Convert.toDouble(cacheMap.get("remotePullRod_"+sn),0.00);
double nearPullRod = Convert.toDouble(cacheMap.get("nearPullRod_"+sn),0.00);
@ -99,7 +95,8 @@ public class TowerCraneApiController {
dataMap.put("downHeight",dataContent.get("towerSectionHeight"));
dataMap.put("updateTime", DateUtils.getTime());
HttpUtils.commHttpPost(HOST+"/api/device/baseInfo",dataMap);
String res = HttpUtils.commHttpPost(HOST+"/api/device/baseInfo",dataMap);
log.info("/api/device/baseInfo...{}...{}",res,dataMap);
}
/**
@ -178,7 +175,8 @@ public class TowerCraneApiController {
dataMap.put("minRotateAngle",dataContent.get("startRotation"));
dataMap.put("createTime",System.currentTimeMillis());
HttpUtils.commHttpPost(HOST+"/api/device/roundInfo",dataMap);
String res = HttpUtils.commHttpPost(HOST+"/api/device/roundInfo",dataMap);
log.info("/api/device/roundInfo...{}...{}",res,dataMap);
}
/**
@ -201,7 +199,8 @@ public class TowerCraneApiController {
dataMap.put("real_data",Convert.toStr(cacheMap.get("collisionAngleAlarm_"+sn),"0"));
dataMap.put("warn_time",DateUtils.getTime());
HttpUtils.commHttpPost(HOST+"/api/device/warnRecord",dataMap);
String res = HttpUtils.commHttpPost(HOST+"/api/device/warnRecord",dataMap);
log.info("/api/device/warnRecord...{}...{}",res,dataMap);
}
/**
@ -453,7 +452,8 @@ public class TowerCraneApiController {
dataMap.put("warn_time",DateUtils.getTime());
if(Objects.nonNull(dataMap.get("warn_type"))){
HttpUtils.commHttpPost(HOST+"/api/device/warnRecord",dataMap);
String res = HttpUtils.commHttpPost(HOST+"/api/device/warnRecord",dataMap);
log.info("/api/device/warnRecord...{}...{}",res,dataMap);
}
}
}