修改
This commit is contained in:
Binary file not shown.
@@ -1,6 +1,7 @@
|
|||||||
package org.nl.wms.sch.manage;
|
package org.nl.wms.sch.manage;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -15,6 +16,7 @@ import org.springframework.stereotype.Component;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class AutoQueryDeviceStatus {
|
public class AutoQueryDeviceStatus {
|
||||||
private final WmsToAcsService wmsToAcsService;
|
private final WmsToAcsService wmsToAcsService;
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
//通过ACS接口获取温度
|
//通过ACS接口获取温度
|
||||||
JSONArray device_rows = WQL.getWO("PDA_02").addParam("flag", "15").process().getResultJSONArray(0);
|
JSONArray device_rows = WQL.getWO("PDA_02").addParam("flag", "15").process().getResultJSONArray(0);
|
||||||
@@ -26,6 +28,22 @@ public class AutoQueryDeviceStatus{
|
|||||||
String device_code = row.getString("device_code");
|
String device_code = row.getString("device_code");
|
||||||
JSONObject point_jo = ivtTab.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"));
|
point_jo.put("temperature", row.getString("temperature"));
|
||||||
|
//获取倒计时,分,秒
|
||||||
|
String countdown_house = row.getString("countdown_house");
|
||||||
|
String countdown_min = row.getString("countdown_min");
|
||||||
|
String countdown_sec = row.getString("countdown_sec");
|
||||||
|
|
||||||
|
if (StrUtil.isEmpty(countdown_house)) {
|
||||||
|
countdown_house = "0";
|
||||||
|
}
|
||||||
|
if (StrUtil.isEmpty(countdown_min)) {
|
||||||
|
countdown_min = "0";
|
||||||
|
}
|
||||||
|
if (StrUtil.isEmpty(countdown_sec)) {
|
||||||
|
countdown_sec = "0";
|
||||||
|
}
|
||||||
|
String last_time = countdown_house + "小时" + countdown_min + "分钟";
|
||||||
|
point_jo.put("last_time", last_time);
|
||||||
ivtTab.update(point_jo);
|
ivtTab.update(point_jo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user