| | |
| | | public with sharing class rentalApplyEquipmentRentalPDFController { |
| | | public rentalApplyEquipmentRentalPDFController() { |
| | | |
| | | } |
| | | public with sharing class RentalApplyEquipmentRentalPDFController { |
| | | |
| | | @AuraEnabled |
| | | public static InitData initJumptoPDFButton(String recordId) { |
| | | InitData res = new InitData(); |
| | | try { |
| | | Rental_Apply__c ra = [SELECT Id,Shipment_requested_cnt__c from Rental_Apply__c where Id = :recordId]; |
| | | List<Rental_Apply_Equipment_Set__c> raeSet = [SELECT Id from Rental_Apply_Equipment_Set__c where Rental_Apply__c = :recordId and Yi_Shipment_request__c > 0 and RAES_Status__c != '取消']; |
| | | res.shipmentRequestedCnt = Integer.valueOf(ra.Shipment_requested_cnt__c); |
| | | Integer setLength = raeSet.size(); |
| | | res.pageLength = Math.mod(setLength,10)== 0 ? setLength/10 : Math.round(setLength) +1 ; |
| | | }catch(Exception e){ |
| | |
| | | |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String Id; |
| | | public String id; |
| | | @AuraEnabled |
| | | public Integer pageLength; |
| | | @AuraEnabled |
| | | public Integer shipmentRequestedCnt; |
| | | } |
| | | |
| | | } |