rev:纸管出库逻辑优化
This commit is contained in:
@@ -1228,6 +1228,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
if ("2".equals(plan_type)) {
|
if ("2".equals(plan_type)) {
|
||||||
JSONObject plan_task = WQLObject.getWQLObject("sch_base_task").query("task_code = '" + plan_jo.getString("start_code") + "'").uniqueResult(0);
|
JSONObject plan_task = WQLObject.getWQLObject("sch_base_task").query("task_code = '" + plan_jo.getString("start_code") + "'").uniqueResult(0);
|
||||||
plan_task.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
|
plan_task.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
|
||||||
|
WQLObject.getWQLObject("sch_base_task").update(plan_task);
|
||||||
paperTrussTask.immediateNotifyAcs(null);
|
paperTrussTask.immediateNotifyAcs(null);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class AutoCallEmptyVehicle {
|
|||||||
|
|
||||||
if (plan_rows.size() >= 2) {
|
if (plan_rows.size() >= 2) {
|
||||||
donw_num += 2;
|
donw_num += 2;
|
||||||
} else {
|
} else if (plan_rows.size() == 1){
|
||||||
donw_num += 1;
|
donw_num += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -143,13 +143,14 @@ public class AutoCallEmptyVehicle {
|
|||||||
case 2:
|
case 2:
|
||||||
container_jo1 = rows.getJSONObject(0);
|
container_jo1 = rows.getJSONObject(0);
|
||||||
container_jo2 = rows.getJSONObject(1);
|
container_jo2 = rows.getJSONObject(1);
|
||||||
paper_code1 = getMaterial(container_jo1.getString("paper_tube_material"), container_jo1.getString("FRP_material"));
|
paper_code1 = getMaterial(container_jo1.getString("paper_tube_material"), container_jo1.getString("frp_material"));
|
||||||
paper_code2 = getMaterial(container_jo2.getString("paper_tube_material"), container_jo2.getString("FRP_material"));
|
paper_code2 = getMaterial(container_jo2.getString("paper_tube_material"), container_jo2.getString("frp_material"));
|
||||||
paper_jo.put("paper_code", paper_code1);
|
paper_jo.put("paper_code", paper_code1);
|
||||||
paper_jo.put("num", 1);
|
paper_jo.put("num", 1);
|
||||||
paper_jo.put("pcsn", container_jo1.getString("container_name"));
|
paper_jo.put("pcsn", container_jo1.getString("container_name"));
|
||||||
paper_rows.add(paper_jo);
|
paper_rows.add(paper_jo);
|
||||||
this.getPaperStruct(paper_rows, product_area);
|
this.getPaperStruct(paper_rows, product_area);
|
||||||
|
paper_rows = new JSONArray();
|
||||||
paper_jo.put("paper_code", paper_code2);
|
paper_jo.put("paper_code", paper_code2);
|
||||||
paper_jo.put("pcsn", container_jo2.getString("container_name"));
|
paper_jo.put("pcsn", container_jo2.getString("container_name"));
|
||||||
paper_jo.put("num", 1);
|
paper_jo.put("num", 1);
|
||||||
@@ -160,8 +161,8 @@ public class AutoCallEmptyVehicle {
|
|||||||
container_jo1 = rows.getJSONObject(0);
|
container_jo1 = rows.getJSONObject(0);
|
||||||
container_jo2 = rows.getJSONObject(1);
|
container_jo2 = rows.getJSONObject(1);
|
||||||
container_jo3 = rows.getJSONObject(2);
|
container_jo3 = rows.getJSONObject(2);
|
||||||
paper_code1 = getMaterial(container_jo1.getString("paper_tube_material"), container_jo1.getString("FRP_material"));
|
paper_code1 = getMaterial(container_jo1.getString("paper_tube_material"), container_jo1.getString("frp_material"));
|
||||||
paper_code2 = getMaterial(container_jo2.getString("paper_tube_material"), container_jo2.getString("FRP_material"));
|
paper_code2 = getMaterial(container_jo2.getString("paper_tube_material"), container_jo2.getString("frp_material"));
|
||||||
if (paper_code2.equals(paper_code1)) {
|
if (paper_code2.equals(paper_code1)) {
|
||||||
paper_jo.put("paper_code", paper_code1);
|
paper_jo.put("paper_code", paper_code1);
|
||||||
paper_jo.put("num", 2);
|
paper_jo.put("num", 2);
|
||||||
@@ -179,7 +180,8 @@ public class AutoCallEmptyVehicle {
|
|||||||
paper_rows.add(paper_jo);
|
paper_rows.add(paper_jo);
|
||||||
this.getPaperStruct(paper_rows, product_area);
|
this.getPaperStruct(paper_rows, product_area);
|
||||||
}
|
}
|
||||||
paper_code1 = getMaterial(container_jo3.getString("paper_tube_material"), container_jo3.getString("FRP_material"));
|
paper_rows = new JSONArray();
|
||||||
|
paper_code1 = getMaterial(container_jo3.getString("paper_tube_material"), container_jo3.getString("frp_material"));
|
||||||
paper_jo.put("paper_code", paper_code1);
|
paper_jo.put("paper_code", paper_code1);
|
||||||
paper_jo.put("num", 1);
|
paper_jo.put("num", 1);
|
||||||
paper_jo.put("pcsn", container_jo3.getString("container_name"));
|
paper_jo.put("pcsn", container_jo3.getString("container_name"));
|
||||||
@@ -191,8 +193,8 @@ public class AutoCallEmptyVehicle {
|
|||||||
container_jo2 = rows.getJSONObject(1);
|
container_jo2 = rows.getJSONObject(1);
|
||||||
container_jo3 = rows.getJSONObject(2);
|
container_jo3 = rows.getJSONObject(2);
|
||||||
container_jo4 = rows.getJSONObject(3);
|
container_jo4 = rows.getJSONObject(3);
|
||||||
paper_code1 = getMaterial(container_jo1.getString("paper_tube_material"), container_jo1.getString("FRP_material"));
|
paper_code1 = getMaterial(container_jo1.getString("paper_tube_material"), container_jo1.getString("frp_material"));
|
||||||
paper_code2 = getMaterial(container_jo2.getString("paper_tube_material"), container_jo2.getString("FRP_material"));
|
paper_code2 = getMaterial(container_jo2.getString("paper_tube_material"), container_jo2.getString("frp_material"));
|
||||||
if (paper_code2.equals(paper_code1)) {
|
if (paper_code2.equals(paper_code1)) {
|
||||||
paper_jo.put("paper_code", paper_code1);
|
paper_jo.put("paper_code", paper_code1);
|
||||||
paper_jo.put("num", 2);
|
paper_jo.put("num", 2);
|
||||||
@@ -210,8 +212,9 @@ public class AutoCallEmptyVehicle {
|
|||||||
paper_jo.put("pcsn", container_jo2.getString("container_name"));
|
paper_jo.put("pcsn", container_jo2.getString("container_name"));
|
||||||
this.getPaperStruct(paper_rows, product_area);
|
this.getPaperStruct(paper_rows, product_area);
|
||||||
}
|
}
|
||||||
paper_code1 = getMaterial(container_jo3.getString("paper_tube_material"), container_jo3.getString("FRP_material"));
|
paper_rows = new JSONArray();
|
||||||
paper_code2 = getMaterial(container_jo4.getString("paper_tube_material"), container_jo4.getString("FRP_material"));
|
paper_code1 = getMaterial(container_jo3.getString("paper_tube_material"), container_jo3.getString("frp_material"));
|
||||||
|
paper_code2 = getMaterial(container_jo4.getString("paper_tube_material"), container_jo4.getString("frp_material"));
|
||||||
if (paper_code2.equals(paper_code1)) {
|
if (paper_code2.equals(paper_code1)) {
|
||||||
paper_jo.put("paper_code", paper_code1);
|
paper_jo.put("paper_code", paper_code1);
|
||||||
paper_jo.put("num", 2);
|
paper_jo.put("num", 2);
|
||||||
|
|||||||
@@ -210,6 +210,7 @@ public class PaperTubeTask extends AbstractAcsTask {
|
|||||||
json.put("product_area", form.getString("product_area"));
|
json.put("product_area", form.getString("product_area"));
|
||||||
json.put("priority", "1");
|
json.put("priority", "1");
|
||||||
json.put("acs_task_type", "10");
|
json.put("acs_task_type", "10");
|
||||||
|
json.put("material_code", form.getString("material_code"));
|
||||||
json.put("response_param", form.getString("paper_array"));
|
json.put("response_param", form.getString("paper_array"));
|
||||||
json.put("request_param", form.getString("request_param"));
|
json.put("request_param", form.getString("request_param"));
|
||||||
WQLObject.getWQLObject("SCH_BASE_Task").insert(json);
|
WQLObject.getWQLObject("SCH_BASE_Task").insert(json);
|
||||||
|
|||||||
@@ -70,12 +70,12 @@ public class RecutPlanServiceImpl implements RecutPlanService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void deleteAll(Long[] ids) {
|
public void deleteAll(Long[] ids) {
|
||||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_ProductScrapMst");
|
WQLObject wo_mst = WQLObject.getWQLObject("st_ivt_productplanmst");
|
||||||
|
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
jsonObject.put("is_delete", "1");
|
jsonObject.put("is_delete", "1");
|
||||||
for (Long scrap_id : ids) {
|
for (Long plan_id : ids) {
|
||||||
wo_mst.update(jsonObject, "scrap_id = '" + scrap_id + "'");
|
wo_mst.update(jsonObject, "plan_id = '" + plan_id + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user