Browse Source

红旗一轿车 寄售库取值更改

master
44673626 2 years ago
parent
commit
ab7734d621
  1. 67
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
  2. 63
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs
  3. 57
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
  4. 2
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs

67
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs

@ -374,6 +374,35 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
return true;
}
/// <summary>
/// 测试用
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsHQHKanbanOutPut-Pass/In")]
[UnitOfWork(false)]
public async Task<bool> WmsHQHKanbanOutPutPassIn(WmsJitRequestDto input)
{
//if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM"))
//{
// throw new BusinessException("8989", "填写过账日期应该为当月!");
//}
var sql = "DECLARE @return_value int\n" +
"EXEC @return_value = [dbo].[p_hqkanban_input_new]\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())
);
return true;
}
@ -416,6 +445,44 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
return true;
}
/// <summary>
/// 测试用
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsHQHKanbanOutPut-Cancel/OUT")]
[UnitOfWork(false)]
public async Task<bool> WmsHQHKanbanOutPutCancelOUT(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_hqkanban_output]\n" +
" @Guids ='{0}', \n" +
" @billnum = N'{1}',\n" +
" @date = 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>

63
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs

@ -533,6 +533,29 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
return true;
}
/// <summary>
/// 测试用
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsJitOutPut-Pass/In")]
[UnitOfWork(false)]
public async Task<bool> WmsJitOutPutPassIn(WmsJitRequestDto input)
{
var sql = "DECLARE @return_value int\n" +
"EXEC @return_value = [dbo].[p_vwjit_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())
);
return true;
}
@ -609,6 +632,46 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
return true;
}
/// <summary>
/// 测试用
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsJitOutPut-Cancel/OUT")]
[UnitOfWork(false)]
[Authorize(SettleAccountPermissions.WMSJIT.Delete)]
public async Task<bool> WmsJitOutPutCancelOUT(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_vwjit_output_out]\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>

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

@ -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>

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

@ -66,7 +66,7 @@ namespace SettleAccount.Job.Services.Report
//不包含备品--求和出库
var _ls_sum = _dapperRepository.GetHQCarSettledDetailDiffSumReportList(version, materialCode, begin, end, materialGroup);
//按照零件号汇总数量,有一列显示寄售库数量
var stockList = _wmsDapper.GetSalesStock("PLJS");
var stockList = _wmsDapper.GetSalesStock("BJJS");
var queryStockList = from itm in _ls_sum
join itm1 in stockList on itm.SAP编码 equals itm1.SapCode into temp1
from tm1 in temp1.DefaultIfEmpty()

Loading…
Cancel
Save