Commit 42a68fd0 authored by 徐州's avatar 徐州

修改字符编码

parent f873629b
......@@ -123,11 +123,9 @@ newMessageHost=http://127.0.0.1:9000/api/sms/sendMessage
#newMessageHost=http://192.168.1.193:9000/api/sms/sendMessage
#��ʽ����
waiwangip=192.168.1.248
#waiwangip=127.0.0.1
wwCommonAction=/zsbwwsb/util/getInfo.action
#���Ի���
#waiwangip=192.168.1.152
#wwCommonAction=/util/getInfo.action
waiwangduankou=8080
......@@ -152,4 +150,4 @@ fs-sfxmbh:10304240101
#fs-sfxmbh:103015601
#非税开票
EInvoiceContent:<Header><EInvoiceTag>CZ-EI-32</EInvoiceTag><EInvoiceID>0986189200-02101023</EInvoiceID><Version>1.1.0</Version></Header><EInvoiceData><Main><EInvoiceName>江苏省非税收入统一票据(电子)</EInvoiceName><EInvoiceCode>{{EInvoiceCode}}</EInvoiceCode><EInvoiceNumber>{{EInvoiceNumber}}</EInvoiceNumber><RandomNumber>{{random}}</RandomNumber><EInvoiceSpecimenCode>3201012010</EInvoiceSpecimenCode><SupervisorAreaCode>320100</SupervisorAreaCode><TotalAmount>{{yjje}}</TotalAmount><IssueDate>{{kprq}}</IssueDate><IssueTime>{{kpsj}}</IssueTime><InvoicingParty><InvoicingPartyCode>708002</InvoicingPartyCode><InvoicingPartyName>南京市城市建设费用征收服务中心</InvoicingPartyName><RecName>南京市城市建设费用征收服务中心</RecName><RecAcct>10105901040000062</RecAcct><RecOpBk>南京农行鼓楼支行</RecOpBk></InvoicingParty><PayerParty><PayerPartyType>2</PayerPartyType><PayerPartyCode/><PayerPartyName>{{jkr}}</PayerPartyName><PayerAcct/><PayerOpBk/></PayerParty><PayMode/><BizCode>{{lsh}}</BizCode><CurrencyType/><ExchangeRate/><Remark>{{beizhu}}</Remark><HandlingPerson>南京市城市建设费用征收服务中心</HandlingPerson><Checker/><SupervisorRemark/><InvoicingPartySeal><SealId>f2ae8a477d7247148adf2e5cd48630e6</SealId><SealName/><SealHash/></InvoicingPartySeal><SupervisorPartySeal><SealId>f2ae8a477d7247148adf2e5cd48630e6</SealId><SealName/><SealHash/></SupervisorPartySeal><MainExt><RelatedInvoiceCode/><RelatedInvoiceNumber/><PayCode>{{jkm}}</PayCode><BusinessNumber/><BusinessDate/><Gender/><Age/><Address/><School/><Faculty/><Major/><Classes/><StudentID/><MedicalType/><MedicalDate/><CaseNumber/><PatientNumber/><HospitalizationNumber/><DepartmentName/><InHospitalDate/><OutHospitalDate/><PrepayAmount/><RechargeAmount/><RefundAmount/><OrgType/><MedicalInsuranceType/><MedicalInsuranceID/><FundPayAmount/><OtherPayAmount/><AccountPayAmount/><OwnPayAmount/><SelfpaymentAmount/><SelfpaymentCost/><Custom1/><Custom2/><Custom3/><Custom4/><Custom5/><Custom6/><Custom7/><Custom8/><Custom9/><Custom10/><Custom11/><Custom12/></MainExt></Main><Details><Item><ItemCode>{{itemCode}}</ItemCode><ItemName>城市基础设施配套费-城区</ItemName><ItemQuantity>{{yjmj}}</ItemQuantity><ItemUnit>元</ItemUnit><ItemStd>150.00</ItemStd><ItemAmount>{{yjje}}</ItemAmount><ItemRemark/><ItemExt><ItemDetailName/></ItemExt></Item></Details></EInvoiceData>
\ No newline at end of file
EInvoiceContent:<Header><EInvoiceTag>CZ-EI-32</EInvoiceTag><EInvoiceID>0986189200-02101023</EInvoiceID><Version>1.1.0</Version></Header><EInvoiceData><Main><EInvoiceName>\u6c5f\u82cf\u7701\u975e\u7a0e\u6536\u5165\u7edf\u4e00\u7968\u636e\uff08\u7535\u5b50\uff09</EInvoiceName><EInvoiceCode>{{EInvoiceCode}}</EInvoiceCode><EInvoiceNumber>{{EInvoiceNumber}}</EInvoiceNumber><RandomNumber>{{random}}</RandomNumber><EInvoiceSpecimenCode>3201012010</EInvoiceSpecimenCode><SupervisorAreaCode>320100</SupervisorAreaCode><TotalAmount>{{yjje}}</TotalAmount><IssueDate>{{kprq}}</IssueDate><IssueTime>{{kpsj}}</IssueTime><InvoicingParty><InvoicingPartyCode>708002</InvoicingPartyCode><InvoicingPartyName>\u5357\u4eac\u5e02\u57ce\u5e02\u5efa\u8bbe\u8d39\u7528\u5f81\u6536\u670d\u52a1\u4e2d\u5fc3</InvoicingPartyName><RecName>\u5357\u4eac\u5e02\u57ce\u5e02\u5efa\u8bbe\u8d39\u7528\u5f81\u6536\u670d\u52a1\u4e2d\u5fc3</RecName><RecAcct>10105901040000062</RecAcct><RecOpBk>\u5357\u4eac\u519c\u884c\u9f13\u697c\u652f\u884c</RecOpBk></InvoicingParty><PayerParty><PayerPartyType>2</PayerPartyType><PayerPartyCode/><PayerPartyName>{{jkr}}</PayerPartyName><PayerAcct/><PayerOpBk/></PayerParty><PayMode/><BizCode>{{lsh}}</BizCode><CurrencyType/><ExchangeRate/><Remark>{{beizhu}}</Remark><HandlingPerson>\u5357\u4eac\u5e02\u57ce\u5e02\u5efa\u8bbe\u8d39\u7528\u5f81\u6536\u670d\u52a1\u4e2d\u5fc3</HandlingPerson><Checker/><SupervisorRemark/><InvoicingPartySeal><SealId>f2ae8a477d7247148adf2e5cd48630e6</SealId><SealName/><SealHash/></InvoicingPartySeal><SupervisorPartySeal><SealId>f2ae8a477d7247148adf2e5cd48630e6</SealId><SealName/><SealHash/></SupervisorPartySeal><MainExt><RelatedInvoiceCode/><RelatedInvoiceNumber/><PayCode>{{jkm}}</PayCode><BusinessNumber/><BusinessDate/><Gender/><Age/><Address/><School/><Faculty/><Major/><Classes/><StudentID/><MedicalType/><MedicalDate/><CaseNumber/><PatientNumber/><HospitalizationNumber/><DepartmentName/><InHospitalDate/><OutHospitalDate/><PrepayAmount/><RechargeAmount/><RefundAmount/><OrgType/><MedicalInsuranceType/><MedicalInsuranceID/><FundPayAmount/><OtherPayAmount/><AccountPayAmount/><OwnPayAmount/><SelfpaymentAmount/><SelfpaymentCost/><Custom1/><Custom2/><Custom3/><Custom4/><Custom5/><Custom6/><Custom7/><Custom8/><Custom9/><Custom10/><Custom11/><Custom12/></MainExt></Main><Details><Item><ItemCode>{{itemCode}}</ItemCode><ItemName>\u57ce\u5e02\u57fa\u7840\u8bbe\u65bd\u914d\u5957\u8d39-\u57ce\u533a</ItemName><ItemQuantity>{{yjmj}}</ItemQuantity><ItemUnit>\u5143</ItemUnit><ItemStd>150.00</ItemStd><ItemAmount>{{yjje}}</ItemAmount><ItemRemark/><ItemExt><ItemDetailName/></ItemExt></Item></Details></EInvoiceData>
\ No newline at end of file
......@@ -11,6 +11,7 @@ import com.jshx.fstzs.fsutil.bean.*;
import com.jshx.fstzs.service.FstzsService;
import com.jshx.http.HttpclientUtil;
import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.*;
......@@ -166,20 +167,26 @@ public class FsRequest {
xml = xml.replaceAll("\\{\\{yjmj}}",fstzs.getYjmj());
xml = xml.replaceAll("\\{\\{itemCode}}",getProp("fs-sfxmbh"));
String xmlBase64 = Base64.getEncoder().encodeToString(xml.getBytes());
map.put("invoice_data",xmlBase64);// 电子票据头部、票面信息进行base64编码后内容。
Map<String,String> signInfo = new HashMap<>();
signInfo.put("value",xmlBase64);//对电子票据头部、票面信息的签名值(签名原文为电子票据数据 Header和EInvoiceData内容),base64格式。
signInfo.put("format","DETACH");//签名格式类型,目前固定 DETACH
signInfo.put("algorithm","SM2");//摘要算法,默认SM2
signInfo.put("time",new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()));//签名时间
map.put("sign_info",signInfo);// 签名信息节点A-3
try {
String xmlBase64 = Base64.getEncoder().encodeToString(xml.getBytes("utf-8"));
map.put("invoice_data",xmlBase64);// 电子票据头部、票面信息进行base64编码后内容。
Map<String,String> signInfo = new HashMap<>();
signInfo.put("value",xmlBase64);//对电子票据头部、票面信息的签名值(签名原文为电子票据数据 Header和EInvoiceData内容),base64格式。
signInfo.put("format","DETACH");//签名格式类型,目前固定 DETACH
signInfo.put("algorithm","SM2");//摘要算法,默认SM2
signInfo.put("time",new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()));//签名时间
map.put("sign_info",signInfo);// 签名信息节点A-3
String request = request("invoice.e.issue.withsign.do", map);
FsResp<CaozuoResp> resp = new Gson().fromJson(request, new TypeToken<FsResp<CaozuoResp>>() {
}.getType());
return resp.message != null && "0000".equals(resp.message.succCode);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
return false;
}
String request = request("invoice.e.issue.withsign.do", map);
FsResp<CaozuoResp> resp = new Gson().fromJson(request, new TypeToken<FsResp<CaozuoResp>>() {
}.getType());
return resp.message != null && "0000".equals(resp.message.succCode);
}
......
......@@ -437,11 +437,8 @@ public class FstzsAction extends BaseAction {
result = false;
message = "请重新操作!";
}
this.getResponse().getWriter().println("{\"result\":"+result+",\"message\":\"" + message + "!"+"\"}");
}
this.getResponse().getWriter().println("{\"result\":"+result+",\"message\":\"" + message + "!"+"\"}");
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment