From 666b1cff3d705a53d07cd3ee6d146a7ef7ac7754 Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期一, 26 六月 2023 17:13:11 +0800
Subject: [PATCH] Merge branch 'LEX_chenjingwu_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_chenjingwu_dev
---
force-app/main/default/classes/ReportController.cls | 141 ++++++++++++++++++++++++++++++++++------------
1 files changed, 104 insertions(+), 37 deletions(-)
diff --git a/force-app/main/default/classes/ReportController.cls b/force-app/main/default/classes/ReportController.cls
index d75f918..76a56d9 100644
--- a/force-app/main/default/classes/ReportController.cls
+++ b/force-app/main/default/classes/ReportController.cls
@@ -2,6 +2,44 @@
鐢ㄤ簬缁檒wc鐨刯s鍒濆鍖栨暟鎹拰瀵硅褰曡繘琛宒ml鎿嶄綔锛屾controller灞炰簬鎶ュ憡涔�
*/
public with sharing class ReportController {
+
+ @AuraEnabled
+ public static InitData initForOPDReportConsumButton(String recordId){
+ InitData res = new initData();
+ try {
+ Consum_Apply__c con = [select RA_Status__c,Product_category__c,Id,Hospital__c,Strategic_dept__c,Account__c from Consum_Apply__c where Id =: recordId];
+ res.raStatus = con.RA_Status__c;
+ res.productCategory = con.Product_category__c;
+ res.consumApplyId = con.Id;
+ res.hospital = con.Hospital__c;
+ res.strategicDept = con.Strategic_dept__c;
+ res.account = con.Account__c;
+ res.recordTypeId1 = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_SIS_ENG).getRecordTypeId();
+ res.recordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_SIS_ET).getRecordTypeId();
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ return res;
+ }
+ @AuraEnabled
+ public static InitData initForOPDReportButton(String recordId){
+ InitData res = new initData();
+ try {
+ Rental_Apply__c rent = [select RA_Status__c,Asset_return_day2__c,Hospital__c,Strategic_dept__c,Account__c,OPDPlan__c,Follow_UP_Opp__c,demo_purpose2__c from Rental_Apply__c where Id =: recordId];
+ res.raStatus = rent.RA_Status__c;
+ res.assetReturnDay2 = rent.Asset_return_day2__c;
+ res.hospitalId = rent.Hospital__c;
+ res.strategicDeptId = rent.Strategic_dept__c;
+ res.accountId = rent.Account__c;
+ res.demoPurpose2 = rent.demo_purpose2__c;
+ res.followUPOpp = rent.Follow_UP_Opp__c;
+ res.opdPlan = rent.OPDPlan__c;
+ res.recordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_OPD).getRecordTypeId();
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ return res;
+ }
//缁橵OC瀹屾瘯鐩稿簲鐨刯s鎻愪緵鍒濆鍖栨暟鎹�
@AuraEnabled
public static InitData initForVOCFinishButton (String recordId) {
@@ -77,8 +115,8 @@
try {
Report__c report = [select Status__c,VOC_Satisfy__c,VOC_Satisfy1__c from Report__c where Id = :recordId];
res.status = report.Status__c;
- res.Satisfy = report.VOC_Satisfy__c;
- res.Satisfy1 = report.VOC_Satisfy1__c;
+ res.satisfy = report.VOC_Satisfy__c;
+ res.satisfy1 = report.VOC_Satisfy1__c;
System.debug(LoggingLevel.INFO, '*** res: ' + res);
} catch (Exception e) {
System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -105,8 +143,8 @@
InitData res = new InitData();
try {
Report__c report = [select OCSMAdministrativeReportNumber__c,OCSMAdministrativeReportDate__c,Aware_date__c from Report__c where Id = :recordId];
- res.OCSMAdministrativeReportDate = report.OCSMAdministrativeReportDate__c;
- res.OCSMAdministrativeReportNumber = report.OCSMAdministrativeReportNumber__c;
+ res.theOCSMAdministrativeReportDate = report.OCSMAdministrativeReportDate__c;
+ res.theOCSMAdministrativeReportNumber = report.OCSMAdministrativeReportNumber__c;
res.awareDate = report.Aware_date__c;
} catch (Exception e) {
System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -134,7 +172,7 @@
InitData res = new InitData();
try {
Report__c report = [select OCSMAdministrativeReportStatus__c,AwareDate__C from Report__c where Id = :recordId];
- res.OCSMAdministrativeReportStatus = report.OCSMAdministrativeReportStatus__c;
+ res.theOCSMAdministrativeReportStatus = report.OCSMAdministrativeReportStatus__c;
res.awareDate = report.AwareDate__C;
} catch (Exception e) {
System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -163,11 +201,11 @@
try {
PAE_DecisionRecord__c[] report = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_Report__c = :recordId And RecordType.DeveloperName = :developerName Order by LastModifiedDate desc];
if (report != null && !report.isEmpty()) {
- res.LastModifiedDate = report[0].LastModifiedDate;
- res.Id = report[0].Id;
- res.Name = report[0].Name;
- res.LastModifiedById = report[0].LastModifiedById;
- res.DeveloperName = report[0].RecordType.DeveloperName;
+ res.lastModifiedDate = report[0].LastModifiedDate;
+ res.id = report[0].Id;
+ res.name = report[0].Name;
+ res.lastModifiedById = report[0].LastModifiedById;
+ res.developerName = report[0].RecordType.DeveloperName;
}
} catch (Exception e) {
System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -184,11 +222,11 @@
try {
PAE_DecisionRecord__c[] report = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_Report__c = :recordId And RecordType.DeveloperName = :recordTypeId Order by LastModifiedDate desc];
if (report != null && !report.isEmpty()) {
- res.LastModifiedDate = report[0].LastModifiedDate;
- res.Id = report[0].Id;
- res.Name = report[0].Name;
- res.LastModifiedById = report[0].LastModifiedById;
- res.DeveloperName = report[0].RecordType.DeveloperName;
+ res.lastModifiedDate = report[0].LastModifiedDate;
+ res.id = report[0].Id;
+ res.name = report[0].Name;
+ res.lastModifiedById = report[0].LastModifiedById;
+ res.developerName = report[0].RecordType.DeveloperName;
}
} catch (Exception e) {
System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -248,7 +286,7 @@
try {
Report__c rac = new Report__c();
rac.Id = recordId;
- rac.RecordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(LightingButtonConstant.RECORD_TYPE_NAME_BY_OPD).getRecordTypeId();
+ rac.recordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(LightingButtonConstant.RECORD_TYPE_NAME_BY_OPD).getRecordTypeId();
update rac;
return null;
} catch (Exception e) {
@@ -284,7 +322,7 @@
try {
rac.Id = recordId;
rac.Status__c = LightingButtonConstant.STATUS_COMPLETE;
- rac.RecordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(LightingButtonConstant.VOC_NAME).getRecordTypeId();
+ rac.recordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(LightingButtonConstant.VOC_NAME).getRecordTypeId();
update rac;
return null;
} catch (Exception e) {
@@ -317,7 +355,7 @@
Report__c rac = new Report__c();
try {
rac.Id = recordId;
- rac.RecordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(LightingButtonConstant.RECORD_TYPE_NAME_BY_FOLLOW_THE_STAGE).getRecordTypeId();
+ rac.recordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(LightingButtonConstant.RECORD_TYPE_NAME_BY_FOLLOW_THE_STAGE).getRecordTypeId();
update rac;
return null;
} catch (Exception e) {
@@ -379,15 +417,15 @@
//VOC缁撴灉纭鏇存柊鐩稿簲鏁版嵁
@AuraEnabled
- public static String updateForVOCConfirmButton(String recordId,String Satisfy,String Satisfy1){
+ public static String updateForVOCConfirmButton(String recordId,String satisfy,String satisfy1){
try {
Report__c rac = new Report__c();
rac.Id = recordId;
- if (Satisfy == LightingButtonConstant.CN_YES) {
+ if (satisfy == LightingButtonConstant.CN_YES) {
rac.Status__c = LightingButtonConstant.STATUS_VOC_CONFIRMED;
- } else if (Satisfy == LightingButtonConstant.CN_NO) {
+ } else if (satisfy == LightingButtonConstant.CN_NO) {
// 瀵惧繙绲愭灉锛堜竴鍥炵洰锛夈伀鍊ゃ仾銇戙倢銇般�佷竴鍥炵洰銇�屽惁銆嶃仺瑕嬨仾銇�
- if (Satisfy1 != LightingButtonConstant.CN_NO) {
+ if (satisfy1 != LightingButtonConstant.CN_NO) {
Report__c[] records = [SELECT Id, VOC_Satisfy__c, VOC_Unsatisfy_Reason__c, VOC_follow_up_result__c, VOC_solution_category__c FROM Report__c WHERE Id = :recordId];
rac.VOC_Satisfy__c = null;
rac.VOC_Unsatisfy_Reason__c = null;
@@ -413,6 +451,8 @@
return eMessage.substring(left,right);
}
}
+
+
//VOC鍥炵瓟鏇存柊鐩稿簲鏁版嵁
@AuraEnabled
public static String updateForVOCAnswerButton(String recordId){
@@ -579,29 +619,29 @@
@AuraEnabled
public String ownerId;
@AuraEnabled
- public String Satisfy;
+ public String satisfy;
@AuraEnabled
- public String Satisfy1;
+ public String satisfy1;
@AuraEnabled
public String profileId;
@AuraEnabled
- public String OCSMAdministrativeReportNumber;
+ public String theOCSMAdministrativeReportNumber;
@AuraEnabled
- public Date OCSMAdministrativeReportDate;
+ public Date theOCSMAdministrativeReportDate;
@AuraEnabled
public Date awareDate;
@AuraEnabled
- public String OCSMAdministrativeReportStatus;
+ public String theOCSMAdministrativeReportStatus;
@AuraEnabled
- public Datetime LastModifiedDate;
+ public Datetime lastModifiedDate;
@AuraEnabled
- public String Id;
+ public String id;
@AuraEnabled
- public String Name;
+ public String name;
@AuraEnabled
- public String LastModifiedById;
+ public String lastModifiedById;
@AuraEnabled
- public String DeveloperName;
+ public String developerName;
@AuraEnabled
public String userId;
@AuraEnabled
@@ -610,10 +650,37 @@
public String huDiAnId;
@AuraEnabled
public String systemProfileId;
-
-
-
-
-
+ @AuraEnabled
+ public String raStatus;
+ @AuraEnabled
+ public String productCategory;
+ @AuraEnabled
+ public String hospitalId;
+ @AuraEnabled
+ public String hospital;
+ @AuraEnabled
+ public String strategicDeptId;
+ @AuraEnabled
+ public String strategicDept;
+ @AuraEnabled
+ public String accountId;
+ @AuraEnabled
+ public String account;
+ @AuraEnabled
+ public String rentalApplyId;
+ @AuraEnabled
+ public String consumApplyId;
+ @AuraEnabled
+ public String recordTypeId;
+ @AuraEnabled
+ public String recordTypeId1;
+ @AuraEnabled
+ public Date assetReturnDay2;
+ @AuraEnabled
+ public String followUPOpp;
+ @AuraEnabled
+ public String demoPurpose2;
+ @AuraEnabled
+ public String opdPlan;
}
}
\ No newline at end of file
--
Gitblit v1.9.1