From 0c4796706fc9473d069b620321a54b20a119906c Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期二, 11 七月 2023 14:16:44 +0800
Subject: [PATCH] Merge branch 'LEXUpgrade2023-Deloitte'

---
 force-app/main/default/classes/LexConsumableController.cls |   74 ++++++++++++++++++++++++++++++------
 1 files changed, 61 insertions(+), 13 deletions(-)

diff --git a/force-app/main/default/classes/LexConsumableController.cls b/force-app/main/default/classes/LexConsumableController.cls
index 870954c..853872e 100644
--- a/force-app/main/default/classes/LexConsumableController.cls
+++ b/force-app/main/default/classes/LexConsumableController.cls
@@ -207,7 +207,11 @@
         ESetId = esetId;
         methodType = type;
         if (String.isBlank(methodType) && String.isNotBlank(ESetId)) {
-            List<Consumable_order__c> oclist = [SELECT orderPattern__c FROM Consumable_order__c WHERE id = :ESetid];
+            List<Consumable_order__c> oclist = [
+                SELECT orderPattern__c
+                FROM Consumable_order__c
+                WHERE id = :ESetid
+            ];
             methodType = oclist.get(0).orderPattern__c;
         }
         statusEdit = keywordStr;
@@ -232,7 +236,11 @@
             userId = UserInfo.getUserId();
             List<user> Useracc = new List<user>();
             //lt 20230517 瀹夊窘涓ょエ鍒� add ,OSHFLG__c
-            Useracc = [SELECT accountid, Work_Location__c, UserPro_Type__c, OSHFLG__c FROM user WHERE id = :userId];
+            Useracc = [
+                SELECT accountid, Work_Location__c, UserPro_Type__c, OSHFLG__c
+                FROM user
+                WHERE id = :userId
+            ];
             accountid = Useracc[0].accountid;
             userWorkLocation = Useracc[0].Work_Location__c;
             agencyProType = Useracc[0].UserPro_Type__c;
@@ -551,7 +559,11 @@
                 //         attachmentRecoeds.add(new ConsumableorderdetailsInfo(attachmentinfo[i]));
                 //     }
                 // }
-                List<ContentDocumentLink> links = [SELECT Id, ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId = :ESetId];
+                List<ContentDocumentLink> links = [
+                    SELECT Id, ContentDocumentId
+                    FROM ContentDocumentLink
+                    WHERE LinkedEntityId = :ESetId
+                ];
                 if (links != null && links.size() > 0) {
                     List<String> documentIds = new List<String>();
                     for (ContentDocumentLink link : links) {
@@ -1479,7 +1491,11 @@
         ESetId = eSetidStr;
         try {
             statusEdit = 'Redirect';
-            List<Consumable_order__c> oclist = [SELECT orderPattern__c FROM Consumable_order__c WHERE id = :ESetid];
+            List<Consumable_order__c> oclist = [
+                SELECT orderPattern__c
+                FROM Consumable_order__c
+                WHERE id = :ESetid
+            ];
             String url = '/lexconsumable?ESetid=' + ESetid + '&KeyWords=' + statusEdit + '&type=' + oclist.get(0).orderPattern__c;
             results.result = 'Success';
             results.url = url;
@@ -1499,7 +1515,11 @@
         returnOrder = true;
         try {
             statusEdit = 'Redirect';
-            List<Consumable_order__c> oclist = [SELECT orderPattern__c FROM Consumable_order__c WHERE id = :ESetid];
+            List<Consumable_order__c> oclist = [
+                SELECT orderPattern__c
+                FROM Consumable_order__c
+                WHERE id = :ESetid
+            ];
             String url = '/lexconsumable?ESetid=' + ESetid + '&KeyWords=' + statusEdit + '&type=' + oclist.get(0).orderPattern__c;
             results.result = 'Success';
             results.url = url;
@@ -1523,7 +1543,11 @@
             cv.VersionData = EncodingUtil.base64Decode(base64Data);
             cv.IsMajorVersion = true;
             insert cv;
-            Consumable_order__c c = [SELECT Id FROM Consumable_order__c WHERE Id = :pId];
+            Consumable_order__c c = [
+                SELECT Id
+                FROM Consumable_order__c
+                WHERE Id = :pId
+            ];
             c.Consumable_pdf_insert_day__c = Date.today();
             update c;
             results.result = 'Success';
@@ -1888,7 +1912,11 @@
                     p.orderPattern__c = methodType;
                 }
                 insert p;
-                List<Consumable_order__c> Consumable_order = [SELECT Name, orderPattern__c FROM Consumable_order__c WHERE id = :p.id];
+                List<Consumable_order__c> Consumable_order = [
+                    SELECT Name, orderPattern__c
+                    FROM Consumable_order__c
+                    WHERE id = :p.id
+                ];
                 for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecordsview) {
                     Roll = Roll + 1;
                     if (ass.check == true) {
@@ -1981,7 +2009,11 @@
                     p.Offers_Price__c = bargainPrice;
                 }
                 update p;
-                List<Consumable_order__c> Consumable_order = [SELECT Name, orderPattern__c FROM Consumable_order__c WHERE id = :p.id];
+                List<Consumable_order__c> Consumable_order = [
+                    SELECT Name, orderPattern__c
+                    FROM Consumable_order__c
+                    WHERE id = :p.id
+                ];
                 List<Consumable_Orderdetails__c> qs = new List<Consumable_Orderdetails__c>();
                 qs = [
                     SELECT Id
@@ -2067,13 +2099,29 @@
     public static Results deleteAtt(String contentVersionId, String cocId) {
         Results results = new Results();
         try {
-            List<ContentVersion> cvInfo = [SELECT Id FROM ContentVersion WHERE FirstPublishLocationId = :cocId];
-            ContentVersion conVersion = [SELECT ContentDocumentId FROM ContentVersion WHERE Id = :contentVersionId];
+            List<ContentVersion> cvInfo = [
+                SELECT Id
+                FROM ContentVersion
+                WHERE FirstPublishLocationId = :cocId
+            ];
+            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;
             if (cvInfo.size() <= 1) {
-                Consumable_order__c c = [SELECT Id FROM Consumable_order__c WHERE Id = :cocId];
+                Consumable_order__c c = [
+                    SELECT Id
+                    FROM Consumable_order__c
+                    WHERE Id = :cocId
+                ];
                 c.Consumable_pdf_insert_day__c = null;
                 update c;
             }
@@ -2312,4 +2360,4 @@
         @AuraEnabled
         public String value;
     }
-}
\ No newline at end of file
+}

--
Gitblit v1.9.1