wanggang 1 year ago
parent
commit
81caf5716d
  1. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  2. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs
  3. 39
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  4. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
  5. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs
  6. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
  7. 5822
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230915035754_202309150001.Designer.cs
  8. 168
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230915035754_202309150001.cs
  9. 22
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

5
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs

@ -275,10 +275,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
}
public class UNSETTLED_DETAIL_DTO
{
[Display(Name ="结算分组号")]
public string GroupNum { set; get; }
[Display(Name = "零件号")]
public string LU { set; get; }
[Display(Name = "数量")]
public decimal Qty { set; get; }

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs

@ -184,7 +184,6 @@ public class ADJ_SERVICE : BASE_SERVICE
{
throw new UserFriendlyException($"导入数据为空","400");
}
foreach (var itm in p_list)
{
itm.KeyCode = itm.PN + itm.LU.Replace(" ", "").Trim();
@ -216,7 +215,6 @@ public class ADJ_SERVICE : BASE_SERVICE
//foreach (var p in errors1)
//{
// errorList.Add(new ERR_EXP_DTO() { Message = $"不能结算数据中存在{p.PN}数据,不能导入调整表" });
//}
break;
case EnumBusinessType.ZhiGongJianHBPO:
@ -224,7 +222,6 @@ public class ADJ_SERVICE : BASE_SERVICE
//foreach (var p in errors2)
//{
// errorList.Add(new ERR_EXP_DTO() { Message = $"不能结算数据中存在发货单{p.PN}数据,不能导入调整表" });
//}
break;
case EnumBusinessType.BeiJian:
@ -254,7 +251,6 @@ public class ADJ_SERVICE : BASE_SERVICE
//foreach (var p in errors6)
//{
// errorList.Add(new ERR_EXP_DTO() { Message = $"不能结算数据中存在发货单{p.PN}数据,不能导入调整表" });
//}
break;

39
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

@ -408,18 +408,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
_excel.Append(detail, "发票明细");
}
_excel.Append(m, "发票结算分组对应");//发票分组对应结算号
if (first.BusinessType == EnumBusinessType.JisBBAC || first.BusinessType == EnumBusinessType.JisHBPO)
{
_excel.Append(m, "发票结算分组对应");//发票分组对应结算号
}
if (first.BusinessType == EnumBusinessType.ZhiGongJianBBAC || first.BusinessType == EnumBusinessType.ZhiGongJianHBPO)
{
_excel.Append(unsettle, "未结零件结算汇总");
}
foreach (var itm in entities)
{
var mgroup =m.Where(p => p.InvbillNum == itm.InvbillNum).ToList();
var mgroup = m.Where(p => p.InvbillNum == itm.InvbillNum).ToList();
var adjp = adj.Where(p => p.InvBillNum == itm.InvbillNum).ToList();
var nolist = not.Where(p => p.InvBillNum == itm.InvbillNum).ToList();
var lsC = nolist.Where(p => p.Extend1 == "可结算")
@ -430,16 +430,17 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
p.InvDate,
p.InvBillNum,
p.InvGroupNum,
}).Select(p => new INVOICE_NOT_SETTLE_DTO() {
LU =p.Key.LU,
RealInvBillNum =p.Key.RealInvBillNum,
InvDate =p.Key.InvDate,
InvBillNum =p.Key.InvBillNum,
}).Select(p => new INVOICE_NOT_SETTLE_DTO()
{
LU = p.Key.LU,
RealInvBillNum = p.Key.RealInvBillNum,
InvDate = p.Key.InvDate,
InvBillNum = p.Key.InvBillNum,
InvGroupNum =p.Key.InvGroupNum,
Qty=p.Sum(itm=>itm.Qty)
InvGroupNum = p.Key.InvGroupNum,
Qty = p.Sum(itm => itm.Qty)
}).ToList();
}).ToList();
var lsN = nolist.Where(p => p.Extend1 == "不可结算").ToList()
.GroupBy(p => new
{
@ -448,7 +449,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
p.InvDate,
p.InvBillNum,
p.InvGroupNum,
}).Select(p => new INVOICE_NOT_SETTLE_DTO()
{
LU = p.Key.LU,
@ -476,15 +477,15 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
invnot.Qty = string.Empty;
ls.Add(invnot);
}
var entity= nolist.FirstOrDefault();
var disList = mgroup.Select(p => p.SettleGroupNum).Distinct().ToList();
var entity = nolist.FirstOrDefault();
var disList = mgroup.Select(p => p.SettleGroupNum).Distinct().ToList();
for (int i = 0; i < lineC; i++)//更新可结信息
{
ls[i].RealInvBillNum = entity.RealInvBillNum;
ls[i].InvDate = entity.InvDate;
ls[i].InvBillNum = entity.InvBillNum;
ls[i].InvGroupNum = entity.InvGroupNum;
// ls[i].SettleGroupNum = entity.SettleGroupNum;
// ls[i].SettleGroupNum = entity.SettleGroupNum;
ls[i].SettleLU = lsC[i].LU;
ls[i].SettleQty = lsC[i].Qty == null ? string.Empty : lsC[i].Qty.ToString();
}
@ -502,7 +503,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
ls[i].SettleGroupNum = disList[i];
}
if (first.BusinessType == EnumBusinessType.JisBBAC || first.BusinessType == EnumBusinessType.JisHBPO)
if (first.BusinessType == EnumBusinessType.JisBBAC || first.BusinessType == EnumBusinessType.JisHBPO)
{
_excel.Append(ls, "结算分组零件" + itm.InvbillNum);
}

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs

