From abed484babfdae0957f67c4c2c2307e4fe6a6a38 Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期二, 04 四月 2023 16:39:55 +0800
Subject: [PATCH] 处理review 4.4.3
---
force-app/main/default/classes/QISReportController.cls | 129 +++++++++++++++++++++---------------------
1 files changed, 65 insertions(+), 64 deletions(-)
diff --git a/force-app/main/default/classes/QISReportController.cls b/force-app/main/default/classes/QISReportController.cls
index e2eb1d3..1239bb9 100644
--- a/force-app/main/default/classes/QISReportController.cls
+++ b/force-app/main/default/classes/QISReportController.cls
@@ -1,4 +1,5 @@
public with sharing class QISReportController {
+ // Final universal code缂栬緫
@AuraEnabled
public static InitData initForQisUniversalFailureCodeButton (String recordId){
InitData res = new initData();
@@ -15,10 +16,11 @@
@AuraEnabled
public static InitData sqlForPAE (String qisReportId){
InitData res = new initData();
- String RecordTypeId = 'ASACDecision';
+
+ String recordTypeId = LightingButtonConstant.DEVELOPER_NAME_ASAC_DECISION;
try{
- PAE_DecisionRecord__c RCPAED_IdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId And RecordType.DeveloperName = :RecordTypeId limit 1];
- res.PAEid = RCPAED_IdList.id;
+ PAE_DecisionRecord__c RCPAEDIdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId And RecordType.DeveloperName = :recordTypeId limit 1];
+ res.PAEid = RCPAEDIdList.id;
System.debug(LoggingLevel.INFO, '*** res: ' + res);
}catch(Exception e){
System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -26,6 +28,35 @@
return res;
}
+ //Intake universal code缂栬緫
+ @AuraEnabled
+ public static InitData initForlexQISIntakeuniversalcodeButton (String recordId){
+ InitData res = new initData();
+ try{
+ QIS_Report__c report = [SELECT id FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
+ res.Id = report.Id;
+ System.debug(LoggingLevel.INFO, '*** res: ' + res);
+ }catch(Exception e){
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ }
+ return res;
+ }
+
+ @AuraEnabled
+ public static InitData sqlForPAE1 (String qisReportId){
+ InitData res = new initData();
+
+ String recordTypeId = LightingButtonConstant.DEVELOPER_NAME_ASRC_DECISION;
+ try{
+ PAE_DecisionRecord__c ASRCDIdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId And RecordType.DeveloperName = :recordTypeId Limit 1];
+ res.PAEid = ASRCDIdList.id;
+ System.debug(LoggingLevel.INFO, '*** res: ' + res);
+ }catch(Exception e){
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ }
+ return res;
+ }
+ //OSH鐜板搧鏀跺埌
@AuraEnabled
public static InitData initForOSHRecievedButton (String recordId){
InitData res = new initData();
@@ -45,13 +76,12 @@
String re = '鎴愬姛';
try{
ID myUserID = UserInfo.getUserId();
+
User tempUser = [select id,Alias,Email from user where id = : myUserID ];
QIS_Report__c rac = new QIS_Report__c();
rac.id = recordId;
- rac.QIS_Status__c = 'OSH妫�娴嬩腑';
- // 寰呰ˉ鍏�
+ rac.QIS_Status__c = LightingButtonConstant.STATUS_QIS_OSH_TESTING;
rac.OSHRecievedDate__c = Date.today();
- System.debug( 'OSHRecievedDate__c=' + rac.OSHRecievedDate__c);
rac.OSH_Receive_staff__c = tempUser.Alias;
rac.OSH_staff__c = tempUser.Alias;
rac.OSH_staff_email__c = tempUser.email;
@@ -75,7 +105,7 @@
return re;
}
-
+ //鎻愪氦寰呭鎵�1
@AuraEnabled
public static InitData initForOSHSubmitButton (String recordId){
InitData res = new initData();
@@ -95,9 +125,10 @@
public static String updateQis1 (String recordId){
String re = '鎴愬姛';
try{
+
QIS_Report__c rac = new QIS_Report__c();
rac.id = recordId;
- rac.QIS_Status__c = 'OSH濉啓瀹屾瘯';
+ rac.QIS_Status__c = LightingButtonConstant.STATUS_QIS_OSH_COMPLATED;
update rac;
}catch(Exception e){
System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -105,7 +136,7 @@
}
return re;
}
-
+ //鎻愪氦寰呭鎵�
@AuraEnabled
public static InitData initForRCSubmitButton (String recordId){
InitData res = new initData();
@@ -130,13 +161,14 @@
@AuraEnabled
public static String updateQisWithRC (String recordId,String type,String oldQIStatus){
String re = '鎴愬姛';
+
ID myUserID = UserInfo.getUserId();
User userinfo = [SELECT Id, JingliApprovalManager__c, BuchangApprovalManager__c, ZongjianApprovalManager__c, BuchangApprovalManagerSales__c, SalesManager__c FROM User WHERE Id = :myUserID LIMIT 1];
QIS_Report__c rac = new QIS_Report__c();
rac.id = recordId;
if (type == '1') {
QIS_Report__c report1 = [SELECT id,RC_problem_not_found__c,RC_FixedJudgement__c FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
- rac.QIS_Status__c = 'RC濉啓瀹屾瘯';
+ rac.QIS_Status__c = LightingButtonConstant.STATUS_QIS_RC_COMPLATED;
if (report1.RC_problem_not_found__c == true && report1.RC_FixedJudgement__c == false) {
QIS_Report__c qisreport = [SELECT Id, Reason_bloken__c, Special_follow__c, next_action__c, QIS_Reply_Comment__c, OCM_judgement__c FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
if (qisreport != null) {
@@ -149,7 +181,7 @@
}
}
if (type == '2') {
- rac.QIS_Status__c = '鍙栨秷鐢宠';
+ rac.QIS_Status__c = LightingButtonConstant.STATUS_QIS_CANCEL;
rac.QIS_Cancel_Submit_day__c = Date.today();
}
try{
@@ -159,7 +191,7 @@
rac.RC_Manager__c = myUserID;
}
if (userinfo!=null) {
- if (oldQIStatus == 'RC妫�娴嬩腑') {
+ if (oldQIStatus == LightingButtonConstant.STATUS_QIS_RC_CHECKING) {
rac.RC__c = myUserID;
}
if (userinfo.SalesManager__c != null ) {
@@ -186,63 +218,23 @@
return re;
}
- @AuraEnabled
- public static InitData initForOCMSubmitButton (String recordId){
- InitData res = new initData();
- try{
- QIS_Report__c report = [SELECT id,is_aohui_product__c,QIS_Status__c,OCM_Manager_Mail_F__c,QISInstallDate__c,contract_number__c FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
- res.Id = report.Id;
- res.QIStatus = report.QIS_Status__c;
- res.QISInstallDate = report.QISInstallDate__c;
- res.contractnumber = report.contract_number__c;
- res.isaohuiproduct = report.is_aohui_product__c;
- System.debug(LoggingLevel.INFO, '*** res: ' + res);
- }catch(Exception e){
- System.debug(LoggingLevel.INFO, '*** e: ' + e);
- }
- return res;
- }
-
- @AuraEnabled
- public static String updateQisWithOCM (String recordId){
- String re = '鎴愬姛';
- QIS_Report__c report = [SELECT id,QIS_Status__c,QISInstallDate__c,contract_number__c,OCM_Manager_Mail_F__c
- ,OCM_Member_Mail_F__c,OCM_Repair_Mail_F__c,OCM_Repair_Mail1_F__c,FSE_Special_Mail_F__c,FSE_Special_Manager_Mail_F__c
- ,WorkLocation_CC_Mail_F__c,is_aohui_product__c,QuolityApproveResult__c
- FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
- try{
- QIS_Report__c rac = new QIS_Report__c();
- rac.id = recordId;
- rac.QIS_Status__c = 'FSE濉啓瀹屾瘯';
- rac.OCM_Manager_Mail__c = report.OCM_Manager_Mail_F__c;
- rac.OCM_Member_Mail__c = report.OCM_Member_Mail_F__c;
- rac.OCM_Repair_Mail__c = report.OCM_Repair_Mail_F__c;
- rac.OCM_Repair_Mail1__c = report.OCM_Repair_Mail1_F__c;
- rac.FSE_Special_Mail__c = report.FSE_Special_Mail_F__c;
- rac.FSE_Special_Manager_Mail__c = report.FSE_Special_Manager_Mail_F__c;
- rac.WorkLocation_CC_Mail__c = report.WorkLocation_CC_Mail_F__c;
- rac.Cancel_QIS_Reason__c = null;
- if (report.is_aohui_product__c == true) {
- rac.OCM_judgement__c = '璐ㄩ噺闂';
- rac.next_action__c = '鏃犲伩缁翠慨';
- rac.RecordTypeId = '01210000000RLWm';
- rac.QIS_Status__c = 'OSH妫�娴嬬敵璇�';
- }
- if (report.QuolityApproveResult__c == null || report.QuolityApproveResult__c == '') {
- rac.QuolityApproveResult__c = '3.宸插鏍革紝涓�鑸川閲忛棶棰�';
- }
- update rac;
- }catch(Exception e){
- System.debug(LoggingLevel.INFO, '*** e: ' + e);
- re = e.getMessage();
- }
- return re;
- }
public class InitData{
@AuraEnabled
public String Id;
@AuraEnabled
+ public String OwnerId;
+ @AuraEnabled
+ public String qisRecordTypeId;
+ @AuraEnabled
+ public String qisRecordName;
+ @AuraEnabled
+ public String ProfileName;
+ @AuraEnabled
public String PAEid;
+ @AuraEnabled
+ public String OCSMAdministrativeReportNumber;
+ @AuraEnabled
+ public String OCSMAdministrativeReportStatus;
@AuraEnabled
public String QIStatus;
@AuraEnabled
@@ -262,8 +254,17 @@
@AuraEnabled
public Date QISInstallDate;
@AuraEnabled
+ public Date cdsdate;
+ @AuraEnabled
+ public Date Aware_date;
+ @AuraEnabled
+ public Date OCSMAdministrativeReportDate;
+ @AuraEnabled
public Boolean RCproblemnotfound;
@AuraEnabled
public Boolean isaohuiproduct;
+ @AuraEnabled
+ public Boolean IsSendQIS;
}
+
}
\ No newline at end of file
--
Gitblit v1.9.1