From 962519811b7c4be07f30d09e791798b0ea79d3ae Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期三, 08 三月 2023 09:54:02 +0800
Subject: [PATCH] 同步代码
---
force-app/main/default/classes/LogAutoSendBatch.cls | 50 +++++++++++++++++++++++++++++++++++++-------------
1 files changed, 37 insertions(+), 13 deletions(-)
diff --git a/force-app/main/default/classes/LogAutoSendBatch.cls b/force-app/main/default/classes/LogAutoSendBatch.cls
index ded0061..813a1f3 100644
--- a/force-app/main/default/classes/LogAutoSendBatch.cls
+++ b/force-app/main/default/classes/LogAutoSendBatch.cls
@@ -3,8 +3,13 @@
private String typeNFM;
private String messageGroupNumber;
private Datetime times;
- private Boolean isForecast;// 20220318 ljh SWAG-CC54R2 add
+ private Boolean isForecast;// 20220318 ljh SWAG-CC54R2 add
private String loginId;
+
+ //20230203 lt 璁″垝鐨勪綔涓氫紭鍖� 涓�灏忔椂涓ゆ start
+ private BatchEmailUtil.ScBean scB1;
+ //20230203 lt 璁″垝鐨勪綔涓氫紭鍖� 涓�灏忔椂涓ゆ end
+
/**
* 銈炽兂銈广偪銉炽儓
*/
@@ -38,6 +43,16 @@
*/
public Integer max_cnt = Integer.valueOf(System.Label.batch_retry_max_cnt);
global Database.QueryLocator start(Database.BatchableContext BC) {
+
+ //20230203 lt 璁″垝鐨勪綔涓氫紭鍖� 涓�灏忔椂涓ゆ start
+ scB1 = BatchEmailUtil.setSc1('LogAutoSendSchedule', 0, 23, 0, '0 30 *', null);
+ if (System.Test.isRunningTest() == false) {
+ for(CronTrigger ct : [SELECT Id FROM CronTrigger WHERE CronJobDetail.Name =: scB1.scName]) {
+ System.abortJob(ct.Id);
+ }
+ system.schedule(scB1.scName, scB1.scTime, new LogAutoSendSchedule());
+ }
+ //20230203 lt 璁″垝鐨勪綔涓氫紭鍖� 涓�灏忔椂涓ゆ end
String profileId = UserInfo.getProfileId();
// 20220318 ljh SWAG-CC54R2 add start
@@ -89,8 +104,8 @@
retry_cnt__c, NFM501Future_Count__c, NFM501_Web_Annex_Count__c
FROM BatchIF_Log__c
WHERE RowDataFlg__c = true
- AND Type__c != 'NFM007' // 2023-01-18 ZYH ADD
- AND Type__c = : typeNFM AND CreatedDate >= : times AND MessageGroupNumber__c >= : messageGroupNumber
+ AND Type__c != 'NFM007' // 2023-01-18 ZYH ADD
+ AND Type__c = : typeNFM AND CreatedDate >= : times AND MessageGroupNumber__c >= : messageGroupNumber
order by MessageGroupNumber__c asc ]
);
//20191224 HWAG-BK65E8 add end
@@ -101,8 +116,8 @@
retry_cnt__c, NFM501Future_Count__c, NFM501_Web_Annex_Count__c
FROM BatchIF_Log__c
WHERE RowDataFlg__c = true
- AND Type__c != 'NFM007' // 2023-01-18 ZYH ADD
- AND ((retry_cnt__c != null AND retry_cnt__c > 0 AND retry_cnt__c < : max_cnt)
+ AND Type__c != 'NFM007' // 2023-01-18 ZYH ADD
+ AND ((retry_cnt__c != null AND retry_cnt__c > 0 AND retry_cnt__c < : max_cnt)
OR (NFM501Future_Count__c != null
AND NFM501Future_Count__c > 0 AND NFM501Future_Count__c < : max_cnt)
OR(NFM501_Web_Annex_Count__c != null
@@ -115,13 +130,15 @@
retry_cnt__c, NFM501Future_Count__c, NFM501_Web_Annex_Count__c
FROM BatchIF_Log__c
WHERE RowDataFlg__c = true
- AND Type__c != 'NFM007' // 2023-01-18 ZYH ADD
- AND ((retry_cnt__c != null AND retry_cnt__c > 0 AND retry_cnt__c < : max_cnt)
+ AND Type__c != 'NFM007' // 2023-01-18 ZYH ADD
+ AND ((retry_cnt__c != null AND retry_cnt__c > 0 AND retry_cnt__c < : max_cnt)
OR (NFM501Future_Count__c != null
AND NFM501Future_Count__c > 0 AND NFM501Future_Count__c < : max_cnt)
OR(NFM501_Web_Annex_Count__c != null
AND NFM501_Web_Annex_Count__c > 0 AND NFM501_Web_Annex_Count__c < : max_cnt))
- AND ownerId = : UserInfo.getUserId()]
+ AND ownerId = : UserInfo.getUserId()
+ ORDER BY CreatedDate // 2023-02-04 ZYH ADD
+ ]
);
}
}
@@ -300,6 +317,11 @@
if (strType_c == 'NFM612') {
NFM612Rest.main(rowData.Id);
}
+ // 2023-3-6 zyh add 鎶ヤ慨瀛愬崟鍙戦�佹帴鍙f祴璇曠敤
+ if (strType_c == 'NFM612S') {
+ NFM612Controller.ManualExecute(rowData.Id);
+ }
+ // 2023-3-6 zyh add 鎶ヤ慨瀛愬崟鍙戦�佹帴鍙f祴璇曠敤
if (strType_c == 'NFM620') {
NFM620Rest.main(rowData.Id);
}
@@ -310,12 +332,12 @@
NFM621Controller.execute(rowData, null);
}
//zhj 鏂版柟妗堟敼閫� 2023-01-06 start
- if (strType_c == 'NFM624') {//鏅烘収鍖荤枟pk
- NFM624Rest.main(rowData.Id);
- }
- // if (strType_c == 'NFM624Rest2') {//鏅烘収鍖荤枟pk
- // NFMUtil.againSendToAWS624(rowData.Id);
+ // if (strType_c == 'NFM624') {//鏅烘収鍖荤枟pk
+ // NFM624Rest.main(rowData.Id);
// }
+ if (strType_c == 'NFM624Rest2') {//鏅烘収鍖荤枟pk
+ NFMUtil.againSendToAWS624(rowData.Id);
+ }
//zhj 鏂版柟妗堟敼閫� 2023-01-06 end
if (strType_c == 'NFM622') {
NFM622Controller.execute(rowData, null);
@@ -517,6 +539,8 @@
}
global void finish(Database.BatchableContext BC) {
+ BatchEmailUtil.removeOtherSc('LogAutoSendSchedule', scB1.scName); //20230203 lt 璁″垝鐨勪綔涓氫紭鍖�
+
// 浠婂洖銇倓銈嬨亾銇ㄣ仾銇勩仹銇�
// 20220318 ljh SWAG-CC54R2 add start
if(String.isNotBlank(typeNFM) && typeNFM == 'NFM010' && isForecast){
--
Gitblit v1.9.1