@ -7909,7 +7909,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
}
public static DBResult SendToDJY ( List < MsOpSeae > headData , string companyid )
public static DBResult SendToDJY ( List < MsOpSeae > headData , string companyid ,string USERID )
{
var result = new DBResult ( ) ;
var DJYUPDATE = MsSysParamSetDAL . GetData ( "PARAMNAME='DJYUPDATE'" ) ;
@ -7921,7 +7921,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
var DJYURL = MsSysParamSetDAL . GetData ( "PARAMNAME='DJYURL'" ) ;
if ( ! string . IsNullOrEmpty ( DJYURL . PARAMVALUE ) )
{
var orderlist = CreateEdiDjy ( headData );
var orderlist = CreateEdiDjy ( headData ,USERID );
var strJson = JsonConvert . SerializeObject ( new { COMPANY_NAME = strCompanyName , BOOKINGS = orderlist } ) ;
string rtn = WebRequestHelper . DoPost ( DJYURL . PARAMVALUE + "/booking/ReceiveBookingData" , strJson ) ;
}
@ -7971,115 +7971,131 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
return result ;
}
public static List < ImportOrderViewModel > CreateEdiDjy ( List < MsOpSeae > headData )
{
var orderlist = new List < ImportOrderViewModel > ( ) ;
foreach ( var bill in headData )
{
var billams = GetAmsData ( "BSNO='" + bill . BSNO + "'" ) ;
var order = new ImportOrderViewModel ( ) ;
order . BSNO = bill . BSNO ;
order . CUST_NO = bill . CUSTNO ;
order . MBLNO = bill . MBLNO ;
order . HBLNO = bill . HBLNO ;
order . CONTRACTNO = bill . CONTRACTNO ;
order . SHIPPER = bill . SHIPPER ;
order . CONSIGNEE = bill . CONSIGNEE ;
order . NOTIFYPARTY = bill . NOTIFYPARTY ;
order . NOTIFYPARTY2 = billams . NOTIFYPARTYID2 ;
order . YARD = GetCustEDICode ( bill . YARD , "DJY" ) ;
order . VESSEL = bill . VESSEL ;
order . VOYNO = bill . VOYNO ;
order . VoynoInner = bill . VOYNO ;
order . ETD = bill . ETD ;
order . CLOSINGDATE = bill . CLOSINGDATE ;
order . CLOSEDOCDATE = bill . CLOSEDOCDATE ;
order . ETA = bill . ETA ;
order . PLACERECEIPTID = bill . PLACERECEIPTID ;
order . PLACERECEIPT = bill . PLACERECEIPT ;
order . PORTLOADID = bill . PORTLOADID ;
order . PORTLOAD = bill . PORTLOAD ;
order . PORTDISCHARGEID = bill . PORTDISCHARGEID ;
order . PORTDISCHARGE = bill . PORTDISCHARGE ;
order . PLACEDELIVERYID = bill . PLACEDELIVERYID ;
order . PLACEDELIVERY = bill . PLACEDELIVERY ;
order . DESTINATIONID = bill . DESTINATIONID ;
order . DESTINATION = bill . DESTINATION ;
order . NOBILL = bill . NOBILL ;
// order.COPYNOBILLL = bill.COPYNOBILLL;
order . ISSUEPLACE = bill . ISSUEPLACE ;
order . ISSUEPLACEID = bill . ISSUEPLACEID ;
order . ISSUETYPE = bill . ISSUETYPE ;
order . ISSUEDATE = bill . ISSUEDATE ;
order . BLFRT = bill . BLFRT ;
order . PREPARDAT = bill . PREPARDAT ;
order . PAYABLEAT = bill . PAYABLEAT ;
order . PREPARDAT_ID = GetPortEDICodeByEname ( bill . PREPARDAT ) ;
order . PAYABLEAT_ID = GetPortEDICodeByEname ( bill . PAYABLEAT ) ;
order . SERVICE = bill . SERVICE ;
order . MARKS = bill . MARKS ;
order . HSCODE = bill . HSCODE ;
order . DESCRIPTION = bill . DESCRIPTION ;
order . PKGS = Convert . ToInt32 ( bill . PKGS ) ;
order . KINDPKGS = bill . KINDPKGS ;
order . KGS = Convert . ToDecimal ( bill . KGS ) ;
order . CBM = Convert . ToDecimal ( bill . CBM ) ;
order . CARRIER = GetCustEDICode ( bill . CARRIER , "DJY" ) ;
order . CARGOID = bill . CARGOID ;
order . DCLASS = bill . DCLASS ;
order . DUNNO = bill . DUNNO ;
order . DPAGE = bill . DPAGE ;
order . DLABEL = bill . DLABEL ;
order . TEMPID = bill . TEMPID ;
order . TEMPSET = bill . TEMPSET ;
order . REEFERF = bill . REEFERF ;
order . HUMIDITY = bill . HUMIDITY ;
order . ISCONTAINERSOC = bill . ISCONTAINERSOC ;
order . EDIREMARK = bill . EDIREMARK ;
order . REMARK = billams . SIREMARK ;
order . PONO = bill . CUSTNO ;
order . TOTALNO = bill . TOTALNO ;
order . TEMPMIN = bill . TEMPMIN ;
order . TEMPMAX = bill . TEMPMAX ;
order . OP = bill . OP ;
order . CUSTOMERNAME = bill . CUSTOMERNAME ;
order . EMAIL = bill . MAILPROJECT ;
order . FORWARDER = bill . FORWARDER ;
order . SHIPAGENCY = bill . SHIPAGENCY ;
order . VESSELID = bill . VESSELID ;
order . CARRIERID = GetCustEDICode ( bill . CARRIER , "DJY" ) ;
order . YARDID = GetCustEDICode ( bill . YARD , "DJY" ) ;
order . YardContract = bill . YARDATTN ;
var cntrlist = new List < OpCtnOrderEditViewModel > ( ) ;
var ctnsumlist = MsOpSeaeDAL . GetBodyList ( "BSNO='" + bill . BSNO + "'" ) ;
foreach ( var ctn in ctnsumlist )
{
var cntr = new OpCtnOrderEditViewModel ( ) ;
cntr . CTNALL = ctn . CTNALL ;
cntr . CTNNUM = ctn . CTNNUM ;
cntr . CNTRNO = ctn . CNTRNO ;
cntr . SEALNO = ctn . SEALNO ;
cntr . PKGS = ctn . PKGS ;
cntr . KINDPKGS = ctn . KINDPKGS ;
cntr . KGS = ctn . KGS ;
cntr . CBM = ctn . CBM ;
cntr . TAREWEIGHT = ctn . TAREWEIGHT ;
cntr . WEIGHTYPE = ctn . WEIGHTYPE ;
cntr . WEIGHKGS = ctn . WEIGHKGS ;
cntrlist . Add ( cntr ) ;
public static List < ImportOrderViewModel > CreateEdiDjy ( List < MsOpSeae > headData , string USERID )
{
var condition = $" USERID='{USERID}' and THIRDPARTY='{" 大 简 云 用 户 key "}' " ;
var thirdpartyaccount = BasicDataRefDAL . GeneralSelect ( "sys_thidparty_account" , "ACCOUNT" , "ACCOUNTPSW" , condition ) ;
var INPUTBY = "" ;
if ( thirdpartyaccount ! = null & & thirdpartyaccount . Count > 0 )
{
INPUTBY = thirdpartyaccount [ 0 ] . GID ;
}
var orderlist = new List < ImportOrderViewModel > ( ) ;
foreach ( var bill in headData )
{
var billams = GetAmsData ( "BSNO='" + bill . BSNO + "'" ) ;
var order = new ImportOrderViewModel ( ) ;
order . BSNO = bill . BSNO ;
order . CUST_NO = bill . CUSTNO ;
order . MBLNO = bill . MBLNO ;
order . HBLNO = bill . HBLNO ;
order . CONTRACTNO = bill . CONTRACTNO ;
order . SHIPPER = bill . SHIPPER ;
order . CONSIGNEE = bill . CONSIGNEE ;
order . NOTIFYPARTY = bill . NOTIFYPARTY ;
order . NOTIFYPARTY2 = billams . NOTIFYPARTYID2 ;
order . YARD = GetCustEDICode ( bill . YARD , "DJY" ) ;
order . VESSEL = bill . VESSEL ;
order . VOYNO = bill . VOYNO ;
order . VoynoInner = bill . VOYNO ;
order . ETD = bill . ETD ;
order . CLOSINGDATE = bill . CLOSINGDATE ;
order . CLOSEDOCDATE = bill . CLOSEDOCDATE ;
order . ETA = bill . ETA ;
order . PLACERECEIPTID = bill . PLACERECEIPTID ;
order . PLACERECEIPT = bill . PLACERECEIPT ;
order . PORTLOADID = bill . PORTLOADID ;
order . PORTLOAD = bill . PORTLOAD ;
order . PORTDISCHARGEID = bill . PORTDISCHARGEID ;
order . PORTDISCHARGE = bill . PORTDISCHARGE ;
order . PLACEDELIVERYID = bill . PLACEDELIVERYID ;
order . PLACEDELIVERY = bill . PLACEDELIVERY ;
order . DESTINATIONID = bill . DESTINATIONID ;
order . DESTINATION = bill . DESTINATION ;
order . NOBILL = bill . NOBILL ;
// order.COPYNOBILLL = bill.COPYNOBILLL;
order . ISSUEPLACE = bill . ISSUEPLACE ;
order . ISSUEPLACEID = bill . ISSUEPLACEID ;
order . ISSUETYPE = bill . ISSUETYPE ;
order . ISSUEDATE = bill . ISSUEDATE ;
order . BLFRT = bill . BLFRT ;
order . PREPARDAT = bill . PREPARDAT ;
order . PAYABLEAT = bill . PAYABLEAT ;
order . PREPARDAT_ID = GetPortEDICodeByEname ( bill . PREPARDAT ) ;
order . PAYABLEAT_ID = GetPortEDICodeByEname ( bill . PAYABLEAT ) ;
order . SERVICE = bill . SERVICE ;
order . MARKS = bill . MARKS ;
order . HSCODE = bill . HSCODE ;
order . DESCRIPTION = bill . DESCRIPTION ;
order . PKGS = Convert . ToInt32 ( bill . PKGS ) ;
order . KINDPKGS = bill . KINDPKGS ;
order . KGS = Convert . ToDecimal ( bill . KGS ) ;
order . CBM = Convert . ToDecimal ( bill . CBM ) ;
order . CARRIER = GetCustEDICode ( bill . CARRIER , "DJY" ) ;
order . CARGOID = bill . CARGOID ;
order . DCLASS = bill . DCLASS ;
order . DUNNO = bill . DUNNO ;
order . DPAGE = bill . DPAGE ;
order . DLABEL = bill . DLABEL ;
order . TEMPID = bill . TEMPID ;
order . TEMPSET = bill . TEMPSET ;
order . REEFERF = bill . REEFERF ;
order . HUMIDITY = bill . HUMIDITY ;
order . ISCONTAINERSOC = bill . ISCONTAINERSOC ;
order . EDIREMARK = bill . EDIREMARK ;
order . REMARK = billams . SIREMARK ;
order . PONO = bill . CUSTNO ;
order . TOTALNO = bill . TOTALNO ;
order . TEMPMIN = bill . TEMPMIN ;
order . TEMPMAX = bill . TEMPMAX ;
order . OP = bill . OP ;
order . CUSTOMERNAME = bill . CUSTOMERNAME ;
order . EMAIL = bill . MAILPROJECT ;
order . FORWARDER = bill . FORWARDER ;
order . SHIPAGENCY = bill . SHIPAGENCY ;
order . VESSELID = bill . VESSELID ;
order . CARRIERID = GetCustEDICode ( bill . CARRIER , "DJY" ) ;
order . YARDID = GetCustEDICode ( bill . YARD , "DJY" ) ;
order . YardContract = bill . YARDATTN ;
if ( ! string . IsNullOrWhiteSpace ( INPUTBY ) )
{
order . INPUTBY = INPUTBY ;
}
var cntrlist = new List < OpCtnOrderEditViewModel > ( ) ;
var ctnsumlist = MsOpSeaeDAL . GetBodyList ( "BSNO='" + bill . BSNO + "'" ) ;
foreach ( var ctn in ctnsumlist )
{
var cntr = new OpCtnOrderEditViewModel ( ) ;
cntr . CTNALL = ctn . CTNALL ;
cntr . CTNNUM = ctn . CTNNUM ;
cntr . CNTRNO = ctn . CNTRNO ;
cntr . SEALNO = ctn . SEALNO ;
cntr . PKGS = ctn . PKGS ;
cntr . KINDPKGS = ctn . KINDPKGS ;
cntr . KGS = ctn . KGS ;
cntr . CBM = ctn . CBM ;
cntr . TAREWEIGHT = ctn . TAREWEIGHT ;
cntr . WEIGHTYPE = ctn . WEIGHTYPE ;
cntr . WEIGHKGS = ctn . WEIGHKGS ;
cntrlist . Add ( cntr ) ;
}
order . CtrnList = cntrlist ;
orderlist . Add ( order ) ;
}
return orderlist ;
}
order . CtrnList = cntrlist ;
orderlist . Add ( order ) ;
}
return orderlist ;
}
# endregion