From d8dc84a3d56df839895f1c417a4d9cbee763d262 Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期五, 03 三月 2023 14:50:59 +0800
Subject: [PATCH] gzw 测试环境代码更新

---
 force-app/main/default/classes/EventToEventDetailsBatch.cls |   34 ++++------------------------------
 1 files changed, 4 insertions(+), 30 deletions(-)

diff --git a/force-app/main/default/classes/EventToEventDetailsBatch.cls b/force-app/main/default/classes/EventToEventDetailsBatch.cls
index b10678e..936e310 100644
--- a/force-app/main/default/classes/EventToEventDetailsBatch.cls
+++ b/force-app/main/default/classes/EventToEventDetailsBatch.cls
@@ -10,19 +10,13 @@
     // 妫�绱㈡墍鏈夋湁浠诲姟锛堝寘鎷富鍔ㄤ换鍔★紝琚姩浠诲姟锛夋病鏈夋姤鍛婁竴瑙堢殑浜嬩欢,涓嬫湀鐨�
     global EventToEventDetailsBatch(){
         // this.query = 'select id from Event where task_id__c != \'\' and EventC_ID__c = \'\' and ActivityDate >= '+Date.today().format().ReplaceAll('/', '-')+' and ActivityDate < '+ Date.today().toStartOfMonth().addMonths(2).format().ReplaceAll('/', '-');
-        //20210626 zh 浠诲姟妗嗘灦淇敼  鏈堟湯鐢熸垚鏈湀鐨勬姤鍛婁竴瑙� 寤舵湡銆佸彇娑堢殑浜嬩欢涓嶇敓鎴愭姤鍛婁竴瑙� start
-        // this.query = 'select id from Event where task_id__c != \'\' and EventC_ID__c = \'\' and ActivityDate < '+ Date.today().toStartOfMonth().addMonths(2).format().ReplaceAll('/', '-');
-        this.query = 'select id from Event where task_id__c != \'\' and EventC_ID__c = \'\' and EventStatus__c not in (\'04 鍙栨秷\',\'05 寤舵湡\',\'06 鍏抽棴\',\'07 鏈墽琛孿') and ActivityDate < '+ Date.today().format().ReplaceAll('/', '-');
-        //20210626 zh 浠诲姟妗嗘灦淇敼  鏈堟湯鐢熸垚鏈湀鐨勬姤鍛婁竴瑙� end
+        this.query = 'select id from Event where task_id__c != \'\' and EventC_ID__c = \'\' and ActivityDate < '+ Date.today().toStartOfMonth().addMonths(2).format().ReplaceAll('/', '-');
         system.debug('query:'+query);
     }
 
     // 2021-03-09  mzy  WLIG-BYHD79  SFDC鐜batch鍚堝苟璋冩煡  start
     global EventToEventDetailsBatch(Boolean NeedExecute) {
-        //20210626 zh 浠诲姟妗嗘灦淇敼  鏈堟湯鐢熸垚鏈湀鐨勬姤鍛婁竴瑙� 寤舵湡銆佸彇娑堢殑浜嬩欢涓嶇敓鎴愭姤鍛婁竴瑙�  start
-        // this.query = 'select id from Event where task_id__c != \'\' and EventC_ID__c = \'\' and ActivityDate < '+ Date.today().toStartOfMonth().addMonths(2).format().ReplaceAll('/', '-');
-        this.query = 'select id from Event where task_id__c != \'\' and EventC_ID__c = \'\' and EventStatus__c not in (\'04 鍙栨秷\',\'05 寤舵湡\',\'06 鍏抽棴\',\'07 鏈墽琛孿') and ActivityDate < '+ Date.today().format().ReplaceAll('/', '-');
-        //20210626 zh 浠诲姟妗嗘灦淇敼  鏈堟湯鐢熸垚鏈湀鐨勬姤鍛婁竴瑙� end
+        this.query = 'select id from Event where task_id__c != \'\' and EventC_ID__c = \'\' and ActivityDate < '+ Date.today().toStartOfMonth().addMonths(2).format().ReplaceAll('/', '-');
         this.IsNeedExecute = NeedExecute;
     }
     // 2021-03-09  mzy  WLIG-BYHD79  SFDC鐜batch鍚堝苟璋冩煡  end
