|
|
@@ -1,5 +1,8 @@
|
|
|
package com.x.processplatform.assemble.surface.jaxrs.work;
|
|
|
|
|
|
+import com.x.base.core.project.logger.Audit;
|
|
|
+import com.x.base.core.project.logger.Logger;
|
|
|
+import com.x.base.core.project.logger.LoggerFactory;
|
|
|
import org.apache.commons.lang3.BooleanUtils;
|
|
|
|
|
|
import com.x.base.core.container.EntityManagerContainer;
|
|
|
@@ -13,10 +16,14 @@ import com.x.processplatform.assemble.surface.Business;
|
|
|
import com.x.processplatform.assemble.surface.ThisApplication;
|
|
|
import com.x.processplatform.assemble.surface.WorkControl;
|
|
|
import com.x.processplatform.core.entity.content.Work;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
class ActionDelete extends BaseAction {
|
|
|
|
|
|
+ private static Logger logger = LoggerFactory.getLogger(ActionDelete.class);
|
|
|
+
|
|
|
ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {
|
|
|
+ Audit audit = logger.audit(effectivePerson);
|
|
|
ActionResult<Wo> result = new ActionResult<>();
|
|
|
Work work = null;
|
|
|
try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
|
|
|
@@ -33,6 +40,9 @@ class ActionDelete extends BaseAction {
|
|
|
}
|
|
|
Wo wo = ThisApplication.context().applications().deleteQuery(x_processplatform_service_processing.class,
|
|
|
Applications.joinQueryUri("work", work.getId()), work.getJob()).getData(Wo.class);
|
|
|
+ if(wo!=null && StringUtils.isNotEmpty(wo.getId())){
|
|
|
+ audit.log(null, "废弃工单");
|
|
|
+ }
|
|
|
result.setData(wo);
|
|
|
return result;
|
|
|
}
|