|
@ -21,7 +21,7 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
@Component |
|
|
@Component |
|
|
public class SZCallMaterialTask extends AbstractAcsTask { |
|
|
public class SZCallMaterialTask extends AbstractAcsTask { |
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void autoCreate() { |
|
|
public void autoCreate() { |
|
|
JSONArray points = WQL.getWO("CALL_MATERIAL_TASK").addParam("flag", "2").process().getResultJSONArray(0); |
|
|
JSONArray points = WQL.getWO("CALL_MATERIAL_TASK").addParam("flag", "2").process().getResultJSONArray(0); |
|
@ -39,7 +39,7 @@ public class SZCallMaterialTask extends AbstractAcsTask { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
@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)) { |
|
@ -53,7 +53,7 @@ public class SZCallMaterialTask extends AbstractAcsTask { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public String createTask(JSONObject form) { |
|
|
public String createTask(JSONObject form) { |
|
|
JSONObject point = form.getJSONObject("point"); |
|
|
JSONObject point = form.getJSONObject("point"); |
|
@ -83,7 +83,7 @@ public class SZCallMaterialTask extends AbstractAcsTask { |
|
|
return task.getString("task_id"); |
|
|
return task.getString("task_id"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void findStartPoint() { |
|
|
public void findStartPoint() { |
|
|
WQLObject task_table = WQLObject.getWQLObject("sch_base_task"); |
|
|
WQLObject task_table = WQLObject.getWQLObject("sch_base_task"); |
|
@ -117,7 +117,7 @@ public class SZCallMaterialTask extends AbstractAcsTask { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
@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); |
|
@ -127,7 +127,7 @@ public class SZCallMaterialTask extends AbstractAcsTask { |
|
|
this.finishTask(task, OperationType.MANUAL); |
|
|
this.finishTask(task, OperationType.MANUAL); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void cancel(String task_id) { |
|
|
public void cancel(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); |
|
@ -137,7 +137,7 @@ public class SZCallMaterialTask extends AbstractAcsTask { |
|
|
this.cancelTask(task, OperationType.MANUAL); |
|
|
this.cancelTask(task, OperationType.MANUAL); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
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()); |
|
@ -175,7 +175,7 @@ public class SZCallMaterialTask extends AbstractAcsTask { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
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()); |
|
|