Commit 9ab9d937 by 焦凯

提交审批注册代码

parent 43f8561d
...@@ -68,6 +68,7 @@ public class ContractConfiguration { ...@@ -68,6 +68,7 @@ public class ContractConfiguration {
TriggerCondition triggerCondition = new TriggerCondition(); TriggerCondition triggerCondition = new TriggerCondition();
List<TriggerAction> triggerActions = new ArrayList<>(); List<TriggerAction> triggerActions = new ArrayList<>();
triggerActions.add(new TriggerAction("SUBMIT","提交")); triggerActions.add(new TriggerAction("SUBMIT","提交"));
triggerActions.add(new TriggerAction("CHANGE","变更"));
triggerCondition.setTriggerActions(triggerActions); triggerCondition.setTriggerActions(triggerActions);
configuration.setTriggerCondition(triggerCondition); configuration.setTriggerCondition(triggerCondition);
//3.配置流程监听器 //3.配置流程监听器
......
...@@ -117,7 +117,7 @@ public class ContractServiceImpl implements ContractService { ...@@ -117,7 +117,7 @@ public class ContractServiceImpl implements ContractService {
@Override @Override
public void submitFlowForInsert(UUID id) { public void submitFlowForInsert(UUID id) {
KObject kobject = contractDao.load(id); KObject kobject = contractDao.load(id);
if (needSubmitFlow(ContractConstant.BIZ_TYPE,kobject)) { if (needSubmitFlow(ContractConstant.BIZ_TYPE,kobject,"SUBMIT")) {
inzWorkflowService.startWorkflow("SUBMIT", ContractConstant.BIZ_TYPE, kobject.getString(ContractConstant.CONTRACT_NAME),kobject); inzWorkflowService.startWorkflow("SUBMIT", ContractConstant.BIZ_TYPE, kobject.getString(ContractConstant.CONTRACT_NAME),kobject);
}else{ }else{
afterApprovedForInsert(kobject); afterApprovedForInsert(kobject);
...@@ -128,7 +128,7 @@ public class ContractServiceImpl implements ContractService { ...@@ -128,7 +128,7 @@ public class ContractServiceImpl implements ContractService {
@Transactional @Transactional
public void submitFlowForUpdate(UUID id) { public void submitFlowForUpdate(UUID id) {
KObject kobject = contractDao.load(id); KObject kobject = contractDao.load(id);
if (needSubmitFlow(ContractConstant.BIZ_TYPE_UPDATE,kobject)) { if (needSubmitFlow(ContractConstant.BIZ_TYPE,kobject,"CHANGE")) {
inzWorkflowService.startWorkflow("SUBMIT", ContractConstant.BIZ_TYPE_UPDATE, kobject.getString(ContractConstant.CONTRACT_NAME),kobject); inzWorkflowService.startWorkflow("SUBMIT", ContractConstant.BIZ_TYPE_UPDATE, kobject.getString(ContractConstant.CONTRACT_NAME),kobject);
}else{ }else{
afterApprovedForUpdate(kobject); afterApprovedForUpdate(kobject);
...@@ -142,8 +142,8 @@ public class ContractServiceImpl implements ContractService { ...@@ -142,8 +142,8 @@ public class ContractServiceImpl implements ContractService {
* @param data * @param data
* @return * @return
*/ */
private boolean needSubmitFlow(String bizTypeName ,KObject data) { private boolean needSubmitFlow(String bizTypeName ,KObject data ,String operationName) {
return inzWorkflowService.canStartWotkflow("SUBMIT", bizTypeName, data); return inzWorkflowService.canStartWotkflow(operationName, bizTypeName, data);
} }
@Override @Override
......
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