|
@ -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) |
|
|
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 senderId = scpAsn.VendId; |
|
|
var receiverId = receiver; |
|
|
var receiverId = receiver; |
|
|
var shipTime = scpAsn.ShipTime ?? DateTime.Now; |
|
|
var shipTime = scpAsn.ShipTime ?? DateTime.Now; |
|
@ -33,17 +33,19 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
var envType = ISA.EnvType.P; |
|
|
var envType = ISA.EnvType.P; |
|
|
var authorization = Authorization; |
|
|
var authorization = Authorization; |
|
|
var security = Security; |
|
|
var security = Security; |
|
|
|
|
|
|
|
|
//初始化ASN单
|
|
|
//初始化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 functionalGroup = CreateFunctionalGroup(senderId,receiverId,shipTime,functionalGroupCode); |
|
|
|
|
|
|
|
|
var shipNoticeCode = ShipNoticeCode; |
|
|
var shipNoticeCode = ShipNoticeCode; |
|
|
var datetimeType = DatetimeType; |
|
|
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 gValue = 0; |
|
|
var gUom = Uom; |
|
|
var gUom = Uom; |
|
@ -54,9 +56,11 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
var mode = Mode; |
|
|
var mode = Mode; |
|
|
var equipmentCode = EquipmentCode; |
|
|
var equipmentCode = EquipmentCode; |
|
|
var equipmentNumber = TruckNumber; |
|
|
var equipmentNumber = TruckNumber; |
|
|
|
|
|
var bmRefValue = noticeNumber; |
|
|
|
|
|
var pkRefValue = noticeNumber; |
|
|
//初始化发货明细
|
|
|
//初始化发货明细
|
|
|
var shipment = CreateShipment(shipNotice,gValue,gUom,nValue,nUom,routeSequenceCode,identificationCode,mode, |
|
|
var shipment = CreateShipment(shipNotice,gValue,gUom,nValue,nUom,routeSequenceCode,identificationCode,mode, |
|
|
equipmentCode,equipmentNumber,functionalGroupCode,functionalGroupCode,senderId,receiverId); |
|
|
equipmentCode,equipmentNumber, bmRefValue, pkRefValue, senderId,receiverId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//计算与添加托盘和尾箱
|
|
|
//计算与添加托盘和尾箱
|
|
|