修改
This commit is contained in:
@@ -417,7 +417,7 @@ public class DeviceScreenServiceImpl implements DeviceScreenService {
|
||||
JSONObject order = order_rows.getJSONObject(i);
|
||||
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);
|
||||
@@ -432,11 +432,11 @@ public class DeviceScreenServiceImpl implements DeviceScreenService {
|
||||
}
|
||||
}
|
||||
|
||||
//查询最近的一个工单
|
||||
JSONObject order_jo = WQLObject.getWQLObject("mps_bd_produceshiftorder").query("device_id = '" + device_id + "' AND is_delete = '0' order by realproducestart_date desc").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(order_jo)) {
|
||||
device.put("product_time", order_jo.getString("produce_date"));
|
||||
}
|
||||
// //查询最近的一个工单
|
||||
// JSONObject order_jo = WQLObject.getWQLObject("mps_bd_produceshiftorder").query("device_id = '" + device_id + "' AND is_delete = '0' order by realproducestart_date desc").uniqueResult(0);
|
||||
// if (ObjectUtil.isNotEmpty(order_jo)) {
|
||||
// device.put("product_time", order_jo.getString("produce_date"));
|
||||
// }
|
||||
result.add(device);
|
||||
}
|
||||
JSONObject returnjo = new JSONObject();
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
LEFT JOIN pdm_bi_device device ON device.device_id = run.device_id
|
||||
WHERE
|
||||
run.status_type = '05'
|
||||
AND DATE_SUB( CURDATE(), INTERVAL 30 DAY ) <= date( start_time )
|
||||
AND DATE_SUB( CURDATE(), INTERVAL 10 DAY ) <= date( start_time )
|
||||
GROUP BY
|
||||
run.device_id
|
||||
LIMIT 10
|
||||
|
||||
Reference in New Issue
Block a user