From e3c02c03dd2de442bbced87236f60a13a1cd154e Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期四, 02 三月 2023 17:51:57 +0800
Subject: [PATCH] gzw 正式环境最新代码更新

---
 force-app/main/default/classes/PrintConsumblePDFController.cls |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/force-app/main/default/classes/PrintConsumblePDFController.cls b/force-app/main/default/classes/PrintConsumblePDFController.cls
index 4800d9c..2da5d21 100644
--- a/force-app/main/default/classes/PrintConsumblePDFController.cls
+++ b/force-app/main/default/classes/PrintConsumblePDFController.cls
@@ -122,7 +122,14 @@
                 nowRightAsstModelNo = '';
             }
             nameStringArray = new List<String>();
-            repeatCount = (nowName.length() / nameMax) + ( Math.mod( nowName.length(), nameMax) > 0 ? 1 : 0);
+            // 20220824 ljh SWAG-CHKAMM update start
+            // repeatCount = (nowName.length() / nameMax) + ( Math.mod( nowName.length(), nameMax) > 0 ? 1 : 0);
+            if(String.isBlank(nowName)){
+                repeatCount = 1;
+            }else{
+                repeatCount = (nowName.length() / nameMax) + ( Math.mod( nowName.length(), nameMax) > 0 ? 1 : 0);
+            }
+            // 20220824 ljh SWAG-CHKAMM update end
             //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING, 'repeatCount!' + repeatCount));
             // 鐢熶骇浼佷笟 娉ㄩ噴鍘熶唬鐮�
             // nowCompany = itemsOrg[i].Consumable_Product__r.Product2__r.ProduceCompany_F__c;

--
Gitblit v1.9.1