| | |
| | | public static Boolean done { get; set; } |
| | | /*****************画面表示Bean******************/ |
| | | //页面主数据显示用 |
| | | private static List<ConsumableorderdetailsInfo> consumableorderdetailsRecords; |
| | | public static List<ConsumableorderdetailsInfo> consumableorderdetailsRecords { get; set; } |
| | | //盘点到的产品 |
| | | public static List<Consumable_order_details2__c> reSet = new List<Consumable_order_details2__c>(); |
| | | public static List<Consumable_order_details2__c> showcod2nid = new List<Consumable_order_details2__c>(); |
| | |
| | | public static List<ConsumableorderdetailsInfo> consumableorderdetailsRecordserrordummy; // 丢失和巡回的,实际炒作用 |
| | | @AuraEnabled |
| | | public static List<List<ConsumableorderdetailsInfo>> consumableorderdetailsRecordsview { get; set; } // 产品单位的List |
| | | public static List<Consumable_order_details2__c> InsListUp = New List<Consumable_order_details2__c>(); |
| | | |
| | | public static List<ConsumableorderdetailsInfo> consumableorderdetailsviewRecords; |
| | | |
| | |
| | | AND Product_Type__c like : sqlagencyProType |
| | | AND Arrive_Owner_Work_Location__c =: userWorkLocation |
| | | AND Dealer_Info_text__c = :accountName]; |
| | | System.debug('ProductCount_Res==>'+ProductCount_Res); |
| | | //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'ProductCount_Res ' + ProductCount_Res.size())); |
| | | for(Integer i = 0 ; i< ProductCount_Res.size();i++){ |
| | | //然后循环CountDel做Box和piece2个map |
| | |
| | | AND Arrive_Owner_Work_Location__c =: userWorkLocation |
| | | AND Dealer_Info_text__c = :accountName ]; |
| | | reFindProduct.clear(); |
| | | System.debug('ProductCount_Res==>'+ProductCount_Res); |
| | | Map<String,ConsumableorderdetailsInfo> barCodeListAdjustMap = new Map<String,ConsumableorderdetailsInfo>(); |
| | | //barCodeListLoseMap.clear(); |
| | | Set<String> carCodeListLose = new Set<String>(); |
| | |
| | | AND Bar_Code__c in :carCodeListLose |
| | | AND Dealer_Info_text__c = :accountName |
| | | ORDER BY Name ]; |
| | | System.debug('reSet1==>'+reSet1); |
| | | Map<String,Consumable_order_details2__c> needreturnMap = new Map<String,Consumable_order_details2__c>(); |
| | | for(Consumable_order_details2__c cod2 :reSet1){ |
| | | needreturnMap.put(cod2.Bar_Code__c,cod2); |
| | |
| | | pandiandetailsListShow.add(pandiandetailsListMid); |
| | | } |
| | | |
| | | PaginatedAccounts paginatedAccounts = new PaginatedAccounts(); |
| | | totalCount = codPageRecords.size(); |
| | | paginatedAccounts.nextPageToken = (pageToken + pageSize < totalCount) ? pageToken + pageSize : null; |
| | | paginatedAccounts.recordStart = pageToken + 1; |
| | | paginatedAccounts.pageNumber = pageToken / pageSize + 1; |
| | | Integer recordEnd = pageSize * paginatedAccounts.pageNumber; |
| | | paginatedAccounts.recordEnd = totalCount >= recordEnd ? recordEnd : totalCount; |
| | | paginatedAccounts.totalRecords = totalCount; |
| | | //分页 |
| | | PaginatedAccounts paginatedAccounts = new PaginatedAccounts(); |
| | | totalCount = codPageRecords.size(); |
| | | paginatedAccounts.nextPageToken = (pageToken + pageSize < totalCount) ? pageToken + pageSize : null; |
| | | paginatedAccounts.recordStart = pageToken + 1; |
| | | paginatedAccounts.pageNumber = pageToken / pageSize + 1; |
| | | Integer recordEnd = pageSize * paginatedAccounts.pageNumber; |
| | | paginatedAccounts.recordEnd = totalCount >= recordEnd ? recordEnd : totalCount; |
| | | paginatedAccounts.totalRecords = totalCount; |
| | | |
| | | Integer startIdx; |
| | | Integer endIdx; |
| | | List<ConsumableorderdetailsInfo> pageCodeRecords = new List<ConsumableorderdetailsInfo>(); |
| | | startIdx = pageToken; |
| | | endIdx = startIdx + pageSize; |
| | | if (endIdx > codPageRecords.size()) { |
| | | endIdx = codPageRecords.size(); |
| | | } |
| | | for (Integer i = startIdx; i < endIdx; i++) { |
| | | pageCodeRecords.add(codPageRecords.get(i)); |
| | | } |
| | | Integer startIdx; |
| | | Integer endIdx; |
| | | List<ConsumableorderdetailsInfo> pageCodeRecords = new List<ConsumableorderdetailsInfo>(); |
| | | startIdx = pageToken; |
| | | endIdx = startIdx + pageSize; |
| | | if (endIdx > codPageRecords.size()) { |
| | | endIdx = codPageRecords.size(); |
| | | } |
| | | for (Integer i = startIdx; i < endIdx; i++) { |
| | | pageCodeRecords.add(codPageRecords.get(i)); |
| | | } |
| | | |
| | | data.put('paginatedAccounts', paginatedAccounts); |
| | | data.put('codPageRecords',JSON.serialize(codPageRecords)); |
| | | data.put('consumableorderdetailsRecords',JSON.serialize(consumableorderdetailsRecords)); |
| | | data.put('consumableorderdetailsRecords',JSON.serialize(consumableorderdetailsRecords)); |
| | | data.put('pandiandetailsMap',pandiandetailsMap); |
| | | System.debug('iSinventory===>'+iSinventory); |
| | | System.debug('codPageRecords===>'+codPageRecords); |
| | | data.put('iSinventory',JSON.serialize(iSinventory)); |
| | | data.put('reSet1',JSON.serialize(reSet1)); |
| | | res.code = 200; |
| | | res.status = 'Success1'; |
| | | // res.msg = 'barcode为空'; |
| | | return res; |
| | | // return; |
| | | data.put('paginatedAccounts', paginatedAccounts); |
| | | data.put('pageCodeRecords', pageCodeRecords); |
| | | |
| | | //end |
| | | data.put('codPageRecords',JSON.serialize(codPageRecords)); |
| | | data.put('consumableorderdetailsRecords',JSON.serialize(consumableorderdetailsRecords)); |
| | | data.put('consumableorderdetailsRecordsview',JSON.serialize(consumableorderdetailsRecordsview)); |
| | | data.put('pandiandetailsMap',pandiandetailsMap); |
| | | System.debug('iSinventory===>'+iSinventory); |
| | | System.debug('codPageRecords===>'+codPageRecords); |
| | | data.put('iSinventory',JSON.serialize(iSinventory)); |
| | | data.put('reSet1',reSet1); |
| | | System.debug('reSet1===>'+reSet1); |
| | | res.code = 200; |
| | | res.status = 'Success1'; |
| | | |
| | | return res; |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | data.put('reSet',reSet); |
| | | data.put('consumableorderdetailsRecordsview',JSON.serialize(consumableorderdetailsRecordsview)); |
| | | System.debug('=====>consumableorderdetailsRecordsview'+consumableorderdetailsRecordsview); |
| | | |
| | | |
| | | |
| | | |
| | | res.code = 200; |
| | | res.status = 'Sucess'; |
| | | return res; |
| | | } |
| | | // @AuraEnabled |
| | | // public static ResponseBodyLWC saveConfirm(Boolean iSinventory,String consumableorderdetailsRecordsLWC,String eSetId ) { |
| | | // ResponseBodyLWC res = new ResponseBodyLWC(); |
| | | // Map<String,object> data = new Map<String,object>(); |
| | | // res.entity = data; |
| | | |
| | | // save(iSinventory,consumableorderdetailsRecordsLWC); |
| | | // LexInventoryListController.init(eSetId); |
| | | |
| | | // res.code = 200; |
| | | // res.status = 'Sucess'; |
| | | // return res; |
| | | // } |
| | | |
| | | // 保存按钮 |
| | | @AuraEnabled |
| | | public static ResponseBodyLWC save(Boolean iSinventory,String consumableorderdetailsRecordsLWC,String accountid,String agencyProType,Map<Id,String> pandiandetailsMap,List<Consumable_order_details2__c> reSet) { |
| | |
| | | // 跳过明细2不必要更新 |
| | | StaticParameter.EscapeConsumableOrderDetail2Trigger = true; |
| | | if(!iSinventory){ |
| | | return new ResponseBodyLWC('Error',500, '请先点【BarCode录入】', ''); |
| | | return new ResponseBodyLWC('Error',500, '请先录入BarCode', ''); |
| | | // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'请先点【BarCode录入】')); |
| | | // return null; |
| | | } |
| | |
| | | /************************************************************************************************/ |
| | | // return ProS(); |
| | | data.put('eSetId',eSetId); |
| | | data.put('InsListUp',InsListUp); |
| | | res.status = 'Success'; |
| | | res.code = 200; |
| | | System.debug('res = ' + res); |