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/LexSummonsCreatController.cls | 67 ++++++++++++++++----------------- 1 files changed, 33 insertions(+), 34 deletions(-) diff --git a/force-app/main/default/classes/LexSummonsCreatController.cls b/force-app/main/default/classes/LexSummonsCreatController.cls index f5fb177..df46d82 100644 --- a/force-app/main/default/classes/LexSummonsCreatController.cls +++ b/force-app/main/default/classes/LexSummonsCreatController.cls @@ -245,13 +245,7 @@ // 鐢婚潰鍒濆鍖� @AuraEnabled - public static ResponseBodyLWC init( - String ESetidJs, - String statusEdit, - Integer pageSizeLWC, - Integer pageTokenLWC, - String arriveorderLWC - ) { + public static ResponseBodyLWC init(String ESetidJs, String statusEdit, Integer pageSizeLWC, Integer pageTokenLWC,String arriveorderLWC) { try { firstInit(ESetidJs); statusEdit = statusEdit; @@ -1400,7 +1394,7 @@ System.debug('res = ' + res); return res; } catch (Exception e) { - return new ResponseBodyLWC('Error', 500, e.getMessage() + e.getLineNumber(), ''); + return new ResponseBodyLWC('Error',500, e.getMessage() + e.getLineNumber(), ''); } } @@ -2128,7 +2122,11 @@ return new ResponseBodyLWC( 'Error', 500, - '缁忛攢鍟�:' + coc.Order_ForDealerText__c + ' 娌℃湁娑堣�楀搧:' + proStr.substring(0, proStr.length() - 1) + ' 鐨勭壒浠�', + '缁忛攢鍟�:' + + coc.Order_ForDealerText__c + + ' 娌℃湁娑堣�楀搧:' + + proStr.substring(0, proStr.length() - 1) + + ' 鐨勭壒浠�', '' ); } @@ -2185,10 +2183,7 @@ if (ass.orderdetails1.Delivery_List_RMB__c == null && coc.SummonsForDirction__c != '鍖婚櫌璇曠敤') { return new ResponseBodyLWC('Error', 500, '璇疯緭鍏ユ纭殑鍑鸿揣鍗曚环 (鍏�)', ''); } - if ( - (ass.orderdetails1.Delivery_List_RMB__c == null || ass.orderdetails1.Delivery_List_RMB__c == 0) && - coc.SummonsForDirction__c != '鍖婚櫌璇曠敤' - ) { + if ((ass.orderdetails1.Delivery_List_RMB__c == null || ass.orderdetails1.Delivery_List_RMB__c == 0) && coc.SummonsForDirction__c != '鍖婚櫌璇曠敤') { return new ResponseBodyLWC('Error', 500, '璇疯緭鍏ュ嚭璐у崟浠� (鍏�)', ''); } if ( @@ -2220,7 +2215,9 @@ return new ResponseBodyLWC( 'Error', 500, - '娑堣�楀搧' + ass.orderdetails1.Consumable_Product__r.Name__c + '搴撳瓨涓嶈冻', + '娑堣�楀搧' + + ass.orderdetails1.Consumable_Product__r.Name__c + + '搴撳瓨涓嶈冻', '' ); } @@ -2236,7 +2233,9 @@ return new ResponseBodyLWC( 'Error', 500, - '娑堣�楀搧' + ass.orderdetails1.Consumable_Product__r.Name__c + '搴撳瓨涓嶈冻', + '娑堣�楀搧' + + ass.orderdetails1.Consumable_Product__r.Name__c + + '搴撳瓨涓嶈冻', '' ); } @@ -2342,10 +2341,7 @@ return new ResponseBodyLWC('Error', 500, '璇疯緭鍏ユ纭殑鍑鸿揣鍗曚环 (鍏�)', ''); } Consumable_orderdetails__c InsAfterDel = new Consumable_orderdetails__c(); - if ( - (ass.orderdetails1.Delivery_List_RMB__c == null || ass.orderdetails1.Delivery_List_RMB__c == 0) && - coc.SummonsForDirction__c != '鍖婚櫌璇曠敤' - ) { + if ((ass.orderdetails1.Delivery_List_RMB__c == null || ass.orderdetails1.Delivery_List_RMB__c == 0) && coc.SummonsForDirction__c != '鍖婚櫌璇曠敤') { return new ResponseBodyLWC('Error', 500, '璇疯緭鍏ュ嚭璐у崟浠� (鍏�)', ''); } if ( @@ -2371,7 +2367,9 @@ return new ResponseBodyLWC( 'Error', 500, - '娑堣�楀搧' + ass.orderdetails1.Consumable_Product__r.Name__c + '搴撳瓨涓嶈冻', + '娑堣�楀搧' + + ass.orderdetails1.Consumable_Product__r.Name__c + + '搴撳瓨涓嶈冻', '' ); } @@ -2386,7 +2384,9 @@ return new ResponseBodyLWC( 'Error', 500, - '娑堣�楀搧' + ass.orderdetails1.Consumable_Product__r.Name__c + '搴撳瓨涓嶈冻', + '娑堣�楀搧' + + ass.orderdetails1.Consumable_Product__r.Name__c + + '搴撳瓨涓嶈冻', '' ); } @@ -2534,7 +2534,7 @@ // FROM Account // WHERE // // Name = '濂ユ灄宸存柉锛堝寳浜級閿�鍞湇鍔℃湁闄愬叕鍙�' - // // AND + // // AND // Name LIKE :nameCondition // AND RecordType.DeveloperName = 'AgencyContract' // AND Contract_Decide_Start_Date__c >= :thisDatetime @@ -2550,7 +2550,7 @@ // FROM Account // WHERE // // Name = '濂ユ灄宸存柉锛堝寳浜級閿�鍞湇鍔℃湁闄愬叕鍙�' - // // AND + // // AND // Name LIKE :nameCondition // AND RecordType.DeveloperName = 'AgencyContract' // AND Contract_Decide_Start_Date__c >= :thisDatetime @@ -2561,6 +2561,7 @@ // ]; // } + Date today = Date.today(); //Date today = Date.newInstance(2023, 3, 1); Integer thisMonth = today.month(); @@ -2569,7 +2570,7 @@ Integer lastYear = today.year() - 1; Integer thisYear = today.year(); Integer nextYear = today.year() + 1; - + Date lastDatetime = Date.newInstance(lastYear, 4, 1); Date thisDatetime = Date.newInstance(thisYear, 4, 1); Date thisDatetime2 = Date.newInstance(thisYear, 7, 1); @@ -2579,14 +2580,14 @@ System.debug('thisDatetime2 = ' + thisDatetime2); System.debug('nextDatetime = ' + nextDatetime); System.debug('UserInfo.getUserId() = ' + UserInfo.getUserId()); - User UserProTypecTemp = [SELECT UserPro_Type__c FROM User WHERE id = :UserInfo.getUserId()]; + User UserProTypecTemp = [select UserPro_Type__c from User where id =: UserInfo.getUserId()]; String sql = 'SELECT id, Parentid FROM Account WHERE Parent.Name LIKE :nameCondition '; - if (thisMonth < 4) { + if(thisMonth < 4){ sql += 'AND Contract_Decide_Start_Date__c >= :lastDatetime AND Contract_Decide_End_Date__c < :thisDatetime2 '; - } else if (thisMonth >= 4 && thisMonth <= 6) { + }else if(thisMonth >= 4 && thisMonth <= 6){ sql += 'AND Contract_Decide_Start_Date__c >= :lastDatetime AND Contract_Decide_End_Date__c < :nextDatetime '; - } else { + }else{ sql += 'AND Contract_Decide_Start_Date__c >= :thisDatetime AND Contract_Decide_End_Date__c < :nextDatetime '; } if (UserProTypecTemp.UserPro_Type__c == 'ENG') { @@ -2688,15 +2689,15 @@ //鍒犻櫎闄勪欢 @AuraEnabled - public static ResponseBodyLWC deleteAtt(String contentVersionId) { + public static ResponseBodyLWC deleteAtt(String contentVersionId){ try { ContentVersion conVersion = [SELECT ContentDocumentId FROM ContentVersion WHERE Id = :contentVersionId]; String contentDocumentId = conVersion.ContentDocumentId; - ContentDocument conDocument = [SELECT Id FROM ContentDocument WHERE Id = :contentDocumentId]; + ContentDocument conDocument = [SELECT Id FROM ContentDocument where Id = :contentDocumentId]; delete conDocument; - return new ResponseBodyLWC('Success', 200, '', ''); + return new ResponseBodyLWC('Success',200,'',''); } catch (Exception e) { - return new ResponseBodyLWC('Error', 500, e.getMessage() + e.getLineNumber(), ''); + return new ResponseBodyLWC('Error',500, e.getMessage() + e.getLineNumber(), ''); } } @@ -2775,7 +2776,6 @@ } // Data Bean - @TestVisible class ConsumableorderdetailsInfo implements Comparable { @AuraEnabled public Boolean check { get; set; } @@ -2916,7 +2916,6 @@ } } - @TestVisible class ConsumableorderdetailsInfoLwc { @AuraEnabled public Boolean check { get; set; } -- Gitblit v1.9.1