@ -268,7 +268,7 @@ public class PriceListAppService : SettleAccountApplicationBase<PriceList>
throw new UserFriendlyException($"无法启用!此记录启用时间区间与区间【{existPrice.BeginTime:yyyy-MM-dd}至{existPrice.EndTime:yyyy-MM-dd}】存在交集", "400");
}
}
_settleAccountDbContext.Set<PriceList>().Update(entity);
await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false);
var dto = ObjectMapper.Map<PriceList, PriceListDto>(entity);
return dto;
}

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs

@ -226,7 +226,7 @@ public class PriceListAppServiceBJ : SettleAccountApplicationBase<PriceListBJ>
throw new UserFriendlyException($"无法启用!此记录启用时间区间与区间【{existPriceBj.BeginDate:yyyy-MM-dd}至{existPriceBj.EndDate:yyyy-MM-dd}】存在交集", "400");
}
}
_settleAccountDbContext.Set<PriceListBJ>().Update(entity);
await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false);
var dto = ObjectMapper.Map<PriceListBJ, PriceListBJDto>(entity);
return dto;
}

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

@ -1761,8 +1761,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
parent: p_parentInvBillNum,
preTaxDiff: 0,
taxDiff: 0,
clientCode: string.Empty,
realAmt: 0
clientCode: "C004",
realAmt: realAmt
);
invbill.Site = dtos.FirstOrDefault().Site;

5822
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230915035754_202309150001.Designer.cs

File diff suppressed because it is too large

168
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230915035754_202309150001.cs

@ -0,0 +1,168 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202309150001 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "d58d671303b941739e1f15175d2885fa");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "11cb239191164161b43fe11f01e15ff1");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "cad1d2b24dfa40af9cef675a1483033e");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "757f9afcb2b0452e80903f64435c50e0");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "59396a1080ba4af7ab4d644f2db85992");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "8cb7e348ae5645748e52c3fd998fe792");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "1d37186ccfcf423b963303847322dacf");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "8cfaa28a391b4092a54c3e6bc038c96e");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "69697dd7feb94adc94f47e761b14be51");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "eb45100def7f4621bc511c4fb779d500");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "1efb2d30d2a34d929b10ad04ef3daaf9");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "4811f883bafc4103afa8d6d328d3a069");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "4ed3d65478ac4d0c8e32959f4d4d6948");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "e582b1ac0af543f5907bc6478f582d5d");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "0a984af35ced4b958987c92dc8d8b437");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "6e4f423b25754f45bb941d2bd83d0d01");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "0c087607218c4593bfe96bbf073a83bc");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "db9e52f68d34450e87e91298093f99e6");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "61c1715c5e4b41b3874ec46b1ff6a943");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "81c99bc19cf94f4c8d8643fb3ec703ac");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "b1d3eeaad1fe4f3abfaecec1d8101efa");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "ae4deb9271fa4f45b38a5eb8ecd6a9b5");
}
}
}

22
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

@ -4506,7 +4506,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
ConcurrencyStamp = "b1d3eeaad1fe4f3abfaecec1d8101efa",
ConcurrencyStamp = "eb45100def7f4621bc511c4fb779d500",
Cron = "0 0 8 26 *",
IsDisabled = false,
IsRunning = false,
@ -4516,7 +4516,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
ConcurrencyStamp = "4811f883bafc4103afa8d6d328d3a069",
ConcurrencyStamp = "d58d671303b941739e1f15175d2885fa",
Cron = "0 0/1 * * * ?",
IsDisabled = false,
IsRunning = false,
@ -4526,7 +4526,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
ConcurrencyStamp = "4ed3d65478ac4d0c8e32959f4d4d6948",
ConcurrencyStamp = "11cb239191164161b43fe11f01e15ff1",
Cron = "0 0/1 * * * ?",
IsDisabled = false,
IsRunning = false,
@ -4536,7 +4536,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
ConcurrencyStamp = "db9e52f68d34450e87e91298093f99e6",
ConcurrencyStamp = "1d37186ccfcf423b963303847322dacf",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4546,7 +4546,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
ConcurrencyStamp = "e582b1ac0af543f5907bc6478f582d5d",
ConcurrencyStamp = "cad1d2b24dfa40af9cef675a1483033e",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4556,7 +4556,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
ConcurrencyStamp = "6e4f423b25754f45bb941d2bd83d0d01",
ConcurrencyStamp = "59396a1080ba4af7ab4d644f2db85992",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4566,7 +4566,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
ConcurrencyStamp = "0a984af35ced4b958987c92dc8d8b437",
ConcurrencyStamp = "757f9afcb2b0452e80903f64435c50e0",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4576,7 +4576,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
ConcurrencyStamp = "ae4deb9271fa4f45b38a5eb8ecd6a9b5",
ConcurrencyStamp = "1efb2d30d2a34d929b10ad04ef3daaf9",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4586,7 +4586,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
ConcurrencyStamp = "0c087607218c4593bfe96bbf073a83bc",
ConcurrencyStamp = "8cb7e348ae5645748e52c3fd998fe792",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4596,7 +4596,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
ConcurrencyStamp = "81c99bc19cf94f4c8d8643fb3ec703ac",
ConcurrencyStamp = "69697dd7feb94adc94f47e761b14be51",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4606,7 +4606,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
ConcurrencyStamp = "61c1715c5e4b41b3874ec46b1ff6a943",
ConcurrencyStamp = "8cfaa28a391b4092a54c3e6bc038c96e",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,

Loading…
Cancel
Save