| | |
| | | public String Id { get; set; } |
| | | public Boolean isShow { get; set; } |
| | | public List<Attachment> attachments { get; set; } |
| | | public List<ContentDocument> contents { get; set; } |
| | | public List<ContentDocument> contents { get; set; }//update by liwentao 更新lightning附件上传 |
| | | //分页功能 |
| | | public Integer pageLimit{get;set;} |
| | | public String soql {get;set;} |
| | |
| | | pageLimit = Integer.valueOf(System.Label.orderdetPageLimitsize); |
| | | |
| | | attachments = new List<Attachment>(); |
| | | //update 李文涛 2023/07/13 更新lightning附件上传 start |
| | | if(String.isNotBlank(Id)){ |
| | | List<ContentDocumentLink> cdlList = [SELECT ContentDocumentId |
| | | FROM ContentDocumentLink |
| | | WHERE LinkedEntityId = :Id]; |
| | |
| | | fileIDs.add(docLink.ContentDocumentId); |
| | | } |
| | | contents=[SELECT Title,OwnerId,ContentModifiedDate from ContentDocument WHERE id IN :fileIDs]; |
| | | } |
| | | //update 李文涛 2023/07/13 更新lightning附件上传 end |
| | | } |
| | | |
| | | // 画面初始化 |
| | |
| | | } |
| | | if (String.isNotBlank(Statu_AchievementsId)) { |
| | | statu_AchievementId = Statu_AchievementsId; |
| | | } else { |
| | | } else if(String.isNotBlank(ambc.GpaaStatu_Achievements__c)) { |
| | | statu_AchievementId = ambc.GpaaStatu_Achievements__c; |
| | | } |
| | | } else{ |
| | | statu_AchievementId=''; |
| | | } |
| | | String soql = 'select Id,name,SerialNumber,Asset_situation__c,Order_No__c,Account.Name,Status,Installation_Site__c,CurrentContract__c,guarantee_period__c,RepairQuantity__c from Asset where Backorder__c = \'' + statu_AchievementId +'\''; |
| | | soql += ' AND AssetMark__c != \'耗材\''; |
| | | if(!String.isBlank(text1)){ |
| | | |
| | | soql += ' AND ('+ text1 +' like \'%' + String.escapeSingleQuotes(val1.replaceAll('%', '\\%')) + '%\' )'; |
| | | } |
| | | soql += ' limit 200'; |
| | |
| | | ref.setRedirect(true); |
| | | return ref; |
| | | } |
| | | //update 李文涛 2023/07/13 更新lightning附件上传 start |
| | | //跳转到上传附件页面Lightning |
| | | public PageReference uploadingAttachmentLightning(){ |
| | | //PageReference ref = new Pagereference('/p/attach/NoteAttach?pid=' + Id +'&retURL=%2Fapex/AssetGuaranteePeriodAlteration?Id='+Id); |
| | | PageReference ref = new Pagereference('/lightning/n/lightning?objectApiName&context=RECORD_DETAIL&backgroundContext=%2Flightning%2Fr%2FAssetGuaranteePeriodAlteration__c%2F'+Id+'%2Fedit%3F0.source%3DalohaHeader&0.recordId='+Id+''); |
| | | PageReference ref = new Pagereference('/lightning/n/LexUploadPage?0.recordId='+Id+''); |
| | | ref.setRedirect(true); |
| | | return ref; |
| | | } |
| | | //update 李文涛 2023/07/13 更新lightning附件上传 start |
| | | //查找"保有设备"是否含有"QIS"和"修理"和"保有设备的保修期限变更过" |
| | | public Boolean find_QIS_Repair(List<String> assetIdList) { |
| | | |
| | |
| | | GuaranteePeriodAlterationApplication__c agAlteration = new GuaranteePeriodAlterationApplication__c(); |
| | | agAlteration.Id = Id; |
| | | attachments = seekAttachment(); |
| | | if (ambc.ChangeReason__c == '集中采购,未分配到医院' && attachments.size() == 0) { |
| | | if (ambc.ChangeReason__c == '集中采购,未分配到医院' && contents.size() == 0) { |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '请上传标书')); |
| | | return null; |
| | | } |