From e14d6d0619330cad423f06493e3aa2371faa2a8f Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期六, 09 九月 2023 14:02:23 +0800
Subject: [PATCH] Sit期间修改

---
 force-app/main/default/classes/eSignHospitalConfirmController.cls |   65 ++++++++++++++++++++++++++++++++
 1 files changed, 65 insertions(+), 0 deletions(-)

diff --git a/force-app/main/default/classes/eSignHospitalConfirmController.cls b/force-app/main/default/classes/eSignHospitalConfirmController.cls
index 1693f12..ca3358a 100644
--- a/force-app/main/default/classes/eSignHospitalConfirmController.cls
+++ b/force-app/main/default/classes/eSignHospitalConfirmController.cls
@@ -263,4 +263,69 @@
         delete con;
     }
     //鏂囦欢鍒犻櫎鍔熻兘  绮剧悽鎶�鏈� thh 2021-09-26 end
+     //鑾峰彇AWS淇℃伅 zhj 2023-01-03 start
+     @AuraEnabled
+     public static ControllerResponse getAWS(String objectName){
+         ControllerResponse res = new ControllerResponse();
+         try{
+             res.Data = JSON.serialize(PIHelper.getPIIntegrationInfo(objectName));
+             res.IsSuccess = true;
+         }catch(Exception e){
+             res.IsSuccess = false;
+             res.Message = e.getMessage();
+         }
+         return res;
+     }
+     //鑾峰彇AWS淇℃伅 zhj 2023-01-03 end
+ 
+     //AWS鏀归�犳枃浠朵笂浼� deloitte zhj 2023-01-03 start
+     @AuraEnabled
+     public static Id saveFile(String fileName,String key,String transId,String parentId){
+         FileAddress__c file = new FileAddress__c();
+         PIHelper.PIIntegration pI=PIHelper.getPIIntegrationInfo('Document');
+         // 鍘婚櫎filename閲屽緱鈥�&鈥� bysushanhu 20220414
+         fileName = fileName.remove('&');
+         file.DownloadLink__c =pI.undeleteUrl+key+'&fileName='+fileName;
+         file.FileName__c =fileName;
+         file.ViewLink__c =pI.queryUrl+key;
+         file.ParentRecordId__c =parentId;
+         file.AWS_File_Key__c = key;
+         insert file;
+         return file.Id;
+     }
+     //AWS鏀归�犳枃浠朵笂浼� deloitte zhj 2023-01-03 end
+ 
+     //鑾峰彇涓婁紶鏂囦欢 deloitte zhj 2023-01-03 start
+     public static List<FileAddress__c> getFileds(String parentId){
+         // SWAG-C9S9P6 2022-05-25 ssm start
+         // 鏂囦欢鍦板潃閲屽鍔犳嫑鏍囬」鐩笓鐢ㄥ瓧娈碉紙淇℃伅Id銆侀」鐩樁娈点�佹洿鏂版棩鏈燂級
+         if(String.isNotBlank(parentId)){
+             return [SELECT Id,ParentRecordId__c, FileName__c,DownloadLink__c,FileAddress__c.ViewLink__c,AWS_File_Key__c  //deloitte zhj 棰勮/涓嬭浇 鍔爐oken 2022/12/01
+                     // SWAG-C9S9P6 鏂板瀛楁 start
+                     , InfoId__c, InfoType__c, subInfoType__c, UpdateDate__c 
+                     // SWAG-C9S9P6 鏂板瀛楁 end
+                     FROM FileAddress__c where ParentRecordId__c=:parentId order by createddate desc];
+         }
+         return [SELECT Id, ParentRecordId__c,FileName__c,DownloadLink__c,FileAddress__c.ViewLink__c,AWS_File_Key__c  //deloitte zhj 棰勮/涓嬭浇 鍔爐oken 2022/12/01
+                 // SWAG-C9S9P6 鏂板瀛楁 start
+                 , InfoId__c, InfoType__c, subInfoType__c, UpdateDate__c 
+                 // SWAG-C9S9P6 鏂板瀛楁 end
+                 FROM FileAddress__c order by createddate desc limit 100];
+         // SWAG-C9S9P6 2022-05-25 ssm end
+     }
+     //鑾峰彇涓婁紶鏂囦欢 deloitte zhj 2023-01-03 end
+ 
+     //AWS鏂囦欢鍒犻櫎鍔熻兘  deloitte zhj 2022-01-03 start
+     @AuraEnabled
+     public static String deleteFile(String fileId){
+         System.debug('fileId = ' + fileId);
+         List<FileAddress__c> fList = [select id,AWS_File_Key__c from FileAddress__c where id =:fileId];
+         String awsKey = '';
+         if(fList != null && fList.size() > 0){
+             awsKey = fList[0].AWS_File_Key__c;
+             delete fList;
+         }
+         return awsKey;
+     }
+     //AWS鏂囦欢鍒犻櫎鍔熻兘  deloitte zhj 2022-01-03 end
 }
\ No newline at end of file

--
Gitblit v1.9.1