拉取进项发票

dev
douhandong 1 month ago
parent aaee83a538
commit 10edf0066e

@ -0,0 +1,555 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.HangfireJob.Dtos
{
public class InInvoiceModel
{
}
/// <summary>
/// 请求获取进项发票接口参数
/// </summary>
public class InInvoicePost
{
/// <summary>
/// 开票时间查询起始时间(查询条件 格式yyyy-MM-dd HH:mm:ss)
/// </summary>
public string kprqks { get; set; }
/// <summary>
/// 开票时间查询结束时间(查询条件 格式yyyy-MM-dd HH:mm:ss)
/// </summary>
public string kprqjs { get; set; }
}
/// <summary>
/// 请求获取发票详情接口请求参数
/// </summary>
public class GetInInvoiceDataInfo
{
/// <summary>
/// 发票号码
/// </summary>
public string fphm { get; set; }
}
public class InInvoicePostOutput
{
public int code { get; set; }
public bool success { get; set; }
public string msg { get; set; }
public object msgDev { get; set; }
public InInvoicePostOutputList Data { get; set; }
}
public class InInvoicePostOutputList
{
public List<Datum> data { get; set; }
public int dataCount { get; set; }
public int pageIndex { get; set; }
public int pageCount { get; set; }
public int pageSize { get; set; }
}
public class Datum
{
/// <summary>
/// 开票日期
/// </summary>
public string kprq { get; set; }
/// <summary>
/// 发票类型代码
/// </summary>
public string fplxdm { get; set; }
/// <summary>
/// 发票号码
/// </summary>
public string fphm { get; set; }
/// <summary>
/// 合计金额
/// </summary>
public string hjje { get; set; }
/// <summary>
/// 合计税额
/// </summary>
public string hjse { get; set; }
/// <summary>
/// 价税合计
/// </summary>
public string jshj { get; set; }
/// <summary>
/// 发票状态
/// </summary>
public string fpzt { get; set; }
/// <summary>
/// 开票人
/// </summary>
public string kpr { get; set; }
/// <summary>
/// 原发票号码
/// </summary>
public string yfphm { get; set; }
/// <summary>
/// 购方开票名称
/// </summary>
public string gfkpmc { get; set; }
/// <summary>
/// 购方开票税号
/// </summary>
public string gfkpsh { get; set; }
/// <summary>
/// 销方开票名称
/// </summary>
public string xfkpmc { get; set; }
/// <summary>
/// 销方开票税号
/// </summary>
public string xfkpsh { get; set; }
/// <summary>
/// 是否已获取详情
/// </summary>
public bool IsGetDtl { get; set; }
/// <summary>
/// 销方识别号
/// </summary>
public string xfsbh { get; set; }
/// <summary>
/// 最终校验码
/// </summary>
public string final_jym { get; set; }
/// <summary>
/// 购方名称
/// </summary>
public string gfmc { get; set; }
/// <summary>
/// 当前时间,销项是入库时间,进项是开票时间
/// </summary>
public string dqsj { get; set; }
/// <summary>
/// 扣除额
/// </summary>
public float kce { get; set; }
/// <summary>
/// 机动车发票类型代码
/// </summary>
public string jdfplxdm { get; set; }
/// <summary>
/// 税控码
/// </summary>
public string skm { get; set; }
/// <summary>
/// 购方税号
/// </summary>
public string ghdwdm { get; set; }
/// <summary>
/// 纸质发票号码
/// </summary>
public string zzfphm { get; set; }
/// <summary>
/// 收款人
/// </summary>
public string skr { get; set; }
/// <summary>
/// 清单标志
/// </summary>
public string qdbz { get; set; }
/// <summary>
/// 开票单位代码
/// </summary>
public string kpdwdm { get; set; }
/// <summary>
/// 购方银行账户
/// </summary>
public string ghdwyhzh { get; set; }
/// <summary>
/// 金额
/// </summary>
public float je { get; set; }
/// <summary>
/// 销方名称
/// </summary>
public string xfmc { get; set; }
/// <summary>
/// 特定要素,目前是货物运输和旅客运输
/// </summary>
public string tdys { get; set; }
/// <summary>
/// 报销状态
/// </summary>
public string bxzt { get; set; }
/// <summary>
/// 购方银行账号
/// </summary>
public string gfyhzh { get; set; }
/// <summary>
/// 特定要素类型代码
/// </summary>
public string tdyslxDm { get; set; }
/// <summary>
/// 操作员代码
/// </summary>
public string czydm { get; set; }
/// <summary>
/// 购方地址电话
/// </summary>
public string ghdwdzdh { get; set; }
/// <summary>
/// 是否为纸质发票1 是0 否
/// </summary>
public string sfwzzfp { get; set; }
/// <summary>
/// 发票请求流水号
/// </summary>
public string fpqqlsh { get; set; }
/// <summary>
/// 税额
/// </summary>
public string se { get; set; }
/// <summary>
/// 备注
/// </summary>
public string bz { get; set; }
/// <summary>
/// 购方识别号
/// </summary>
public string gfsbh { get; set; }
/// <summary>
/// 购方名称
/// </summary>
public string ghdwmc { get; set; }
/// <summary>
/// 销方税号
/// </summary>
public string xhdwdm { get; set; }
/// <summary>
/// 发票代码
/// </summary>
public string fpdm { get; set; }
/// <summary>
/// 销方地址电话
/// </summary>
public string xhdwdzdh { get; set; }
/// <summary>
/// 明细列表
/// </summary>
public string zbmx { get; set; }
/// <summary>
/// 销方地址电话
/// </summary>
public string xddzdh { get; set; }
/// <summary>
/// 销方银行账号
/// </summary>
public string xfyhzh { get; set; }
/// <summary>
/// 复核人
/// </summary>
public string fhr { get; set; }
/// <summary>
/// 购方地址电话
/// </summary>
public string gfdzdh { get; set; }
/// <summary>
/// 销方名称
/// </summary>
public string xhdwmc { get; set; }
/// <summary>
/// 机器编号
/// </summary>
public string jqbh { get; set; }
/// <summary>
/// 商品或服务名称
/// </summary>
public string zyspmc { get; set; }
/// <summary>
/// 销方银行账户
/// </summary>
public string xhdwyhzh { get; set; }
public string PDFfile { get; set; }
public string OFDfile { get; set; }
public string XMLfile { get; set; }
public string Allfile { get; set; }
/// <summary>
/// 状态1未使用,2正在报销,3已报销
/// </summary>
public int State { get; set; }
/// <summary>
/// 钉钉报销审批单编号
/// </summary>
public string BusinessId { get; set; }
//钉钉审批实例Id
public string ProcessInstanceId { get; set; }
public List<ininvoiceoutputList> List { get; set; }
}
public class ininvoiceoutputList
{
/// <summary>
/// 明细 id
/// </summary>
public string mxid { get; set; }
/// <summary>
/// 发票代码
/// </summary>
public string fpdm { get; set; }
/// <summary>
/// 发票号码
/// </summary>
public string fphm { get; set; }
/// <summary>
/// 发票明细行序号
/// </summary>
public string fpmxxh { get; set; }
/// <summary>
/// 发票行性质
/// </summary>
public string fphxz { get; set; }
/// <summary>
/// 金额
/// </summary>
public string je { get; set; }
/// <summary>
/// 税率
/// </summary>
public string sl { get; set; }
/// <summary>
/// 税额
/// </summary>
public string se { get; set; }
/// <summary>
/// 商品名称
/// </summary>
public string spmc { get; set; }
/// <summary>
/// 规格型号
/// </summary>
public string ggxh { get; set; }
/// <summary>
/// 单位
/// </summary>
public string dw { get; set; }
/// <summary>
/// 商品数量
/// </summary>
public float spsl { get; set; }
/// <summary>
/// 商品单价
/// </summary>
public float spdj { get; set; }
/// <summary>
/// 商品编码
/// </summary>
public string spbm { get; set; }
/// <summary>
/// 版本
/// </summary>
public string bb { get; set; }
/// <summary>
/// 优惠政策标识
/// </summary>
public string yhzcbs { get; set; }
/// <summary>
/// 开票日期
/// </summary>
public string kprq { get; set; }
/// <summary>
/// 开票单位代码
/// </summary>
public string kpdwdm { get; set; }
/// <summary>
/// 名称
/// </summary>
public string mc { get; set; }
/// <summary>
/// 序号
/// </summary>
public string xh { get; set; }
}
public class InInvoiceDataInfoOutput
{
public int code { get; set; }
public bool success { get; set; }
public string msg { get; set; }
public object msgDev { get; set; }
public InvoiceData data { get; set; }
}
public class InvoiceData
{
public List<InInviceDtl> List { get; set; }
public string kprq { get; set; }
public string fplxdm { get; set; }
public string fphm { get; set; }
public string hjje { get; set; }
public string hjse { get; set; }
public string jshj { get; set; }
public string fpzt { get; set; }
public string kpr { get; set; }
public string yfphm { get; set; }
public string gfkpmc { get; set; }
public string gfkpsh { get; set; }
public string xfkpmc { get; set; }
public string xfkpsh { get; set; }
public bool IsGetDtl { get; set; }
public string xfsbh { get; set; }
public string final_jym { get; set; }
public string gfmc { get; set; }
public string dqsj { get; set; }
public float kce { get; set; }
public string jdfplxdm { get; set; }
public string skm { get; set; }
public string ghdwdm { get; set; }
public string zzfphm { get; set; }
public string skr { get; set; }
public string qdbz { get; set; }
public string kpdwdm { get; set; }
public string ghdwyhzh { get; set; }
public float je { get; set; }
public string xfmc { get; set; }
public string tdys { get; set; }
public string bxzt { get; set; }
public string gfyhzh { get; set; }
public string tdyslxDm { get; set; }
public string czydm { get; set; }
public string ghdwdzdh { get; set; }
public string sfwzzfp { get; set; }
public string fpqqlsh { get; set; }
public string se { get; set; }
public string bz { get; set; }
public string gfsbh { get; set; }
public string ghdwmc { get; set; }
public string xhdwdm { get; set; }
public string fpdm { get; set; }
public string xhdwdzdh { get; set; }
public string zbmx { get; set; }
public string xddzdh { get; set; }
public string xfyhzh { get; set; }
public string fhr { get; set; }
public string gfdzdh { get; set; }
public string xhdwmc { get; set; }
public string jqbh { get; set; }
public string zyspmc { get; set; }
public string xhdwyhzh { get; set; }
public string PDFfile { get; set; }
public string OFDfile { get; set; }
public string XMLfile { get; set; }
public string Allfile { get; set; }
}
public class InInviceDtl
{
public string mxid { get; set; }
public string fpdm { get; set; }
public string fphm { get; set; }
public string fpmxxh { get; set; }
public string fphxz { get; set; }
public string je { get; set; }
public string sl { get; set; }
public string se { get; set; }
public string spmc { get; set; }
public string ggxh { get; set; }
public string dw { get; set; }
public float spsl { get; set; }
public float spdj { get; set; }
public string spbm { get; set; }
public string bb { get; set; }
public string yhzcbs { get; set; }
public string kprq { get; set; }
public string kpdwdm { get; set; }
public string mc { get; set; }
public string xh { get; set; }
public long TenantId { get; set; }
public string TenantName { get; set; }
public bool IsDeleted { get; set; }
public object CreateId { get; set; }
public object CreateBy { get; set; }
public string CreateTime { get; set; }
public object ModifyId { get; set; }
public object ModifyBy { get; set; }
public object ModifyTime { get; set; }
public long Id { get; set; }
}
}

