高章伟
2023-03-02 e3c02c03dd2de442bbced87236f60a13a1cd154e
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,