|
|
@ -35,6 +35,7 @@ using DSWeb.MvcShipping.Models.MsChFee;
|
|
|
|
using System.Data.Entity.Migrations;
|
|
|
|
using System.Data.Entity.Migrations;
|
|
|
|
using IKVM.NativeCode.sun.reflect;
|
|
|
|
using IKVM.NativeCode.sun.reflect;
|
|
|
|
using System.Web.UI;
|
|
|
|
using System.Web.UI;
|
|
|
|
|
|
|
|
using DSWeb.Areas.SysMng.DAL.SysUser;
|
|
|
|
|
|
|
|
|
|
|
|
namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2971,9 +2972,52 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
|
|
|
|
if (string.IsNullOrWhiteSpace(USERKEY) || string.IsNullOrWhiteSpace(USERSECRET))
|
|
|
|
if (string.IsNullOrWhiteSpace(USERKEY) || string.IsNullOrWhiteSpace(USERSECRET))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cansend.SetErrorInfo("发票接口设置当中 没有设置账号和密钥");
|
|
|
|
cansend.SetErrorInfo("发票接口设置当中 没有设置账号和密钥");
|
|
|
|
|
|
|
|
return cansend;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (USERKEY.Length!=32 || USERSECRET.Length!=80)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
cansend.SetErrorInfo("发票接口设置当中 账号和密钥设置不正确.");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//判断开票人的身份证号
|
|
|
|
|
|
|
|
var cdc = new CommonDataContext();
|
|
|
|
|
|
|
|
var 开票人List = cdc.User.Where(x => x.GID == InvoiceHead.OPERATOR).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (开票人List == null || 开票人List.Count == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
cansend.SetErrorInfo("没有找到开票人.");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
var 开票人 = SysUserDAL.GetData(" U.GID='" + 开票人List[0].GID + "'");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(开票人.IDCARD)|| 开票人.IDCARD.Length<18)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
cansend.SetErrorInfo("开票人没有设置身份证号,或者身份证号设置不正确.");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var apiurlList = cdc.tSysEnumValue.Where(x => x.EnumTypeID == 96050).ToList();
|
|
|
|
|
|
|
|
if (apiurlList == null || apiurlList.Count == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
cansend.SetErrorInfo("枚举类型96050没有值,应当设定接口名称和地址");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
if (!apiurlList.Exists(x => x.EnumValueID == "东胜乐企他用_蓝票"))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
cansend.SetErrorInfo("枚举类型96050,应当有【东胜乐企他用_蓝票】及其地址");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!apiurlList.Exists(x => x.EnumValueID == "东胜乐企他用_冲红"))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
cansend.SetErrorInfo("枚举类型96050,应当有【东胜乐企他用_冲红】及其地址");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!apiurlList.Exists(x => x.EnumValueID == "东胜乐企他用_读取"))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
cansend.SetErrorInfo("枚举类型96050,应当有【东胜乐企他用_读取】及其地址");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//返回
|
|
|
|
//返回
|
|
|
|
|
|
|
|
|
|
|
|
return cansend;
|
|
|
|
return cansend;
|
|
|
|