From de9565270a88b0749d17c1961cd41399c8483c96 Mon Sep 17 00:00:00 2001
From: binxie <137736985@qq.com>
Date: 星期一, 26 六月 2023 17:46:45 +0800
Subject: [PATCH] merge
---
force-app/main/default/classes/SaleOrderController.cls | 32 ++++++++++++++++++++++++--------
1 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/force-app/main/default/classes/SaleOrderController.cls b/force-app/main/default/classes/SaleOrderController.cls
index eb8a1ab..e8c3067 100644
--- a/force-app/main/default/classes/SaleOrderController.cls
+++ b/force-app/main/default/classes/SaleOrderController.cls
@@ -222,10 +222,12 @@
List<hospitalprice__c> hpList = [select id,hospital__c,product__c from hospitalprice__c where account__c = :accountid];
if (hpList!= null && hpList.size() > 0) {
for (hospitalprice__c hp : hpList) {
- proIdMap.put((''+hp.product__c).subString(0,15)+'鏄�', '');
- if (hp.hospital__c ==coc.Order_ForHospital__c) {
- proHosMap.put((''+hp.product__c).subString(0,15)+'鏄�', '');
- }
+ if(hp.product__c!=null && String.valueof(hp.product__c).length()>=15){//Add by Li Jun for issue fix 20230403
+ proIdMap.put((''+hp.product__c).subString(0,15)+'鏄�', '');
+ if (hp.hospital__c ==coc.Order_ForHospital__c) {
+ proHosMap.put((''+hp.product__c).subString(0,15)+'鏄�', '');
+ }
+ }
}
}
@@ -676,10 +678,24 @@
}else if(!checkBarcodeResult.containsKey(newdet2[j].Bar_Code__c)) {
Matcher n = Pattern.compile('[0-9]').matcher(newdet2[j].TracingCode__c);
if(n.find()){
- String str = '绠$悊缂栫爜涓湁鏁板瓧锛岃涓庣鐞嗗憳纭鏄惁閿欒銆�';
- consumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(newdet2[j],str));
- errorIdMap.put(newdet2[j].Bar_Code__c,newdet2[j].Bar_Code__c);
- continue;
+ // gzw DB202305352696 鍏ュ簱绠$悊缂栫爜楠岃瘉绋嬪簭璋冩暣 start
+ if (newdet2[j].TracingCode__c.length() == 5) {
+ String tr = newdet2[j].TracingCode__c;
+ String Ctr = tr.substring(tr.length() - 3,tr.length());
+ String Btr = tr.substring(tr.length() - 4,tr.length()-3);
+ String Atr = tr.substring(tr.length() - 5,tr.length()-4);
+ if (Pattern.compile('[0-9]').matcher(Atr).find() || Pattern.compile('[0-9]').matcher(Ctr).find()) {
+ String str = '绠$悊缂栫爜鏈夎锛岃妫�鏌ユ潯褰㈢爜鏁版嵁銆�';
+ consumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(newdet2[j],str));
+ errorIdMap.put(newdet2[j].Bar_Code__c,newdet2[j].Bar_Code__c);
+ continue;
+ }
+ }
+ // String str = '绠$悊缂栫爜涓湁鏁板瓧锛岃涓庣鐞嗗憳纭鏄惁閿欒銆�';
+ // consumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(newdet2[j],str));
+ // errorIdMap.put(newdet2[j].Bar_Code__c,newdet2[j].Bar_Code__c);
+ // continue;
+ // gzw DB202305352696 鍏ュ簱绠$悊缂栫爜楠岃瘉绋嬪簭璋冩暣 end
}
checkBarcodeResult.put(newdet2[j].Bar_Code__c, newdet2[j].Bar_Code__c);
consumableorderdetailsRecords.add(new ConsumableorderdetailsInfo(newdet2[j]));
--
Gitblit v1.9.1