From b40a8ed02c127f594fdf3d41ea69c006c1e86a60 Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期四, 20 七月 2023 15:38:53 +0800
Subject: [PATCH] button-lexConsumSelect
---
force-app/main/default/classes/lexConsumApplyController.cls | 64 ++++++++++++++++++++++++++++++++
force-app/main/default/classes/lexConsumApplyController.cls-meta.xml | 5 ++
2 files changed, 69 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/classes/lexConsumApplyController.cls b/force-app/main/default/classes/lexConsumApplyController.cls
new file mode 100644
index 0000000..41a9c8d
--- /dev/null
+++ b/force-app/main/default/classes/lexConsumApplyController.cls
@@ -0,0 +1,64 @@
+public with sharing class lexConsumApplyController {
+
+ @AuraEnabled
+ public static InitData init(String recordId){
+ InitData res = new InitData();
+ try {
+ List<Consum_Apply__c> caList = [SELECT Id, Campaign__c, Campaign__r.Status, Wei_Assigned_Cnt__c, Status__c,
+ Assigned_Not_Shipment__c,Bollow_Date__c,Yi_loaner_arranged__c
+ FROM Consum_Apply__c WHERE Id = :recordId];
+ if(caList.size()>0){
+ Consum_Apply__c ca = caList[0];
+ if(ca.Campaign__c != null){
+ res.campaignId = ca.Campaign__c;
+ }
+ res.weiAssignedCnt = Integer.valueOf(ca.Wei_Assigned_Cnt__c);
+ res.consumApplyStatus = ca.Status__c;
+ res.campaignStatus = ca.Campaign__r.Status;
+ res.assignedNotShipment = Integer.valueOf(ca.Assigned_Not_Shipment__c);
+ res.bollowDate = ca.Bollow_Date__c;
+ res.yiLoanerArranged = Integer.valueOf(ca.Yi_loaner_arranged__c);
+ }
+ }
+ catch (Exception e) {
+ System.debug('********lexConsumApplyController*****'+e.getMessage());
+ }
+ return res;
+ }
+
+ @AuraEnabled
+ public static Integer getLength1(String recordId){
+ //AND Shippment_loaner_time__c != null
+ List<Consum_Apply_Equipment_Set__c> caeList = [SELECT Id from Consum_Apply_Equipment_Set__c WHERE Consum_Apply__c =:recordId AND RAES_Status__c != '宸插垎閰�' AND RAES_Status__c != '鍙栨秷鍒嗛厤'];
+ return caeList.size();
+ }
+
+ @AuraEnabled
+ public static Integer getLength2(String recordId){
+ List<Consum_Apply_Equipment_Set__c> caeList = [SELECT Id from Consum_Apply_Equipment_Set__c WHERE Consum_Apply__c =:recordId AND RAES_Status__c != '宸插垎閰�' AND RAES_Status__c != '鍙栨秷鍒嗛厤'];
+ return caeList.size();
+ }
+
+ @AuraEnabled
+ public static Consum_Apply_Equipment_Set__c getSet(String setId){
+ Consum_Apply_Equipment_Set__c cae = [select Id, Zan_Ding_Fen_Pei_Shu__c from Consum_Apply_Equipment_Set__c where Id= :setId];
+ return cae;
+ }
+
+ public class InitData{
+ @AuraEnabled
+ public String campaignId; //瀛︿細Id
+ @AuraEnabled
+ public String campaignStatus; //瀛︿細鐘舵��
+ @AuraEnabled
+ public Integer weiAssignedCnt; //鏈垎閰嶄欢鏁�
+ @AuraEnabled
+ public String consumApplyStatus; //鐘舵��
+ @AuraEnabled
+ public Integer assignedNotShipment; //宸插垎閰嶆湭鍑哄簱鎸囩ず
+ @AuraEnabled
+ public Date bollowDate; //澶囧搧涓績鍑哄簱鏃�
+ @AuraEnabled
+ public Integer yiLoanerArranged; //宸插嚭搴撲欢鏁�
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexConsumApplyController.cls-meta.xml b/force-app/main/default/classes/lexConsumApplyController.cls-meta.xml
new file mode 100644
index 0000000..9662499
--- /dev/null
+++ b/force-app/main/default/classes/lexConsumApplyController.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>50.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
\ No newline at end of file
--
Gitblit v1.9.1