diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_CAN_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_CAN_SA_DTO.cs
index 61de0431..c640bd35 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_CAN_SA_DTO.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_CAN_SA_DTO.cs
@@ -32,7 +32,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///状态
///
[Display(Name = "状态")]
- public string State { get; set; }
+ public EnumBusinessType State { get; set; }
///
///明细记录行数
///
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_CAN_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_CAN_SA_DTO.cs
index ed09fc50..afcabfce 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_CAN_SA_DTO.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_CAN_SA_DTO.cs
@@ -32,7 +32,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///状态
///
[Display(Name = "状态")]
- public string State { get; set; }
+ public EnumBusinessType State { get; set; }
///
///明细记录行数
///
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_ADJ_DETAIL_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_ADJ_DETAIL_DTO.cs
index 434afff1..18a55fd1 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_ADJ_DETAIL_DTO.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_ADJ_DETAIL_DTO.cs
@@ -39,6 +39,11 @@ public class PUB_ADJ_DETAIL_DTO : EntityDto
public decimal Qty { get; set; }
[Display(Name = "结算分组")]
public string GroupNum { get; set; }
+
+ [Display(Name = "键值")]
+ public string KeyCode { get; set; }
+
+
}
public class PUB_ADJ_DETAIL_EXP_DTO
{
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs
index 2ba35ed6..292da981 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs
@@ -1,8 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Linq.Dynamic.Core;
using System.Text;
using System.Threading.Tasks;
+using DocumentFormat.OpenXml.Bibliography;
using DocumentFormat.OpenXml.Office2010.Excel;
using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Authorization;
@@ -19,6 +21,7 @@ using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
+using Win.Sfs.SettleAccount.Entities.BQ.Temp;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.MaterialRelationships;
@@ -36,6 +39,10 @@ public class ADJ_SERVICE : BASE_SERVICE
protected readonly BaseDomainService _baseDomainService;
protected readonly INormalEfCoreRepository _invRepository;
protected readonly INormalEfCoreRepository _relRepository;
+ protected readonly INormalEfCoreRepository _bbacRepository;
+ protected readonly INormalEfCoreRepository _pubRepository;
+ protected readonly INormalEfCoreRepository _hbpoRepository;
+
public ADJ_SERVICE(
INormalEfCoreRepository repository,
@@ -44,7 +51,10 @@ public class ADJ_SERVICE : BASE_SERVICE
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager,
INormalEfCoreRepository invRepository,
- INormalEfCoreRepository relRepository
+ INormalEfCoreRepository relRepository,
+ INormalEfCoreRepository bbacRepository,
+ INormalEfCoreRepository pubRepository,
+ INormalEfCoreRepository hbpoRepository
)
: base(excelImportService, snowflakeIdGenerator, commonManager)
@@ -53,6 +63,9 @@ public class ADJ_SERVICE : BASE_SERVICE
_invRepository = invRepository;
_repository = repository;
_baseDomainService = baseDomainService;
+ _bbacRepository = bbacRepository;
+ _pubRepository = pubRepository;
+ _hbpoRepository= hbpoRepository;
}
///
///查询明细
@@ -171,7 +184,84 @@ public class ADJ_SERVICE : BASE_SERVICE
[DisableRequestSizeLimit]
public async Task CheckImport(List p_list)
{
+ if (p_list.Count == 0)
+ {
+ throw new UserFriendlyException($"导入数据为空");
+ }
+
+ foreach (var itm in p_list)
+ {
+ itm.KeyCode = itm.PN + itm.LU.Replace(" ", "").Trim();
+ }
+ var pnlist=p_list.Select(p => p.PN).Distinct();
+
+ var keylist = p_list.Select(p => p.KeyCode).Distinct();
List errorList = new List();
+ var first=p_list.FirstOrDefault();
+ if (first != null)
+ {
+ var inv = _invRepository.Where(p => p.InvbillNum == first.InvBillNum).FirstOrDefault();
+ string keyname = string.Empty;
+ List adjlist = new List();
+
+ switch (inv.BusinessType)
+ {
+ case EnumBusinessType.MaiDanJianHBPO:
+
+ break;
+ case EnumBusinessType.MaiDanJianBBAC:
+
+
+ break;
+ case EnumBusinessType.ZhiGongJianBBAC:
+ var errors1 = _pubRepository.Where(p => pnlist.Contains(p.PN));
+ foreach (var p in errors1)
+ {
+ errorList.Add(new ERR_EXP_DTO() { Message = $"不能结算数据中存在{p.PN}数据,不能导入调整表" });
+
+ }
+ break;
+ case EnumBusinessType.ZhiGongJianHBPO:
+ var errors2 = _pubRepository.Where(p => pnlist.Contains(p.PN));
+ foreach (var p in errors2)
+ {
+ errorList.Add(new ERR_EXP_DTO() { Message = $"不能结算数据中存在发货单{p.PN}数据,不能导入调整表" });
+
+ }
+ break;
+ case EnumBusinessType.BeiJian:
+ var errors3 = _pubRepository.Where(p => pnlist.Contains(p.PN));
+ foreach (var p in errors3)
+ {
+ errorList.Add(new ERR_EXP_DTO() { Message = $"不能结算数据中存在交付识别号{p.PN}数据,不能导入调整表" });
+ }
+ break;
+ case EnumBusinessType.JisBBAC:
+ var errors4 = _bbacRepository.Where(p => keylist.Contains(p.KeyCode));
+ foreach (var p in errors4)
+ {
+ errorList.Add(new ERR_EXP_DTO() {Message=$"不能结算数据中存在生产码{p.PN}结算零件{p.PartCode},不能导入调整表" });
+ }
+ break;
+ case EnumBusinessType.JisHBPO:
+ var errors5=_hbpoRepository.Where(p => keylist.Contains(p.KeyCode));
+ foreach (var p in errors5)
+ {
+ errorList.Add(new ERR_EXP_DTO() { Message = $"不能结算数据中存在生产码{p.PN}结算零件{p.PartCode},不能导入调整表" });
+ }
+ break;
+ case EnumBusinessType.YinDuJian:
+ var errors6=_pubRepository.Where(p => pnlist.Contains(p.PN));
+ foreach (var p in errors6)
+ {
+ errorList.Add(new ERR_EXP_DTO() { Message = $"不能结算数据中存在发货单{p.PN}数据,不能导入调整表" });
+
+ }
+
+ break;
+
+ }
+ }
//ExportImporter _exportImporter = new ExportImporter();
//var result = await _exportImporter.UploadExcelImport(files, _excelImportService);
//if (result.Count == 0)
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
index 038f321a..89c383c0 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
@@ -150,9 +150,12 @@ namespace Win.Sfs.SettleAccount.Bases
var wdtos = ObjectMapper.Map, List>(w);
var s = await _sRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount);
var sdtos = ObjectMapper.Map, List>(s);
+ var adjs = await _adjRepository.GetListByFilterAsync(input.Filters);
+ var adjdtos = ObjectMapper.Map, List>(adjs);
entity.INVOICE_NOT_SETTLE = sdtos;
entity.INVOICE_WAIT_DETAIL = wdtos;
entity.INVOICE_MAP_GROUP = mdtos;
+ entity.ADJ_DETAIL = adjdtos;
return entity;
}
///
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs
index d7b992af..5642acaf 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs
@@ -47,9 +47,9 @@ namespace Win.Sfs.SettleAccount.Bases
where TRequestDetailInput : RequestInputBase
where TEntityDetailExportDto : class, new()
{
- private readonly VmiAppService _vimservice;
- private readonly INormalEfCoreRepository _repository;
- private readonly INormalEfCoreRepository _detailRepository;
+ protected readonly VmiAppService _vimservice;
+ protected readonly INormalEfCoreRepository _repository;
+ protected readonly INormalEfCoreRepository _detailRepository;
public PD_SERVICE(
@@ -125,33 +125,9 @@ namespace Win.Sfs.SettleAccount.Bases
//[Route("generateinvoice")]
public virtual async Task ApprovalPassed(List p_list)
{
+
//_repository.Where(p => p_list.Contains(p.BillNum));
- var detailist=_detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
- if (detailist != null && detailist.Count > 0)
- {
- foreach (var itm in detailist)
- {
- await _vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
- {
- BillTime=itm.CreationTime,
- ChangedTime=DateTime.Now,
- Qty = itm.Qty,
- DeliverTime = itm.CreationTime,
- LogType= Entities.BQ.Vmi.VmiLogType.Type200,
- ChangedQty=itm.Qty,
- ChangedType=VmiType.Out,
- SubBillType=EnumDeliverSubBillType.小件BBAC,
- BillType=EnumDeliverBjBmpBillType.JIS件,
- PartCode=itm.LU,
- SettlementVinCode = itm.PN,
- PartCode2 = itm.LU,
- CustomerPartCode=itm.LU,
- VinCode=itm.PN,
- OrderNum=itm.GroupNum,
- ErpToLoc="C0001"
- }) ;
- }
- }
+
//public VmiLog()
//{
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs
index 2f8d7b73..1934be47 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs
@@ -81,7 +81,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
throw new UserFriendlyException($"选择发票:{p_invbillnum}对应的可结算单不在请检查!");
}
-
version = settle.Version;
if (inv != null)
{
@@ -191,8 +190,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
///
public virtual async Task ReissueInvoiceExtend(List p_list)
{
-
-
var adjlist = ObjectMapper.Map, List>(p_list);
if (adjlist == null && adjlist.Count == 0)
{
@@ -200,19 +197,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
var first = p_list.FirstOrDefault();
var invbillnum = first.InvBillNum;
- //var mappingList= await GetMapGroupAsync(p_invbillnum);//发票对应结算分组
- //if (mappingList != null && mappingList.Count() > 0)
- //{
+
var version=int.Parse(DateTime.Now.ToString("yyyymm"));
- //var gList = mappingList.Select(p => p.SettleGroupNum).ToList();//获取发票所有结算分组
+
var inv= await GetInvoiceGroupByInvBillNum(invbillnum);
var settle =await _bbacMng.GetMainAsync(inv.InvGroupNum);
if(settle==null)
{
- throw new UserFriendlyException( $"选择发票:{invbillnum}对应的可结算单不在请检查!");
-
+ throw new UserFriendlyException( $"选择发票:{invbillnum}对应的可结算单不粗拿在在请检查!");
}
version=settle.Version;
@@ -226,8 +220,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
throw new UserFriendlyException( $"选择发票:{invbillnum}状态在财务审核后可以报废重开,之前不能重开可以退回!");
}
-
- var bbaclist = await _bbacMng.GetContainsAsync(inv.InvbillNum);//结算分组对应结算零件
+ var bbaclist = await _bbacMng.GetContainsAsync(inv.InvbillNum);//发票对应结算零件
// var adjlist = await _adjRepository.Where(p => p.OldInvBillNum == inv.InvbillNum).ToListAsync();//调整表明细
if (adjlist != null && adjlist.Count() > 0)
{
@@ -427,16 +420,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
if (invbillnum.Substring(0, 3) == "INV")//一次开票重开
{
var entities=await ReissueFirstInvoiceExtend(bbaclist, adjlist, dtos, version, invbillnum);
-
- ls= ObjectMapper.Map, List>(entities);
-
-
+ ls= ObjectMapper.Map, List>(entities);
}
else//二次开票
{
var entities = await ReissueSecInvoiceExtend(bbaclist, adjlist, dtos, version, invbillnum);
- ls=ObjectMapper.Map, List>(entities);
-
+ ls=ObjectMapper.Map, List>(entities);
}
}
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
index 8dbfbd69..45ebe6d5 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
@@ -11,7 +11,10 @@ using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.CommonManagers;
+using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
+using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
+using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
@@ -28,5 +31,38 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public BBAC_PD_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository repository, VmiAppService vimservice, INormalEfCoreRepository detailRepository) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
{
}
+
+ public override async Task ApprovalPassed(List p_list)
+ {
+ var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
+ if (detailist != null && detailist.Count > 0)
+ {
+ foreach (var itm in detailist)
+ {
+ await _vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
+ {
+ BillTime = itm.CreationTime,
+ ChangedTime = DateTime.Now,
+ Qty = itm.Qty,
+ DeliverTime = itm.CreationTime,
+ LogType = Entities.BQ.Vmi.VmiLogType.Type200,
+ ChangedQty = itm.Qty,
+ ChangedType = VmiType.Out,
+ SubBillType = EnumDeliverSubBillType.小件BBAC,
+ BillType = EnumDeliverBjBmpBillType.JIS件,
+ PartCode = itm.LU,
+ SettlementVinCode = itm.PN,
+ PartCode2 = itm.LU,
+ CustomerPartCode = itm.LU,
+ VinCode = itm.PN,
+ OrderNum = itm.GroupNum,
+ ErpToLoc = "C0001"
+ });
+ }
+ }
+ return ApplicationConsts.SuccessStr;
+
+
+ }
}
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs
index 5690e5f4..9ad24e50 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs
@@ -15,8 +15,11 @@ using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.CommonManagers;
+using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
+using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
+using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
@@ -61,5 +64,41 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public HBPO_PD_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository repository, VmiAppService vimservice, INormalEfCoreRepository detailRepository) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
{
}
+
+ public override async Task ApprovalPassed(List p_list)
+ {
+ var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
+ if (detailist != null && detailist.Count > 0)
+ {
+ foreach (var itm in detailist)
+ {
+ await _vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
+ {
+ BillTime = itm.CreationTime,
+ ChangedTime = DateTime.Now,
+ Qty = itm.Qty,
+ DeliverTime = itm.CreationTime,
+ LogType = Entities.BQ.Vmi.VmiLogType.Type200,
+ ChangedQty = itm.Qty,
+ ChangedType = VmiType.Out,
+ SubBillType = EnumDeliverSubBillType.小件BBAC,
+ BillType = EnumDeliverBjBmpBillType.JIS件,
+ PartCode = itm.LU,
+ SettlementVinCode = itm.PN,
+ PartCode2 = itm.LU,
+ CustomerPartCode = itm.LU,
+ VinCode = itm.PN,
+ OrderNum = itm.GroupNum,
+ ErpToLoc = "C0001"
+ });
+ }
+ }
+ return ApplicationConsts.SuccessStr;
+
+
+ }
+
+
+
}
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs
index 95977867..7aea003c 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs
@@ -11,8 +11,11 @@ using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.CommonManagers;
+using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
+using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
+using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
@@ -25,6 +28,38 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
public PUB_PD_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository repository, VmiAppService vimservice, INormalEfCoreRepository detailRepository) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
{
+ }
+ public override async Task ApprovalPassed(List p_list)
+ {
+ var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
+ if (detailist != null && detailist.Count > 0)
+ {
+ foreach (var itm in detailist)
+ {
+ await _vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
+ {
+ BillTime = itm.CreationTime,
+ ChangedTime = DateTime.Now,
+ Qty = itm.Qty,
+ DeliverTime = itm.CreationTime,
+ LogType = Entities.BQ.Vmi.VmiLogType.Type200,
+ ChangedQty = itm.Qty,
+ ChangedType = VmiType.Out,
+ SubBillType = EnumDeliverSubBillType.小件BBAC,
+ BillType = EnumDeliverBjBmpBillType.JIS件,
+ PartCode = itm.LU,
+ SettlementVinCode = itm.PN,
+ PartCode2 = itm.LU,
+ CustomerPartCode = itm.LU,
+ VinCode = itm.PN,
+ OrderNum = itm.GroupNum,
+ ErpToLoc = "C0001"
+ });
+ }
+ }
+ return ApplicationConsts.SuccessStr;
+
+
}
}
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs
index 900e1ef7..bcce0e6e 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs
@@ -575,7 +575,7 @@ namespace SettleAccount.Bases
///
public int Version { set; get; }
///
- /// 结算单号
+ /// 发票单号
///
public string BillNum { set; get; }
///
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs
index a884a66c..e09a7335 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs
@@ -54,7 +54,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{
foreach (var itm in priceErrors)
{
- errors.Add($"发货单号或交付识别号零件{itm.LU}结算日期{itm.SettleDate}无价格区间数据");
+ errors.Add($"生产号{itm.PN}零件{itm.LU}结算日期{itm.SettleDate}无价格区间数据");
}
}
if (errors.Count > 0)
@@ -63,8 +63,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
-
-
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
var _entity = new BBAC_CAN_SA();
_entity.BillNum = billNumber;
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_NOT_SA_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_NOT_SA_MNG.cs
index 39c0b784..57207ce2 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_NOT_SA_MNG.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_NOT_SA_MNG.cs
@@ -55,9 +55,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{
foreach (var itm in priceErrors)
{
- errors.Add($"发货单号或交付识别号零件{itm.LU}结算日期{itm.SettleDate}无价格区间数据");
+ errors.Add($"生产号{itm.PN}零件{itm.LU}结算日期{itm.SettleDate}无价格区间数据");
}
}
+ var ls=p_list.Select(p => p.Site.Substring(0, 3)).Distinct().ToList();
+ if(ls.Count>1)
+ {
+ errors.Add($"生成结算数据有多个地点数据{string.Join(",",ls)}");
+ }
if (errors.Count > 0)
{
return errors;
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs
index e9af0582..29e0a34e 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs
@@ -778,7 +778,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
adjdetails.Add(detail);
}
}
-
var detailDtos = dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p => new { p.InvGroupNum, p.PartCode, p.Price, p.BeginDate, p.EndDate, p.ContractDocID })
.Select(itm => new
{
@@ -1244,8 +1243,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
inv.InvoiceState = InvoiceBillState.报废;
-
-
switch (inv.BusinessType)
{
case EnumBusinessType.MaiDanJianHBPO: