Browse Source

更新版本

FoShanPG
Administrator 3 years ago
parent
commit
f171dd48da
  1. 3
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccountHttpApiHostModule.cs
  2. 389
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
  3. 391
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs
  4. 78
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
  5. 97
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs
  6. 17
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  7. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/WMSDbContext.cs
  8. 15
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs
  9. 11
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleKBWithOutCodeExportService.cs

3
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccountHttpApiHostModule.cs

@ -437,7 +437,6 @@ namespace Win.Sfs.SettleAccount
{
app.UseMultiTenancy();
}
app.UseAbpRequestLocalization();
app.UseSwagger();
app.UseSwaggerUI(options =>
@ -446,7 +445,7 @@ namespace Win.Sfs.SettleAccount
options.DocExpansion(DocExpansion.None); //->修改界面打开时自动折叠
});
new BackgroundJobServerOptions() { WorkerCount = 4, ServerTimeout=TimeSpan.FromSeconds(1200) };
new BackgroundJobServerOptions() { WorkerCount = 12, ServerTimeout=TimeSpan.FromSeconds(1200) };
app.UseHangfireServer();
app.UseHangfireDashboard();
app.UseAuditing();

389
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs

@ -68,7 +68,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
private readonly ISettleAccountBranchEfCoreRepository<WmsWithOutKanbanOutPutDetial, Guid> _wmsRepository1;
private readonly ISettleAccountBranchEfCoreRepository<WmsWithOutKanbanOutPut, Guid> _wmsVersionRepository1;
private readonly KanbanUnSettledDapperRepository _dapper;
private readonly WMSEfCoreRepository<WmsKanbanOutPutDetial> _wmsefRespository;
private readonly WMSEfCoreRepository<TB_BILL> _wmstbRespository;
@ -77,6 +77,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
private readonly TaskJobService _service;
private readonly WmsDapperRepository _wmsDapper;
/// <summary>
///
/// </summary>
@ -94,10 +95,12 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
ISettleAccountBranchEfCoreRepository<TaskJob, Guid> job,
ISettleAccountBranchEfCoreRepository<WmsKanbanOutPut, Guid> wmsVersionRepository,
WMSEfCoreRepository<WmsKanbanOutPutDetial> wmsefRespository,
KanbanUnSettledDapperRepository dapper,
WMSEfCoreRepository<TB_BILL> wmstbRespository,
IDistributedCache<WmsKanbanOutPutDetial> cache,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager
ICommonManager commonManager,
WmsDapperRepository wmsDapper
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
_job = job;
@ -106,6 +109,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
_wmsVersionRepository = wmsVersionRepository;
_wmsefRespository = wmsefRespository;
_excelImportService = excelImportService;
_dapper = dapper;
_wmsDapper = wmsDapper;
}
private async Task<long> GetCountAsync(WmsKanbanOutPutDetialRequestDto input)
@ -179,116 +184,116 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
return true;
}
/// <summary>
/// 选择任务,生成出库单,只包含已确认的单据
/// </summary>
/// <param name="ids"></param>
/// <param name="version"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsWithOutKanbanOutPut")]
public async Task<string> WmsWithOutKanbanOutPut(WmsJitRequestDto input)
{
var _billNum = "KA" + DateTime.Now.ToString("yyyyMMddhhmmss");
var _joblist = _job.Where(p => input.Guids.Contains(p.Id) && p.FileName == "已确认").ToList();
if (_joblist.Count() > 0)
{
var fileList = _joblist.Select(p => p.RealDownFileName).ToList();
List<WmsWithOutKanbanOutPutDetial> _lst = new List<WmsWithOutKanbanOutPutDetial>();
foreach (var filename in fileList)
{
string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename;
ExcelHelper _excelHelper = new ExcelHelper(fileSavePath);
var _list = _excelHelper.ExcelToList<SettleKBWithOutCode>();
foreach (var itm in _list)
{
var _entity= new WmsWithOutKanbanOutPutDetial(
GuidGenerator.Create(),
string.Empty,
string.Empty,
itm.MaterialCode,
itm.MaterialDesc,
itm.SapMaterialGroup,
string.Empty,
string.Empty,
0,
string.Empty,
string.Empty,
input.Version,
itm.SapMaterialCode,
_billNum,
Guid.Empty,
string.Empty,
itm.InvoiceQty
);
_lst.Add(_entity);
}
}
var outPutDetail = await _wmsRepository1.Where(p => p.Version == input.Version && p.Kanban==string.Empty).ToListAsync();
var error = from itm1 in outPutDetail
join itm2 in _lst on
new { itm1.MaterialCode }
equals
new { itm2.MaterialCode }
select itm1;
var errList = error.GroupBy(p => new { p.BillNum }).Select(p => new { BillNum = p.Key.BillNum, Number = p.Sum(itm => itm.Qty) });
if (errList.Count() == 0)
{
var query = from itm1 in _lst
join itm2 in outPutDetail on
new { itm1.MaterialCode}
equals
new { itm2.MaterialCode } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm1;
var _wmslst = query.ToList();
foreach (var itm in _lst)
{
itm.BillNum = _billNum;
}
await _wmsRepository1.GetDbContext().BulkInsertAsync(_lst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
int _count = _wmsVersionRepository1.Count(p => p.Version == input.Version && p.BillNum == _billNum);
if (_count == 0)
{
var _version = new WmsWithOutKanbanOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email);
await _wmsVersionRepository1.InsertAsync(_version, true);
}
foreach (var job in _joblist)
{
job.FileName = _billNum;
await _job.UpdateAsync(job);
}
}
else
{
StringBuilder _buffer = new StringBuilder();
foreach (var itm in errList)
{
_buffer.AppendFormat("出库单号:{0}重复记录数:{1}条", itm.BillNum, itm.Number);
}
var _errinfo = _buffer.ToString();
foreach (var job in _joblist)
{
job.FileName = _errinfo;
await _job.UpdateAsync(job);
}
}
}
else
{
_billNum = string.Empty;
}
return ApplicationConsts.SuccessStr; ;
}
///// <summary>
///// 选择任务,生成出库单,只包含已确认的单据
///// </summary>
///// <param name="ids"></param>
///// <param name="version"></param>
///// <returns></returns>
//[HttpPost]
//[Route("WmsWithOutKanbanOutPut")]
//public async Task<string> WmsWithOutKanbanOutPut(WmsJitRequestDto input)
//{
// var _billNum = "KA" + DateTime.Now.ToString("yyyyMMddhhmmss");
// var _joblist = _job.Where(p => input.Guids.Contains(p.Id) && p.FileName == "已确认").ToList();
// if (_joblist.Count() > 0)
// {
// var fileList = _joblist.Select(p => p.RealDownFileName).ToList();
// List<WmsWithOutKanbanOutPutDetial> _lst = new List<WmsWithOutKanbanOutPutDetial>();
// foreach (var filename in fileList)
// {
// string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename;
// ExcelHelper _excelHelper = new ExcelHelper(fileSavePath);
// var _list = _excelHelper.ExcelToList<SettleKBWithOutCode>();
// foreach (var itm in _list)
// {
// var _entity= new WmsWithOutKanbanOutPutDetial(
// GuidGenerator.Create(),
// string.Empty,
// string.Empty,
// itm.MaterialCode,
// itm.MaterialDesc,
// itm.SapMaterialGroup,
// string.Empty,
// string.Empty,
// 0,
// string.Empty,
// string.Empty,
// input.Version,
// itm.SapMaterialCode,
// _billNum,
// Guid.Empty,
// string.Empty,
// itm.InvoiceQty
// );
// _lst.Add(_entity);
// }
// }
// var outPutDetail = await _wmsRepository1.Where(p => p.Version == input.Version && p.Kanban==string.Empty).ToListAsync();
// var error = from itm1 in outPutDetail
// join itm2 in _lst on
// new { itm1.MaterialCode }
// equals
// new { itm2.MaterialCode }
// select itm1;
// var errList = error.GroupBy(p => new { p.BillNum }).Select(p => new { BillNum = p.Key.BillNum, Number = p.Sum(itm => itm.Qty) });
// if (errList.Count() == 0)
// {
// var query = from itm1 in _lst
// join itm2 in outPutDetail on
// new { itm1.MaterialCode}
// equals
// new { itm2.MaterialCode } into temp1
// from tm1 in temp1.DefaultIfEmpty()
// where tm1 == null
// select itm1;
// var _wmslst = query.ToList();
// foreach (var itm in _lst)
// {
// itm.BillNum = _billNum;
// }
// await _wmsRepository1.GetDbContext().BulkInsertAsync(_lst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
// int _count = _wmsVersionRepository1.Count(p => p.Version == input.Version && p.BillNum == _billNum);
// if (_count == 0)
// {
// var _version = new WmsWithOutKanbanOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email);
// await _wmsVersionRepository1.InsertAsync(_version, true);
// }
// foreach (var job in _joblist)
// {
// job.FileName = _billNum;
// await _job.UpdateAsync(job);
// }
// }
// else
// {
// StringBuilder _buffer = new StringBuilder();
// foreach (var itm in errList)
// {
// _buffer.AppendFormat("出库单号:{0}重复记录数:{1}条", itm.BillNum, itm.Number);
// }
// var _errinfo = _buffer.ToString();
// foreach (var job in _joblist)
// {
// job.FileName = _errinfo;
// await _job.UpdateAsync(job);
// }
// }
// }
// else
// {
// _billNum = string.Empty;
// }
// return ApplicationConsts.SuccessStr; ;
//}
/// <summary>
@ -489,6 +494,166 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
// 物料 物料组 物料描述 物料号 开始日期 结束日期 单位 出库数量 结算数量 寄售库存数量
[HttpPost]
[Route("ExcelImportWithOutKanban")]
[DisableRequestSizeLimit]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> ExcelImportWithOutKanban([FromForm] IFormFileCollection files, string version)
{
var _billNum = "KA" + DateTime.Now.ToString("yyyyMMddhhmmss");
var _list= _dapper.GetNoKanbanSettleDetail(version);
var stockList = _wmsDapper.GetSalesStock();
var query = from itm in _list
join itm1 in stockList on itm.MaterialCode equals itm1.SapCode
into temp1
from tm1 in temp1.DefaultIfEmpty()
select new WmsWithOutKanbanOutPutDetial(
GuidGenerator.Create(),
"无看板",
itm.SapMaterialCode,
itm.MaterialDesc,
itm.Version,
string.Empty,
string.Empty,
itm.Qty,
tm1.Qty,
itm.Qty,
string.Empty,
_billNum,
0,
0
);
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 WmsKanbanOutPut(GuidGenerator.Create(), version, _billNum, CurrentUser.Email);
await _wmsVersionRepository.InsertAsync(_version, true);
}
//var _lsCopy = new List<WmsWithOutKanbanOutPutDetial>();
//foreach (var itm in query.ToList())
//{
// WmsWithOutKanbanOutPutDetial _detail = new WmsWithOutKanbanOutPutDetial(
// GuidGenerator.Create(),
// "无看板",
// itm.SapMaterialCode,
// itm.MaterialDesc,
// itm.Version,
// string.Empty,
// string.Empty,
// itm.Qty,
// itm.,
// itm.Qty,
// string.Empty,
// _billNum
// );
// _lsCopy.Add(_detail);
//}
//_lst.AddRange(_lsCopy.ToArray());
//ExportImporter _exportImporter = new ExportImporter();
//var result = await _exportImporter.ExtendExcelImport<WmsWithOutKanbanOutPutDetial>(files, _excelImportService);
//List<WmsWithOutKanbanOutPutDetial> _lst = new List<WmsWithOutKanbanOutPutDetial>();
//var _lsCopy = new List<WmsWithOutKanbanOutPutDetial>();
//foreach (var itm in result)
//{
// WmsWithOutKanbanOutPutDetial _detail = new WmsWithOutKanbanOutPutDetial(
// GuidGenerator.Create(),
// !string.IsNullOrEmpty(itm.Type) ? itm.Type : string.Empty,
// itm.SapMaterialCode,
// itm.MaterialDesc,
// itm.Version,
// itm.IsBack,
// itm.Remark,
// itm.Qty,
// itm.SockQty,
// itm.OutputQty,
// itm.Extend,
// itm.BillNum
// );
// _lsCopy.Add(_detail);
//}
//_lst.AddRange(_lsCopy.ToArray());
//var outPutDetail = await _wmsRepository1.Where(p => p.Version == version).ToListAsync();
//var error = from itm1 in outPutDetail
// join itm2 in _lst on
// new { itm1.SapMaterialCode }
// equals
// new { itm2.SapMaterialCode }
// select itm1;
//var errList = error.GroupBy(p => new { p.BillNum }).Select(p => new { BillNum = p.Key.BillNum, Number = p.Sum(itm => itm.Qty) });
//var checkList = new List<ErrorExportDto>();
//foreach (var itm in errList)
//{
// checkList.Add(new ErrorExportDto() { Message = string.Format("出库单号:{0}重复记录数:{1}条", itm.BillNum, itm.Number) });
//}
//if (checkList.Count > 0)
//{
// return await ExportErrorReportAsync(checkList);
//}
//var query = from itm1 in _lst
// join itm2 in outPutDetail on
// new { itm1.SapMaterialCode }
// equals
// new { itm2.SapMaterialCode } into temp1
// from tm1 in temp1.DefaultIfEmpty()
// where tm1 == null
// select itm1;
//var _wmslst = query.ToList();
//foreach (var itm in _wmslst)
//{
// itm.BillNum = _billNum;
//}
//await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
//int _count = _wmsVersionRepository.Count(p => p.Version == version && p.BillNum == _billNum);
//if (_count == 0)
//{
// var _version = new WmsKanbanOutPut(GuidGenerator.Create(), version, _billNum, CurrentUser.Email);
// await _wmsVersionRepository.InsertAsync(_version, true);
//}
return _billNum;
}
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]

