@ -3282,16 +3282,48 @@ string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64"
}
MBLNO = opapplyhead . MBLNO ;
var updateseai = false ;
var opseaiheadList = MsOpSeaiDAL . GetDataAll ( " ((isnull(MBLNO,'')<>'' and MBLNO='" + MBLNO + "' ) or (isnull(CUSTOMNO,'')<>'' and CUSTOMNO='" + CUSTOMNO + "') )" ) ;
//20230606 根据系统配置值
var updopseaiType = MsSysParamSetDAL . GetSysParamValue ( "ApplySaveToOpseai" ) ;
//0不保存 1提单号 2报关单号 3提单号或报关单号
var opseaiheadList = new List < MsOpSeai > ( ) ;
//MsOpSeaiDAL.GetDataAll(" ((isnull(MBLNO,'')<>'' and MBLNO='" + MBLNO + "' ) or (isnull(CUSTOMNO,'')<>'' and CUSTOMNO='" + CUSTOMNO + "') )");
//if (!string.IsNullOrEmpty(opseaihead.CUSTNO) && !opseaihead.BSSTATUS) updateseai = true;
var opseaihead = new MsOpSeai ( ) ;
if ( opseaiheadList = = null | | opseaiheadList . Count = = 0 | | ( opseaiheadList ! = null & & opseaiheadList . Count > 1 ) )
if ( updopseaiType ! = "0" )
{
updateseai = false ;
var condition = "1=2" ;
if ( updopseaiType = = "1" ) {
condition = " ((isnull(MBLNO,'')<>'' and MBLNO='" + MBLNO + "' ) " ;
}
if ( updopseaiType = = "2" )
{
condition = " ((isnull(CUSTOMNO,'')<>'' and CUSTOMNO='" + MBLNO + "' ) " ;
}
if ( updopseaiType = = "3" )
{
condition = " ((isnull(MBLNO,'')<>'' and MBLNO='" + MBLNO + "' ) or (isnull(CUSTOMNO,'')<>'' and CUSTOMNO='" + CUSTOMNO + "') )" ;
}
opseaiheadList = MsOpSeaiDAL . GetDataAll ( condition ) ;
if ( opseaiheadList = = null | | opseaiheadList . Count = = 0 | | ( opseaiheadList ! = null & & opseaiheadList . Count > 1 ) )
{
updateseai = false ;
}
else
{
opseaihead = opseaiheadList [ 0 ] ;
updateseai = true ;
}
}
else {
opseaihead = opseaiheadList [ 0 ] ;
updateseai = true ;
updateseai = false ;
}