From 9b197b7fac92278fb591ea8f4942c7d5687cb5ce Mon Sep 17 00:00:00 2001
From: 李金换 <lijinhuan@prec-tech.com>
Date: 星期一, 28 三月 2022 18:01:22 +0800
Subject: [PATCH] LJPH-C8FB4P【委托】配合PBI设备覆盖率的数据准备0328
---
force-app/main/default/classes/InquiryVerifyBatch.cls | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/force-app/main/default/classes/InquiryVerifyBatch.cls b/force-app/main/default/classes/InquiryVerifyBatch.cls
index 658fd02..335c567 100644
--- a/force-app/main/default/classes/InquiryVerifyBatch.cls
+++ b/force-app/main/default/classes/InquiryVerifyBatch.cls
@@ -1,9 +1,7 @@
-global class InquiryVerifyBatch implements Database.Batchable<sObject>, Database.Stateful {
+global class InquiryVerifyBatch implements Schedulable,Database.Batchable<SObject>,Database.Stateful {
public String query;
public Date start_date;
-
- public Date end_date;
global InquiryVerifyBatch() {
// if(Test.isRunningTest()){
@@ -22,11 +20,13 @@
month = 4;
}
start_date = Date.newInstance(year, month, 1);
- end_date = start_date.addMonths(1);
- this.query = 'select id,quoteSavedDate__c,Opportunity.Id,Opportunity.Department_Class__c from quote where Quote_No_last2__c = \'01\' and CreatedDate >= :start_date and CreatedDate < :end_date';
+ this.query = 'select id,quoteSavedDate__c,Opportunity.Id,Opportunity.Department_Class__c from quote where Quote_No_last2__c = \'01\' and CreatedDate >= :start_date';
}
+ public void execute(SchedulableContext sc) {
+ Database.executeBatch(this);
+ }
// global void execute(SchedulableContext sc){Database.executebatch(this);}
global Database.QueryLocator start(Database.BatchableContext bc) {
// 鑾峰彇鎶ヤ环鍗曟暟鎹�
@@ -48,7 +48,7 @@
createdDateStr = Date.today();
}
// 鑾峰彇鎶ヤ环浜у搧鏁版嵁锛岃幏鍙栫鍥涘垎绫�
- List<QuoteLineItem> qlts = [Select Id,Product2.Category4__c from QuoteLineItem where QuoteId = :quo.Id limit 200];
+ List<QuoteLineItem> qlts = [Select Id,Product2.Category4__c from QuoteLineItem where QuoteId = :quo.Id and Product2.Important_product__c = true];
List<String> c4 = new List<String>();
List<String> qdept = new List<String>();
// 绗洓鍒嗙被鏀惧叆list
--
Gitblit v1.9.1