1.天津税控部分信息改为配置页面读取。

This commit is contained in:
zhangbb 2020-11-06 13:45:01 +08:00
parent 8ebef36da2
commit 88e5394a51
4 changed files with 17 additions and 4 deletions

View File

@ -56,6 +56,7 @@ public class IAutokpDo {
String responseParam="";
doc = ivoiceXML.createInvoiceXML(lsm,fpzl,fpzf);
requestParam = doc.asXML();
try {
if(!requestParam.startsWith("error")&&requestParam!=null&&!"".equals(requestParam)){
IAutokpUtils.saveFile(requestParam, contract_no);

View File

@ -6,6 +6,7 @@ import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.ResourceBundle;
import org.dom4j.Document;
import org.dom4j.DocumentException;
@ -14,7 +15,9 @@ import org.dom4j.Element;
public class IAutokpUtils {
public static void saveFile(String str,String contractNo){
File file = new File("D:\\tmp\\invoicelog\\"+"invoice_"+contractNo+".txt");
ResourceBundle resource = ResourceBundle.getBundle("com/tenwa/invoice/InvoiceConfig");
String saveFilePath = resource.getString("saveFilePath");
File file = new File(saveFilePath+"/invoice_"+contractNo+".txt");
FileWriter fw = null;
try {
fw = new FileWriter(file);
@ -56,9 +59,12 @@ public class IAutokpUtils {
}
static void addUserInfo(Element rootEle) {
ResourceBundle resource = ResourceBundle.getBundle("com/tenwa/invoice/InvoiceConfig");
Element Ele_wsname = rootEle.addElement("wsname");
Ele_wsname.setText("admin");
Ele_wsname.setText(resource.getString("wsname"));
Element Ele_wspwd = rootEle.addElement("wspwd");
Ele_wspwd.setText("admin");
Ele_wspwd.setText(resource.getString("wspwd"));
}
}

View File

@ -7,6 +7,8 @@
package com.tenwa.invoice;
import java.util.ResourceBundle;
public class IAutokpserviceLocator extends org.apache.axis.client.Service implements com.tenwa.invoice.IAutokpservice {
public IAutokpserviceLocator() {
@ -22,7 +24,7 @@ public class IAutokpserviceLocator extends org.apache.axis.client.Service implem
}
// Use to get a proxy class for IAutokpPort
private java.lang.String IAutokpPort_address = "http://tjaisino.top:8356/soap/IAutokp";
private java.lang.String IAutokpPort_address = ResourceBundle.getBundle("com/tenwa/invoice/InvoiceConfig").getString("url");
public java.lang.String getIAutokpPortAddress() {
return IAutokpPort_address;

View File

@ -0,0 +1,4 @@
wsname=admin
wspwd=admin
saveFilePath=/tmp
url=http://tjaisino.top:8356/soap/IAutokp