@ -0,0 +1,27 @@
using DS.WMS.Core.HangfireJob.Dtos;
using Hangfire;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.HangfireJob.Interface
{
public interface IInInvoiceJobService
{
/// <summary>
/// 定时获取进项发票数据
/// </summary>
/// <param name="Id"></param>
/// <param name="tenantDb"></param>
/// <returns></returns>
[Queue("ininvice")]
Task GetInInvoiceData();
}
}

@ -0,0 +1,239 @@
using DS.Module.Core.Enums;
using DS.WMS.Core.HangfireJob.Dtos;
using DS.WMS.Core.HangfireJob.Interface;
using DS.WMS.Core.Invoice.Entity;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Sys.Entity;
using DS.WMS.Core.TaskPlat.Dtos;
using Google.Api.Gax.ResourceNames;
using LanguageExt.Common;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
using NPOI.SS.Formula.Functions;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.HangfireJob.Method
{
/// <summary>
/// 进项发票相关
/// </summary>
public class InInvoiceService : IInInvoiceJobService
{
private static readonly HttpClient _httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(60) };
ISqlSugarClient? db;
public InInvoiceService(IServiceProvider serviceProvider)
{
db = serviceProvider.GetRequiredService<ISqlSugarClient>();
}
/// <summary>
/// 定时获取进项发票数据
/// </summary>
/// <returns></returns>
public async Task GetInInvoiceData()
{
//获取组织机构请求授权列表
if (db==null)
{
return;
}
var orgauthlist= db.Queryable<SysOrgAuth>().ClearFilter().Where(t => t.Deleted == false&&t.Type=="ininvice").ToList();
//遍历授权数据集
foreach (var item in orgauthlist)
{
//组织请求远程接口api数据
Dictionary<string, string> header = new Dictionary<string, string>();
header.Add("USER_KEY", item.Key);
header.Add("USER_SECRET", item.Secret);
InInvoicePost model = new InInvoicePost();
model.kprqks = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd HH:mm:ss"); //往前查24小时的进项发票数据
model.kprqjs = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
//model.kprqks = "2024-09-01 00:00:00";// DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd HH:mm:ss"); //往前查24小时的进项发票数据
//model.kprqjs = "2024-09-07 00:00:00"; //DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
var result = await PostAsync("http://47.105.115.105:26650/api/XSD/GetInInvoiceDataList", JsonConvert.SerializeObject(model), header);
//处理返回结果
var info= JsonConvert.DeserializeObject<InInvoicePostOutput>(result);
if (info!=null&&info.Data.data!=null)
{
var dbLink = await db.Queryable<Module.SqlSugar.SysTenantLink>().ClearFilter().Where(t => t.TenantId == item.TenantId).FirstAsync();
SqlSugarClient? tenantDb = null;
foreach (var itemdata in info.Data.data)
{
//查询租户数据库中是否有当前数据
tenantDb = new SqlSugarClient(new ConnectionConfig
{
ConfigId = dbLink.Id,
ConnectionString = dbLink.Connection,
DbType = dbLink.DbType,
IsAutoCloseConnection = true
});
var ininviceinfo = await tenantDb.Queryable<InInvoice>().Where(x => x.InvoiceNumber == itemdata.fphm).FirstAsync();
//数据库中发票数据为空,获取发票详情数据
if (ininviceinfo==null)
{
GetInInvoiceDataInfo gidi = new GetInInvoiceDataInfo();
gidi.fphm = itemdata.fphm;
var resultinfo = await PostAsync("http://47.105.115.105:26650/api/XSD/GetInInvoiceDataInfo", JsonConvert.SerializeObject(gidi), header);
var Iinfo = JsonConvert.DeserializeObject<InInvoiceDataInfoOutput>(resultinfo);
if (Iinfo.code == 0) //调整
{
//添加发票数据
InInvoice inInvoice = new InInvoice();
inInvoice.InvoicingDate = Iinfo.data.kprq;
inInvoice.InvoiceTypeCode = Iinfo.data.fplxdm;
inInvoice.InvoiceNumber = Iinfo.data.fphm;
inInvoice.TotalAmount = Iinfo.data.hjje;
inInvoice.TotalTax = Iinfo.data.hjse;
inInvoice.TotalWithTax = Iinfo.data.jshj;
inInvoice.InvoiceStatus = Iinfo.data.fpzt;
inInvoice.Invoicer = Iinfo.data.kpr;
inInvoice.OriginalInvoiceNumber = Iinfo.data.yfphm;
inInvoice.BuyerInvoiceName = Iinfo.data.gfkpmc;
inInvoice.BuyerInvoiceTaxNumber = Iinfo.data.gfkpsh;
inInvoice.SellerInvoiceName = Iinfo.data.xfkpmc;
inInvoice.SellerInvoiceTaxNumber = Iinfo.data.xfkpsh;
inInvoice.IsDetailObtained = Iinfo.data.IsGetDtl;
inInvoice.SellerIdentificationNumber = Iinfo.data.xfsbh;
inInvoice.FinalCheckCode = Iinfo.data.final_jym;
inInvoice.BuyerName = Iinfo.data.gfmc;
inInvoice.CurrentTime = Iinfo.data.dqsj;
inInvoice.DeductionAmount = Iinfo.data.kce;
inInvoice.VehicleInvoiceTypeCode = Iinfo.data.jdfplxdm;
inInvoice.TaxControlCode = Iinfo.data.skm;
inInvoice.BuyerTaxNumber = Iinfo.data.ghdwdm;
inInvoice.PaperInvoiceNumber = Iinfo.data.zzfphm;
inInvoice.Payee = Iinfo.data.skr;
inInvoice.ItemFlag = Iinfo.data.qdbz;
inInvoice.InvoiceUnitCode = Iinfo.data.kpdwdm;
inInvoice.BuyerBankAccount = Iinfo.data.ghdwyhzh;
inInvoice.Amount = Iinfo.data.je;
inInvoice.SellerName = Iinfo.data.xfmc;
inInvoice.SpecialElements = Iinfo.data.tdys;
inInvoice.ReimbursementStatus = Iinfo.data.bxzt;
inInvoice.BuyerBankAccountNumber = Iinfo.data.gfyhzh;
inInvoice.SpecialElementTypeCode = Iinfo.data.tdyslxDm;
inInvoice.OperatorCode = Iinfo.data.czydm;
inInvoice.BuyerAddressPhone = Iinfo.data.ghdwdzdh;
inInvoice.IsPaperInvoice = Iinfo.data.sfwzzfp;
inInvoice.InvoiceRequestNumber = Iinfo.data.fpqqlsh;
inInvoice.TaxAmount = Iinfo.data.se;
inInvoice.Remarks = Iinfo.data.bz;
inInvoice.BuyerIdentificationNumber = Iinfo.data.gfsbh;
inInvoice.BuyerFullName = Iinfo.data.ghdwmc;
inInvoice.SellerTaxNumber = Iinfo.data.xhdwdm;
inInvoice.InvoiceCode = Iinfo.data.fpdm;
inInvoice.SellerAddressPhone = Iinfo.data.xhdwdzdh;
inInvoice.DetailList = Iinfo.data.zbmx;
inInvoice.SellerAddressPhoneExtra = Iinfo.data.xddzdh;
inInvoice.SellerBankAccountNumber = Iinfo.data.xfyhzh;
inInvoice.Reviewer = Iinfo.data.fhr;
inInvoice.BuyerAddressPhoneExtra = Iinfo.data.gfdzdh;
inInvoice.SellerFullName = Iinfo.data.xhdwmc;
inInvoice.MachineCode = Iinfo.data.jqbh;
inInvoice.ItemOrServiceName = Iinfo.data.zyspmc;
inInvoice.SellerBankAccount = Iinfo.data.xhdwyhzh;
inInvoice.PdfFilePath = Iinfo.data.PDFfile;
inInvoice.OfdFilePath = Iinfo.data.OFDfile;
inInvoice.XmlFilePath = Iinfo.data.XMLfile;
inInvoice.AllFileDownloadPath = Iinfo.data.Allfile;
inInvoice.OrgId = item.OrgId;
inInvoice.CreateTime = DateTime.Now;
var datainv = await tenantDb.Insertable(inInvoice).ExecuteReturnEntityAsync();
foreach (var dtl in Iinfo.data.List)
{
//添加发票详情数据
InInvoiceDetail inInvoicedtl = new InInvoiceDetail();
inInvoicedtl.Id= SnowFlakeSingle.Instance.NextId();
inInvoicedtl.PId = datainv.Id;
inInvoicedtl.DetailId = dtl.mxid;
inInvoicedtl.InvoiceCode = dtl.fpdm;
inInvoicedtl.InvoiceNumber = dtl.fphm;
inInvoicedtl.InvoiceDetailLineNumber = dtl.fpmxxh;
inInvoicedtl.InvoiceLineNature = dtl.fphxz;
inInvoicedtl.Amount = dtl.je;
inInvoicedtl.TaxRate = dtl.sl;
inInvoicedtl.TaxAmount = dtl.se;
inInvoicedtl.ProductName = dtl.spmc;
inInvoicedtl.Specification = dtl.ggxh;
inInvoicedtl.Unit = dtl.dw;
inInvoicedtl.Quantity = dtl.spsl;
inInvoicedtl.UnitPrice = dtl.spdj;
inInvoicedtl.ProductCode = dtl.spbm;
inInvoicedtl.Version = dtl.bb;
inInvoicedtl.PreferentialPolicyFlag = dtl.yhzcbs;
inInvoicedtl.InvoicingDate = dtl.kprq;
inInvoicedtl.InvoicingUnitCode = dtl.kpdwdm;
inInvoicedtl.Name = dtl.mc;
inInvoicedtl.SerialNumber = dtl.xh;
inInvoicedtl.OrgId = item.OrgId;
inInvoicedtl.CreateTime = DateTime.Now;
await tenantDb.Insertable(inInvoicedtl).ExecuteCommandAsync();
}
}
}
}
}
}
}
/// <summary>
/// post请求
/// </summary>
/// <param name="serviceAddress">请求地址</param>
/// <param name="requestJson">请求参数</param>
/// <param name="headers">请求头</param>
/// <returns></returns>
public static async Task<string> PostAsync(string serviceAddress, string requestJson = null, Dictionary<string, string> headers = null)
{
try
{
string result = string.Empty;
Uri postUrl = new Uri(serviceAddress);
using (HttpContent httpContent = new StringContent(requestJson))
{
httpContent.Headers.ContentType = new MediaTypeHeaderValue("application/json");
if (headers != null)
{
foreach (var header in headers)
{
httpContent.Headers.Add(header.Key, header.Value);
}
}
var response = await _httpClient.PostAsync(serviceAddress, httpContent);
result = await response.Content.ReadAsStringAsync();
}
return result;
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
return null;
}
}
}

