Browse Source

ocr识别按钮优化

zthwr 1 year ago
parent
commit
d42e0b3dd2
1 changed files with 10 additions and 0 deletions
  1. 10 0
      pu/pu/src/client/nc/pub/filesystem/newui/ThOCRAction.java

+ 10 - 0
pu/pu/src/client/nc/pub/filesystem/newui/ThOCRAction.java

@@ -141,6 +141,10 @@ public class ThOCRAction extends AbstractNCAction{
 				}
 				String memo = info.getString("number");//发票号
 				JSONObject comm_info = info.getJSONObject("comm_info");
+				JSONObject price = comm_info.getJSONObject("price");
+				String amount = price.getString("amount");//无税金额
+				String total = price.getString("total");//价税合计
+				String dtax = price.getString("dtax");//可抵扣税额
 				JSONObject buyer = comm_info.getJSONObject("buyer");
 				String mnecode = buyer.getString("tcode");//购买方纳税人识别号
 				String name2 = buyer.getString("company");//购买方公司名称
@@ -163,6 +167,9 @@ public class ThOCRAction extends AbstractNCAction{
 					defvo.setAttributeValue("name3", name3);
 					defvo.setAttributeValue("name4", name4);
 					defvo.setAttributeValue("name6", vdef17);
+					defvo.setAttributeValue("shortname", amount);
+					defvo.setAttributeValue("shortname2", total);
+					defvo.setAttributeValue("shortname3", dtax);
 					defvo.setAttributeValue("enablestate", 2);
 					try {
 						idefservice.updateDefdocs(pk_group,updatevos);
@@ -189,6 +196,9 @@ public class ThOCRAction extends AbstractNCAction{
 					defvo.setAttributeValue("pk_org", pk_group);
 					defvo.setAttributeValue("datatype", 1);
 					defvo.setAttributeValue("enablestate", 2);
+					defvo.setAttributeValue("shortname", amount);
+					defvo.setAttributeValue("shortname2", total);
+					defvo.setAttributeValue("shortname3", dtax);
 					vos[0] = defvo;
 					try {
 				//		idefservice.insertDefdocs(pk_org, vos);