Browse Source

红旗一轿共计5个报表的验收单号更改为“外部验收单号”,根据客户财务要求

FoShanPG
44673626 3 years ago
parent
commit
7d4635fba5
  1. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformDto.cs
  2. 4
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformExportDto.cs
  3. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformImportDto.cs
  4. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformExportDto.cs
  5. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs
  6. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleDto.cs
  7. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleExportDto.cs
  8. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleImportDto.cs
  9. 321
      src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
  10. 4
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BT_Car/BT_Car_Platform.cs
  11. 13
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs
  12. 321
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFactorySettledDetailDapperRepository.cs
  13. 443
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs

2
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformDto.cs

@ -14,7 +14,7 @@ namespace Win.Sfs.SettleAccount.Entities.BT_Car
/// </summary>
public string Factory { get; set; }
/// <summary>
///外部看板编
///外部验收单
/// </summary>
public string ExternalKanbanNumber { get; set; }
/// <summary>

4
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformExportDto.cs

@ -15,9 +15,9 @@ namespace Win.Sfs.SettleAccount.Entities.BT_Car
[ExporterHeader(DisplayName = "工厂")]
public string Factory { get; set; }
/// <summary>
///外部看板编
///外部验收单
/// </summary>
[ExporterHeader(DisplayName = "外部看板编号")]
[ExporterHeader(DisplayName = "外部验收单号")]
public string ExternalKanbanNumber { get; set; }
/// <summary>
///看板编号

2
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformImportDto.cs

@ -17,7 +17,7 @@ namespace Win.Sfs.SettleAccount.Entities.BT_Car
/// <summary>
///外部看板编号
/// </summary>
[ImporterHeader(Name = "外部看板编号")]
[ImporterHeader(Name = "外部验收单号")]
public string ExternalKanbanNumber { get; set; }
/// <summary>
///看板编号

2
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformExportDto.cs

@ -17,7 +17,7 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
/// <summary>
///外部单号
/// </summary>
[ExporterHeader(DisplayName = "外部号")]
[ExporterHeader(DisplayName = "外部看板编号")]
public string ExternalKanbanNumber { get; set; }
/// <summary>
///看板编号

2
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs

@ -17,7 +17,7 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
/// <summary>
///外部单号
/// </summary>
[ImporterHeader(Name = "外部号")]
[ImporterHeader(Name = "外部看板编号")]
public string ExternalKanbanNumber { get; set; }
/// <summary>
///看板编号

2
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleDto.cs

@ -18,7 +18,7 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts
/// </summary>
public string ExternalKanbanNumber { get; set; }
/// <summary>
///看板编号
///外部看板编号
/// </summary>
public string KanbanNumber { get; set; }
/// <summary>

2
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleExportDto.cs

@ -17,7 +17,7 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts
/// <summary>
///外部看板编号
/// </summary>
[ExporterHeader(DisplayName = "外部号")]
[ExporterHeader(DisplayName = "外部看板编号")]
public string ExternalKanbanNumber { get; set; }
/// <summary>
///看板编号

2
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleImportDto.cs

@ -17,7 +17,7 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts
/// <summary>
///外部看板编号
/// </summary>
[ImporterHeader(Name = "外部号")]
[ImporterHeader(Name = "外部看板编号")]
public string ExternalKanbanNumber { get; set; }
/// <summary>
///看板编号

321
src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs

