|
|
|
@ -20,6 +20,10 @@ using DSWeb.Areas.MvcShipping.Comm;
|
|
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
|
using DSWeb.Areas.SysMng.Models.DBTableConn;
|
|
|
|
|
using DSWeb.Areas.SysMng.DAL.DBTableConn;
|
|
|
|
|
using System.Configuration;
|
|
|
|
|
using DSWeb.MvcShipping.DAL.MsSysParamSet;
|
|
|
|
|
using com.sun.xml.@internal.ws.developer;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
|
{
|
|
|
|
@ -633,16 +637,17 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
|
public static string appSecret { get { return "SDFAFF5B0AED4465"; } }
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
/* 正式地址测试账户 纸票测试用 需使用深圳鑫鹏威
|
|
|
|
|
/* 正式地址测试账户 纸票测试用
|
|
|
|
|
//339901999999516
|
|
|
|
|
public static string appKey { get { return "G6bvh0ke"; } }
|
|
|
|
|
public static string appSecret { get { return "6850C5AED14E4177"; } }
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/* 正式地址 大简云*/
|
|
|
|
|
public static string appKey { get { return "23646802"; } }
|
|
|
|
|
public static string appSecret { get { return "CBFAFF5B0AED4465"; } }
|
|
|
|
|
|
|
|
|
|
//public static string appKey { get { return ConfigurationManager.AppSettings["NuoNuo_appKey"]; } }
|
|
|
|
|
//public static string appSecret { get { return ConfigurationManager.AppSettings["NuoNuo_appSecret"]; } }
|
|
|
|
|
public static string appKey { get; set; }
|
|
|
|
|
public static string appSecret { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 使用沙盒地址还是实际工作地址
|
|
|
|
@ -903,6 +908,8 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
|
|
|
|
|
|
public HangXinRequestHelper()
|
|
|
|
|
{
|
|
|
|
|
appKey = MsSysParamSetDAL.GetSysParamValue("NuoNuo_appKey");
|
|
|
|
|
appSecret = MsSysParamSetDAL.GetSysParamValue("NuoNuo_appSecret");
|
|
|
|
|
tokenstarttime = Convert.ToDateTime("1900-01-01");
|
|
|
|
|
}
|
|
|
|
|
public HangXinRequestHelper(string taxnum)
|
|
|
|
@ -1000,6 +1007,9 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
|
//var result = new HangXinRequestHelper(taxnum);
|
|
|
|
|
//return result;
|
|
|
|
|
|
|
|
|
|
appKey = MsSysParamSetDAL.GetSysParamValue("NuoNuo_appKey") ;
|
|
|
|
|
appSecret = MsSysParamSetDAL.GetSysParamValue("NuoNuo_appSecret");
|
|
|
|
|
|
|
|
|
|
var _token = getPortToken(taxnum);
|
|
|
|
|
return _token;
|
|
|
|
|
}
|
|
|
|
@ -1010,35 +1020,59 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
///读取接口token
|
|
|
|
|
//JObject reqObj = new JObject();
|
|
|
|
|
//reqObj.Add("taxnum", taxnum);
|
|
|
|
|
var dic = new Dictionary<string, string>();
|
|
|
|
|
dic.Add("taxnum", taxnum);
|
|
|
|
|
|
|
|
|
|
var rtn = WebRequestHelper.DoPost(_IURL, dic, 10000);
|
|
|
|
|
//var rtn = WebRequestHelper.DoPost(_SandBoxURL, dic, 20000);
|
|
|
|
|
//var dic = new Dictionary<string, string>();
|
|
|
|
|
//dic.Add("taxnum", taxnum);
|
|
|
|
|
|
|
|
|
|
//var rtn = WebRequestHelper.DoPost(_IURL, dic, 10000);
|
|
|
|
|
|
|
|
|
|
//PortTokenmb pt = Newtonsoft.Json.JsonConvert.DeserializeObject<PortTokenmb>(rtn);
|
|
|
|
|
|
|
|
|
|
//RepCZModel CZM = Newtonsoft.Json.JsonConvert.DeserializeObject<RepCZModel>(rtn);
|
|
|
|
|
PortTokenmb pt = Newtonsoft.Json.JsonConvert.DeserializeObject<PortTokenmb>(rtn);
|
|
|
|
|
//20230109 改为将token值记录在OP_LOGICINFO表中 BSNO=公司税号 propname='诺诺Token' 字段名NuoNuo_Token
|
|
|
|
|
|
|
|
|
|
if (pt.status == "1")
|
|
|
|
|
|
|
|
|
|
if (HXTokenHelperList.Exists(x => x.taxnum == taxnum))
|
|
|
|
|
{
|
|
|
|
|
foreach (var hx in HXTokenHelperList)
|
|
|
|
|
var _token= HXTokenHelperList.First(x=>x.taxnum == taxnum);
|
|
|
|
|
var result = new HangXinRequestHelper(taxnum, _token.accessToken);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
|
|
var _dic = BasicDataRefDAL.GetLogicInfo(taxnum, "诺诺Token");
|
|
|
|
|
|
|
|
|
|
if (_dic != null && _dic.ContainsKey("NuoNuo_Token"))
|
|
|
|
|
{
|
|
|
|
|
if (hx.taxnum == taxnum)
|
|
|
|
|
var tokenstr = _dic["NuoNuo_Token"];
|
|
|
|
|
foreach (var hx in HXTokenHelperList)
|
|
|
|
|
{
|
|
|
|
|
hx.accessToken = pt.message;
|
|
|
|
|
hx.CanUse = true;
|
|
|
|
|
hx.ERRORMSG = "";
|
|
|
|
|
return hx;
|
|
|
|
|
if (hx.taxnum == taxnum)
|
|
|
|
|
{
|
|
|
|
|
hx.accessToken = tokenstr;
|
|
|
|
|
hx.CanUse = true;
|
|
|
|
|
hx.ERRORMSG = "";
|
|
|
|
|
return hx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var result = new HangXinRequestHelper(taxnum, tokenstr);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
var result = new HangXinRequestHelper(taxnum, pt.message);
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
var tokenjson = NNOpenSDK.getMerchantToken(HangXinRequestHelper.appKey, HangXinRequestHelper.appSecret);
|
|
|
|
|
var token = DSWeb.MvcShipping.Helper.JsonConvert.Deserialize<nuonuotoken>(tokenjson);
|
|
|
|
|
|
|
|
|
|
var dic =new Dictionary<string, string> {
|
|
|
|
|
{"NuoNuo_Token",token.access_token }
|
|
|
|
|
};
|
|
|
|
|
BasicDataRefDAL.SaveLogicInfo(taxnum, "诺诺Token", dic);
|
|
|
|
|
|
|
|
|
|
return new HangXinRequestHelper(taxnum, token.access_token);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return new HangXinRequestHelper(taxnum, "");
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e) {
|
|
|
|
|
|
|
|
|
@ -1050,6 +1084,13 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class nuonuotoken {
|
|
|
|
|
public string access_token { get; set; }
|
|
|
|
|
public int expires_in { get; set; }
|
|
|
|
|
}
|
|
|
|
|
//{\"access_token\":\"4ad7dfbf111624e13b146e0ozbnazu8s\",\"expires_in\":-1}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -1119,7 +1160,10 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
|
{
|
|
|
|
|
//E9106 订单编号不能重复
|
|
|
|
|
//同billno重复发送 执行一次用订单号读取
|
|
|
|
|
return ReadInvoice_BILLNO(head);
|
|
|
|
|
//return ReadInvoice_BILLNO(head);
|
|
|
|
|
|
|
|
|
|
var result = ReadInvoice(head);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -1131,7 +1175,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
|
public string PostInvoice(string json)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
string method = "nuonuo.electronInvoice.requestBilling";
|
|
|
|
|
string method = "nuonuo.electronInvoice.requestBillingnew";
|
|
|
|
|
|
|
|
|
|
BasicDataRefDAL.SaveLog("URL=" + URL + ";appKey=" + appKey + ";appSecret=" + appSecret + ";accessToken=" + accessToken + ";taxnum=" + taxnum + ";method=" + method + ";content=" + json, "诺诺平台", "发票开出", "发送值");
|
|
|
|
|
string result = NNOpenSDK.sendPostSyncRequest(URL, getSendid(), appKey, appSecret, accessToken, taxnum, method, json);
|
|
|
|
@ -1159,15 +1203,17 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string method = "nuonuo.electronInvoice.CheckEInvoice";
|
|
|
|
|
var json = "{" + "\"invoiceSerialNum\":[\"" + head.INVOICESERIALNUM + "\"]" + "}";
|
|
|
|
|
//string method = "nuonuo.electronInvoice.CheckEInvoice";
|
|
|
|
|
//var json = "{" + "\"invoiceSerialNum\":[\"" + head.INVOICESERIALNUM + "\"]" + "}";
|
|
|
|
|
string method = "nuonuo.electronInvoice.queryInvoiceResult";
|
|
|
|
|
var json = "{" + "\"orderNos\":[]," + "\"serialNos\":[\"" + head.INVOICESERIALNUM + "\"]" + "}";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(head.INVOICESERIALNUM))
|
|
|
|
|
{
|
|
|
|
|
//如果流水号为空 则改为按业务编号读取
|
|
|
|
|
method = "nuonuo.electronInvoice.querySerialNum";
|
|
|
|
|
json = "{" + "\"orderNo\":[\"" + head.BILLNO + "\"]" + "}";
|
|
|
|
|
//method = "nuonuo.electronInvoice.querySerialNum";
|
|
|
|
|
json = "{" + "\"orderNos\":[\"" + head.BILLNO + "\"]," + "\"serialNos\":[]"+ "}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//读取业务
|
|
|
|
@ -1201,17 +1247,26 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
|
var returndate = ChinvoiceDAL.GetData( "cm.INVOICESERIALNUM='" + head.INVOICESERIALNUM + "'");
|
|
|
|
|
head = returndate;
|
|
|
|
|
|
|
|
|
|
//var invoiceSerialNum = _return.result[0].invoiceSerialNum;
|
|
|
|
|
var info = _return.result[0];
|
|
|
|
|
var result = new DBResult();
|
|
|
|
|
|
|
|
|
|
//如果,"statusMsg":"开票失败"返回错误
|
|
|
|
|
if (info.statusMsg == "开票失败") {
|
|
|
|
|
return result.SetErrorInfo(info.statusMsg + ":" + info.failCause);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//立即调用读取发票信息的方法 将返回值设置进head 并保存
|
|
|
|
|
//head.INVOICESERIALNUM = invoiceSerialNum;
|
|
|
|
|
head.INVOICECODE = info.invoiceCode;
|
|
|
|
|
head.INVOICENO = info.invoiceNum;
|
|
|
|
|
head.INVOICENO = info.invoiceNo;
|
|
|
|
|
head.EINVOICESTATE = info.status;
|
|
|
|
|
head.INVOICEINFOURL = info.invoiceImageUrl;
|
|
|
|
|
head.INVOICEPDFURL = info.invoiceFileUrl;
|
|
|
|
|
head.INVOICEINFOURL = info.pictureUrl;
|
|
|
|
|
head.INVOICEPDFURL = info.pdfUrl;
|
|
|
|
|
|
|
|
|
|
var invdate = BasicDataRefDAL.Timestamp2Datetime(info.updateTime);
|
|
|
|
|
|
|
|
|
|
head.INVOICEMAKETIME = info.invoiceDate;
|
|
|
|
|
head.INVOICEMAKETIME = invdate.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
//if (!string.IsNullOrWhiteSpace(info.invoiceSerialNum))
|
|
|
|
|
//{
|
|
|
|
|
// head.INVOICESERIALNUM = info.invoiceSerialNum;
|
|
|
|
@ -1221,13 +1276,13 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
|
head.DbOperationType = DbOperationType.DbotUpd;
|
|
|
|
|
head.ModelUIStatus = "E";
|
|
|
|
|
var modb = new ModelObjectDB();
|
|
|
|
|
var result = modb.Save(head);
|
|
|
|
|
result.Message = info.resultMsg;
|
|
|
|
|
result = modb.Save(head);
|
|
|
|
|
//result.Message = info.resultMsg;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (info.resultMsg.Contains("开具结果:0,开具失败原因:开票异常")) {
|
|
|
|
|
result.Message = "开票异常,请尝试重新连接税控盘、重新启动税控软件和诺诺客户端,然后再次读取发票信息;如仍显示此提示,请联系诺诺平台客服人员,并提供销方税号和此发票的流水号";
|
|
|
|
|
}
|
|
|
|
|
//if (info.resultMsg.Contains("开具结果:0,开具失败原因:开票异常")) {
|
|
|
|
|
// result.Message = "开票异常,请尝试重新连接税控盘、重新启动税控软件和诺诺客户端,然后再次读取发票信息;如仍显示此提示,请联系诺诺平台客服人员,并提供销方税号和此发票的流水号";
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
|
@ -1241,81 +1296,81 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public DBResult ReadInvoice_BILLNO(ChInvoice_HangXin head)
|
|
|
|
|
{
|
|
|
|
|
//public DBResult ReadInvoice_BILLNO(ChInvoice_HangXin head)
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
|
|
//读取业务
|
|
|
|
|
string method = "nuonuo.electronInvoice.querySerialNum";
|
|
|
|
|
var json = "{" + "\"orderNo\":[\"" + head.BILLNO + "\"]" + "}";
|
|
|
|
|
// //读取业务
|
|
|
|
|
// string method = "nuonuo.electronInvoice.querySerialNum";
|
|
|
|
|
// var json = "{" + "\"orderNo\":[\"" + head.BILLNO + "\"]" + "}";
|
|
|
|
|
|
|
|
|
|
BasicDataRefDAL.SaveLog("URL=" + URL + ";appKey=" + appKey + ";appSecret=" + appSecret + ";accessToken=" + accessToken + ";taxnum=" + taxnum + ";method=" + method + ";content=" + json, "诺诺平台", "读取发票信息", "发送值");
|
|
|
|
|
string _r = NNOpenSDK.sendPostSyncRequest(URL, getSendid(), appKey, appSecret, accessToken, taxnum, method, json);
|
|
|
|
|
BasicDataRefDAL.SaveLog(_r, "诺诺平台", "读取发票信息", "返回值");
|
|
|
|
|
var _return = dealresponse_Read(_r);
|
|
|
|
|
// BasicDataRefDAL.SaveLog("URL=" + URL + ";appKey=" + appKey + ";appSecret=" + appSecret + ";accessToken=" + accessToken + ";taxnum=" + taxnum + ";method=" + method + ";content=" + json, "诺诺平台", "读取发票信息", "发送值");
|
|
|
|
|
// string _r = NNOpenSDK.sendPostSyncRequest(URL, getSendid(), appKey, appSecret, accessToken, taxnum, method, json);
|
|
|
|
|
// BasicDataRefDAL.SaveLog(_r, "诺诺平台", "读取发票信息", "返回值");
|
|
|
|
|
// var _return = dealresponse_Read(_r);
|
|
|
|
|
|
|
|
|
|
if (_return.code == "070101" || _return.code == "070301")
|
|
|
|
|
{
|
|
|
|
|
//appkey与token问题 需要重新认证
|
|
|
|
|
//HangXinRequestHelper.clear(accessToken);
|
|
|
|
|
var result = new DBResult(false, "需要重新认证", null);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
if (_return.code == "070302")
|
|
|
|
|
{
|
|
|
|
|
//appkey与token问题 需要重新认证
|
|
|
|
|
//HangXinRequestHelper.clear(accessToken);
|
|
|
|
|
var result = new DBResult(false, "需要联系诺诺平台开通相关权限", null);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_return.code == "E0000")
|
|
|
|
|
{
|
|
|
|
|
//开票信息读取成功
|
|
|
|
|
var returndate = ChinvoiceDAL.GetData( "cm.INVOICESERIALNUM='" + head.INVOICESERIALNUM + "'");
|
|
|
|
|
head = returndate;
|
|
|
|
|
// if (_return.code == "070101" || _return.code == "070301")
|
|
|
|
|
// {
|
|
|
|
|
// //appkey与token问题 需要重新认证
|
|
|
|
|
// //HangXinRequestHelper.clear(accessToken);
|
|
|
|
|
// var result = new DBResult(false, "需要重新认证", null);
|
|
|
|
|
// return result;
|
|
|
|
|
// }
|
|
|
|
|
// if (_return.code == "070302")
|
|
|
|
|
// {
|
|
|
|
|
// //appkey与token问题 需要重新认证
|
|
|
|
|
// //HangXinRequestHelper.clear(accessToken);
|
|
|
|
|
// var result = new DBResult(false, "需要联系诺诺平台开通相关权限", null);
|
|
|
|
|
// return result;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//var invoiceSerialNum = _return.result[0].invoiceSerialNum;
|
|
|
|
|
var info = _return.result[0];
|
|
|
|
|
//立即调用读取发票信息的方法 将返回值设置进head 并保存
|
|
|
|
|
//head.INVOICESERIALNUM = invoiceSerialNum;
|
|
|
|
|
head.INVOICECODE = info.invoiceCode;
|
|
|
|
|
head.INVOICENO = info.invoiceNum;
|
|
|
|
|
head.EINVOICESTATE = info.status;
|
|
|
|
|
head.INVOICEINFOURL = info.invoiceImageUrl;
|
|
|
|
|
head.INVOICEPDFURL = info.invoiceFileUrl;
|
|
|
|
|
|
|
|
|
|
head.INVOICEMAKETIME = info.invoiceDate;
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(info.invoiceSerialNum))
|
|
|
|
|
{
|
|
|
|
|
head.INVOICESERIALNUM = info.invoiceSerialNum;
|
|
|
|
|
}
|
|
|
|
|
//head.REMARK = head.REMARK.Replace(info.remark,"")+ info.remark;
|
|
|
|
|
// if (_return.code == "E0000")
|
|
|
|
|
// {
|
|
|
|
|
// //开票信息读取成功
|
|
|
|
|
// var returndate = ChinvoiceDAL.GetData( "cm.INVOICESERIALNUM='" + head.INVOICESERIALNUM + "'");
|
|
|
|
|
// head = returndate;
|
|
|
|
|
|
|
|
|
|
// //var invoiceSerialNum = _return.result[0].invoiceSerialNum;
|
|
|
|
|
// var info = _return.result[0];
|
|
|
|
|
// //立即调用读取发票信息的方法 将返回值设置进head 并保存
|
|
|
|
|
// //head.INVOICESERIALNUM = invoiceSerialNum;
|
|
|
|
|
// head.INVOICECODE = info.invoiceCode;
|
|
|
|
|
// head.INVOICENO = info.invoiceNum;
|
|
|
|
|
// head.EINVOICESTATE = info.status;
|
|
|
|
|
// head.INVOICEINFOURL = info.invoiceImageUrl;
|
|
|
|
|
// head.INVOICEPDFURL = info.invoiceFileUrl;
|
|
|
|
|
|
|
|
|
|
// head.INVOICEMAKETIME = info.invoiceDate;
|
|
|
|
|
// if (!string.IsNullOrWhiteSpace(info.invoiceSerialNum))
|
|
|
|
|
// {
|
|
|
|
|
// head.INVOICESERIALNUM = info.invoiceSerialNum;
|
|
|
|
|
// }
|
|
|
|
|
// //head.REMARK = head.REMARK.Replace(info.remark,"")+ info.remark;
|
|
|
|
|
|
|
|
|
|
head.DbOperationType = DbOperationType.DbotUpd;
|
|
|
|
|
head.ModelUIStatus = "E";
|
|
|
|
|
var modb = new ModelObjectDB();
|
|
|
|
|
var result = modb.Save(head);
|
|
|
|
|
result.Message = info.resultMsg;
|
|
|
|
|
// head.DbOperationType = DbOperationType.DbotUpd;
|
|
|
|
|
// head.ModelUIStatus = "E";
|
|
|
|
|
// var modb = new ModelObjectDB();
|
|
|
|
|
// var result = modb.Save(head);
|
|
|
|
|
// result.Message = info.resultMsg;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (info.resultMsg.Contains("开具结果:0,开具失败原因:开票异常"))
|
|
|
|
|
{
|
|
|
|
|
result.Message = "开票异常,请尝试重新连接税控盘、重新启动税控软件和诺诺客户端,然后再次读取发票信息;如仍显示此提示,请联系诺诺平台客服人员,并提供销方税号和此发票的流水号";
|
|
|
|
|
}
|
|
|
|
|
// if (info.resultMsg.Contains("开具结果:0,开具失败原因:开票异常"))
|
|
|
|
|
// {
|
|
|
|
|
// result.Message = "开票异常,请尝试重新连接税控盘、重新启动税控软件和诺诺客户端,然后再次读取发票信息;如仍显示此提示,请联系诺诺平台客服人员,并提供销方税号和此发票的流水号";
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
// return result;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
|
|
var msg = _return.code + ":" + _return.describe;
|
|
|
|
|
var result = new DBResult { Success = false, Message = DSWeb.TruckMng.Helper.JsonConvert.Serialize(msg), Data = "" };
|
|
|
|
|
return result;
|
|
|
|
|
// var msg = _return.code + ":" + _return.describe;
|
|
|
|
|
// var result = new DBResult { Success = false, Message = DSWeb.TruckMng.Helper.JsonConvert.Serialize(msg), Data = "" };
|
|
|
|
|
// return result;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
public DBResult VoidInvoice(ChInvoice_HangXin head)
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(head.INVOICESERIALNUM))
|
|
|
|
@ -1348,9 +1403,9 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
|
{
|
|
|
|
|
//作废请求成功
|
|
|
|
|
|
|
|
|
|
var invoiceSerialNum = _return.result.invoiceId;
|
|
|
|
|
var invoiceSerialNum = _return.result;
|
|
|
|
|
|
|
|
|
|
head.INVOICESERIALNUM = invoiceSerialNum;
|
|
|
|
|
//head.INVOICESERIALNUM = invoiceSerialNum;
|
|
|
|
|
|
|
|
|
|
head.ISDELETE = "true";
|
|
|
|
|
|
|
|
|
@ -1587,12 +1642,205 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
|
public KPResult result { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Result
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 深圳市宝安区兴围工业一路17-F105 电话:13692121010
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string address { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 中国银行深圳机场支行 749763304324
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string bankAccount { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 吴彩婷
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string checker { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 吴彩婷
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string clerk { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string clerkId { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int createTime { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string deptId { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string extensionNumber { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string imgUrls { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public long? invoiceDate { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string invoiceType { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string listFlag { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string listName { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string notifyEmail { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string ofdUrl { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string oldInvoiceCode { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string oldInvoiceNo { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string orderAmount { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 吴彩婷
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string payee { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string phone { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int productOilFlag { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string proxyInvoiceFlag { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string remark { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string requestSrc { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 上海敬运国际物流有限公司
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string saleName { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 中国银行北外滩支行-435168156076
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string salerAccount { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 上海市虹口区吴淞路218号宝矿大厦1207室
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string salerAddress { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string salerTaxNum { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string salerTel { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int specificFactor { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string telephone { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string terminalNumber { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public long updateTime { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string serialNo { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string orderNo { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string status { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 开票失败
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string statusMsg { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 请将客户端开票模式切换为【网页开票模式】
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string failCause { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string pdfUrl { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string pictureUrl { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string invoiceCode { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string invoiceNo { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string exTaxAmount { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string taxAmount { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 深圳卓越顺达货运代理有限公司
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string payerName { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string payerTaxNo { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 增值税电子普通发票
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string invoiceKind { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[JsonObject]
|
|
|
|
|
///解析开票命令返回值内的result
|
|
|
|
|
public class KPResult
|
|
|
|
|
{
|
|
|
|
|
public string invoiceSerialNum { get; set; }
|
|
|
|
|
public string invoiceId { get; set; }
|
|
|
|
|
//public string invoiceId { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1622,7 +1870,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
|
|
|
|
|
|
public List<string> result { get; set; }
|
|
|
|
|
*/
|
|
|
|
|
public List<ReadResult> result { get; set; }
|
|
|
|
|
public List<Result> result { get; set; }
|
|
|
|
|
}
|
|
|
|
|
[JsonObject]
|
|
|
|
|
///用于解析“读取发票信息”方法返回的发票信息
|
|
|
|
|