|
|
@ -49,6 +49,7 @@ using Win.Sfs.SettleAccount.Repository; |
|
|
|
using WY.NewJit.Extends.PaiGe.WMS; |
|
|
|
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report; |
|
|
|
using Win.Sfs.SettleAccount.Entities.VWKanBanIn; |
|
|
|
using Win.Sfs.SettleAccount.Entities.VWKanBanOut; |
|
|
|
|
|
|
|
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
{ |
|
|
@ -81,9 +82,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
private readonly TaskJobService _service; |
|
|
|
private readonly WmsDapperRepository _wmsDapper; |
|
|
|
|
|
|
|
private readonly IRepository<VWKanBanInEntity,Guid> _vwkanbanInRepository; |
|
|
|
//private readonly IRepository<VWKanBanInEntity,Guid> _vwkanbanInRepository;
|
|
|
|
|
|
|
|
private readonly IRepository<WmsKanbanOutPutDetial, Guid> _vwkanbanOutRepository; |
|
|
|
//private readonly IRepository<VWKanBanOutEntity, Guid> _vwkanbanOutRepository;
|
|
|
|
|
|
|
|
// private readonly ErpPartDapperRepository _erpdapperRepository;
|
|
|
|
/// <summary>
|
|
|
@ -108,8 +109,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
IDistributedCache<WmsKanbanOutPutDetial> cache, |
|
|
|
ISnowflakeIdGenerator snowflakeIdGenerator, |
|
|
|
// ErpPartDapperRepository erpdapperRepository,
|
|
|
|
IRepository<WmsKanbanOutPutDetial, Guid> vwkanbanOutRepository, |
|
|
|
IRepository<VWKanBanInEntity, Guid> vwkanbanInRepository, |
|
|
|
//IRepository<VWKanBanOutEntity, Guid> vwkanbanOutRepository,
|
|
|
|
//IRepository<VWKanBanInEntity, Guid> vwkanbanInRepository,
|
|
|
|
ICommonManager commonManager, |
|
|
|
WmsDapperRepository wmsDapper |
|
|
|
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager) |
|
|
@ -123,8 +124,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
_dapper = dapper; |
|
|
|
// _erpdapperRepository = erpdapperRepository;
|
|
|
|
_wmsDapper = wmsDapper; |
|
|
|
_vwkanbanInRepository = vwkanbanInRepository; |
|
|
|
_vwkanbanOutRepository = vwkanbanOutRepository; |
|
|
|
//_vwkanbanInRepository = vwkanbanInRepository;
|
|
|
|
//_vwkanbanOutRepository = vwkanbanOutRepository;
|
|
|
|
} |
|
|
|
|
|
|
|
private async Task<long> GetCountAsync(WmsKanbanOutPutDetialRequestDto input) |
|
|
@ -465,7 +466,17 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
if (_ls.Count() > 0) |
|
|
|
{ |
|
|
|
//调用存储过程
|
|
|
|
|
|
|
|
var sql = "DECLARE @return_value int\n" + |
|
|
|
"EXEC @return_value = [dbo].[p_vwkanban_input_in]\n" + |
|
|
|
" @billnum = N'{0}',\n" + |
|
|
|
" @date = N'{1}'\n" + |
|
|
|
"SELECT 'Return Value' = @return_value"; |
|
|
|
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( |
|
|
|
string.Format(sql, input.BillNum, input.AccountDate.ToShortDateString())); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new BusinessException("未查到期间"+input.Version+"的出库数据!"); |
|
|
|
} |
|
|
|
} |
|
|
|
return true; |
|
|
@ -509,6 +520,38 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
[HttpPost] |
|
|
|
[Route("WmsKanbanOutPut-Cancel/OUT")] |
|
|
|
[UnitOfWork(false)] |
|
|
|
public async Task<bool> WmsKanbanOutPutCancelOUT(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_vwkanban_output_out_1]\n" + |
|
|
|
" @Guids ='{0}', \n" + |
|
|
|
" @billnum = N'{1}',\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>
|
|
|
|