|
|
|
@ -0,0 +1,878 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.EnterpriseServices.CompensatingResourceManager;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using AutoMapper;
|
|
|
|
|
using DSWeb.Areas.Account.DAL.Chfee_Invoice_HangXin;
|
|
|
|
|
using DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin;
|
|
|
|
|
using DSWeb.Areas.Account.Models.Chfee_Invoiceapplication;
|
|
|
|
|
using DSWeb.Areas.MvcShipping.Helper;
|
|
|
|
|
using DSWeb.Areas.MvcShipping.Models.Message.VGM;
|
|
|
|
|
using DSWeb.Areas.SysMng.DAL.SysUser;
|
|
|
|
|
using DSWeb.Common.DB;
|
|
|
|
|
using DSWeb.MvcShipping.Models.GOODS;
|
|
|
|
|
using HcUtility.Comm;
|
|
|
|
|
using HcUtility.Core;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using sun.tools.tree;
|
|
|
|
|
|
|
|
|
|
namespace DSWeb.MvcShipping.Models.MsChFee
|
|
|
|
|
{
|
|
|
|
|
public class LQTYInvResult
|
|
|
|
|
{
|
|
|
|
|
public string code { get; set; }
|
|
|
|
|
public bool success { get; set; }=false;
|
|
|
|
|
public string msg { get; set; }
|
|
|
|
|
public string msgDev { get; set; }
|
|
|
|
|
|
|
|
|
|
public string data { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 开票请求参数
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 开票请求
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public class 乐企他用发票
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public 乐企他用发票() { }
|
|
|
|
|
|
|
|
|
|
//public 乐企他用发票(ch_fee_invoice_md InvoiceHead, List<ch_fee_invoicedetail_md> InvoiceHeadDetail)
|
|
|
|
|
//{
|
|
|
|
|
// senid = InvoiceHead.GID;
|
|
|
|
|
// IgnoreSphfwssflhbbm = true;
|
|
|
|
|
|
|
|
|
|
// order = new List<Order>();
|
|
|
|
|
|
|
|
|
|
// var invrec = Order.getHelper(InvoiceHead, InvoiceHeadDetail);
|
|
|
|
|
|
|
|
|
|
// order.Add(invrec);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static 乐企他用发票 getHelper(string BILLNO)
|
|
|
|
|
{
|
|
|
|
|
var result = new 乐企他用发票();
|
|
|
|
|
var _head = ChinvoiceDAL.GetData("cm.BILLNO='" + BILLNO + "'");
|
|
|
|
|
|
|
|
|
|
var detailList = ChinvoiceDAL.GetDetailList("PID='" + _head.GID + "'");
|
|
|
|
|
|
|
|
|
|
var nuonuohead = new NuoNuoQuanDianInvoice(_head, detailList);
|
|
|
|
|
|
|
|
|
|
//var _order = AutoMapperHelper.MapTo<NuoNuoQuanDian_Head, Order>(nuonuohead.order);
|
|
|
|
|
|
|
|
|
|
//在诺诺报文的基础上再做修改
|
|
|
|
|
|
|
|
|
|
//_order.invoiceDetail = AutoMapperHelper.MapTo<List<NuoNuoQuanDian_Detail>, List<Invoicedetail>>(nuonuohead.order.invoiceDetail);
|
|
|
|
|
|
|
|
|
|
var _order = new Order();
|
|
|
|
|
|
|
|
|
|
_order.invoiceType = nuonuohead.order.invoiceType;
|
|
|
|
|
_order.orderNo=nuonuohead.order.orderNo;
|
|
|
|
|
_order.email= nuonuohead.order.email;
|
|
|
|
|
_order.xsfkhh = "";
|
|
|
|
|
_order.xsfzh = "";
|
|
|
|
|
|
|
|
|
|
_order.salerTel = nuonuohead.order.salerTel;
|
|
|
|
|
_order.salerAddress = nuonuohead.order.salerAddress;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_order.buyerTaxNum = nuonuohead.order.buyerTaxNum;
|
|
|
|
|
_order.buyerName = nuonuohead.order.buyerName;
|
|
|
|
|
_order.buyerAddress = nuonuohead.order.buyerAddress;
|
|
|
|
|
_order.buyerTel = nuonuohead.order.buyerTel;
|
|
|
|
|
|
|
|
|
|
_order.gmfkhh = "";
|
|
|
|
|
_order.gmfzh = "";
|
|
|
|
|
_order.buyerManagerName = nuonuohead.order.buyerManagerName;
|
|
|
|
|
_order.jbrsfzjhm = "";//购买方经办人证件号码
|
|
|
|
|
_order.gmfjbrlxdh = "";
|
|
|
|
|
_order.skyhmc = "";
|
|
|
|
|
_order.skyhzh = "";
|
|
|
|
|
|
|
|
|
|
_order.checker = nuonuohead.order.checker;
|
|
|
|
|
_order.payee = nuonuohead.order.payee;
|
|
|
|
|
|
|
|
|
|
_order.hjse = detailList.Sum(s => s.TAX);//税额
|
|
|
|
|
_order.hjje = _head.INVAMOUNT- _order.hjse;//发票金额
|
|
|
|
|
|
|
|
|
|
_order.jshj = _head.INVAMOUNT;//发票金额
|
|
|
|
|
|
|
|
|
|
_order.clerk = nuonuohead.order.clerk;
|
|
|
|
|
|
|
|
|
|
var 开票人 = SysUserDAL.GetData(" SHOWNAME='" + _order.clerk + "'");
|
|
|
|
|
|
|
|
|
|
_order.kprzjhm = 开票人.IDCARD;
|
|
|
|
|
_order.kprzjlx = "201";
|
|
|
|
|
_order.remark = nuonuohead.order.remark;
|
|
|
|
|
_order.invoiceLine = nuonuohead.order.invoiceLine;
|
|
|
|
|
_order.gmfzrrbz = "";
|
|
|
|
|
_order.tdys = "";//特定要素
|
|
|
|
|
_order.cezslxDm = "";//差额征税类型代码
|
|
|
|
|
_order.sgfplxDm = "";//收购发票类型代码
|
|
|
|
|
_order.ckywsyzcDm = "";//出口业务适用政策代码
|
|
|
|
|
_order.zzsjzjtDm = "";//增值税即征即退代码 暂时保持为空
|
|
|
|
|
_order.jsfs = "";//结算方式 //暂时保持为空
|
|
|
|
|
|
|
|
|
|
_order.invoiceDetail = new List<Invoicedetail>();
|
|
|
|
|
|
|
|
|
|
var cdc = new CommonDataContext();
|
|
|
|
|
|
|
|
|
|
var goodsinv = cdc.code_goods_inv.Where(x => 1 == 1).ToList();
|
|
|
|
|
|
|
|
|
|
var mxxh = 1;
|
|
|
|
|
foreach (var detail in nuonuohead.order.invoiceDetail)
|
|
|
|
|
{
|
|
|
|
|
var newdetail = new Invoicedetail();
|
|
|
|
|
|
|
|
|
|
newdetail.mxxh=mxxh;
|
|
|
|
|
newdetail.xmmc = detail.goodsName;
|
|
|
|
|
newdetail.spfwjc = "";//商品服务简称 大类目 由服务端根据goodsCode现查
|
|
|
|
|
newdetail.goodsCode = detail.goodsCode;//商品和服务税收分类合并编码
|
|
|
|
|
newdetail.specType=detail.specType;
|
|
|
|
|
newdetail.unit=detail.unit;
|
|
|
|
|
newdetail.price=detail.price;
|
|
|
|
|
newdetail.num=detail.num;
|
|
|
|
|
newdetail.taxExcludedAmount = Convert.ToDecimal( detail.taxExcludedAmount);
|
|
|
|
|
newdetail.taxRate = Convert.ToDecimal(detail.taxRate);
|
|
|
|
|
newdetail.tax= Convert.ToDecimal(detail.tax);
|
|
|
|
|
newdetail.taxIncludedAmount = Convert.ToDecimal(detail.taxIncludedAmount);
|
|
|
|
|
newdetail.deduction = "";
|
|
|
|
|
newdetail.invoiceLineProperty = detail.invoiceLineProperty;
|
|
|
|
|
|
|
|
|
|
//newdetail.favouredPolicyFlag = detail.favouredPolicyFlag;
|
|
|
|
|
newdetail.favouredPolicyFlag = "";
|
|
|
|
|
|
|
|
|
|
//if (goodsinv.Exists(x => x.GID == detail.goodsName))
|
|
|
|
|
//{
|
|
|
|
|
// //newdetail.favouredPolicyFlag = detail.favouredPolicyFlag;
|
|
|
|
|
// var gi = goodsinv.First(x => x.GID == detail.goodsName);
|
|
|
|
|
// if (gi.DEFREMARK == "免税")
|
|
|
|
|
// {
|
|
|
|
|
// newdetail.favouredPolicyFlag = "03";
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
if (detail.favouredPolicyName == "免税") {
|
|
|
|
|
newdetail.favouredPolicyFlag = "03";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_order.invoiceDetail.Add(newdetail);
|
|
|
|
|
|
|
|
|
|
mxxh++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
result.order = new List<Order>();
|
|
|
|
|
result.order.Add(_order);
|
|
|
|
|
|
|
|
|
|
result.senid = _head.GID;
|
|
|
|
|
result.IgnoreSphfwssflhbbm = true;
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 唯一标识,由企业自己生成32位随机码【消息体】
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string senid { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 忽略商品和服务税收分类合并编码提醒
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public bool IgnoreSphfwssflhbbm { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 请求体
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
|
|
|
|
|
public List<Order> order { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class Order
|
|
|
|
|
{
|
|
|
|
|
DBResult CanSend { get; set; }
|
|
|
|
|
public Order() { }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public string invoiceType { get; set; }
|
|
|
|
|
|
|
|
|
|
public string orderNo { get; set; }
|
|
|
|
|
|
|
|
|
|
public string email { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 销售方开户行
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string xsfkhh { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 销售方账号
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string xsfzh { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 销方电话
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string salerTel { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 销方地址
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string salerAddress { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 购方税号
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string buyerTaxNum { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 购方名称
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string buyerName { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 购方地址
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string buyerAddress { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 购方电话
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string buyerTel { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 购买方开户行
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string gmfkhh { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 购买方账号
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string gmfzh { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 购买方经办人姓名
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string buyerManagerName { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 经办人证件号码
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public string jbrsfzjhm { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 购买方经办人联系电话
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string gmfjbrlxdh { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 收款银行名称
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string skyhmc { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 收款银行账号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string skyhzh { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 复核人
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string checker { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 收款人
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string payee { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 合计金额
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public decimal hjje { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 合计税额
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public decimal hjse { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 金税合计
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public decimal jshj { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 开票员
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public string clerk { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 开票人证件号码
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string kprzjhm { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 开票人证件类型
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string kprzjlx { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 备注
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string remark { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 发票种类 bs:电子发票(增值税专用发票)-即数电专票(电子), pc:电子发票(普通发票)-即数电普票(电子)
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string invoiceLine { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 购买方自然人标志
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string gmfzrrbz { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 特定要素
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string tdys { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 差额征税类型代码
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string cezslxDm { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 收购发票类型代码
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string sgfplxDm { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 出口业务适用政策代码
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string ckywsyzcDm { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 增值税即征即退代码
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string zzsjzjtDm { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 结算方式
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string jsfs { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 应税发生地
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string ysxwfsd { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 是否展示销售方银行账号标签
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string sfzsxsfyhzhbq { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 是否展示购买方银行账号标签
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string sfzsgmfyhzhbq { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<Invoicedetail> invoiceDetail { get; set; }
|
|
|
|
|
|
|
|
|
|
public List<fjysList> fjysList { get; set; }=new List<fjysList>();
|
|
|
|
|
|
|
|
|
|
public List<cekcList> cekcList { get; set; } = new List<cekcList>();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class Invoicedetail
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
public Invoicedetail getHelper(ch_fee_invoicedetail_md invDetail)
|
|
|
|
|
{
|
|
|
|
|
var result = new Invoicedetail();
|
|
|
|
|
|
|
|
|
|
result.mxxh = Convert.ToInt32( invDetail.SerialNo);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 明细序号
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public int mxxh { get; set; } = 0;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 项目名称
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string xmmc { get; set; } = "";
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 商品服务简称
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string spfwjc { get; set; } = "";
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 规格号型
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string specType { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 发票行性质
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string invoiceLineProperty { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 数量
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string num { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 单价
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string price { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 税额
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public decimal? tax { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 含税金额
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public decimal? taxIncludedAmount { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 金额
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public decimal? taxExcludedAmount { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 增值税税率/征收率
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public decimal taxRate { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 单位
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string unit { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 扣除额
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string deduction { get; set; } = "";
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 商品和服务税收分类合并编码
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string goodsCode { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 优惠政策表示
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string favouredPolicyFlag { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class fjysList
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 附加要素名称
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string fjysmc { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 附加要素类型
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string fjyslx { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 附加要素值
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string fjysz { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class cekcList
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 序号
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public int xh { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 凭证类型
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string pzlx { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 发票代码
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string fpdm { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 发票号码
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string fphm { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 差额凭证号码
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string cepzhm { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 开具日期
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string kjrq { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 凭证合计金额
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string pzhjje { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 本次扣除金额
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
public string bckcje { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
|
|
/// 备注
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string bz { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class 乐企他用发票开出返回 : LQTYInvResult
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class 乐企他用发票读取返回 : LQTYInvResult
|
|
|
|
|
{
|
|
|
|
|
public new readdata data { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class readdata
|
|
|
|
|
{
|
|
|
|
|
public List<readOrder> Order { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class readOrder
|
|
|
|
|
{
|
|
|
|
|
public int State { get; set; }
|
|
|
|
|
public string fphm { get; set; }
|
|
|
|
|
public string UpMessage { get; set; }
|
|
|
|
|
public string FileUrl { get; set; }
|
|
|
|
|
public string orderNo { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class 乐企他用发出红字确认单
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 随机GID
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string senid { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 蓝票的BILLNO
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string orderNo { get; set;}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 冲红原因
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string chyyDm { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 录入方身份 0:销方 1:购方; 暂时固定为 0
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string lrfsf { get; set; } = "0";
|
|
|
|
|
|
|
|
|
|
public 乐企他用发出红字确认单() { }
|
|
|
|
|
|
|
|
|
|
public 乐企他用发出红字确认单(ChInvoice_HangXin head)
|
|
|
|
|
{
|
|
|
|
|
senid=Guid.NewGuid().ToString();
|
|
|
|
|
orderNo = head.BILLNO;
|
|
|
|
|
chyyDm = head.redReason;
|
|
|
|
|
lrfsf = "0";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class 乐企他用红字确认单申请返回 : LQTYInvResult
|
|
|
|
|
{
|
|
|
|
|
public new 红字确认单状态 data { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class 红字确认单状态
|
|
|
|
|
{
|
|
|
|
|
public string hzqrxxztDm { get; set; }
|
|
|
|
|
public string senid { get; set; }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 读取参数
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|