Commit e20f6297 authored by 1650842865's avatar 1650842865

审批中修改状态

parent 686ae70d
...@@ -110,9 +110,7 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF ...@@ -110,9 +110,7 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
}
if (this.isApprovalProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()){ if (this.isApprovalProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()){
TaskExtension te = actApplication.loadRuntimeTaskExtension(delegateTask.getId()); TaskExtension te = actApplication.loadRuntimeTaskExtension(delegateTask.getId());
cn.hutool.core.lang.Assert.notNull(te, String.format("未查询到流程任务【%s】的扩展信息", delegateTask.getId())); cn.hutool.core.lang.Assert.notNull(te, String.format("未查询到流程任务【%s】的扩展信息", delegateTask.getId()));
......
...@@ -100,10 +100,8 @@ public class EpSaleOrderApplicationImpl extends FlowBroker implements EpSaleOrde ...@@ -100,10 +100,8 @@ public class EpSaleOrderApplicationImpl extends FlowBroker implements EpSaleOrde
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
} }
}
/** /**
* 回收事件 * 回收事件
......
...@@ -107,10 +107,8 @@ public class EpSaleOrderCancelApplicationImpl extends FlowBroker implements EpSa ...@@ -107,10 +107,8 @@ public class EpSaleOrderCancelApplicationImpl extends FlowBroker implements EpSa
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
} }
}
/** /**
* 回收事件 * 回收事件
......
...@@ -101,9 +101,7 @@ public class ProduceExceptionApplicationImpl extends FlowBroker implements Produ ...@@ -101,9 +101,7 @@ public class ProduceExceptionApplicationImpl extends FlowBroker implements Produ
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
ProduceException produceException = this.produceExceptionRepository.findOne(bizId); ProduceException produceException = this.produceExceptionRepository.findOne(bizId);
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
}
if (this.isApprovalProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()){ if (this.isApprovalProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()){
TaskExtension te = actApplication.loadRuntimeTaskExtension(delegateTask.getId()); TaskExtension te = actApplication.loadRuntimeTaskExtension(delegateTask.getId());
cn.hutool.core.lang.Assert.notNull(te, String.format("未查询到流程任务【%s】的扩展信息", delegateTask.getId())); cn.hutool.core.lang.Assert.notNull(te, String.format("未查询到流程任务【%s】的扩展信息", delegateTask.getId()));
......
...@@ -110,9 +110,7 @@ public class UnqualifiedMaterialsApplicationImpl extends FlowBroker implements U ...@@ -110,9 +110,7 @@ public class UnqualifiedMaterialsApplicationImpl extends FlowBroker implements U
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
UnqualifiedMaterials unqualifiedMaterials = this.unqualifiedMaterialsRepository.findOne(bizId); UnqualifiedMaterials unqualifiedMaterials = this.unqualifiedMaterialsRepository.findOne(bizId);
String result = DictUtil.getDictionaryDetailText("result", unqualifiedMaterials.getResult()); String result = DictUtil.getDictionaryDetailText("result", unqualifiedMaterials.getResult());
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
}
if (this.isApprovalProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()){ if (this.isApprovalProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()){
TaskExtension te = actApplication.loadRuntimeTaskExtension(delegateTask.getId()); TaskExtension te = actApplication.loadRuntimeTaskExtension(delegateTask.getId());
cn.hutool.core.lang.Assert.notNull(te, String.format("未查询到流程任务【%s】的扩展信息", delegateTask.getId())); cn.hutool.core.lang.Assert.notNull(te, String.format("未查询到流程任务【%s】的扩展信息", delegateTask.getId()));
......
...@@ -93,12 +93,10 @@ public class ComponentSupplyApplicationImpl extends FlowBroker implements Compon ...@@ -93,12 +93,10 @@ public class ComponentSupplyApplicationImpl extends FlowBroker implements Compon
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
ComponentSupply componentSupply = componentSupplyRepository.findOne(bizId); ComponentSupply componentSupply = componentSupplyRepository.findOne(bizId);
componentSupply.setStatusId(BizBillStatus.APPROVING.getId()); componentSupply.setStatusId(BizBillStatus.APPROVING.getId());
componentSupplyRepository.save(componentSupply); componentSupplyRepository.save(componentSupply);
} }
}
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
......
...@@ -257,10 +257,8 @@ public class CostCenterApplicationImpl extends FlowBroker implements CostCenterA ...@@ -257,10 +257,8 @@ public class CostCenterApplicationImpl extends FlowBroker implements CostCenterA
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
} }
}
/** /**
* 回收事件 * 回收事件
......
...@@ -142,9 +142,7 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S ...@@ -142,9 +142,7 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
}
if (this.isApprovalProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) { if (this.isApprovalProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
TaskExtension te = actApplication.loadRuntimeTaskExtension(delegateTask.getId()); TaskExtension te = actApplication.loadRuntimeTaskExtension(delegateTask.getId());
cn.hutool.core.lang.Assert.notNull(te, String.format("未查询到流程任务【%s】的扩展信息", delegateTask.getId())); cn.hutool.core.lang.Assert.notNull(te, String.format("未查询到流程任务【%s】的扩展信息", delegateTask.getId()));
...@@ -332,6 +330,7 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S ...@@ -332,6 +330,7 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
for (SapCostReimbursementDetail sapCostReimbursementDetail : detailList) { for (SapCostReimbursementDetail sapCostReimbursementDetail : detailList) {
sapCostReimbursementDetail.setBelnr1(paymentReceiptVo.getBelnr1()); sapCostReimbursementDetail.setBelnr1(paymentReceiptVo.getBelnr1());
sapCostReimbursementDetail.setGjahr1(paymentReceiptVo.getGjahr1()); sapCostReimbursementDetail.setGjahr1(paymentReceiptVo.getGjahr1());
sapCostReimbursementDetail.setZpayStaus("已支付");
costReimbursementDetailRepository.save(sapCostReimbursementDetail); costReimbursementDetailRepository.save(sapCostReimbursementDetail);
} }
// //
......
...@@ -91,10 +91,8 @@ public class CustomerDelayPayApplicationImpl extends FlowBroker implements Custo ...@@ -91,10 +91,8 @@ public class CustomerDelayPayApplicationImpl extends FlowBroker implements Custo
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {// 校验及预算
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
} }
}
@Transactional @Transactional
protected void updateStatus(String bizId, BizBillStatus status) { protected void updateStatus(String bizId, BizBillStatus status) {
......
...@@ -86,12 +86,10 @@ public class SapDullApplicationImpl extends FlowBroker implements SapDullApplica ...@@ -86,12 +86,10 @@ public class SapDullApplicationImpl extends FlowBroker implements SapDullApplica
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
SapDull sapDull = sapDullRepository.findOne(bizId); SapDull sapDull = sapDullRepository.findOne(bizId);
sapDull.setStatusId(BizBillStatus.APPROVING.getId()); sapDull.setStatusId(BizBillStatus.APPROVING.getId());
sapDullRepository.save(sapDull); sapDullRepository.save(sapDull);
} }
}
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
......
...@@ -653,9 +653,7 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except ...@@ -653,9 +653,7 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
}
/* if (this.isApplyProcUnit(delegateTask)) { //申请后的提交 去掉 改在流程中配置有责任部门来实现 /* if (this.isApplyProcUnit(delegateTask)) { //申请后的提交 去掉 改在流程中配置有责任部门来实现
System.out.println("===============提交======================= "); System.out.println("===============提交======================= ");
SDO params = this.getBizAndApprovalData(); SDO params = this.getBizAndApprovalData();
......
...@@ -153,12 +153,10 @@ public class FinaCustomerApplicationImpl extends FlowBroker implements FinaCusto ...@@ -153,12 +153,10 @@ public class FinaCustomerApplicationImpl extends FlowBroker implements FinaCusto
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
FinaCustomerInfo finaCustomer = finaCustomerRepository.findOne(bizId); FinaCustomerInfo finaCustomer = finaCustomerRepository.findOne(bizId);
finaCustomer.setStatusId(BizBillStatus.APPROVING.getId()); finaCustomer.setStatusId(BizBillStatus.APPROVING.getId());
finaCustomerRepository.save(finaCustomer); finaCustomerRepository.save(finaCustomer);
} }
}
//流程已办 //流程已办
@Override @Override
......
...@@ -132,10 +132,8 @@ public class SapFixedAssessApplicationImpl extends FlowBroker implements SapFixe ...@@ -132,10 +132,8 @@ public class SapFixedAssessApplicationImpl extends FlowBroker implements SapFixe
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
} }
}
/** /**
* 回收事件 * 回收事件
......
...@@ -81,12 +81,10 @@ public class NonOrderStorageApplicationImpl extends FlowBroker implements NonOrd ...@@ -81,12 +81,10 @@ public class NonOrderStorageApplicationImpl extends FlowBroker implements NonOrd
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
NonOrderStorage nonOrderStorage = nonOrderStorageRepository.findOne(bizId); NonOrderStorage nonOrderStorage = nonOrderStorageRepository.findOne(bizId);
nonOrderStorage.setStatusId(BizBillStatus.APPROVING.getId()); nonOrderStorage.setStatusId(BizBillStatus.APPROVING.getId());
nonOrderStorageRepository.save(nonOrderStorage); nonOrderStorageRepository.save(nonOrderStorage);
} }
}
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
......
...@@ -215,15 +215,11 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA ...@@ -215,15 +215,11 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
NonProdApplyBaseInfo nonProdApplyBaseInfo = nonProdApplyBaseInfoRepository.findOne(bizId); NonProdApplyBaseInfo nonProdApplyBaseInfo = nonProdApplyBaseInfoRepository.findOne(bizId);
// BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
nonProdApplyBaseInfo.setStatusId(BizBillStatus.APPROVING.getId()); nonProdApplyBaseInfo.setStatusId(BizBillStatus.APPROVING.getId());
nonProdApplyBaseInfo.setApprover(getOperator().getPersonMemberName()); nonProdApplyBaseInfo.setApprover(getOperator().getPersonMemberName());
// nonProdApplyBaseInfo.setApprovalDate(new Date());
nonProdApplyBaseInfoRepository.save(nonProdApplyBaseInfo); nonProdApplyBaseInfoRepository.save(nonProdApplyBaseInfo);
} }
}
@Override @Override
public void onComplete(DelegateTask delegateTask) { public void onComplete(DelegateTask delegateTask) {
......
...@@ -213,9 +213,7 @@ public class NonProducePickApplicationImpl extends FlowBroker implements NonProd ...@@ -213,9 +213,7 @@ public class NonProducePickApplicationImpl extends FlowBroker implements NonProd
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
}
NonProducePick nonProducePick = nonProducePickRepository.findOne(bizId); NonProducePick nonProducePick = nonProducePickRepository.findOne(bizId);
//第一次提交推送到SAP //第一次提交推送到SAP
if (StringUtil.isBlank(nonProducePick.getMessage()) && this.getApprovalParameter().isAdvanceProcessAction()){ if (StringUtil.isBlank(nonProducePick.getMessage()) && this.getApprovalParameter().isAdvanceProcessAction()){
......
...@@ -128,12 +128,10 @@ public class SapPermitApplicationImpl extends FlowBroker implements SapPermitApp ...@@ -128,12 +128,10 @@ public class SapPermitApplicationImpl extends FlowBroker implements SapPermitApp
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
SapPermit sapPermit = sapPermitRepository.findOne(bizId); SapPermit sapPermit = sapPermitRepository.findOne(bizId);
sapPermit.setStatusId(BizBillStatus.APPROVING.getId()); sapPermit.setStatusId(BizBillStatus.APPROVING.getId());
sapPermitRepository.save(sapPermit); sapPermitRepository.save(sapPermit);
} }
}
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
......
...@@ -137,10 +137,8 @@ public class ProcessOutsourceApplicationImpl extends FlowBroker implements Proce ...@@ -137,10 +137,8 @@ public class ProcessOutsourceApplicationImpl extends FlowBroker implements Proce
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
} }
}
/** /**
* 回收事件 * 回收事件
......
...@@ -101,10 +101,8 @@ public class ProcessQuotedPriceApplicationImpl extends FlowBroker implements Pro ...@@ -101,10 +101,8 @@ public class ProcessQuotedPriceApplicationImpl extends FlowBroker implements Pro
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
} }
}
/** /**
* 回收事件 * 回收事件
......
...@@ -55,10 +55,8 @@ public class ProduceMaterialApplyApplicationImpl extends FlowBroker implements P ...@@ -55,10 +55,8 @@ public class ProduceMaterialApplyApplicationImpl extends FlowBroker implements P
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {// 校验及预算
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
} }
}
@Transactional @Transactional
protected void updateStatus(String bizId, BizBillStatus status) { protected void updateStatus(String bizId, BizBillStatus status) {
......
...@@ -64,10 +64,8 @@ public class ProduceSupplierReviewApplicationImpl extends FlowBroker implements ...@@ -64,10 +64,8 @@ public class ProduceSupplierReviewApplicationImpl extends FlowBroker implements
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {// 校验及预算
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
} }
}
@Transactional @Transactional
protected void updateStatus(String bizId, BizBillStatus status) { protected void updateStatus(String bizId, BizBillStatus status) {
......
...@@ -120,10 +120,8 @@ public class ProductScrapApplyApplicationImpl extends FlowBroker implements Prod ...@@ -120,10 +120,8 @@ public class ProductScrapApplyApplicationImpl extends FlowBroker implements Prod
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
} }
}
/** /**
* 回收事件 * 回收事件
......
...@@ -148,10 +148,8 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas ...@@ -148,10 +148,8 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
} }
}
/** /**
* 回收事件 * 回收事件
......
...@@ -140,10 +140,8 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa ...@@ -140,10 +140,8 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
} }
}
/** /**
* 回收事件 * 回收事件
......
...@@ -130,10 +130,8 @@ public class SapPurchaseInfoRecordApplicationImpl extends FlowBroker implements ...@@ -130,10 +130,8 @@ public class SapPurchaseInfoRecordApplicationImpl extends FlowBroker implements
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
} }
}
/** /**
* 回收事件 * 回收事件
......
...@@ -178,10 +178,8 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu ...@@ -178,10 +178,8 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
} }
}
/** /**
* 回收事件 * 回收事件
......
...@@ -79,9 +79,7 @@ public class SapQualityInfoRecordApplicationImpl extends FlowBroker implements S ...@@ -79,9 +79,7 @@ public class SapQualityInfoRecordApplicationImpl extends FlowBroker implements S
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
SapQualityInfoRecord sapQualityInfoRecord = sapQualityInfoRecordRepository.findOne(bizId); SapQualityInfoRecord sapQualityInfoRecord = sapQualityInfoRecordRepository.findOne(bizId);
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) { updateStatus(bizId, BizBillStatus.APPROVING);
sapQualityInfoRecord.setStatusId(BizBillStatus.APPROVING.getId());
}
if (!isApplyProcUnit(delegateTask)) { if (!isApplyProcUnit(delegateTask)) {
TaskExtension te = actApplication.loadRuntimeTaskExtension(delegateTask.getId()); TaskExtension te = actApplication.loadRuntimeTaskExtension(delegateTask.getId());
Assert.notNull(te, String.format("未查询到流程任务【%s】的扩展信息", delegateTask.getId())); Assert.notNull(te, String.format("未查询到流程任务【%s】的扩展信息", delegateTask.getId()));
......
...@@ -141,10 +141,8 @@ public class SapStatsIndicatorsApplicationImpl extends FlowBroker implements Sap ...@@ -141,10 +141,8 @@ public class SapStatsIndicatorsApplicationImpl extends FlowBroker implements Sap
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
} }
}
/** /**
* 回收事件 * 回收事件
......
...@@ -167,12 +167,10 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier ...@@ -167,12 +167,10 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
SuppliersInfo suppliersInfo = suppliersInfoRepository.findOne(bizId); SuppliersInfo suppliersInfo = suppliersInfoRepository.findOne(bizId);
suppliersInfo.setStatusId(BizBillStatus.APPROVING.getId()); suppliersInfo.setStatusId(BizBillStatus.APPROVING.getId());
suppliersInfoRepository.save(suppliersInfo); suppliersInfoRepository.save(suppliersInfo);
} }
}
//流程已办 //流程已办
@Override @Override
......
...@@ -115,12 +115,10 @@ public class SapStockTransfersApplicationImpl extends FlowBroker implements SapS ...@@ -115,12 +115,10 @@ public class SapStockTransfersApplicationImpl extends FlowBroker implements SapS
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {
SapStockTransfers sapStockTransfers = sapStockTransfersRepository.findOne(bizId); SapStockTransfers sapStockTransfers = sapStockTransfersRepository.findOne(bizId);
sapStockTransfers.setStatusId(BizBillStatus.APPROVING.getId()); sapStockTransfers.setStatusId(BizBillStatus.APPROVING.getId());
sapStockTransfersRepository.save(sapStockTransfers); sapStockTransfersRepository.save(sapStockTransfers);
} }
}
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
......
...@@ -214,10 +214,8 @@ public class WasteSaleApplicationImpl extends FlowBroker implements WasteSaleApp ...@@ -214,10 +214,8 @@ public class WasteSaleApplicationImpl extends FlowBroker implements WasteSaleApp
protected void onBeforeComplete(DelegateTask delegateTask) { protected void onBeforeComplete(DelegateTask delegateTask) {
super.onBeforeComplete(delegateTask); super.onBeforeComplete(delegateTask);
String bizId = delegateTask.getExecution().getProcessBusinessKey(); String bizId = delegateTask.getExecution().getProcessBusinessKey();
if (this.isApplyProcUnit(delegateTask) && this.getApprovalParameter().isAdvanceProcessAction()) {// 校验及预算
updateStatus(bizId, BizBillStatus.APPROVING); updateStatus(bizId, BizBillStatus.APPROVING);
} }
}
@Transactional @Transactional
protected void updateStatus(String bizId, BizBillStatus status) { protected void updateStatus(String bizId, BizBillStatus status) {
......
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