| | |
| | | OSHFLG = OSHFLGStr; |
| | | coc = (Consumable_order__c)JSON.deserialize(cocStr, Consumable_order__c.class); |
| | | contactDealer = (List<String>)JSON.deserialize(contactDealerStr, List<String>.class); |
| | | System.debug('consumableorderdetailsRecordsviewStr:'+consumableorderdetailsRecordsviewStr); |
| | | consumableorderdetailsRecordsview = (List<ConsumableorderdetailsInfo>)JSON.deserialize(consumableorderdetailsRecordsviewStr, List<ConsumableorderdetailsInfo>.class); |
| | | if(coc.Offers_Price__c != null){ |
| | | String offerStr = String.valueOf(coc.Offers_Price__c); |
| | |
| | | |
| | | //删除附件 |
| | | @AuraEnabled |
| | | public static Results deleteAtt(String contentVersionId){ |
| | | public static Results deleteAtt(String contentVersionId, String cocId){ |
| | | Results results = new Results(); |
| | | try { |
| | | List<ContentVersion> cvInfo = [SELECT Id FROM ContentVersion WHERE FirstPublishLocationId = :cocId]; |
| | | ContentVersion conVersion = [SELECT ContentDocumentId FROM ContentVersion WHERE Id = :contentVersionId]; |
| | | String contentDocumentId = conVersion.ContentDocumentId; |
| | | ContentDocument conDocument = [SELECT Id FROM ContentDocument where Id = :contentDocumentId]; |
| | | delete conDocument; |
| | | if(cvInfo.size() <= 1){ |
| | | Consumable_order__c c = [SELECT Id FROM Consumable_order__c WHERE Id =:cocId]; |
| | | c.Consumable_pdf_insert_day__c =null; |
| | | update c; |
| | | } |
| | | results.result = 'Success'; |
| | | } catch (Exception e) { |
| | | results.result = 'Fail'; |
| | |
| | | } |
| | | } |
| | | |
| | | class ConsumableorderdetailsInfo implements Comparable { |
| | | public class ConsumableorderdetailsInfo implements Comparable { |
| | | @AuraEnabled |
| | | public Boolean check { get; set; } |
| | | @AuraEnabled |