From 8badb57ea2c82557850ad5b39281c3e8714eb119 Mon Sep 17 00:00:00 2001
From: liuyan <liuyan@prec-tech.com>
Date: 星期四, 24 十一月 2022 10:08:31 +0800
Subject: [PATCH] 科室信息漏传SPO问题
---
force-app/main/default/classes/NewAndEditReportController.cls | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/force-app/main/default/classes/NewAndEditReportController.cls b/force-app/main/default/classes/NewAndEditReportController.cls
index 9481521..756d2dd 100644
--- a/force-app/main/default/classes/NewAndEditReportController.cls
+++ b/force-app/main/default/classes/NewAndEditReportController.cls
@@ -37,6 +37,7 @@
public String contactName3{set;get;}
public String contactName4{set;get;}
public String contactName5{set;get;}
+ public String sfRecordIdForEdit{set;get;}//Add By LiJun for Edit Record from NFM609, 20220510
public NewAndEditReportController(ApexPages.StandardController controller) {
ApiPrefix = 'PIBackApi';
layoutEncryptedAPIList = new List<String>();
@@ -70,6 +71,7 @@
rtTypeId = ReportData.RecordTypeId;
AWSDataId = ReportData.AWS_Data_Id__c;
+ sfRecordIdForEdit = obj.Id;
Map<String,String> sfIdToAWSIdMap = new Map<String,String>();
system.debug('ReportData.Practitioner1__r.Id:' + ReportData.Practitioner1__r.Id);
system.debug('ReportData.Practitioner1__r.AWS_Data_Id__c:' + ReportData.Practitioner1__r.AWS_Data_Id__c);
@@ -256,12 +258,14 @@
System.debug('鑷畾涔夋牸寮忚浆鎹㈢粨鏉�');
String awsDataId = (String)reportInfo.get('AWS_Data_Id__c');
+ String sfRecordId = (String)reportInfo.get('Id');
System.debug('awsDataId = ' + awsDataId);
- report__c[] reports = [select id from report__c where AWS_Data_Id__c =:awsDataId];
+ report__c[] reports = [select id from report__c where AWS_Data_Id__c =:awsDataId or id =:sfRecordId];
if(!isNew){
isClone = reports.size() == 0;
}
+ system.debug('isClone'+isClone + ' isNew'+isNew);
if(isNew){
System.debug('reportInfo = ' + reportInfo);
if(!Test.isRunningTest()){
--
Gitblit v1.9.1