From 50b39c4b52bf5fd61ec46ada365c51e05a16d2ae Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期四, 04 五月 2023 09:11:54 +0800
Subject: [PATCH] Backup0504
---
force-app/main/default/classes/lexNewRepairAuraController.cls | 57 ++++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 40 insertions(+), 17 deletions(-)
diff --git a/force-app/main/default/classes/lexNewRepairAuraController.cls b/force-app/main/default/classes/lexNewRepairAuraController.cls
index f743b7e..e8e1279 100644
--- a/force-app/main/default/classes/lexNewRepairAuraController.cls
+++ b/force-app/main/default/classes/lexNewRepairAuraController.cls
@@ -14,6 +14,10 @@
String PIPL_Input_Account_Error_Msg = label.PIPL_Input_Account_Error_Msg;
Map<string,string> mso = (Map<string,string>)JSON.deserialize(urlStr, Map<string,string>.class);
system.debug('mso='+mso);
+ if (recordId != null) {
+ res.recordTypeId = [SELECT Id,RecordTypeId FROM Repair__c WHERE Id = :recordId].RecordTypeId;
+ res.status = true;
+ }
String RepairSubOrderAWSDataId;
// AssignValueFromUrl(mso,controller.getRecord());
//閫氳繃id鏌� 闂
@@ -74,26 +78,41 @@
}
}
- PIHelper.PIIntegration piIntegration = PIHelper.getPIIntegrationInfo('Repair__c');
- PIHelper.PIIntegration piIntegrationAddress = PIHelper.getPIIntegrationInfo('Address__c');
- PIHelper.PIIntegration piIntegrationContact = PIHelper.getPIIntegrationInfo('Contact');
- PIHelper.PIIntegration piIntegrationRepairSubOrder = PIHelper.getPIIntegrationInfo('RepairSubOrder__c');
- String staticResource = JSON.serialize(piIntegration);
- //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start
- String staticResourceV2 = JSON.serialize(PIHelper.getPIIntegrationInfo('Repair__cV2'));
- //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 end
- String staticResourceAddress = JSON.serialize(piIntegrationAddress);
- String staticResourceContact = JSON.serialize(piIntegrationContact);
- String staticResourceRepairSubOrder = JSON.serialize(piIntegrationRepairSubOrder);
- List<String> encryptedAPIList = piIntegration.PIFields;
- String sobjectPrefix = piIntegration.sobjectPrefix;
+ //2023/04/23 lwc鐨勪繚瀛樺苟鏂板缓 淇濆瓨鍚庡埛鏂伴〉闈�
+ // PIHelper.PIIntegration piIntegration = PIHelper.getPIIntegrationInfo('Repair__c');
+ // PIHelper.PIIntegration piIntegrationAddress = PIHelper.getPIIntegrationInfo('Address__c');
+ // PIHelper.PIIntegration piIntegrationContact = PIHelper.getPIIntegrationInfo('Contact');
+ // PIHelper.PIIntegration piIntegrationRepairSubOrder = PIHelper.getPIIntegrationInfo('RepairSubOrder__c');
+ // String staticResource = JSON.serialize(piIntegration);
+ // //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start
+ // String staticResourceV2 = JSON.serialize(PIHelper.getPIIntegrationInfo('Repair__cV2'));
+ // //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 end
+ // String staticResourceAddress = JSON.serialize(piIntegrationAddress);
+ // String staticResourceContact = JSON.serialize(piIntegrationContact);
+ // String staticResourceRepairSubOrder = JSON.serialize(piIntegrationRepairSubOrder);
+ // List<String> encryptedAPIList = piIntegration.PIFields;
+ // String sobjectPrefix = piIntegration.sobjectPrefix;
- //save and new url
- String newUrl = '/setup/ui/recordtypeselect.jsp?ent=' + sobjectId + '&retURL=/' + sobjectPrefix + '/o&save_new_url=/' + sobjectPrefix + '/e?retURL=%2F' + sobjectPrefix + '%2Fo';
- res.newUrl = newUrl;
+ //save and new url page澶勪繚瀛樺苟鏂板缓璺宠浆鍦板潃锛歯ew?recordTypeId=01210000000QmS9&additionalParams=retURL%3D%252Fa0J%252Fo%26&count=1
+ // String newUrl = '/setup/ui/recordtypeselect.jsp?ent=' + sobjectId + '&retURL=/' + sobjectPrefix + '/o&save_new_url=/' + sobjectPrefix + '/e?retURL=%2F' + sobjectPrefix + '%2Fo';
+ // res.newUrl = newUrl;
return res;
}
+
+ public static String getAllFieldNames(String objName){
+ Map <String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
+ List<Schema.sObjectField> fields = schemaMap.get(objName).getDescribe().fields.getMap().values();
+
+ String fieldString = '';
+ for( Schema.sObjectField field : fields ){
+ fieldString += field + ',';
+ }
+ fieldString = fieldString.removeEnd(',');
+
+ return fieldString;
+ }
+
// @AuraEnabled
public static List <LayoutDescriberHelper.LayoutSection > init1(String recordId,String urlStr) {
String sobjectId = [SELECT CustomObjectId,CustomObjectName FROM CustomObjectUserLicenseMetrics where CustomObjectName ='Repair' limit 1].CustomObjectId;
@@ -379,6 +398,8 @@
//鍒ゆ柇鏄惁鏈塕epair鐨勯粯璁ゅ��
@AuraEnabled
public Boolean status;
+ // @AuraEnabled
+ // public Repair__c repair;
//todo 鎶ヤ慨浜�
@AuraEnabled
public String AWS_Data_Id;
@@ -406,7 +427,9 @@
@AuraEnabled
public String Rental_Apply_Equipment_Set_Detail;
@AuraEnabled
- public String newUrl;
+ public String recordTypeId;
+ // @AuraEnabled
+ // public String newUrl;
public ReturnData(){
this.status = false;
--
Gitblit v1.9.1