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 | 74 +++++++++++++++++++++---------------
1 files changed, 43 insertions(+), 31 deletions(-)
diff --git a/force-app/main/default/classes/SaleOrderController.cls b/force-app/main/default/classes/SaleOrderController.cls
index eeef6ee..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)+'鏄�', '');
+ }
+ }
}
}
@@ -253,31 +255,27 @@
//鍒ゆ柇褰撳墠鍑哄簱鍗曟槸鍚︿负鍖婚櫌鐗逛环鍑哄簱鍗�
if (coc.OutPattern__c == true) {
if (newdet2[j].Product_Pattern__c == orderdetails[i].Product_Pattern__c) {
-
- if (hpList != null && hpList.size() > 0) {
- //add by rentx 2021-03-22 start
- if (newdet2[j].exchangeOutPattern__c || coc.SummonsForDirction__c == '浜掔浉璋冭揣') {
- //濡傛灉褰撳墠缁忛攢鍟嗕笅娌℃湁缁存姢瀵瑰簲鐨勭壒浠蜂骇鍝� 鎶ラ敊
- if (!proIdMap.containsKey(newdet2[j].Product_Pattern__c)) {
- String str = '娌℃湁缁存姢璇ヤ骇鍝佺殑鐗逛环鍖婚櫌';
- consumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(newdet2[j],str));
- errorIdMap.put(newdet2[j].Bar_Code__c,newdet2[j].Bar_Code__c);
- }
- }else{
- if (proHosMap.containsKey(newdet2[j].Product_Pattern__c)) {
- continue;
- }else if (!proIdMap.containsKey(newdet2[j].Product_Pattern__c)) {
- continue;
- }else{
- String str = '璇ュ晢鍝佸嚭搴撳尰闄㈤敊璇�';
- consumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(newdet2[j],str));
- errorIdMap.put(newdet2[j].Bar_Code__c,newdet2[j].Bar_Code__c);
- }
+ //add by rentx 2021-03-22 start
+ if (newdet2[j].exchangeOutPattern__c == true) {
+ //濡傛灉褰撳墠缁忛攢鍟嗕笅娌℃湁缁存姢瀵瑰簲鐨勭壒浠蜂骇鍝� 鎶ラ敊
+ if (!proIdMap.containsKey(newdet2[j].Product_Pattern__c)) {
+ String str = '娌℃湁缁存姢璇ヤ骇鍝佺殑鐗逛环鍖婚櫌';
+ consumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(newdet2[j],str));
+ errorIdMap.put(newdet2[j].Bar_Code__c,newdet2[j].Bar_Code__c);
}
- //add by rentx 2021-03-22 end
+ }
+ //add by rentx 2021-03-22 end
-
-
+ if (hpList != null && hpList.size() > 0) {
+ if (proHosMap.containsKey(newdet2[j].Product_Pattern__c)) {
+ continue;
+ }else if (!proIdMap.containsKey(newdet2[j].Product_Pattern__c)) {
+ continue;
+ }else{
+ String str = '璇ュ晢鍝佸嚭搴撳尰闄㈤敊璇�';
+ consumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(newdet2[j],str));
+ errorIdMap.put(newdet2[j].Bar_Code__c,newdet2[j].Bar_Code__c);
+ }
}
}
}
@@ -680,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