buli
2023-05-30 41ad0c0840a6135b7acf2280f0eebdc29bf6479b
force-app/main/default/classes/LexSaleOrderController.cls
@@ -676,10 +676,22 @@
                    } 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;
                            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;
                        }
                        checkBarcodeResult.put(newdet2[j].Bar_Code__c, newdet2[j].Bar_Code__c);
                        consumableorderdetailsRecords.add(new ConsumableorderdetailsInfo(newdet2[j]));