From 3030a7b7c0a4d759c86fd4b5c1ab7e51b61b8c18 Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期四, 20 七月 2023 11:37:53 +0800
Subject: [PATCH] button-lexNewTransferApply
---
force-app/main/default/classes/LexNewTransferApplyController.cls | 53 ++++++++++++++++++++++++++
force-app/main/default/lwc/lexNewTransferApply/lexNewTransferApply.js | 4 +-
force-app/main/default/classes/LexNewTransferApplyController.cls-meta.xml | 5 ++
3 files changed, 60 insertions(+), 2 deletions(-)
diff --git a/force-app/main/default/classes/LexNewTransferApplyController.cls b/force-app/main/default/classes/LexNewTransferApplyController.cls
new file mode 100644
index 0000000..8a4824a
--- /dev/null
+++ b/force-app/main/default/classes/LexNewTransferApplyController.cls
@@ -0,0 +1,53 @@
+/**
+ * *
+ ODescription:
+ GAuthor: sun xia
+ @Date: 2023-07-11 15:31:56
+ GIastEditors: sun xia
+ @IastEditTime: 2023-07-11 15:31:56
+ * */
+public with sharing class LexNewTransferApplyController {
+ @AuraEnabled
+ public static InitData init(String recordId){
+ InitData res = new InitData();
+ try{
+ List<Rental_Apply__c> raList = [SELECT Id, Name from Rental_Apply__c where id = :recordId];
+ if(raList.size()>0){
+
+ Rental_Apply__c ra = raList[0];
+ res.raId = ra.Id;
+ res.raName = ra.Name;
+ List<Rental_Apply_Equipment_Set_Detail__c> raSet = [SELECT Id,Name,Lost_item_giveup__c,Arrival_in_wh__c,Arrival_wh_Result_Agency__c ,Rental_Apply_Equipment_Set__r.First_RAESD__r.Arrival_in_wh__c,
+ Rental_Apply__r.RecordType.DeveloperName,Lost_Item_return__c,Is_Body__c,Asset__c,Rental_Apply__c,OneToOne_Flag__c,
+ Rental_Apply_Equipment_Set__r.First_RAESD__r.Arrival_wh_Result_Agency__c,
+ Rental_Apply_Equipment_Set__r.First_RAESD__r.Lost_item_giveup__c,
+ Check_lost_Item__c,Check_lost_Item_Final__c,Rental_Apply_Equipment_Set__r.First_You_Xiao_Ku_Cun__c,
+ Rental_Apply_Equipment_Set__r.First_RAESD__r.Arrival_wh_time__c,Arrival_wh_time__c
+ FROM Rental_Apply_Equipment_Set_Detail__c WHERE Rental_Apply__c = :recordId AND Cancel_Select__c = false
+ ];
+
+ res.rae = raSet;
+ }
+ }catch(Exception e){
+ System.debug(LoggingLevel.INFO, '****e:' + e);
+ }
+
+ return res;
+ }
+
+
+ @AuraEnabled
+ public static String getRecordId(){
+ RecordType re = [SELECT Id, Name, DeveloperName, isActive FROM RecordType WHERE DeveloperName = 'AgencyToCenter' AND SobjectType = 'TransferApply__c' AND isActive = true];
+ return re.Id;
+ }
+
+ public class InitData{
+ @AuraEnabled
+ public String raId; //鍊熷嚭鐢宠Id
+ @AuraEnabled
+ public String raName; //鍊熷嚭鐢宠Name
+ @AuraEnabled
+ public List<Rental_Apply_Equipment_Set_Detail__c> rae;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/LexNewTransferApplyController.cls-meta.xml b/force-app/main/default/classes/LexNewTransferApplyController.cls-meta.xml
new file mode 100644
index 0000000..9662499
--- /dev/null
+++ b/force-app/main/default/classes/LexNewTransferApplyController.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>50.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewTransferApply/lexNewTransferApply.js b/force-app/main/default/lwc/lexNewTransferApply/lexNewTransferApply.js
index a73c401..263a764 100644
--- a/force-app/main/default/lwc/lexNewTransferApply/lexNewTransferApply.js
+++ b/force-app/main/default/lwc/lexNewTransferApply/lexNewTransferApply.js
@@ -2,8 +2,8 @@
import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
-import init from '@salesforce/apex/NewTransferApplyController.init';
-import getRecordId from '@salesforce/apex/NewTransferApplyController.getRecordId';
+import init from '@salesforce/apex/LexNewTransferApplyController.init';
+import getRecordId from '@salesforce/apex/LexNewTransferApplyController.getRecordId';
export default class lexNewTransferApply extends LightningElement {
@api recordId;
--
Gitblit v1.9.1