From e14d6d0619330cad423f06493e3aa2371faa2a8f Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期六, 09 九月 2023 14:02:23 +0800
Subject: [PATCH] Sit期间修改
---
force-app/main/default/classes/AssetModifyBelongsController.cls | 41 ++++++++++++++++++-----------------------
1 files changed, 18 insertions(+), 23 deletions(-)
diff --git a/force-app/main/default/classes/AssetModifyBelongsController.cls b/force-app/main/default/classes/AssetModifyBelongsController.cls
index 8e105d0..2302efd 100644
--- a/force-app/main/default/classes/AssetModifyBelongsController.cls
+++ b/force-app/main/default/classes/AssetModifyBelongsController.cls
@@ -7,6 +7,7 @@
public Boolean checkexact { get; set; } // 20230110 gzw 璁㈠崟鍙风簿纭煡璇㈢敤
public AssetModifyBelongsChange__c ambc { get; set; }
public static List<SelectOption> textOpts { get; private set; }
+ public static Account ir { get; set; }
//public static List<SelectOption> changeReasonOpts { get; private set; }
static {
textOpts = new List<SelectOption>();
@@ -61,6 +62,7 @@
Id = ApexPages.currentPage().getParameters().get('Id');
statusEdit = ApexPages.currentPage().getParameters().get('KeyWords');
+ System.debug('Id:'+Id+' accountId:'+RawAccountId+' KeyWords:'+statusEdit);
assetModifyBelongsChangeDetailRecords = new List<AssetModifyBelongsChangeDetailInfo>();
assetModifyBelongsChangeDetailRecordsview = new List<AssetModifyBelongsChangeDetailInfo>();
editAble = false;
@@ -68,14 +70,18 @@
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);
+ //update 鏉庢枃娑� 2023/07/13 鏇存柊lightning闄勪欢涓婁紶 start
+ if(String.isNotBlank(Id)){
+ 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];
}
- contents=[SELECT Title,OwnerId,ContentModifiedDate from ContentDocument WHERE id IN :fileIDs];
+ //update 鏉庢枃娑� 2023/07/13 鏇存柊lightning闄勪欢涓婁紶 end
}
public boolean getcheckUser() {
@@ -269,17 +275,7 @@
if (String.isNotBlank(val1)) {
val1 = val1.trim();
}
- 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');
- }
+ 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 + '\'';
if (!String.isBlank(text1)) {
if (text1 == 'Order_No__c' && checkexact) {
soql += ' AND (' + text1 + ' = \'' + String.escapeSingleQuotes(val1) + '\' )';
@@ -344,21 +340,20 @@
//璺宠浆鍒颁笂浼犻檮浠堕〉闈�
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;
}
+ //update 鏉庢枃娑� 2023/07/13 鏇存柊lightning闄勪欢涓婁紶 start
//璺宠浆鍒颁笂浼犻檮浠堕〉闈紙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+'');
+ PageReference ref = new Pagereference('/lightning/n/LexUploadPage?0.recordId='+Id+'');
ref.setRedirect(true);
return ref;
}
+ //update 鏉庢枃娑� 2023/07/13 鏇存柊lightning闄勪欢涓婁紶 end
// CHAN-BC6BV2 XHL AddEnd 20190522
// 閲嶆柊鍒锋柊
public PageReference returnChangePage() {
--
Gitblit v1.9.1