内贸空运,增加日志,分单生成主单时的燃油费生成。

DS7_JinGang
ddlucky 2 years ago
parent b100a5d9e4
commit ab046e1030

@ -299,7 +299,7 @@ namespace DSWeb.MvcShipping.Controllers
//增加一个判断 如无揽货人sale则报警不保存
BasicDataRefDAL.SaveLog("opstatus="+ opstatus+":"+JsonConvert.Serialize(headData)+"//"+ JsonConvert.Serialize(CargobodyList), Convert.ToString(Session["USERID"]),"内贸空运","主单保存");
BasicDataRefDAL.SaveLog("opstatus="+ opstatus+":"+JsonConvert.Serialize(headData)+"//"+ JsonConvert.Serialize(CargobodyList), Convert.ToString(Session["SHOWNAME"]),"内贸空运","主单保存");
var modb = new ModelObjectRepository();
DBResult result = modb.Save(headData,
@ -333,6 +333,7 @@ namespace DSWeb.MvcShipping.Controllers
weight += Convert.ToDouble(item.WEIGHT);
}
double fuelFee = 0;
var updstr = "";
switch (headData.AIRLINES)
{
case "山东航空":
@ -341,7 +342,8 @@ namespace DSWeb.MvcShipping.Controllers
int shFuelFee = (int)(Math.Round(fuelFee, 0));
if (shFuelFee < 10)
shFuelFee = 10;
MsOpAirnDAL.ExecSql(" update Op_Airn set OTFEE1='燃油费',OTFEE1AMOUNT='" +shFuelFee + "' where BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' and isnull(ISVOID,0)=0 ");
updstr = " update Op_Airn set OTFEE1='燃油费',OTFEE1AMOUNT='" + shFuelFee + "' where BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' and isnull(ISVOID,0)=0 ";
break;
case "青岛航空":
fuelFee = 0.2 * weight;
@ -349,13 +351,13 @@ namespace DSWeb.MvcShipping.Controllers
int qhFuelFee = (int)(Math.Round(fuelFee, 0));
if (qhFuelFee < 10)
qhFuelFee = 10;
MsOpAirnDAL.ExecSql(" update Op_Airn set OTFEE1='燃油费',OTFEE1AMOUNT='" + qhFuelFee + "' where BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' and isnull(ISVOID,0)=0 ");
updstr = " update Op_Airn set OTFEE1='燃油费',OTFEE1AMOUNT='" + qhFuelFee + "' where BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' and isnull(ISVOID,0)=0 ";
break;
case "南方航空":
fuelFee = 0.2 * weight;
//燃油费向上取整
int nfFuelFee = (int)(Math.Ceiling(fuelFee));
MsOpAirnDAL.ExecSql(" update Op_Airn set OTFEE1='燃油费',OTFEE1AMOUNT='" + nfFuelFee + "' where BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' and isnull(ISVOID,0)=0 ");
updstr = " update Op_Airn set OTFEE1='燃油费',OTFEE1AMOUNT='" + nfFuelFee + "' where BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' and isnull(ISVOID,0)=0 ";
break;
case "吉祥航空":
@ -368,7 +370,7 @@ namespace DSWeb.MvcShipping.Controllers
{
fuelFee = Math.Round(fuelFee, 2);
}
MsOpAirnDAL.ExecSql(" update Op_Airn set OTFEE1='燃油费',OTFEE1AMOUNT='" + fuelFee + "' where BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' and isnull(ISVOID,0)=0 ");
updstr = " update Op_Airn set OTFEE1='燃油费',OTFEE1AMOUNT='" + fuelFee + "' where BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' and isnull(ISVOID,0)=0 ";
break;
case "深圳航空":
fuelFee = 0.2 * weight;
@ -380,7 +382,7 @@ namespace DSWeb.MvcShipping.Controllers
{
fuelFee = Math.Round(fuelFee, 2);
}
MsOpAirnDAL.ExecSql(" update Op_Airn set OTFEE1='燃油费',OTFEE1AMOUNT='" + fuelFee + "' where BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' and isnull(ISVOID,0)=0 ");
updstr = " update Op_Airn set OTFEE1='燃油费',OTFEE1AMOUNT='" + fuelFee + "' where BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' and isnull(ISVOID,0)=0 ";
break;
case "春秋航空":
//燃油费四舍五入取整
@ -389,7 +391,7 @@ namespace DSWeb.MvcShipping.Controllers
{
fuelFee = 1;
}
MsOpAirnDAL.ExecSql(" update Op_Airn set OTFEE1='燃油费',OTFEE1AMOUNT='" + fuelFee + "' where BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' and isnull(ISVOID,0)=0 ");
updstr = " update Op_Airn set OTFEE1='燃油费',OTFEE1AMOUNT='" + fuelFee + "' where BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' and isnull(ISVOID,0)=0 ";
break;
case "厦门航空":
//燃油费四舍五入 改为取整
@ -398,17 +400,21 @@ namespace DSWeb.MvcShipping.Controllers
{
fuelFee = 1;
}
MsOpAirnDAL.ExecSql(" update Op_Airn set OTFEE1='燃油费',OTFEE1AMOUNT='" + fuelFee + "' where BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' and isnull(ISVOID,0)=0 ");
updstr = " update Op_Airn set OTFEE1='燃油费',OTFEE1AMOUNT='" + fuelFee + "' where BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' and isnull(ISVOID,0)=0 ";
break;
default:
fuelFee = 0.2 * weight;
//燃油费四舍五入取整,前端用的tofixed
int otherFuelFee = (int)(Math.Round(fuelFee, 0));
MsOpAirnDAL.ExecSql(" update Op_Airn set OTFEE1='燃油费',OTFEE1AMOUNT='" + otherFuelFee + "' where BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' and isnull(ISVOID,0)=0 ");
updstr = " update Op_Airn set OTFEE1='燃油费',OTFEE1AMOUNT='" + otherFuelFee + "' where BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' and isnull(ISVOID,0)=0 ";
break;
}
if (updstr!="") {
BasicDataRefDAL.SaveLog(updstr, Convert.ToString(Session["SHOWNAME"]), "内贸空运", "主单费用");
MsOpAirnDAL.ExecSql(updstr);
}
//20220914 然后更新杂费和合计数
var = MsOpAirnDAL.GetData(" BLTYPE='国内主单' and HBLNO='" + headData.HBLNO + "' ");

Loading…
Cancel
Save