From 9b197b7fac92278fb591ea8f4942c7d5687cb5ce Mon Sep 17 00:00:00 2001
From: 李金换 <lijinhuan@prec-tech.com>
Date: 星期一, 28 三月 2022 18:01:22 +0800
Subject: [PATCH] LJPH-C8FB4P【委托】配合PBI设备覆盖率的数据准备0328
---
force-app/main/default/classes/RentalFixtureSetAssignController.cls | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/force-app/main/default/classes/RentalFixtureSetAssignController.cls b/force-app/main/default/classes/RentalFixtureSetAssignController.cls
index eb01f41..dd42ffe 100644
--- a/force-app/main/default/classes/RentalFixtureSetAssignController.cls
+++ b/force-app/main/default/classes/RentalFixtureSetAssignController.cls
@@ -290,13 +290,18 @@
// update銇犮亼浣跨敤銇欍倠
List<Rental_Apply_Equipment_Set__c> mfUpdate = new List<Rental_Apply_Equipment_Set__c>();
Savepoint sp = Database.setSavepoint();
+ List<String> statusList = System.Label.StatusProcessState.split(',');
try {
Boolean updRAFlg = false;
Rental_Apply__c raUpd = [
SELECT Id, Shipment_request_Cnt__c,
Asset_loaner_start_day__c,
- Asset_loaner_closed_day__c
+ Asset_loaner_closed_day__c,
+ Campaign__c,
+ Campaign__r.IF_Approved__c,
+ Campaign__r.Meeting_Approved_No__c,
+ Campaign__r.Approved_Status__c //2022 sx obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀�
FROM Rental_Apply__c
WHERE Id = :parentId
FOR Update];
@@ -311,6 +316,15 @@
}
}
+ //20220228 sx obpm淇敼 鏄惁鐢宠鍐宠鍕剧潃娌℃湁鍐宠缂栧彿涓嶈兘杩涜鎿嶄綔
+ if( raUpd.Campaign__c!= null && raUpd.Campaign__r.IF_Approved__c && raUpd.Campaign__r.Meeting_Approved_No__c == null){
+ throw new ControllerUtil.myException('宸茬敵璇峰喅瑁佷絾鍐宠缂栫爜涓虹┖');
+ }
+ //20220315 sx obpm obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀� start
+ else if( raUpd.Campaign__c!= null && raUpd.Campaign__r.IF_Approved__c && raUpd.Campaign__r.Meeting_Approved_No__c != null && statusList.contains(raUpd.Campaign__r.Approved_Status__c) ){
+ throw new ControllerUtil.myException('宸茬敵璇峰喅瑁佷絾鍐宠缂栫爜鐘舵�佷笉绗﹀悎闇�姹�');
+ }
+ //20220315 sx obpm obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀� end
Integer indexNum = 1;
// 20210708 ljh SFDC-C47CLV add start
Set<Id> raeIdset = new Set<Id>();
@@ -322,6 +336,7 @@
raeIdset.add(robj.Id);
}
}
+
List<Rental_Apply_Equipment_Set__c> raeList = [SELECT Id, Name,Rental_Apply__c,Cancel_Select__c,LastModifiedDate FROM Rental_Apply_Equipment_Set__c where Id in :raeIdset];
// 20210906 ljh SFDC-C6D9C2 add LastModifiedDate
for(Rental_Apply_Equipment_Set__c rae:raeList){
@@ -344,6 +359,7 @@
hasError = true;
throw new ControllerUtil.myException('绗�' + indexNum +'琛屾暟鎹凡琚垎鍓茬敵璇峰崟锛岃鍒锋柊鍚庨噸璇曪紒');
}
+
// 20210708 ljh update end
// 20210906 ljh SFDC-C6D9C2 add start
// 20210929 ljh SFDC-C6D9C2 娉ㄩ噴 鎭㈠鏀瑰叾浠栨柟妗� start
@@ -1536,6 +1552,7 @@
return result;
}
+
public static List<String> transferStringToList(String str){
// System.debug(LoggingLevel.INFO, '*** str: ' + str);
List<String> strList = new List<String>();
@@ -1544,6 +1561,11 @@
}else{
strList.add(str);
}
+ for(Integer i = strList.size()-1;i >= 0 ; i --){
+ if(String.isEmpty(strList.get(i))){
+ strList.remove(i);
+ }
+ }
return strList;
}
--
Gitblit v1.9.1