From b5c5eb130ca0848124f9d136af4be142ad5aac07 Mon Sep 17 00:00:00 2001 From: binxie <137736985@qq.com> Date: 星期一, 26 六月 2023 14:42:02 +0800 Subject: [PATCH] backup0626 --- force-app/main/default/classes/LexProductLimitEditController.cls | 53 ++++++++++++++++++++++++++--------------------------- 1 files changed, 26 insertions(+), 27 deletions(-) diff --git a/force-app/main/default/classes/LexProductLimitEditController.cls b/force-app/main/default/classes/LexProductLimitEditController.cls index a3b0aeb..3a8ca5b 100644 --- a/force-app/main/default/classes/LexProductLimitEditController.cls +++ b/force-app/main/default/classes/LexProductLimitEditController.cls @@ -4,55 +4,54 @@ //--------AddStart-----XHL--------------20180929------------- public static String userPro_Type { get; set; } public static Boolean EngFlag = false; - public static Boolean ETFlag = false; + public static Boolean ETFlag = false; //--------AddEnd-----XHL--------------20180929------------- // 鐢婚潰鍒濆鍖� - public LexProductLimitEditController() { - accountid = ApexPages.currentPage().getParameters().get('accountid'); + public LexProductLimitEditController (){ + accountid= ApexPages.currentPage().getParameters().get('accountid'); //--------AddStart-----XHL--------------20181008------------- - userPro_Type = ApexPages.currentPage().getParameters().get('userPro_Type'); - if (String.isBlank(userPro_Type)) { + userPro_Type= ApexPages.currentPage().getParameters().get('userPro_Type'); + if(String.isBlank(userPro_Type)){ userPro_Type = 'ET'; } - if (userPro_Type == 'ENG') { + if(userPro_Type == 'ENG'){ EngFlag = true; - } else { + }else{ ETFlag = true; } //--------AddEnd-----XHL--------------20181008------------- } @AuraEnabled - public static ResponseBodyLWC init(String accountid, string userPro_Type) { - System.debug('userPro_Type==>' + userPro_Type); - System.debug('accountid==>' + accountid); + public static ResponseBodyLWC init(String accountid,string userPro_Type) { + System.debug('userPro_Type==>'+userPro_Type); + System.debug('accountid==>'+accountid); ResponseBodyLWC res = new ResponseBodyLWC(); - Map<String, object> data = new Map<String, object>(); + Map<String,object> data = new Map<String,object>(); res.entity = data; - if (String.isBlank(userPro_Type)) { + if(String.isBlank(userPro_Type)){ userPro_Type = 'ET'; } - if (userPro_Type == 'ENG') { + if(userPro_Type == 'ENG'){ EngFlag = true; - } else { + }else{ ETFlag = true; } - List<Account> accinfo = new List<Account>(); + List<Account> accinfo = New List<Account>(); //--------UpdateStart-----XHL--------------20181008------------- - accinfo = [ - SELECT Product_Limit_Date__c, Product_Limit_DateENG__c - FROM Account - WHERE id = :accountid - ]; - if (accinfo.size() > 0) { - if (EngFlag) { - product_Limit = accinfo[0].Product_Limit_DateENG__c; - } else if (ETFlag) { - product_Limit = accinfo[0].Product_Limit_Date__c; + accinfo = [SELECT Product_Limit_Date__c,Product_Limit_DateENG__c + FROM Account + WHERE id =:accountid]; + if(accinfo.size() > 0){ + if(EngFlag){ + product_Limit = accinfo [0].Product_Limit_DateENG__c; + }else if(ETFlag){ + product_Limit = accinfo [0].Product_Limit_Date__c; } + } - System.debug('product_Limit==>' + product_Limit); - data.put('product_Limit', product_Limit); + System.debug('product_Limit==>'+product_Limit); + data.put('product_Limit',product_Limit); res.status = 'Success'; res.code = 200; System.debug('res = ' + res); -- Gitblit v1.9.1