44673626 3 years ago
parent
commit
c539fac6d2
  1. 19
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFKanbanAppService.cs
  2. 37
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs
  3. 4
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
  4. 41
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs
  5. 4
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs
  6. 4
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
  7. 4
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs
  8. 4
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMKanbanAppService.cs
  9. 36
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs
  10. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
  11. 21
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
  12. 17
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs
  13. 4
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs
  14. 32
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/SettleAccounts/SettleAccountRepository.cs
  15. 134
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs

19
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFKanbanAppService.cs

@ -204,12 +204,12 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
// _lst.Add(_entity); // _lst.Add(_entity);
// } // }
// } // }
// var outPutDetail = await _wmsRepository.Where(p => p.Version == input.Version && p.Kanban==string.Empty).ToListAsync(); // var outPutDetail = await _wmsRepository.Where(p => p.Version == input.Version && p.Kanban==string.Empty).ToListAsync();
// await _wmsRepository.GetDbContext().BulkInsertAsync(_lst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 }); // await _wmsRepository.GetDbContext().BulkInsertAsync(_lst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
// int _count = _wmsVersionRepository.Count(p => p.Version == input.Version && p.BillNum == _billNum); // int _count = _wmsVersionRepository.Count(p => p.Version == input.Version && p.BillNum == _billNum);
// if (_count == 0) // if (_count == 0)
@ -225,7 +225,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
// await _job.UpdateAsync(job); // await _job.UpdateAsync(job);
// } // }
// } // }
// return ApplicationConsts.SuccessStr; ; // return ApplicationConsts.SuccessStr; ;
//} //}
@ -254,18 +254,18 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
var _list = _excelHelper.ExcelToList<WmsHQFKanbanOutPutDetial>(); var _list = _excelHelper.ExcelToList<WmsHQFKanbanOutPutDetial>();
foreach (var itm in _list) foreach (var itm in _list)
{ {
itm.SetData(GuidGenerator.Create(),string.Empty,!string.IsNullOrEmpty(itm.WmsBillNum)? itm.WmsBillNum:string.Empty,input.Version,GuidGenerator.Create()); itm.SetData(GuidGenerator.Create(), string.Empty, !string.IsNullOrEmpty(itm.WmsBillNum) ? itm.WmsBillNum : string.Empty, input.Version, GuidGenerator.Create());
} }
_lst.AddRange(_list.ToArray()); _lst.AddRange(_list.ToArray());
} }
var outPutDetail = await _wmsRepository.Where(p => p.Version == input.Version).ToListAsync(); var outPutDetail = await _wmsRepository.Where(p => p.Version == input.Version).ToListAsync();
var error = from itm1 in outPutDetail var error = from itm1 in outPutDetail
join itm2 in _lst on join itm2 in _lst on
new { itm1.MaterialCode, itm1.Kanban,itm1.PoLine } new { itm1.MaterialCode, itm1.Kanban, itm1.PoLine }
equals equals
new { itm2.MaterialCode, itm2.Kanban,itm2.PoLine } new { itm2.MaterialCode, itm2.Kanban, itm2.PoLine }
select itm1; select itm1;
var errList = error.GroupBy(p => new { p.BillNum }).Select(p => new { BillNum = p.Key.BillNum, Number = p.Sum(itm => itm.Qty) }); 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) if (errList.Count() == 0)
@ -319,7 +319,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{ {
_billNum = string.Empty; _billNum = string.Empty;
} }
return ApplicationConsts.SuccessStr; ; return ApplicationConsts.SuccessStr; ;
} }
/// <summary> /// <summary>
/// 出库界面功能,核准出库功能 /// 出库界面功能,核准出库功能
@ -380,7 +380,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
sql sql
); );
} }
return true; return true;

37
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs

