Browse Source

OCR数据存储优化

zthwr 1 year ago
parent
commit
3debab53d4

+ 1 - 1
pu/pu/src/client/nc/pub/filesystem/newui/ThFileContentPanel.java

@@ -1829,7 +1829,7 @@ public class ThFileContentPanel extends JPanel {
 	
 	private DefdocVO[]  QryDefdocvoInfo(String name){
     	String sql = "select * from  bd_defdoc where  nvl(dr, 0) = 0 and pk_defdoclist="
-    			+ "(select pk_defdoclist from bd_defdoclist where code='OCRTHNC' and nvl(dr,0)=0) and name='" + name + "' ";
+    			+ "(select pk_defdoclist from bd_defdoclist where code='OCRTHNC' and nvl(dr,0)=0) and memo='" + name + "' ";
     	ArrayList<Object> arrayvos=null;
     	try {
     		IUAPQueryBS iuap= (IUAPQueryBS) NCLocator.getInstance().lookup(IUAPQueryBS.class.getName());

+ 9 - 5
pu/pu/src/client/nc/pub/filesystem/newui/ThOCRAction.java

@@ -160,8 +160,10 @@ public class ThOCRAction extends AbstractNCAction{
 					//自定义档案存在这个编码,走修改
 					DefdocVO defvo =updatevos[0];
 					//赋值
-					defvo.setAttributeValue("name", name);
-					defvo.setAttributeValue("memo", memo);
+//					defvo.setAttributeValue("name", name);
+//					defvo.setAttributeValue("memo", memo);
+					defvo.setAttributeValue("name", memo);
+					defvo.setAttributeValue("memo", name );
 					defvo.setAttributeValue("mnecode", mnecode);
 					defvo.setAttributeValue("name2", name2);
 					defvo.setAttributeValue("name3", name3);
@@ -183,8 +185,10 @@ public class ThOCRAction extends AbstractNCAction{
 					DefdocVO defvo = new DefdocVO();
 					//赋值
 					defvo.setAttributeValue("code", code);
-					defvo.setAttributeValue("name", name);
-					defvo.setAttributeValue("memo", memo);
+//					defvo.setAttributeValue("name", name);
+//					defvo.setAttributeValue("memo", memo);
+					defvo.setAttributeValue("name", memo);
+					defvo.setAttributeValue("memo", name );
 					defvo.setAttributeValue("mnecode", mnecode);
 					defvo.setAttributeValue("name2", name2);
 					defvo.setAttributeValue("name3", name3);
@@ -304,7 +308,7 @@ public class ThOCRAction extends AbstractNCAction{
 				e.printStackTrace();
 			}
         	
-        	if (arrayvos==null) {
+        	if (arrayvos==null||arrayvos.size()==0) {
       			return new DefdocVO[0];
       		}else {
       			return arrayvos.toArray(new DefdocVO[0]);