Browse Source

发货尾箱数和最大UID问题

master
mingliang.tang 2 years ago
parent
commit
9e984aa6b0
  1. 2
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/AsnBackgroundWorker/AsnBackgroundWorker.cs
  2. 5
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Asns/AsnFactory.cs
  3. 82
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Console/Program.cs
  4. 3
      WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Asns/TB_ASN.cs
  5. 2
      WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Repositories/TbAsnRepository.cs

2
WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/AsnBackgroundWorker/AsnBackgroundWorker.cs

@ -103,7 +103,7 @@ namespace Win_in.Sfs.Scp.WebApi
var noPoAsn = CreateNoPoAsn(asn, barcodes);
asnX12List.Add(noPoAsn);
asn.IsPort = 1;
if (asn.AsnBillNum.StartsWith(_options.QadAsnPrefix))//ASN to QAD
{

5
WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Asns/AsnFactory.cs

@ -90,6 +90,11 @@ namespace Win_in.Sfs.Scp.WebApi
var accumQty = 0;//TODO 如何计算
var loadQty = b.BarcodeAndBatchs.Count;
var unitQty = b.PackQty;
if (unitQty != b.Qty)
{
unitQty = b.Qty;
loadQty = 1;
}
var item = CreateItem(b.PartCode, loadQty * unitQty, b.PoUnit, accumQty,
b.PoBillNum, loadQty, unitQty, b.BarcodeAndBatchs);
items.Add(item);

82
WebApiService/src/Win_in.Sfs.Scp.WebApi.Console/Program.cs

@ -27,79 +27,79 @@ namespace Win_in.Sfs.Scp.WebApi.Console
{
BarCode = "BARCODE_01",
PartCode = "PART_A",
Qty=20,
Qty=28,
Batch="20220404",
PoUnit = "EA",
PoBillNum = "PO1111",
PackQty = 20,
PackQty = 28,
Extend2 = "PALLET_01"
},
new TS_BARCODE()
{
BarCode = "BARCODE_02",
PartCode = "PART_A",
Qty=20,
Qty=28,
Batch="20220404",
PoUnit = "EA",
PoBillNum = "PO1111",
PackQty = 20,
PackQty = 28,
Extend2 = "PALLET_01"
},
new TS_BARCODE()
{
BarCode = "BARCODE_03",
PartCode = "PART_B",
Qty=15,
Qty=28,
Batch="20220404",
PoUnit = "EA",
PoBillNum = "PO2222",
PackQty = 15,
PackQty = 28,
Extend2 = "PALLET_01"
},
new TS_BARCODE()
{
BarCode = "BARCODE_04",
PartCode = "PART_B",
Qty=15,
Qty=16,
Batch="20220404",
PoUnit = "EA",
PoBillNum = "PO2222",
PackQty = 15,
PackQty = 28,
Extend2 = "PALLET_01"
},
new TS_BARCODE()
{
BarCode = "BARCODE_05",
PartCode = "PART_C",
Qty=40,
Batch="20220404",
PoUnit = "KG",
PoBillNum = "PO3333",
PackQty = 40,
Extend2 = "PALLET_02"
},
new TS_BARCODE()
{
BarCode = "BARCODE_06",
PartCode = "PART_C",
Qty=40,
Batch="20220404",
PoUnit = "KG",
PoBillNum = "PO3333",
PackQty = 40,
Extend2 = "PALLET_02"
},
new TS_BARCODE()
{
BarCode = "BARCODE_07",
PartCode = "PART_C",
Qty=40,
Batch="20220404",
PoUnit = "KG",
PoBillNum = "PO3333",
PackQty = 23,
Extend2 = ""
},
//new TS_BARCODE()
//{
// BarCode = "BARCODE_05",
// PartCode = "PART_C",
// Qty=40,
// Batch="20220404",
// PoUnit = "KG",
// PoBillNum = "PO3333",
// PackQty = 40,
// Extend2 = "PALLET_02"
//},
//new TS_BARCODE()
//{
// BarCode = "BARCODE_06",
// PartCode = "PART_C",
// Qty=40,
// Batch="20220404",
// PoUnit = "KG",
// PoBillNum = "PO3333",
// PackQty = 40,
// Extend2 = "PALLET_02"
//},
//new TS_BARCODE()
//{
// BarCode = "BARCODE_07",
// PartCode = "PART_C",
// Qty=40,
// Batch="20220404",
// PoUnit = "KG",
// PoBillNum = "PO3333",
// PackQty = 23,
// Extend2 = ""
//},
};
return barcodes;
}

3
WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Asns/TB_ASN.cs

@ -45,6 +45,7 @@ namespace Win_in.Sfs.Scp.v1.Domain.Asns
public string SubSite { get; set; }
public Guid? TenantId { get; }
public int IsPort { get; set; }//接口是否读取
public Guid? TenantId { get; }
}
}

2
WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Repositories/TbAsnRepository.cs

@ -21,7 +21,7 @@ namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore
var list = await dbSet
.Where(p =>p.Site==site
&& p.State == 3 //已发货
&& p.Id > uid)
&& p.IsPort==0)
.OrderBy(p => p.Id)
.Take(batchSize)
.ToListAsync();

Loading…
Cancel
Save