Browse Source

BUG处理

yaoyu 1 year ago
parent
commit
8a38e5e8f8

+ 6 - 3
pu/pu/src/client/nc/pub/filesystem/newui/ThOCRAction.java

@@ -243,10 +243,13 @@ public class ThOCRAction extends AbstractNCAction{
 				String name4 = payer.getString("company");//购买方公司名称
 				JSONObject modify_info = info.getJSONObject("modify_info");
 				String furl = modify_info.getString("furl");//发票图片id 或者链接
-				if (furl == null) {
+				if (furl == null || "".equals(furl)) {
 				    String pdf = modify_info.getString("pdf");
-				    String pi = pro.getString("pi");
-				    furl = pdf != null ? pdf : pi;
+				    if(pdf == null || "".equals(pdf)) {
+				    	furl = pro.getString("pi");
+				    }else {
+				    	furl = pdf;
+				    }
 				}
 				IDefdocService idefservice = NCLocator.getInstance().lookup(IDefdocService.class);
 				DefdocVO[] vos = new DefdocVO[1];

+ 6 - 3
pu/pu/src/client/nc/ui/pubapp/uif2app/actions/MultiSelectDialog.java

@@ -176,10 +176,13 @@ public class MultiSelectDialog extends UIDialog {
 					JSONObject comm_info = info.getJSONObject("comm_info");
 					JSONObject pro = comm_info.getJSONObject("pro");
 					String furl = modify_info.getString("furl");//发票图片id 或者链接
-					if (furl == null) {
+					if (furl == null || "".equals(furl)) {
 					    String pdf = modify_info.getString("pdf");
-					    String pi = pro.getString("pi");
-					    furl = pdf != null ? pdf : pi;
+					    if(pdf == null || "".equals(pdf)) {
+					    	furl = pro.getString("pi");
+					    }else {
+					    	furl = pdf;
+					    }
 					}
 					String date = pro.getString("date");//发票日期
 					String type = pro.getString("type");//发票类型

+ 11 - 3
pu/pu/src/private/nc/bs/ic/base/InvoiceAfterCheckEvent.java

@@ -124,7 +124,14 @@ public class InvoiceAfterCheckEvent implements IRule<InvoiceVO>{
 								// 使用正则表达式替换中文括号为英文括号
 								String orgnames = orgname.replaceAll("(", "(").replaceAll(")", ")");
 								String name2 = defdocVO.getName2().replaceAll("(", "(").replaceAll(")", ")");
+								
+								//上海天华嘉易建筑设计有限公司(建筑) 上海天华嘉易建筑设计有限公司两家公司共用上海天华嘉易建筑设计有限公司抬头
+								//上海天华嘉易建筑设计有限公司(建筑)制单时去掉(建筑),保证能使用同一个抬头
+								if("上海天华嘉易建筑设计有限公司(建筑)".equals(orgnames)) {
+									 orgnames = orgnames.replace("(建筑)", "");
+								}
 								if(!orgnames.equals(name2)) {
+									
 									ExceptionUtils.wrappBusinessException("发票抬头与财务组织不一致,请修改财务组织!");
 								}
 								//比较纳税人识别号
@@ -135,11 +142,12 @@ public class InvoiceAfterCheckEvent implements IRule<InvoiceVO>{
 								sql2.append(" bd_defdoc ");
 								sql2.append(" WHERE");
 								sql2.append(" pk_defdoclist = ( SELECT pk_defdoclist FROM bd_defdoclist WHERE code = 'CORPYS04' ) ");
-								sql2.append(" AND memo = '"+orgname+"' ");
+								sql2.append(" AND memo = '"+name2+"' ");
 								sql2.append(" AND enablestate = 2");
 								String tcode = (String) bs.executeQuery(sql2.toString(), new ColumnProcessor());
-								if(!defdocVO.getMnecode().equals(tcode)) {
-									ExceptionUtils.wrappBusinessException("行:"+invoiceItemVO.getCrowno()+"纳税人识别号不正确!请检查自定义档案是否维护正确!");
+								String mnecode = defdocVO.getMnecode() == null ? "" : defdocVO.getMnecode();
+								if(!mnecode.equals(tcode)) {
+									ExceptionUtils.wrappBusinessException("行:"+invoiceItemVO.getCrowno()+"纳税人识别号不正确! 请检查发票纳税人识别号和自定义档案是否正确!");
 								}
 							}
 						}