| | |
| | | res.entity = data; |
| | | |
| | | String UserName = UserInfo.getUserId(); |
| | | user useracc = [SELECT Accountid, Work_Location__c FROM user WHERE id = :UserName]; |
| | | user useracc = [ |
| | | SELECT Accountid, Work_Location__c |
| | | FROM user |
| | | WHERE id = :UserName |
| | | ]; |
| | | accountid = useracc.Accountid; |
| | | userWorkLocation = useracc.Work_Location__c; |
| | | Account accountInfo = [SELECT Name FROM account WHERE id = :accountid]; |
| | |
| | | |
| | | //BarCodelist做成 |
| | | barCodeListP = ParseBarCode(barcode); |
| | | System.debug('barCodeListP:' + barCodeListP); |
| | | //针对所有商品到货确认 |
| | | reSet1 = [ |
| | | SELECT |
| | |
| | | AND Arrive_Owner_Work_Location__c = :userWorkLocation |
| | | ORDER BY RemoveBox_No__c DESC |
| | | ]; |
| | | System.debug('reSet1:' + reSet1); |
| | | List<Consumable_order_details2__c> newdet2 = new List<Consumable_order_details2__c>(); |
| | | Set<Id> proIds = new Set<Id>(); |
| | | |
| | |
| | | Integer idx = 0; |
| | | for (Consumable_order_details2__c cod2 : reSet1) { |
| | | if (cod2.Bar_Code__c == barcode) { |
| | | System.debug('cod2.Bar_Code__c:' + cod2.Bar_Code__c); |
| | | newdet2.add(cod2); |
| | | reSet1.remove(idx); |
| | | proIds.add(cod2.Consumable_product__c); |
| | |
| | | } |
| | | Map<String, String> proHosMap = new Map<String, String>(); |
| | | Map<String, String> proIdMap = new Map<String, String>(); |
| | | List<hospitalprice__c> hpList = [SELECT id, hospital__c, product__c FROM hospitalprice__c WHERE account__c = :accountid]; |
| | | List<hospitalprice__c> hpList = [ |
| | | SELECT id, hospital__c, product__c |
| | | FROM hospitalprice__c |
| | | WHERE account__c = :accountid |
| | | ]; |
| | | if (hpList != null && hpList.size() > 0) { |
| | | for (hospitalprice__c hp : hpList) { |
| | | if (hp.product__c != null && String.valueof(hp.product__c).length() >= 15) { |
| | |
| | | errorIdMap.put(newdet2[j].Bar_Code__c, newdet2[j].Bar_Code__c); |
| | | } |
| | | if (coc.OutPattern__c == true) { |
| | | System.debug('testPattern:' + newdet2[j].Product_Pattern__c + '---' + orderdetails[i].Product_Pattern__c); |
| | | if (newdet2[j].Product_Pattern__c == orderdetails[i].Product_Pattern__c) { |
| | | //add by rentx 2021-03-22 start |
| | | if (newdet2[j].exchangeOutPattern__c == true) { |
| | |
| | | for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecords) { |
| | | String key = '' + ass.orderdetails2.Bar_Code__c; |
| | | Integer deliverycnt = BarcodeCntMap.get(key); |
| | | if (ass.orderdetails2.Box_Piece__c == '个' &&(ass.outboundCount == null || String.valueof(ass.outboundCount) == '' || ass.outboundCount <= 0)) { |
| | | if ( |
| | | ass.orderdetails2.Box_Piece__c == '个' && |
| | | (ass.outboundCount == null || |
| | | String.valueof(ass.outboundCount) == '' || |
| | | ass.outboundCount <= 0) |
| | | ) { |
| | | // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '请输入产品 '+ ass.Prod.Name +' 的出货数量')); |
| | | // return null; |
| | | System.debug('ass.orderdetails2.Box_Piece__c = ' + ass.orderdetails2.Box_Piece__c); |
| | |
| | | return consumableorderdetails2Nobox.size(); |
| | | } |
| | | |
| | | @TestVisible |
| | | class ConsumableorderdetailsInfo implements Comparable { |
| | | @AuraEnabled |
| | | public Consumable_orderdetails__c orderdetails1 { get; set; } |