修改
This commit is contained in:
@@ -530,11 +530,16 @@ public class SparePartServiceImpl implements SparePartService {
|
|||||||
map.put("flag", "6");
|
map.put("flag", "6");
|
||||||
map.put("maintenance_flag", maintenance_flag);
|
map.put("maintenance_flag", maintenance_flag);
|
||||||
map.put("device_code", device_code);
|
map.put("device_code", device_code);
|
||||||
JSONObject rows = WQL.getWO("QPDAEM_BI_SPAREPART").addParamMap(map).process().uniqueResult(0);
|
JSONArray rows = WQL.getWO("QPDAEM_BI_SPAREPART").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
if (ObjectUtil.isEmpty(rows)) {
|
||||||
|
rows = new JSONArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject content = new JSONObject();
|
||||||
|
content.put("rows",rows);
|
||||||
JSONObject returnjo = new JSONObject();
|
JSONObject returnjo = new JSONObject();
|
||||||
returnjo.put("code", "1");
|
returnjo.put("code", "1");
|
||||||
returnjo.put("rows", rows);
|
returnjo.put("content", content);
|
||||||
returnjo.put("desc", "操作成功!");
|
returnjo.put("desc", "操作成功!");
|
||||||
return returnjo;
|
return returnjo;
|
||||||
}
|
}
|
||||||
@@ -750,6 +755,7 @@ public class SparePartServiceImpl implements SparePartService {
|
|||||||
BigDecimal div = NumberUtil.div(NumberUtil.sub(run_times, prepare_times, error_times, adjust_times), NumberUtil.sub(run_times, prepare_times, adjust_times));
|
BigDecimal div = NumberUtil.div(NumberUtil.sub(run_times, prepare_times, error_times, adjust_times), NumberUtil.sub(run_times, prepare_times, adjust_times));
|
||||||
BigDecimal div1 = NumberUtil.div(NumberUtil.mul(div, theory_beat, product_qty), NumberUtil.sub(run_times, prepare_times, error_times, adjust_times));
|
BigDecimal div1 = NumberUtil.div(NumberUtil.mul(div, theory_beat, product_qty), NumberUtil.sub(run_times, prepare_times, error_times, adjust_times));
|
||||||
BigDecimal oee_value = NumberUtil.mul(div1, NumberUtil.div(NumberUtil.sub(product_qty, nok_qty), product_qty));
|
BigDecimal oee_value = NumberUtil.mul(div1, NumberUtil.div(NumberUtil.sub(product_qty, nok_qty), product_qty));
|
||||||
|
oee_value = NumberUtil.round(oee_value, 3);
|
||||||
content.put("oee_value", oee_value);
|
content.put("oee_value", oee_value);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
content.put("oee_value", 0);
|
content.put("oee_value", 0);
|
||||||
@@ -768,7 +774,8 @@ public class SparePartServiceImpl implements SparePartService {
|
|||||||
if (ObjectUtil.isEmpty(jsonObject)) {
|
if (ObjectUtil.isEmpty(jsonObject)) {
|
||||||
throw new PdaRequestException("传入参数不能为空!");
|
throw new PdaRequestException("传入参数不能为空!");
|
||||||
}
|
}
|
||||||
JSONObject jo = JSONObject.parseObject(JSON.toJSONString(jsonObject));
|
JSONObject form = JSONObject.parseObject(JSON.toJSONString(jsonObject));
|
||||||
|
JSONObject jo = form.getJSONObject("form");
|
||||||
|
|
||||||
String device_code = jo.getString("device_code");
|
String device_code = jo.getString("device_code");
|
||||||
|
|
||||||
|
|||||||
@@ -183,7 +183,6 @@ public class DevicerunrecordServiceImpl implements DevicerunrecordService {
|
|||||||
json.put("oee_value", oee_value);
|
json.put("oee_value", oee_value);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
json.put("oee_value", 0);
|
json.put("oee_value", 0);
|
||||||
tab.insert(json);
|
|
||||||
}
|
}
|
||||||
tab.update(json);
|
tab.update(json);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user