Commit aecd2db3 by chenweisong

更新

parent 1966c1d3
...@@ -72,4 +72,8 @@ public class ActivityService { ...@@ -72,4 +72,8 @@ public class ActivityService {
Pageable pageable = PageRequest.of(pageNo, pageSize); Pageable pageable = PageRequest.of(pageNo, pageSize);
return pageable; return pageable;
} }
public void deleteAll() {
activityDao.deleteAll();
}
} }
...@@ -20,4 +20,8 @@ public class DataInfoService { ...@@ -20,4 +20,8 @@ public class DataInfoService {
public DataInfo findByProcessProcessIdAndTemplateId(String processId, long templateId) { public DataInfo findByProcessProcessIdAndTemplateId(String processId, long templateId) {
return dataInfoDao.findByProcessProcessIdAndTemplateId(processId, templateId); return dataInfoDao.findByProcessProcessIdAndTemplateId(processId, templateId);
} }
public void deleteAll() {
dataInfoDao.deleteAll();
}
} }
...@@ -57,4 +57,8 @@ public class ProcessService { ...@@ -57,4 +57,8 @@ public class ProcessService {
Pageable pageable = PageRequest.of(pageNo, pageSize); Pageable pageable = PageRequest.of(pageNo, pageSize);
return pageable; return pageable;
} }
public void deleteAll() {
processDao.deleteAll();
}
} }
...@@ -21,4 +21,8 @@ public class TemplateService { ...@@ -21,4 +21,8 @@ public class TemplateService {
return template; return template;
} }
public void deleteAll() {
templateDao.deleteAll();
}
} }
package com.keymobile; package com.keymobile;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.keymobile.rest.model.DataInfo;
import com.keymobile.rest.model.Template;
import com.keymobile.rest.service.ActivityService; import com.keymobile.rest.service.ActivityService;
import com.keymobile.rest.service.DataInfoService;
import com.keymobile.rest.service.ProcessService;
import com.keymobile.rest.service.TemplateService;
import org.activiti.engine.*; import org.activiti.engine.*;
import org.activiti.engine.history.HistoricProcessInstance; import org.activiti.engine.history.HistoricProcessInstance;
import org.activiti.engine.history.HistoricProcessInstanceQuery; import org.activiti.engine.history.HistoricProcessInstanceQuery;
...@@ -27,6 +32,12 @@ import java.util.Map; ...@@ -27,6 +32,12 @@ import java.util.Map;
public class ProcessTest { public class ProcessTest {
@Resource @Resource
private TemplateService templateService;
@Resource
private DataInfoService dataInfoService;
@Resource
private ProcessService porS;
@Resource
private ActivityService activityService; private ActivityService activityService;
@Resource @Resource
private RepositoryService repositoryService; private RepositoryService repositoryService;
...@@ -40,7 +51,7 @@ public class ProcessTest { ...@@ -40,7 +51,7 @@ public class ProcessTest {
// @Value("${app.active-process}") // @Value("${app.active-process}")
private String process = "SubProcessStandard.bpmn"; private String process = "SubProcessStandard.bpmn";
// @Test // @Test
public void createActivitiTask() { public void createActivitiTask() {
// 加载的我们创建好的demo.bpmn 文件还有png文件 // 加载的我们创建好的demo.bpmn 文件还有png文件
// 获取流的引擎 // 获取流的引擎
...@@ -169,7 +180,7 @@ public class ProcessTest { ...@@ -169,7 +180,7 @@ public class ProcessTest {
} }
@Test // @Test
public void zhuguan() { public void zhuguan() {
// try { // try {
...@@ -230,7 +241,7 @@ public class ProcessTest { ...@@ -230,7 +241,7 @@ public class ProcessTest {
// } // }
} }
// @Test @Test
public void asdsa() { public void asdsa() {
try { try {
// taskService.complete( "28", ImmutableMap.of("needDataAudit", false, "needConfirm", false, "NeedDataBack", false)); // taskService.complete( "28", ImmutableMap.of("needDataAudit", false, "needConfirm", false, "NeedDataBack", false));
...@@ -240,12 +251,16 @@ public class ProcessTest { ...@@ -240,12 +251,16 @@ public class ProcessTest {
// taskService.complete("295003", ImmutableMap.of( "NeedDataAudit", false, "NeedConfirm", false)); // taskService.complete("295003", ImmutableMap.of( "NeedDataAudit", false, "NeedConfirm", false));
// taskService.complete("340009", ImmutableMap.of("Confirm", true));
taskService.complete("340009", ImmutableMap.of("Confirm", true));
// taskService.complete("337525", ImmutableMap.of("NeedDataAudit", false)); // taskService.complete("337525", ImmutableMap.of("NeedDataAudit", false));
// taskService.complete("337532", ImmutableMap.of("NeedDataAudit", false, "NeedConfirm", true, "manager", "abcaisdas")); // taskService.complete("337532", ImmutableMap.of("NeedDataAudit", false, "NeedConfirm", true, "manager", "abcaisdas"));
dataInfoService.deleteAll();
templateService.deleteAll();
porS.deleteAll();
activityService.deleteAll();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment