Commit e20f6297 authored by 1650842865's avatar 1650842865

审批中修改状态

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