代码更新

This commit is contained in:
ludj
2023-02-02 13:07:24 +08:00
parent 9856234890
commit c6d1522ee9
3 changed files with 10 additions and 2 deletions

View File

@@ -19,13 +19,14 @@ public class AutoQueryDeviceStatus{
//通过ACS接口获取温度
JSONArray device_rows = WQL.getWO("PDA_02").addParam("flag","15").process().getResultJSONArray(0);
JSONObject jo = wmsToAcsService.getPointStatus(device_rows);
WQLObject ivtTab=WQLObject.getWQLObject("st_ivt_hotpointivt");
JSONArray de_rows = jo.getJSONArray("data");
for (int i = 0; i < de_rows.size(); i++) {
JSONObject row = de_rows.getJSONObject(i);
String device_code = row.getString("device_code");
JSONObject point_jo = WQLObject.getWQLObject("st_ivt_hotpointivt").query("point_code = '"+device_code+"'").uniqueResult(0);
JSONObject point_jo = ivtTab.query("point_code = '"+device_code+"'").uniqueResult(0);
point_jo.put("temperature",row.getString("temperature"));
WQLObject.getWQLObject("st_ivt_hotpointivt").update(point_jo);
ivtTab.update(point_jo);
}
}
}