| | |
| | | @AuraEnabled |
| | | public static Results init(){ |
| | | Results results = new Results(); |
| | | results.isNoteStay = LexUtility.getIsNoteStay(); |
| | | try { |
| | | List<String> idList = new List<String>(); |
| | | idList.add('a2K10000002zHyDEAU'); |
| | | idList.add('a2K10000002zIJEEA2'); |
| | | idList.add('a2K10000002zK9rEAE'); |
| | | idList.add('a2K10000004AKGBEA4'); |
| | | idList.add('a2K10000004ALqeEAG'); |
| | | idList.add('a2K10000004AMmrEAG'); |
| | | idList.add('a2K10000004ANvDEAW'); |
| | | idList.add('a2K10000004AOVxEAO'); |
| | | idList.add('a2K10000004AOJZEA4'); |
| | | idList.add('a2K10000004AOLuEAO'); |
| | | idList.add('a2K10000004AOLfEAO'); |
| | | // coc = new Consumable_order__c(); |
| | | String userId = UserInfo.getUserId(); |
| | | List<user> Useracc = New List<user>(); |
| | |
| | | soql += ',' + s; |
| | | } |
| | | soql += ' from Consumable_order__c where Order_type__c = \''+'订单'+'\' and recordtypeid =\'' + System.Label.RT_ConOrder_Delivery + '\' and Dealer_Info__c =\'' + accountid +'\' and Order_ProType__c =\'' + agencyProType +'\' and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_Owner_WorkLocal__c = \'' + userWorkLocation + '\' and showFalseNotshowTrue__c = false order by Deliver_date__c'; // |
| | | // soql = 'select id,name,ContractNo__c,Total_num__c,OrderNumber_arrived__c,Delivery_detail_count__c,OrderNumber_notarrive__c,More_than_seven_days__c,Shipment_date__c,First_Delivery__c from Consumable_order__c where id in :idList'; |
| | | raesList = Database.query(soql); |
| | | //20200904 ljh add start |
| | | Total_num = 0; |
| | |
| | | More_than_seven_days = 0; |
| | | System.debug('-----1------'+raesList); |
| | | for(Consumable_order__c conorder :raesList){ |
| | | Total_num += (Integer)conorder.Total_num__c; |
| | | OrderNumber_arrived += (Integer)conorder.OrderNumber_arrived__c; |
| | | Delivery_detail_count += (Integer)conorder.Delivery_detail_count__c; |
| | | OrderNumber_notarrive += (Integer)conorder.OrderNumber_notarrive__c; |
| | | More_than_seven_days += (Integer)conorder.More_than_seven_days__c; |
| | | if(conorder.Total_num__c != null){ |
| | | Total_num += (Integer)conorder.Total_num__c; |
| | | } |
| | | if(conorder.OrderNumber_arrived__c != null){ |
| | | OrderNumber_arrived += (Integer)conorder.OrderNumber_arrived__c; |
| | | } |
| | | if(conorder.Delivery_detail_count__c != null){ |
| | | Delivery_detail_count += (Integer)conorder.Delivery_detail_count__c; |
| | | } |
| | | if(conorder.OrderNumber_notarrive__c != null){ |
| | | OrderNumber_notarrive += (Integer)conorder.OrderNumber_notarrive__c; |
| | | } |
| | | if(conorder.More_than_seven_days__c != null){ |
| | | More_than_seven_days += (Integer)conorder.More_than_seven_days__c; |
| | | } |
| | | } |
| | | results.agencyProType = agencyProType; |
| | | results.accountId = accountid; |
| | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static Results searchConsumableorderdetails(){ |
| | | public static Results searchConsumableorderdetails(String category1Str, Date cate2Str, String accountidStr, String userWorkLocationStr, String agencyProTypeStr){ |
| | | Results results = new Results(); |
| | | category1 = category1Str; |
| | | cate2 = cate2Str; |
| | | accountid = accountidStr; |
| | | userWorkLocation = userWorkLocationStr; |
| | | agencyProType = agencyProTypeStr; |
| | | try { |
| | | // cate2 = coc.Shipment_date__c; |
| | | // 获得订单一览 |
| | |
| | | soql += ' order by Deliver_date__c'; |
| | | system.debug('====soql:' + soql); |
| | | raesList = Database.query(soql); |
| | | results.raesList = raesList; |
| | | results.result = 'Success'; |
| | | } catch (Exception e) { |
| | | results.result = 'Fail'; |
| | |
| | | public Integer orderNumberNotarrive; |
| | | @AuraEnabled |
| | | public Integer moreThanSevenDays; |
| | | @AuraEnabled |
| | | public Boolean isNoteStay; |
| | | } |
| | | } |