@ -88,7 +88,7 @@ namespace DSWeb.MvcShipping.Controllers
# endregion
#region 引入 EXCEL
#region 运价管理 运价维护 导入excel 引入 EXCEL
[HttpPost]
public ContentResult onImportClick ( )
{
@ -179,13 +179,17 @@ namespace DSWeb.MvcShipping.Controllers
string sXG = "" ;
string sDG = "" ;
string sCG = "" ;
string sXD = "" ;
string sCD = "" ;
string sXKD = "" ;
string sDKD = "" ;
string sXKJ = "" ;
string sDKJ = "" ;
string sXGBJ = "" ;
string sDGBJ = "" ;
string sCGBJ = "" ;
string sXDBJ = "" ;
string sCDBJ = "" ;
string sXKDBJ = "" ;
string sDKDBJ = "" ;
string sXKJBJ = "" ;
string sDKJBJ = "" ;
foreach ( var enumValue in ctnList )
{
if ( enumValue . NAME . ToString ( ) . Trim ( ) = = "小柜" )
@ -203,15 +207,25 @@ namespace DSWeb.MvcShipping.Controllers
sCG = enumValue . VALUE . ToString ( ) . Trim ( ) + "0" ;
sCGBJ = enumValue . VALUE . ToString ( ) . Trim ( ) + "2" ;
}
else if ( enumValue . NAME . ToString ( ) . Trim ( ) = = "小 冻 ")
else if ( enumValue . NAME . ToString ( ) . Trim ( ) = = "小 开顶 ")
{
sX D = enumValue . VALUE . ToString ( ) . Trim ( ) + "0" ;
sX DBJ = enumValue . VALUE . ToString ( ) . Trim ( ) + "2" ;
sX K D = enumValue . VALUE . ToString ( ) . Trim ( ) + "0" ;
sX K DBJ = enumValue . VALUE . ToString ( ) . Trim ( ) + "2" ;
}
else if ( enumValue . NAME . ToString ( ) . Trim ( ) = = " 超冻 ")
else if ( enumValue . NAME . ToString ( ) . Trim ( ) = = " 大开顶 ")
{
sCD = enumValue . VALUE . ToString ( ) . Trim ( ) + "0" ;
sCDBJ = enumValue . VALUE . ToString ( ) . Trim ( ) + "2" ;
sDKD = enumValue . VALUE . ToString ( ) . Trim ( ) + "0" ;
sDKDBJ = enumValue . VALUE . ToString ( ) . Trim ( ) + "2" ;
}
else if ( enumValue . NAME . ToString ( ) . Trim ( ) = = "小框架" )
{
sXKJ = enumValue . VALUE . ToString ( ) . Trim ( ) + "0" ;
sXKJBJ = enumValue . VALUE . ToString ( ) . Trim ( ) + "2" ;
}
else if ( enumValue . NAME . ToString ( ) . Trim ( ) = = "大框架" )
{
sDKJ = enumValue . VALUE . ToString ( ) . Trim ( ) + "0" ;
sDKJBJ = enumValue . VALUE . ToString ( ) . Trim ( ) + "2" ;
}
}
@ -283,6 +297,7 @@ namespace DSWeb.MvcShipping.Controllers
if ( table . Rows [ i ] [ "开始日期" ] . ToString ( ) ! = "" )
{
headRow . EFFECTIVEDATE = DateTime . Parse ( table . Rows [ i ] [ "开始日期" ] . ToString ( ) ) ; //生效期/开始日期
}
else
{
@ -333,27 +348,38 @@ namespace DSWeb.MvcShipping.Controllers
if ( DGYJ = = "" ) DGYJ = "0" ;
var CGYJ = table . Rows [ i ] [ "超高" ] . ToString ( ) ;
if ( CGYJ = = "" ) CGYJ = "0" ;
var XDYJ = table . Rows [ i ] [ "小冻" ] . ToString ( ) ;
if ( XDYJ = = "" ) XDYJ = "0" ;
var CDYJ = table . Rows [ i ] [ "超冻" ] . ToString ( ) ;
if ( CDYJ = = "" ) CDYJ = "0" ;
var XKDYJ = table . Rows [ i ] [ "小开顶" ] . ToString ( ) ;
if ( XKDYJ = = "" ) XKDYJ = "0" ;
var DKDYJ = table . Rows [ i ] [ "大开顶" ] . ToString ( ) ;
if ( DKDYJ = = "" ) DKDYJ = "0" ;
var XKJYJ = table . Rows [ i ] [ "小框架" ] . ToString ( ) ;
if ( XKJYJ = = "" ) XKJYJ = "0" ;
var DKJYJ = table . Rows [ i ] [ "大框架" ] . ToString ( ) ;
if ( DKJYJ = = "" ) DKJYJ = "0" ;
var XGYJBJ = table . Rows [ i ] [ "小柜报价" ] . ToString ( ) ;
if ( XGYJBJ = = "" ) XGYJBJ = "0" ;
var DGYJBJ = table . Rows [ i ] [ "大柜报价" ] . ToString ( ) ;
if ( DGYJBJ = = "" ) DGYJBJ = "0" ;
var CGYJBJ = table . Rows [ i ] [ "超高报价" ] . ToString ( ) ;
if ( CGYJBJ = = "" ) CGYJBJ = "0" ;
var XDYJBJ = table . Rows [ i ] [ "小冻报价" ] . ToString ( ) ;
if ( XDYJBJ = = "" ) XDYJBJ = "0" ;
var CDYJBJ = table . Rows [ i ] [ "超冻报价" ] . ToString ( ) ;
if ( CDYJBJ = = "" ) CDYJBJ = "0" ;
var XKDYJBJ = table . Rows [ i ] [ "小开顶报价" ] . ToString ( ) ;
if ( XKDYJBJ = = "" ) XKDYJBJ = "0" ;
var DKDYJBJ = table . Rows [ i ] [ "小开顶报价" ] . ToString ( ) ;
if ( DKDYJBJ = = "" ) DKDYJBJ = "0" ;
var XKJYJBJ = table . Rows [ i ] [ "小框架报价" ] . ToString ( ) ;
if ( XKJYJBJ = = "" ) XKJYJBJ = "0" ;
var DKJYJBJ = table . Rows [ i ] [ "大框架报价" ] . ToString ( ) ;
if ( DKJYJBJ = = "" ) DKJYJBJ = "0" ;
#region 根据动态字段名,更新集装箱与费用信息
string sSQL = "update crm_price_carrier_2 set [" + sXG + "]='" + XGYJ + "',[" + sDG + "]='" + DGYJ + "',[" + sCG + "]='" + CGYJ + "',[" + sXD + "]='"
+ XDYJ + "',[" + sCD + "]='" + CDYJ + "',[" + sXGBJ + "]='" + XGYJBJ + "',[" + sDGBJ + "]='" + DGYJBJ + "',[" + sCGBJ + "]='" + CGYJBJ + "',[" + sXDBJ + "]='"
+ XDYJBJ + "',[" + sCDBJ + "]='" + CDYJBJ + "',[" + sFJF + "]='" + table . Rows [ i ] [ "附加费" ] . ToString ( ) + "' where gid='" + sGID + "'" ;
// string sSQL = "update crm_price_carrier_2 set [" + sXG + "]='" + ds.Tables[0].Rows[i]["小柜"].ToString() + "',[" + sDG + "]='" + ds.Tables[0].Rows[i]["大柜"].ToString() + "',[" + sCG + "]='" + ds.Tables[0].Rows[i]["超高"].ToString() + "',[" + sFJF + "]='" + ds.Tables[0].Rows[i]["附加费"].ToString() + "' where gid='" + sGID + "'";
string sSQL = "" ;
sSQL = $"update crm_price_carrier_2 set " +
$"[{sXG}]='{XGYJ }',[{sDG }]='{DGYJ }',[{sCG }]='{CGYJ }',[{sXKD}]='{XKDYJ}',[{sDKD}]='{DKDYJ}',[{sXKJ}]= '{XKJYJ}',[{sDKJ}]='{DKJYJ}'" +
$",[{sXGBJ }]='{XGYJBJ }',[{sDGBJ }]='{DGYJBJ }',[{sCGBJ }]='{CGYJBJ }',[{sXKDBJ}]='{XKDYJBJ}',[{sDKDBJ}]='{DKDYJBJ}',[{sXKJBJ}]='{XKJYJBJ}',[{sDKJBJ}]='{DKJYJBJ}'" +
$",[{sFJF }]='{table.Rows[i][" 附 加 费 "].ToString() }' where gid='{sGID }'" ;
# endregion
bool bl = T_ALL_DA . GetExecuteSqlCommand ( sSQL ) ;
if ( ! bl )