| | |
| | | String userId = UserInfo.getUserId(); |
| | | //String userId = '00510000006k82X'; |
| | | //String userId = '00510000005QO75'; |
| | | <<<<<<< HEAD |
| | | user Useracc = [ |
| | | SELECT Accountid, Work_Location__c, UserPro_Type__c |
| | | FROM user |
| | | WHERE id = :userId |
| | | ]; |
| | | ======= |
| | | user Useracc = [SELECT Accountid, Work_Location__c, UserPro_Type__c FROM user WHERE id = :userId]; |
| | | >>>>>>> LEXCommunityLiJun |
| | | accountid = Useracc.Accountid; |
| | | userWorkLocation = Useracc.Work_Location__c; |
| | | agencyProType = Useracc.UserPro_Type__c; |
| | |
| | | agencyProType = 'ET'; |
| | | } |
| | | sqlagencyProType = '%' + agencyProType + '%'; |
| | | <<<<<<< HEAD |
| | | Account accountInfo = [ |
| | | SELECT Name, Dealer_discount__c |
| | | FROM account |
| | | WHERE id = :accountid |
| | | ]; |
| | | ======= |
| | | Account accountInfo = [SELECT Name, Dealer_discount__c FROM account WHERE id = :accountid]; |
| | | >>>>>>> LEXCommunityLiJun |
| | | accountName = accountInfo.Name; |
| | | consumableorderdetailsRecords = new List<ConsumableorderdetailsInfo>(); |
| | | Map<String, Product2__c> midMap = new Map<String, Product2__c>(); |
| | |
| | | try { |
| | | insert Po; |
| | | eSetId = Po.id; |
| | | <<<<<<< HEAD |
| | | List<Consumable_order__c> Consumable_order = [ |
| | | SELECT Name |
| | | FROM Consumable_order__c |
| | | WHERE id = :Po.id |
| | | ]; |
| | | ======= |
| | | List<Consumable_order__c> Consumable_order = [SELECT Name FROM Consumable_order__c WHERE id = :Po.id]; |
| | | >>>>>>> LEXCommunityLiJun |
| | | List<Consumable_orderdetails__c> InsList = new List<Consumable_orderdetails__c>(); |
| | | List<Consumable_order_details2__c> InsListUp = new List<Consumable_order_details2__c>(); |
| | | List<Consumable_order_details2__c> updListAdjust = new List<Consumable_order_details2__c>(); |
| | |
| | | public PageReference doClick() { |
| | | Pagereference pr = page.InventoryCSV; |
| | | return pr; |
| | | <<<<<<< HEAD |
| | | } |
| | | //分页Bean |
| | | public class PaginatedAccounts { |
| | |
| | | } |
| | | } |
| | | } |
| | | ======= |
| | | } |
| | | //分页Bean |
| | | public class PaginatedAccounts { |
| | | @AuraEnabled |
| | | public Integer nextPageToken; |
| | | @AuraEnabled |
| | | public Integer pageNumber { get; set; } |
| | | @AuraEnabled |
| | | public Integer totalRecords { get; set; } |
| | | @AuraEnabled |
| | | public Integer recordStart { get; set; } |
| | | @AuraEnabled |
| | | public Integer recordEnd { get; set; } |
| | | } |
| | | |
| | | // Data Bean |
| | | @TestVisible |
| | | class ConsumableorderdetailsInfo implements Comparable { |
| | | @AuraEnabled |
| | | public Boolean check { get; set; } |
| | | @AuraEnabled |
| | | public Consumable_orderdetails__c orderdetails1 { get; set; } |
| | | @AuraEnabled |
| | | public Consumable_order_details2__c orderdetails2 { get; set; } |
| | | @AuraEnabled |
| | | public Product2__c Prod { get; set; } |
| | | @AuraEnabled |
| | | public Decimal countid { get; set; } |
| | | @AuraEnabled |
| | | public String ProdId { get; set; } |
| | | @AuraEnabled |
| | | public Decimal Pandian { get; set; } |
| | | @AuraEnabled |
| | | public Decimal Diff { get; set; } |
| | | @AuraEnabled |
| | | public Decimal refind { get; set; } |
| | | @AuraEnabled |
| | | public String DiffReason { get; set; } |
| | | @AuraEnabled |
| | | public Boolean canSelect { get; set; } |
| | | @AuraEnabled |
| | | public Boolean sortBy { get; set; } |
| | | @AuraEnabled |
| | | public Decimal limitCount { get; set; } |
| | | @AuraEnabled |
| | | public Decimal overlimitCount { get; set; } |
| | | @AuraEnabled |
| | | public String boxPiece { get; set; } |
| | | public ConsumableorderdetailsInfo(Consumable_order_details2__c e, string str) { |
| | | orderdetails2 = e; |
| | | Prod = e.Consumable_Product__r; |
| | | //e.Lose_reason__c = str; |
| | | DiffReason = str; |
| | | } |
| | | |
| | | // 已存在消耗品明细用 |
| | | public ConsumableorderdetailsInfo(Consumable_order_details2__c e) { |
| | | check = false; |
| | | orderdetails2 = e; |
| | | Prod = e.Consumable_Product__r; |
| | | canSelect = true; |
| | | } |
| | | public ConsumableorderdetailsInfo(Product2__c e) { |
| | | check = false; |
| | | //orderdetails1 = new Consumable_orderdetails__c(); |
| | | Prod = e; |
| | | canSelect = true; |
| | | ProdId = string.valueOf(e.id); |
| | | countid = 0; |
| | | Pandian = 0; |
| | | refind = 0; |
| | | Diff = 0; |
| | | limitCount = 0; |
| | | overlimitCount = 0; |
| | | } |
| | | // 排序 |
| | | public Integer compareTo(Object compareTo) { |
| | | ConsumableorderdetailsInfo compareToesd = (ConsumableorderdetailsInfo) compareTo; |
| | | Integer returnValue = 0; |
| | | if (countid > compareToesd.countid) { |
| | | returnValue = -1; |
| | | } else if (countid < compareToesd.countid) { |
| | | returnValue = 1; |
| | | } |
| | | return returnValue; |
| | | } |
| | | } |
| | | } |
| | | >>>>>>> LEXCommunityLiJun |