|
@ -22,6 +22,7 @@ using Win.Sfs.SettleAccount.Entities.BQ.Managers; |
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Temp; |
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Temp; |
|
|
using Win.Sfs.SettleAccount.Entities.Prices; |
|
|
using Win.Sfs.SettleAccount.Entities.Prices; |
|
|
using Win.Sfs.SettleAccount.Entities.TaskJobs; |
|
|
using Win.Sfs.SettleAccount.Entities.TaskJobs; |
|
|
|
|
|
using Win.Sfs.SettleAccount.ExportReports; |
|
|
using Win.Sfs.Shared.RepositoryBase; |
|
|
using Win.Sfs.Shared.RepositoryBase; |
|
|
|
|
|
|
|
|
namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
namespace Win.Sfs.SettleAccount.Entities.BQ |
|
@ -118,7 +119,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
if (errorList.Count() > 0) |
|
|
if (errorList.Count() > 0) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "请下载错误信息", fileName = await ExportErrorReportAsync(errorList) }); |
|
|
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "错误提示文件已下载,请打开文件查看", fileName = await ExportErrorReportAsync(errorList) }); |
|
|
|
|
|
|
|
|
; |
|
|
; |
|
|
} |
|
|
} |
|
@ -182,6 +183,19 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
/// <returns></returns>
|
|
|
/// <returns></returns>
|
|
|
public virtual async Task<IActionResult> ReissueInvoiceExtend(List<PUB_ADJ_DETAIL_DTO> p_list) |
|
|
public virtual async Task<IActionResult> ReissueInvoiceExtend(List<PUB_ADJ_DETAIL_DTO> p_list) |
|
|
{ |
|
|
{ |
|
|
|
|
|
var errorlist = p_list.GroupBy(p => new { p.PN, p.LU }).Where(p => p.Count() > 1).Select(p => new { p.Key.PN, p.Key.LU }).ToList(); |
|
|
|
|
|
|
|
|
|
|
|
List<ERR_EXP_DTO> errors = new List<ERR_EXP_DTO>(); |
|
|
|
|
|
|
|
|
|
|
|
foreach (var itm in errorlist) |
|
|
|
|
|
{ |
|
|
|
|
|
errors.Add(new ERR_EXP_DTO() { Message = $"零件号{itm.LU},标识号(生产码){itm.PN}有重复数据!" }); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (errors.Count > 0) |
|
|
|
|
|
{ |
|
|
|
|
|
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "错误提示文件已下载,请打开文件查看", fileName = await ExportErrorReportAsync(errors) }); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var adjlist = ObjectMapper.Map<List<PUB_ADJ_DETAIL_DTO>, List<PUB_ADJ_DETAIL>>(p_list); |
|
|
var adjlist = ObjectMapper.Map<List<PUB_ADJ_DETAIL_DTO>, List<PUB_ADJ_DETAIL>>(p_list); |
|
|
if (adjlist == null && adjlist.Count == 0) |
|
|
if (adjlist == null && adjlist.Count == 0) |
|
@ -248,7 +262,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
var errorList = await CheckInvoiceGenerationRules(entitys, priceList, inv.BusinessType); |
|
|
var errorList = await CheckInvoiceGenerationRules(entitys, priceList, inv.BusinessType); |
|
|
if (errorList.Count() > 0) |
|
|
if (errorList.Count() > 0) |
|
|
{ |
|
|
{ |
|
|
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "请下载错误信息", fileName = await ExportErrorReportAsync(errorList) }); |
|
|
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "错误提示文件已下载,请打开文件查看", fileName = await ExportErrorReportAsync(errorList) }); |
|
|
} |
|
|
} |
|
|
// var dto1s = ObjectMapper.Map<List<HBPO_CAN_SA_DETAIL>, List<HBPO_CAN_SA_DETAIL_DTO>>(entitys);
|
|
|
// var dto1s = ObjectMapper.Map<List<HBPO_CAN_SA_DETAIL>, List<HBPO_CAN_SA_DETAIL_DTO>>(entitys);
|
|
|
var q = from d in entitys |
|
|
var q = from d in entitys |
|
|