From de62b11fd2203816306ba94226874b2e62420e83 Mon Sep 17 00:00:00 2001
From: GWY <guweiyiscp096@foxmail.com>
Date: 星期五, 15 四月 2022 09:42:05 +0800
Subject: [PATCH] Merge branch 'master' of http://47.92.229.245:8089/r/OlympusSSBG
---
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