From 1312ba82d4c880bdb5357d28e0d4af5b285f610f Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期四, 10 三月 2022 15:54:39 +0800
Subject: [PATCH] 最近一月修改内容

---
 force-app/main/default/classes/RentalFixtureSetAssignAgencyController.cls |   30 ++++++++++++++++++++++++------
 1 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/force-app/main/default/classes/RentalFixtureSetAssignAgencyController.cls b/force-app/main/default/classes/RentalFixtureSetAssignAgencyController.cls
index 73e0f76..cdb970b 100644
--- a/force-app/main/default/classes/RentalFixtureSetAssignAgencyController.cls
+++ b/force-app/main/default/classes/RentalFixtureSetAssignAgencyController.cls
@@ -246,10 +246,11 @@
                      , Rental_Apply_Equipment_Set__r.Irreplaceable_flag__c //20210519 ljh add 1829 start
                      , Rental_Apply_Equipment_Set__r.canDelete__c //20210519 ljh add 1829 start
                      , Rental_Apply_Equipment_Set__r.Substitute_flag__c //20210526 ljh 1829 add
-                     ,Rental_Apply_Equipment_Set__r.RAES_Status__c
-                     ,Rental_Apply_Equipment_Set__r.Shippment_loaner_time2__c
-                     ,Rental_Apply__r.Status__c
-                     //20210519 ljh add 1829 end
+                     , Rental_Apply_Equipment_Set__r.RAES_Status__c
+                     , Rental_Apply_Equipment_Set__r.Shippment_loaner_time2__c
+                     , Rental_Apply__r.Status__c //20210519 ljh add 1829 end
+                     , Rental_Apply__r.Request_approval_time__c //20220309 SFDC-CC6CLJ phase5涓婄嚎璇鹃131 鎻愪氦鐢宠鍒板鍝佸嚭搴撴椂闀� 
+                     , Add_Request_approval_time__c //20220309 SFDC-CC6CLJ phase5涓婄嚎璇鹃131 鎻愪氦鐢宠鍒板鍝佸嚭搴撴椂闀� 
                      , Rental_Num__c
                      , Rental_Start_Date__c
                      , Select_Time__c
@@ -432,6 +433,8 @@
             SELECT Campaign__c
                  , Repair__c
                  , Campaign__r.Status
+                 ,Campaign__r.IF_Approved__c
+                 ,Campaign__r.Meeting_Approved_No__c
                  // ,repair__r.Return_Without_Repair_Date__c
                  , Return_Without_Repair_Date_F__c
                  // , Repair__r.Repair_Final_Inspection_Date__c
@@ -477,6 +480,10 @@
                 ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '绱㈣禂QIS鐩殑锛孮IS宸叉湁鏂板搧鍙戣揣鏃�,涓嶈兘缁х画浜�'));
                 return false;
             }//1822 yc 20211108 end
+            //20220225 sx add obpm 鍔炰簨澶勫鍔犲垽鏂細鏄惁鐢宠鍐宠鍕剧潃娌℃湁鍐宠缂栧彿涓嶈兘杩涜鎿嶄綔
+            else if(RaTar.Campaign__c != null && RaTar.Campaign__r.IF_Approved__c && RaTar.Campaign__r.Meeting_Approved_No__c == null){
+                ApexPages.addMessage(new ApexPages.message(ApexPages.severity.Error, '宸茬敵璇峰喅瑁佷絾鍐宠缂栫爜涓虹┖'));
+            }
         }
         return true;
     }
@@ -1214,7 +1221,6 @@
         }
         return true;
     }
-
     //20210519 ljh add 1829
     // 鎵竴鎵寜閽�
     public void scanAndMatch() {
@@ -1708,6 +1714,8 @@
                 ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '娌℃湁鏄庣粏锛屼笉鑳藉彂璐�!'));
                 return;
             }
+            Map<String,String> tes = new Map<String,String>();
+            Map<String, List<Rental_Apply_Equipment_Set_Detail__c>> approvalMap = new Map<String, List<Rental_Apply_Equipment_Set_Detail__c>>();// 20220309 SFDC-CC6CLJ phase5涓婄嚎璇鹃131 鎻愪氦鐢宠鍒板鍝佸嚭搴撴椂闀�
             for(EsdInfo esd:esdList) {
                 if(!raesdMap.containsKey(esd.rec.Id)) {
                     continue;
@@ -1764,7 +1772,17 @@
                     raesd.Inspection_result__c = 'OK';
                     // 鍙戣揣鍓嶆娴嬫椂闂村拰妫�娴嬩汉鍦╰rigger閲岃
                     raesd.Shippment_loaner_time__c = now;
-
+                    // 20220309 SFDC-CC6CLJ phase5涓婄嚎璇鹃131 鎻愪氦鐢宠鍒板鍝佸嚭搴撴椂闀� start
+                    Datetime keyDt = raesd.Add_Request_approval_time__c != null?raesd.Add_Request_approval_time__c:raesd.Rental_Apply__r.Request_approval_time__c;
+                    List<Rental_Apply_Equipment_Set_Detail__c> tempRaesdL;
+                    if(approvalMap.containsKey(keyDt.format())){
+                        tempRaesdL = approvalMap.get(keyDt.format());
+                    }else{
+                        tempRaesdL = new List<Rental_Apply_Equipment_Set_Detail__c>();
+                    }
+                    tempRaesdL.add(raesd);                        
+                    approvalMap.put(keyDt.format(),tempRaesdL);
+                    // 20220309 SFDC-CC6CLJ phase5涓婄嚎璇鹃131 鎻愪氦鐢宠鍒板鍝佸嚭搴撴椂闀� end  
                     updateRaesdList.add(raesd);
                 }
                 else {

--
Gitblit v1.9.1