| | |
| | | for (AggregateResult orderdetail : orderdetailCount) { |
| | | zaikuId.add(String.valueOf(orderdetail.get('cpc'))); |
| | | } |
| | | System.debug('orderdetailCount = ' + orderdetailCount); |
| | | System.debug('sqlagencyProType = ' + sqlagencyProType); |
| | | System.debug('userWorkLocation = ' + userWorkLocation); |
| | | System.debug('accountName = ' + accountName); |
| | |
| | | for (Integer i = 0; i < product2Selected.size(); i++) { |
| | | MidMap.put(product2Selected[i].Id, new ConsumableorderdetailsInfo(product2Selected[i])); |
| | | } |
| | | System.debug('MidMap = ' + MidMap); |
| | | for (Integer i = 0; i < CountDel.size(); i++) { |
| | | String str = ''; |
| | | if (CountDel[i].hospitalSpecialOffer__c) { |
| | |
| | | } else { |
| | | str = 'notHos'; |
| | | } |
| | | System.debug('CountDel[i].Consumable_Product__c= ' + CountDel[i].Consumable_Product__c); |
| | | System.debug('CountDel[i].Consumable_Product__c + str= ' + CountDel[i].Consumable_Product__c + str); |
| | | //明细2对应的产品存在于MidMap中 |
| | | if (MidMap.containsKey(CountDel[i].Consumable_Product__c)) { |
| | | //设置map中key的后缀 用于区分医院特价和非医院特价 |
| | |
| | | WHERE Category3_text__c = :category3 AND Category4_text__c != NULL AND Category5_text__c != NULL |
| | | GROUP BY Category4_text__c |
| | | ]; |
| | | System.debug('category4List ' + category4List); |
| | | category4OptionList = new List<SelectOption>(); |
| | | category4OptionList.add(new SelectOption('', '-无-')); |
| | | category4OptionMap = new Map<String, String>(); |
| | |
| | | GROUP BY Category5_text__c |
| | | ]; |
| | | |
| | | System.debug('category5List ' + category5List); |
| | | category5OptionList = new List<SelectOption>(); |
| | | category5OptionList.add(new SelectOption('', '-无-')); |
| | | category5OptionMap = new Map<String, String>(); |
| | |
| | | WHERE Category3_text__c = :category3 AND Category4_text__c != NULL AND Category5_text__c != NULL |
| | | GROUP BY Category4_text__c |
| | | ]; |
| | | System.debug('category4List ' + category4List); |
| | | category4OptionList = new List<SelectOption>(); |
| | | category4OptionList.add(new SelectOption('', '-无-')); |
| | | category4OptionMap = new Map<String, String>(); |
| | |
| | | GROUP BY Category5_text__c |
| | | ]; |
| | | |
| | | System.debug('category5List ' + category5List); |
| | | category5OptionList = new List<SelectOption>(); |
| | | category5OptionList.add(new SelectOption('', '-无-')); |
| | | category5OptionMap = new Map<String, String>(); |
| | |
| | | AND Arrive_Owner_Work_Location__c = :userWorkLocationLwc |
| | | GROUP BY Consumable_Product__c, Box_Piece__c |
| | | ]; |
| | | System.debug('orderdetailCount = ' + orderdetailCount); |
| | | |
| | | for (AggregateResult orderdetail : orderdetailCount) { |
| | | zaikuId.add(String.valueOf(orderdetail.get('cpc'))); |
| | | } |
| | |
| | | InsAfterDel.Name = p.name + '-' + str; |
| | | InsAfterDel.Shipment_Count__c = ass.orderdetails1.Shipment_Count__c; |
| | | InsAfterDel.Consumable_order__c = ESetId; |
| | | System.debug('ass.Prod.id:' + ass.Prod.id); |
| | | InsAfterDel.Consumable_Product__c = ass.Prod.id; |
| | | InsAfterDel.Intra_Trade_List_RMB__c = ass.Prod.Intra_Trade_List_RMB__c; |
| | | InsAfterDel.Delivery_List_RMB__c = ass.orderdetails1.Delivery_List_RMB__c; |
| | |
| | | ResponseBodyLWC res = new ResponseBodyLWC(); |
| | | Map<String, object> data = new Map<String, object>(); |
| | | res.entity = data; |
| | | List<ContentVersion> cvList = [ |
| | | SELECT id, Title, CreatedBy.Name, PathOnClient, CreatedDate, ContentDocumentId |
| | | FROM ContentVersion |
| | | WHERE FirstPublishLocationId = :recordId |
| | | ]; |
| | | List<ContentVersion> cvList = new List<ContentVersion>(); |
| | | List<ContentDocumentLink> links = [SELECT Id, ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId = :recordId]; |
| | | if (links != null && links.size() > 0) { |
| | | List<String> documentIds = new List<String>(); |
| | | for (ContentDocumentLink link : links) { |
| | | documentIds.add(link.ContentDocumentId); |
| | | } |
| | | List<ContentVersion> cvInfo = [ |
| | | SELECT Id, Title, OwnerId, Owner.Name, CreatedDate, ContentDocumentId |
| | | FROM ContentVersion |
| | | WHERE ContentDocumentId IN :documentIds |
| | | ]; |
| | | |
| | | if (cvInfo.size() > 0) { |
| | | for (Integer i = 0; i < cvInfo.size(); i++) { |
| | | cvList.add(cvInfo[i]); |
| | | } |
| | | } |
| | | } |
| | | // List<ContentVersion> cvList = [ |
| | | // SELECT id, Title, CreatedBy.Name, PathOnClient, CreatedDate, ContentDocumentId |
| | | // FROM ContentVersion |
| | | // WHERE FirstPublishLocationId = :recordId |
| | | // ]; |
| | | data.put('cvList', cvList); |
| | | res.status = 'Success'; |
| | | res.code = 200; |
| | |
| | | } |
| | | |
| | | //附件 |
| | | @TestVisible |
| | | public ConsumableorderdetailsInfo(Attachment e) { |
| | | concc = e; |
| | | hospitalSpecialOffer = false; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | @TestVisible |
| | | class ConsumableorderdetailsInfoLwc { |
| | | @AuraEnabled |
| | |
| | | @AuraEnabled |
| | | public Integer recordEnd { get; set; } |
| | | } |
| | | } |
| | | } |