Merge remote-tracking branch 'origin/one_rebuild_dev' into master_1
This commit is contained in:
@@ -60,6 +60,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@@ -1081,6 +1082,11 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
}
|
||||
|
||||
if ("2".equals(Status)) {
|
||||
// 按 ContainerPosition 进行升序排序
|
||||
List<JSONObject> paramList = param.toJavaList(JSONObject.class);
|
||||
paramList.sort(Comparator.comparing(obj -> Integer.parseInt(obj.getString("ContainerPosition"))));
|
||||
// param.sort(Comparator.comparing(obj -> Integer.parseInt(((JSONObject) obj).getString("ContainerPosition"))));
|
||||
log.info("排序的数组:{}", paramList);
|
||||
JSONObject jsonObject = param.getJSONObject(0);
|
||||
JSONObject plan = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("container_name = '" + jsonObject.getString("ContainerGroup") + "' AND is_delete = '0'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(plan)) {
|
||||
@@ -1099,8 +1105,8 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
JSONArray down_rows = new JSONArray();
|
||||
String up_qzz = "";
|
||||
String down_qzz = "";
|
||||
for (int i = 0; i < param.size(); i++) {
|
||||
JSONObject row = param.getJSONObject(i);
|
||||
for (int i = 0; i < paramList.size(); i++) {
|
||||
JSONObject row = paramList.get(i);
|
||||
//查询对应的分切计划
|
||||
JSONObject plan_jo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("container_name = '" + row.getString("ContainerGroup") + "' AND is_delete = '0'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(plan_jo)) {
|
||||
@@ -1160,7 +1166,6 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
result.put("RTDAT", null);
|
||||
return result;
|
||||
}
|
||||
|
||||
//查询输送线上该分切机下一分切组可用的气涨轴
|
||||
JSONObject group_jo = WQL.getWO("PDA_02").addParam("flag", "14").addParam("resource_name", ResourceName).process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(group_jo)) {
|
||||
@@ -1216,6 +1221,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
whereJson.put("cut_rows", del_row);
|
||||
inService.confirm(whereJson);
|
||||
}
|
||||
Thread.sleep(500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +85,7 @@ public class AutoCallEmptyVehicle {
|
||||
if (ObjectUtil.isEmpty(nbj_jo)) {
|
||||
continue;
|
||||
}
|
||||
// todo: 待优化
|
||||
if (nbj_jo.getString("is_used").equals("1")) {
|
||||
//上半部分
|
||||
this.callEmptyVehicle(product_area, "0", integer);
|
||||
@@ -162,23 +163,23 @@ public class AutoCallEmptyVehicle {
|
||||
// 下发ACS任务呼叫纸管
|
||||
this.callPaperTube(plan_rows, product_area);
|
||||
}
|
||||
/* ******************* 校验需要呼叫的载具数 ******************* */
|
||||
/* ******************* 校验需要呼叫的载具数(待优化) ******************* */
|
||||
// 断点:"A1".equals(product_area) && "1".equals(point_location)
|
||||
//减去对应已经在出库的空载具任务
|
||||
JSONArray out_task = WQL.getWO("QAUTO_QUERY").addParam("flag", "2").addParam("point_location", point_location).addParam("product_area", product_area).process().getResultJSONArray(0);
|
||||
donw_num -= out_task.size();
|
||||
// JSONArray out_task = WQL.getWO("QAUTO_QUERY").addParam("flag", "2").addParam("point_location", point_location).addParam("product_area", product_area).process().getResultJSONArray(0);
|
||||
// donw_num -= out_task.size();
|
||||
|
||||
//减去出口对应的载具
|
||||
JSONObject out_jo = WQL.getWO("QAUTO_QUERY").addParam("flag", "3").addParam("point_location", point_location).addParam("product_area", product_area).process().uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(out_jo)) {
|
||||
donw_num--;
|
||||
}
|
||||
// JSONObject out_jo = WQL.getWO("QAUTO_QUERY").addParam("flag", "3").addParam("point_location", point_location).addParam("product_area", product_area).process().uniqueResult(0);
|
||||
// if (ObjectUtil.isNotEmpty(out_jo)) {
|
||||
// donw_num--;
|
||||
// }
|
||||
|
||||
//减去入库口对应的载具
|
||||
JSONObject in_jo = WQL.getWO("QAUTO_QUERY").addParam("flag", "4").addParam("point_location", point_location).addParam("product_area", product_area).process().uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(in_jo)) {
|
||||
donw_num--;
|
||||
}
|
||||
// JSONObject in_jo = WQL.getWO("QAUTO_QUERY").addParam("flag", "4").addParam("point_location", point_location).addParam("product_area", product_area).process().uniqueResult(0);
|
||||
// if (ObjectUtil.isNotEmpty(in_jo)) {
|
||||
// donw_num--;
|
||||
// }
|
||||
|
||||
//减去入库任务数量
|
||||
// JSONArray in_task = WQL.getWO("QAUTO_QUERY").addParam("flag", "5").addParam("point_location", point_location).addParam("product_area", product_area).process().getResultJSONArray(0);
|
||||
|
||||
Reference in New Issue
Block a user