From 4420517bbbffea48cabe7a7dcdf2e1c4b440fc85 Mon Sep 17 00:00:00 2001
From: GWY <guweiyi@prec-tech.com>
Date: 星期一, 30 五月 2022 16:15:26 +0800
Subject: [PATCH] 两个LS特殊条件在说明的增减
---
force-app/main/default/classes/OpportunityWebService.cls | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/classes/OpportunityWebService.cls b/force-app/main/default/classes/OpportunityWebService.cls
index 8b52fc2..d6008fb 100644
--- a/force-app/main/default/classes/OpportunityWebService.cls
+++ b/force-app/main/default/classes/OpportunityWebService.cls
@@ -209,7 +209,41 @@
}
+ WebService static String checkDealerId(String dealerId) {
+ String rtn = '0';
+ // 鑾峰彇绯荤粺绠$悊鍛業d
+ String getUserId = System.label.SystemAdmin1_2_GPI;
+ // 鑾峰彇褰撳墠鐢ㄦ埛Id
+ String userId = UserInfo.getUserId().subString(0,15);
+ dealerId.subString(0,15);
+ String userDealerId;
+ List<User> userList = new List<User>();
+ User user = new User();
+
+ if (String.isNotBlank(getUserId)) {
+ if (!getUserId.contains(userId)) {
+ userList = [select mu_Dealer__c
+ from User
+ where id =: userId];
+
+ user = userList[0];
+ userDealerId = user.mu_Dealer__c;
+ if (String.isNotBlank(userDealerId)) {
+ userDealerId.substring(0,15);
+ }
+ if (userDealerId == dealerId) {
+ rtn = '1';
+ }
+ }else {
+ rtn = '0';
+ }
+ }else {
+ rtn = '0';
+ }
+ System.debug('rtn='+rtn);
+ return rtn;
+ }
--
Gitblit v1.9.1