From e3c02c03dd2de442bbced87236f60a13a1cd154e Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期四, 02 三月 2023 17:51:57 +0800
Subject: [PATCH] gzw 正式环境最新代码更新

---
 force-app/main/default/classes/DirectAssignController.cls |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/force-app/main/default/classes/DirectAssignController.cls b/force-app/main/default/classes/DirectAssignController.cls
index 4e13a23..48ad8bc 100644
--- a/force-app/main/default/classes/DirectAssignController.cls
+++ b/force-app/main/default/classes/DirectAssignController.cls
@@ -294,6 +294,7 @@
     	detail.Shipment_Status_Text__c = '鏆傚畾鍒嗛厤';
     	// 澶囧搧瀛樻斁鍦�(鍊熷嚭鏃�)
     	detail.Internal_asset_location_before__c = raesd.Internal_asset_location_before__c;
+    	detail.UniqueKey_Queue__c = null;
     	// if(detail.Queue_Day__c == null){
     	// 	detail.Queue_User__c   = UserInfo.getUserId();
      //        detail.Queue_Day__c    = Date.today();
@@ -368,6 +369,7 @@
     }
 
     public static void reQueue(Rental_Apply_Equipment_Set_Detail__c detail,String updownType){
+    	List<Rental_Apply_Equipment_Set_Detail__c> updList = new List<Rental_Apply_Equipment_Set_Detail__c>();
 
     	detail =  [SELECT Id, Rental_Apply_Equipment_Set__c, Asset__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c,QuenType__c,
                                                FSD_Fixture_Model_No__c, Fixture_Model_No_text__c,Externalkey__c,Rental_Apply__r.Product_category__c,
@@ -466,7 +468,7 @@
             }
         }
         System.debug(LoggingLevel.INFO, '*** detail: ' + detail);
-        update detail;
+        updList.add(detail);
         insert allsequenceList;
         if(updownType != 'bottom'){
         	Integer i = 2;
@@ -474,15 +476,16 @@
         		sdetail.Queue_Number__c = i;
         		i ++;
         	}
-        	update updateList;
+        	updList.addAll(updateList);
         }else{
 	        Integer i = 1;
         	for(Rental_Apply_Equipment_Set_Detail__c sdetail:updateList){
         		sdetail.Queue_Number__c = i;
         		i ++;
         	}
-        	update updateList;	
+        	updList.addAll(updateList);
         }
+        update updList;
         allsequenceList = [SELECT Id,ExternalKey__c,Demo_Purpose2__c,Rental_Apply__r.Request_shipping_day__c,Rental_Apply__r.EquipmentGuaranteeFlg__c,
                                                         Apply_Set_Detail__c,Apply_Set_Detail_ExternalKey__c,Rental_Apply__r.Request_approval_time__c,Apply_Set_Detail__r.IsAdjust__c,
                                                         Series_No__c,Salesdepartment__c,Product_category__c,Apply_Set_Detail__r.Queue_Day__c,Apply_Set_Detail__r.Queue_Time__c,

--
Gitblit v1.9.1