@ -3747,20 +3747,28 @@ namespace DSWeb.MvcShipping.Controllers
var ftpset = MsCodeFtpSetDAL . GetData ( "EDINAME='" + ediname + "'" , Convert . ToString ( Session [ "COMPANYID" ] ) ) ;
var ftpset = MsCodeFtpSetDAL . GetData ( "EDINAME='" + ediname + "'" , Convert . ToString ( Session [ "COMPANYID" ] ) ) ;
var filename = "" ;
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 ( type = = "YML" )
{
{
if ( filetype = = "B" )
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
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
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" )
if ( type = = "ESLEDI" & & filetype = = "E" )
result = MsOpSeaeEdiPortDAL . FtpFile2 ( filename , ftpset ) ;
result = MsOpSeaeEdiPortDAL . FtpFile2 ( filename , ftpset ) ;
else
else
@ -3770,8 +3778,7 @@ namespace DSWeb.MvcShipping.Controllers
var afilename = Path . GetFileName ( filename ) ;
var afilename = Path . GetFileName ( filename ) ;
MsOpSeaeEdiPortDAL . InsertEdiLog ( bsnos , type , filetype , "" , ftpset . SERVERIP , afilename , "../../EDIFiles/SeaeEdi/" + afilename , Convert . ToString ( Session [ "SHOWNAME" ] ) ) ;
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 ( ) ;
T_ALL_DA T_ALL_DA = new EntityDA . T_ALL_DA ( ) ;
foreach ( var bill in headEdiList )
{
if ( filetype = = "B" )
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')" ;
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 ftpset = MsCodeFtpSetDAL . GetData ( "EDINAME='HANJIN'" , Convert . ToString ( Session [ "COMPANYID" ] ) ) ;
var filename = "" ;
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" )
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
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 ) ;
result = MsOpSeaeEdiPortDAL . FtpFile ( filename , ftpset ) ;
var afilename = Path . GetFileName ( filename ) ;
var afilename = Path . GetFileName ( filename ) ;
MsOpSeaeEdiPortDAL . InsertEdiLog ( bsnos , "HANJIN" , filetype , "" , ftpset . SERVERIP , afilename , "../../EDIFiles/SeaeEdi/" + afilename , Convert . ToString ( Session [ "SHOWNAME" ] ) ) ;
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" )
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')" ;
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')" ;