From a1b500c74db7ed741ab4bebbd42530fd30b89bf9 Mon Sep 17 00:00:00 2001 From: yangjieke <yangjieke@prec-tech.com> Date: 星期五, 01 四月 2022 10:07:17 +0800 Subject: [PATCH] SWAG-CCL6R7 补充 --- force-app/main/default/triggers/OpportunityBefUpd.trigger | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/force-app/main/default/triggers/OpportunityBefUpd.trigger b/force-app/main/default/triggers/OpportunityBefUpd.trigger index da74437..61b4720 100644 --- a/force-app/main/default/triggers/OpportunityBefUpd.trigger +++ b/force-app/main/default/triggers/OpportunityBefUpd.trigger @@ -2,8 +2,10 @@ * Opportunity浣滄垚寰�(銈炽償銉�)銆乼rigger銇仸闆嗚▓闋呯洰銈抧ull銇仚銈� * 鍟嗚珖銇�屽璨�/鍐呰部銆嶃仺銆岄�氳波銆嶃伄鍊ゃ亴涓�鑷淬仌銇涖倠銉堛儶銈兗銇с仚銆� * 鍟嗚珖銇墍鏈夎�呫�愩偡銈广儐銉犮�戙伀鎵�鏈夎�呫伄Id銈掑叆銈屻倠 + * OpportunityBefInsUpdTriggerTest */ trigger OpportunityBefUpd on Opportunity (before insert, before update) { + List<String> idlist = new List<String>(); if(Trigger.isInsert){ //璇环鎷呭綋浜哄拰鎴樼暐绉戝鎷呭綋浜轰笉涓�鑷�,鍦ㄨ繖閲屽悓姝� 20170512 XFUU-ALB9JK @@ -50,6 +52,15 @@ //if(ops.State_Owner__c == '鑳介噺') ops.STMS_Package_Sale__c = true; // opIds.add(ops.Id); // acs.add(ops.) + + //2022-3-29 yjk SWAG-CCL6R7 + Opportunity oldOne = Trigger.oldMap.get(ops.id); + if(oldOne.Bidding_Project_Name_Bid__c==null && ops.Bidding_Project_Name_Bid__c !=null ){ + List<Tender_information__c> ticList = [select id,ResultDate__c from Tender_information__c where id = :ops.Bidding_Project_Name_Bid__c]; + + ops.Closing_Bid_Date__c = ticList.size() == 1? ticList.get(0).ResultDate__c : null ; + + } } // System.debug('====================='+opIds); // //鍦ㄨ浠疯Е鍙戝櫒閲屾敼杩欎釜楠岃瘉锛屾帓闄ゅ鍝佺姸鎬佹槸鍙栨秷鐨勶紝鍙鏄湁澶囧搧锛屽氨涓嶅厑璁告洿鏀规渶缁堢敤鎴枫�� @@ -129,7 +140,8 @@ raList = [Select Id,Follow_UP_Opp__c From Rental_Apply__c Where RA_Status_Text__c != '鍙栨秷' and Follow_UP_Opp__c IN :opIds]; }else{ //2.浠庤浠稩d涓煡璇㈠鍝佺姸鎬佷笉涓哄彇娑�(鐘舵�佷笉涓哄彇娑堜笖璇环涓湁s澶囧搧鐨勮瘽锛屽氨鎶ラ敊) - raList = [Select Id,Follow_UP_Opp__c From Rental_Apply__c Where RA_Status_Text__c != '鍙栨秷' and RA_Status_Text__c != '瀹屼簡' and Follow_UP_Opp__c IN :opIds]; + //20220307 lt update and RA_Status_Text__c != '鑽夋涓�' SWAG-CBXCYR 銆愬鎵樸�戝尰闄㈠悎骞舵暟鎹浆绉婚棶棰� + raList = [Select Id,Follow_UP_Opp__c From Rental_Apply__c Where RA_Status_Text__c != '鍙栨秷' and RA_Status_Text__c != '瀹屼簡' and RA_Status_Text__c != '鑽夋涓�' and Follow_UP_Opp__c IN :opIds]; } //3.灏嗗叾锛堟瘡涓浠峰搴旂殑澶囧搧锛夋斁鍏ap涓� Map<String,Rental_Apply__c> raMap = new Map<String,Rental_Apply__c>(); -- Gitblit v1.9.1