Browse Source

一次寄售功能

FoShanPG
44673626 3 years ago
parent
commit
ff88d76cd3
  1. 54
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/TaskListDto.cs
  2. 34
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsJitOutPutDetialDto.cs
  3. 13
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs
  4. 442
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs
  5. 19
      src/Modules/SettleAccount/src/SettleAccount.Application/ImportExcelCommon/ExportImporter.cs
  6. 56
      src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
  7. 84
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
  8. 105
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs
  9. 15
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs
  10. 4
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleKBWithCodeDapperReportRepository.cs
  11. 2
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs
  12. 82
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHUnSettledDetailDiffExportService.cs
  13. 5
      src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

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

@ -429,6 +429,60 @@ namespace Win.Sfs.SettleAccount.Entities
} }
/// <summary>
///一次性寄售销售出库单
/// </summary>
public class WmsOneTimeSaleOutPutDetialDto
{
[ImporterHeader(Name = "单据类型", IsIgnore = true)]
[ExporterHeader(DisplayName = "单据类型", IsIgnore = true)]
public string Type { 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 string Version { set; get; }
[ImporterHeader(Name = "是否备件")]
[ExporterHeader(DisplayName = "是否备件")]
public string IsBack { set; get; }
[ImporterHeader(Name = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")]
public decimal Qty { set; get; }
[ImporterHeader(Name = "寄售库存数量", IsIgnore = true)]
[ExporterHeader(DisplayName = "寄售库存数量", IsIgnore = true)]
public decimal SockQty { set; get; }
[ImporterHeader(Name = "真实数量", IsIgnore = true)]
[ExporterHeader(DisplayName = "真实数量", IsIgnore = true)]
public decimal RealityNumber { set; get; }
[ImporterHeader(Name = "出库数量", IsIgnore = true)]
[ExporterHeader(DisplayName = "出库数量", IsIgnore = true)]
public decimal OutputQty { set; get; }
[ImporterHeader(Name = "客户")]
[ExporterHeader(DisplayName = "客户")]
public string Extend { set; get; }
[ImporterHeader(Name = "BillNum", IsIgnore = true)]
[ExporterHeader(DisplayName = "BillNum", IsIgnore = true)]
public string BillNum { set; get; }
[ImporterHeader(Name = "状态", IsIgnore = true)]
[ExporterHeader(DisplayName = "状态", IsIgnore = true)]
public int State { set; get; }
[ImporterHeader(Name = "开票单价")]
[ExporterHeader(DisplayName = "开票单价")]
public decimal Price { set; get; }
[ImporterHeader(Name = "开票金额")]
[ExporterHeader(DisplayName = "开票金额")]
public decimal Amt { set; get; }
}
/// <summary> /// <summary>
///一汽轿车出库单 ///一汽轿车出库单
/// </summary> /// </summary>

34
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsJitOutPutDetialDto.cs

@ -185,6 +185,40 @@ namespace Win.Sfs.SettleAccount.Entities.Wms
} }
public class WmsOneTimeSaleOutPutDetialRequestDto : RequestDtoBase
{
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "单号", IsIgnore = true)]
public string BillNum { set; get; }
[ImporterHeader(Name = "订单号")]
//底盘号
public string OrderBillNum { set; get; }
[ImporterHeader(Name = "物料号")]
//物料号
public string MaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
//物料组(车型)
public string MaterialGroup { set; get; }
}
public class WmsKanbanOutPutDetialRequestDto : RequestDtoBase public class WmsKanbanOutPutDetialRequestDto : RequestDtoBase
{ {
[ImporterHeader(Name = "交货单号")] [ImporterHeader(Name = "交货单号")]

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

@ -255,7 +255,14 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
//var _list = _dapper.GetNoKanbanSettleDetail(input.Version); //var _list = _dapper.GetNoKanbanSettleDetail(input.Version);
ExportImporter _exportImporter = new ExportImporter(); ExportImporter _exportImporter = new ExportImporter();
var _list = await _exportImporter.ExtendExcelImport<WmsHQWithOutKanbanOutPutDetial>(files, _excelImportService); var _list = await _exportImporter.ExtendExcelOfSheetOneImport<WmsHQWithOutKanbanOutPutDetial>(files, _excelImportService);
if (_list == null || _list.Count == 0)
{
throw new BusinessException("导入模板数据不能为空!");
}
var stockList = _wmsDapper.GetSalesStock(); var stockList = _wmsDapper.GetSalesStock();
var query = from itm in _list var query = from itm in _list
join itm1 in stockList on itm.SapMaterialCode equals itm1.SapCode join itm1 in stockList on itm.SapMaterialCode equals itm1.SapCode
@ -267,12 +274,12 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
itm.SapMaterialCode, itm.SapMaterialCode,
itm.MaterialDesc, itm.MaterialDesc,
version, version,
string.Empty, itm.IsBack,//是否备件
string.Empty, string.Empty,
itm.Qty, itm.Qty,
tm1 == null ? 0 : tm1.Qty, tm1 == null ? 0 : tm1.Qty,
itm.Qty, itm.Qty,
string.Empty, itm.Extend,//存储客户信息
_billNum, _billNum,
0, 0,
0, 0,

442
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs

@ -0,0 +1,442 @@
using EFCore.BulkExtensions;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Caching;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Uow;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Win.Sfs.SettleAccount.Entities.Wms;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.Repository;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
using Win.Sfs.Shared.Filter;
using WY.NewJit.Extends.PaiGe.WMS;
namespace Win.Sfs.SettleAccount.Entities.WMS
{
[Route("api/settleaccount/WmsOneTimeSaleOutput")]
//[AllowAnonymous]
//[Authorize(SettleAccountPermissions.WMSJIT.Default)]
public class WmsOneTimeSaleOutputAppService : SettleAccountApplicationBase<WmsOneTimeSaleOutPutDetial>
{
private readonly ISettleAccountBranchEfCoreRepository<WmsOneTimeSaleOutPutDetial, Guid> _wmsRepository;
private readonly ISettleAccountBranchEfCoreRepository<WmsOneTimeSaleOutPut, Guid> _wmsVersionRepository;
private readonly KanbanUnSettledDapperRepository _dapper;
private readonly WMSEfCoreRepository<WmsKanbanOutPutDetial> _wmsefRespository;
private readonly WMSEfCoreRepository<TB_BILL> _wmstbRespository;
private readonly ISettleAccountBranchEfCoreRepository<TaskJob, Guid> _job;
private readonly IExcelImportAppService _excelImportService;
private readonly TaskJobService _service;
private readonly WmsDapperRepository _wmsDapper;
/// <summary>
///
/// </summary>
/// <param name="wmsRepository"></param>
/// <param name="job"></param>
/// <param name="wmsVersionRepository"></param>
/// <param name="wmsefRespository"></param>
/// <param name="wmstbRespository"></param>
public WmsOneTimeSaleOutputAppService(
IExcelImportAppService excelImportService,
ISettleAccountBranchEfCoreRepository<WmsOneTimeSaleOutPutDetial, Guid> wmsRepository,
ISettleAccountBranchEfCoreRepository<TaskJob, Guid> job,
ISettleAccountBranchEfCoreRepository<WmsOneTimeSaleOutPut, Guid> wmsVersionRepository,
WMSEfCoreRepository<WmsKanbanOutPutDetial> wmsefRespository,
KanbanUnSettledDapperRepository dapper,
WMSEfCoreRepository<TB_BILL> wmstbRespository,
IDistributedCache<WmsOneTimeSaleOutPutDetial> cache,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager,
WmsDapperRepository wmsDapper
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
_job = job;
_wmstbRespository = wmstbRespository;
_wmsRepository = wmsRepository;
_wmsVersionRepository = wmsVersionRepository;
_wmsefRespository = wmsefRespository;
_excelImportService = excelImportService;
_dapper = dapper;
_wmsDapper = wmsDapper;
}
private async Task<long> GetCountAsync(WmsOneTimeSaleOutPutDetialRequestDto input)
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
return await _wmsRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);
}
private async Task<long> GetCountAsync(WmsKanbanOutPutRequestDto input)
{
return await _wmsVersionRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);
}
/// <summary>
/// 准时化出库主表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsKanbanList")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsOneTimeSaleOutPut>> GetListAsync(WmsKanbanOutPutRequestDto input)
{
//input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
var entities = await _wmsVersionRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
return new PagedResultDto<WmsOneTimeSaleOutPut>(totalCount, entities);
}
/// <summary>
/// 准时化出库明细
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsKanbanDetailList")]
[UnitOfWork(false)]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsOneTimeSaleOutPutDetial>> GetListAsync(WmsOneTimeSaleOutPutDetialRequestDto input)
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var stockList = _wmsDapper.GetSalesStock();
var query = from itm in entities
join itm1 in stockList on itm.SapMaterialCode equals itm1.SapCode
into temp1
from tm1 in temp1.DefaultIfEmpty()
select new WmsOneTimeSaleOutPutDetial(
GuidGenerator.Create(),
"无看板发货",
itm.SapMaterialCode,
itm.MaterialDesc,
itm.Version,
itm.IsBack,
string.Empty,
itm.Qty,
tm1 == null ? 0 : tm1.Qty,
itm.Qty,
itm.Extend,
itm.BillNum,
itm.State,
itm.RealityNumber,
itm.Price,
itm.Amt
);
return new PagedResultDto<WmsOneTimeSaleOutPutDetial>(totalCount, entities);
}
/// <summary>
///更新备注
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet]
[Route("UpdateRemark")]
public async Task<bool> UpdateRemark(Guid id, string remark)
{
var entity = _wmsVersionRepository.FirstOrDefault(p => p.Id == id);
if (entity != null)
{
entity.Remark = remark;
await _wmsVersionRepository.UpdateAsync(entity);
}
return true;
}
/// <summary>
/// 任务明细标记已确认
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("WmsSharePartOutPutModify")]
[DisableRequestSizeLimit]
public async Task<bool> WmsSharePartUpdate(WmsOneTimeSaleOutPutDetial detial)
{
var _entityList = _wmsRepository.Where(p => p.Id == detial.BranchId).ToList();
if (_entityList.Count() > 0)
{
foreach (var itm in _entityList)
{
itm.OutputQty = detial.OutputQty;
await _wmsRepository.UpdateAsync(itm);
}
}
return true;
}
/// <summary>
/// 选择任务,生成出库单,只包含已确认的单据
/// </summary>
/// <param name="ids"></param>
/// <param name="version"></param>
/// <returns></returns>
[HttpPost]
[Route("ExcelImport")]
[UnitOfWork(false)]
public async Task<string> WmsKanbanOutPut([FromForm] IFormFileCollection files, string version)
{
var _billNum = "OTS" + DateTime.Now.ToString("yyyyMMddhhmmss");
//var _list = _dapper.GetNoKanbanSettleDetail(input.Version);
ExportImporter _exportImporter = new ExportImporter();
//只取导入模板第一个页签
var _list = await _exportImporter.ExtendExcelOfSheetOneImport<WmsOneTimeSaleOutPutDetial>(files, _excelImportService);
if (_list == null || _list.Count == 0)
{
throw new BusinessException("导入模板数据不能为空!");
}
////插入数据前检验
//var checkList = new List<ErrorExportDto>();
//var _group = _list.GroupBy(x => new { x.Qty,x.SapMaterialCode, x.Version }).Select(p => new { Count = p.Count(), Qty = p.Key.Qty, SapMaterialCode = p.Key.SapMaterialCode });
//foreach (var itm in _group)
//{
// if (itm.Qty==null)
// {
// checkList.Add(new ErrorExportDto(version, "OneTiemSale", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入的平台数据不是{0}平台的,请检查!", itm.Factory), string.Empty));
// break;
// }
//}
var stockList = _wmsDapper.GetSalesStock();
var query = from itm in _list
join itm1 in stockList on itm.SapMaterialCode equals itm1.SapCode
into temp1
from tm1 in temp1.DefaultIfEmpty()
select new WmsOneTimeSaleOutPutDetial(
GuidGenerator.Create(),
"无看板发货",
itm.SapMaterialCode,
itm.MaterialDesc,
version,
itm.IsBack,//是否备件
string.Empty,
itm.Qty,
tm1 == null ? 0 : tm1.Qty,
itm.Qty,
itm.Extend,//客户信息
_billNum,
0,
0,
itm.Price,
itm.Amt
);
await _wmsRepository.GetDbContext().BulkInsertAsync(query.ToList(), new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
int _count = _wmsVersionRepository.Count(p => p.Version == version && p.BillNum == _billNum);
if (_count == 0)
{
var _version = new WmsOneTimeSaleOutPut(GuidGenerator.Create(), version, _billNum, CurrentUser.Email);
await _wmsVersionRepository.InsertAsync(_version, true);
}
return ApplicationConsts.SuccessStr;
}
/// <summary>
/// 出库界面功能,核准出库功能
/// </summary>
/// <param name="version"></param>
/// <param name="p_list"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsKanbanOutPut-Pass")]
[UnitOfWork(false)]
public async Task<string> WmsKanbanOutPutPass(WmsJitRequestDto input)
{
if (input.Guids != null)
{
List<WmsOneTimeSaleOutPutDetial> _ls = new List<WmsOneTimeSaleOutPutDetial>();
if (input.Guids.Count() > 0)
{
_ls = await _wmsRepository.Where(p => input.Guids.Contains(p.Id) && p.Version == input.Version && p.BillNum == input.BillNum && p.State != 2).ToListAsync();
}
else
{
_ls = await _wmsRepository.Where(p => p.Version == input.Version && p.BillNum == input.BillNum && p.State != 2).ToListAsync();
}
//_ls = _ls.Where(p => p.SockQty < p.OutputQty || p.Qty < p.OutputQty).ToList();
//var checkList = new List<ErrorExportDto>();
//foreach (var itm in _ls)
//{
// checkList.Add(new ErrorExportDto() { Message = string.Format("物料号:{0}出库数量大于结算数量或寄售库存数量!",itm.SapMaterialCode) });
//}
//if (checkList.Count > 0)
//{
// return await ExportErrorReportAsync(checkList,"校验失败.xlsx");
//}
if (_ls.Count() > 0)
{
var sql = "DECLARE @return_value int\n" +
"EXEC @return_value = [dbo].[p_wms_ou" +
"tput]\n" +
" @billnum = N'{0}',\n" +
" @type = 21,\n" +
" @date = N'{1}'\n" +
"SELECT 'Return Value' = @return_value";
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
string.Format(sql, input.BillNum, input.AccountDate.ToShortDateString()));
}
}
return ApplicationConsts.SuccessStr;
}
/// <summary>
///出库界面功能, 撤销核准出库
/// </summary>
/// <param name="ids"></param>
/// <param name="version"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsKanbanOutPut-Cancel")]
public async Task<bool> WmsKanbanOutPutCancel(WmsJitRequestDto input)
{
if (input.Guids != null && input.Guids.Count() > 0)
{
List<string> _ls = new List<string>();
foreach (var itm in input.Guids)
{
_ls.Add(string.Format("{0}", itm));
}
string str = string.Join(",", _ls.ToArray());
var sql = "DECLARE @return_value int\n" +
"EXEC @return_value = [dbo].[p_wms_output_cancel]\n" +
" @Guids ='{0}', \n" +
" @billnum = N'{1}',\n" +
" @type = 21,\n" +
" @accountdate = N'{2}'\n" +
"SELECT 'Return Value' = @return_value";
sql = string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString());
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
sql
);
}
return true;
}
/// <summary>
/// 出库界面功能删除
/// </summary>
/// <param name="version"></param>
/// <param name="p_list"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsOutPutDelete")]
[UnitOfWork(false)]
public async Task<bool> WmsOutPutDelete(WmsJitRequestDto input)
{
var count = _wmsRepository.Count(p => p.BillNum == input.BillNum && p.State != 0);
if (count > 0)
{
return false;
}
var sql = "DECLARE @return_value int\n" +
"EXEC @return_value = [dbo].[p_wms_output_cancel_all]\n" +
" @billnum = N'{0}',\n" +
" @type = 21\n" +
"SELECT 'Return Value' = @return_value";
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
string.Format(sql, input.BillNum)
);
return true;
}
/// <summary>
/// 导出
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("Export")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<string> ExportAsync(WmsOneTimeSaleOutPutDetialRequestDto input)
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, int.MaxValue,
0, true);
var dtos = ObjectMapper.Map<List<WmsOneTimeSaleOutPutDetial>, List<WmsOneTimeSaleOutPutDetialDto>>(entities);
IExporter _excel = new ExcelExporter();
byte[] result = null;
var _fileName = string.Format("一次性寄售销售出库单_{0}.xlsx", Guid.NewGuid().ToString());
result = await _excel.ExportAsByteArray(dtos);
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
Name = _fileName,
Content = result
}
);
return _fileName;
}
// 物料 物料组 物料描述 物料号 期间 单位 出库数量 结算数量
}
}

