全泰账单,和箱型有关的费用改为用枚举类型45全权配置,如果能找到的箱型则使用找到的价格,找不到的用对应的20、40价格。台湾特殊价格的用“高雄20GP,高雄20”表示

main
ddlucky 5 months ago
parent d61c97b274
commit 4b0f349e26

@ -240,6 +240,7 @@ namespace DSWeb.Areas.CommMng.Models
}
public CommonDataContext cdc { get; set; }
public User OP { get; set; }
@ -263,6 +264,15 @@ namespace DSWeb.Areas.CommMng.Models
return 0;
}
private bool ContainsPrice(string BILLFeeName)
{
if (.Exists(x => x.EnumValueID == BILLFeeName))
{
return true;
}
return false;
}
private List<decimal> GetPriceList(string BILLFeeName)
{
var result = new List<decimal>();
@ -379,7 +389,7 @@ namespace DSWeb.Areas.CommMng.Models
= cdc.tSysEnumValue.Where(x => x.EnumTypeID == 46).ToList();
= cdc.tSysEnumValue.Where(x => x.EnumTypeID == 47).ToList();
= cdc.tSysEnumValue.Where(x => x.EnumTypeID == 47).ToList();
var currfee = cdc.ch_fee.Where(x => x.BSNO == head.BSNO).ToList();
@ -636,35 +646,40 @@ namespace DSWeb.Areas.CommMng.Models
if (ctnList != null && CtnNum > 0)
{
var 20 = GetPrice("高雄20");
var 40 = GetPrice("高雄40");
var 20RH = GetPrice("高雄20RH");
var 40RH = GetPrice("高雄40RH");
var ctn20 = GetPrice("20");
var ctn40 = GetPrice("40");
//var 高雄20 = GetPrice("高雄20");
//var 高雄40 = GetPrice("高雄40");
//var 高雄20RH = GetPrice("高雄20RH");
//var 高雄40RH = GetPrice("高雄40RH");
//var ctn20 = GetPrice("20");
//var ctn40 = GetPrice("40");
//var All40RH = GetPrice("40RH");
var All40RH = GetPrice("40RH");
var price = 0M;
if (.Exists(x=>x.EnumValueName== head.PORTDISCHARGE) )
{
foreach (var ctn in ctnList)
{
if (ctn.CTNALL == "20RH") {
Add(ctn, 20RH);
}else
if (ctn.CTNALL == "40RH")
//if (ctn.CTNALL == "20RH") {
// 码头操作费Add(ctn, 高雄20RH);
//}else
if (ContainsPrice("高雄"+ctn.CTNALL) )
{
Add(ctn, 40RH);
price= GetPrice("高雄" + ctn.CTNALL);
Add(ctn, price);
}
else
if (ctn.SIZE == "40")
{
Add(ctn, 20);
price=GetPrice("高雄40");
Add(ctn, price);
}
else
if (ctn.SIZE == "20")
{
Add(ctn, 40);
price = GetPrice("高雄20");
Add(ctn, price);
}
}
}
@ -672,19 +687,22 @@ namespace DSWeb.Areas.CommMng.Models
{
foreach (var ctn in ctnList)
{
if (ctn.CTNALL == "40RH")
if (ContainsPrice( ctn.CTNALL))
{
Add(ctn, All40RH);
price = GetPrice( ctn.CTNALL);
Add(ctn, price);
}
else
if (ctn.SIZE == "40")
{
Add(ctn, ctn40);
price= GetPrice("40");
Add(ctn, price);
}
else
if (ctn.SIZE == "20")
{
Add(ctn, ctn20);
price = GetPrice("20");
Add(ctn, price);
}
}
}
@ -944,43 +962,92 @@ namespace DSWeb.Areas.CommMng.Models
if (head.LANE != "DNY东南亚航线")
{
var price = GetPrice("单证费");
var price = GetPrice("单证费");
var feename = GetFeeName("单证费");
var newfee = MsChFeeDAL.getChFee(OP.GID, head.BSNO, head.FORWARDER, 2, feename, price, "单票", 1);
var newfee = MsChFeeDAL.getChFee(OP.GID, head.BSNO, head.FORWARDER, 2, feename, price, "单票", 1);
Add(newfee);
}
var 20 = GetPrice("高雄20");
var 40 = GetPrice("高雄40");
var 20RH = GetPrice("高雄20RH");
var 40RH = GetPrice("高雄40RH");
var ctn20 = GetPrice("20");
var ctn40 = GetPrice("40");
//var 高雄20 = GetPrice("高雄20");
//var 高雄40 = GetPrice("高雄40");
//var 高雄20RH = GetPrice("高雄20RH");
//var 高雄40RH = GetPrice("高雄40RH");
//var ctn20 = GetPrice("20");
//var ctn40 = GetPrice("40");
var All40RH = GetPrice("40RH");
//var All40RH = GetPrice("40RH");
//if (head.PORTDISCHARGE == "KAOHSIUNG")
if (.Exists(x=>x.EnumValueName== head.PORTDISCHARGE))
//if (台湾价格港口.Exists(x=>x.EnumValueName== head.PORTDISCHARGE))
//{
// foreach (var ctn in ctnList)
// {
// if (ctn.CTNALL == "20RH")
// {
// 码头操作费Add(ctn, 高雄20RH);
// }
// else
// if (ctn.CTNALL == "40RH")
// {
// 码头操作费Add(ctn, 高雄40RH);
// }
// else
// if (ctn.SIZE == "40")
// {
// 码头操作费Add(ctn, 高雄20);
// }
// else
// if (ctn.SIZE == "20")
// {
// 码头操作费Add(ctn, 高雄40);
// }
// }
//}
//else
//{
// foreach (var ctn in ctnList)
// {
// if (ctn.CTNALL == "40RH")
// {
// 码头操作费Add(ctn, All40RH);
// }
// else
// if (ctn.SIZE == "40")
// {
// 码头操作费Add(ctn, ctn40);
// }
// else
// if (ctn.SIZE == "20")
// {
// 码头操作费Add(ctn, ctn20);
// }
// }
//}
var price = 0M;
if (.Exists(x => x.EnumValueName == head.PORTDISCHARGE))
{
foreach (var ctn in ctnList)
{
if (ctn.CTNALL == "20RH")
{
Add(ctn, 20RH);
}
else
if (ctn.CTNALL == "40RH")
//if (ctn.CTNALL == "20RH") {
// 码头操作费Add(ctn, 高雄20RH);
//}else
if (ContainsPrice("高雄" + ctn.CTNALL))
{
Add(ctn, 40RH);
price = GetPrice("高雄" + ctn.CTNALL);
Add(ctn, price);
}
else
if (ctn.SIZE == "40")
{
Add(ctn, 20);
price = GetPrice("高雄40");
Add(ctn, price);
}
else
if (ctn.SIZE == "20")
{
Add(ctn, 40);
price = GetPrice("高雄20");
Add(ctn, price);
}
}
}
@ -988,19 +1055,22 @@ namespace DSWeb.Areas.CommMng.Models
{
foreach (var ctn in ctnList)
{
if (ctn.CTNALL == "40RH")
if (ContainsPrice(ctn.CTNALL))
{
Add(ctn, All40RH);
price = GetPrice(ctn.CTNALL);
Add(ctn, price);
}
else
if (ctn.SIZE == "40")
{
Add(ctn, ctn40);
price = GetPrice("40");
Add(ctn, price);
}
else
if (ctn.SIZE == "20")
{
Add(ctn, ctn20);
price = GetPrice("20");
Add(ctn, price);
}
}
}

Loading…
Cancel
Save