From 2b6adf750ca9ae5d0094029b25ba474635558109 Mon Sep 17 00:00:00 2001
From: 游畅 <youchang@prec-tech.com>
Date: 星期二, 29 三月 2022 17:30:38 +0800
Subject: [PATCH] opd计划提交审批报错
---
force-app/main/default/classes/NFM601Batch.cls | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/force-app/main/default/classes/NFM601Batch.cls b/force-app/main/default/classes/NFM601Batch.cls
index e5de4fb..05c17b5 100644
--- a/force-app/main/default/classes/NFM601Batch.cls
+++ b/force-app/main/default/classes/NFM601Batch.cls
@@ -8,8 +8,9 @@
this.accountIdList = accountIdList;
}
- global Database.QueryLocator start(Database.BatchableContext bc) {
- return null;
+ global Database.QueryLocator start(Database.BatchableContext bc) {
+ return Database.getQueryLocator([select Id,NFM601Tag__c from Account where NFM601Tag__c = true]);
+ //return null;
// if (accountIdList != null && accountIdList.size() > 0) {
// return Database.getQueryLocator([SELECT Id, RecordTypeId, Is_Active_Formula__c,AwaitToSendAWS__c
@@ -41,8 +42,18 @@
}
- global void execute(Database.BatchableContext BC, list < Account > accountList) {
-
+ global void execute(Database.BatchableContext BC , List<Account> accList) {
+ List<String> accIdList = new List<String>();
+ if(accList.size()>0){
+ for(Account temp : accList){
+ accIdList.add(temp.Id);
+ }
+ NFM601Controller.executefuture('', accIdList);
+ for(Account temp : accList){
+ temp.NFM601Tag__c = false;
+ }
+ }
+ update accList;
// List < String > accIdList = new List < String > ();
// for (Account account: accountList) {
// account.AwaitToSendAWS__c = false;
@@ -66,6 +77,6 @@
}
global void finish(Database.BatchableContext BC) {
-
+ Id execBTId = Database.executeBatch(new NFM606Batch(), 200);
}
}
\ No newline at end of file
--
Gitblit v1.9.1