391
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs

@ -0,0 +1,391 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Distributed;
using AutoMapper;
using System.Linq;
using System.Text;
using Volo.Abp.Guids;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
using Volo.Abp.ObjectMapping;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.CacheBase;
using Win.Utils;
using Volo.Abp.Application.Dtos;
using Win.Sfs.BaseData.ImportExcelCommon;
using Volo.Abp.Domain.Repositories;
using EFCore.BulkExtensions;
using System.IO;
using Microsoft.EntityFrameworkCore;
using Win.Sfs.SettleAccount.Entities.SettleAccountVersion;
using Win.Sfs.SettleAccount.FISes;
using Win.Sfs.Shared.Enums.SettleAccount;
using Win.Sfs.Shared.Filter;
using Shouldly;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.Data.Common;
using Volo.Abp.Uow;
using Volo.Abp;
using Win.Abp.Snowflakes;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Magicodes.ExporterAndImporter.Core.Models;
using TaskJob.Services;
using TaskJob.EventArgs;
using Win.Sfs.SettleAccount.Entities.WMS;
using Win.Sfs.SettleAccount.Entities.Wms;
using Win.Sfs.SettleAccount.Repository;
using WY.NewJit.Extends.PaiGe.WMS;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
namespace Win.Sfs.SettleAccount.Entities.WMS
{
[Route("api/settleaccount/wmskanbanoutputextend")]
[AllowAnonymous]
//[Authorize(SettleAccountPermissions.WMSJIT.Default)]
public class WMSKanbanExtendAppService : SettleAccountApplicationBase<WmsWithOutKanbanOutPutDetial>
{
/// <summary>
/// 大众看板-出库
/// </summary>
//private readonly ISettleAccountBranchEfCoreRepository<WmsKanbanOutPutDetial, Guid> _wmsRepository;
//private readonly ISettleAccountBranchEfCoreRepository<WmsKanbanOutPut, Guid> _wmsVersionRepository;
private readonly ISettleAccountBranchEfCoreRepository<WmsWithOutKanbanOutPutDetial, Guid> _wmsRepository;
private readonly ISettleAccountBranchEfCoreRepository<WmsWithOutKanbanOutPut, 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 WMSKanbanExtendAppService(
IExcelImportAppService excelImportService,
ISettleAccountBranchEfCoreRepository<WmsWithOutKanbanOutPutDetial, Guid> wmsRepository,
ISettleAccountBranchEfCoreRepository<TaskJob, Guid> job,
ISettleAccountBranchEfCoreRepository<WmsWithOutKanbanOutPut, Guid> wmsVersionRepository,
WMSEfCoreRepository<WmsKanbanOutPutDetial> wmsefRespository,
KanbanUnSettledDapperRepository dapper,
WMSEfCoreRepository<TB_BILL> wmstbRespository,
IDistributedCache<WmsWithOutKanbanOutPutDetial> 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(WmsKanbanOutPutDetialRequestDto 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<WmsWithOutKanbanOutPut>> 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<WmsWithOutKanbanOutPut>(totalCount, entities);
}
/// <summary>
/// 准时化出库明细
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsKanbanDetailList")]
[UnitOfWork(false)]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsWithOutKanbanOutPutDetial>> GetListAsync(WmsKanbanOutPutDetialRequestDto input)
{
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 WmsWithOutKanbanOutPutDetial(
GuidGenerator.Create(),
"无看板发货",
itm.SapMaterialCode,
itm.MaterialDesc,
itm.Version,
string.Empty,
string.Empty,
itm.Qty,
tm1==null?0: tm1.Qty,
itm.OutputQty,
string.Empty,
itm.BillNum,
itm.State,
itm.RealityNumber
);
return new PagedResultDto<WmsWithOutKanbanOutPutDetial>(totalCount, entities);
}
/// <summary>
/// 任务明细标记已确认
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("WmsSharePartOutPutModify")]
[DisableRequestSizeLimit]
public async Task<bool> WmsSharePartUpdate(WmsWithOutKanbanOutPutDetial 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("WmsKanbanOutPutExtend")]
[UnitOfWork(false)]
public async Task<string> WmsKanbanOutPut(WmsJitRequestDto input)
{
var _billNum = "KA" + DateTime.Now.ToString("yyyyMMddhhmmss");
var _list = _dapper.GetNoKanbanSettleDetail(input.Version);
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 WmsWithOutKanbanOutPutDetial(
GuidGenerator.Create(),
"无看板发货",
itm.SapMaterialCode,
itm.MaterialDesc,
itm.Version,
string.Empty,
string.Empty,
itm.InvoiceQty,
tm1==null?0:tm1.Qty,
itm.InvoiceQty,
string.Empty,
_billNum,
0,
0
);
await _wmsRepository.GetDbContext().BulkInsertAsync(query.ToList(), new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
int _count = _wmsVersionRepository.Count(p => p.Version == input.Version && p.BillNum == _billNum);
if (_count == 0)
{
var _version = new WmsWithOutKanbanOutPut(GuidGenerator.Create(), input.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<bool> WmsKanbanOutPutPass(WmsJitRequestDto input)
{
if (input.Guids != null)
{
List<WmsWithOutKanbanOutPutDetial> _ls = new List<WmsWithOutKanbanOutPutDetial>();
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).ToList();
if (_ls.Count() > 0)
{
var sql = "DECLARE @return_value int\n" +
"EXEC @return_value = [dbo].[p_wms_output]\n" +
" @billnum = N'{0}',\n" +
" @type = 11,\n" +
" @date = N'{1}'\n" +
"SELECT 'Return Value' = @return_value";
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
string.Format(sql, input.BillNum, input.AccountDate.ToShortDateString()));
}
}
return true;
}
/// <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 = 11,\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 = 11\n" +
"SELECT 'Return Value' = @return_value";
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
string.Format(sql, input.BillNum)
);
return true;
}
// 物料 物料组 物料描述 物料号 开始日期 结束日期 单位 出库数量 结算数量 寄售库存数量
}
}

