|
|
@ -21,7 +21,7 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
@Component |
|
|
|
public class SZCallMaterialTask extends AbstractAcsTask { |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
|
|
@Override |
|
|
|
public void autoCreate() { |
|
|
|
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 |
|
|
|
public void updateTaskStatus(JSONObject task, String status) { |
|
|
|
if (TaskStatus.EXECUTING.value().equals(status)) { |
|
|
@ -53,7 +53,7 @@ public class SZCallMaterialTask extends AbstractAcsTask { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
|
|
@Override |
|
|
|
public String createTask(JSONObject form) { |
|
|
|
JSONObject point = form.getJSONObject("point"); |
|
|
@ -83,7 +83,7 @@ public class SZCallMaterialTask extends AbstractAcsTask { |
|
|
|
return task.getString("task_id"); |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
|
|
@Override |
|
|
|
public void findStartPoint() { |
|
|
|
WQLObject task_table = WQLObject.getWQLObject("sch_base_task"); |
|
|
@ -117,7 +117,7 @@ public class SZCallMaterialTask extends AbstractAcsTask { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
|
|
@Override |
|
|
|
public void forceFinish(String task_id) { |
|
|
|
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); |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
|
|
@Override |
|
|
|
public void cancel(String task_id) { |
|
|
|
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); |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
|
|
public void cancelTask(JSONObject task, OperationType operation_type) { |
|
|
|
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.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) { |
|
|
|
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { |
|
|
|
task.put("task_status", TaskStatus.FINISHED.value()); |
|
|
|