导出列表
This commit is contained in:
84
src/WMS.Web.Domain/Entitys/FileDownManager.cs
Normal file
84
src/WMS.Web.Domain/Entitys/FileDownManager.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
using WMS.Web.Core;
|
||||
using WMS.Web.Domain.Values;
|
||||
|
||||
namespace WMS.Web.Domain.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 文件下载类型
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[Table("t_wms_file_down_manager")]
|
||||
public class FileDownManager : EntityBase
|
||||
{
|
||||
public FileDownManager() { }
|
||||
public FileDownManager(int userId, int companyId, FileDownLoadOrderType type, string path, int? supplierId = null)
|
||||
{
|
||||
this.UserId = userId;
|
||||
this.CompanyId = companyId;
|
||||
this.Type = type;
|
||||
this.FilePath = path;
|
||||
this.SupplierId = supplierId;
|
||||
}
|
||||
/// <summary>
|
||||
/// 主键 订单编号
|
||||
/// </summary>
|
||||
[Column("Id")]
|
||||
public override int Id { get; set; }
|
||||
/// <summary>
|
||||
/// 日期
|
||||
/// </summary>
|
||||
[Column("Date")]
|
||||
public DateTime? Date { get; set; } = DateTime.Now;
|
||||
/// <summary>
|
||||
/// 单据类型(任务类型)
|
||||
/// </summary>
|
||||
[Column("Type")]
|
||||
public FileDownLoadOrderType Type { get; set; } = FileDownLoadOrderType.OutStockTask;
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
[Column("Status")]
|
||||
public ExportStatus Status { get; set; } = ExportStatus.Ing;
|
||||
/// <summary>
|
||||
/// 公司Id
|
||||
/// </summary>
|
||||
[Column("CompanyId")]
|
||||
public int CompanyId { get; set; }
|
||||
/// <summary>
|
||||
/// 文件地址
|
||||
/// </summary>
|
||||
[Column("FilePath")]
|
||||
public string FilePath { get; set; }
|
||||
/// <summary>
|
||||
/// 操作人
|
||||
/// </summary>
|
||||
[Column("UserId")]
|
||||
public int UserId { get; set; }
|
||||
/// <summary>
|
||||
/// 失败原因
|
||||
/// </summary>
|
||||
[Column("Reason")]
|
||||
public string Reason { get; set; }
|
||||
/// <summary>
|
||||
/// 是否供应商用户
|
||||
/// </summary>
|
||||
[Column("SupplierId")]
|
||||
public int? SupplierId { get; set; }
|
||||
|
||||
public void Finish(bool IsSuccess, string reson)
|
||||
{
|
||||
if (IsSuccess)
|
||||
this.Status = ExportStatus.Success;
|
||||
else
|
||||
{
|
||||
this.Status = ExportStatus.Fail;
|
||||
this.Reason = reson;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user