mahao 1 year ago
parent
commit
5101d70cb7
  1. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_ADJ_DETAIL_DTO.cs
  2. 56
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs
  3. 5530
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230819034920_202308190002.Designer.cs
  4. 54
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230819034920_202308190002.cs
  5. 10
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

2
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_ADJ_DETAIL_DTO.cs

@ -44,7 +44,7 @@ public class PUB_ADJ_DETAIL_DTO : EntityDto<Guid>
[Display(Name = "键值")]
public string KeyCode { get; set; }
[Display(Name = "价格")]
public string Price { get; set; }
public decimal Price { get; set; }

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

@ -204,7 +204,7 @@ public class ADJ_SERVICE : BASE_SERVICE
{
itm.KeyCode = itm.PN + itm.LU.Replace(" ", "").Trim();
}
var pnlist = p_list.Select(p => p.PN).Distinct();
var pnlist = p_list.Select(p => p.PN).Distinct().ToList();
int flag = 0;
var keylist = p_list.Select(p => p.KeyCode).Distinct();
List<ERR_EXP_DTO> errorList = new List<ERR_EXP_DTO>();
@ -223,28 +223,28 @@ public class ADJ_SERVICE : BASE_SERVICE
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}数据,不能导入调整表" });
//var errors1 = _pubRepository.Where(p => pnlist.Contains(p.PN)).ToList();
//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}数据,不能导入调整表" });
//var errors2 = _pubRepository.Where(p => pnlist.Contains(p.PN)).ToList();
//foreach (var p in errors2)
//{
// errorList.Add(new ERR_EXP_DTO() { Message = $"不能结算数据中存在发货单{p.PN}数据,不能导入调整表" });
}
//}
break;
case EnumBusinessType.BeiJian:
flag = 1;
var errors3 = _pubRepository.Where(p => pnlist.Contains(p.PN));
foreach (var p in errors3)
{
errorList.Add(new ERR_EXP_DTO() { Message = $"不能结算数据中存在交付识别号{p.PN}数据,不能导入调整表" });
}
//var errors3 = _pubRepository.Where(p => pnlist.Contains(p.PN)).ToList();
//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));
@ -254,19 +254,19 @@ public class ADJ_SERVICE : BASE_SERVICE
}
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},不能导入调整表" });
}
//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}数据,不能导入调整表" });
//var errors6 = _pubRepository.Where(p => pnlist.Contains(p.PN));
//foreach (var p in errors6)
//{
// errorList.Add(new ERR_EXP_DTO() { Message = $"不能结算数据中存在发货单{p.PN}数据,不能导入调整表" });
}
//}
break;
}
@ -313,7 +313,7 @@ public class ADJ_SERVICE : BASE_SERVICE
Qty = d.Qty,
GroupNum = d.GroupNum,
KeyCode = d.KeyCode,
Price = d.Price,
Price = p.Price,
};
ls = inner.ToList();
@ -336,7 +336,7 @@ public class ADJ_SERVICE : BASE_SERVICE
Qty = d.Qty,
GroupNum = d.GroupNum,
KeyCode = d.KeyCode,
Price = d.Price,
Price = p.Price,
};
ls = inner.ToList();

5530
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230819034920_202308190002.Designer.cs

File diff suppressed because it is too large

54
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230819034920_202308190002.cs

@ -0,0 +1,54 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202308190002 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("d88ebd3a-5738-4f40-8a85-a08d08bbdfea"));
migrationBuilder.AddColumn<string>(
name: "PoBillNum",
table: "Set_PUB_NOT_SA_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "PoBillNum",
table: "Set_PUB_CAN_SA_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("3fc80398-34df-4288-9ad7-37db79c80192"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "b792ebaa809446988e3a5e7887e75ecb", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("3fc80398-34df-4288-9ad7-37db79c80192"));
migrationBuilder.DropColumn(
name: "PoBillNum",
table: "Set_PUB_NOT_SA_DETAIL");
migrationBuilder.DropColumn(
name: "PoBillNum",
table: "Set_PUB_CAN_SA_DETAIL");
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("d88ebd3a-5738-4f40-8a85-a08d08bbdfea"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "fd1676c11eee4c8b98e41eb8956d04ca", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
}
}

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

@ -3050,6 +3050,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("PartCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("PoBillNum")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,2)");
@ -3146,6 +3149,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("PartCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("PoBillNum")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,2)");
@ -4543,10 +4549,10 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasData(
new
{
Id = new Guid("d88ebd3a-5738-4f40-8a85-a08d08bbdfea"),
Id = new Guid("3fc80398-34df-4288-9ad7-37db79c80192"),
BillTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
BillType = 1,
ConcurrencyStamp = "fd1676c11eee4c8b98e41eb8956d04ca",
ConcurrencyStamp = "b792ebaa809446988e3a5e7887e75ecb",
DeliverTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
ErpToLoc = "ErpToLoc",
OrderNum = "OrderNum",

Loading…
Cancel
Save