Administrator 3 years ago
parent
commit
2978edcee1
  1. 119
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/TaskListDto.cs
  2. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs
  3. 10
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs
  4. 71
      src/Modules/SettleAccount/src/SettleAccount.HttpApi/BlobFileController.cs

119
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/TaskListDto.cs

@ -639,6 +639,125 @@ namespace Win.Sfs.SettleAccount.Entities
public Guid TaskId { set; get; }
}
/// <summary>
/// 红旗一轿导入模板DTO
/// </summary>
public class WmsHQWithOutKanbanOutPutDetiaTemplatelDto
{
[ImporterHeader(Name = "版本号")]
[ExporterHeader(DisplayName = "版本号")]
public string Version { set; get; }
[ImporterHeader(Name = "物料号")]
[ExporterHeader(DisplayName = "物料号")]
public string SapMaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")]
public decimal Qty { set; get; }
[ImporterHeader(Name = "开票单价")]
[ExporterHeader(DisplayName = "开票单价")]
public decimal Price { set; get; }
[ImporterHeader(Name = "开票金额")]
[ExporterHeader(DisplayName = "开票金额")]
public decimal Amt { set; get; }
[ImporterHeader(Name = "是否备件")]
[ExporterHeader(DisplayName = "是否备件")]
public string IsBack { set; get; }
[ImporterHeader(Name = "客户")]
[ExporterHeader(DisplayName = "客户")]
public string Extend { set; get; }
}
/// <summary>
/// 一次性销售导入模板DTO
/// </summary>
public class WmsOneTimeSaleOutPutDetialTempalteDTO
{
[ImporterHeader(Name = "版本号")]
[ExporterHeader(DisplayName = "版本号")]
public string Version { set; get; }
[ImporterHeader(Name = "客户")]
[ExporterHeader(DisplayName = "客户")]
public string Extend { set; get; }
[ImporterHeader(Name = "物料号")]
[ExporterHeader(DisplayName = "物料号")]
public string SapMaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "是否备件", IsIgnore = true)]
[ExporterHeader(DisplayName = "是否备件", IsIgnore = true)]
public string IsBack { set; get; }
[ImporterHeader(Name = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")]
public decimal Qty { set; get; }
[ImporterHeader(Name = "开票单价")]
[ExporterHeader(DisplayName = "开票单价")]
public decimal Price { set; get; }
[ImporterHeader(Name = "开票金额")]
[ExporterHeader(DisplayName = "开票金额")]
public decimal Amt { set; get; }
}
/// <summary>
/// 大众备件无单号出库单导入模板DTO
/// </summary>
public class WmsSharePartOutPutDetialTemplateDTO
{
[ImporterHeader(Name = "SAP编码")]
[ExporterHeader(DisplayName = "SAP编码")]
//物料号
public string MaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
[ExporterHeader(DisplayName = "物料描述")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
[ExporterHeader(DisplayName = "物料组(车型)")]
//物料组(车型)
public string MaterialGroup { set; get; }
[ImporterHeader(Name = "开票数量")]
[ExporterHeader(DisplayName = "开票数量")]
public decimal Qty { set; get; }
[ImporterHeader(Name = "开票单价")]
[ExporterHeader(DisplayName = "开票单价")]
public decimal Price { set; get; }
[ImporterHeader(Name = "开票金额")]
[ExporterHeader(DisplayName = "开票金额")]
public decimal Amt { set; get; }
}
public enum ExporterStatus
{

2
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs

@ -76,6 +76,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
private readonly TaskJobService _service;
private readonly WmsDapperRepository _wmsDapper;
/// <summary>
///
/// </summary>
@ -226,6 +227,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
}
/// <summary>
/// 选择任务,生成出库单,只包含已确认的单据
/// </summary>

10
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs

@ -226,8 +226,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
[ImporterHeader(Name = "客户零件号", IsIgnore = true)]
[ExporterHeader(DisplayName = "客户零件号", IsIgnore = true)]
public string MaterialCode { set; get; }
[ImporterHeader(Name = "交货单号")]
[ExporterHeader(DisplayName = "交货单号")]
[ImporterHeader(Name = "交货单号", IsIgnore = true)]
[ExporterHeader(DisplayName = "交货单号", IsIgnore = true)]
public string WmsBillNum { set; get; }
//[ImporterHeader(Name = "订货看板编号")]
////KENN号
@ -240,8 +240,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
[ExporterHeader(DisplayName = "零件中文名称")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
[ExporterHeader(DisplayName = "物料组(车型)")]
[ImporterHeader(Name = "物料组(车型)", IsIgnore = true)]
[ExporterHeader(DisplayName = "物料组(车型)", IsIgnore = true)]
//物料组(车型)
public string MaterialGroup { set; get; }
[ImporterHeader(Name = "出库库位", IsIgnore = true)]
@ -2148,7 +2148,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
/// <summary>
/// 备件出库明细
/// 备件无单号出库明细
/// </summary>
//[ExcelImporter(SheetName = "大众备件数据输出")]
public class WmsSharePartOutPutDetial : FullAuditedAggregateRootBase<Guid>

71
src/Modules/SettleAccount/src/SettleAccount.HttpApi/BlobFileController.cs

@ -10,6 +10,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Entities;
using Win.Sfs.SettleAccount.Entities.WMS;
namespace Win.Sfs.SettleAccount
@ -39,7 +40,7 @@ namespace Win.Sfs.SettleAccount
}
/// <summary>
/// 生成其他出库导入模板
/// 客户自定义发货结算导入模板
/// </summary>
/// <returns></returns>
[HttpPost]
@ -61,6 +62,74 @@ namespace Win.Sfs.SettleAccount
}
/// <summary>
/// 红旗一轿手工出库单导入模板
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("saveHQKBExcelTemplate")]
public async Task<string> SaveHQKBExcelImportTemplate()
{
string fileName = "红旗一轿手工出库单导入模板.xlsx";
var result = await Importer.GenerateTemplateBytes<WmsHQWithOutKanbanOutPutDetiaTemplatelDto>();
result.ShouldNotBeNull();
result.Length.ShouldBeGreaterThan(0);
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
Name = fileName,
Content = result
}
);
return fileName;
}
/// <summary>
/// 一次性销售出库单导入模板
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("saveHQKBExcelTemplate")]
public async Task<string> SaveOneTimeExcelImportTemplate()
{
string fileName = "一次性寄售销售出库单导入模板.xlsx";
var result = await Importer.GenerateTemplateBytes<WmsOneTimeSaleOutPutDetialTempalteDTO>();
result.ShouldNotBeNull();
result.Length.ShouldBeGreaterThan(0);
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
Name = fileName,
Content = result
}
);
return fileName;
}
/// <summary>
/// 一次性销售出库单导入模板
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("saveVWBJNoCodeExcelTemplate")]
public async Task<string> aveVWBJNoCodeExcelTemplate()
{
string fileName = "大众备件无单号出库单导入模板.xlsx";
var result = await Importer.GenerateTemplateBytes<WmsSharePartOutPutDetialTemplateDTO>();
result.ShouldNotBeNull();
result.Length.ShouldBeGreaterThan(0);
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
Name = fileName,
Content = result
}
);
return fileName;
}
}
}

Loading…
Cancel
Save