From a8628cfe2640797ba9265e9be46c42430d9e7eba Mon Sep 17 00:00:00 2001
From: twysparks <twysparks@163.com>
Date: 星期一, 26 六月 2023 10:01:44 +0800
Subject: [PATCH] 服务按钮样式调整
---
force-app/main/default/classes/buttonAssetCtl.cls | 80 +++++++++++++++++++++++++++++++++++++++
1 files changed, 79 insertions(+), 1 deletions(-)
diff --git a/force-app/main/default/classes/buttonAssetCtl.cls b/force-app/main/default/classes/buttonAssetCtl.cls
index 8e8152d..97e170d 100644
--- a/force-app/main/default/classes/buttonAssetCtl.cls
+++ b/force-app/main/default/classes/buttonAssetCtl.cls
@@ -7,8 +7,18 @@
public static InitData init(String recordId){
InitData res = new initData();
try{
- Asset report = [SELECT Id,NoPartRiskDate_F__c,Product_ID__c,AccountId,HP_Id__c,Hospital__c,Hospital__r.Id,Department_Class__c,Department_Class__r.Id,Name FROM Asset WHERE Id =: recordId LIMIT 1];
+ Asset report = [SELECT Order_No__c,SerialNumber,Asset_day__c,Posting_Date__c,InstallDate,Asset_Owner__c,AssetMark__c,Id,NoPartRiskDate_F__c,Product_ID__c,AccountId,HP_Id__c,Hospital__c,Hospital__r.Id,Department_Class__c,Department_Class__r.Id,Name FROM Asset WHERE Id =: recordId LIMIT 1];
System.debug(LoggingLevel.INFO, '*** opp: ' + report);
+
+ res.AssetMarkC = report.AssetMark__c;
+ res.AssetOwnerC = report.Asset_Owner__c;
+ res.InstallDate = report.InstallDate;
+ res.PostingDateC = report.Posting_Date__c;
+ res.AssetDayC = report.Asset_day__c;
+ res.SerialNumber = report.SerialNumber;
+ res.OrderNoC = report.Order_No__c;
+
+
res.Id = report.Id;
res.Name = report.Name;
res.NoPartRiskDateFC = report.NoPartRiskDate_F__c;
@@ -91,6 +101,16 @@
}
}
+ @AuraEnabled
+ public static List<QIS_Report__c> selecctQISReportrByFomatToday(String AssetId, Date fomatToday){
+ try {
+ List<QIS_Report__c> accounts = [SELECT id,QIS_Submit_day__c from QIS_Report__c where nonyushohin__c=:AssetId and QIS_Submit_day__c != null and QIS_Submit_day__c >=: fomatToday];
+ return accounts;
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ }
+
//鏌ヨRepair__c
@AuraEnabled
public static List<Account> selecctAccountByAccountId(String AccountId){
@@ -102,8 +122,66 @@
}
}
+ @AuraEnabled
+ public static String selectCASE(String AssetOwnerC){
+ String res='';
+ if(AssetOwnerC.equals('鐥呴櫌璩囩敚')){
+ res='鐥呴櫌璩囩敚';
+ }else if(AssetOwnerC.equals('璐拱')){
+ res='璐拱';
+ }
+ else if(AssetOwnerC.equals('Olympus')){
+ res='Olympus';
+ }
+ else if(AssetOwnerC.equals('澶囧搧')){
+ res='澶囧搧';
+ }
+ else if(AssetOwnerC.equals('銉兗銈逛細绀�')){
+ res='銉兗銈逛細绀�';
+ }
+ else if(AssetOwnerC.equals('鍏朵粬')){
+ res='鍏朵粬';
+ }
+ else if(AssetOwnerC.equals('缁忛攢鍟嗚祫浜�')){
+ res='缁忛攢鍟嗚祫浜�';
+ }else{
+ res='';
+ }
+ return res;
+ }
+
+ @AuraEnabled
+ public static String selectNullvalue(String InstallDate,String PostingDateC,String AssetDayC){
+ String res='';
+ if(InstallDate!=null){
+ res=InstallDate;
+ }else {
+ if(PostingDateC!=null){
+ res=PostingDateC;
+ }else {
+ res=AssetDayC;
+ }
+ }
+ return res;
+ }
+
public class InitData{
@AuraEnabled
+ public String AssetMarkC;
+ @AuraEnabled
+ public String AssetOwnerC;
+ @AuraEnabled
+ public Date InstallDate;
+ @AuraEnabled
+ public Date PostingDateC;
+ @AuraEnabled
+ public Date AssetDayC;
+ @AuraEnabled
+ public String SerialNumber;
+ @AuraEnabled
+ public String OrderNoC;
+
+ @AuraEnabled
public String Id;
@AuraEnabled
public String userID;
--
Gitblit v1.9.1