导出列表

This commit is contained in:
18942506660
2023-11-14 14:01:42 +08:00
parent 7f3f1838af
commit 239105b6d5
17 changed files with 724 additions and 6 deletions

View 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;
}
}
}
}

View File

@@ -0,0 +1,31 @@

using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using WMS.Web.Core.Dto;
using WMS.Web.Domain.Entitys;
namespace WMS.Web.Domain.Infrastructure
{
public interface IFileDownManagerRepositories
{
/// <summary>
/// 保存
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
Task<FileDownManager> Add(FileDownManager entity);
/// <summary>
/// 编辑
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
Task<FileDownManager> Edit(FileDownManager entity);
/// <summary>
/// 获取销售列表
/// </summary>
/// <returns></returns>
Task<FileDownManagerResponse> GetList(FileDownManagerRequest dto,int companyId);
}
}

View File

@@ -0,0 +1,30 @@

using System;
using System.Collections.Generic;
using System.Text;
using WMS.Web.Core;
namespace WMS.Web.Domain.Values
{
/// <summary>
/// 文件导出状态
/// </summary>
public enum ExportStatus
{
/// <summary>
/// 正在导出
/// </summary>
[EnumRemark("正在导出")]
Ing = 0,
/// <summary>
/// 导出成功
/// </summary>
[EnumRemark("导出成功")]
Success = 1,
/// <summary>
/// 导出失败
/// </summary>
[EnumRemark("导出失败")]
Fail = 2
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
using WMS.Web.Core;
namespace WMS.Web.Domain.Values
{
/// <summary>
/// 导出单据类型
/// </summary>
public enum FileDownLoadOrderType
{
/// <summary>
/// 出库任务单
/// </summary>
[EnumRemark("出库任务单")]
OutStockTask = 1,
}
}