Merge remote-tracking branch 'origin/master'
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();
|
||||
|
||||
@@ -79,9 +79,13 @@
|
||||
shiftorder.plan_qty,
|
||||
shiftorder.real_qty,
|
||||
(shiftorder.plan_qty - shiftorder.real_qty) AS gap_qty,
|
||||
material.material_code,
|
||||
material.material_name,
|
||||
material.material_spec,
|
||||
CONVERT ( ( shiftorder.real_qty / shiftorder.plan_qty ), DECIMAL ( 10, 3 ) ) * 100 AS finish_rate
|
||||
FROM
|
||||
mps_bd_produceshiftorder shiftorder
|
||||
left join md_me_materialbase material on material.material_id =shiftorder.material_id
|
||||
where
|
||||
shiftorder.is_delete='0'
|
||||
OPTION 输入.produce_date <> ""
|
||||
@@ -301,7 +305,7 @@ IF 输入.flag = "12"
|
||||
material.material_code,
|
||||
material.material_spec,
|
||||
material.material_name
|
||||
ORDER BY real_qty
|
||||
ORDER BY real_qty desc
|
||||
LIMIT 0,9
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
|
||||
@@ -151,7 +151,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