|
@ -12,7 +12,6 @@ import org.nl.wms.basedata.eum.VehicleType; |
|
|
import org.nl.wms.sch.manage.*; |
|
|
import org.nl.wms.sch.manage.*; |
|
|
import org.nl.wms.sch.task.util.TaskUtils; |
|
|
import org.nl.wms.sch.task.util.TaskUtils; |
|
|
import org.springframework.stereotype.Component; |
|
|
import org.springframework.stereotype.Component; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 辽宁晟华压制 叫空 任务类 |
|
|
* 辽宁晟华压制 叫空 任务类 |
|
@ -24,7 +23,6 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
@Component |
|
|
@Component |
|
|
public class YZCallEmptyTask extends AbstractAcsTask { |
|
|
public class YZCallEmptyTask extends AbstractAcsTask { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void updateTaskStatus(JSONObject task, String status) { |
|
|
public void updateTaskStatus(JSONObject task, String status) { |
|
|
if (TaskStatus.EXECUTING.value().equals(status)) { |
|
|
if (TaskStatus.EXECUTING.value().equals(status)) { |
|
@ -38,7 +36,6 @@ public class YZCallEmptyTask extends AbstractAcsTask { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public String createTask(JSONObject form) { |
|
|
public String createTask(JSONObject form) { |
|
|
JSONObject point = form.getJSONObject("point"); |
|
|
JSONObject point = form.getJSONObject("point"); |
|
@ -68,12 +65,12 @@ public class YZCallEmptyTask extends AbstractAcsTask { |
|
|
|
|
|
|
|
|
point.put("lock_type", LockType.TASK_LOCKED.value()); |
|
|
point.put("lock_type", LockType.TASK_LOCKED.value()); |
|
|
point.put("task_code", task.getString("task_code")); |
|
|
point.put("task_code", task.getString("task_code")); |
|
|
|
|
|
TaskUtils.addFormUpdateColum(point, form); |
|
|
WQLObject.getWQLObject("sch_base_point").update(point); |
|
|
WQLObject.getWQLObject("sch_base_point").update(point); |
|
|
|
|
|
|
|
|
return task.getString("task_code"); |
|
|
return task.getString("task_code"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void findStartPoint() { |
|
|
public void findStartPoint() { |
|
|
WQLObject task_table = WQLObject.getWQLObject("sch_base_task"); |
|
|
WQLObject task_table = WQLObject.getWQLObject("sch_base_task"); |
|
@ -103,16 +100,17 @@ public class YZCallEmptyTask extends AbstractAcsTask { |
|
|
task.put("point_code1", point.getString("point_code")); |
|
|
task.put("point_code1", point.getString("point_code")); |
|
|
task.put("vehicle_code", TaskUtils.formatVehicleCode(point.getString("vehicle_code"))); |
|
|
task.put("vehicle_code", TaskUtils.formatVehicleCode(point.getString("vehicle_code"))); |
|
|
task.put("remark", ""); |
|
|
task.put("remark", ""); |
|
|
|
|
|
TaskUtils.addAutoUpdateColum(task); |
|
|
task_table.update(task); |
|
|
task_table.update(task); |
|
|
|
|
|
|
|
|
point.put("lock_type", LockType.TASK_LOCKED.value()); |
|
|
point.put("lock_type", LockType.TASK_LOCKED.value()); |
|
|
point.put("task_code", task.getString("task_code")); |
|
|
point.put("task_code", task.getString("task_code")); |
|
|
|
|
|
TaskUtils.addAutoUpdateColum(point); |
|
|
point_table.update(point); |
|
|
point_table.update(point); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void forceFinish(String task_id) { |
|
|
public void forceFinish(String task_id) { |
|
|
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); |
|
|
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); |
|
@ -132,7 +130,6 @@ public class YZCallEmptyTask extends AbstractAcsTask { |
|
|
this.cancelTask(task, OperationType.MANUAL); |
|
|
this.cancelTask(task, OperationType.MANUAL); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void cancelTask(JSONObject task, OperationType operation_type) { |
|
|
public void cancelTask(JSONObject task, OperationType operation_type) { |
|
|
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { |
|
|
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { |
|
|
task.put("task_status", TaskStatus.CANCELLED.value()); |
|
|
task.put("task_status", TaskStatus.CANCELLED.value()); |
|
@ -170,7 +167,6 @@ public class YZCallEmptyTask extends AbstractAcsTask { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void finishTask(JSONObject task, OperationType operation_type) { |
|
|
public void finishTask(JSONObject task, OperationType operation_type) { |
|
|
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { |
|
|
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { |
|
|
task.put("task_status", TaskStatus.FINISHED.value()); |
|
|
task.put("task_status", TaskStatus.FINISHED.value()); |
|
@ -190,13 +186,19 @@ public class YZCallEmptyTask extends AbstractAcsTask { |
|
|
point1.put("vehicle_type", ""); |
|
|
point1.put("vehicle_type", ""); |
|
|
point1.put("vehicle_code", ""); |
|
|
point1.put("vehicle_code", ""); |
|
|
point1.put("point_status", PointStatus.EMPTY.value()); |
|
|
point1.put("point_status", PointStatus.EMPTY.value()); |
|
|
|
|
|
if (operation_type == OperationType.AUTO) { |
|
|
|
|
|
TaskUtils.addACSUpdateColum(point1); |
|
|
|
|
|
} else if (operation_type == OperationType.MANUAL) { |
|
|
TaskUtils.addCurrentUpdateColum(point1); |
|
|
TaskUtils.addCurrentUpdateColum(point1); |
|
|
|
|
|
} |
|
|
point_table.update(point1); |
|
|
point_table.update(point1); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
JSONObject point2 = new JSONObject(); |
|
|
JSONObject point2 = new JSONObject(); |
|
|
point2.put("lock_type", LockType.UNLOCKED.value()); |
|
|
point2.put("lock_type", LockType.UNLOCKED.value()); |
|
|
point2.put("task_code", ""); |
|
|
point2.put("task_code", ""); |
|
|
|
|
|
point2.put("vehicle_type", task.getString("vehicle_type")); |
|
|
|
|
|
point2.put("vehicle_code", task.getString("vehicle_code")); |
|
|
point2.put("point_status", PointStatus.NOT_EMPTY.value()); |
|
|
point2.put("point_status", PointStatus.NOT_EMPTY.value()); |
|
|
if (operation_type == OperationType.AUTO) { |
|
|
if (operation_type == OperationType.AUTO) { |
|
|
TaskUtils.addACSUpdateColum(point2); |
|
|
TaskUtils.addACSUpdateColum(point2); |
|
|