Commit 9ab9d937 by 焦凯

提交审批注册代码

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