Forráskód Böngészése

使用正则表达式替换中文括号为英文括号

yaoyu 1 éve
szülő
commit
c00291b08e

+ 2 - 0
pu/pu/src/client/nc/ui/pu/m25/editor/card/afteredit/body/OcrRefaft.java

@@ -169,6 +169,8 @@ public class OcrRefaft implements ICardBodyAfterEditEventListener{
 			}else {
 				String sql = "select name from bd_supplier where pk_supplier ='"+headSupplier+"'";
 				String name = (String) iuap.executeQuery(sql, new ColumnProcessor());
+				// 使用正则表达式替换中文括号为英文括号
+				name = name.replaceAll("(", "(").replaceAll(")", ")");
 				if(vbdef15.equals(name)) {
 					//一致
 					arg0.getBillCardPanel().setBodyValueAt("一致", arg0.getRow(), "vbdef14");

+ 2 - 0
pu/pu/src/client/nc/ui/pu/m25/editor/card/afteredit/header/Supplier.java

@@ -129,6 +129,8 @@ public class Supplier implements ICardHeadTailAfterEditEventListener {
     		}else {
     			String sql = "select name from bd_supplier where pk_supplier ='"+headSupplier+"'";
     			String name = (String) iuap.executeQuery(sql, new ColumnProcessor());
+    			// 使用正则表达式替换中文括号为英文括号
+				name = name.replaceAll("(", "(").replaceAll(")", ")");
     			if(vbdef15.equals(name)) {
     				//一致
     				event.getBillCardPanel().setBodyValueAt("一致", i, "vbdef14");

+ 4 - 2
pu/pu/src/private/nc/bs/ic/base/InvoiceAfterCheckEvent.java

@@ -121,8 +121,10 @@ public class InvoiceAfterCheckEvent implements IRule<InvoiceVO>{
 								//比较抬头
 								String sql1 = "select name from org_financeorg_v where pk_vid ='"+InvoiceVO.getParent().getAttributeValue("pk_org_v")+"'";
 								String orgname = (String) bs.executeQuery(sql1, new ColumnProcessor());
-								if(!orgname.equals(defdocVO.getName2())) {
-									ExceptionUtils.wrappBusinessException("行:"+invoiceItemVO.getCrowno()+"发票抬头不正确!请检查自定义档案是否维护!");
+								// 使用正则表达式替换中文括号为英文括号
+								String orgnames = orgname.replaceAll("(", "(").replaceAll(")", ")");
+								if(!orgnames.equals(defdocVO.getName2())) {
+									ExceptionUtils.wrappBusinessException("发票抬头与财务组织不一致,请修改财务组织!");
 								}
 								//比较纳税人识别号
 								StringBuffer sql2 = new StringBuffer();