@ -170,7 +170,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
itm.TaskId, itm.TaskId,
itm.Remark, itm.Remark,
itm.Qty, itm.Qty,
tm1 == null ? 0 : tm1.Qty tm1 == null ? 0 : tm1.Qty,
itm.OutPutQty
); );
return new PagedResultDto<WmsHQFSharePartOutPutDetial>(totalCount, entities); return new PagedResultDto<WmsHQFSharePartOutPutDetial>(totalCount, entities);
} }
@ -236,7 +237,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
GuidGenerator.Create(), GuidGenerator.Create(),
string.Empty, string.Empty,
p.Qty, p.Qty,
p.StockQty p.StockQty,
p.Qty
)); ));
_lst.AddRange(_lsAry.ToArray()); _lst.AddRange(_lsAry.ToArray());
} }
@ -296,7 +298,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
string.Format(sql, input.BillNum,input.AccountDate)); string.Format(sql, input.BillNum,input.AccountDate.ToShortDateString()));
} }
} }
@ -329,7 +331,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
" @accountdate = N'{2}'\n" + " @accountdate = N'{2}'\n" +
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
sql = string.Format(sql, str, input.BillNum, input.AccountDate); sql = string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString());
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
sql sql
@ -337,6 +339,32 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
} }
return true; return true;
} }
/// <summary>
/// 任务明细标记已确认
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("WmsSharePartOutPutModify")]
[DisableRequestSizeLimit]
public async Task<bool> WmsSharePartUpdate(WmsHQHSharePartOutPutDetial detial)
{
var _entityList = _wmsRepository.Where(p => p.Id == detial.Id).ToList();
if (_entityList.Count() > 0)
{
foreach (var itm in _entityList)
{
itm.OutPutQty = detial.OutPutQty;
await _wmsRepository.UpdateAsync(itm);
}
}
return true;
}
[HttpPost] [HttpPost]
[Route("ExcelImport")] [Route("ExcelImport")]
[DisableRequestSizeLimit] [DisableRequestSizeLimit]
@ -370,6 +398,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
, string.Empty , string.Empty
, itm.Qty , itm.Qty
,0 ,0
,itm.Qty
); );
_lsCopy.Add(_detail); _lsCopy.Add(_detail);
} }

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

@ -339,7 +339,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
" @date = N'{1}'\n" + " @date = N'{1}'\n" +
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
string.Format(sql, input.BillNum, input.AccountDate) string.Format(sql, input.BillNum, input.AccountDate.ToShortDateString())
); );
@ -375,7 +375,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
" @accountdate = N'{2}'\n" + " @accountdate = N'{2}'\n" +
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
sql = string.Format(sql, str, input.BillNum, input.AccountDate); sql = string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString());
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
sql sql

41
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs

@ -170,7 +170,8 @@ into temp1
itm.TaskId, itm.TaskId,
itm.Remark, itm.Remark,
itm.Qty, itm.Qty,
tm1==null?0:tm1.Qty tm1==null?0:tm1.Qty,
itm.OutPutQty
); );
@ -198,6 +199,35 @@ into temp1
return true; return true;
} }
/// <summary>
/// 任务明细标记已确认
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("WmsSharePartOutPutModify")]
[DisableRequestSizeLimit]
public async Task<bool> WmsSharePartUpdate(WmsHQHSharePartOutPutDetial detial)
{
var _entityList= _wmsRepository.Where(p => p.Id == detial.Id).ToList();
if (_entityList.Count() > 0)
{
foreach (var itm in _entityList)
{
itm.OutPutQty = detial.OutPutQty;
await _wmsRepository.UpdateAsync(itm);
}
}
return true;
}
/// <summary> /// <summary>
/// 选择任务,生成出库单,只包含已确认的单据 /// 选择任务,生成出库单,只包含已确认的单据
/// </summary> /// </summary>
@ -240,7 +270,8 @@ into temp1
GuidGenerator.Create(), GuidGenerator.Create(),
string.Empty, string.Empty,
p.Qty, p.Qty,
p.StockQty p.StockQty,
p.Qty
)); ));
_lst.AddRange(_lsAry.ToArray()); _lst.AddRange(_lsAry.ToArray());
} }
@ -319,8 +350,7 @@ into temp1
" @date = N'{1}',\n"+ " @date = N'{1}',\n"+
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
string.Format(sql, input.BillNum,input.AccountDate)); string.Format(sql, input.BillNum,input.AccountDate.ToShortDateString()));
} }
} }
return true; return true;
@ -352,7 +382,7 @@ into temp1
" @accountdate = N'{2}'\n" + " @accountdate = N'{2}'\n" +
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
sql = string.Format(sql, str, input.BillNum, input.AccountDate); sql = string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString());
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
sql sql
@ -393,6 +423,7 @@ into temp1
, string.Empty , string.Empty
, itm.Qty , itm.Qty
,0 ,0
,itm.Qty
); );
_lsCopy.Add(_detail); _lsCopy.Add(_detail);
} }

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

