From f24a5026dbfb2981e234ce46ed503584c03ce420 Mon Sep 17 00:00:00 2001
From: 涂煌豪 <tuhuanghao@prec-tech.com>
Date: 星期一, 18 四月 2022 17:49:35 +0800
Subject: [PATCH] SelectAssetEstimateVMController
---
force-app/main/default/classes/OPDPlanHandler.cls | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/classes/OPDPlanHandler.cls b/force-app/main/default/classes/OPDPlanHandler.cls
index 440374b..7b036ff 100644
--- a/force-app/main/default/classes/OPDPlanHandler.cls
+++ b/force-app/main/default/classes/OPDPlanHandler.cls
@@ -115,6 +115,7 @@
PlanProdDetail__c,
DelayCancel_Reason__c,
Rental_Apply2__c,
+ Rental_Apply2__r.Name,
RentalReson__c, //鍑哄�熺洰鐨�
noReportStatus__c, //鏃犳姤鍛婄姸鎬�
ModelLendingProduct__c, //妯″瀷鍑哄�熶骇鍝�
@@ -173,6 +174,7 @@
nobj.SkipValidationRulesAndWorkflows__c = true;//璺宠繃楠岃瘉瑙勫垯鎴栧伐浣滄祦
nObj.supplementaryApplication__c = true;
nobj.originalOpdRentalApply__c = originalOpdPlanApplication.Rental_Apply2__c;
+ //nobj.originalOpdRentalApplyName__c = originalOpdPlanApplication.Rental_Apply2__r.Name;
if (nObj.Account_Laboratory__c != originalOpdPlanApplication.Account_Laboratory__c) {
nObj.Account_Laboratory__c.addError('琛ュ厖鐢宠鐨凮PD璁″垝,涓嶅彲淇敼绉戝鐨勫��');
@@ -863,6 +865,7 @@
from Account_Number_of_target__c
where id in :OpdTargetAcc.values()]);//鏌ヨ鐩爣瀹㈡埛 鏈储骞寸殑
+ system.debug('==鏈储骞�' + acctarList.size());
Map<id, Account_Number_of_target__c> acctarlastList = new Map<id, Account_Number_of_target__c>([select id,
OPD_amount_290MiroBF__c,
OPD_amount_290MiroGI__c,
@@ -922,7 +925,7 @@
OPDPlan__c opdplan = new OPDPlan__c();
for (String opd : OpdPlanDetail) {
opdplan.id = t.id;
- if(acctarList !=null){
+ if(acctarList !=null && acctarList.size() >0){
if (column != null) {
for (Integer i = 0; i < column.size(); i++) { //鏄惁浜у搧OPD鐩爣瀹㈡埛
List<String> titleAccout = tempImportantProduct.get(column[i]);
@@ -1039,7 +1042,7 @@
for (Integer i = 0; i < columnOPDAmount.size(); i++) { //鏈湡OPD娆℃暟
String titleAccout5 = tempImportantOPDAmount.get(columnOPDAmount[i]);
if (opd == titleAccout5) {
- if(acctarList !=null){
+ if(acctarList !=null && acctarList.size()>0){
if (acctarList.containskey(opdct) && acctarList.get(opdct).get(columnOPDAmount[i]) != null && acctarList.get(opdct).get(columnOPDAmount[i]) != 0) {
system.debug('=columnOPDAmount[i]==' + columnOPDAmount[i] + '=鏈湡OPD娆℃暟=' + acctarList.get(opdct).get(columnOPDAmount[i]));
Decimal aa = acctarList.get(opdct).get(columnOPDAmount[i]) == null ? 0 : Decimal.valueOf(String.valueOf(acctarList.get(opdct).get(columnOPDAmount[i])));
@@ -1056,7 +1059,7 @@
}
}
}
- if(acctarlastList !=null){
+ if(acctarlastList !=null && acctarlastList.size()>0){
if (acctarlastList.containskey(opdla) && acctarlastList.get(opdla).get(columnOPDAmount[i]) != null && acctarlastList.get(opdla).get(columnOPDAmount[i]) != 0) {
system.debug('=columnOPDAmount[i]==' + columnOPDAmount[i] + '=涓婃湡OPD娆℃暟=' + acctarlastList.get(opdla).get(columnOPDAmount[i]));
Decimal bb = acctarlastList.get(opdla).get(columnOPDAmount[i]) == null ? 0 : Decimal.valueOf(String.valueOf(acctarlastList.get(opdla).get(columnOPDAmount[i])));
--
Gitblit v1.9.1