Browse Source

解决调整表没有ID

master
学 赵 1 year ago
parent
commit
1efce7b5b1
  1. 66
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/scripts/README.md
  2. 11
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs
  3. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs
  4. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs
  5. 13
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs
  6. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
  7. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_ADJ_DETAIL.cs

66
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/scripts/README.md

@ -700,10 +700,76 @@ deallocate mycursor
GO
/* 为了防止任何可能出现的数据丢失问题,您应该先仔细检查此脚本,然后再在数据库设计器的上下文之外运行此脚本。*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
ALTER TABLE dbo.Set_HBPO_SE_EDI ADD
State int NULL
GO
ALTER TABLE dbo.Set_HBPO_SE_EDI SET (LOCK_ESCALATION = TABLE)
GO
COMMIT
/* 为了防止任何可能出现的数据丢失问题,您应该先仔细检查此脚本,然后再在数据库设计器的上下文之外运行此脚本。*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
ALTER TABLE dbo.Set_HBPO_SE_EDI ADD
State int NULL
GO
ALTER TABLE dbo.Set_HBPO_SE_EDI ADD CONSTRAINT
DF_Set_HBPO_SE_EDI_State DEFAULT 0 FOR State
GO
ALTER TABLE dbo.Set_HBPO_SE_EDI SET (LOCK_ESCALATION = TABLE)
GO
COMMIT
/* 为了防止任何可能出现的数据丢失问题,您应该先仔细检查此脚本,然后再在数据库设计器的上下文之外运行此脚本。*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
ALTER TABLE dbo.Set_BBAC_SE_EDI ADD
State int NULL
GO
ALTER TABLE dbo.Set_BBAC_SE_EDI ADD CONSTRAINT
DF_Set_HBPO_SE_EDI_State DEFAULT 0 FOR State
GO
ALTER TABLE dbo.Set_HBPO_SE_EDI SET (LOCK_ESCALATION = TABLE)
GO
COMMIT

11
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs

@ -344,9 +344,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var first = p_list.FirstOrDefault();
var invbillnum = first.InvBillNum;
var version = int.Parse(DateTime.Now.ToString("yyyymm"));
var inv = await GetInvoiceGroupByInvBillNum(invbillnum).ConfigureAwait(false);
var settle = await _bbacMng.GetMainAsync(inv.InvGroupNum).ConfigureAwait(false);
@ -375,10 +372,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var relist= relationList.GroupBy(p => new { p.SettleMaterialCode, p.ErpMaterialCode }).Select(p => p.FirstOrDefault()).ToList();
foreach (var itm in adjlist)
{
itm.SetId(GuidGenerator.Create());
bbaclist.Add(new BBAC_CAN_SA_DETAIL(
guid: itm.Id,
guid: GuidGenerator.Create(),
keyCode: itm.KeyCode,
version: itm.Version,
billNum: itm.InvGroupNum,

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs

@ -364,6 +364,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
foreach (var itm in adjlist)
{
itm.SetId(GuidGenerator.Create());
hbpolist.Add(new HBPO_CAN_SA_DETAIL(
guid: GuidGenerator.Create(),
keyCode: itm.KeyCode,

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs

@ -25,6 +25,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
HBPO_PD_DETAIL, HBPO_PD_DETAIL_DTO, HBPO_PD_REQ_DTO,
HBPO_PD_DETAIL_REQ_DTO, HBPO_PD_DETAIL_EXP_DTO>
{
public HBPO_PD_SERVICE(INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> bbacSecRepository, INormalEfCoreRepository<HBPO_SEC_DETAIL, Guid> hbpoSecRepository, INormalEfCoreRepository<PUB_SEC_DETAIL, Guid> pubSecRepository, IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<HBPO_PD, Guid> repository, VmiAppService vimservice, INormalEfCoreRepository<HBPO_PD_DETAIL, Guid> detailRepository, TaskJobService service, INormalEfCoreRepository<INVOICE_GRP, Guid> invRepository) : base(bbacSecRepository, hbpoSecRepository, pubSecRepository, excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository, service, invRepository)
{
}

13
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs

@ -303,18 +303,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
foreach (var itm in adjlist)
{
//{ "ContractDocID":"2200674763",
// "DeliveryNumber":"180054628",
// "VendorCode":"15663496",
// "VendorName":"",
// "PO":"4500028814",
// "DeliveryIndexNumber":
// "5600153638",
// "PartName":"\u9970\u4EF6",
// "PartGroup":"EXT",
// "PN":"15663496_231237",
// "SettleDate":"06/01/2023 00:00:00"
// }
itm.SetId(GuidGenerator.Create());
var entity = new PUB_CAN_SA_DETAIL(
guid: GuidGenerator.Create(),
keyCode: itm.KeyCode,

1
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

@ -1304,6 +1304,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var adjdetails = p_adjlist.Where(p => ls.Contains(p.GroupNum)).ToList();
foreach (var detail in adjdetails)
{
detail.InvBillNum = key;
adjlist.Add(detail);
}

6
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_ADJ_DETAIL.cs

@ -70,6 +70,12 @@ namespace SettleAccount.Domain.BQ
[Display(Name = "是否是买单件")]
public bool IsMaiDan { get; set; }
public void SetId(Guid guid)
{
Id= guid;
}
public PUB_ADJ_DETAIL(Guid id, string keyCode, int version, string settleBillNum, string lU, string pN,
string site, decimal qty, string extend1, decimal price, string invGroupNum, DateTime settleDate,
EnumBusinessType businessType, string groupNum, string oldinv, string inv, string partcode)

Loading…
Cancel
Save