From 19ae52ae3e06c44c646ae6b45dc2b0d7f2cead88 Mon Sep 17 00:00:00 2001 From: 李彤 <litong@prec-tech.com> Date: 星期一, 15 五月 2023 18:55:53 +0800 Subject: [PATCH] 招标项目终止 --- force-app/main/default/classes/TenderResultConfirmTaskBatch.cls | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/force-app/main/default/classes/TenderResultConfirmTaskBatch.cls b/force-app/main/default/classes/TenderResultConfirmTaskBatch.cls index 98a9e41..6f2cf42 100644 --- a/force-app/main/default/classes/TenderResultConfirmTaskBatch.cls +++ b/force-app/main/default/classes/TenderResultConfirmTaskBatch.cls @@ -21,13 +21,14 @@ String query = 'Select Id, Opportunity__c, Tender_information__c, ' + 'Tender_information__r.status__c, Tender_information__r.TenderManageCode__c,Tender_information__r.RecordTypeId, Tender_information__r.CreatedDate,' + 'Opportunity__r.OwnerId, Opportunity__r.AccountId, Opportunity__r.StageName__c, ' - + 'Opportunity__r.Assistant_Applied_Date__c, Opportunity__r.Cnt_Lost_cancel_Draft__c, Opportunity__r.ConfirmationofAward__c, ' + + 'Opportunity__r.Assistant_Applied_Date__c, Opportunity__r.Cnt_Lost_cancel_Draft__c, Opportunity__r.Cnt_Lost_cancel_report__c, Opportunity__r.DirectLossFLG__c, Opportunity__r.ConfirmationofAward__c, ' + 'Opportunity__r.Contract_DB_complite_day__c, Opportunity__r.Contract_Authorize_Lock__c, Opportunity__r.LeakageNumber__c, ' + 'Opportunity__r.ConfirmationofAward_createTime__c ' + 'FROM Tender_Opportunity_Link__c ' + 'WHERE Tender_information__r.InfoType__c = \'3锛氱粨鏋淺' ' + 'AND (Tender_information__r.subInfoType__c = \'3-5锛氫腑鏍囬�氱煡\' OR Tender_information__r.subInfoType__c = \'3-6锛氬悎鍚屽叕鍛奬') ' - + 'AND Tender_information__r.RecordTypeId = \'01210000000VLUI\' '; + + 'AND Opportunity__r.ConfirmationofAward__c = null AND Tender_information__r.TerminateApprovalStatus__c != \'鎵瑰噯\' '; //lt DB202304062844 20230515 椤圭洰缁堟娴佺▼寮�鍙� add + //+ 'AND Tender_information__r.RecordTypeId = \'01210000000VLUI\' '; //20220715 you 鎷涙爣浠诲姟 start if(TenderIds !=null && TenderIds.size() > 0){ @@ -73,11 +74,11 @@ system.debug('test3'+topp.Opportunity__c); logstr += 'Batch execute ' + '\r\n 璇环杩涘叆for----- :'+ topp; // 宸插瓨鍦ㄦ湁鏁堢姸鎬佷换鍔$殑璇环锛屼笉鐢ㄥ啀娆′骇鐢熶换鍔� - if (mapTask.isEmpty() - || (!mapTask.isEmpty() && !mapTask.containsKey(topp.Opportunity__c))){ + if ((mapTask.isEmpty() + || (!mapTask.isEmpty() && !mapTask.containsKey(topp.Opportunity__c))) && !(topp.Opportunity__r.DirectLossFLG__c || topp.Opportunity__r.StageName__c == '澶卞崟' || topp.Opportunity__r.Cnt_Lost_cancel_report__c > 0) && !(topp.Opportunity__r.Contract_DB_complite_day__c != null && topp.Opportunity__r.Contract_Authorize_Lock__c)){ //1.鍐呴儴纭鐘舵�佷负05.璇环涓笖鍏宠仈璇环鐨勭姸鎬�1涓鸿浠� 涓� 浠锋牸鐢宠 涓嶇瓑浜� 鐪� -- > 鍒涘缓骞舵淳鍙戜换鍔� - if (topp.Tender_information__r.status__c == '05.璇环涓�' && topp.Opportunity__r.StageName__c == '璇环' && topp.Opportunity__r.Assistant_Applied_Date__c == null && topp.Opportunity__r.LeakageNumber__c !=1){ + if (topp.Tender_information__r.status__c == '05.璇环涓�' && topp.Opportunity__r.StageName__c == '璇环' && topp.Opportunity__r.Assistant_Applied_Date__c == null && !topp.Opportunity__r.DirectLossFLG__c){ logstr += 'Batch execute ' + '\r\n 璇环杩涘叆绗竴涓垽鏂潯浠�----- :'+ topp.Opportunity__c ; Task__c tempTask = new Task__c(); tempTask.RecordTypeId = winBiddingTask_TaskId; @@ -107,7 +108,7 @@ //2. 瀛樺湪宸叉彁浜ょ殑澶卞崟鎶ュ憡鎴栬�呰浠风姸鎬�1=澶卞崟 -- >涓爣纭锛氱珵浜夊鎵嬩腑鏍� // 鎷涙爣椤圭洰涓殑涓爣纭鏇存敼鍦˙atch涓洿鏂� - if (topp.Opportunity__r.Cnt_Lost_cancel_Draft__c > 0 || topp.Opportunity__r.StageName__c == '澶卞崟'){ + if (topp.Opportunity__r.DirectLossFLG__c || topp.Opportunity__r.StageName__c == '澶卞崟'){ logstr += 'Batch execute ' + '\r\n 璇环杩涘叆绗簩涓垽鏂潯浠�----- :'+ topp.Opportunity__c ; //涓爣纭瀛楁璧嬪�肩珵浜夊鎵嬩腑鏍� if(oppMap.isEmpty() || !oppMap.containsKey(topp.Opportunity__c)){ -- Gitblit v1.9.1