|
|
|
@ -6,6 +6,10 @@ using DSWeb.Areas.Import.Models.ImportTrade;
|
|
|
|
|
using HcUtility.Core;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using DSWeb.Common.DB;
|
|
|
|
|
using System.Text.RegularExpressions;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using com.sun.org.apache.bcel.@internal.generic;
|
|
|
|
|
using sun.security.krb5;
|
|
|
|
|
|
|
|
|
|
namespace DSWeb.Areas.TruckMng.Models.MsWlBs
|
|
|
|
|
{
|
|
|
|
@ -1827,7 +1831,7 @@ namespace DSWeb.Areas.TruckMng.Models.MsWlBs
|
|
|
|
|
|
|
|
|
|
public List<ch_fee_order_md> FeeList { get; set; }
|
|
|
|
|
|
|
|
|
|
public string[] FeeNameList { get; set; }
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Public Properties
|
|
|
|
@ -2424,14 +2428,84 @@ namespace DSWeb.Areas.TruckMng.Models.MsWlBs
|
|
|
|
|
|
|
|
|
|
public class MsWlPcHead_FH: MsWlPcHead_WFSDEdit
|
|
|
|
|
{
|
|
|
|
|
[ModelDB]
|
|
|
|
|
new public string FuelPrice { get; set; }
|
|
|
|
|
//[ModelDB]
|
|
|
|
|
//new public string FuelPrice { get; set; }
|
|
|
|
|
[ModelDB]
|
|
|
|
|
new public decimal FuelQty { get; set; } = 0;
|
|
|
|
|
[ModelDB]
|
|
|
|
|
new public decimal RealMil { get; set; } = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public string[] FeeNameList { get; set; }
|
|
|
|
|
|
|
|
|
|
public string[] JYZList { get; set; }
|
|
|
|
|
|
|
|
|
|
public string JYZ { get; set; }
|
|
|
|
|
public decimal StartMil { get; set; } = 0M;
|
|
|
|
|
public decimal EndMil { get; set; } = 0M;
|
|
|
|
|
public decimal Amount { get; set; } = 0M;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 查询时使用
|
|
|
|
|
/// </summary>
|
|
|
|
|
public void 解析备注至方合app字段()
|
|
|
|
|
{ //JYZ 加油类型;StartMil 开始公里数;EndMil 结束公里数;Amount 加油金额
|
|
|
|
|
//从str当中截取[]之间的部分
|
|
|
|
|
//Regex regex = new Regex(@"\\[[^\\]]+\\]", RegexOptions.Multiline);
|
|
|
|
|
Regex regex = new Regex(@"(?i)(?<=\[)(.*)(?=\])");//中括号[]
|
|
|
|
|
var InnerStr = regex.Match(Remark).Value;
|
|
|
|
|
|
|
|
|
|
var sl = InnerStr.Split(';').ToList();
|
|
|
|
|
foreach (var l in sl)
|
|
|
|
|
{
|
|
|
|
|
var ti = InnerStr.Split(':').ToList();
|
|
|
|
|
if (ti[0] == "加油类型") JYZ = ti[1];
|
|
|
|
|
if (ti[0] == "开始公里数") StartMil = string.IsNullOrWhiteSpace(ti[1].ToString()) ? 0 : Convert.ToDecimal(ti[1]);
|
|
|
|
|
if (ti[0] == "结束公里数") EndMil = string.IsNullOrWhiteSpace(ti[1].ToString()) ? 0 : Convert.ToDecimal(ti[1]);
|
|
|
|
|
if (ti[0] == "加油金额") Amount = string.IsNullOrWhiteSpace(ti[1].ToString()) ? 0 : Convert.ToDecimal(ti[1]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 保存时使用
|
|
|
|
|
/// </summary>
|
|
|
|
|
public void 方合app字段记录至备注()
|
|
|
|
|
{
|
|
|
|
|
//JYZ 加油类型;StartMil 开始公里数;EndMil 结束公里数
|
|
|
|
|
//加油量 FuelQty;加油金额 Amount;公里数合计 RealMil
|
|
|
|
|
var InnerStr = "";
|
|
|
|
|
|
|
|
|
|
if (Remark.IndexOf("[") < 0)
|
|
|
|
|
{
|
|
|
|
|
Remark += "[]";
|
|
|
|
|
InnerStr = "[]";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Regex regex = new Regex(@"(?i)(?<=\[)(.*)(?=\])");//中括号[]
|
|
|
|
|
InnerStr = "[" + regex.Match(Remark).Value + "]";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RealMil = EndMil - StartMil;
|
|
|
|
|
|
|
|
|
|
var jyzlist = new List<string>
|
|
|
|
|
{
|
|
|
|
|
"中石油","中石化","金盾","大象"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var jyzindex = string.IsNullOrWhiteSpace(JYZ) ? 0 : Convert.ToInt32(JYZ);
|
|
|
|
|
|
|
|
|
|
var jyzstr = jyzlist[jyzindex];
|
|
|
|
|
|
|
|
|
|
var newStr = "";
|
|
|
|
|
newStr += "加油类型:" + jyzstr + ";";
|
|
|
|
|
newStr += "加油量:" + FuelQty.ToString() + ";";
|
|
|
|
|
newStr += "加油金额:" + Amount.ToString() + ";";
|
|
|
|
|
newStr += "开始公里数:" + StartMil.ToString() + ";";
|
|
|
|
|
newStr += "结束公里数:" + EndMil.ToString() + ";";
|
|
|
|
|
newStr += "公里数合计:" + RealMil.ToString() + ";";
|
|
|
|
|
|
|
|
|
|
Remark = Remark.Replace(InnerStr, newStr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//data.isEnd = Convert.ToString(reader["isEnd"]);
|
|
|
|
|
}
|
|
|
|
|