From 2e0d3ce9c4f69d2edff19b3c220ae4da94dcb72c Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期一, 31 七月 2023 15:41:15 +0800
Subject: [PATCH] 修改按钮7.31
---
force-app/main/default/classes/lexAccountController.cls | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/classes/lexAccountController.cls b/force-app/main/default/classes/lexAccountController.cls
index ac41d3b..fbf2d82 100644
--- a/force-app/main/default/classes/lexAccountController.cls
+++ b/force-app/main/default/classes/lexAccountController.cls
@@ -29,6 +29,50 @@
}
return res;
}
+
+ @AuraEnabled
+ public static InitData initForDepartmentCreate(String recordId,String type){
+ InitData res = new InitData();
+ try {
+ Account acc = [
+ select
+ Hospital_Department_Class__c
+ from Account where Id =: recordId
+ ];
+ res.hospitalDepartmentClass = acc.Hospital_Department_Class__c;
+ if(type == 'BF'){
+ res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_BF).getRecordTypeId();
+ }else if(type == 'ENT'){
+ res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_ENT).getRecordTypeId();
+ }else if(type == 'GI'){
+ res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_GI).getRecordTypeId();
+ }else if(type == 'GS'){
+ res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_GS).getRecordTypeId();
+ }else if(type == 'GYN'){
+ res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_GYN).getRecordTypeId();
+ }else if(type == 'OTH'){
+ res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_OTH).getRecordTypeId();
+ }else if(type == 'URO'){
+ res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_URO).getRecordTypeId();
+ }
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ return res;
+
+
+ }
+
+ @AuraEnabled
+ public static InitData initForRepairContact(String recordId){
+ InitData res = new InitData();
+ try{
+ res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_CON).getRecordTypeId();
+ }catch(Exception e){
+ throw new AuraHandledException(e.getMessage());
+ }
+ return res;
+ }
class InitData{
@AuraEnabled
public String hospitalSalesdepartmentHP;
@@ -38,5 +82,7 @@
public String hospitalOCMCategory;
@AuraEnabled
public String recordTypeId;
+ @AuraEnabled
+ public String hospitalDepartmentClass;
}
}
\ No newline at end of file
--
Gitblit v1.9.1