| | |
| | | // 暂定分配数据指定给对象有的情况 |
| | | targetId = ApexPages.currentPage().getParameters().get('targetId'); |
| | | if(String.isNotEmpty(recordId)){ |
| | | raesd = [SELECT Id,Fixture_Model_No_text__c,Asset__c,Rental_Apply__r.Name,Rental_Apply_Equipment_Set__r.Name, |
| | | List<Rental_Apply_Equipment_Set_Detail__c> TempList = [SELECT Id,Fixture_Model_No_text__c,Asset__c,Rental_Apply__r.Name,Rental_Apply_Equipment_Set__r.Name, |
| | | Queue_Day__c,Queue_Number__c,Rental_Apply__r.WorkPlace__c,Rental_Apply__r.Person_In_Charge__r.Name, |
| | | Rental_Apply__r.demo_purpose2__c,Queue_Conment__c,Equipment_Type_text__c,Salesdepartment_before__c, |
| | | Internal_asset_location_before__c,jumpReason__c,Queue_User__r.Name,Rental_Apply__r.Hospital__r.Name,Rental_Apply__c, |
| | |
| | | FROM Rental_Apply_Equipment_Set_Detail__c |
| | | WHERE Is_Body__c=true |
| | | AND Rental_Apply_Equipment_Set__c=:recordId limit 1]; |
| | | raesd = TempList[0]; |
| | | assetId = raesd.Asset__c; |
| | | String soql = null; |
| | | if (String.isNotEmpty(targetId)) { |
| | |
| | | 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(); |
| | |
| | | } |
| | | |
| | | 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, |
| | |
| | | } |
| | | } |
| | | System.debug(LoggingLevel.INFO, '*** detail: ' + detail); |
| | | update detail; |
| | | updList.add(detail); |
| | | insert allsequenceList; |
| | | if(updownType != 'bottom'){ |
| | | Integer i = 2; |
| | |
| | | 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, |