78
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml

@ -2134,7 +2134,7 @@
大众看板-出库
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.#ctor(Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsKanbanOutPutDetial,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.TaskJob,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsKanbanOutPut,System.Guid},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsKanbanOutPutDetial},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{WY.NewJit.Extends.PaiGe.WMS.TB_BILL},Volo.Abp.Caching.IDistributedCache{Win.Sfs.SettleAccount.Entities.WMS.WmsKanbanOutPutDetial},Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.CommonManagers.ICommonManager)">
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.#ctor(Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsKanbanOutPutDetial,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.TaskJob,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsKanbanOutPut,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.WmsKanbanOutPutDetial},Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.CommonManagers.ICommonManager,Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report.WmsDapperRepository)">
<summary>
</summary>
@ -2165,14 +2165,6 @@
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.WmsWithOutKanbanOutPut(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.SettleAccounts.WMSKanbanAppService.WmsKanbanOutPut(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
选择任务,生成出库单,只包含已确认的单据
@ -3043,6 +3035,74 @@
<param name="p_list"></param>
<returns></returns>
</member>
<member name="F:Win.Sfs.SettleAccount.Entities.WMS.WMSKanbanExtendAppService._wmsRepository">
<summary>
大众看板-出库
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WMSKanbanExtendAppService.#ctor(Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsWithOutKanbanOutPutDetial,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.TaskJob,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsWithOutKanbanOutPut,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.WmsWithOutKanbanOutPutDetial},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.WMSKanbanExtendAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsKanbanOutPutRequestDto)">
<summary>
准时化出库主表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WMSKanbanExtendAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsKanbanOutPutDetialRequestDto)">
<summary>
准时化出库明细
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WMSKanbanExtendAppService.WmsSharePartUpdate(Win.Sfs.SettleAccount.Entities.WMS.WmsWithOutKanbanOutPutDetial)">
<summary>
任务明细标记已确认
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WMSKanbanExtendAppService.WmsKanbanOutPut(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.WMSKanbanExtendAppService.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.WMSKanbanExtendAppService.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.WMSKanbanExtendAppService.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.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>

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

@ -359,88 +359,53 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
{
}
public WmsWithOutKanbanOutPutDetial(Guid id, string wmsBillNum, string kanban, string materialCode, string materialDesc, string materialGroup, string outPut, string inPut, int state, string extend1, string extend2, string extend3, string parentMaterialCode, string billNum, Guid taskId, string remark, decimal qty)
public WmsWithOutKanbanOutPutDetial(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):base(id)
{
Id = id;
WmsBillNum = wmsBillNum;
Kanban = kanban;
MaterialCode = materialCode;
Type = type;
SapMaterialCode = sapMaterialCode;
MaterialDesc = materialDesc;
MaterialGroup = materialGroup;
OutPut = outPut;
InPut = inPut;
State = state;
Extend1 = extend1;
Extend2 = extend2;
Version = extend3;
ParentMaterialCode = parentMaterialCode;
BillNum = billNum;
TaskId = taskId;
Version = version;
IsBack = isBack;
Remark = remark;
Qty = qty;
}
public void SetData(Guid id, string remark, string wmsbillnum, string version, Guid taskId)
{
Id = id;
Remark = remark;
WmsBillNum = wmsbillnum;
Version = version;
TaskId = taskId;
SockQty = sockQty;
OutputQty = outputQty;
Extend = extend;
BillNum = billnum;
State = state;
RealityNumber = realqty;
}
// 交货单号 实际发货日期 KENN号 底盘号 物料号 物料描述 客户物料 组件组物料 组件组物料描述 物料组(车型) 定价 金额 结算平台未结数量 大众R3未结数量 差异金额 差异数量 漏结标识 漏结期间 说明
[ImporterHeader(Name = "组件组物料", IsIgnore = true)]
public string ParentMaterialCode { set; get; }
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "条码号")]
//KENN号
public string Kanban { set; get; }
[ImporterHeader(Name = "单据类型")]
public string Type { set; get; }
[ImporterHeader(Name = "物料号")]
//物料号
public string MaterialCode { set; get; }
public string SapMaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
//物料组(车型)
public string MaterialGroup { set; get; }
[ImporterHeader(Name = "出库库位", IsIgnore = true)]
//出库库位
public string OutPut { set; get; }
[ImporterHeader(Name = "入库库位", IsIgnore = true)]
//入库库位
public string InPut { set; get; }
[ImporterHeader(Name = "状态", IsIgnore = true)]
public int State { get; set; }
[ImporterHeader(Name = "客户物料")]
/// <summary>
/// 扩展字段1
/// </summary>
public string Extend1 { set; get; }
/// <summary>
/// 扩展字段2
/// </summary>
[ImporterHeader(Name = "订单日期")]
public string Extend2 { set; get; }
/// <summary>
/// 扩展字段3
/// </summary>
[ImporterHeader(Name = "版本号", IsIgnore = true)]
[ImporterHeader(Name = "版本号")]
public string Version { set; get; }
[ImporterHeader(Name = "是否备件")]
public string IsBack { set; get; }
[ImporterHeader(Name = "结算数量")]
public decimal Qty { set; get; }
[ImporterHeader(Name = "寄售库存数量", IsIgnore = true)]
public decimal SockQty { set; get; }
[ImporterHeader(Name = "单据", IsIgnore = true)]
public string BillNum { set; get; }
[ImporterHeader(Name = "任务", IsIgnore = true)]
public Guid TaskId { set; get; }
[ImporterHeader(Name = "真实数量", IsIgnore = true)]
public decimal RealityNumber { set; get; }
[ImporterHeader(Name = "出库数量", IsIgnore = true)]
public decimal OutputQty { set; get; }
[ImporterHeader(Name = "Extend", IsIgnore = true)]
public string Extend { set; get; }
[ImporterHeader(Name = "BillNum", IsIgnore = true)]
public string BillNum { set; get; }
[ImporterHeader(Name = "状态", IsIgnore = true)]
public int State { set; get; }
}