@@ -61,7 +55,7 @@
         for(Event eve : (List<Event>)scope){
             eventIdSet.add(eve.Id);
         }
-        List<Event> calenderList = [select id, ActivityDate, OwnerId, Subject, whatid__c, EventC_ID__c, NextEventC_ID__c, AppCdId__c, SyncCreatedDate__c, Task_ID__c,EventStatus__c,cancelReason__c,cancelReasonOther__c,cancelReasonSelect__c,cancelReasonSelectFSE__c,delayReason__c,delayReasonOther__c,delayReasonSelect__c,delayReasonSelectFSE__c,delayToDate__c,
+        List<Event> calenderList = [select id, ActivityDate, OwnerId, Subject, whatid__c, EventC_ID__c, NextEventC_ID__c, AppCdId__c, SyncCreatedDate__c, Task_ID__c,
                                   StartDateTime, DurationInMinutes, Main_Visit_Location__c, Activity_Type2__c, IsScheduled__c, BeforeActivityDate__c,
                                   Visitor1__c, Visitor2__c, Visitor3__c, Visitor4__c, Visitor5__c, Visitor1_ID__c, Visitor2_ID__c, Visitor3_ID__c, Visitor4_ID__c, Visitor5_ID__c,
                                   Purpose_Type__c, Location, Related_Opportunity1__c, Related_Service1__c, Related_Opportunity1_ID__c, Related_Service1_ID__c,
@@ -153,14 +147,6 @@
                             location = e.Location;
                             whatid = e.whatid__c;
                         }
-                        //20210527 zh 浠诲姟妗嗘灦淇敼 start
-                        String eventCStatus= '';
-                        if ('05 寤舵湡'.equals(e.EventStatus__c)) {
-                            eventCStatus = '寤舵湡';
-                        }else if ('04 鍙栨秷'.equals(e.EventStatus__c)) {
-                            eventCStatus = '鍙栨秷';
-                        }
-                        //20210527 zh 浠诲姟妗嗘灦淇敼 end
                         Event__c ec = new Event__c(
                             Subject__c = e.Subject,
                             StartDateTime__c = e.StartDateTime,
@@ -207,19 +193,7 @@
                             Activity_PurposeFSE__c = e.Activity_PurposeFSE__c,
                             Activity_PurposeEscFSE__c = e.Activity_PurposeEscFSE__c,
                             Purpose_TypeFSE__c = e.Purpose_TypeFSE__c,
-                            Purpose_TypeEscFSE__c = e.Purpose_TypeEscFSE__c,
-                            //20210527 zh 浠诲姟妗嗘灦淇敼 start
-                            eventStatus__c = eventCStatus,
-                            delayReason__c = e.delayReason__c,
-                            delayReasonOther__c = e.delayReasonOther__c,
-                            delayReasonSelect__c = e.delayReasonSelect__c,
-                            delayReasonSelectFSE__c = e.delayReasonSelectFSE__c,
-                            CancelReason__c = e.cancelReason__c,
-                            cancelReasonSelectFSE__c = e.cancelReasonSelectFSE__c,
-                            cancelReasonSelect__c = e.cancelReasonSelect__c,
-                            cancelReasonOther__c = e.cancelReasonOther__c,
-                            delayToDate__c = e.delayToDate__c
-                            //20210527 zh 浠诲姟妗嗘灦淇敼 end
+                            Purpose_TypeEscFSE__c = e.Purpose_TypeEscFSE__c
                         );
                         // if(usrJobMap.get(e.OwnerId) != null && usrJobMap.get(e.OwnerId) == '閿�鍞湇鍔�'){
                         //     ec.Activity_PurposeFSE__c = e.Activity_PurposeFSE__c;

--
Gitblit v1.9.1