提交 3912b6c0 编写于 作者: O o2null

spotBug修正

上级 ba70570e
......@@ -14,7 +14,7 @@ public class ProcessPlatformExecutorFactory {
private static ExecutorService[] executors;
public static synchronized ExecutorService get(String seed) throws Exception {
public static synchronized ExecutorService get(final String seed) throws Exception {
if (null == executors) {
executors = Config.resource_node_processPlatformExecutors();
}
......
......@@ -38,9 +38,11 @@ class ActionUpdatePrevTaskIdentity extends BaseAction {
bag.wi.getTaskList());
if (os.isEmpty()) {
Wo wo = new Wo();
ActionResult<Wo> result = new ActionResult<Wo>();
ActionResult<Wo> result = new ActionResult<>();
result.setData(wo);
return result;
} else {
bag.job = os.get(0).getJob();
}
}
......
......@@ -7,6 +7,7 @@ import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
import com.x.base.core.entity.JpaObject;
import com.x.base.core.entity.annotation.CheckPersistType;
import com.x.base.core.project.annotation.ActionLogger;
import com.x.base.core.project.executor.ProcessPlatformExecutorFactory;
......@@ -31,12 +32,14 @@ class ActionUpdateNextTaskIdentity extends BaseAction {
try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
List<TaskCompleted> os = emc.fetchIn(TaskCompleted.class, ListTools.toList(TaskCompleted.job_FIELDNAME),
TaskCompleted.id_FIELDNAME, bag.wi.getTaskCompletedList());
JpaObject.id_FIELDNAME, bag.wi.getTaskCompletedList());
if (os.isEmpty()) {
Wo wo = new Wo();
ActionResult<Wo> result = new ActionResult<Wo>();
ActionResult<Wo> result = new ActionResult<>();
result.setData(wo);
return result;
} else {
bag.job = os.get(0).getJob();
}
}
......@@ -44,7 +47,7 @@ class ActionUpdateNextTaskIdentity extends BaseAction {
public ActionResult<Wo> call() throws Exception {
Wo wo = new Wo();
try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
List<TaskCompleted> os = emc.listIn(TaskCompleted.class, TaskCompleted.id_FIELDNAME,
List<TaskCompleted> os = emc.listIn(TaskCompleted.class, JpaObject.id_FIELDNAME,
bag.wi.getTaskCompletedList());
emc.beginTransaction(TaskCompleted.class);
for (TaskCompleted o : os) {
......
......@@ -20,6 +20,7 @@ import com.x.processplatform.core.entity.content.TaskCompleted;
import com.x.processplatform.core.entity.content.Work;
import com.x.processplatform.service.processing.Business;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
/**
......@@ -60,7 +61,7 @@ class ActionDeleteDraft extends BaseAction {
workId = work.getId();
workTitle = work.getTitle();
workSequence = work.getSequence();
if (work.getWorkThroughManual() == false) {
if (BooleanUtils.isFalse(work.getWorkThroughManual())) {
if (StringUtils.equals(work.getWorkCreateType(), Work.WORKCREATETYPE_SURFACE)) {
if (emc.countEqual(TaskCompleted.class, TaskCompleted.job_FIELDNAME,
work.getJob()) == 0) {
......@@ -83,14 +84,9 @@ class ActionDeleteDraft extends BaseAction {
} catch (Exception e) {
logger.error(e);
}
// if (delete && (null != work)) {
// ThisApplication.context().applications().deleteQuery(x_processplatform_service_processing.class,
// Applications.joinQueryUri("work", work.getId()),
// work.getJob()).getData(WoId.class);
// logger.print("删除长期处于草稿状态的工作, id:{}, title:{}, sequence:{}", workId,
// workTitle, workSequence);
// }
wo.setId(work.getId());
if (null != work) {
wo.setId(work.getId());
}
result.setData(wo);
return result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册