From ab7734d621ba590299c911be680be76778c48a0f Mon Sep 17 00:00:00 2001
From: 44673626 <44673626@qq.com>
Date: Tue, 25 Oct 2022 13:07:57 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BA=A2=E6=97=97=E4=B8=80=E8=BD=BF=E8=BD=A6?=
=?UTF-8?q?=20=E5=AF=84=E5=94=AE=E5=BA=93=E5=8F=96=E5=80=BC=E6=9B=B4?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Entities/WMS/WMSHQHKanbanAppService.cs | 67 +++++++++++++++++++
.../Entities/WMS/WMSJitAppService.cs | 63 +++++++++++++++++
.../Entities/WMS/WMSKanbanAppService.cs | 57 ++++++++++++++--
.../HQCarSettledDetailDiffExportService.cs | 2 +-
4 files changed, 181 insertions(+), 8 deletions(-)
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
index 56ded856..e76afa0a 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
@@ -376,6 +376,35 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
return true;
+ }
+ ///
+ /// 测试用
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("WmsHQHKanbanOutPut-Pass/In")]
+ [UnitOfWork(false)]
+ public async Task 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;
}
+
+ ///
+ /// 测试用
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("WmsHQHKanbanOutPut-Cancel/OUT")]
+ [UnitOfWork(false)]
+ public async Task WmsHQHKanbanOutPutCancelOUT(WmsJitRequestDto input)
+ {
+ if (input.Guids != null && input.Guids.Count() > 0)
+ {
+ List _ls = new List();
+ 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;
+ }
///
/// 出库界面功能删除
///
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs
index 9e06eef9..e012448d 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs
@@ -533,6 +533,29 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
+ return true;
+ }
+
+ ///
+ /// 测试用
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("WmsJitOutPut-Pass/In")]
+ [UnitOfWork(false)]
+
+ public async Task 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;
}
+ ///
+ /// 测试用
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("WmsJitOutPut-Cancel/OUT")]
+ [UnitOfWork(false)]
+ [Authorize(SettleAccountPermissions.WMSJIT.Delete)]
+ public async Task WmsJitOutPutCancelOUT(WmsJitRequestDto input)
+ {
+ if (input.Guids != null && input.Guids.Count() > 0)
+ {
+ List _ls = new List();
+ 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;
+ }
+
+
///
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
index 26c2b3ab..6c53b841 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
+++ b/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 _vwkanbanInRepository;
+ //private readonly IRepository _vwkanbanInRepository;
- private readonly IRepository _vwkanbanOutRepository;
+ //private readonly IRepository _vwkanbanOutRepository;
// private readonly ErpPartDapperRepository _erpdapperRepository;
///
@@ -108,8 +109,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
IDistributedCache cache,
ISnowflakeIdGenerator snowflakeIdGenerator,
// ErpPartDapperRepository erpdapperRepository,
- IRepository vwkanbanOutRepository,
- IRepository vwkanbanInRepository,
+ //IRepository vwkanbanOutRepository,
+ //IRepository 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 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 WmsKanbanOutPutCancelOUT(WmsJitRequestDto input)
+ {
+ if (input.Guids != null && input.Guids.Count() > 0)
+ {
+ List _ls = new List();
+ 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;
+ }
+
///
///出库界面功能, 撤销核准出库
///
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs
index d5a1b0f8..478016a3 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs
+++ b/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()