|
|
@ -133,7 +133,7 @@ public class ADJ_SERVICE : BASE_SERVICE |
|
|
|
errorList.Add( |
|
|
|
new ErrorExportDto() { ItemCode = $"{itm}", Message = $"[客户零件关系表]不存在客户零件号{itm}" }); |
|
|
|
} |
|
|
|
var errorEntitylist = await _baseDomainService.CheckPriceList(entityList); |
|
|
|
var errorEntitylist = await _baseDomainService.CheckPriceList(entityList,"1040"); |
|
|
|
if (errorEntitylist.Count > 0) |
|
|
|
{ |
|
|
|
foreach (var itm in errorEntitylist) |
|
|
@ -193,10 +193,14 @@ public class ADJ_SERVICE : BASE_SERVICE |
|
|
|
int flag = 0; |
|
|
|
var keylist = p_list.Select(p => p.KeyCode).Distinct(); |
|
|
|
List<ERR_EXP_DTO> errorList = new List<ERR_EXP_DTO>(); |
|
|
|
//var inv = _invRepository.Where(p => p.InvbillNum == first.InvBillNum).FirstOrDefault();
|
|
|
|
|
|
|
|
var first = p_list.FirstOrDefault(); |
|
|
|
var inv = _invRepository.Where(p => p.InvbillNum == first.InvBillNum).FirstOrDefault(); |
|
|
|
|
|
|
|
if (first != null) |
|
|
|
{ |
|
|
|
var inv = _invRepository.Where(p => p.InvbillNum == first.InvBillNum).FirstOrDefault(); |
|
|
|
|
|
|
|
string keyname = string.Empty; |
|
|
|
List<PUB_ADJ_DETAIL> adjlist = new List<PUB_ADJ_DETAIL>(); |
|
|
|
|
|
|
@ -257,6 +261,10 @@ public class ADJ_SERVICE : BASE_SERVICE |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var entityList = ObjectMapper.Map<List<PUB_ADJ_DETAIL_DTO>, List<PUB_ADJ_DETAIL>>(p_list); |
|
|
|
var codelist = entityList.Select(p => p.LU).ToList(); |
|
|
|
var errors = await _baseDomainService.CheckBase(codelist, new BASE_CONF() { IsRelationShip = true }); |
|
|
@ -265,7 +273,7 @@ public class ADJ_SERVICE : BASE_SERVICE |
|
|
|
errorList.Add( |
|
|
|
new ERR_EXP_DTO() { ItemCode = $"{itm}", Message = $"[客户零件关系表]不存在客户零件号{itm}" }); |
|
|
|
} |
|
|
|
var errorEntitylist = await _baseDomainService.CheckPriceList(entityList); |
|
|
|
var errorEntitylist = await _baseDomainService.CheckPriceList(entityList,inv.Site); |
|
|
|
if (errorEntitylist.Count > 0) |
|
|
|
{ |
|
|
|
foreach (var itm in errorEntitylist) |
|
|
@ -275,7 +283,7 @@ public class ADJ_SERVICE : BASE_SERVICE |
|
|
|
} |
|
|
|
if (errorList.Count > 0) |
|
|
|
{ |
|
|
|
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message= "请下载错误信息", fileName = await ExportErrorReportAsync(errorList) }); |
|
|
|
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, fileName = await ExportErrorReportAsync(errorList) }); |
|
|
|
|
|
|
|
} |
|
|
|
List<PUB_ADJ_DETAIL_DTO> ls = new List<PUB_ADJ_DETAIL_DTO>(); |
|
|
@ -310,7 +318,7 @@ public class ADJ_SERVICE : BASE_SERVICE |
|
|
|
var inner = from d in p_list |
|
|
|
join p in pricelist on d.LU equals p.LU |
|
|
|
where |
|
|
|
d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime |
|
|
|
d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime && p.ClientCode== inv.Site |
|
|
|
select new PUB_ADJ_DETAIL_DTO() |
|
|
|
{ |
|
|
|
InvBillNum = d.InvBillNum, |
|
|
|