From 41a627eaaf29658a401ac43e4da838a5b622f44e Mon Sep 17 00:00:00 2001
From: 李彤 <litong@prec-tech.com>
Date: 星期一, 29 五月 2023 16:54:34 +0800
Subject: [PATCH] DB202303088261
---
force-app/main/default/classes/PrintConsumblePDFController.cls | 35 +++++++++++++++++++++++------------
1 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/force-app/main/default/classes/PrintConsumblePDFController.cls b/force-app/main/default/classes/PrintConsumblePDFController.cls
index 5f4e3f5..dfe531f 100644
--- a/force-app/main/default/classes/PrintConsumblePDFController.cls
+++ b/force-app/main/default/classes/PrintConsumblePDFController.cls
@@ -52,6 +52,7 @@
Order_ForHospital__c,Deliver_date__c,Order_Reason__c,
Order_date__c,Total_amount__c,Order_ProType__c,
Offers_Price__c,Order_effective_contact__r.Business_Assistant__r.Province_Text__c
+ ,Order_effective_contact__r.OSH_Dealer__c //20230323 lt DB202303088261 涓ょエ鍒� add
From Consumable_order__c
Where Id =:ESetId];
if (qs.size()>0){
@@ -91,7 +92,6 @@
Consumable_Product__r.Product2__r.SalesPackagingUnit_Chinese__c,
Consumable_Product__r.Product2__r.ProduceCompany_F__c,
Consumable_Product__r.Product2__r.ProduceCompany__c,
- Consumable_Product__r.Product2__r.ProduceCompanySummary__c,
Sum_of_money__c,
Dealer_Custom_Price__c,
Lose_reason__c,
@@ -123,21 +123,21 @@
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;
String nowCompany = null;
-
- //CHAN-C4X63A 銆愬鎵樸�慛FM204瀛楁鈥滅敓浜т紒涓氬湴鍧�鈥濅紭鍖� XHL 20210716 Start
- //if(itemsOrg[i].Consumable_Product__r.Product2__r.ProduceCompany__c !=null){
- // nowCompany = getProduceCompanyName(itemsOrg[i].Consumable_Product__r.Product2__r.ProduceCompany__c);
- //}
- if(itemsOrg[i].Consumable_Product__r.Product2__r.ProduceCompanySummary__c !=null){
- nowCompany = getProduceCompanyName(itemsOrg[i].Consumable_Product__r.Product2__r.ProduceCompanySummary__c);
+ if(itemsOrg[i].Consumable_Product__r.Product2__r.ProduceCompany__c !=null){
+ nowCompany = getProduceCompanyName(itemsOrg[i].Consumable_Product__r.Product2__r.ProduceCompany__c);
}
- //CHAN-C4X63A 銆愬鎵樸�慛FM204瀛楁鈥滅敓浜т紒涓氬湴鍧�鈥濅紭鍖� XHL 20210716 End
-
if (nowCompany == null) nowCompany = '';
//hasEnglish = Pattern.matches('.*[a-zA-Z]+.*', nowCompany);
//Integer companyMax = hasEnglish ? 16 : 12;
@@ -260,6 +260,7 @@
'娌冲崡鐪�' => '濂ユ灄宸存柉锛堝寳浜級閿�鍞湇鍔℃湁闄愬叕鍙�',
'娴欐睙鐪�' => '濂ユ灄宸存柉锛堝寳浜級閿�鍞湇鍔℃湁闄愬叕鍙镐笂娴峰垎鍏徃',
'瀹夊窘鐪�' => '濂ユ灄宸存柉锛堝寳浜級閿�鍞湇鍔℃湁闄愬叕鍙镐笂娴峰垎鍏徃',
+ 'OSH-瀹夊窘鐪�' => '濂ユ灄宸存柉璐告槗锛堜笂娴凤級鏈夐檺鍏徃', //20230323 lt DB202303088261 涓ょエ鍒� add
'姹熻タ鐪�' => '濂ユ灄宸存柉锛堝寳浜級閿�鍞湇鍔℃湁闄愬叕鍙镐笂娴峰垎鍏徃',
'绂忓缓鐪�' => '濂ユ灄宸存柉锛堝寳浜級閿�鍞湇鍔℃湁闄愬叕鍙镐笂娴峰垎鍏徃',
'姹熻嫃鐪�' => '濂ユ灄宸存柉锛堝寳浜級閿�鍞湇鍔℃湁闄愬叕鍙镐笂娴峰垎鍏徃',
@@ -270,7 +271,17 @@
//CHAN-B42D6F 瀹夊窘ET鐗圭害缁忛攢鍟嗘潵鐨勮浠� SAP涓婁紶鐪� 绱ф�ュ搴斾负鍖椾含 浠ュ悗浼氫慨鏀� TODO
//CHAN-BTF64C 瀹夊窘ENG缁忛攢鍟嗙殑璇环榛樿SAP涓婁紶鐪佷慨鏀� update by rentongxiao 2020-09-14 start
// String province = coc.Order_effective_contact__r.Business_Assistant__r.Province_Text__c == '瀹夊窘鐪�' ? '鍖椾含甯�' : coc.Order_effective_contact__r.Business_Assistant__r.Province_Text__c;
- String province = coc.Order_effective_contact__r.Business_Assistant__r.Province_Text__c == '瀹夊窘鐪�' && coc.Order_ProType__c == 'ET' ? '鍖椾含甯�' : coc.Order_effective_contact__r.Business_Assistant__r.Province_Text__c;
+ //20230323 lt DB202303088261 涓ょエ鍒� start
+ String province = '';
+ if(coc.Order_effective_contact__r.OSH_Dealer__c == TRUE){
+ province = 'OSH-瀹夊窘鐪�';
+ }else if(coc.Order_effective_contact__r.Business_Assistant__r.Province_Text__c == '瀹夊窘鐪�' && coc.Order_ProType__c == 'ET'){
+ province = '鍖椾含甯�';
+ }else{
+ province = coc.Order_effective_contact__r.Business_Assistant__r.Province_Text__c;
+ }
+ // String province = coc.Order_effective_contact__r.Business_Assistant__r.Province_Text__c == '瀹夊窘鐪�' && coc.Order_ProType__c == 'ET' ? '鍖椾含甯�' : coc.Order_effective_contact__r.Business_Assistant__r.Province_Text__c;
+ //20230323 lt DB202303088261 涓ょエ鍒� end
//CHAN-BTF64C 瀹夊窘ENG缁忛攢鍟嗙殑璇环榛樿SAP涓婁紶鐪佷慨鏀� update by rentongxiao 2020-09-14 end
--
Gitblit v1.9.1