修改
This commit is contained in:
@@ -44,16 +44,30 @@ public class DeviceScreenServiceImpl implements DeviceScreenService {
|
|||||||
int free_device = total_num - task_rows.size() - err_device;
|
int free_device = total_num - task_rows.size() - err_device;
|
||||||
|
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONArray result = new JSONArray();
|
||||||
result.put("total_num", total_num);
|
JSONObject run = new JSONObject();
|
||||||
result.put("run_device", run_device);
|
run.put("name","正常运行");
|
||||||
result.put("prepare_device", prepare_device);
|
run.put("value",run_device);
|
||||||
result.put("free_device", free_device);
|
result.add(run);
|
||||||
result.put("err_device", err_device);
|
JSONObject pre = new JSONObject();
|
||||||
|
pre.put("name","暂未生产");
|
||||||
|
pre.put("value",prepare_device);
|
||||||
|
result.add(pre);
|
||||||
|
JSONObject free = new JSONObject();
|
||||||
|
free.put("name","空闲设备");
|
||||||
|
free.put("value",free_device);
|
||||||
|
result.add(free);
|
||||||
|
JSONObject err = new JSONObject();
|
||||||
|
err.put("name","故障设备");
|
||||||
|
err.put("value",err_device);
|
||||||
|
result.add(err);
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("ja",result);
|
||||||
|
jo.put("total_num",total_num);
|
||||||
JSONObject returnjo = new JSONObject();
|
JSONObject returnjo = new JSONObject();
|
||||||
returnjo.put("code", "1");
|
returnjo.put("code", "1");
|
||||||
returnjo.put("desc", "查询成功!");
|
returnjo.put("desc", "查询成功!");
|
||||||
returnjo.put("result", result);
|
returnjo.put("result", jo);
|
||||||
return returnjo;
|
return returnjo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,12 +76,12 @@ public class DeviceScreenServiceImpl implements DeviceScreenService {
|
|||||||
JSONObject oee = new JSONObject();
|
JSONObject oee = new JSONObject();
|
||||||
JSONObject teep = new JSONObject();
|
JSONObject teep = new JSONObject();
|
||||||
//value1:过去一个月;value2:目标;value3:实际
|
//value1:过去一个月;value2:目标;value3:实际
|
||||||
oee.put("value1", "78.0%");
|
oee.put("value1", "78.0");
|
||||||
oee.put("value2", "67.0%");
|
oee.put("value2", "67.0");
|
||||||
oee.put("value3", "48.0%");
|
oee.put("value3", "48.0");
|
||||||
teep.put("value1", "46.0%");
|
teep.put("value1", "46.0");
|
||||||
teep.put("value2", "51.0%");
|
teep.put("value2", "51.0");
|
||||||
teep.put("value3", "32.0%");
|
teep.put("value3", "32.0");
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("oee", oee);
|
result.put("oee", oee);
|
||||||
result.put("teep", teep);
|
result.put("teep", teep);
|
||||||
@@ -394,6 +408,9 @@ public class DeviceScreenServiceImpl implements DeviceScreenService {
|
|||||||
for (int i = 0; i < device_rows.size(); i++) {
|
for (int i = 0; i < device_rows.size(); i++) {
|
||||||
int product_qty = 0;
|
int product_qty = 0;
|
||||||
JSONObject device = device_rows.getJSONObject(i);
|
JSONObject device = device_rows.getJSONObject(i);
|
||||||
|
device.put("start_time","");
|
||||||
|
device.put("end_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++) {
|
||||||
|
|||||||
@@ -207,7 +207,7 @@
|
|||||||
AND
|
AND
|
||||||
shift.order_status <> '04'
|
shift.order_status <> '04'
|
||||||
AND
|
AND
|
||||||
run.status_type <> '05'
|
(run.status_type <> '05' OR (run.status_type = '05' AND IFNULL(run.end_time,'') <> '') OR run.status_type IS NULL)
|
||||||
OPTION 输入.workprocedure_id <> ""
|
OPTION 输入.workprocedure_id <> ""
|
||||||
device.workprocedure_id = 输入.workprocedure_id
|
device.workprocedure_id = 输入.workprocedure_id
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|||||||
Reference in New Issue
Block a user