From 24db254e9fcd437712b86e3a3bacdc0ce7ec16b8 Mon Sep 17 00:00:00 2001 From: FUYU <fuyu@prec-tech.com> Date: 星期五, 26 五月 2023 09:54:16 +0800 Subject: [PATCH] Merge branch 'master' of http://47.92.229.245:8089/r/OlyMEBG --- force-app/main/default/classes/SaleOrderController.cls | 64 ++++++++++++++++++------------- 1 files changed, 37 insertions(+), 27 deletions(-) diff --git a/force-app/main/default/classes/SaleOrderController.cls b/force-app/main/default/classes/SaleOrderController.cls index eeef6ee..8a4faf4 100644 --- a/force-app/main/default/classes/SaleOrderController.cls +++ b/force-app/main/default/classes/SaleOrderController.cls @@ -253,31 +253,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 +676,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