19
src/Modules/SettleAccount/src/SettleAccount.Application/ImportExcelCommon/ExportImporter.cs

@ -469,21 +469,4 @@ public class GetSetting
/// 返回错误信息 /// 返回错误信息
/// </summary> /// </summary>
public string errMessage { get; set; } public string errMessage { get; set; }
} }

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

@ -683,35 +683,35 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
} }
///// <summary> /// <summary>
/////红旗工厂未结明细 ///红旗工厂未结明细
///// </summary> /// </summary>
///// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param> /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
///// <returns></returns> /// <returns></returns>
//[HttpPost] [HttpPost]
//[Route("HQHUnSettledDetailDiffExportService")] [Route("HQHUnSettledDetailDiffExportService")]
//[DisableRequestSizeLimit] [DisableRequestSizeLimit]
//public async Task<string> HQHUnSettledDetailDiffExportServiceMake( public async Task<string> HQHUnSettledDetailDiffExportServiceMake(
// HQKanbanRequestDto input HQKanbanRequestDto input
// ) )
//{ {
// List<CustomCondition> customConditionList = new List<CustomCondition>(); List<CustomCondition> customConditionList = new List<CustomCondition>();
// customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version }); customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
// customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode }); customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
// customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin }); customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
// customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End }); customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
// customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode }); customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
// customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo }); customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
// customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc }); customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
// customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban }); 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 = "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 }); customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
// var _taskid = await _service.ExportEnqueueAsync("红旗工厂未结明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQHSettledDetailDiffExportService), customConditionList, (rs) => var _taskid = await _service.ExportEnqueueAsync("红旗工厂未结明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQHUnSettledDetailDiffExportService), customConditionList, (rs) =>
// { {
// }); });
// return _taskid; return _taskid;
//} }
/// <summary> /// <summary>
/// 红旗工厂备件明细 /// 红旗工厂备件明细