@ -417,7 +417,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
" @date = N'{1}'\n"+ " @date = N'{1}'\n"+
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
string.Format(sql,input.BillNum,input.AccountDate) string.Format(sql,input.BillNum,input.AccountDate.ToShortDateString())
); );
@ -455,7 +455,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
" @accountdate = N'{2}'\n" + " @accountdate = N'{2}'\n" +
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
sql= string.Format(sql, str, input.BillNum, input.AccountDate); sql= string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString());
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
sql sql

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

@ -395,7 +395,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
" @date = N'{1}'\n" + " @date = N'{1}'\n" +
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
string.Format(sql, input.BillNum)); string.Format(sql, input.BillNum,input.AccountDate.ToShortDateString()));
} }
} }
@ -429,7 +429,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
" @accountdate = N'{2}'\n" + " @accountdate = N'{2}'\n" +
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
sql = string.Format(sql, str, input.BillNum, input.AccountDate); sql = string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString());
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
sql sql

4
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs

@ -319,7 +319,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
" @date = N'{1}'\n" + " @date = N'{1}'\n" +
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
string.Format(sql, input.BillNum)); string.Format(sql, input.BillNum,input.AccountDate.ToShortDateString()));
} }
} }
@ -353,7 +353,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
" @accountdate = N'{2}'\n" + " @accountdate = N'{2}'\n" +
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
sql = string.Format(sql, str, input.BillNum, input.AccountDate); sql = string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString());
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
sql sql

4
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMKanbanAppService.cs

@ -257,7 +257,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
" @date = N'{1}'\n" + " @date = N'{1}'\n" +
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
string.Format(sql, input.BillNum, input.AccountDate) string.Format(sql, input.BillNum, input.AccountDate.ToShortDateString())
); );
@ -293,7 +293,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
" @accountdate = N'{2}'\n" + " @accountdate = N'{2}'\n" +
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
sql = string.Format(sql, str, input.BillNum, input.AccountDate); sql = string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString());
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
sql sql

36
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs

@ -150,6 +150,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
itm.Remark, itm.Remark,
itm.Qty, itm.Qty,
tm1 == null ? 0 : tm1.Qty tm1 == null ? 0 : tm1.Qty
,itm.OutPutQty
); );
@ -219,7 +220,9 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
GuidGenerator.Create(), GuidGenerator.Create(),
string.Empty, string.Empty,
p.Qty, p.Qty,
p.StockQty p.StockQty,
p.Qty
)); ));
_lst.AddRange(_lsAry.ToArray()); _lst.AddRange(_lsAry.ToArray());
} }
@ -298,12 +301,38 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
" @date = N'{1}',\n" + " @date = N'{1}',\n" +
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
string.Format(sql, input.BillNum,input.AccountDate)); string.Format(sql, input.BillNum,input.AccountDate.ToShortDateString()));
} }
} }
return true; return true;
} }
/// <summary>
/// 任务明细标记已确认
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("WmsSharePartOutPutModify")]
[DisableRequestSizeLimit]
public async Task<bool> WmsSharePartUpdate(WmsHQHSharePartOutPutDetial detial)
{
var _entityList = _wmsRepository.Where(p => p.Id == detial.Id).ToList();
if (_entityList.Count() > 0)
{
foreach (var itm in _entityList)
{
itm.OutPutQty = detial.OutPutQty;
await _wmsRepository.UpdateAsync(itm);
}
}
return true;
}
/// <summary> /// <summary>
///出库界面功能, 撤销核准出库 ///出库界面功能, 撤销核准出库
/// </summary> /// </summary>
@ -331,7 +360,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
" @accountdate = N'{2}'\n" + " @accountdate = N'{2}'\n" +
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
sql = string.Format(sql, str, input.BillNum, input.AccountDate); sql = string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString());
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
sql sql
@ -372,6 +401,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
, string.Empty , string.Empty
, itm.Qty , itm.Qty
, 0 , 0
,itm.Qty
); );
_lsCopy.Add(_detail); _lsCopy.Add(_detail);
} }

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

