From 3b43925ca3211c861a2818a089907d34b5480aa5 Mon Sep 17 00:00:00 2001
From: 张宇恒 <bxyun0@163.com>
Date: 星期五, 06 五月 2022 10:41:15 +0800
Subject: [PATCH] 批量数据拆分处理
---
force-app/main/default/classes/FixtureRentalPDFController.cls | 72 ++++++++++++++++++++++++++++-------
1 files changed, 57 insertions(+), 15 deletions(-)
diff --git a/force-app/main/default/classes/FixtureRentalPDFController.cls b/force-app/main/default/classes/FixtureRentalPDFController.cls
index ed66ecf..0c0d353 100644
--- a/force-app/main/default/classes/FixtureRentalPDFController.cls
+++ b/force-app/main/default/classes/FixtureRentalPDFController.cls
@@ -30,12 +30,26 @@
public String centreAddress { get; set; }
public Boolean IsShowLU { get; set; } //鏄惁鏄剧ず绛炬敹鍗曞乏涓婅鏂囧瓧 true鏄剧ず 20201119 LJH OCSM_BP5-61 add
public Boolean IsMain; //鏄惁鏄幇鍦板垎閰嶇殑涓诲崟 20201120 LJH OCSM_BP5-61 add
+
+ public string staticResource { get; private set; }
+ public string staticResourceFile { get; private set; }
+ public Boolean addFlag { get; private set; }//鏁忔劅鍦板潃浣跨敤鏍囪
+ public String qrcode { get; private set; }
+ public String barcode { get; private set; }
+ // 20220413 ljh 鎶ご鏄剧ず add start
+ public String AgencyAddressName { get; private set; }
+ public Boolean isAgencyOrCenter { get; private set; }
+ public String AgencyOrCenterAddress { get; private set; }
+ // 20220413 ljh 鎶ご鏄剧ず add end
+
public FixtureRentalPDFController() {
pageNum = Integer.valueOf(ApexPages.currentPage().getParameters().get('page'));
rentalApplyIdIMG = ApexPages.currentPage().getParameters().get('raid');
//Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=8');
// rentalApplyId = ApexPages.currentPage().getParameters().get('raid');//20201120 ljh
String tempStr = ApexPages.currentPage().getParameters().get('raid');
+
+ addFlag = false;
rentalApplyId = new List<String>();
if(tempStr != null){
rentalApplyId.add(tempStr);
@@ -48,6 +62,8 @@
// 鐢婚潰鍒濆鍖�
public void init() {
+ staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Rental_Apply__c'));
+ staticResourceFile = JSON.serialize(PIHelper.getPIIntegrationInfo('Document'));
// 鏂拌濂ユ灄宸存柉澶囧搧绛炬敹鍗昉DF鐢婚潰鍒濆鍖�
PageCutList = new List<List<String>>();
List<Rental_Apply__c> ApplyList = new List<Rental_Apply__c>();
@@ -95,14 +111,20 @@
Agency_Address_Id__c,//20201124 LJH OCSM_BP5-61 add
Root_Rental_Apply__c,//20210617 ljh 1732 add
BRId__c, // 20211209 ljh SFDC-C923SR add
+ direct_send__c,
QRImg__c,
- QRId__c
+ QRId__c,
+ AWS_Data_Id__c,//20220304
+ Direct_Shippment_Address_Encrypt__c,//20220304
+ Phone_Number_Encrypt__c//20220304
from Rental_Apply__c
where id = :rentalApplyId];
}
if(ApplyList.size()>0){
ApplyHeadShow = ApplyList[0];
+ qrcode = ConsumTrialPDFController.GetImageBase64(ApplyHeadShow.QRId__c);
+ barcode = ConsumTrialPDFController.GetImageBase64(ApplyHeadShow.BRId__c);
}
//澧炲姞鍊熷嚭澶囧搧SET涓�瑙圠ist锛屼负浜嗚幏鍙栧�熷嚭澶囧搧SET涓�瑙堟槑缁�
List<String> RAESSearchList = New List<String>();
@@ -191,6 +213,7 @@
ShippMentAdr = ApplyHeadShow.Shippment_adress_detail__c;
} else {
ShippMentAdr = ApplyHeadShow.Direct_shippment_address__c;
+ addFlag = true;
}
Integer ShipAdrSize = ShippMentAdr == null ? 0 : ShippMentAdr.length();
@@ -340,7 +363,7 @@
mainCnt = 0;
accessoryCnt = 0;
for (Rental_Apply_Equipment_Set_Detail__c ra : RAESDLine) {
- if (ra.Is_Body__c) {
+ if (ra.Is_Body__c) {
mainCnt += 1;
} else {
accessoryCnt += 1;
@@ -466,23 +489,40 @@
//鏂板缓涓�椤�
PDFInfo info = new PDFInfo(new Rental_Apply__c(),New List<Rental_Apply_Equipment_Set_Detail__c>());
+ // 20220413 ljh 鎶ご鏄剧ず update start
//20201120 LJH OCSM_BP5-61 update start
+ // if(!IsShowLU){
+ // if(!IsMain){
+ // info.isAgencyOrCenter = true;//鍔炰簨澶�
+ // info.AgencyAddressName = '璇峰皢澶囧搧鍥炲瘎鑷�';
+ // info.AgencyAddressName += ApplyHeadShow.ToAgency__c == null ? '' : ApplyHeadShow.ToAgency__c;
+ // info.AgencyAddressName += '鍔炰簨澶�';
+ // info.AgencyOrCenterAddress = AgencyAddressIdMap.get(ApplyHeadShow.Id);
+ // }else{
+ // info.isAgencyOrCenter = false;//澶囧搧涓績
+ // info.AgencyOrCenterAddress = centerAddressInfo;
+ // }
+ // }else{
+ // info.isAgencyOrCenter = false;//澶囧搧涓績
+ // info.AgencyOrCenterAddress = centerAddressInfo;
+ // }
+ //20201120 LJH OCSM_BP5-61 update end
if(!IsShowLU){
if(!IsMain){
- info.isAgencyOrCenter = true;//鍔炰簨澶�
- info.AgencyAddressName = '璇峰皢澶囧搧鍥炲瘎鑷�';
- info.AgencyAddressName += ApplyHeadShow.ToAgency__c == null ? '' : ApplyHeadShow.ToAgency__c;
- info.AgencyAddressName += '鍔炰簨澶�';
- info.AgencyOrCenterAddress = AgencyAddressIdMap.get(ApplyHeadShow.Id);
+ isAgencyOrCenter = true;//鍔炰簨澶�
+ AgencyAddressName = '璇峰皢澶囧搧鍥炲瘎鑷�';
+ AgencyAddressName += ApplyHeadShow.ToAgency__c == null ? '' : ApplyHeadShow.ToAgency__c;
+ AgencyAddressName += '鍔炰簨澶�';
+ AgencyOrCenterAddress = AgencyAddressIdMap.get(ApplyHeadShow.Id);
}else{
- info.isAgencyOrCenter = false;//澶囧搧涓績
- info.AgencyOrCenterAddress = centerAddressInfo;
+ isAgencyOrCenter = false;//澶囧搧涓績
+ AgencyOrCenterAddress = centerAddressInfo;
}
}else{
- info.isAgencyOrCenter = false;//澶囧搧涓績
- info.AgencyOrCenterAddress = centerAddressInfo;
+ isAgencyOrCenter = false;//澶囧搧涓績
+ AgencyOrCenterAddress = centerAddressInfo;
}
- //20201120 LJH OCSM_BP5-61 update end
+ // 20220413 ljh 鎶ご鏄剧ず update end
integer PageCut = 0;
if (PageAllNum>=7) {
PageAllNum=7;
@@ -562,9 +602,11 @@
// Data Bean
class PDFInfo {
public String eSetName { get; private set; } //澶囧搧涓績绠$悊鍗曞彿
- public String AgencyAddressName { get; private set; } //鍥炲瘎鍦板潃 20201123 LJH OCSM_BP5-61 add
- public Boolean isAgencyOrCenter { get; private set; } //澶囧搧涓績锛熷姙浜嬪 20201123 LJH OCSM_BP5-61 add
- public String AgencyOrCenterAddress { get; private set; }//20201124 LJH OCSM_BP5-61 add
+ // 20220413 ljh 鎶ご鏄剧ず update start
+ // public String AgencyAddressName { get; private set; } //鍥炲瘎鍦板潃 20201123 LJH OCSM_BP5-61 add
+ // public Boolean isAgencyOrCenter { get; private set; } //澶囧搧涓績锛熷姙浜嬪 20201123 LJH OCSM_BP5-61 add
+ // public String AgencyOrCenterAddress { get; private set; }//20201124 LJH OCSM_BP5-61 add
+ // 20220413 ljh 鎶ご鏄剧ず update end
public String requestOwner { get; private set; } //鐢宠浜�
public String salesDept { get; private set; } //鎵�灞炴湰閮�
public String workPlace { get; private set; } //鎵�灞炲姙浜嬪
--
Gitblit v1.9.1