From d77b6353ca9b59a6398df3eae9912f9fd766946d Mon Sep 17 00:00:00 2001
From: zhangzhengmei <zhangzhengmei@prec-tech.com>
Date: 星期六, 05 八月 2023 17:04:22 +0800
Subject: [PATCH] fix: lightning 页面确认
---
force-app/main/default/classes/LexEquipmentRentalApply_FromQISCtl.cls | 84 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 84 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/classes/LexEquipmentRentalApply_FromQISCtl.cls b/force-app/main/default/classes/LexEquipmentRentalApply_FromQISCtl.cls
new file mode 100644
index 0000000..c4bc95d
--- /dev/null
+++ b/force-app/main/default/classes/LexEquipmentRentalApply_FromQISCtl.cls
@@ -0,0 +1,84 @@
+public with sharing class LexEquipmentRentalApply_FromQISCtl {
+ public LexEquipmentRentalApply_FromQISCtl() {
+
+ }
+
+ @AuraEnabled
+ public static List<Rental_Apply__c> rentalApp(String recordId){
+ try {
+ List<Rental_Apply__c> rep = [select Id from Rental_Apply__c where QIS_number__c =: recordId and Status__c <> '鍙栨秷' and Status__c <> '鍒犻櫎'];
+ return rep;
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ }
+
+ //鑾峰彇褰撳墠鐧诲綍浜虹殑 id
+ @AuraEnabled
+ public static UserResult UserInfo_Owner() {
+ UserResult result = new UserResult();
+ ID myUserID = UserInfo.getUserId();
+ try {
+ User tempUser =
+ [select Id,isFormal_Stuff__c,FirstName,LastName from user where id = : myUserID ];
+ result.id = tempUser.Id;
+ result.isFormalStuff = tempUser.isFormal_Stuff__c;
+ result.firstName = tempUser.FirstName;
+ result.lastName = tempUser.LastName;
+ } catch (exception e) {
+
+ result.result = e.getMessage();
+ }
+ return result;
+ }
+
+ @AuraEnabled
+ public static InitData init(String recordId){
+ InitData res = new initData();
+ try {
+ QIS_Report__c rep = [select Id,next_action__c,QIS_Status__c,Hospital__c,Department_Class__c,Hospital_Department__c,Name,Repair__c from QIS_Report__c where Id =: recordId];
+ res.nextAction = rep.next_action__c;
+ res.qISStatus = rep.QIS_Status__c;
+ res.hospital = rep.Hospital__c;
+ res.departmentClass = rep.Department_Class__c;
+ res.hospitalDepartment = rep.Hospital_Department__c;
+ res.name = rep.Name;
+ res.repair = rep.Repair__c;
+ return res;
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ }
+ public class InitData{
+ @AuraEnabled
+ public String nextAction;
+ @AuraEnabled
+ public String qISStatus;
+ @AuraEnabled
+ public String hospital;
+ @AuraEnabled
+ public String departmentClass;
+ @AuraEnabled
+ public String hospitalDepartment;
+ @AuraEnabled
+ public String name;
+ @AuraEnabled
+ public String repair;
+ }
+
+ public class UserResult {
+ @AuraEnabled
+ public string result;
+ public UserResult( ) {
+ result = 'Success';
+ }
+ @AuraEnabled
+ public string id;
+ @AuraEnabled
+ public Boolean isFormalStuff;
+ @AuraEnabled
+ public string firstName;
+ @AuraEnabled
+ public string lastName;
+ }
+}
\ No newline at end of file
--
Gitblit v1.9.1