@ -33,7 +33,7 @@ using Win.Sfs.SettleAccount.Reports.ReportRequestDto;
namespace Win.Sfs.SettleAccount.Reports.ReportServices namespace Win.Sfs.SettleAccount.Reports.ReportServices
{ {
[Authorize(SettleAccountPermissions.Reports.Default)] [Authorize(SettleAccountPermissions.Reports.Default)]
//[AllowAnonymous]
[Route("api/settleaccount/ReportMakeService")] [Route("api/settleaccount/ReportMakeService")]
public class ReportService : ApplicationService public class ReportService : ApplicationService
{ {

21
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml

@ -1805,6 +1805,13 @@
<param name="version"></param> <param name="version"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSHQFSharePartAppService.WmsSharePartUpdate(Win.Sfs.SettleAccount.Entities.WMS.WmsHQHSharePartOutPutDetial)">
<summary>
任务明细标记已确认
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="T:Win.Sfs.SettleAccount.Entities.SettleAccounts.WmsHQHKanbanAppService"> <member name="T:Win.Sfs.SettleAccount.Entities.SettleAccounts.WmsHQHKanbanAppService">
<summary> <summary>
红旗H平台准时化-出库 红旗H平台准时化-出库
@ -1901,6 +1908,13 @@
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param> <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WmsHQHSharePartAppService.WmsSharePartUpdate(Win.Sfs.SettleAccount.Entities.WMS.WmsHQHSharePartOutPutDetial)">
<summary>
任务明细标记已确认
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WmsHQHSharePartAppService.WmsSharePartOutPut(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)"> <member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WmsHQHSharePartAppService.WmsSharePartOutPut(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary> <summary>
选择任务,生成出库单,只包含已确认的单据 选择任务,生成出库单,只包含已确认的单据
@ -2851,6 +2865,13 @@
<param name="p_list"></param> <param name="p_list"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WmsHQMSharePartAppService.WmsSharePartUpdate(Win.Sfs.SettleAccount.Entities.WMS.WmsHQHSharePartOutPutDetial)">
<summary>
任务明细标记已确认
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS.WmsHQMSharePartAppService.WmsSharePartOutPutCancel(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)"> <member name="M:Win.Sfs.SettleAccount.Entities.WMS.WmsHQMSharePartAppService.WmsSharePartOutPutCancel(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary> <summary>
出库界面功能, 撤销核准出库 出库界面功能, 撤销核准出库

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

@ -470,7 +470,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public WmsHQMSharePartOutPutDetial() public WmsHQMSharePartOutPutDetial()
{ {
} }
public WmsHQMSharePartOutPutDetial(Guid id, string wmsBillNum, string orderBillNum, 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, decimal stockQty) public WmsHQMSharePartOutPutDetial(Guid id, string wmsBillNum, string orderBillNum, 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, decimal stockQty,decimal outputQty)
{ {
Id = id; Id = id;
WmsBillNum = wmsBillNum; WmsBillNum = wmsBillNum;
@ -490,6 +490,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
Remark = remark; Remark = remark;
Qty = qty; Qty = qty;
StockQty = stockQty; StockQty = stockQty;
OutPutQty = outputQty;
} }
public void SetId(Guid id) public void SetId(Guid id)
{ {
@ -545,6 +546,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public string BillNum { set; get; } public string BillNum { set; get; }
[ImporterHeader(Name = "任务ID", IsIgnore = true)] [ImporterHeader(Name = "任务ID", IsIgnore = true)]
public Guid TaskId { set; get; } public Guid TaskId { set; get; }
[ImporterHeader(Name = "出库数量", IsIgnore = true)]
public decimal OutPutQty { set; get; }
} }
#endregion #endregion
@ -824,7 +827,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public WmsHQFSharePartOutPutDetial() public WmsHQFSharePartOutPutDetial()
{ {
} }
public WmsHQFSharePartOutPutDetial(Guid id, string wmsBillNum, string orderBillNum, 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, decimal stockQty) public WmsHQFSharePartOutPutDetial(Guid id, string wmsBillNum, string orderBillNum, 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, decimal stockQty,decimal outPutQty)
{ {
Id = id; Id = id;
WmsBillNum = wmsBillNum; WmsBillNum = wmsBillNum;
@ -844,6 +847,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
Remark = remark; Remark = remark;
Qty = qty; Qty = qty;
StockQty = stockQty; StockQty = stockQty;
OutPutQty = outPutQty;
} }
public void SetId(Guid id) public void SetId(Guid id)
{ {
@ -899,6 +904,9 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public string BillNum { set; get; } public string BillNum { set; get; }
[ImporterHeader(Name = "任务ID", IsIgnore = true)] [ImporterHeader(Name = "任务ID", IsIgnore = true)]
public Guid TaskId { set; get; } public Guid TaskId { set; get; }
[ImporterHeader(Name = "出库数量", IsIgnore = true)]
public decimal OutPutQty { set; get; }
} }
@ -1054,7 +1062,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public WmsHQHSharePartOutPutDetial() public WmsHQHSharePartOutPutDetial()
{ {
} }
public WmsHQHSharePartOutPutDetial(Guid id, string wmsBillNum, string orderBillNum, 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,decimal stockQty) public WmsHQHSharePartOutPutDetial(Guid id, string wmsBillNum, string orderBillNum, 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,decimal stockQty,decimal outputQty)
{ {
Id = id; Id = id;
WmsBillNum = wmsBillNum; WmsBillNum = wmsBillNum;
@ -1074,6 +1082,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
Remark = remark; Remark = remark;
Qty = qty; Qty = qty;
StockQty = stockQty; StockQty = stockQty;
OutPutQty = outputQty;
} }
public void SetId(Guid id) public void SetId(Guid id)
{ {
@ -1129,6 +1138,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public string BillNum { set; get; } public string BillNum { set; get; }
[ImporterHeader(Name = "任务ID", IsIgnore = true)] [ImporterHeader(Name = "任务ID", IsIgnore = true)]
public Guid TaskId { set; get; } public Guid TaskId { set; get; }
[ImporterHeader(Name = "出库数量", IsIgnore = true)]
public decimal OutPutQty { set; get; }
} }

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

@ -70,13 +70,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public override decimal Price { set; get; } public override decimal Price { set; get; }
[ExporterHeader(DisplayName = "金额") ] [ExporterHeader(DisplayName = "金额") ]
public override decimal Amt { set; get; } public override decimal Amt { set; get; }
//发运数量 //发运数量
[ExporterHeader(DisplayName = "M100数量")] [ExporterHeader(DisplayName = "M100数量")]
public decimal Qty { set; get; } public decimal Qty { set; get; }
//结算数量 //结算数量
[ExporterHeader(DisplayName = "结算数量")] [ExporterHeader(DisplayName = "结算数量")]
public decimal SettledQty { set; get; } public decimal SettledQty { set; get; }

32
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/SettleAccounts/SettleAccountRepository.cs

@ -106,24 +106,24 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccount
try try
{ {
DbContext.Database.SetCommandTimeout(1200); DbContext.Database.SetCommandTimeout(1200);
List<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount> _insertls = new List<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>(); //List<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount> _insertls = new List<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>();
if (list.Count > 0) //if (list.Count > 0)
{ //{
var _version = list.FirstOrDefault().Version; // var _version = list.FirstOrDefault().Version;
var _ls= GetQueryable().Where(p => p.Version == _version).Select(p=>new { MaterialCode=p.MaterialCode, ChassisNumber=p.ChassisNumber }).ToList(); // var _ls= GetQueryable().Where(p => p.Version == _version).Select(p=>new { MaterialCode=p.MaterialCode, ChassisNumber=p.ChassisNumber }).ToList();
var _query = from r1 in list join r2 in _ls on new { r1.ChassisNumber, r1.MaterialCode } equals new { r2.ChassisNumber, r2.MaterialCode } // var _query = from r1 in list join r2 in _ls on new { r1.ChassisNumber, r1.MaterialCode } equals new { r2.ChassisNumber, r2.MaterialCode }
into temp from t in temp.DefaultIfEmpty() // into temp from t in temp.DefaultIfEmpty()
where t==null // where t==null
select r1 ; // select r1 ;
foreach (var s in _query.ToList()) // foreach (var s in _query.ToList())
{ // {
_insertls.Add(s); // _insertls.Add(s);
} // }
} //}
BulkConfig cfg = new BulkConfig() { BulkCopyTimeout=0, BatchSize=2000}; BulkConfig cfg = new BulkConfig() { BulkCopyTimeout=0, BatchSize=100000, };
DbContext.BulkInsert(_insertls,cfg); DbContext.BulkInsert(list,cfg);
} }
catch (Exception e) catch (Exception e)
{ {

134
src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs

@ -59,73 +59,73 @@ namespace TaskJob.Services
{ {
var filePath = fileSavePath + itm;//获取到导入的excel var filePath = fileSavePath + itm;//获取到导入的excel
var exten = Path.GetExtension(fileSavePath); var exten = Path.GetExtension(fileSavePath);
List<string> _errorList = new List<string>(); //List<string> _errorList = new List<string>();
var checkList = new List<ErrorExportDto>(); //var checkList = new List<ErrorExportDto>();
//var _chList = await _relrepository.GetAllAsync(GuidGenerator.Create(), true); ////var _chList = await _relrepository.GetAllAsync(GuidGenerator.Create(), true);
//var _chls = _chList.Select(p => p.SettleMaterialCode).Distinct(); ////var _chls = _chList.Select(p => p.SettleMaterialCode).Distinct();
List<string> _precodeList = new List<string>();// //List<string> _precodeList = new List<string>();//
if (exten.ToUpper() == ".TXT") //if (exten.ToUpper() == ".TXT")
{ //{
using (TextReader textReader = new StreamReader(filePath)) // using (TextReader textReader = new StreamReader(filePath))
{ // {
int i = 0; // int i = 0;
while (true) // while (true)
{ // {
string str = textReader.ReadLine(); // string str = textReader.ReadLine();
if (string.IsNullOrEmpty(str)) // if (string.IsNullOrEmpty(str))
{ // {
break; // break;
} // }
else // else
{ // {
try // try
{ // {
var _lst = str.Split(new char[] { '|' }).ToList(); // var _lst = str.Split(new char[] { '|' }).ToList();
string _settleyear = _lst[1].Trim(); // string _settleyear = _lst[1].Trim();
string _kENNCode = _lst[2].Trim(); // string _kENNCode = _lst[2].Trim();
string _chassisNumber = _lst[3].Trim(); // string _chassisNumber = _lst[3].Trim();
string _model = _lst[4].Trim(); // string _model = _lst[4].Trim();
DateTime _cP5A = DateTime.Parse(_lst[5].Trim()); // DateTime _cP5A = DateTime.Parse(_lst[5].Trim());
DateTime _cP7 = DateTime.Parse(_lst[6].Trim()); // DateTime _cP7 = DateTime.Parse(_lst[6].Trim());
string _materialCode = _lst[7].Trim(); // string _materialCode = _lst[7].Trim();
decimal _qty = decimal.Parse(_lst[8].Trim()); // decimal _qty = decimal.Parse(_lst[8].Trim());
string _settlementID = _lst[9].Trim(); // string _settlementID = _lst[9].Trim();
string _settlementSupplier = _lst[10].Trim(); // string _settlementSupplier = _lst[10].Trim();
_setls.Add(new Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount( // _setls.Add(new Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount(
Guid.NewGuid(), // Guid.NewGuid(),
Guid.NewGuid(), // Guid.NewGuid(),
_settleyear, // _settleyear,
_kENNCode, // _kENNCode,
_chassisNumber, // _chassisNumber,
_model, // _model,
_cP5A, // _cP5A,
_cP7, // _cP7,
_materialCode, // _materialCode,
_qty, // _qty,
_settlementID, // _settlementID,
_settlementSupplier, // _settlementSupplier,
DateTime.Now.Year.ToString(), // DateTime.Now.Year.ToString(),
DateTime.Now.Month.ToString(), // DateTime.Now.Month.ToString(),
_id, // _id,
version, // version,
DateTime.Now, // DateTime.Now,
Guid.NewGuid() // Guid.NewGuid()
)); // ));
} // }
catch // catch
{ // {
} // }
} // }
i++; // i++;
} // }
textReader.Close(); // textReader.Close();
} // }
} //}
else //else
{ //{
// _setls= _inputService.Input<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>(filePath); // _setls= _inputService.Input<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>(filePath);
var errorlist = new List<ErrorExportDto>(); var errorlist = new List<ErrorExportDto>();
var dtoList = _inputService.Input<SettleAccountImportDto>(filePath, null, errorlist); var dtoList = _inputService.Input<SettleAccountImportDto>(filePath, null, errorlist);
foreach (var dto in dtoList) foreach (var dto in dtoList)
{ {
@ -139,7 +139,7 @@ namespace TaskJob.Services
DateTime.Now.Month.ToString(), dto.SettleYear, _id, version, DateTime.Now, Guid.NewGuid()); DateTime.Now.Month.ToString(), dto.SettleYear, _id, version, DateTime.Now, Guid.NewGuid());
_setls.Add(_settleaccount); _setls.Add(_settleaccount);
} }
} //}
#region #region
//var errorFileName = "错误文件.xlsx"; //var errorFileName = "错误文件.xlsx";
//checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("ERP物料号{0}底盘号 {1}有重复", "11111111111", "22222222222"), string.Empty)); //checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("ERP物料号{0}底盘号 {1}有重复", "11111111111", "22222222222"), string.Empty));

Loading…
Cancel
Save