17
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

@ -1363,10 +1363,10 @@ namespace Win.Sfs.SettleAccount
private static void ConfigureWmsWithOutKanbanOutPutVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WmsKanbanOutPut>(b =>
builder.Entity<WmsWithOutKanbanOutPut>(b =>
{
//b.ToTable($"{options.TablePrefix}_WmsKanbanOutPutExtend", options.Schema);
b.ToTable($"{options.TablePrefix}_WmsKanbanOutPut", options.Schema);
b.ToTable($"{options.TablePrefix}_WmsWithOutKanbanOutPut", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
@ -1378,22 +1378,15 @@ namespace Win.Sfs.SettleAccount
private static void ConfigureWmsWithOutKanbanOutPutDetail(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WmsKanbanOutPutDetial>(b =>
builder.Entity<WmsWithOutKanbanOutPutDetial>(b =>
{
//b.ToTable($"{options.TablePrefix}_WmsKanbanOutPutDetialExtend", options.Schema);
b.ToTable($"{options.TablePrefix}_WmsKanbanOutPutDetial", options.Schema);
b.ToTable($"{options.TablePrefix}_WmsWithOutKanbanOutPutDetial", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.WmsBillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.OutPut).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.InPut).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Kanban).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.ParentMaterialCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Extend1).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Extend2).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.MaterialCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.BillNum });
});

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/WMSDbContext.cs

