@ -3747,20 +3747,28 @@ namespace DSWeb.MvcShipping.Controllers
var ftpset = MsCodeFtpSetDAL . GetData ( "EDINAME='" + ediname + "'" , Convert . ToString ( Session [ "COMPANYID" ] ) ) ;
var filename = "" ;
if ( ftpset . SERVERIP ! = "" & & ftpset . SERVERIP ! = null )
{
foreach ( var bill in headEdiList )
{
mblno = bill . MBLNO ;
var edilist = new List < MsOpSeae > ( ) ;
edilist . Add ( bill ) ;
if ( type = = "YML" )
{
if ( filetype = = "B" )
filename = MsOpSeaeEdiPortDAL . CreateEdiYM ( headEdiList , Convert . ToString ( Session [ "USERCODE" ] ) , path , mblno , filetype , filerole , ftpset , type , isbill ) ;
filename = MsOpSeaeEdiPortDAL . CreateEdiYM ( edil ist, Convert . ToString ( Session [ "USERCODE" ] ) , path , mblno , filetype , filerole , ftpset , type , isbill ) ;
else
filename = MsOpSeaeEdiPortDAL . CreateEdiYMSI ( headEdiList , Convert . ToString ( Session [ "USERCODE" ] ) , path , mblno , filerole , ftpset , isbill , filetype ) ;
filename = MsOpSeaeEdiPortDAL . CreateEdiYMSI ( edil ist, Convert . ToString ( Session [ "USERCODE" ] ) , path , mblno , filerole , ftpset , isbill , filetype ) ;
}
else
filename = MsOpSeaeEdiPortDAL . CreateEdi ( headEdiList , Convert . ToString ( Session [ "USERID" ] ) , path , mblno , filerole , ftpset , type , isbill , isnoctn , portload , portdischarge , recerverop , filetype ) ;
filename = MsOpSeaeEdiPortDAL . CreateEdi ( edil ist, Convert . ToString ( Session [ "USERID" ] ) , path , mblno , filerole , ftpset , type , isbill , isnoctn , portload , portdischarge , recerverop , filetype ) ;
if ( ftpset . SERVERIP ! = "" & & ftpset . SERVERIP ! = null )
{
if ( type = = "ESLEDI" & & filetype = = "E" )
result = MsOpSeaeEdiPortDAL . FtpFile2 ( filename , ftpset ) ;
else
@ -3770,8 +3778,7 @@ namespace DSWeb.MvcShipping.Controllers
var afilename = Path . GetFileName ( filename ) ;
MsOpSeaeEdiPortDAL . InsertEdiLog ( bsnos , type , filetype , "" , ftpset . SERVERIP , afilename , "../../EDIFiles/SeaeEdi/" + afilename , Convert . ToString ( Session [ "SHOWNAME" ] ) ) ;
T_ALL_DA T_ALL_DA = new EntityDA . T_ALL_DA ( ) ;
foreach ( var bill in headEdiList )
{
if ( filetype = = "B" )
{
var blUpSQL = " if (select CID from Op_SeaCover where bsno='" + bill . BSNO + "' AND COVERTITLE='发送SO') is null insert into Op_SeaCover(CID,BSNO,COVERTITLE,COVERCONTEXT,OPERATOR,OPTIME,ISSYS) values(NEWID(),'" + bill . BSNO + "','发送SO','','" + Session [ "SHOWNAME" ] + "','" + DateTime . Now . ToString ( "yyyy-MM-dd HH:mm:ss" ) + "','1')" ;
@ -4311,24 +4318,31 @@ namespace DSWeb.MvcShipping.Controllers
{
var ftpset = MsCodeFtpSetDAL . GetData ( "EDINAME='HANJIN'" , Convert . ToString ( Session [ "COMPANYID" ] ) ) ;
var filename = "" ;
T_ALL_DA T_ALL_DA = new EntityDA . T_ALL_DA ( ) ;
if ( ftpset . SERVERIP ! = "" & & ftpset . SERVERIP ! = null )
{
foreach ( var bill in headList )
{
var ediheadlist = new List < MsOpSeae > ( ) ;
ediheadlist . Add ( bill ) ;
if ( filetype = = "E" )
{
filename = MsOpSeaeEdiPortDAL . CreateEdiHANJINSI ( headList , Convert . ToString ( Session [ "USERCODE" ] ) , path , mblno , filerole , ftpset , isbill , filetype ) ;
filename = MsOpSeaeEdiPortDAL . CreateEdiHANJINSI ( ediheadl ist, Convert . ToString ( Session [ "USERCODE" ] ) , path , mblno , filerole , ftpset , isbill , filetype ) ;
}
else
{
filename = MsOpSeaeEdiPortDAL . CreateEdiHANJIN ( headList , Convert . ToString ( Session [ "USERCODE" ] ) , path , mblno , filerole , ftpset , isbill , filetype ) ;
filename = MsOpSeaeEdiPortDAL . CreateEdiHANJIN ( ediheadl ist, Convert . ToString ( Session [ "USERCODE" ] ) , path , mblno , filerole , ftpset , isbill , filetype ) ;
}
if ( ftpset . SERVERIP ! = "" & & ftpset . SERVERIP ! = null )
{
result = MsOpSeaeEdiPortDAL . FtpFile ( filename , ftpset ) ;
var afilename = Path . GetFileName ( filename ) ;
MsOpSeaeEdiPortDAL . InsertEdiLog ( bsnos , "HANJIN" , filetype , "" , ftpset . SERVERIP , afilename , "../../EDIFiles/SeaeEdi/" + afilename , Convert . ToString ( Session [ "SHOWNAME" ] ) ) ;
T_ALL_DA T_ALL_DA = new EntityDA . T_ALL_DA ( ) ;
foreach ( var bill in headList )
{
if ( filetype = = "B" )
{
var blUpSQL = " if (select CID from Op_SeaCover where bsno='" + bill . BSNO + "' AND COVERTITLE='发送SO') is null insert into Op_SeaCover(CID,BSNO,COVERTITLE,COVERCONTEXT,OPERATOR,OPTIME,ISSYS) values(NEWID(),'" + bill . BSNO + "','发送SO','','" + Session [ "SHOWNAME" ] + "','" + DateTime . Now . ToString ( "yyyy-MM-dd HH:mm:ss" ) + "','1')" ;