|
@ -27,6 +27,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
|
|
|
|
|
var asnCode = scpAsn.Id.ToString("000000000"); |
|
|
var asnCode = scpAsn.Id.ToString("000000000"); |
|
|
var senderId = scpAsn.VendId; |
|
|
var senderId = scpAsn.VendId; |
|
|
|
|
|
var chsup = "CHSUP"; |
|
|
var receiverId = receiver; |
|
|
var receiverId = receiver; |
|
|
var shipTime = scpAsn.ShipTime ?? DateTime.Now; |
|
|
var shipTime = scpAsn.ShipTime ?? DateTime.Now; |
|
|
|
|
|
|
|
@ -35,11 +36,11 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
var security = Security; |
|
|
var security = Security; |
|
|
|
|
|
|
|
|
//初始化ASN单
|
|
|
//初始化ASN单
|
|
|
var asn = CreateAsn(asnCode, senderId,receiverId,shipTime,envType,authorization,security); |
|
|
var asn = CreateAsn(asnCode, chsup, receiverId,shipTime,envType,authorization,security); |
|
|
|
|
|
|
|
|
var functionalGroupCode = scpAsn.Id.ToString(); |
|
|
var functionalGroupCode = scpAsn.Id.ToString(); |
|
|
//初始化功能组
|
|
|
//初始化功能组
|
|
|
var functionalGroup = CreateFunctionalGroup(senderId,receiverId,shipTime,functionalGroupCode); |
|
|
var functionalGroup = CreateFunctionalGroup(chsup, receiverId,shipTime,functionalGroupCode); |
|
|
|
|
|
|
|
|
var shipNoticeCode = ShipNoticeCode; |
|
|
var shipNoticeCode = ShipNoticeCode; |
|
|
var datetimeType = DatetimeType; |
|
|
var datetimeType = DatetimeType; |
|
@ -80,7 +81,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
p.Key.PoUnit, |
|
|
p.Key.PoUnit, |
|
|
p.Key.PoBillNum, |
|
|
p.Key.PoBillNum, |
|
|
p.Key.PackQty, |
|
|
p.Key.PackQty, |
|
|
BarcodeAndBatchs = p.Select(p =>new BarcodeAndBatch ( p.BarCode, p.Batch)).ToList(), |
|
|
BarcodeAndBatchs = p.Select(p =>new BarcodeAndBatch ( p.Extend2, p.Batch)).ToList(), |
|
|
}) |
|
|
}) |
|
|
.ToList(); |
|
|
.ToList(); |
|
|
|
|
|
|
|
@ -105,12 +106,14 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
//添加托盘
|
|
|
//添加托盘
|
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
var tare = CreateTare(palletCode); |
|
|
var tare = CreateTare(); |
|
|
shipment.AddTare(shipNotice,tare); |
|
|
shipment.AddTare(shipNotice,tare); |
|
|
foreach (var item in items) |
|
|
foreach (var item in items) |
|
|
{ |
|
|
{ |
|
|
tare.AddItem(shipNotice, item); |
|
|
tare.AddItem(shipNotice, item); |
|
|
} |
|
|
} |
|
|
|
|
|
var tareLs = items.Count == 1 ? "4S" + palletCode : "5S" + palletCode; |
|
|
|
|
|
tare.SetREF_LS(tareLs); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
@ -186,11 +189,10 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
return shipment; |
|
|
return shipment; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private Tare CreateTare(string tareLabelCode) |
|
|
private Tare CreateTare() |
|
|
{ |
|
|
{ |
|
|
var tare = new Tare(); |
|
|
var tare = new Tare(); |
|
|
tare.SetHL() |
|
|
tare.SetHL(); |
|
|
.SetREF_LS(tareLabelCode); |
|
|
|
|
|
|
|
|
|
|
|
return tare; |
|
|
return tare; |
|
|
} |
|
|
} |
|
|