|
@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Authorization; |
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
using Microsoft.CodeAnalysis.CSharp.Syntax; |
|
|
using Microsoft.CodeAnalysis.CSharp.Syntax; |
|
|
using Microsoft.EntityFrameworkCore; |
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
|
|
using NetTaste; |
|
|
using NPOI.HPSF; |
|
|
using NPOI.HPSF; |
|
|
using SettleAccount.Domain.BQ; |
|
|
using SettleAccount.Domain.BQ; |
|
|
using System; |
|
|
using System; |
|
@ -225,19 +226,14 @@ 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) |
|
|
var errorlist = await CheckRepeat(p_list); |
|
|
|
|
|
if (errorlist.Count > 0) |
|
|
{ |
|
|
{ |
|
|
errors.Add(new ERR_EXP_DTO() { Message=$"零件号{itm.LU},标识号(生产码){itm.PN}有重复数据!" }); |
|
|
|
|
|
} |
|
|
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "错误提示文件已下载,请打开文件查看", fileName = await ExportErrorReportAsync(errorlist) }); |
|
|
|
|
|
|
|
|
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); |
|
|