From d8dc84a3d56df839895f1c417a4d9cbee763d262 Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期五, 03 三月 2023 14:50:59 +0800
Subject: [PATCH] gzw 测试环境代码更新
---
force-app/main/default/classes/BatchSelectRepairPageController.cls | 294 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 260 insertions(+), 34 deletions(-)
diff --git a/force-app/main/default/classes/BatchSelectRepairPageController.cls b/force-app/main/default/classes/BatchSelectRepairPageController.cls
index e1526dd..6134e9e 100644
--- a/force-app/main/default/classes/BatchSelectRepairPageController.cls
+++ b/force-app/main/default/classes/BatchSelectRepairPageController.cls
@@ -3,24 +3,119 @@
public List<RepairData> RAInfoList { get; set; }
public List<Repair__c> RepairList { get; set; }
public List<String> repairIdList{ get; set; }
+ public List<SelectOption> StatusItems1 { get; private set; }
+ public List<SelectOption> StatusItems { get; private set; }
+ public List<SelectOption> SiteRepairItems { get; private set; }
+ public String pdfURL { get; private set; }
public Integer RACount {
get { return RAInfoList == null ? 0 : RAInfoList.size(); }
}
public BatchSelectRepairPageController() {
+ StatusItems = new List<SelectOption>();
+ StatusItems.add(new SelectOption('','--鏃�--'));
+ StatusItems.add(new SelectOption('00.鐢宠瀹屾瘯','00.鐢宠瀹屾瘯'));
+ StatusItems.add(new SelectOption('01.鍒嗗叕鍙稿彈鐞嗗畬姣�','01.鍒嗗叕鍙稿彈鐞嗗畬姣�'));
+ StatusItems.add(new SelectOption('02.RC鍙楃悊瀹屾瘯','02.RC鍙楃悊瀹屾瘯'));
+ StatusItems.add(new SelectOption('03.鎶ヤ环妫�鏌ョ粨鏉�','03.鎶ヤ环妫�鏌ョ粨鏉�'));
+ StatusItems.add(new SelectOption('04.鎶ヤ环璺熻繘涓�','04.鎶ヤ环璺熻繘涓�'));
+ StatusItems.add(new SelectOption('05.鎶ヤ环鍚屾剰瀹屽','05.鎶ヤ环鍚屾剰瀹屽'));
+ StatusItems.add(new SelectOption('06.闆朵欢榻愬','06.闆朵欢榻愬'));
+ StatusItems.add(new SelectOption('07.淇悊闁嬪','07.淇悊闁嬪'));
+ StatusItems.add(new SelectOption('08.淇悊棰勮瀹屾垚','08.淇悊棰勮瀹屾垚'));
+ StatusItems.add(new SelectOption('09.淇悊瀹屾垚','09.淇悊瀹屾垚'));
+ StatusItems.add(new SelectOption('10.鏈�缁堟鏌ュ畬鎴�','10.鏈�缁堟鏌ュ畬鎴�'));
+ StatusItems.add(new SelectOption('11.RC淇悊鍝佸凡杩旈��','11.RC淇悊鍝佸凡杩旈��'));
+ StatusItems.add(new SelectOption('12.鍙戠エ宸插彂閫�','12.鍙戠エ宸插彂閫�'));
+ StatusItems.add(new SelectOption('13.宸茶繑閫佸埌鐢ㄦ埛','13.宸茶繑閫佸埌鐢ㄦ埛'));
+ StatusItems.add(new SelectOption('14.鏀跺埌楠屾敹鍗�','14.鏀跺埌楠屾敹鍗�'));
+ StatusItems.add(new SelectOption('15.楠屾敹鍗曠鏀跺鏍搁�氳繃','15.楠屾敹鍗曠鏀跺鏍搁�氳繃'));
+ StatusItems.add(new SelectOption('16.閮ㄥ垎浠樻','16.閮ㄥ垎浠樻'));
+ StatusItems.add(new SelectOption('16.瀹屾瘯','16.瀹屾瘯'));
+ StatusItems.add(new SelectOption('17.浠樻瀹屾瘯','17.浠樻瀹屾瘯'));
+ StatusItems.add(new SelectOption('00.鍙栨秷','00.鍙栨秷'));
+ StatusItems.add(new SelectOption('00.鍒犻櫎','00.鍒犻櫎'));
+ StatusItems.add(new SelectOption('00.鍏抽棴','00.鍏抽棴'));
+ StatusItems1 = new List<SelectOption>();
+ StatusItems1.add(new SelectOption('','--鏃�--'));
+ StatusItems1.add(new SelectOption('0.鐢宠瀹屾瘯','0.鐢宠瀹屾瘯'));
+ StatusItems1.add(new SelectOption('2.缁翠慨鎶ヤ环闃舵','2.缁翠慨鎶ヤ环闃舵'));
+ StatusItems1.add(new SelectOption('3.缁翠慨闃舵','3.缁翠慨闃舵'));
+ StatusItems1.add(new SelectOption('4.淇悊鍝佽繑閫侀樁娈�','4.淇悊鍝佽繑閫侀樁娈�'));
+ StatusItems1.add(new SelectOption('5.瀹屾瘯','5.瀹屾瘯'));
+ StatusItems1.add(new SelectOption('0.鍒犻櫎','0.鍒犻櫎'));
+ StatusItems1.add(new SelectOption('0.鍙栨秷','0.鍙栨秷'));
+
+ SiteRepairItems = new List<SelectOption>();
+ SiteRepairItems.add(new SelectOption('','--鏃�--'));
+ SiteRepairItems.add(new SelectOption('RC淇悊','RC淇悊'));
+ SiteRepairItems.add(new SelectOption('鐩撮�丼ORC淇悊','鐩撮�丼ORC淇悊'));
+ SiteRepairItems.add(new SelectOption('鐩撮�丱GZ淇悊','鐩撮�丱GZ淇悊'));
+ SiteRepairItems.add(new SelectOption('鍔炰簨澶勪慨鐞�','鍔炰簨澶勪慨鐞�'));
+ SiteRepairItems.add(new SelectOption('鐜板満淇悊','鐜板満淇悊'));
+
+
+
+
}
public void init(){
RevalInfo = new RetrievalData();
}
+ // public List<SelectOption> getworkLocationSelect() {
+ // List<SelectOption> workLocationSelect = new List<SelectOption>();
+ // workLocationSelect.add(new SelectOption('','--鏃�--'));
+ // workLocationSelect.add(new SelectOption('鍖椾含鍔炰簨澶�','鍖椾含鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('澶╂触鍔炰簨澶�','澶╂触鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('娌冲寳鍔炰簨澶�','娌冲寳鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('娴庡崡鍔炰簨澶�','娴庡崡鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('闈掑矝鍔炰簨澶�','闈掑矝鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('鍐呰挋鍔炰簨澶�','鍐呰挋鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('榛戦緳姹熷姙浜嬪','榛戦緳姹熷姙浜嬪'));
+ // workLocationSelect.add(new SelectOption('鍚夋灄鍔炰簨澶�','鍚夋灄鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('娌堥槼鍔炰簨澶�','娌堥槼鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('澶ц繛鍔炰簨澶�','澶ц繛鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('闄曡タ鍔炰簨澶�','闄曡タ鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('闈掓捣鍔炰簨澶�','闈掓捣鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('瀹佸鍔炰簨澶�','瀹佸鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('鐢樿們鍔炰簨澶�','鐢樿們鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('鏂扮枂鍔炰簨澶�','鏂扮枂鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('灞辫タ鍔炰簨澶�','灞辫タ鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('娌冲崡鍔炰簨澶�','娌冲崡鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('涓婃捣鍔炰簨澶�','涓婃捣鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('姹熻嫃鍔炰簨澶�','姹熻嫃鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('姹熻タ鍔炰簨澶�','姹熻タ鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('娴欐睙鍔炰簨澶�','娴欐睙鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('瀹夊窘鍔炰簨澶�','瀹夊窘鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('绂忓缓鍔炰簨澶�','绂忓缓鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('骞夸笢鍔炰簨澶�','骞夸笢鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('娣卞湷鍔炰簨澶�','娣卞湷鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('婀栧寳鍔炰簨澶�','婀栧寳鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('婀栧崡鍔炰簨澶�','婀栧崡鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('浜戝崡鍔炰簨澶�','浜戝崡鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('璐靛窞鍔炰簨澶�','璐靛窞鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('鍥涘窛鍔炰簨澶�','鍥涘窛鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('閲嶅簡鍔炰簨澶�','閲嶅簡鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('鏉窞鍔炰簨澶�','鏉窞鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('鏉窞鍏遍�氬姙浜嬪','鏉窞鍏遍�氬姙浜嬪'));
+ // workLocationSelect.add(new SelectOption('瑗垮畨鍔炰簨澶�','瑗垮畨鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('瑗垮畨鍏遍�氬姙浜嬪','瑗垮畨鍏遍�氬姙浜嬪'));
+ // workLocationSelect.add(new SelectOption('鍏遍�氬姙浜嬪','鍏遍�氬姙浜嬪'));
+ // workLocationSelect.add(new SelectOption('鎴愰兘鍔炰簨澶�','鎴愰兘鍔炰簨澶�'));
+ // workLocationSelect.add(new SelectOption('鎴愰兘鍏遍�氬姙浜嬪','鎴愰兘鍏遍�氬姙浜嬪'));
+ // workLocationSelect.add(new SelectOption('骞垮窞鍔炰簨澶�','骞垮窞鍔炰簨澶�'));
+ // return workLocationSelect;
+ // }
+
public PageReference RetrievalBtn() {
RepairList = new List<Repair__c>();
RAInfoList = new List<RepairData>();
- if(String.isBlank(RevalInfo.Status2) && String.isBlank(RevalInfo.RepairName) && String.isBlank(RevalInfo.SAPRepairNo)
- && String.isBlank(RevalInfo.SerialNumber) && String.isBlank(RevalInfo.repair.Incharge_Staff__c)
- && String.isBlank(String.valueOf(RevalInfo.repair.Final_complete_day__c))){
+ if(String.isBlank(RevalInfo.Status1) && String.isBlank(RevalInfo.Status2) && String.isBlank(RevalInfo.RepairName) && String.isBlank(RevalInfo.SAPRepairNo)
+ && String.isBlank(RevalInfo.SerialNumber) && String.isBlank(RevalInfo.repair.Incharge_Staff__c) && String.isBlank(RevalInfo.onSiteRepair)
+ && String.isBlank(String.valueOf(RevalInfo.repair.Aware_date__c)) && String.isBlank(String.valueOf(RevalInfo.repair.Aware_date2__c)) && String.isBlank(RevalInfo.workLocationSelect)
+ && String.isBlank(RevalInfo.State_Hospital)){
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '璇疯嚦灏戞坊鍔犱竴涓绱㈡潯浠�!'));
return null;
}
@@ -28,33 +123,126 @@
sql += 'HP_Name__c, State_Hospital__c, Incharge_Staff__c, FSE_ApplyForRepair_Day__c, work_location_select__c, On_site_repair__c,';
sql += 'Number_of_EffectiveContract__c, NewProductGuaranteeObject__c from Repair__c where Id != null ';
if(String.isNotBlank(RevalInfo.Status2)){
- sql += ' and Status2__c like \'%' + RevalInfo.Status2 + '%\' ';
+ sql += ' and Status2__c = \'' + RevalInfo.Status2 + '\'';
+ }
+ if(String.isNotBlank(RevalInfo.Status1)){
+ sql += ' and Status1__c = \'' + RevalInfo.Status1 + '\'';
+ }
+ if(String.isNotBlank(RevalInfo.HospitalName)){
+
+ sql += ' and HP_Name__c like \'%' + RevalInfo.HospitalName.trim() + '%\'';
}
if(String.isNotBlank(RevalInfo.RepairName)){
- sql += ' and Name like \'%' + RevalInfo.RepairName + '%\' ';
+ System.debug(LoggingLevel.INFO, '***RevalInfo.RepairName.contains(): ' + RevalInfo.RepairName.contains(' '));
+ String splitStr = null;
+ if(RevalInfo.RepairName.contains(' ')){
+ splitStr = ' ';
+ }else if(RevalInfo.RepairName.contains(',')){
+ splitStr = ',';
+ }
+ if(splitStr != null && RevalInfo.RepairName.contains(splitStr)){
+ sql += ' and (';
+ list <String> nameList = RevalInfo.RepairName.split(splitStr);
+ for(String name: nameList){
+ sql += 'Name like \'%' + name + '%\' or ';
+ }
+ sql = sql.removeEnd('or ');
+ sql += ')';
+ }else{
+ sql += ' and Name like \'%' + RevalInfo.RepairName.trim() + '%\'';
+ }
+ System.debug(LoggingLevel.INFO, '*** sql: ' + sql);
}
if(String.isNotBlank(RevalInfo.SAPRepairNo)){
- sql += ' and SAP_Service_Repair_No__c like \'%' + RevalInfo.SAPRepairNo + '%\' ';
+ System.debug(LoggingLevel.INFO, '***RevalInfo.SAPRepairNo.contains(): ' + RevalInfo.SAPRepairNo.contains(' '));
+ String splitStr = null;
+ if(RevalInfo.SAPRepairNo.contains(' ')){
+ splitStr = ' ';
+ }else if(RevalInfo.SAPRepairNo.contains(',')){
+ splitStr = ',';
+ }
+ if(splitStr != null && RevalInfo.SAPRepairNo.contains(splitStr)){
+ sql += ' and (';
+
+ list <String> noList = RevalInfo.SAPRepairNo.split(splitStr);
+ for(String no: noList){
+ sql += 'SAP_Service_Repair_No__c like \'%' + no + '%\' or ';
+ }
+ sql = sql.removeEnd('or ');
+ sql += ')';
+ }else{
+ sql += ' and SAP_Service_Repair_No__c like \'%' + RevalInfo.SAPRepairNo.trim() + '%\'';
+ }
+ System.debug(LoggingLevel.INFO, '*** sql: ' + sql);
}
if(String.isNotBlank(RevalInfo.SerialNumber)){
- sql += ' and SerialNumber__c like \'%' + RevalInfo.SerialNumber + '%\' ';
+ List<String> SerialNumberList = new List<String>();
+ if(RevalInfo.SerialNumber.indexOf(',') != -1){
+ SerialNumberList = RevalInfo.SerialNumber.split(',');
+ }
+ System.debug('SerialNumberList1:' + SerialNumberList);
+ // 鏀寔妯$硦鏌ヨ澶氫釜锛屾枃鏈杈撳叆鐢ㄨ嫳鏂囧崐瑙掗�楀彿鍒嗛殧
+ if(SerialNumberList.size() > 0){
+ sql += ' and (SerialNumber__c like \'%';
+ Integer i = 0;
+ for(String SerialNumber : SerialNumberList){
+ if(i == 0){
+ sql += SerialNumber.trim() + '%\'';
+ }else{
+ sql += 'or SerialNumber__c like \'%' + SerialNumber.trim() + '%\'';
+ }
+ i++;
+ }
+ sql += ')';
+ } else{
+ sql += ' and SerialNumber__c like \'%' + RevalInfo.SerialNumber.trim() + '%\'';
+ }
}
if(String.isNotBlank(RevalInfo.repair.Incharge_Staff__c)){
- sql += ' and Incharge_Staff__c = \'' + RevalInfo.repair.Incharge_Staff__c + '\' ';
+ sql += ' and Incharge_Staff__c = \'' + RevalInfo.repair.Incharge_Staff__c + '\'';
}
- if(String.isNotBlank(String.valueof(RevalInfo.repair.Final_complete_day__c))){
- String day = String.valueof(RevalInfo.repair.Final_complete_day__c);
+ if(String.isNotBlank(String.valueof(RevalInfo.repair.Aware_date__c))&&String.isNotBlank(String.valueof(RevalInfo.repair.Aware_date2__c))){
+ String day = String.valueof(RevalInfo.repair.Aware_date__c);
+ String day2 = String.valueof(RevalInfo.repair.Aware_date2__c);
day = day.substring(0,10);
- sql += ' and FSE_ApplyForRepair_Day__c = ' + day;
+ day2 = day2.substring(0,10);
+ sql += ' and FSE_ApplyForRepair_Day__c >= ' + day + 'and FSE_ApplyForRepair_Day__c <=' +day2;
}
- sql += ' limit 201';
+ if(String.isNotBlank(RevalInfo.onSiteRepair)){
+ sql += ' and On_site_repair__c = \'' + RevalInfo.onSiteRepair + '\'';
+ }
+ if(String.isNotBlank(RevalInfo.workLocationSelect)){
+ List<String> workLocationSelectList = new List<String>();
+ if(RevalInfo.workLocationSelect.indexOf(',') != -1){
+ workLocationSelectList = RevalInfo.workLocationSelect.split(',');
+ }
+ System.debug('workLocationSelectList1:' + workLocationSelectList);
+ if(workLocationSelectList.size() > 0){
+ sql += ' and (work_location_select__c like \'%';
+ Integer i = 0;
+ for(String workLocationSelect : workLocationSelectList){
+ if(i == 0){
+ sql += workLocationSelect.trim() + '%\'';
+ }else{
+ sql += 'or work_location_select__c like \'%' + workLocationSelect.trim() + '%\'';
+ }
+ i++;
+ }
+ sql += ')';
+ } else{
+ sql += ' and work_location_select__c like \'%' + RevalInfo.workLocationSelect.trim() + '%\'';
+ }
+ }
+ if(String.isNotBlank(RevalInfo.State_Hospital)){
+ sql += ' and State_Hospital__c like \'%' + RevalInfo.State_Hospital.trim() + '%\'';
+ }
+ sql += 'and Status1__c not in(\'0.鍒犻櫎\',\'0.鍙栨秷\') limit 200';
System.debug('sql1:' + sql);
if(String.isNotBlank(sql)){
RepairList = Database.query(sql);
}
- if(RepairList.size() > 200){
+ if(RepairList.size() == 200){
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '妫�绱㈡暟鎹お澶�,璇风缉灏忔绱㈣寖鍥达紒'));
- return null;
}
if(RepairList.size() <= 0){
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '娌℃绱㈠埌浠讳綍淇悊'));
@@ -68,6 +256,7 @@
}
public PageReference showPDF() {
+ System.debug(LoggingLevel.INFO, '*** joinshoPDF: ');
repairIdList = new List<String>();
RepairList = new List<Repair__c>();
String url = '=';
@@ -77,23 +266,33 @@
return null;
}
for(RepairData rd : RAInfoList) {
+ System.debug(LoggingLevel.INFO, '*** rd: ' + rd);
if(rd.IFCheck){
repairIdList.add(rd.repair.Id);
RepairList.add(rd.repair);
}
}
+ System.debug(LoggingLevel.INFO, '***repairIdList : ' + repairIdList);
+ System.debug(LoggingLevel.INFO, '***RepairList : ' + RepairList);
if(repairIdList.size() > 0){
if(repairIdList.size() <= 50){
if(RepairList.size() > 0){
+ System.debug(LoggingLevel.INFO, '*** if size>0 generateAttachment: ');
generateAttachment(RepairList);
}
for(String Id : repairIdList){
url += Id + '=';
}
url = url.substring(0, url.lastIndexOf('='));
- PageReference pageRef = new PageReference('/apex/MaintenanceCommissionPDF?id' + url);
- pageRef.setRedirect(true);
- return pageRef;
+ // PageReference pageRef = new PageReference('/apex/MaintenanceCommissionPDF?id' + url);
+ // pageRef.setRedirect(true);
+ // return pageRef;
+ if(isSandbox()){
+ pdfURL = 'https://ocsm--stagefull--c.visualforce.com/apex/MaintenanceCommissionPDF?id' + url;
+ } else{
+ pdfURL = 'https://ocsm.my.salesforce.com/apex/MaintenanceCommissionPDF?id' + url;
+ }
+ return null;
} else{
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '澶氬崟鎵撳嵃鏈�澶ф暟閲忎负50,璇烽�夋嫨灏戜簬50涓慨鐞嗭紒'));
return null;
@@ -106,31 +305,58 @@
// 鐢熸垚pdf娣诲姞鍒板搴旂殑淇悊涓�
public static PageReference generateAttachment(List<Repair__c> repList){
- PageReference pdfPage;
- List<Attachment> attachments = new List<Attachment>();
- for(Repair__c re : repList){
- pdfPage = new PageReference('/apex/MaintenanceCommissionPDF?id=' + re.Id);
- Blob pdfBody;
- if(Test.isRunningTest()) {
- pdfBody = blob.valueOf('Unit.Test');
- } else {
- pdfBody = pdfPage.getContentAsPDF();
- }
- Attachment attach = new Attachment();
- attach.Body = pdfBody;
- attach.Name = re.name + '_' + 'MaintenanceCommission.pdf';
- attach.ParentId = re.id;
- attachments.add(attach);
- }
- insert attachments;
+ System.debug(LoggingLevel.INFO, '*** generateAttachment: ');
+ // PageReference pdfPage;
+ // List<Attachment> attachments = new List<Attachment>();
+ // List<String> attachmentNameList = new List<String>();
+ // List<Attachment> isGeneratedPDFList = new List<Attachment>();
+ // //鍒犻櫎宸插瓨鍦ㄧ殑闄勪欢锛岀敓鎴愭柊鐨勯檮浠�
+ // for(Repair__c re : repList){
+ // attachmentNameList.add(re.name + '_' + 'MaintenanceCommission.pdf');
+ // }
+ // isGeneratedPDFList = [select id from Attachment where name IN:attachmentNameList];
+ // System.debug(LoggingLevel.INFO, '*** isGeneratedPDFList: ' + isGeneratedPDFList);
+ // if(isGeneratedPDFList.size() > 0){
+ // delete isGeneratedPDFList;
+ // }
+ BatchSelectRepairPDFDelete pdf = new BatchSelectRepairPDFDelete();
+ pdf.deletePDF(repList);
+ pdf.createPDF(repList);
+
+ // for(Repair__c re : repList){
+ // pdfPage = new PageReference('/apex/MaintenanceCommissionPDF?id=' + re.Id);
+ // Blob pdfBody;
+ // if(Test.isRunningTest()) {
+ // pdfBody = blob.valueOf('Unit.Test');
+ // } else {
+ // pdfBody = pdfPage.getContentAsPDF();
+ // }
+ // Attachment attach = new Attachment();
+ // attach.Body = pdfBody;
+ // attach.Name = re.name + '_' + 'MaintenanceCommission.pdf';
+ // attach.ParentId = re.id;
+ // attachments.add(attach);
+ // }
+ // System.debug(LoggingLevel.INFO, '*** attachments: ' + attachments);
+ // insert attachments;
return null;
}
+ // 鍒ゆ柇鏄惁鏄祴璇曠幆澧�
+ public Boolean isSandbox() {
+ return [SELECT IsSandbox FROM Organization LIMIT 1].IsSandbox;
+ }
+
public class RetrievalData {
+ public String Status1{ get; set; }
public String Status2{ get; set; }
public String RepairName{ get; set; }
public String SAPRepairNo{ get; set; }
public String SerialNumber{ get; set; }
+ public String onSiteRepair{ get; set; }
+ public String workLocationSelect{ get; set; }
+ public String State_Hospital{ get; set; }
+ public String HospitalName{ get; set; }
public Repair__c repair{ get; set; }
public RetrievalData(){
repair = new Repair__c();
--
Gitblit v1.9.1