| | |
| | | public Boolean isShow { get; set; } |
| | | public List<Attachment> attachments { get; set; } |
| | | //CHAN-BC6BV2 XHL AddEnd 20190522 |
| | | |
| | | public List<ContentDocument> contents { get; set; } |
| | | //分页功能 |
| | | public Integer pageLimit {get; set;} |
| | | public String soql {get; set;} |
| | |
| | | pageLimit = Integer.valueOf(System.Label.orderdetPageLimitsize); |
| | | |
| | | attachments = new List<Attachment>(); |
| | | List<ContentDocumentLink> cdlList = [SELECT ContentDocumentId |
| | | FROM ContentDocumentLink |
| | | WHERE LinkedEntityId = :Id]; |
| | | List<ID> fileIDs = new List<ID>(); |
| | | for (ContentDocumentLink docLink : cdlList) { |
| | | fileIDs.add(docLink.ContentDocumentId); |
| | | } |
| | | contents=[SELECT Title,OwnerId,ContentModifiedDate from ContentDocument WHERE id IN :fileIDs]; |
| | | } |
| | | |
| | | public boolean getcheckUser() { |
| | |
| | | Map<String, AssetModifyBelongsChangeDetailInfo> MidMap = new Map<String, AssetModifyBelongsChangeDetailInfo>(); |
| | | List<Asset> asListed = new List<Asset>(); |
| | | soql = this.makeSoql1(text1, val1); |
| | | System.debug('soql:'+soql); |
| | | asListed = Database.query(soql); |
| | | asListed = noSubmittedList(asListed); |
| | | for (AssetModifyBelongsChangeDetailInfo bss : assetModifyBelongsChangeDetailRecordsview) { |
| | |
| | | if (String.isNotBlank(val1)) { |
| | | val1 = val1.trim(); |
| | | } |
| | | String soql = 'select Id,name,SerialNumber,Asset_situation__c,Order_No__c,Account.Name,Status,Installation_Site__c,CurrentContract__c from Asset where AccountId = \'' + RawAccountId + '\''; |
| | | String soql=''; |
| | | System.debug(RawAccountId); |
| | | RawAccountId=''; |
| | | if(String.isBlank(RawAccountId)){ |
| | | soql = 'select Id,name,SerialNumber,Asset_situation__c,Order_No__c,Account.Name,Status,Installation_Site__c,CurrentContract__c from Asset where AccountId = \'\''; |
| | | System.debug('id is null'); |
| | | } |
| | | else { |
| | | soql = 'select Id,name,SerialNumber,Asset_situation__c,Order_No__c,Account.Name,Status,Installation_Site__c,CurrentContract__c from Asset where AccountId = \'' + RawAccountId + '\''; |
| | | System.debug('id is not null'); |
| | | } |
| | | if (!String.isBlank(text1)) { |
| | | if (text1 == 'Order_No__c' && checkexact) { |
| | | soql += ' AND (' + text1 + ' = \'' + String.escapeSingleQuotes(val1) + '\' )'; |
| | |
| | | //跳转到上传附件页面 |
| | | public PageReference uploadingAttachment() { |
| | | PageReference ref = new Pagereference('/p/attach/NoteAttach?pid=' + Id + '&retURL=%2Fapex/AssetModifyBelongs?Id=' + Id); |
| | | |
| | | |
| | | //PageReference ref = new Pagereference('/lightning/n/Excel?objectApiName&context=RECORD_DETAIL&backgroundContext=%2Flightning%2Fr%2FAssetModifyBelongsChange__c%2F'+Id+'%2Fedit%3F0.source%3DalohaHeader&0.source='+Id+'&0.recordId='+Id+''); |
| | | |
| | | ref.setRedirect(true); |
| | | return ref; |
| | | } |
| | | //跳转到上传附件页面(lightning) |
| | | public PageReference uploadingAttachmentLightning() { |
| | | //PageReference ref = new Pagereference('/p/attach/NoteAttach?pid=' + Id + '&retURL=%2Fapex/AssetModifyBelongs?Id=' + Id); |
| | | PageReference ref = new Pagereference('/lightning/n/lightning?backgroundContext=%2Flightning%2Fr%2FAssetModifyBelongsChange__c%2F'+Id+'%2Fedit%3Fcount%3D1&0.recordId='+Id+''); |
| | | |
| | | ref.setRedirect(true); |
| | | return ref; |
| | | } |