From 07390e2fcb4adf27c928335bf27ae7939c5a80ad Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期二, 23 五月 2023 11:28:12 +0800
Subject: [PATCH] bakcup20230523
---
force-app/main/default/classes/buttonQISReportCtl.cls | 61 +++++++++++++++++++++++++++++-
1 files changed, 58 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/classes/buttonQISReportCtl.cls b/force-app/main/default/classes/buttonQISReportCtl.cls
index b98bb99..9f50c0f 100644
--- a/force-app/main/default/classes/buttonQISReportCtl.cls
+++ b/force-app/main/default/classes/buttonQISReportCtl.cls
@@ -7,16 +7,20 @@
public static InitData init(String recordId){
InitData res = new initData();
try{
- QIS_Report__c report = [SELECT Name,QIS_Status__c,PAE_DetermineAC__c,AE_DetermineResult__c,ETQ_UPLOAD_STATUS__c,QIS_final_judgement__c,OCM_judgement__c,PAE_Determine__c,Id FROM QIS_Report__c WHERE Id =: recordId LIMIT 1];
+ QIS_Report__c report = [SELECT is_CNBuy__c,isPAE_Profile__c,isAE_Profile__c,Name,QIS_Status__c,PAE_DetermineAC__c,AE_DetermineResult__c,ETQ_UPLOAD_STATUS__c,QIS_final_judgement__c,OCM_judgement__c,PAE_Determine__c,Id FROM QIS_Report__c WHERE Id =: recordId LIMIT 1];
res.PAEDetermineC = report.PAE_Determine__c;
- res.Name = report.Name;
res.PAEDetermineACC = report.PAE_DetermineAC__c;
res.OCMJudgementC = report.OCM_judgement__c;
res.QISFinalJudgementC = report.QIS_final_judgement__c;
res.ETQUPLOADSTATUSC = report.ETQ_UPLOAD_STATUS__c;
res.AEDetermineResultC = report.AE_DetermineResult__c;
res.Id = report.Id;
+ res.Name = report.Name;
res.QISStatusC = report.QIS_Status__c;
+
+ res.isAEProfileC = report.isAE_Profile__c;
+ res.isCNBuyC = report.is_CNBuy__c;
+ res.isPAEProfileC = report.isPAE_Profile__c;
res.userId = UserInfo.getUserId();
res.email = UserInfo.getUserEmail();
res.profileId = UserInfo.getProfileId();
@@ -30,7 +34,7 @@
@AuraEnabled
public static String updateOSHNogoods(String Id,String email,String userId){
List<User> user = new List<User>();
- user = [SELECT Id,Alias from User];
+ user = [SELECT Id,Alias,Alias__c from User];
String res ='';
try {
@@ -135,8 +139,59 @@
return res;
}
+ // 鏍规嵁ID淇悊鎶ヤ环鎻愪氦
+ @AuraEnabled
+ public static String updateQisForRCRecieved(String QId,String uid){
+ String res='';
+ try {
+ List<User> user = new List<User>();
+ user = [SELECT Id,Alias,Alias__c from User];
+
+ QIS_Report__c rac = new QIS_Report__c();
+ rac.Id = QId;
+ rac.QIS_Status__c = 'RC妫�娴嬩腑';
+ rac.OCM_RC_RecievedDate__c = Date.today();
+ rac.RC__c = uid;
+ rac.RC_Receive_staff__c = user[0].Alias;
+ List<User> records = new List<User>();
+ records = [SELECT Id, BuchangApprovalManagerSales__c,JingliApprovalManager__c, BuchangApprovalManager__c, ZongjianApprovalManager__c FROM User WHERE Id=: uid ];
+ if (records != null && records.size() > 0 && records[0].BuchangApprovalManagerSales__c != null) {
+ rac.RC_Manager__c = records[0].BuchangApprovalManagerSales__c;
+ } else {
+ rac.RC_Manager__c = uid;
+ }
+ rac.CDS_date__c = Date.today();
+ rac.RC_CDS_staff__c = user[0].Alias__c;
+ rac.OCSM_Nogoods__c = true;
+ update rac;
+ } catch (Exception e) {
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ res = e.getMessage();
+ }
+ return res;
+ }
+
+ // 鏌ユ壘绠�妗�
+ @AuraEnabled
+ public static List<Profile> initSelectProfile(String profileId){
+ List<Profile> res = new List<Profile>();
+ try{
+ res = [SELECT Id,name FROM Profile WHERE Id=: profileId ];
+ }catch(Exception e){
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ }
+ return res;
+ }
+
public class InitData{
@AuraEnabled
+ public String isAEProfileC;
+ @AuraEnabled
+ public String isCNBuyC;
+ @AuraEnabled
+ public String isPAEProfileC;
+
+ @AuraEnabled
public String Id;
@AuraEnabled
public String Name;
--
Gitblit v1.9.1