@ -25,7 +25,7 @@ namespace Win.Sfs.SettleAccount
public virtual DbSet<WmsJitOutPutDetial> WmsJitOutPutDetial { get; set; }
public virtual DbSet<TEA_TASK_SUB> TEA_TASK_SUB { get; set; }
public virtual DbSet<WmsKanbanOutPutDetial> WmsKanbanOutPutDetial { get; set; }
//public virtual DbSet<WmsKanbanOutPutDetial> WmsKanbanOutPutDetial { get; set; }
public virtual DbSet<WmsSharePartOutPutDetial> WmsSharePartOutPutDetial { get; set; }
#endregion

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

@ -34,6 +34,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public string MaterialDesc { get; set; }
[ExporterHeader(DisplayName = "开票数量")]
public decimal InvoiceQty { get; set; }
[ExporterHeader(DisplayName ="发货数量")]
public decimal Qty { get; set; }
[ExporterHeader(DisplayName = "金额")]
public decimal InvoiceAmt { get; set; }
[ExporterHeader(DisplayName = "开票单价")]
@ -88,7 +90,16 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public class KanbanUnSettledExtend
{
[ExporterHeader(DisplayName = "客户物料号")]
[ExporterHeader(DisplayName = "客户物料号")]
public string MaterialCode { set; get; }
[ExporterHeader(DisplayName = "物料号")]
public string SapCode { set; get; }
@ -186,7 +197,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
var _list = _query.ToList();
return _list;
}
public virtual List<SettleKBWithOutCode> GetNoKanbanSettleDetail(string version, string begintime, string endtime)
public virtual List<SettleKBWithOutCode> GetNoKanbanSettleDetail(string version)
{
var sql =

11
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleKBWithOutCodeExportService.cs

@ -16,9 +16,11 @@ namespace SettleAccount.Job.Services.Report
private readonly OutputService _outputService;
private readonly ErpPartDapperRepository _erpdapperRepository;
public SettleKBWithOutCodeExportService(KanbanUnSettledDapperRepository dapper,
public SettleKBWithOutCodeExportService(
KanbanUnSettledDapperRepository dapper,
OutputService outputService,
ErpPartDapperRepository erpdapperRepository)
ErpPartDapperRepository erpdapperRepository
)
{
_dapper = dapper;
_outputService = outputService;
@ -41,7 +43,10 @@ namespace SettleAccount.Job.Services.Report
var endTime = p_list.Where(p => p.Name == "EndTime").FirstOrDefault().Value;
var _list = _dapper.GetNoKanbanSettleDetail(version, beginTime, endTime);
var _list = _dapper.GetNoKanbanSettleDetail(version);
//var diffList = _erpdapperRepository.GetSettleInvoiceDiff(version);
//if (diffList != null)
//{

Loading…
Cancel
Save