@ -201,7 +201,7 @@ namespace DS.WMS.Core.Invoice.Dtos
/// <summary> /// <summary>
/// 税额 se /// 税额 se
/// </summary> /// </summary>
public float TaxAmount { get; set; } public string TaxAmount { get; set; }
/// <summary> /// <summary>
/// 备注 bz /// 备注 bz

@ -1,4 +1,5 @@
using SqlSugar; using DS.Module.Core.Data;
using SqlSugar;
namespace DS.WMS.Core.Invoice.Entity namespace DS.WMS.Core.Invoice.Entity
{ {
@ -6,12 +7,8 @@ namespace DS.WMS.Core.Invoice.Entity
/// 进项发票主表 /// 进项发票主表
/// </summary> /// </summary>
[SugarTable("invoice_in_info", TableDescription = "进项发票主表")] [SugarTable("invoice_in_info", TableDescription = "进项发票主表")]
public class InInvoice public class InInvoice : BaseModel<long>
{ {
/// <summary>
/// 主键
/// </summary>
public long Id { get; set; }
/// <summary> /// <summary>
/// 开票日期 kprq /// 开票日期 kprq
@ -201,7 +198,7 @@ namespace DS.WMS.Core.Invoice.Entity
/// <summary> /// <summary>
/// 税额 se /// 税额 se
/// </summary> /// </summary>
public float TaxAmount { get; set; } public string TaxAmount { get; set; }
/// <summary> /// <summary>
/// 备注 bz /// 备注 bz
@ -302,50 +299,7 @@ namespace DS.WMS.Core.Invoice.Entity
/// 机构Id /// 机构Id
/// </summary> /// </summary>
public long OrgId { get; set; } public long OrgId { get; set; }
/// <summary>
/// 备注
/// </summary>
public string? Note { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
public string? CreateBy { get; set; }
/// <summary>
/// 修改人
/// </summary>
public string? UpdateBy { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public string? UpdateTime { get; set; }
/// <summary>
/// 是否删除
/// </summary>
public bool Deleted { get; set; }
/// <summary>
/// 删除时间
/// </summary>
public string? DeleteTime { get; set; }
/// <summary>
/// 删除人
/// </summary>
public string? DeleteBy { get; set; }
/// <summary>
/// 创建人姓名
/// </summary>
public string? CreateUserName { get; set; }
/// <summary>
/// 修改人姓名
/// </summary>
public string? UpdateUserName { get; set; }
/// <summary>
/// 删除人姓名
/// </summary>
public string? DeleteUserName { get; set; }
} }
} }

@ -1,4 +1,5 @@
using SqlSugar; using DS.Module.Core.Data;
using SqlSugar;
namespace DS.WMS.Core.Invoice.Entity namespace DS.WMS.Core.Invoice.Entity
{ {
@ -6,12 +7,9 @@ namespace DS.WMS.Core.Invoice.Entity
/// 进项发票详情表 /// 进项发票详情表
/// </summary> /// </summary>
[SugarTable("invoice_in_detail", TableDescription = "进项发票详情表")] [SugarTable("invoice_in_detail", TableDescription = "进项发票详情表")]
public class InInvoiceDetail public class InInvoiceDetail : BaseModel<long>
{ {
/// <summary>
/// 主键
/// </summary>
public long Id { get; set; }
/// <summary> /// <summary>
/// 主表Id /// 主表Id
@ -122,50 +120,7 @@ namespace DS.WMS.Core.Invoice.Entity
/// 机构Id /// 机构Id
/// </summary> /// </summary>
public long OrgId { get; set; } public long OrgId { get; set; }
/// <summary>
/// 备注
/// </summary>
public string? Note { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
public string? CreateBy { get; set; }
/// <summary>
/// 修改人
/// </summary>
public string? UpdateBy { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public string? UpdateTime { get; set; }
/// <summary>
/// 是否删除
/// </summary>
public bool Deleted { get; set; }
/// <summary>
/// 删除时间
/// </summary>
public string? DeleteTime { get; set; }
/// <summary>
/// 删除人
/// </summary>
public string? DeleteBy { get; set; }
/// <summary>
/// 创建人姓名
/// </summary>
public string? CreateUserName { get; set; }
/// <summary>
/// 修改人姓名
/// </summary>
public string? UpdateUserName { get; set; }
/// <summary>
/// 删除人姓名
/// </summary>
public string? DeleteUserName { get; set; }
} }
} }

@ -0,0 +1,33 @@
using DS.Module.Core.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Sys.Entity
{
/// <summary>
/// 组织机构授权表
/// </summary>
[SqlSugar.SugarTable("sys_org_auth")]
public class SysOrgAuth : BaseTenantModel<long>
{
/// <summary>
/// 组织机构Id
/// </summary>
public long OrgId { get; set; }
/// <summary>
/// 类型
/// </summary>
public string Type { get; set; }
/// <summary>
/// 请求key
/// </summary>
public string Key { get; set; }
/// <summary>
/// 密钥
/// </summary>
public string Secret { get; set; }
}
}

@ -60,4 +60,7 @@ app.UseHangfireServer();
app.UseJobMiddlewares(); app.UseJobMiddlewares();
JobMiddleware.RegisterJob<IFeeCustTemplateJobService>(j => j.GenerateFeesAsync(), Cron.Daily(23, 30)); JobMiddleware.RegisterJob<IFeeCustTemplateJobService>(j => j.GenerateFeesAsync(), Cron.Daily(23, 30));
//定时获取进项发票数据 每分钟触发一次
//JobMiddleware.RegisterJob<IInInvoiceJobService>(j => j.GetInInvoiceData(), Cron.Minutely());
app.Run(); app.Run();
Loading…
Cancel
Save