fix: 管芯库启用
This commit is contained in:
@@ -384,49 +384,49 @@ public class AutoCallEmptyVehicle {
|
|||||||
JSONArray device_ja = new JSONArray();
|
JSONArray device_ja = new JSONArray();
|
||||||
device_ja.add(device_jo);
|
device_ja.add(device_jo);
|
||||||
// 获取管芯数据
|
// 获取管芯数据
|
||||||
// JSONObject device_data = wmsToAcsService.getPointStatus(device_ja);
|
JSONObject device_data = wmsToAcsService.getPointStatus(device_ja);
|
||||||
// JSONObject data = device_data.getJSONArray("data").getJSONObject(0);
|
JSONObject data = device_data.getJSONArray("data").getJSONObject(0);
|
||||||
JSONArray task_rows = new JSONArray();
|
JSONArray task_rows = new JSONArray();
|
||||||
boolean same_flag = false;
|
boolean same_flag = false;
|
||||||
// todo: 临时测试
|
// todo: 临时测试
|
||||||
// 原:false
|
// 原:false
|
||||||
boolean need_cz = true;
|
boolean need_cz = false;
|
||||||
// for (int i = 0; i < rows.size(); i++) {
|
for (int i = 0; i < rows.size(); i++) {
|
||||||
// JSONObject row = rows.getJSONObject(i);
|
JSONObject row = rows.getJSONObject(i);
|
||||||
// int num = row.getIntValue("num");
|
int num = row.getIntValue("num");
|
||||||
// if (num == 2) {
|
if (num == 2) {
|
||||||
// same_flag = true;
|
same_flag = true;
|
||||||
// }
|
}
|
||||||
// String material_code = row.getString("paper_code");
|
String material_code = row.getString("paper_code");
|
||||||
// for (int j = 1; j < 13; j++) {
|
for (int j = 1; j < 13; j++) {
|
||||||
// String material_key = "material" + j;
|
String material_key = "material" + j;
|
||||||
// String qty_key = "qty" + j;
|
String qty_key = "qty" + j;
|
||||||
// String ivt_code = data.getString(material_key);
|
String ivt_code = data.getString(material_key);
|
||||||
// int ivt_num = data.getIntValue(qty_key);
|
int ivt_num = data.getIntValue(qty_key);
|
||||||
// if (StrUtil.isNotEmpty(ivt_code) && ivt_code.equals(material_code)) {
|
if (StrUtil.isNotEmpty(ivt_code) && ivt_code.equals(material_code)) {
|
||||||
// JSONObject task_jo = new JSONObject();
|
JSONObject task_jo = new JSONObject();
|
||||||
// task_jo.put("device_code", j);
|
task_jo.put("device_code", j);
|
||||||
// task_jo.put("material_code", material_code);
|
task_jo.put("material_code", material_code);
|
||||||
// if (ivt_num >= num) {
|
if (ivt_num >= num) {
|
||||||
// task_jo.put("qty", num);
|
task_jo.put("qty", num);
|
||||||
// num = 0;
|
num = 0;
|
||||||
// } else {
|
} else {
|
||||||
// task_jo.put("qty", ivt_num);
|
task_jo.put("qty", ivt_num);
|
||||||
// num -= ivt_num;
|
num -= ivt_num;
|
||||||
// }
|
}
|
||||||
// task_rows.add(task_jo);
|
task_rows.add(task_jo);
|
||||||
// if (num == 0) {
|
if (num == 0) {
|
||||||
// break;
|
break;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// }
|
}
|
||||||
// if (num > 0) {
|
if (num > 0) {
|
||||||
// log.info("子卷号为:" + row.getString("pcsn") + "所需的纸管在纸管库中库存不足!不进行套管");
|
log.info("子卷号为:" + row.getString("pcsn") + "所需的纸管在纸管库中库存不足!不进行套管");
|
||||||
// } else {
|
} else {
|
||||||
// need_cz = true;
|
need_cz = true;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
if (need_cz) {
|
if (need_cz) {
|
||||||
//生成出纸管的任务
|
//生成出纸管的任务
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
|
|||||||
Reference in New Issue
Block a user