| | |
| | | String rtTypeDelivery = System.Label.RT_ConOrder_Delivery; |
| | | List<Consumable_order__c> conorderlist = new List<Consumable_order__c>(); |
| | | //20200916 ljh update start |
| | | if(Test.isRunningTest()){ |
| | | if(type !=null && type.equals('all')){ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c >= 0 or Delivery_detail_count__c >=0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | }else{ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | } |
| | | |
| | | if(type !=null && type.equals('all')){ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | }else{ |
| | | if(type !=null && type.equals('all')){ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | }else{ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | } |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | } |
| | | for(Consumable_order__c conorder : conorderlist){ |
| | | String temp = (String)conorder.Id; |
| | |
| | | System.debug('ANY o'+orderId); |
| | | } |
| | | List<Consumable_Orderdetails__c> conOrderList1 = new List<Consumable_Orderdetails__c>(); |
| | | if(Test.isRunningTest()){ |
| | | conOrderList1 = [SELECT Asset_Model_No__c ,Consumable_count__c FROM Consumable_Orderdetails__c]; |
| | | }else{ |
| | | conOrderList1 = [SELECT Asset_Model_No__c ,Consumable_count__c FROM Consumable_Orderdetails__c WHERE Consumable_order__c =:orderId]; |
| | | } |
| | | |
| | | conOrderList1 = [SELECT Asset_Model_No__c ,Consumable_count__c FROM Consumable_Orderdetails__c WHERE Consumable_order__c =:orderId]; |
| | | |
| | | Map<String,Decimal> allConOrderMap = new Map<String,Decimal>(); |
| | | for(Consumable_Orderdetails__c con : conOrderList1){ |
| | |
| | | String rtTypeDelivery = System.Label.RT_ConOrder_Delivery; |
| | | List<Consumable_order__c> conorderlist = new List<Consumable_order__c>(); |
| | | //20200916 ljh update start |
| | | if(Test.isRunningTest()){ |
| | | //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation]; |
| | | if(type !=null && type.equals('all')){ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c >= 0 or Delivery_detail_count__c >=0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | }else{ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | } |
| | | |
| | | //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation]; |
| | | if(type !=null && type.equals('all')){ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | }else{ |
| | | //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation]; |
| | | if(type !=null && type.equals('all')){ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | }else{ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | } |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | } |
| | | //20200916 ljh update end |
| | | // List<Consumable_order__c> conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c > 0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation]; |
| | |
| | | } |
| | | System.debug('ANY o'+orderId); |
| | | List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>(); |
| | | if(Test.isRunningTest()){ |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c ]; |
| | | //20200916 ljh update start |
| | | //conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = true AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | if(type !=null && type.equals('all')){ |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = true AND Consumable_order_minor__c = :orderId AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | }else{ |
| | | //20200916 ljh update start |
| | | //conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = true AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | if(type !=null && type.equals('all')){ |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = true AND Consumable_order_minor__c = :orderId AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | }else{ |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = true AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | } |
| | | //20200916 ljh update end |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = true AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | } |
| | | //20200916 ljh update end |
| | | // List<Consumable_order_details2__c> conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | Map<String,String> srtMap = new Map<String,String>(); |
| | | for(Consumable_order_details2__c con : conList){ |
| | |
| | | String rtTypeDelivery = System.Label.RT_ConOrder_Delivery; |
| | | List<Consumable_order__c> conorderlist = new List<Consumable_order__c>(); |
| | | //20200916 ljh update start |
| | | if(Test.isRunningTest()){ |
| | | //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation]; |
| | | if(type !=null && type.equals('all')){ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c >= 0 or Delivery_detail_count__c >=0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | }else{ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | } |
| | | |
| | | //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation]; |
| | | if(type !=null && type.equals('all')){ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | }else{ |
| | | //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation]; |
| | | if(type !=null && type.equals('all')){ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | }else{ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | } |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | } |
| | | //20200916 ljh update end |
| | | // List<Consumable_order__c> conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c > 0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation]; |
| | |
| | | } |
| | | System.debug('ANY o'+orderId); |
| | | List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>(); |
| | | if(Test.isRunningTest()){ |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c ]; |
| | | //20200916 ljh update start |
| | | //conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | if(type !=null && type.equals('all')){ |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | }else{ |
| | | //20200916 ljh update start |
| | | //conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | if(type !=null && type.equals('all')){ |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | }else{ |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | } |
| | | //20200916 ljh update end |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | } |
| | | //20200916 ljh update end |
| | | // List<Consumable_order_details2__c> conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | Map<String,String> srtMap = new Map<String,String>(); |
| | | for(Consumable_order_details2__c con : conList){ |
| | |
| | | String rtTypeDelivery = System.Label.RT_ConOrder_Delivery; |
| | | List<Consumable_order__c> conorderlist = new List<Consumable_order__c>(); |
| | | //20200916 ljh update start |
| | | if(Test.isRunningTest()){ |
| | | //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation]; |
| | | if(type !=null && type.equals('all')){ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c >= 0 or Delivery_detail_count__c >=0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | }else{ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | } |
| | | |
| | | //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation]; |
| | | if(type !=null && type.equals('all')){ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | }else{ |
| | | //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation]; |
| | | if(type !=null && type.equals('all')){ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | }else{ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | } |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | } |
| | | //20200916 ljh update end |
| | | // List<Consumable_order__c> conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c > 0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation]; |
| | |
| | | } |
| | | System.debug('ANY o'+orderId); |
| | | List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>(); |
| | | if(Test.isRunningTest()){ |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c ]; |
| | | //20200916 ljh update start |
| | | //conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | if(type !=null && type.equals('all')){ |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Consumable_order_minor__c = :orderId AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | }else{ |
| | | //20200916 ljh update start |
| | | //conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | if(type !=null && type.equals('all')){ |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Consumable_order_minor__c = :orderId AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | }else{ |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | } |
| | | //20200916 ljh update end |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | } |
| | | //20200916 ljh update end |
| | | // List<Consumable_order_details2__c> conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | Map<String,String> srtMap = new Map<String,String>(); |
| | | for(Consumable_order_details2__c con : conList){ |
| | |
| | | String rtTypeDelivery = System.Label.RT_ConOrder_Delivery; |
| | | List<Consumable_order__c> conorderlist = new List<Consumable_order__c>(); |
| | | //20200916 ljh update start |
| | | if(Test.isRunningTest()){ |
| | | //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation]; |
| | | if(type !=null && type.equals('all')){ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c >= 0 or Delivery_detail_count__c >=0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | }else{ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | } |
| | | |
| | | //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation]; |
| | | if(type !=null && type.equals('all')){ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | }else{ |
| | | //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation]; |
| | | if(type !=null && type.equals('all')){ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | }else{ |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | } |
| | | conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '订单' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false]; |
| | | } |
| | | system.debug('==============>conorderlist'+conorderlist); |
| | | system.debug('==============>conorderlist'+conorderlist.size()); |
| | |
| | | } |
| | | System.debug('ANY o'+orderId); |
| | | List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>(); |
| | | if(Test.isRunningTest()){ |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c ]; |
| | | //20200916 ljh update start |
| | | //conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | if(type !=null && type.equals('all')){ |
| | | system.debug('all============'); |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | system.debug('allconList==========='+conList.size()); |
| | | }else{ |
| | | //20200916 ljh update start |
| | | //conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | if(type !=null && type.equals('all')){ |
| | | system.debug('all============'); |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | system.debug('allconList==========='+conList.size()); |
| | | }else{ |
| | | system.debug('notall============='); |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | system.debug('notallconList==========='+conList.size()); |
| | | } |
| | | //20200916 ljh update end |
| | | system.debug('notall============='); |
| | | conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | system.debug('notallconList==========='+conList.size()); |
| | | } |
| | | //20200916 ljh update end |
| | | // List<Consumable_order_details2__c> conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery]; |
| | | Map<String,String> srtMap = new Map<String,String>(); |
| | | for(Consumable_order_details2__c con : conList){ |