|
|
@ -27,6 +27,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
|
|
|
|
var asnCode = scpAsn.Id.ToString("000000000"); |
|
|
|
var senderId = scpAsn.VendId; |
|
|
|
var chsup = "CHSUP"; |
|
|
|
var receiverId = receiver; |
|
|
|
var shipTime = scpAsn.ShipTime ?? DateTime.Now; |
|
|
|
|
|
|
@ -35,11 +36,11 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
var security = Security; |
|
|
|
|
|
|
|
//初始化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 functionalGroup = CreateFunctionalGroup(senderId,receiverId,shipTime,functionalGroupCode); |
|
|
|
var functionalGroup = CreateFunctionalGroup(chsup, receiverId,shipTime,functionalGroupCode); |
|
|
|
|
|
|
|
var shipNoticeCode = ShipNoticeCode; |
|
|
|
var datetimeType = DatetimeType; |
|
|
@ -80,7 +81,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
p.Key.PoUnit, |
|
|
|
p.Key.PoBillNum, |
|
|
|
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(); |
|
|
|
|
|
|
@ -105,12 +106,14 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
//添加托盘
|
|
|
|
else |
|
|
|
{ |
|
|
|
var tare = CreateTare(palletCode); |
|
|
|
var tare = CreateTare(); |
|
|
|
shipment.AddTare(shipNotice,tare); |
|
|
|
foreach (var item in items) |
|
|
|
{ |
|
|
|
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; |
|
|
|
} |
|
|
|
|
|
|
|
private Tare CreateTare(string tareLabelCode) |
|
|
|
private Tare CreateTare() |
|
|
|
{ |
|
|
|
var tare = new Tare(); |
|
|
|
tare.SetHL() |
|
|
|
.SetREF_LS(tareLabelCode); |
|
|
|
tare.SetHL(); |
|
|
|
|
|
|
|
return tare; |
|
|
|
} |
|
|
|