|
|
@ -25,7 +25,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
public ASN_X12_856_3060 CreateAsnX128563060(string receiver,TB_ASN scpAsn,List<TS_BARCODE> barcodes) |
|
|
|
{ |
|
|
|
|
|
|
|
var asnCode = scpAsn.AsnBillNum; |
|
|
|
var asnCode = scpAsn.Id.ToString("000000000"); |
|
|
|
var senderId = scpAsn.VendId; |
|
|
|
var receiverId = receiver; |
|
|
|
var shipTime = scpAsn.ShipTime ?? DateTime.Now; |
|
|
@ -33,17 +33,19 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
var envType = ISA.EnvType.P; |
|
|
|
var authorization = Authorization; |
|
|
|
var security = Security; |
|
|
|
|
|
|
|
//初始化ASN单
|
|
|
|
var asn = CreateAsn(asnCode,senderId,receiverId,shipTime,envType,authorization,security); |
|
|
|
var asn = CreateAsn(asnCode, senderId,receiverId,shipTime,envType,authorization,security); |
|
|
|
|
|
|
|
var functionalGroupCode = scpAsn.AsnBillNum.Right(9);//TODO
|
|
|
|
var functionalGroupCode = scpAsn.Id.ToString(); |
|
|
|
//初始化功能组
|
|
|
|
var functionalGroup = CreateFunctionalGroup(senderId,receiverId,shipTime,functionalGroupCode); |
|
|
|
|
|
|
|
var shipNoticeCode = ShipNoticeCode; |
|
|
|
var datetimeType = DatetimeType; |
|
|
|
var noticeNumber = scpAsn.AsnBillNum;//完整AsnBillNum
|
|
|
|
//初始化发货单
|
|
|
|
var shipNotice = CreateShipNotice(shipNoticeCode,functionalGroupCode,shipTime,datetimeType); |
|
|
|
var shipNotice = CreateShipNotice(shipNoticeCode, noticeNumber, shipTime,datetimeType); |
|
|
|
|
|
|
|
var gValue = 0; |
|
|
|
var gUom = Uom; |
|
|
@ -54,9 +56,11 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
var mode = Mode; |
|
|
|
var equipmentCode = EquipmentCode; |
|
|
|
var equipmentNumber = TruckNumber; |
|
|
|
var bmRefValue = noticeNumber; |
|
|
|
var pkRefValue = noticeNumber; |
|
|
|
//初始化发货明细
|
|
|
|
var shipment = CreateShipment(shipNotice,gValue,gUom,nValue,nUom,routeSequenceCode,identificationCode,mode, |
|
|
|
equipmentCode,equipmentNumber,functionalGroupCode,functionalGroupCode,senderId,receiverId); |
|
|
|
equipmentCode,equipmentNumber, bmRefValue, pkRefValue, senderId,receiverId); |
|
|
|
|
|
|
|
|
|
|
|
//计算与添加托盘和尾箱
|
|
|
|