84
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml

@ -3344,6 +3344,83 @@
<param name="input"></param> <param name="input"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WmsOneTimeSaleOutputAppService.#ctor(Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsOneTimeSaleOutPutDetial,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.TaskJob,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsOneTimeSaleOutPut,System.Guid},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsKanbanOutPutDetial},Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report.KanbanUnSettledDapperRepository,Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{WY.NewJit.Extends.PaiGe.WMS.TB_BILL},Volo.Abp.Caching.IDistributedCache{Win.Sfs.SettleAccount.Entities.WMS.WmsOneTimeSaleOutPutDetial},Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.CommonManagers.ICommonManager,Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report.WmsDapperRepository)">
<summary>
</summary>
<param name="wmsRepository"></param>
<param name="job"></param>
<param name="wmsVersionRepository"></param>
<param name="wmsefRespository"></param>
<param name="wmstbRespository"></param>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WmsOneTimeSaleOutputAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsKanbanOutPutRequestDto)">
<summary>
准时化出库主表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WmsOneTimeSaleOutputAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsOneTimeSaleOutPutDetialRequestDto)">
<summary>
准时化出库明细
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WmsOneTimeSaleOutputAppService.UpdateRemark(System.Guid,System.String)">
<summary>
更新备注
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WmsOneTimeSaleOutputAppService.WmsSharePartUpdate(Win.Sfs.SettleAccount.Entities.WMS.WmsOneTimeSaleOutPutDetial)">
<summary>
任务明细标记已确认
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WmsOneTimeSaleOutputAppService.WmsKanbanOutPut(Microsoft.AspNetCore.Http.IFormFileCollection,System.String)">
<summary>
选择任务,生成出库单,只包含已确认的单据
</summary>
<param name="ids"></param>
<param name="version"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WmsOneTimeSaleOutputAppService.WmsKanbanOutPutPass(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
出库界面功能,核准出库功能
</summary>
<param name="version"></param>
<param name="p_list"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WmsOneTimeSaleOutputAppService.WmsKanbanOutPutCancel(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
出库界面功能, 撤销核准出库
</summary>
<param name="ids"></param>
<param name="version"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WmsOneTimeSaleOutputAppService.WmsOutPutDelete(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
出库界面功能删除
</summary>
<param name="version"></param>
<param name="p_list"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WmsOneTimeSaleOutputAppService.ExportAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsOneTimeSaleOutPutDetialRequestDto)">
<summary>
导出
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WMSSharePart90AppService.#ctor(Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsSharePart90OutPutDetial,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.TaskJob,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsSharePart90OutPut,System.Guid},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsSharePart90OutPutDetial},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{WY.NewJit.Extends.PaiGe.WMS.TB_BILL},Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Volo.Abp.Caching.IDistributedCache{Win.Sfs.SettleAccount.Entities.WMS.WmsSharePart90OutPutDetial},Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report.WmsDapperRepository,Win.Sfs.SettleAccount.CommonManagers.ICommonManager)"> <member name="M:Win.Sfs.SettleAccount.Entities.WMS.WMSSharePart90AppService.#ctor(Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsSharePart90OutPutDetial,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.TaskJob,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsSharePart90OutPut,System.Guid},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsSharePart90OutPutDetial},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{WY.NewJit.Extends.PaiGe.WMS.TB_BILL},Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Volo.Abp.Caching.IDistributedCache{Win.Sfs.SettleAccount.Entities.WMS.WmsSharePart90OutPutDetial},Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report.WmsDapperRepository,Win.Sfs.SettleAccount.CommonManagers.ICommonManager)">
<summary> <summary>
@ -4100,6 +4177,13 @@
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param> <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.HQHUnSettledDetailDiffExportServiceMake(Win.Sfs.SettleAccount.Reports.ReportRequestDto.HQKanbanRequestDto)">
<summary>
红旗工厂未结明细
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.HQHSharePartSettledDetailDiffExportServiceMake(Win.Sfs.SettleAccount.Reports.ReportRequestDto.HQKanbanRequestDto)"> <member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.HQHSharePartSettledDetailDiffExportServiceMake(Win.Sfs.SettleAccount.Reports.ReportRequestDto.HQKanbanRequestDto)">
<summary> <summary>
红旗工厂备件明细 红旗工厂备件明细

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

@ -660,12 +660,117 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
} }
#region 一次性寄售销售结算主表
/// <summary>
/// 一次性寄售销售结算主表
/// </summary>
public class WmsOneTimeSaleOutPut : FullAuditedAggregateRootBase<Guid>
{
public WmsOneTimeSaleOutPut()
{
}
public WmsOneTimeSaleOutPut(Guid id, string version, string billNum, string creator) : base(id)
{
Id = id;
Version = version;
BillNum = billNum;
Creator = creator;
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
/// <summary>
/// 一次性寄售销售从表
/// </summary>
public class WmsOneTimeSaleOutPutDetial : FullAuditedAggregateRootBase<Guid>
{
public WmsOneTimeSaleOutPutDetial()
{
}
public WmsOneTimeSaleOutPutDetial(Guid id, string type, string sapMaterialCode, string materialDesc, string version, string isBack, string remark, decimal qty, decimal sockQty, decimal outputQty, string extend, string billnum, int state, decimal realqty, decimal price, decimal amt) : base(id)
{
Type = type;
SapMaterialCode = sapMaterialCode;
MaterialDesc = materialDesc;
Version = version;
IsBack = isBack;
Remark = remark;
Qty = qty;
SockQty = sockQty;
OutputQty = outputQty;
Extend = extend;
BillNum = billnum;
State = state;
RealityNumber = realqty;
Price = price;
Amt = amt;
}
[ImporterHeader(Name = "单据类型", IsIgnore = true)]
[ExporterHeader(DisplayName = "单据类型", IsIgnore = true)]
public string Type { 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 string Version { set; get; }
[ImporterHeader(Name = "是否备件")]
[ExporterHeader(DisplayName = "是否备件")]
public string IsBack { set; get; }
[ImporterHeader(Name = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")]
public decimal Qty { set; get; }
[ImporterHeader(Name = "寄售库存数量", IsIgnore = true)]
[ExporterHeader(DisplayName = "寄售库存数量", IsIgnore = true)]
public decimal SockQty { set; get; }
[ImporterHeader(Name = "真实数量", IsIgnore = true)]
[ExporterHeader(DisplayName = "真实数量", IsIgnore = true)]
public decimal RealityNumber { set; get; }
[ImporterHeader(Name = "出库数量", IsIgnore = true)]
[ExporterHeader(DisplayName = "出库数量", IsIgnore = true)]
public decimal OutputQty { set; get; }
[ImporterHeader(Name = "客户")]
[ExporterHeader(DisplayName = "客户")]
public string Extend { set; get; }
[ImporterHeader(Name = "BillNum", IsIgnore = true)]
[ExporterHeader(DisplayName = "BillNum", IsIgnore = true)]
public string BillNum { set; get; }
[ImporterHeader(Name = "状态", IsIgnore = true)]
[ExporterHeader(DisplayName = "状态", IsIgnore = true)]
public int State { set; get; }
[ImporterHeader(Name = "开票单价")]
[ExporterHeader(DisplayName = "开票单价")]
public decimal Price { set; get; }
[ImporterHeader(Name = "开票金额")]
[ExporterHeader(DisplayName = "开票金额")]
public decimal Amt { set; get; }
}
#endregion

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

@ -841,6 +841,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" temp1.订货看板编号,\n" + " temp1.订货看板编号,\n" +
" temp1.订货零件号,\n" + " temp1.订货零件号,\n" +
" temp1.Sap编码,\n" + " temp1.Sap编码,\n" +
" temp1.[客户物料号],\n" +
" temp1.发货零件号,\n" + " temp1.发货零件号,\n" +
" temp1.物料组,\n" + " temp1.物料组,\n" +
" temp1.零件中文名称,\n" + " temp1.零件中文名称,\n" +
@ -863,9 +864,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" a.IsAuto AS 手工或自动,\n" + " a.IsAuto AS 手工或自动,\n" +
" b.StorageLocation AS 收货仓库,\n" + " b.StorageLocation AS 收货仓库,\n" +
" b.StorageLocationDesc AS 收货仓库描述,\n" + " b.StorageLocationDesc AS 收货仓库描述,\n" +
" b.HQHKanBan AS 订货看板编号,\n" + " a.Kanban AS 订货看板编号,\n" +
" b.MaterialCode AS 订货零件号,\n" + " b.MaterialCode AS 订货零件号,\n" +
" c.MaterialCode Sap编码,\n" + " c.MaterialCode Sap编码,\n" +
" c.CustomerPartCode 客户物料号,\n" +
" '' AS 发货零件号,\n" + " '' AS 发货零件号,\n" +
" c.MaterialDesc AS 零件中文名称,\n" + " c.MaterialDesc AS 零件中文名称,\n" +
" isnull( a.Qty, 0 ) AS 发货数量,\n" + " isnull( a.Qty, 0 ) AS 发货数量,\n" +
@ -1073,6 +1075,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" A.MaterialCode 结算物料号,\n" + " A.MaterialCode 结算物料号,\n" +
" A.StorageLocation 收货仓库,\n" + " A.StorageLocation 收货仓库,\n" +
" A.StorageLocationDesc 收货仓库描述,\n" + " A.StorageLocationDesc 收货仓库描述,\n" +
" a.[AcceptanceNo] AS 结算验收单号,\n" +
" C.EstimateTypeDesc 物料组,\n" + " C.EstimateTypeDesc 物料组,\n" +
" C.MaterialCode Sap编码,\n" + " C.MaterialCode Sap编码,\n" +
" C.MaterialDesc 物料描述,\n" + " C.MaterialDesc 物料描述,\n" +
@ -1084,7 +1087,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" SUM ( Qty ) Qty,\n" + " SUM ( Qty ) Qty,\n" +
" MaterialCode,\n" + " MaterialCode,\n" +
" StorageLocation,\n" + " StorageLocation,\n" +
" StorageLocationDesc \n" + " StorageLocationDesc,\n" +
" AcceptanceNo \n" +
" FROM\n" + " FROM\n" +
" Set_HQ_H_Platform \n" + " Set_HQ_H_Platform \n" +
" WHERE\n" + " WHERE\n" +
@ -1094,7 +1098,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" MaterialCode,\n" + " MaterialCode,\n" +
" StorageLocation,\n" + " StorageLocation,\n" +
" StorageLocationDesc,\n" + " StorageLocationDesc,\n" +
" price \n" + " price,\n" +
" AcceptanceNo \n" +
" ) A\n" + " ) A\n" +
" LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + " LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" ) temp1\n" + " ) temp1\n" +
@ -1283,6 +1288,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public string { set; get; } public string { set; get; }
[ExporterHeader(DisplayName = "Sap编码")] [ExporterHeader(DisplayName = "Sap编码")]
public string Sap编码 { set; get; } public string Sap编码 { set; get; }
[ExporterHeader(DisplayName = "客户物料号")]
public string { set; get; }
[ExporterHeader(DisplayName = "物料组(车型)")] [ExporterHeader(DisplayName = "物料组(车型)")]
public string { set; get; } public string { set; get; }
[ExporterHeader(DisplayName = "发货数量")] [ExporterHeader(DisplayName = "发货数量")]

4
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleKBWithCodeDapperReportRepository.cs

@ -45,7 +45,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
string sqlString = "SELECT\n" + string sqlString = "SELECT\n" +
" * ,\n" + " * ,\n" +
" ISNULL( Price * Qty, 0 ) AS InvoiceMoney,--开票金额\n" + " ISNULL( temp1.InvoicePrice * Qty, 0 ) AS InvoiceMoney,--开票金额\n" +
" ISNULL( Price * WMSDeliveryQty, 0 ) AS Amount,--金额\n" + " ISNULL( Price * WMSDeliveryQty, 0 ) AS Amount,--金额\n" +
" ISNULL( Price * Qty, 0 ) AS SettlePrice,--结算金额\n" + " ISNULL( Price * Qty, 0 ) AS SettlePrice,--结算金额\n" +
" ( Price - InvoicePrice ) AS InvoiceDiffPrice,--单价差异\n" + " ( Price - InvoicePrice ) AS InvoiceDiffPrice,--单价差异\n" +
@ -65,7 +65,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" b.EstimateTypeDesc,--物料组(车型)\n" + " b.EstimateTypeDesc,--物料组(车型)\n" +
" c.WMSDeliveryQty,--交货数量\n" + " c.WMSDeliveryQty,--交货数量\n" +
" ISNULL( a.Qty, 0 ) AS SettleNumber,--结算数量\n" + " ISNULL( a.Qty, 0 ) AS SettleNumber,--结算数量\n" +
" a.SettleDate,--结算日期\n" + " CONVERT ( VARCHAR ( 100 ), a.SettleDate, 23 ) SettleDate,--结算日期\n" +
" ISNULL( a.Qty, 0 ) AS Qty,--用于计算\n" + " ISNULL( a.Qty, 0 ) AS Qty,--用于计算\n" +
" ( ISNULL( a.Qty, 0 ) - ISNULL( c.WMSDeliveryQty, 0 ) ) AS SettleWMSDiffQty,--结算与发货差异\n" + " ( ISNULL( a.Qty, 0 ) - ISNULL( c.WMSDeliveryQty, 0 ) ) AS SettleWMSDiffQty,--结算与发货差异\n" +
" 0 AS SettleInvoiceDiffQty,--结算与开票差异\n" + " 0 AS SettleInvoiceDiffQty,--结算与开票差异\n" +

2
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs

@ -63,7 +63,7 @@ namespace SettleAccount.Job.Services.Report
var _lsnoSettle = _dapperRepository.GetNOInvoiceSettledDetailDiffReportList(version, materialCode, begin, end, materialGroup); var _lsnoSettle = _dapperRepository.GetNOInvoiceSettledDetailDiffReportList(version, materialCode, begin, end, materialGroup);
//反向对比,有发货无结算,单独拿出去,财务要求 //反向对比,有发货无结算,单独拿出去,财务要求
var _reversels = _dapperRepository.GetReverseSettledDetailDiffReportList(version, materialCode, begin, end, materialGroup); //var _reversels = _dapperRepository.GetReverseSettledDetailDiffReportList(version, materialCode, begin, end, materialGroup);
var _lst = _dapperRepository.GetDiffQtyList(version); var _lst = _dapperRepository.GetDiffQtyList(version);

82
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHUnSettledDetailDiffExportService.cs

@ -64,47 +64,49 @@ namespace SettleAccount.Job.Services.Report
if (!string.IsNullOrEmpty(kanban)) //if (!string.IsNullOrEmpty(kanban))
{ //{
var _groupList = kanban.Split(new char[] { '\n' }).Distinct().ToList(); // var _groupList = kanban.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0) // if (_groupList.Count() > 0)
{ // {
_ls = _ls.Where(p => _groupList.Contains(p.)).ToList(); // _ls = _ls.Where(p => _groupList.Contains(p.订货看板编号)).ToList();
} // }
} //}
if (!string.IsNullOrEmpty(warehouseDesc))
{ //if (!string.IsNullOrEmpty(warehouseDesc))
var _groupList = warehouseDesc.Split(new char[] { '\n' }).Distinct().ToList(); //{
if (_groupList.Count() > 0) // var _groupList = warehouseDesc.Split(new char[] { '\n' }).Distinct().ToList();
{ // if (_groupList.Count() > 0)
_ls = _ls.Where(p => _groupList.Contains(p.)).ToList(); // {
} // _ls = _ls.Where(p => _groupList.Contains(p.收货仓库描述)).ToList();
} // }
//}
//if (!string.IsNullOrEmpty(acceptNo))
//{
// var _groupList = acceptNo.Split(new char[] { '\n' }).Distinct().ToList();
// if (_groupList.Count() > 0)
// {
// _ls = _ls.Where(p => _groupList.Contains(p.结算验收单号)).ToList();
// }
//}
//if (!string.IsNullOrEmpty(materialGroup))
//{
// var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList();
// if (_groupList.Count() > 0)
// {
// _ls = _ls.Where(p => _groupList.Contains(p.物料组)).ToList();
// }
//}
//if (!string.IsNullOrEmpty(materialCode))
//{
// var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList();
// if (_groupList.Count() > 0)
// {
// _ls = _ls.Where(p => _groupList.Contains(p.发货零件号)).ToList();
// }
//}
if (!string.IsNullOrEmpty(acceptNo))
{
var _groupList = acceptNo.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
_ls = _ls.Where(p => _groupList.Contains(p.)).ToList();
}
}
if (!string.IsNullOrEmpty(materialGroup))
{
var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
_ls = _ls.Where(p => _groupList.Contains(p.)).ToList();
}
}
if (!string.IsNullOrEmpty(materialCode))
{
var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
_ls = _ls.Where(p => _groupList.Contains(p.)).ToList();
}
}
if (!string.IsNullOrEmpty(sapCode)) if (!string.IsNullOrEmpty(sapCode))
{ {
var _groupList = sapCode.Split(new char[] { '\n' }).Distinct().ToList(); var _groupList = sapCode.Split(new char[] { '\n' }).Distinct().ToList();

5
src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

@ -174,6 +174,11 @@ namespace Win.Sfs.SettleAccount
{ {
return implementationFactory.GetService<HQHSettledDetailDiffExportService>(); return implementationFactory.GetService<HQHSettledDetailDiffExportService>();
} }
//红旗结算未结明细
if (key.Equals(typeof(HQHUnSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQHUnSettledDetailDiffExportService>();
}
if (key.Equals(typeof(HQHSharePartSettledDetailDiffExportService).FullName)) if (key.Equals(typeof(HQHSharePartSettledDetailDiffExportService).FullName))
{ {
return implementationFactory.GetService<HQHSharePartSettledDetailDiffExportService>(); return implementationFactory.GetService<HQHSharePartSettledDetailDiffExportService>();

Loading…
Cancel
Save