From 4b167c913b268e1d3fb9e706895c98ddade51b37 Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期二, 04 四月 2023 15:58:03 +0800
Subject: [PATCH] 黄千龙补充2023.4.4
---
force-app/main/default/classes/QISReportController.cls | 52 ++++++++-----------------
force-app/main/default/classes/LightingButtonConstant.cls | 24 ++++++++++++
2 files changed, 41 insertions(+), 35 deletions(-)
diff --git a/force-app/main/default/classes/LightingButtonConstant.cls b/force-app/main/default/classes/LightingButtonConstant.cls
index 2ec0e00..aa8046b 100644
--- a/force-app/main/default/classes/LightingButtonConstant.cls
+++ b/force-app/main/default/classes/LightingButtonConstant.cls
@@ -21,6 +21,22 @@
public static final String STATUS_VOC_WRITE_OVER = '濉啓瀹屾瘯';
//VOC鎶ュ憡鐨勭姸鎬佲�樺畬姣曗��
public static final String STATUS_VOC_FINISH = '瀹屾瘯';
+ //QIS鐨勭姸鎬佲�極SH妫�娴嬩腑鈥�
+ public static final String STATUS_QIS_OSH_TESTING = 'OSH妫�娴嬩腑';
+ //QIS鐨勭姸鎬佲�極SH濉啓瀹屾瘯鈥�
+ public static final String STATUS_QIS_OSH_COMPLATED = 'OSH濉啓瀹屾瘯';
+ //QIS鐨勭姸鎬佲�極SH妫�娴嬬敵璇封��
+ public static final String STATUS_QIS_OSH_TESTING_APP = 'OSH妫�娴嬬敵璇�';
+ //QIS鐨勭姸鎬佲�楻C濉啓瀹屾瘯鈥�
+ public static final String STATUS_QIS_RC_COMPLATED = 'RC濉啓瀹屾瘯';
+ //QIS鐨勭姸鎬佲�樺彇娑堢敵璇封��
+ public static final String STATUS_QIS_CANCEL = '鍙栨秷鐢宠';
+ //QIS鐨勭姸鎬佲�楻C妫�娴嬩腑鈥�
+ public static final String STATUS_QIS_RC_CHECKING = 'RC妫�娴嬩腑';
+ //QIS鐨勭姸鎬佲�楩SE濉啓瀹屾瘯鈥�
+ public static final String STATUS_QIS_FSE_COMPLATED = 'FSE濉啓瀹屾瘯';
+ //QIS鐨勭姸鎬佲�樺畬姣曗��
+ public static final String STATUS_QIS_COMPLATED = '瀹屾瘯';
//鍛ㄦ姤鏈堟姤鐨勮褰曠被鍨嬪悕鈥樺懆鎶モ��
public static final String RECORD_TYPE_NAME_BY_MONTHLY_REPORT = '鍛ㄦ姤';
//鎶ュ憡涔︾殑璁板綍绫诲瀷鈥樻彁浜も��
@@ -29,6 +45,14 @@
public static final String RECORD_TYPE_NAME_BY_FOLLOW_THE_STAGE = '璺熷彴';
//鎶ュ憡涔︾殑璁板綍绫诲瀷鈥極PD鈥�
public static final String RECORD_TYPE_NAME_BY_OPD= 'OPD';
+ //QIS鐨勮褰曠被鍨嬧��3.OSH鈥�
+ public static final String RECORD_TYPE_NAME_BY_OSH= '3.OSH';
+ //QIS鐨勮褰曠被鍨嬧��4.OSH鍥炵瓟瀹屾瘯鈥�
+ public static final String RECORD_TYPE_NAME_BY_OSH_FINASH= '4.OSH鍥炵瓟瀹屾瘯';
+ //QIS鐨勮褰曠被鍨嬧��9.Final 瀹屾瘯鈥�
+ public static final String RECORD_TYPE_NAME_BY_FINAL= '9.Final 瀹屾瘯';
+ //QIS鐨勮褰曠被鍨嬧��5.鐜板満缁撴鈥�
+ public static final String RECORD_TYPE_NAME_BY_COMP= '5.鐜板満缁撴';
//璁板綍绫诲瀷鐨刣eveloperName鈥楢SRCDecision鈥�
public static final String DEVELOPER_NAME_ASRC_DECISION = 'ASRCDecision';
//璁板綍绫诲瀷鐨刣eveloperName鈥楢SACDecision鈥�
diff --git a/force-app/main/default/classes/QISReportController.cls b/force-app/main/default/classes/QISReportController.cls
index 884872e..1239bb9 100644
--- a/force-app/main/default/classes/QISReportController.cls
+++ b/force-app/main/default/classes/QISReportController.cls
@@ -16,11 +16,11 @@
@AuraEnabled
public static InitData sqlForPAE (String qisReportId){
InitData res = new initData();
- ConstClass Constc = new ConstClass();
- String RecordTypeId = Constc.REC_DEVELOPERNAME_ASA;
+
+ 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);
@@ -45,11 +45,11 @@
@AuraEnabled
public static InitData sqlForPAE1 (String qisReportId){
InitData res = new initData();
- ConstClass Constc = new ConstClass();
- String RecordTypeId = Constc.REC_DEVELOPERNAME_ASR;
+
+ String recordTypeId = LightingButtonConstant.DEVELOPER_NAME_ASRC_DECISION;
try{
- PAE_DecisionRecord__c ASRCD_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 = ASRCD_IdList.id;
+ 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);
@@ -76,11 +76,11 @@
String re = '鎴愬姛';
try{
ID myUserID = UserInfo.getUserId();
- ConstClass Constc = new ConstClass();
+
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 = Constc.QIS_STATUS1;
+ rac.QIS_Status__c = LightingButtonConstant.STATUS_QIS_OSH_TESTING;
rac.OSHRecievedDate__c = Date.today();
rac.OSH_Receive_staff__c = tempUser.Alias;
rac.OSH_staff__c = tempUser.Alias;
@@ -125,10 +125,10 @@
public static String updateQis1 (String recordId){
String re = '鎴愬姛';
try{
- ConstClass Constc = new ConstClass();
+
QIS_Report__c rac = new QIS_Report__c();
rac.id = recordId;
- rac.QIS_Status__c = Constc.QIS_STATUS2;
+ rac.QIS_Status__c = LightingButtonConstant.STATUS_QIS_OSH_COMPLATED;
update rac;
}catch(Exception e){
System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -161,14 +161,14 @@
@AuraEnabled
public static String updateQisWithRC (String recordId,String type,String oldQIStatus){
String re = '鎴愬姛';
- ConstClass Constc = new ConstClass();
+
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 = Constc.QIS_STATUS3;
+ 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) {
@@ -181,7 +181,7 @@
}
}
if (type == '2') {
- rac.QIS_Status__c = Constc.QIS_STATUS4;
+ rac.QIS_Status__c = LightingButtonConstant.STATUS_QIS_CANCEL;
rac.QIS_Cancel_Submit_day__c = Date.today();
}
try{
@@ -191,7 +191,7 @@
rac.RC_Manager__c = myUserID;
}
if (userinfo!=null) {
- if (oldQIStatus == Constc.QIS_STATUS5) {
+ if (oldQIStatus == LightingButtonConstant.STATUS_QIS_RC_CHECKING) {
rac.RC__c = myUserID;
}
if (userinfo.SalesManager__c != null ) {
@@ -217,7 +217,6 @@
}
return re;
}
-
public class InitData{
@AuraEnabled
@@ -255,7 +254,7 @@
@AuraEnabled
public Date QISInstallDate;
@AuraEnabled
- public Date CDS_date;
+ public Date cdsdate;
@AuraEnabled
public Date Aware_date;
@AuraEnabled
@@ -266,23 +265,6 @@
public Boolean isaohuiproduct;
@AuraEnabled
public Boolean IsSendQIS;
- }
-
- public class ConstClass{
- final String REC_DEVELOPERNAME_ASA = 'ASACDecision';
- final String REC_DEVELOPERNAME_ASR = 'ASRCDecision';
- final String REC_OSH_ID = '01210000000RLWm';
- final String REC_ANSWERCOMP_ID = '01210000000RLgY';
- final String REC_FINAL_ID = '01210000000gFTH';
- final String REC_COMP_ID = '01210000000RLcW';
- final String QIS_STATUS1 = 'OSH妫�娴嬩腑';
- final String QIS_STATUS2 = 'OSH濉啓瀹屾瘯';
- final String QIS_STATUS3 = 'RC濉啓瀹屾瘯';
- final String QIS_STATUS4 = '鍙栨秷鐢宠';
- final String QIS_STATUS5 = 'RC妫�娴嬩腑';
- final String QIS_STATUS6 = 'FSE濉啓瀹屾瘯';
- final String QIS_STATUS7 = 'OSH妫�娴嬬敵璇�';
- final String QIS_STATUS8 = '瀹屾瘯';
}
}
\ No newline at end of file
--
Gitblit v1.9.1