@ -820,122 +820,148 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
return _taskid;
}
/// <summary>
///红旗F平台核对明细
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("HQFSettledDetailDiffExportService")]
[Route("FisUpdateExportService")]
[DisableRequestSizeLimit]
public async Task<string> HQFSettledDetailDiffExportServiceMake(
HQKanbanRequestDto input
)
[UnitOfWork(isTransactional: false)]
public async Task<string> FisUpdateExportServiceMake(
HQKanbanRequestDto input
)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
var _taskid = await _service.ExportEnqueueAsync("F平台核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQFSettledDetailDiffExportService), customConditionList, (rs) =>
var _taskid = await _service.ExportEnqueueAsync("Fis发货数据更新状态", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(FisUpdateExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
#region F及M平台已经合并入H平台
/// <summary>
///红旗F平台核对明细
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
//[HttpPost]
//[Route("HQFSettledDetailDiffExportService")]
//[DisableRequestSizeLimit]
//public async Task<string> HQFSettledDetailDiffExportServiceMake(
// HQKanbanRequestDto input
// )
//{
// List<CustomCondition> customConditionList = new List<CustomCondition>();
// customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
// customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
// customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
// customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
// customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
// customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
// customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
// customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
// customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
// customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
// var _taskid = await _service.ExportEnqueueAsync("F平台核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQFSettledDetailDiffExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
/// <summary>
/// 红旗F平台备件结算出库
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("HQFSharePartSettledDetailDiffExportService")]
[DisableRequestSizeLimit]
public async Task<string> HQFSharePartSettledDetailDiffExportServiceMake(
HQKanbanRequestDto input
)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
var _taskid = await _service.ExportEnqueueAsync("F平台备件核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQFSharePartSettledDetailDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
//[HttpPost]
//[Route("HQFSharePartSettledDetailDiffExportService")]
//[DisableRequestSizeLimit]
//public async Task<string> HQFSharePartSettledDetailDiffExportServiceMake(
// HQKanbanRequestDto input
// )
//{
// List<CustomCondition> customConditionList = new List<CustomCondition>();
// customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
// customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
// customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
// customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
// customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
// customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
// customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
// customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
// customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
// var _taskid = await _service.ExportEnqueueAsync("F平台备件核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQFSharePartSettledDetailDiffExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
/// <summary>
///红旗M平台核对明细
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("HQMSettledDetailDiffExportService")]
[DisableRequestSizeLimit]
public async Task<string> HQMSettledDetailDiffExportServiceMake(
HQKanbanRequestDto input
)
{
//[HttpPost]
//[Route("HQMSettledDetailDiffExportService")]
//[DisableRequestSizeLimit]
//public async Task<string> HQMSettledDetailDiffExportServiceMake(
// HQKanbanRequestDto input
// )
//{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
var _taskid = await _service.ExportEnqueueAsync("M平台核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQMSettledDetailDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
// List<CustomCondition> customConditionList = new List<CustomCondition>();
// customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
// customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
// customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
// customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
// customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
// customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
// customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
// customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
// customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
// customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
// var _taskid = await _service.ExportEnqueueAsync("M平台核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQMSettledDetailDiffExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
/// <summary>
/// 红旗M平台备件结算出库
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("HQMSharePartSettledDetailDiffExportService")]
[DisableRequestSizeLimit]
public async Task<string> HQMSharePartSettledDetailDiffExportServiceMake(
HQKanbanRequestDto input
)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
var _taskid = await _service.ExportEnqueueAsync("M平台备件核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQMSharePartSettledDetailDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
//[HttpPost]
//[Route("HQMSharePartSettledDetailDiffExportService")]
//[DisableRequestSizeLimit]
//public async Task<string> HQMSharePartSettledDetailDiffExportServiceMake(
// HQKanbanRequestDto input
// )
//{
// List<CustomCondition> customConditionList = new List<CustomCondition>();
// customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
// customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
// customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
// customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
// customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
// customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
// customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
// customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
// customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
// var _taskid = await _service.ExportEnqueueAsync("M平台备件核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQMSharePartSettledDetailDiffExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
@ -947,90 +973,69 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("HQHShippingExportService")]
[DisableRequestSizeLimit]
public async Task<string> HQHShippingExportServiceMake(
HQKanbanRequestDto input
)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
var _taskid = await _service.ExportEnqueueAsync("H平台发运核对输出", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(HQHShippingExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
//[HttpPost]
//[Route("HQHShippingExportService")]
//[DisableRequestSizeLimit]
//public async Task<string> HQHShippingExportServiceMake(
// HQKanbanRequestDto input
// )
//{
// List<CustomCondition> customConditionList = new List<CustomCondition>();
// customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
// customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
// customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
// customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
// var _taskid = await _service.ExportEnqueueAsync("H平台发运核对输出", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(HQHShippingExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
/// <summary>
/// F平台未结明细
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("HQHShippingExportService")]
[DisableRequestSizeLimit]
public async Task<string> HQFShippingExportServiceMake(
HQKanbanRequestDto input
)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
var _taskid = await _service.ExportEnqueueAsync("F平台未结明细", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(HQFShippingExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
//[HttpPost]
//[Route("HQHShippingExportService")]
//[DisableRequestSizeLimit]
//public async Task<string> HQFShippingExportServiceMake(
// HQKanbanRequestDto input
// )
//{
// List<CustomCondition> customConditionList = new List<CustomCondition>();
// customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
// customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
// customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
// var _taskid = await _service.ExportEnqueueAsync("F平台未结明细", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(HQFShippingExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
/// <summary>
/// M平台未明细
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("HQMShippingExportService")]
[DisableRequestSizeLimit]
public async Task<string> HQMShippingExportServiceMake(
HQKanbanRequestDto input
)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
var _taskid = await _service.ExportEnqueueAsync("M平台未明细", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(HQMShippingExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
[HttpPost]
[Route("FisUpdateExportService")]
[DisableRequestSizeLimit]
[UnitOfWork(isTransactional: false)]
public async Task<string> FisUpdateExportServiceMake(
HQKanbanRequestDto input
)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
var _taskid = await _service.ExportEnqueueAsync("Fis发货数据更新状态", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(FisUpdateExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
//[HttpPost]
//[Route("HQMShippingExportService")]
//[DisableRequestSizeLimit]
//public async Task<string> HQMShippingExportServiceMake(
// HQKanbanRequestDto input
// )
//{
// List<CustomCondition> customConditionList = new List<CustomCondition>();
// customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
// customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
// customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
// var _taskid = await _service.ExportEnqueueAsync("M平台未明细", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(HQMShippingExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
#endregion

4
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BT_Car/BT_Car_Platform.cs

@ -57,9 +57,9 @@ namespace Win.Sfs.SettleAccount.Entities.BT_Car
[Display(Name = "工厂")]
public string Factory { get; set; }
/// <summary>
///外部看板编
///外部验收单
/// </summary>
[Display(Name = "外部看板编号")]
[Display(Name = "外部验收单号")]
public string ExternalKanbanNumber { get; set; }
/// <summary>
///看板编号

13
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs

@ -89,7 +89,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" C.EstimateTypeDesc 物料组,\n" +
" C.MaterialDesc 物料描述,\n" +
" CONVERT ( VARCHAR ( 100 ), A.AcceptanceDate, 23 ) 验收单日期,\n" +
" a.[AcceptanceNo] AS 结算验收单号,\n" +
" a.[ExternalKanbanNumber] AS 外部验收单号,\n" +
" ISNULL( A.Price, 0 ) 结算单价,\n" +
" ISNULL( A.Qty, 0 ) 结算数量,\n" +
" ISNULL( A.Price, 0 ) * ISNULL( A.Qty, 0 ) 结算金额,\n" +
@ -230,7 +230,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" C.EstimateTypeDesc 物料组,\n" +
" C.MaterialDesc 物料描述,\n" +
" CONVERT ( VARCHAR ( 100 ), A.AcceptanceDate, 23 ) 验收单日期,\n" +
" a.[AcceptanceNo] AS 结算验收单号,\n" +
" a.[ExternalKanbanNumber] AS 外部验收单号,\n" +
" ISNULL( A.Price, 0 ) 结算单价,\n" +
" ISNULL( A.Qty, 0 ) 结算数量,\n" +
" ISNULL( A.Price, 0 ) * ISNULL( A.Qty, 0 ) 结算金额,\n" +
@ -341,7 +341,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public HQCarSettledDetailDiff(string sapMaterialCode, string materialCode, string materialDesc, decimal price,
string storageLocation, string storageLocationDesc, decimal selprice, decimal diffprice, decimal sumprice, decimal settleprice, decimal qty,
decimal sockQty,string metarialGroup,string acceptanceNo,string acceptanceDate)
decimal sockQty,string metarialGroup,string externalKanbanNumber, string acceptanceDate)
{
SAP编码 = sapMaterialCode;
= materialDesc;
@ -356,7 +356,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
= qty;
= settleprice;
= metarialGroup;
= acceptanceNo;
= externalKanbanNumber;
= acceptanceDate;
}
@ -377,9 +377,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "验收单日期")]
public string { set; get; }
[ExporterHeader(DisplayName = "结算验收单号")]
[ExporterHeader(DisplayName = "结算验收单号",IsIgnore =true)]
public string { set; get; }
[ExporterHeader(DisplayName = "外部验收单号")]
public string { set; get; }
[ExporterHeader(DisplayName = "物料组")]
public string { set; get; }

321
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFactorySettledDetailDapperRepository.cs

@ -44,88 +44,88 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
//}
string str = "SELECT\n" +
" temp3.StorageLocation 收货仓库,\n" +
" temp3.StorageLocationDesc 收货仓库描述,\n" +
" temp3.HQHKanBan 订货看板编号,\n" +
" temp3.AcceptanceNo 结算验收单号,\n" +
" temp3.AcceptanceDate 验收单日期,\n" +
" temp3.MaterialCode Sap编码,\n" +
" temp3.hqMaterialCode 客户物料号,\n" +
" temp3.EstimateTypeDesc 物料组,\n" +
" temp3.MaterialDesc 零件中文名称,\n" +
" isnull( TEMP2.Price, 0 ) AS 发货定价,\n" +
" temp3.UnHQAmt 金额,\n" +
" temp3.系统未结数量,\n" +
" temp3.UnHQQty 红旗未结数量,\n" +
" ( ISNULL( temp3.系统未结数量, 0 ) - ISNULL( temp3.UnHQQty, 0 ) ) 差异 \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
" * \n" +
" FROM\n" +
" (\n" +
" SELECT\n" +
" h.StorageLocation,\n" +
" h.StorageLocationDesc,\n" +
" h.HQHKanBan,\n" +
" h.AcceptanceNo,\n" +
" CONVERT ( VARCHAR ( 100 ), h.AcceptanceDate, 23 ) AcceptanceDate,\n" +
" m.MaterialCode,\n" +
" h.MaterialCode hqMaterialCode,\n" +
" m.CustomerPartCode,\n" +
" m.MaterialDesc,\n" +
" m.EstimateTypeDesc,\n" +
" ISNULL( h.Qty, 0 ) AS UnHQQty,\n" +
" ISNULL( h.Amt, 0 ) AS UnHQAmt \n" +
" FROM\n" +
" (\n" +
" SELECT SUM\n" +
" ( Qty ) Qty,\n" +
" Amt,\n" +
" HQHKanBan,\n" +
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" AcceptanceNo,\n" +
" MaterialCode,\n" +
" AcceptanceDate \n" +
" FROM\n" +
" Set_UnHQSettleAccount \n" +
" GROUP BY\n" +
" HQHKanBan,\n" +
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" AcceptanceNo,\n" +
" Amt,\n" +
" MaterialCode,\n" +
" AcceptanceDate \n" +
" ) AS h\n" +
" LEFT JOIN Set_material AS m ON h.MaterialCode = m.CustomerPartCode \n" +
" ) AS unhq\n" +
" LEFT JOIN (\n" +
" SELECT\n" +
" a.Kanban AS 订货看板编号,\n" +
" b.MaterialCode AS 订货零件号,\n" +
" c.MaterialCode Sap编码,\n" +
" c.CustomerPartCode 客户物料号,\n" +
" c.MaterialDesc AS 零件中文名称,\n" +
" isnull( a.Qty, 0 ) AS 系统未结数量,\n" +
" b.AcceptanceNo AS 结算验收单号,\n" +
" C.EstimateTypeDesc AS 物料组 \n" +
" FROM\n" +
" ( SELECT SUM ( Qty ) Qty, Kanban, MaterialCode FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode ) AS a\n" +
" LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n" +
" AND a.MaterialCode = b.MaterialCode\n" +
" LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" WHERE\n" +
" b.HQHKanBan IS NULL \n" +
" AND b.MaterialCode IS NULL \n" +
" ) AS temp1 ON unhq.HQHKanBan = temp1.[订货看板编号] \n" +
" AND unhq.CustomerPartCode= temp1.客户物料号 -- WHERE\n" +
"-- temp1.[订货看板编号] IS NULL\n" +
"-- AND temp1.客户物料号 IS NULL\n" +
" \n" +
" ) temp3\n" +
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp3.MaterialCode = TEMP2.MaterialCode";
" temp3.StorageLocation 收货仓库,\n" +
" temp3.StorageLocationDesc 收货仓库描述,\n" +
" temp3.HQHKanBan 订货看板编号,\n" +
" temp3.ExternalKanbanNumber 外部验收单号,\n" +
" temp3.AcceptanceDate 验收单日期,\n" +
" temp3.MaterialCode Sap编码,\n" +
" temp3.hqMaterialCode 客户物料号,\n" +
" temp3.EstimateTypeDesc 物料组,\n" +
" temp3.MaterialDesc 零件中文名称,\n" +
" isnull( TEMP2.Price, 0 ) AS 发货定价,\n" +
" temp3.UnHQAmt 金额,\n" +
" temp3.系统未结数量,\n" +
" temp3.UnHQQty 红旗未结数量,\n" +
" ( ISNULL( temp3.系统未结数量, 0 ) - ISNULL( temp3.UnHQQty, 0 ) ) 差异 \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
" * \n" +
" FROM\n" +
" (\n" +
" SELECT\n" +
" h.StorageLocation,\n" +
" h.StorageLocationDesc,\n" +
" h.HQHKanBan,\n" +
" h.ExternalKanbanNumber,\n" +
" CONVERT ( VARCHAR ( 100 ), h.AcceptanceDate, 23 ) AcceptanceDate,\n" +
" m.MaterialCode,\n" +
" h.MaterialCode hqMaterialCode,\n" +
" m.CustomerPartCode,\n" +
" m.MaterialDesc,\n" +
" m.EstimateTypeDesc,\n" +
" ISNULL( h.Qty, 0 ) AS UnHQQty,\n" +
" ISNULL( h.Amt, 0 ) AS UnHQAmt \n" +
" FROM\n" +
" (\n" +
" SELECT SUM\n" +
" ( Qty ) Qty,\n" +
" Amt,\n" +
" HQHKanBan,\n" +
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" ExternalKanbanNumber,\n" +
" MaterialCode,\n" +
" AcceptanceDate \n" +
" FROM\n" +
" Set_UnHQSettleAccount \n" +
" GROUP BY\n" +
" HQHKanBan,\n" +
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" ExternalKanbanNumber,\n" +
" Amt,\n" +
" MaterialCode,\n" +
" AcceptanceDate \n" +
" ) AS h\n" +
" LEFT JOIN Set_material AS m ON h.MaterialCode = m.CustomerPartCode \n" +
" ) AS unhq\n" +
" LEFT JOIN (\n" +
" SELECT\n" +
" a.Kanban AS 订货看板编号,\n" +
" b.MaterialCode AS 订货零件号,\n" +
" c.MaterialCode Sap编码,\n" +
" c.CustomerPartCode 客户物料号,\n" +
" c.MaterialDesc AS 零件中文名称,\n" +
" isnull( a.Qty, 0 ) AS 系统未结数量,\n" +
" b.ExternalKanbanNumber AS 外部验收单号,\n" +
" C.EstimateTypeDesc AS 物料组 \n" +
" FROM\n" +
" ( SELECT SUM ( Qty ) Qty, Kanban, MaterialCode FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode ) AS a\n" +
" LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n" +
" AND a.MaterialCode = b.MaterialCode\n" +
" LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" WHERE\n" +
" b.HQHKanBan IS NULL \n" +
" AND b.MaterialCode IS NULL \n" +
" ) AS temp1 ON unhq.HQHKanBan = temp1.[订货看板编号] \n" +
" AND unhq.CustomerPartCode= temp1.客户物料号 -- WHERE\n" +
"-- temp1.[订货看板编号] IS NULL\n" +
"-- AND temp1.客户物料号 IS NULL\n" +
" \n" +
" ) temp3\n" +
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp3.MaterialCode = TEMP2.MaterialCode";
var _sql = string.Format(str, condition);
@ -163,88 +163,88 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
var sql10 = "SELECT DISTINCT\n" +
" t1.* \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
" a.AcceptanceNo AS AcceptanceNo,\n" +
" a.KanbanNumber AS KanbanNumber,\n" +
" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
" HQHKanBan,\n" +
" b2.MaterialCode \n" +
" FROM\n" +
" Set_UnHQSettleAccount a\n" +
" LEFT JOIN Set_material b2 ON a.MaterialCode = b2.CustomerPartCode \n" +
" WHERE\n" +
" Version = '{0}' \n" +
" AND HQHKanBan <> 'BJ' \n" +
" ) t1\n" +
" LEFT JOIN (\n" +
" SELECT\n" +
" HQHKanBan,\n" +
" MaterialCode \n" +
" FROM\n" +
" Set_UnHQSettleAccount a \n" +
" WHERE\n" +
" Version = '{0}' \n" +
" AND HQHKanBan <> 'BJ' \n" +
" GROUP BY\n" +
" HQHKanBan,\n" +
" MaterialCode \n" +
" HAVING\n" +
" COUNT ( * ) > 1 \n" +
" ) t2 ON t1.HQHKanBan = t2.HQHKanBan \n" +
" AND t1.MaterialCode = t2.MaterialCode \n" +
"WHERE\n" +
" t2.HQHKanBan IS NULL";
" t1.* \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
" a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
" a.KanbanNumber AS KanbanNumber,\n" +
" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
" HQHKanBan,\n" +
" b2.MaterialCode \n" +
" FROM\n" +
" Set_UnHQSettleAccount a\n" +
" LEFT JOIN Set_material b2 ON a.MaterialCode = b2.CustomerPartCode \n" +
" WHERE\n" +
" Version = '{0}' \n" +
" AND HQHKanBan <> 'BJ' \n" +
" ) t1\n" +
" LEFT JOIN (\n" +
" SELECT\n" +
" HQHKanBan,\n" +
" MaterialCode \n" +
" FROM\n" +
" Set_UnHQSettleAccount a \n" +
" WHERE\n" +
" Version = '{0}' \n" +
" AND HQHKanBan <> 'BJ' \n" +
" GROUP BY\n" +
" HQHKanBan,\n" +
" MaterialCode \n" +
" HAVING\n" +
" COUNT ( * ) > 1 \n" +
" ) t2 ON t1.HQHKanBan = t2.HQHKanBan \n" +
" AND t1.MaterialCode = t2.MaterialCode \n" +
"WHERE\n" +
" t2.HQHKanBan IS NULL";
var list11 = DbConnection.Query<CompareExtend1>(string.Format(sql10, version));
var sql11 = "SELECT DISTINCT\n" +
" t1.* \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
" a.AcceptanceNo AS AcceptanceNo,\n" +
" a.KanbanNumber AS KanbanNumber,\n" +
" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
" HQHKanBan,\n" +
" b2.MaterialCode \n" +
" FROM\n" +
" Set_UnHQSettleAccount a\n" +
" LEFT JOIN Set_material b2 ON a.MaterialCode = b2.CustomerPartCode \n" +
" WHERE\n" +
" Version = '{0}' \n" +
" AND HQHKanBan <> 'BJ' \n" +
" ) t1\n" +
" INNER JOIN (\n" +
" SELECT\n" +
" HQHKanBan,\n" +
" MaterialCode \n" +
" FROM\n" +
" Set_UnHQSettleAccount a \n" +
" WHERE\n" +
" Version = '{0}' \n" +
" AND HQHKanBan <> 'BJ' \n" +
" GROUP BY\n" +
" HQHKanBan,\n" +
" MaterialCode \n" +
" HAVING\n" +
" COUNT ( * ) > 1 \n" +
" ) t2 ON t1.HQHKanBan = t2.HQHKanBan \n" +
" AND t1.MaterialCode = t2.MaterialCode \n" +
"ORDER BY\n" +
" t1.HQHKanBan,\n" +
" t1.MaterialCode";
" t1.* \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
" a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
" a.KanbanNumber AS KanbanNumber,\n" +
" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
" HQHKanBan,\n" +
" b2.MaterialCode \n" +
" FROM\n" +
" Set_UnHQSettleAccount a\n" +
" LEFT JOIN Set_material b2 ON a.MaterialCode = b2.CustomerPartCode \n" +
" WHERE\n" +
" Version = '{0}' \n" +
" AND HQHKanBan <> 'BJ' \n" +
" ) t1\n" +
" INNER JOIN (\n" +
" SELECT\n" +
" HQHKanBan,\n" +
" MaterialCode \n" +
" FROM\n" +
" Set_UnHQSettleAccount a \n" +
" WHERE\n" +
" Version = '{0}' \n" +
" AND HQHKanBan <> 'BJ' \n" +
" GROUP BY\n" +
" HQHKanBan,\n" +
" MaterialCode \n" +
" HAVING\n" +
" COUNT ( * ) > 1 \n" +
" ) t2 ON t1.HQHKanBan = t2.HQHKanBan \n" +
" AND t1.MaterialCode = t2.MaterialCode \n" +
"ORDER BY\n" +
" t1.HQHKanBan,\n" +
" t1.MaterialCode";
var list12 = DbConnection.Query<CompareExtend1>(string.Format(sql11, version));
var sql12 = "SELECT\n" +
" a.AcceptanceNo AS AcceptanceNo,\n" +
" a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
" a.KanbanNumber AS KanbanNumber,\n" +
" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
" HQHKanBan,\n" +
@ -267,7 +267,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
first.KanbanNumber += "," + itm.KanbanNumber;
first.AcceptanceDate += "," + itm.AcceptanceDate;
first.AcceptanceNo += "," + itm.AcceptanceNo;
first.ExternalKanbanNumber += "," + itm.ExternalKanbanNumber;
}
else
{
@ -336,7 +336,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
//itm1.看板编号 = itmcopy.KanbanNumber;
itm1. = itmcopy.AcceptanceDate;
itm1. = itmcopy.AcceptanceNo;
itm1. = itmcopy.ExternalKanbanNumber;
}
}
@ -370,14 +370,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
condition += string.Format(" and a.LastModificationTime<='{0}' ", end);
}
//按照客户财务要求 去掉结算验收单号换成外部验收单号
string str = "SELECT\n" +
" temp1.交货单号,\n" +
" temp1.交货时间,\n" +
" temp1.收货仓库,\n" +
" temp1.收货仓库描述,\n" +
" temp1.订货看板编号,\n" +
" temp1.结算验收单号,\n" +
" temp1.外部验收单号,\n" +
" temp1.Sap编码,\n" +
" temp1.[客户物料号],\n" +
" temp1.物料组,\n" +
@ -398,7 +398,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" c.CustomerPartCode 客户物料号,\n" +
" c.MaterialDesc AS 零件中文名称,\n" +
" isnull( a.Qty, 0 ) AS 系统未结数量,\n" +
" b.AcceptanceNo AS 结算验收单号,\n" +
" b.ExternalKanbanNumber AS 外部验收单号,\n" +
" C.EstimateTypeDesc AS 物料组 \n" +
" FROM\n" +
" ( SELECT SUM ( Qty ) AS Qty, Kanban, MaterialCode, WmsBillNum, LastModificationTime FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode, WmsBillNum, LastModificationTime ) AS a\n" +
@ -410,7 +410,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" AND b.MaterialCode IS NULL {0}\n" +
" ) AS temp1\n" +
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode\n" +
" LEFT JOIN ( SELECT SUM(Qty) Qty, HQHKanBan, MaterialCode FROM Set_UnHQSettleAccount GROUP BY HQHKanBan, MaterialCode ) temp3 ON temp1.[订货看板编号] = temp3.HQHKanBan \n" +
" LEFT JOIN ( SELECT SUM ( Qty ) Qty, HQHKanBan, MaterialCode FROM Set_UnHQSettleAccount GROUP BY HQHKanBan, MaterialCode ) temp3 ON temp1.[订货看板编号] = temp3.HQHKanBan \n" +
" AND temp1.[客户物料号] = temp3.MaterialCode";
var _sql = string.Format(str, condition);
@ -434,9 +434,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "订货看板编号")]
public string { set; get; }
[ExporterHeader(DisplayName = "结算验收单号")]
[ExporterHeader(DisplayName = "结算验收单号", IsIgnore = true)]
public string { set; get; }
[ExporterHeader(DisplayName = "外部验收单号")]
public string { set; get; }
[ExporterHeader(DisplayName = "Sap编码")]
public string Sap编码 { set; get; }

443
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs

@ -23,7 +23,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public class CompareExtend1
{
public string AcceptanceNo { set; get; }
public string ExternalKanbanNumber { set; get; }
public string KanbanNumber { set; get; }
public string AcceptanceDate { set; get; }
public string HQHKanBan { set; get; }
@ -88,7 +88,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" temp1.零件中文名称,\n" +
" temp1.发货数量,\n" +
" temp1.发货状态,\n" +
" temp1.结算验收单号,\n" +
" temp1.外部验收单号,\n" +
" temp1.结算数量,\n" +
" temp3.Price AS 结算单价,\n" +
" ( temp1.[结算数量] * ISNULL( temp3.Price, 0 ) ) AS 结算金额,\n" +
@ -113,7 +113,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" c.MaterialDesc AS 零件中文名称,\n" +
" isnull( b.Qty, 0 ) AS 发货数量,\n" +
" 2 AS 发货状态,\n" +
" a.[AcceptanceNo] AS 结算验收单号,\n" +
" a.[ExternalKanbanNumber] AS 外部验收单号,\n" +
" isnull( a.Qty, 0 ) AS 结算数量,\n" +
" C.EstimateTypeDesc AS 物料组,\n" +
" a.Factory AS 工厂,\n" +
@ -129,7 +129,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" Factory,\n" +
" AcceptanceNo \n" +
" ExternalKanbanNumber \n" +
" FROM\n" +
" Set_HQ_H_Platform \n" +
" GROUP BY\n" +
@ -139,7 +139,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" Factory,\n" +
" AcceptanceNo \n" +
" ExternalKanbanNumber \n" +
" ) AS a\n" +
" INNER JOIN ( SELECT SUM ( Qty ) AS Qty, Kanban, MaterialCode FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode ) AS b ON a.HQHKanBan = b.Kanban \n" +
" AND a.MaterialCode = b.MaterialCode\n" +
@ -227,7 +227,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
"FROM\n" +
" (\n" +
" SELECT\n" +
" a.AcceptanceNo AS AcceptanceNo,\n" +
" a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
" a.KanbanNumber AS KanbanNumber,\n" +
" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
" HQHKanBan,\n" +
@ -258,7 +258,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
"FROM\n" +
" (\n" +
" SELECT\n" +
" a.AcceptanceNo AS AcceptanceNo,\n" +
" a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
" a.KanbanNumber AS KanbanNumber,\n" +
" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
" HQHKanBan,\n" +
@ -283,7 +283,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
var sql12 = "SELECT\n" +
" a.AcceptanceNo AS AcceptanceNo,\n" +
" a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
" a.KanbanNumber AS KanbanNumber,\n" +
" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
" HQHKanBan,\n" +
@ -308,7 +308,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
first.KanbanNumber +="," +itm.KanbanNumber;
first.AcceptanceDate += "," + itm.AcceptanceDate;
first.AcceptanceNo += "," + itm.AcceptanceNo;
first.ExternalKanbanNumber += "," + itm.ExternalKanbanNumber;
}
else
{
@ -377,7 +377,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
itm1. = itmcopy.KanbanNumber;
itm1. = itmcopy.AcceptanceDate;
itm1. = itmcopy.AcceptanceNo;
itm1. = itmcopy.ExternalKanbanNumber;
}
}
@ -455,7 +455,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" c.MaterialDesc AS 零件中文名称,\n" +
" isnull( b.Qty, 0 ) AS 发货数量,\n" +
" isnull( b.State, 0 ) AS 发货状态,\n" +
" a.AcceptanceNo AS 结算验收单号,\n" +
" a.ExternalKanbanNumber AS 外部验收单号,\n" +
" isnull( a.Qty, 0 ) AS 结算数量,\n" +
" isnull( a.Price, 0 ) AS 结算单价,\n" +
" isnull( a.Amt, 0 ) AS 结算金额 ,\n" +
@ -518,7 +518,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" c.MaterialDesc AS 零件中文名称,\n" +
" 0 AS 发货数量,\n" +
" 0 AS 发货状态,\n" +
" a.AcceptanceNo AS 结算验收单号,\n" +
" a.ExternalKanbanNumber AS 结算验收单号,\n" +
" isnull( a.Qty, 0 ) AS 结算数量,\n" +
" C.EstimateTypeDesc AS 物料组,\n" +
" a.Factory AS 工厂,\n" +
@ -532,7 +532,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" Version,\n" +
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" Factory,AcceptanceNo \n" +
" Factory,ExternalKanbanNumber \n" +
" FROM\n" +
" Set_HQ_H_Platform \n" +
" WHERE\n" +
@ -542,7 +542,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" Version,\n" +
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" Factory,AcceptanceNo \n" +
" Factory,ExternalKanbanNumber \n" +
" ) AS a\n" +
" LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" WHERE\n" +
@ -565,62 +565,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ) AS TEMP3 ON temp1.[结算物料代码] = TEMP3.MaterialCode \n" +
" ) ccc";
//string str = "SELECT\n" +
// " temp1.交货时间,\n" +
// " isnull( temp1.手工或自动, '' ) 手工或自动,\n" +
// " isnull( temp1.交货单号, '' ) 交货单号,\n" +
// " temp1.[工厂],\n" +
// " temp1.收货仓库,\n" +
// " temp1.收货仓库描述,\n" +
// " temp1.订货看板编号,\n" +
// " temp1.订货零件号,\n" +
// " temp1.验收单日期,\n" +
// " temp1.Sap编码,\n" +
// " temp1.看板编号,\n" +
// " temp1.物料组,\n" +
// " temp1.零件中文名称,\n" +
// " temp1.发货数量,\n" +
// " temp1.发货状态,\n" +
// " temp1.结算验收单号,\n" +
// " temp1.结算数量,\n" +
// " temp1.结算单价,\n" +
// " temp1.结算金额,\n" +
// " isnull( TEMP2.Price, 0 ) AS 发货定价,\n" +
// " isnull( temp1.发货数量, 0 ) * isnull( TEMP2.Price, 0 ) AS 发货总金额,\n" +
// " 0 AS 数量差异,\n" +
// " temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" +
// " ( temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" +
// "FROM\n" +
// " (\n" +
// " SELECT\n" +
// " b.WmsBillNum AS 交货单号,\n" +
// " CONVERT ( VARCHAR ( 100 ), b.LastModificationTime, 23 ) AS 交货时间,\n" +
// " b.IsAuto AS 手工或自动,\n" +
// " a.StorageLocation AS 收货仓库,\n" +
// " a.StorageLocationDesc AS 收货仓库描述,\n" +
// " a.HQHKanBan AS 订货看板编号,\n" +
// " a.MaterialCode AS 订货零件号,\n" +
// " c.MaterialCode Sap编码,\n" +
// " c.MaterialDesc AS 零件中文名称,\n" +
// " isnull( b.Qty, 0 ) AS 发货数量,\n" +
// " isnull( b.State, 0 ) AS 发货状态,\n" +
// " a.AcceptanceNo AS 结算验收单号,\n" +
// " isnull( a.Qty, 0 ) AS 结算数量,\n" +
// " isnull( a.Price, 0 ) AS 结算单价,\n" +
// " isnull( a.Amt, 0 ) AS 结算金额 ,\n" +
// " C.EstimateTypeDesc AS 物料组,\n" +
// " a.Factory AS 工厂,\n" +
// " a.KanbanNumber AS 看板编号,\n" +
// " CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS 验收单日期 \n" +
// " FROM\n" +
// " Set_HQ_H_Platform AS a\n" +
// " LEFT OUTER JOIN Set_HQ_H_Kanban AS b ON a.HQHKanBan = b.Kanban \n" +
// " AND a.MaterialCode = b.MaterialCode\n" +
// " LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
// " WHERE\n" +
// " a.HQHKanBan <>'BJ' AND a.Version= '{0}' \n" +
// " ) AS temp1\n" +
// " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode WHERE temp1.[交货单号] is null ";
var _sql = string.Format(str, version);
var _query = DbConnection.Query<HQHSettledDetailDiff>(_sql, null, null, true, 1200, null);
@ -629,15 +574,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
}
/// <summary>
/// 反向对比,有发货无结算报表
/// </summary>
/// <param name="version"></param>
/// <param name="materialCode"></param>
/// <param name="begin"></param>
/// <param name="end"></param>
/// <param name="materialGroup"></param>
/// <returns></returns>
public virtual List<HQHUnSettledDetailDiff> GetReverseSettledDetailDiffReportList(string version, string materialCode, string begin, string end, string materialGroup)
{
@ -653,62 +591,124 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
condition += string.Format(" and a.LastModificationTime<='{0}' ", end);
}
//更改:按照财务要求,将有发货有结算中发货数量大于结算数据的数据整合到未结报表中20220324
string str = "SELECT\n" +
" temp1.交货时间,\n" +
" isnull( temp1.手工或自动, '' ) 手工或自动,\n" +
" isnull( temp1.交货单号, '' ) 交货单号,\n" +
" temp1.收货仓库,\n" +
" temp1.收货仓库描述,\n" +
" temp1.订货看板编号,\n" +
" temp1.订货零件号,\n" +
" temp1.Sap编码,\n" +
" temp1.[客户物料号],\n" +
" temp1.物料组,\n" +
" temp1.零件中文名称,\n" +
" temp1.发货数量,\n" +
" temp1.发货状态,\n" +
" temp1.结算验收单号,\n" +
" temp1.结算数量,\n" +
" temp1.结算单价,\n" +
" temp1.结算金额,\n" +
" isnull( TEMP2.Price, 0 ) AS 发货定价,\n" +
" isnull( temp1.发货数量, 0 ) * isnull( TEMP2.Price, 0 ) AS 发货总金额,\n" +
" isnull( tt.Qty, 0 ) 退货数量,\n" +
"isnull( temp1.发货数量, 0 )-isnull( tt.Qty, 0 ) AS 数量差异,\n" +
"temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" +
"(temp1.结算单价 - ISNULL( TEMP2.Price, 0 )) * (isnull( temp1.发货数量, 0 )-isnull( tt.Qty, 0 )) AS 差异总金额 \n" +
" * \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
" a.WmsBillNum AS 交货单号,\n" +
" CONVERT ( VARCHAR ( 100 ), a.LastModificationTime, 23 ) AS 交货时间 ,\n" +
" a.IsAuto AS 手工或自动,\n" +
" b.StorageLocation AS 收货仓库,\n" +
" b.StorageLocationDesc AS 收货仓库描述,\n" +
" a.Kanban AS 订货看板编号,\n" +
" b.MaterialCode AS 订货零件号,\n" +
" c.MaterialCode Sap编码,\n" +
" c.CustomerPartCode 客户物料号,\n" +
" c.MaterialDesc AS 零件中文名称,\n" +
" isnull( a.Qty, 0 ) AS 发货数量,\n" +
" isnull( a.State, 0 ) AS 发货状态,\n" +
" b.AcceptanceNo AS 结算验收单号,\n" +
" isnull( b.Qty, 0 ) AS 结算数量,\n" +
" isnull( b.Price, 0 ) AS 结算单价,\n" +
" isnull( b.Amt, 0 ) AS 结算金额 ,\n" +
" C.EstimateTypeDesc AS 物料组 \n" +
" temp1.交货时间,\n" +
" isnull( temp1.交货单号, '' ) 交货单号,\n" +
" temp1.收货仓库,\n" +
" temp1.收货仓库描述,\n" +
" temp1.订货看板编号,\n" +
" temp1.订货零件号,\n" +
" temp1.Sap编码,\n" +
" temp1.[客户物料号],\n" +
" temp1.物料组,\n" +
" temp1.零件中文名称,\n" +
" temp1.发货数量,\n" +
" temp1.发货状态,\n" +
" temp1.外部验收单号,\n" +
" temp1.结算数量,\n" +
" temp1.结算单价,\n" +
" temp1.结算金额,\n" +
" isnull( TEMP2.Price, 0 ) AS 发货定价,\n" +
" isnull( temp1.发货数量, 0 ) * isnull( TEMP2.Price, 0 ) AS 发货总金额,\n" +
" isnull( tt.Qty, 0 ) 退货数量,\n" +
" isnull( temp1.发货数量, 0 ) - isnull( tt.Qty, 0 ) AS 数量差异,\n" +
" temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" +
" ( temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) ) * ( isnull( temp1.发货数量, 0 ) - isnull( tt.Qty, 0 ) ) AS 差异总金额 \n" +
" FROM\n" +
" Set_HQ_H_Kanban AS a\n" +
" LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n" +
" AND a.MaterialCode = b.MaterialCode\n" +
" LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" WHERE\n" +
" b.HQHKanBan IS NULL \n" +
" AND b.MaterialCode IS NULL {0}\n" +
" ) AS temp1\n" +
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode \n" +
" left join set_backQty tt on temp1.Sap编码 = tt.MaterialCode and temp1.订货看板编号 = tt.Code ";
" (\n" +
" SELECT\n" +
" a.WmsBillNum AS 交货单号,\n" +
" CONVERT ( VARCHAR ( 100 ), a.LastModificationTime, 23 ) AS 交货时间 ,\n" +
" b.StorageLocation AS 收货仓库,\n" +
" b.StorageLocationDesc AS 收货仓库描述,\n" +
" a.Kanban AS 订货看板编号,\n" +
" b.MaterialCode AS 订货零件号,\n" +
" c.MaterialCode Sap编码,\n" +
" c.CustomerPartCode 客户物料号,\n" +
" c.MaterialDesc AS 零件中文名称,\n" +
" isnull( a.Qty, 0 ) AS 发货数量,\n" +
" isnull( a.State, 0 ) AS 发货状态,\n" +
" b.ExternalKanbanNumber AS 外部验收单号,\n" +
" isnull( b.Qty, 0 ) AS 结算数量,\n" +
" isnull( b.Price, 0 ) AS 结算单价,\n" +
" isnull( b.Amt, 0 ) AS 结算金额 ,\n" +
" C.EstimateTypeDesc AS 物料组 \n" +
" FROM\n" +
" Set_HQ_H_Kanban AS a\n" +
" LEFT OUTER JOIN Set_HQ_H_Platform AS b ON a.Kanban = b.HQHKanBan \n" +
" AND a.MaterialCode = b.MaterialCode\n" +
" LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" WHERE\n" +
" b.HQHKanBan IS NULL \n" +
" AND b.MaterialCode IS NULL {0}\n" +
" ) AS temp1\n" +
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode\n" +
" LEFT JOIN set_backQty tt ON temp1.Sap编码 = tt.MaterialCode \n" +
" AND temp1.订货看板编号 = tt.Code \n" +
" ) UNION1 UNION ALL\n" +
"SELECT\n" +
" * \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
" temp1.交货时间,\n" +
" isnull( temp1.交货单号, '' ) 交货单号,\n" +
" temp1.收货仓库,\n" +
" temp1.收货仓库描述,\n" +
" temp1.订货看板编号,\n" +
" temp1.订货零件号,\n" +
" temp1.Sap编码,\n" +
" temp1.[客户物料号],\n" +
" temp1.物料组,\n" +
" temp1.零件中文名称,\n" +
" temp1.发货数量,\n" +
" temp1.发货状态,\n" +
" temp1.外部验收单号,\n" +
" temp1.结算数量,\n" +
" temp1.结算单价,\n" +
" temp1.结算金额,\n" +
" isnull( TEMP2.Price, 0 ) AS 发货定价,\n" +
" isnull( temp1.发货数量, 0 ) * isnull( TEMP2.Price, 0 ) AS 发货总金额,\n" +
" isnull( tt.Qty, 0 ) 退货数量,\n" +
" isnull( temp1.发货数量, 0 ) - isnull( temp1.结算数量, 0 ) AS 数量差异,\n" +
" temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" +
" ( temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) ) * ( isnull( temp1.发货数量, 0 ) - isnull( tt.Qty, 0 ) ) AS 差异总金额 \n" +
" FROM\n" +
" (\n" +
" SELECT\n" +
" a.WmsBillNum AS 交货单号,\n" +
" CONVERT ( VARCHAR ( 100 ), a.LastModificationTime, 23 ) AS 交货时间 ,\n" +
" '' AS 收货仓库,\n" +
" '' AS 收货仓库描述,\n" +
" a.Kanban AS 订货看板编号,\n" +
" b.MaterialCode AS 订货零件号,\n" +
" c.MaterialCode Sap编码,\n" +
" c.CustomerPartCode 客户物料号,\n" +
" c.MaterialDesc AS 零件中文名称,\n" +
" isnull( a.Qty, 0 ) AS 发货数量,\n" +
" 0 AS 发货状态,\n" +
" '' AS 外部验收单号,\n" +
" isnull( b.Qty, 0 ) AS 结算数量,\n" +
" 0 AS 结算单价,\n" +
" 0 AS 结算金额 ,\n" +
" C.EstimateTypeDesc AS 物料组 \n" +
" FROM\n" +
" ( SELECT SUM ( Qty ) Qty, Kanban, MaterialCode, WmsBillNum, LastModificationTime FROM Set_HQ_H_Kanban GROUP BY kanban, MaterialCode, WmsBillNum, LastModificationTime ) AS a\n" +
" INNER JOIN ( SELECT SUM ( Qty ) Qty, HQHKanBan, MaterialCode FROM Set_HQ_H_Platform GROUP BY HQHKanBan, MaterialCode ) AS b ON a.Kanban = b.HQHKanBan \n" +
" AND a.MaterialCode = b.MaterialCode\n" +
" LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" WHERE\n" +
" a.Qty> b.Qty {0}\n" +
" ) AS temp1\n" +
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode\n" +
" LEFT JOIN set_backQty tt ON temp1.Sap编码 = tt.MaterialCode \n" +
" AND temp1.订货看板编号 = tt.Code \n" +
" ) UNION2";
var _sql = string.Format(str, condition);
var _query = DbConnection.Query<HQHUnSettledDetailDiff>(_sql, null, null, true, 1200, null);
@ -718,126 +718,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
}
///// <summary>
///// 反向对比,有发货无结算报表
///// </summary>
///// <param name="version"></param>
///// <param name="materialCode"></param>
///// <param name="begin"></param>
///// <param name="end"></param>
///// <param name="materialGroup"></param>
///// <returns></returns>
//public virtual List<HQHSettledDetailDiff> GetReverseSettledDetailDiffReportList(string version, string materialCode, string begin, string end, string materialGroup)
//{
// List<HQHSettledDetailDiff> _list = new List<HQHSettledDetailDiff>();
// string condition = " ";
// string str = "SELECT\n" +
// " isnull( temp1.交货单号, '' ) 交货单号,\n" +
// " temp1.交货时间,\n" +
// " isnull( temp1.手工或自动, '' ) 手工或自动,\n" +
// " temp1.[工厂],\n" +
// " temp1.收货仓库,\n" +
// " temp1.收货仓库描述,\n" +
// " temp1.订货看板编号,\n" +
// " temp1.订货零件号,\n" +
// " temp1.验收单日期,\n" +
// " temp1.Sap编码,\n" +
// " temp1.看板编号,\n" +
// " temp1.物料组,\n" +
// " temp1.零件中文名称,\n" +
// " temp1.发货数量,\n" +
// " temp1.发货状态,\n" +
// " temp1.结算验收单号,\n" +
// " temp1.结算数量,\n" +
// " temp3.Price AS 结算单价,\n" +
// " ( temp1.[结算数量] * ISNULL( temp3.Price, 0 ) ) AS 结算金额,\n" +
// " isnull( TEMP2.Price, 0 ) AS 发货定价,\n" +
// " isnull( temp1.发货数量, 0 ) * isnull( TEMP2.Price, 0 ) AS 发货总金额,\n" +
// " ( isnull( temp1.发货数量, 0 ) - isnull( temp1.[结算数量], 0 ) ) AS 数量差异,\n" +
// " ISNULL( temp3.Price, 0 ) - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" +
// " ( ISNULL( temp3.Price, 0 ) - ISNULL( TEMP2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" +
// "FROM\n" +
// " (\n" +
// " SELECT\n" +
// " '' AS 交货单号,\n" +
// " NULL AS 交货时间,\n" +
// " '' AS 手工或自动,\n" +
// " b.StorageLocation AS 收货仓库,\n" +
// " b.StorageLocationDesc AS 收货仓库描述,\n" +
// " a.Kanban AS 订货看板编号,\n" +
// " a.MaterialCode AS 订货零件号,\n" +
// " c.MaterialCode Sap编码,\n" +
// " a.MaterialCode 结算物料代码,\n" +
// " c.MaterialDesc AS 零件中文名称,\n" +
// " isnull( a.Qty, 0 ) AS 发货数量,\n" +
// " 0 AS 发货状态,\n" +
// " '' AS 结算验收单号,\n" +
// " isnull( b.Qty, 0 ) AS 结算数量,\n" +
// " C.EstimateTypeDesc AS 物料组,\n" +
// " b.Factory AS 工厂,\n" +
// " '' AS 看板编号,\n" +
// " '' AS 验收单日期 \n" +
// " FROM\n" +
// " (\n" +
// " SELECT SUM ( Qty ) AS Qty, Kanban, MaterialCode FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode\n" +
// " ) AS a\n" +
// " LEFT JOIN \n" +
// " ( \n" +
// " SELECT SUM\n" +
// " ( Qty ) AS Qty,\n" +
// " HQHKanBan,\n" +
// " MaterialCode,\n" +
// " Version,\n" +
// " StorageLocation,\n" +
// " StorageLocationDesc,\n" +
// " Factory \n" +
// " FROM\n" +
// " Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ'\n" +
// " GROUP BY\n" +
// " HQHKanBan,\n" +
// " MaterialCode,\n" +
// " Version,\n" +
// " StorageLocation,\n" +
// " StorageLocationDesc,\n" +
// " Factory\n" +
// " \n" +
// " ) AS b \n" +
// " ON a.Kanban = b.HQHKanBan \n" +
// " AND a.MaterialCode = b.MaterialCode\n" +
// " LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
// " WHERE\n" +
// " b.HQHKanBan is NULL \n" +
// " AND b.MaterialCode is NULL \n" +
// " ) AS temp1\n" +
// " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode\n" +
// " LEFT JOIN (\n" +
// " SELECT SUM\n" +
// " ( Amt ) / SUM ( Qty ) AS Price,\n" +
// " HQHKanBan,\n" +
// " MaterialCode,\n" +
// " Version \n" +
// " FROM\n" +
// " Set_HQ_H_Platform \n" +
// " WHERE\n" +
// " HQHKanBan <> 'BJ' \n" +
// " GROUP BY\n" +
// " HQHKanBan,\n" +
// " MaterialCode,\n" +
// " Version \n" +
// " ) AS TEMP3 ON temp1.[结算物料代码] = TEMP3.MaterialCode \n" +
// " AND temp1.订货看板编号 = TEMP3.HQHKanBan";
// var _sql = string.Format(str, version, condition);
// var _query = DbConnection.Query<HQHSettledDetailDiff>(_sql, null, null, true, 1200, null);
// return _list;
//}
public virtual List<HQHSettleQtyDiff> GetDiffQtyList(string version)
@ -901,7 +782,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" C.EstimateTypeDesc 物料组,\n" +
" C.MaterialCode Sap编码,\n" +
" C.MaterialDesc 零件中文名称,\n" +
" a.[AcceptanceNo] AS 结算验收单号,\n" +
" a.[ExternalKanbanNumber] AS 外部验收单号,\n" +
" a.Factory AS 工厂,\n" +
" a.HQHKanBan AS 订货看板编号,\n" +
" a.AcceptanceDate 验收单日期,\n" +
@ -915,7 +796,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" Factory,\n" +
" AcceptanceNo,\n" +
" ExternalKanbanNumber,\n" +
" Price,\n" +
" HQHKanBan,\n" +
" CONVERT ( VARCHAR ( 100 ), AcceptanceDate, 23 ) AcceptanceDate \n" +
@ -930,7 +811,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" Factory,\n" +
" AcceptanceNo,\n" +
" ExternalKanbanNumber,\n" +
" Price,\n" +
" HQHKanBan,\n" +
" AcceptanceDate \n" +
@ -939,51 +820,6 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ) temp1\n" +
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) AS Expr1 FROM Set_PriceList ) ) ) AS temp2 ON temp1.Sap编码 = temp2.MaterialCode";
//string str = "SELECT\n" +
//" temp1.*,\n" +
//" isnull( temp2.Price, 0 ) 销售单价,\n" +
//" ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异,\n" +
//" ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" +
//"FROM\n" +
//" (\n" +
//" SELECT\n" +
//" ISNULL( A.Price, 0 ) 结算单价,\n" +
//" ISNULL( A.Qty, 0 ) 结算数量,\n" +
//" ISNULL( A.Price, 0 ) * ISNULL( A.Qty, 0 ) 结算金额,\n" +
//" A.MaterialCode 结算物料号,\n" +
//" A.StorageLocation 收货仓库,\n" +
//" A.StorageLocationDesc 收货仓库描述,\n" +
//" a.[AcceptanceNo] AS 结算验收单号,\n" +
//" C.EstimateTypeDesc 物料组,\n" +
//" C.MaterialCode Sap编码,\n" +
//" C.MaterialDesc 零件中文名称,\n" +
//" 0 寄销库数量 \n" +
//" FROM\n" +
//" (\n" +
//" SELECT\n" +
//" Price,\n" +
//" SUM ( Qty ) Qty,\n" +
//" MaterialCode,\n" +
//" StorageLocation,\n" +
//" StorageLocationDesc,\n" +
//" AcceptanceNo \n" +
//" FROM\n" +
//" Set_HQ_H_Platform \n" +
//" WHERE\n" +
//" version = '{0}' \n" +
//" AND HQHKanBan = 'BJ' \n" +
//" GROUP BY\n" +
//" MaterialCode,\n" +
//" StorageLocation,\n" +
//" StorageLocationDesc,\n" +
//" price,\n" +
//" AcceptanceNo \n" +
//" ) A\n" +
//" LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
//" ) temp1\n" +
//" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) AS Expr1 FROM Set_PriceList ) ) ) AS temp2 ON temp1.Sap编码 = temp2.MaterialCode";
// var _sql = string.Format(str, version, condition);
var _sql = string.Format(str, version);
var _query = DbConnection.Query<HQHSharePartSettledDetailDiff>(_sql, null, null, true, 1200, null);
@ -1198,8 +1034,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public decimal { set; get; }
[ExporterHeader(DisplayName = "发货状态")]
public string { set; get; }
[ExporterHeader(DisplayName = "结算验收单号")]
[ExporterHeader(DisplayName = "结算验收单号",IsIgnore =true)]
public string { set; get; }
[ExporterHeader(DisplayName = "外部验收单号")]
public string { set; get; }
[ExporterHeader(DisplayName = "结算数量")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "结算单价")]
@ -1266,9 +1106,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "验收单日期")]
public string { set; get; }
[ExporterHeader(DisplayName = "结算验收单号")]
[ExporterHeader(DisplayName = "结算验收单号",IsIgnore =true)]
public string { set; get; }
[ExporterHeader(DisplayName = "外部验收单号")]
public string { set; get; }
[ExporterHeader(DisplayName = "发货数量")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "发货状态", IsIgnore = true)]

Loading…
Cancel
Save