发票代码提交
This commit is contained in:
parent
e5605a074c
commit
d6556b8120
|
@ -85,7 +85,7 @@ import java.util.stream.Collectors;
|
||||||
* qeug_recon_payreqbill_ext && qeug_recon_connotextb_ext
|
* qeug_recon_payreqbill_ext && qeug_recon_connotextb_ext
|
||||||
*/
|
*/
|
||||||
public class ReconPayreqFormPlugin extends AbstractFormPlugin implements BeforeF7SelectListener {
|
public class ReconPayreqFormPlugin extends AbstractFormPlugin implements BeforeF7SelectListener {
|
||||||
//
|
|
||||||
private static final Log logger = LogFactory.getLog(OAUtils.class);
|
private static final Log logger = LogFactory.getLog(OAUtils.class);
|
||||||
|
|
||||||
List<String> fileExtendList = new ArrayList<String>(Arrays.asList("png","jpg","jpeg","ofd","pdf","xml"));//发票文件后缀集合
|
List<String> fileExtendList = new ArrayList<String>(Arrays.asList("png","jpg","jpeg","ofd","pdf","xml"));//发票文件后缀集合
|
||||||
|
@ -96,7 +96,6 @@ public class ReconPayreqFormPlugin extends AbstractFormPlugin implements BeforeF
|
||||||
String billtype = this.getModel().getDataEntity().getDynamicObjectType().getName();//获取单据标识
|
String billtype = this.getModel().getDataEntity().getDynamicObjectType().getName();//获取单据标识
|
||||||
if ("recon_connotextbill".equals(billtype)){//当单据为费用登记单时,对该控件进行过滤监听。
|
if ("recon_connotextbill".equals(billtype)){//当单据为费用登记单时,对该控件进行过滤监听。
|
||||||
BasedataEdit edit = this.getView().getControl("qeug_personbank");//获取报销人控件
|
BasedataEdit edit = this.getView().getControl("qeug_personbank");//获取报销人控件
|
||||||
System.out.println("123");
|
|
||||||
edit.addBeforeF7SelectListener(this);
|
edit.addBeforeF7SelectListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,6 +195,7 @@ public class ReconPayreqFormPlugin extends AbstractFormPlugin implements BeforeF
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// ToDo: 获取token;重新识别无需对现存的发票的数据操作,直接提示接口信息
|
// ToDo: 获取token;重新识别无需对现存的发票的数据操作,直接提示接口信息
|
||||||
|
|
||||||
String oaToken = getOaToken();
|
String oaToken = getOaToken();
|
||||||
//发票信息分录
|
//发票信息分录
|
||||||
DynamicObjectCollection invoiceentry = this.getView().getModel().getEntryEntity("invoiceentry");
|
DynamicObjectCollection invoiceentry = this.getView().getModel().getEntryEntity("invoiceentry");
|
||||||
|
@ -731,8 +731,10 @@ public class ReconPayreqFormPlugin extends AbstractFormPlugin implements BeforeF
|
||||||
// if (bos_user != null){
|
// if (bos_user != null){
|
||||||
// loginName = bos_user.getString("number");
|
// loginName = bos_user.getString("number");
|
||||||
// }
|
// }
|
||||||
String linkUrl = "http://172.31.254.240:9090/seeyon/rest/token";
|
String oaUrl = System.getProperty("oaurl");
|
||||||
|
logger.info("密钥接口:mc获取的oaUrl:\n{}", oaUrl);
|
||||||
|
String linkUrl =oaUrl+ "/seeyon/rest/token";
|
||||||
|
// String linkUrl = "http://172.31.254.240:9090/seeyon/rest/token";
|
||||||
//接口请求体
|
//接口请求体
|
||||||
JSONObject linkBody = new JSONObject();
|
JSONObject linkBody = new JSONObject();
|
||||||
linkBody.put("userName", userName);
|
linkBody.put("userName", userName);
|
||||||
|
@ -746,18 +748,22 @@ public class ReconPayreqFormPlugin extends AbstractFormPlugin implements BeforeF
|
||||||
if (StringUtils.isNotEmpty(linkPostjson)) {
|
if (StringUtils.isNotEmpty(linkPostjson)) {
|
||||||
JSONObject jsonObject = JSONObject.parseObject(linkPostjson);
|
JSONObject jsonObject = JSONObject.parseObject(linkPostjson);
|
||||||
token = jsonObject.getString("id");
|
token = jsonObject.getString("id");
|
||||||
|
logger.info("获取OaToken接口返回id"+token);
|
||||||
}
|
}
|
||||||
return token;
|
return token;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.info(String.format("获取OaToken接口异常:%s", e.getMessage()));
|
logger.info(String.format("获取OaToken接口异常:%s", e.getMessage())+"接口地址:"+linkUrl);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public JSONObject parseOCRData(String taxno,String fileExtend,String base64File,String token){
|
public JSONObject parseOCRData(String taxno,String fileExtend,String base64File,String token){
|
||||||
|
String oaUrl = System.getProperty("oaurl");
|
||||||
String linkUrl = "http://172.31.254.240:9090/seeyon/rest/lexmisciv/kekai/parseOCRData";
|
logger.info("解析图片接口:mc获取的oaUrl:\n{}", oaUrl);
|
||||||
|
String linkUrl = oaUrl+"/seeyon/rest/lexmisciv/kekai/parseOCRData";
|
||||||
|
System.out.println("test");
|
||||||
|
// String linkUrl = "http://172.31.254.240:9090/seeyon/rest/lexmisciv/kekai/parseOCRData";
|
||||||
//接口请求体
|
//接口请求体
|
||||||
JSONObject linkBody = new JSONObject();
|
JSONObject linkBody = new JSONObject();
|
||||||
linkBody.put("taxno", taxno);
|
linkBody.put("taxno", taxno);
|
||||||
|
@ -775,14 +781,17 @@ public class ReconPayreqFormPlugin extends AbstractFormPlugin implements BeforeF
|
||||||
return jsonObject;
|
return jsonObject;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.info(String.format("获取OaToken接口异常:%s", e.getMessage()));
|
logger.info(String.format("获取parseOCRData接口异常:%s", e.getMessage()));
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JSONObject saveCheck(String taxno,String fileId,JSONArray ocrDatas,String token) {
|
public JSONObject saveCheck(String taxno,String fileId,JSONArray ocrDatas,String token) {
|
||||||
String linkUrl = "http://172.31.254.240:9090/seeyon/rest/lexmisciv/kekai/saveOutInvoice";
|
String oaUrl = System.getProperty("oaurl");
|
||||||
|
logger.info("保存验真接口:mc获取的oaUrl:\n{}", oaUrl);
|
||||||
|
String linkUrl = oaUrl+"/seeyon/rest/lexmisciv/kekai/saveOutInvoice";
|
||||||
|
// String linkUrl = "http://172.31.254.240:9090/seeyon/rest/lexmisciv/kekai/saveOutInvoice";
|
||||||
//接口请求体
|
//接口请求体
|
||||||
JSONObject linkBody = new JSONObject();
|
JSONObject linkBody = new JSONObject();
|
||||||
linkBody.put("taxno", taxno);
|
linkBody.put("taxno", taxno);
|
||||||
|
@ -808,7 +817,10 @@ public class ReconPayreqFormPlugin extends AbstractFormPlugin implements BeforeF
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
public JSONObject deleteInvoice(String pi_keys,String token) {
|
public JSONObject deleteInvoice(String pi_keys,String token) {
|
||||||
String linkUrl = "http://172.31.254.240:9090/seeyon/rest/lexmisciv/kekai/delInvoice";
|
String oaUrl = System.getProperty("oaurl");
|
||||||
|
logger.info("删除接口:mc获取的oaUrl:\n{}", oaUrl);
|
||||||
|
String linkUrl = oaUrl+"/seeyon/rest/lexmisciv/kekai/delInvoice";
|
||||||
|
// String linkUrl = "http://172.31.254.240:9090/seeyon/rest/lexmisciv/kekai/delInvoice";
|
||||||
//接口请求体
|
//接口请求体
|
||||||
Map<String, String> saveCheckHeader = new HashMap<>();
|
Map<String, String> saveCheckHeader = new HashMap<>();
|
||||||
saveCheckHeader.put("Content-Type", "application/json");
|
saveCheckHeader.put("Content-Type", "application/json");
|
||||||
|
|
Loading…
Reference in New Issue