修改
This commit is contained in:
@@ -412,23 +412,23 @@ public class DeviceScreenServiceImpl implements DeviceScreenService {
|
|||||||
device.put("end_time","");
|
device.put("end_time","");
|
||||||
device.put("product_time","");
|
device.put("product_time","");
|
||||||
String device_id = device.getString("device_id");
|
String device_id = device.getString("device_id");
|
||||||
JSONArray order_rows = WQLObject.getWQLObject("mps_bd_produceshiftorder").query("device_id = '" + device_id + "' AND produce_date like '" + date + "' AND is_delete = '0'").getResultJSONArray(0);
|
/*JSONArray order_rows = WQLObject.getWQLObject("mps_bd_produceshiftorder").query("device_id = '" + device_id + "' AND produce_date like '" + date + "' AND is_delete = '0'").getResultJSONArray(0);
|
||||||
for (int j = 0; j < order_rows.size(); j++) {
|
for (int j = 0; j < order_rows.size(); j++) {
|
||||||
JSONObject order = order_rows.getJSONObject(i);
|
JSONObject order = order_rows.getJSONObject(i);
|
||||||
product_qty += order.getIntValue("real_qty");
|
product_qty += order.getIntValue("real_qty");
|
||||||
}
|
}*/
|
||||||
// device.put("product_qty", product_qty);
|
// device.put("product_qty", product_qty);
|
||||||
|
|
||||||
//查询最近的一条开机状态
|
//查询最近的一条开机状态
|
||||||
JSONObject start_jo = WQLObject.getWQLObject("pdm_bi_devicerunstatusrecord").query("device_id = '" + device_id + "' AND status_type = '02' order by end_time desc").uniqueResult(0);
|
JSONObject start_jo = WQLObject.getWQLObject("pdm_bi_devicerunstatusrecord").query("device_id = '" + device_id + "' AND status_type = '01' order by end_time desc").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(start_jo)) {
|
if (ObjectUtil.isNotEmpty(start_jo)) {
|
||||||
device.put("start_time", start_jo.getString("end_time"));
|
device.put("start_time", start_jo.getString("end_time"));
|
||||||
}
|
}
|
||||||
if (StrUtil.isEmpty(device.getString("status_type"))) {
|
if (StrUtil.isNotEmpty(device.getString("status_type"))) {
|
||||||
//查询最近的一条关机状态
|
//查询最近的一条关机状态
|
||||||
JSONObject end_jo = WQLObject.getWQLObject("pdm_bi_devicerunstatusrecord").query("device_id = '" + device_id + "' AND status_type = '01' order by end_time desc").uniqueResult(0);
|
JSONObject end_jo = WQLObject.getWQLObject("pdm_bi_devicerunstatusrecord").query("device_id = '" + device_id + "' AND status_type = '01' order by end_time desc").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(end_jo)) {
|
if (ObjectUtil.isNotEmpty(end_jo)) {
|
||||||
device.put("end_time", end_jo.getString("end_time"));
|
device.put("end_time", end_jo.getString("start_time"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -243,7 +243,7 @@
|
|||||||
device.device_code,
|
device.device_code,
|
||||||
device.device_name,
|
device.device_name,
|
||||||
pro.workprocedure_name,
|
pro.workprocedure_name,
|
||||||
(case when run.status_type is null then '关机'
|
(case when run.status_type = '01' then '关机'
|
||||||
when run.status_type = '02' then '开机'
|
when run.status_type = '02' then '开机'
|
||||||
when run.status_type = '03' then '生产中'
|
when run.status_type = '03' then '生产中'
|
||||||
when run.status_type = '04' then '待机'
|
when run.status_type = '04' then '待机'
|
||||||
|
|||||||
Reference in New Issue
Block a user