ComplianceServer/oldcode/Core.Web/Controllers/PerformanceForecastControll...

711 lines
32 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Core.Web.App_Start;
using Core.Web.WebHelper;
using CRM.Core.BLL.Base;
using CRM.Core.BLL.Wx;
using CRM.Core.Common.WebHelper;
using CRM.Core.DTO;
using CRM.Core.Model;
using CRM.Core.Model.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using WX.CRM.Common;
namespace Core.Web.Controllers
{
/// <summary>
/// 业绩预测工具
/// </summary>
public class PerformanceForecastController : BaseController
{
BAS_PARAMETER_BL paramter_bl = new BAS_PARAMETER_BL();
[AuthorizeRedirect(RightsConfig.CONST_业绩估算, ToolBarConfig.CONST_NotButton, true)]
public ActionResult Index()
{
string json = paramter_bl.GetValue_Parameter(Parameter.Sys_rpt_json_config);//获得JSON配置
//ViewBag.JsonConfig1 = JsonHelper.JsonDivertToObj<JsonConfig>(json);
ViewBag.JsonConfig1 = json;
return View();
}
[AuthorizeRedirect(RightsConfig.CONST_业绩估算, ToolBarConfig.CONST_NotButton, false)]
/// <summary>
/// 财务估算
/// </summary>
/// <returns></returns>
public JsonResult Generate(PerformanceYCInfo modellist)
{
List<Order> orderlist = new List<Order>();
string erromessage = "";
retMsgNew<outStr> ret = new retMsgNew<outStr>() { result = true };
erromessage = "估算成功!";
try
{
string json = paramter_bl.GetValue_Parameter(Parameter.Sys_rpt_json_config);//获得JSON配置
JsonConfig config = JsonHelper.JsonDivertToObj<JsonConfig>(json);
Wx_Test testbl = new Wx_Test();
///============================形成订单=========================
foreach (HtmlOrder m in modellist.mydata)
{
decimal todec = Convert.ToDecimal(m.arrarrivalpay);
//DateTimeFormatInfo dtFormat = new DateTimeFormatInfo();
//dtFormat.ShortDatePattern = "yyyyMMdd";
var monthstr = m.month.ToString();
int year = Convert.ToInt32(monthstr.Substring(0, 4));
int month = Convert.ToInt32(monthstr.Substring(4, 2));
DateTime nowdate = new DateTime(year, month, 1);
//DateTime nowdate = Convert.ToDateTime(m.month.ToString() + "01", dtFormat);//为首月当天
if (m.ordertype == "ql" || m.ordertype == "zz")
{
Order order = ReturnQLOrder(todec, nowdate, m.opendays);
order.ptype = m.ordertype;
order.smallType = m.key;//产品实际类型
orderlist.Add(order);
}
else if (m.ordertype == "tn")
{
Order order = ReturnTNOrder(todec, nowdate, m.opendays);
order.ptype = m.ordertype;
order.smallType = m.key;//产品实际类型
orderlist.Add(order);
}
else if (m.ordertype == "ys")
{
Order order = ReturnYSOrder(todec, nowdate, m.opendays);
order.ptype = m.ordertype;
order.smallType = m.key;//产品实际类型
orderlist.Add(order);
}
}
///===============================订单分割==================
#region
List<OrderDetial2> orderdetialList = new List<OrderDetial2>();
string pici = DateTime.Now.ToString("yyyyMMddHHssfffff");
foreach (Order item in orderlist)
{
item.ordermonthINT = Convert.ToInt32(item.ordermonth.Replace("-", ""));
string orderid = string.Format("{0}_{1}_{2}_days", item.ptype, item.opendays, item.ordermonth.Replace("-", ""));//开通时间
DateTime opday = item.otime;//开通时间
DateTime endday = item.endday;//结束日期
DateTime monlastday = item.monlastday;//月最后一天2020
decimal jiazhi = item.jiazhi;//平均值
DateTime curdate = new DateTime(opday.Year, opday.Month, 1);//当月第一天
DateTime lasdate = new DateTime(endday.Year, endday.Month, 1);//当月第一天
string channel = item.ordertype;
string orderyear = item.orderyear;// item["orderyear"].ToString();
string ordermonth = item.ordermonth;// item["ordermonth"].ToString();
int i = 0;
string smallproductname = "";//产品名称
SmallProduct product = config.product.FirstOrDefault(m => m.producttype == item.ordertype.ToUpper() & m.ntype == item.ptype & m.days == item.opendays);
if (product != null)
{
if (product.ntype == "ql")
{
smallproductname = string.Format("擒龙{0}", product.name);
}
else if (product.ntype == "zz")
{
smallproductname = string.Format("至尊{0}", product.name);
}
else if (product.ntype == "tn")
{
smallproductname = string.Format("多赢{0}", product.name);
}
else if (product.ntype == "ys")
{
smallproductname = string.Format("爱赢{0}", product.name);
}
}
while (i > -1)
{
OrderDetial2 model = new OrderDetial2() { orderid = orderid, pjz = jiazhi, channel = channel, opyear = orderyear, opmonth = ordermonth, otime = item.orderday, pici = pici, type = 0, ordertype = item.ptype, smallType = item.smallType, smallTypeName = smallproductname };
model.oyear = ("" + curdate.Year);
model.omonth = (curdate.Year + "-" + (curdate.Month < 10 ? "0" + curdate.Month : "" + curdate.Month));
if (i == 0 && curdate == lasdate)//最后一个月
{
model.odays = (endday - opday).Days;//间隔天数
i = -5;
}
else if (i == 0)
{
model.odays = (monlastday - opday).Days + 1;//间隔天数
if (curdate == lasdate)//最后一个月
{
i = -5;
}
}
else
{
if (curdate == lasdate)//最后一个月
{
model.odays = (endday - curdate).Days;//间隔天数
i = -5;
}
else
{
model.odays = (curdate.AddMonths(1) - curdate).Days;//间隔天数
}
}
model.jzcount = model.odays * model.pjz;
if (model.odays != 0)//如果天数为零,可以删掉
{
orderdetialList.Add(model);//添加进去
testbl.InsetTest2(model);
}
i++;
curdate = curdate.AddMonths(1);//加一个月
}
if (item.ordertype == "dn")//懂牛产品需要添加当约60%的进来
{
OrderDetial2 model = new OrderDetial2() { orderid = orderid, omonth = item.ordermonth, oyear = item.orderyear, pjz = jiazhi, jzcount = item.firstjine, channel = channel, odays = 0, opyear = orderyear, opmonth = ordermonth, otime = item.orderday, pici = pici, type = 1, ordertype = item.ptype, smallType = item.smallType, smallTypeName = smallproductname };
orderdetialList.Add(model);
testbl.InsetTest2(model);
}
}
#endregion
//=============================此时可以统计报表了============
#region
List<string> orderday = orderdetialList.GroupBy(m => m.omonth).Select(m => m.Key).OrderBy(m => m).ToList();//月份
List<outRpt> rptlistDN = new List<outRpt>();//懂牛的产品报表
List<outRpt> rptlistTN = new List<outRpt>();//淘牛邦的产品报表
List<outRpt> rptlistYS = new List<outRpt>();//永顺邦的产品报表
List<PorductGoroup> qlType = orderdetialList.Where(m => m.ordertype == "ql").GroupBy(m => new { m.smallType, m.smallTypeName }).Select(m => new PorductGoroup { smallType = m.Key.smallType, smallTypeName = m.Key.smallTypeName }).OrderBy(m => m.smallType).ToList();//擒龙版类型列表
List<PorductGoroup> zzType = orderdetialList.Where(m => m.ordertype == "zz").GroupBy(m => new { m.smallType, m.smallTypeName }).Select(m => new PorductGoroup { smallType = m.Key.smallType, smallTypeName = m.Key.smallTypeName }).OrderBy(m => m.smallType).ToList();//至尊版类型列表
List<PorductGoroup> tnType = orderdetialList.Where(m => m.ordertype == "tn").GroupBy(m => new { m.smallType, m.smallTypeName }).Select(m => new PorductGoroup { smallType = m.Key.smallType, smallTypeName = m.Key.smallTypeName }).OrderBy(m => m.smallType).ToList();//淘牛版类型列表
List<PorductGoroup> ysType = orderdetialList.Where(m => m.ordertype == "ys").GroupBy(m => new { m.smallType, m.smallTypeName }).Select(m => new PorductGoroup { smallType = m.Key.smallType, smallTypeName = m.Key.smallTypeName }).OrderBy(m => m.smallType).ToList();//永顺版类型列表
foreach (string item in orderday)
{
int nowmont = Convert.ToInt32(item.Replace("-", ""));
//===========懂牛产品
outRpt rptDN = new outRpt() { month = item, monthINT = Convert.ToInt32(item.Replace("-", "")), ordertype = "ALL", smallType = "ALL", smallTypeName = "汇总" };//合计报表
rptDN.dangyueSR = orderdetialList.Where(m => m.omonth == item && m.channel == "dn" && m.omonth == m.opmonth).Sum(m => m.jzcount);//懂牛的当约收入
rptDN.noSR = orderdetialList.Where(m => m.omonth == item && m.channel == "dn" && m.omonth != m.opmonth).Sum(m => m.jzcount);//懂牛的当约
rptDN.OrderAll = orderlist.Where(m => m.ordertype == "dn" && m.ordermonthINT <= nowmont).Sum(m => m.arrarrivalpay);//回去订单总金额
if (rptDN.dangyueSR != 0 || rptDN.noSR != 0)
{
rptlistDN.Add(rptDN);
//细化子产品
if (qlType.Count > 0)
{
foreach (PorductGoroup ntype in qlType)
{
outRpt rptDN1 = new outRpt() { month = item, monthINT = Convert.ToInt32(item.Replace("-", "")), ordertype = "dn", smallType = ntype.smallType, smallTypeName = ntype.smallTypeName };//合计报表
rptDN1.dangyueSR = orderdetialList.Where(m => m.omonth == item && m.smallType == ntype.smallType && m.omonth == m.opmonth).Sum(m => m.jzcount);//懂牛的当约收入
rptDN1.noSR = orderdetialList.Where(m => m.omonth == item && m.smallType == ntype.smallType && m.omonth != m.opmonth).Sum(m => m.jzcount);//懂牛的当约
rptDN1.OrderAll = orderlist.Where(m => m.smallType == ntype.smallType && m.ordermonthINT <= nowmont).Sum(m => m.arrarrivalpay);//回去订单总金额
rptlistDN.Add(rptDN1);
}
}
//细化子产品
if (zzType.Count > 0)
{
foreach (PorductGoroup ntype in zzType)
{
outRpt rptDN1 = new outRpt() { month = item, monthINT = Convert.ToInt32(item.Replace("-", "")), ordertype = "dn", smallType = ntype.smallType, smallTypeName = ntype.smallTypeName };//合计报表
rptDN1.dangyueSR = orderdetialList.Where(m => m.omonth == item && m.smallType == ntype.smallType && m.omonth == m.opmonth).Sum(m => m.jzcount);//懂牛的当约收入
rptDN1.noSR = orderdetialList.Where(m => m.omonth == item && m.smallType == ntype.smallType && m.omonth != m.opmonth).Sum(m => m.jzcount);//懂牛的当约
rptDN1.OrderAll = orderlist.Where(m => m.smallType == ntype.smallType && m.ordermonthINT <= nowmont).Sum(m => m.arrarrivalpay);//回去订单总金额
rptlistDN.Add(rptDN1);
}
}
}
//============淘牛产品
outRpt rptTN = new outRpt() { month = item, monthINT = Convert.ToInt32(item.Replace("-", "")), ordertype = "ALL", smallType = "ALL", smallTypeName = "汇总" };//合计报表
rptTN.dangyueSR = orderdetialList.Where(m => m.omonth == item && m.channel == "tn" && m.omonth == m.opmonth).Sum(m => m.jzcount);//懂牛的当约收入
rptTN.noSR = orderdetialList.Where(m => m.omonth == item && m.channel == "tn" && m.omonth != m.opmonth).Sum(m => m.jzcount);//懂牛的当约
rptTN.OrderAll = orderlist.Where(m => m.ordertype == "tn" && m.ordermonthINT <= nowmont).Sum(m => m.arrarrivalpay);//回去订单总金额
if (rptTN.dangyueSR != 0 || rptTN.noSR != 0)
{
rptlistTN.Add(rptTN);
//细化子产品
if (tnType.Count > 0)
{
foreach (PorductGoroup ntype in tnType)
{
outRpt rptDN1 = new outRpt() { month = item, monthINT = Convert.ToInt32(item.Replace("-", "")), ordertype = "dn", smallType = ntype.smallType, smallTypeName = ntype.smallTypeName };//合计报表
rptDN1.dangyueSR = orderdetialList.Where(m => m.omonth == item && m.smallType == ntype.smallType && m.omonth == m.opmonth).Sum(m => m.jzcount);//懂牛的当约收入
rptDN1.noSR = orderdetialList.Where(m => m.omonth == item && m.smallType == ntype.smallType && m.omonth != m.opmonth).Sum(m => m.jzcount);//懂牛的当约
rptDN1.OrderAll = orderlist.Where(m => m.smallType == ntype.smallType && m.ordermonthINT <= nowmont).Sum(m => m.arrarrivalpay);//回去订单总金额
rptlistTN.Add(rptDN1);
}
}
}
//===========永顺产品
outRpt rptYS = new outRpt() { month = item, monthINT = Convert.ToInt32(item.Replace("-", "")), ordertype = "ALL", smallType = "ALL", smallTypeName = "汇总" };//合计报表
rptYS.dangyueSR = orderdetialList.Where(m => m.omonth == item && m.channel == "ys" && m.omonth == m.opmonth).Sum(m => m.jzcount);//懂牛的当约收入
rptYS.noSR = orderdetialList.Where(m => m.omonth == item && m.channel == "ys" && m.omonth != m.opmonth).Sum(m => m.jzcount);//懂牛的当约
rptYS.OrderAll = orderlist.Where(m => m.ordertype == "ys" && m.ordermonthINT <= nowmont).Sum(m => m.arrarrivalpay);//回去订单总金额
if (rptYS.dangyueSR != 0 || rptYS.noSR != 0)
{
rptlistYS.Add(rptYS);
//细化子产品
if (ysType.Count > 0)
{
foreach (PorductGoroup ntype in ysType)
{
outRpt rptDN1 = new outRpt() { month = item, monthINT = Convert.ToInt32(item.Replace("-", "")), ordertype = "dn", smallType = ntype.smallType, smallTypeName = ntype.smallTypeName };//合计报表
rptDN1.dangyueSR = orderdetialList.Where(m => m.omonth == item && m.smallType == ntype.smallType && m.omonth == m.opmonth).Sum(m => m.jzcount);//懂牛的当约收入
rptDN1.noSR = orderdetialList.Where(m => m.omonth == item && m.smallType == ntype.smallType && m.omonth != m.opmonth).Sum(m => m.jzcount);//懂牛的当约
rptDN1.OrderAll = orderlist.Where(m => m.smallType == ntype.smallType && m.ordermonthINT <= nowmont).Sum(m => m.arrarrivalpay);//回去订单总金额
rptlistYS.Add(rptDN1);
}
}
}
}
#endregion
#region
//=========懂牛 留存余额计算
foreach (outRpt item in rptlistDN)
{
if (item.ordertype == "ALL")//合计
{
item.SRAll = rptlistDN.Where(m => m.monthINT <= item.monthINT && m.smallType == "ALL").Sum(m => m.dangyueSR + m.noSR);
item.YE = item.OrderAll - item.SRAll;//留存余额
}
else//详细产品
{
item.SRAll = rptlistDN.Where(m => m.monthINT <= item.monthINT && m.smallType == item.smallType).Sum(m => m.dangyueSR + m.noSR);
item.YE = item.OrderAll - item.SRAll;//留存余额
}
}
//=========淘牛留存余额计算
foreach (outRpt item in rptlistTN)
{
if (item.ordertype == "ALL")//合计
{
item.SRAll = rptlistTN.Where(m => m.monthINT <= item.monthINT && m.smallType == "ALL").Sum(m => m.dangyueSR + m.noSR);
item.YE = item.OrderAll - item.SRAll;//留存余额
}
else//详细产品
{
item.SRAll = rptlistTN.Where(m => m.monthINT <= item.monthINT && m.smallType == item.smallType).Sum(m => m.dangyueSR + m.noSR);
item.YE = item.OrderAll - item.SRAll;//留存余额
}
}
//=========永顺 留存余额计算
foreach (outRpt item in rptlistYS)
{
//item.SRAll = rptlistYS.Where(m => m.monthINT <= item.monthINT).Sum(m => m.dangyueSR + m.noSR);
//item.YE = item.OrderAll - item.SRAll;//留存余额
if (item.ordertype == "ALL")//合计
{
item.SRAll = rptlistYS.Where(m => m.monthINT <= item.monthINT && m.smallType == "ALL").Sum(m => m.dangyueSR + m.noSR);
item.YE = item.OrderAll - item.SRAll;//留存余额
}
else//详细产品
{
item.SRAll = rptlistYS.Where(m => m.monthINT <= item.monthINT && m.smallType == item.smallType).Sum(m => m.dangyueSR + m.noSR);
item.YE = item.OrderAll - item.SRAll;//留存余额
}
}
#endregion
#region
outStr jsonStr = new outStr();
List<outRptStr> rptStrlistDN = new List<outRptStr>();
List<outRptStr> rptStrlistTN = new List<outRptStr>();
List<outRptStr> rptStrlistYS = new List<outRptStr>();
//转换成 字符串 懂牛
foreach (outRpt item in rptlistDN)
{
rptStrlistDN.Add(new outRptStr()
{
month = item.month,
ordertype = item.ordertype,
smallType = item.smallType,
smallTypeName = item.smallTypeName,
dangyueSR = item.dangyueSR.ToString("#0.00"),
noSR = item.noSR.ToString("#0.00"),
OrderAll = item.OrderAll.ToString("#0.00"),
SRAll = item.SRAll.ToString("#0.00"),
YE = item.YE.ToString("#0.00"),
monthINT = item.monthINT
});
}
//转换成 字符串 淘牛
foreach (outRpt item in rptlistTN)
{
rptStrlistTN.Add(new outRptStr()
{
month = item.month,
ordertype = item.ordertype,
smallType = item.smallType,
smallTypeName = item.smallTypeName,
dangyueSR = item.dangyueSR.ToString("#0.00"),
noSR = item.noSR.ToString("#0.00"),
OrderAll = item.OrderAll.ToString("#0.00"),
SRAll = item.SRAll.ToString("#0.00"),
YE = item.YE.ToString("#0.00"),
monthINT = item.monthINT
});
}
//转换成 字符串 永顺
foreach (outRpt item in rptlistYS)
{
rptStrlistYS.Add(new outRptStr()
{
month = item.month,
ordertype = item.ordertype,
smallType = item.smallType,
smallTypeName = item.smallTypeName,
dangyueSR = item.dangyueSR.ToString("#0.00"),
noSR = item.noSR.ToString("#0.00"),
OrderAll = item.OrderAll.ToString("#0.00"),
SRAll = item.SRAll.ToString("#0.00"),
YE = item.YE.ToString("#0.00"),
monthINT = item.monthINT
});
}
#endregion
jsonStr.dnList = rptStrlistDN;
jsonStr.tnList = rptStrlistTN;
jsonStr.ysList = rptStrlistYS;
ret.data = jsonStr;
}
catch (Exception exa)
{
ret.result = false;
erromessage += "出现系统错误";
LogHelper.Error(exa);
}
ret.retmsg = erromessage;
return Json(ret, JsonRequestBehavior.AllowGet);
}
#region
/// <summary>
/// 返回懂牛擒龙和至尊版本订单
/// </summary>
/// <returns></returns>
public Order ReturnQLOrder(decimal todec, DateTime nowdate, int orderdays)
{
Order order = new Order
{
arrarrivalpay = todec,
bfzss = todec * Convert.ToDecimal(0.4),
firstjine = todec * Convert.ToDecimal(0.6),
opendays = orderdays,
endday = nowdate.AddDays(orderdays),
monlastday = nowdate.AddMonths(1).AddDays(-1),
orderday = nowdate.ToString("yyyy-MM-dd"),
ordermonth = nowdate.ToString("yyyy-MM"),
orderyear = nowdate.ToString("yyyy"),
ordertype = "dn",
otime = nowdate
};
order.jiazhi = order.bfzss / order.opendays;
return order;
}
/// <summary>
/// 返回淘牛版订单
/// </summary>
/// <returns></returns>
public Order ReturnTNOrder(decimal todec, DateTime nowdate, int orderdays)
{
Order order = new Order
{
arrarrivalpay = todec,
bfzss = todec * Convert.ToDecimal(1.0),
firstjine = todec * Convert.ToDecimal(0.0),//套牛百分之一百分摊
opendays = orderdays,
endday = nowdate.AddDays(orderdays),
monlastday = nowdate.AddMonths(1).AddDays(-1),
orderday = nowdate.ToString("yyyy-MM-dd"),
ordermonth = nowdate.ToString("yyyy-MM"),
ordertype = "tn",
otime = nowdate
};
order.jiazhi = order.bfzss / order.opendays;
return order;
}
/// <summary>
/// 返回永顺订单
/// </summary>
/// <returns></returns>
public Order ReturnYSOrder(decimal todec, DateTime nowdate, int orderdays)
{
Order order = new Order
{
arrarrivalpay = todec,
bfzss = todec * Convert.ToDecimal(1.0),
firstjine = todec * Convert.ToDecimal(0.0),//套牛百分之一百分摊
opendays = orderdays,
endday = nowdate.AddDays(orderdays),
monlastday = nowdate.AddMonths(1).AddDays(-1),
orderday = nowdate.ToString("yyyy-MM-dd"),
ordermonth = nowdate.ToString("yyyy-MM"),
ordertype = "ys",
otime = nowdate
};
order.jiazhi = order.bfzss / order.opendays;
return order;
}
}
#endregion
public class PorductGoroup
{
public string smallType { get; set; }
public string smallTypeName { get; set; }
}
public class PerformanceYCInfo
{
public List<HtmlOrder> mydata { get; set; }
}
//报表 表
public class outRpt
{
public string month { get; set; }
public int monthINT { get; set; }
public string ordertype { get; set; }
/// <summary>
/// 喜欢产品分类 例如ql_90_days
/// </summary>
public string smallType { get; set; }
/// <summary>
/// 喜欢产品分类名称 例如:擒龙季度版
/// </summary>
public string smallTypeName { get; set; }
/// <summary>
/// 当月收入
/// </summary>
public decimal dangyueSR { get; set; }
/// <summary>
/// 非当月收入
/// </summary>
public decimal noSR { get; set; }
/// <summary>
/// 累计留存金额
/// </summary>
public decimal YE { get; set; }
/// <summary>
/// 当约之前订单总额
/// </summary>
public decimal OrderAll { get; set; }
/// <summary>
/// 当约之前累计收入
/// </summary>
public decimal SRAll { get; set; }
}
public class outStr
{
/// <summary>
/// 懂牛列表
/// </summary>
public List<outRptStr> dnList { get; set; }
/// <summary>
/// 淘牛列表
/// </summary>
public List<outRptStr> tnList { get; set; }
/// <summary>
/// 永顺列表
/// </summary>
public List<outRptStr> ysList { get; set; }
}
//报表 字符串表
public class outRptStr
{
public string month { get; set; }
public int monthINT { get; set; }
/// <summary>
/// 当月收入
/// </summary>
public string dangyueSR { get; set; }
/// <summary>
/// 非当月收入
/// </summary>
public string noSR { get; set; }
/// <summary>
/// 累计留存金额
/// </summary>
public string YE { get; set; }
/// <summary>
/// 当约之前订单总额
/// </summary>
public string OrderAll { get; set; }
/// <summary>
/// 当约之前累计收入
/// </summary>
public string SRAll { get; set; }
public string ordertype { get; set; }
/// <summary>
/// 喜欢产品分类 例如ql_90_days
/// </summary>
public string smallType { get; set; }
/// <summary>
/// 喜欢产品分类名称 例如:擒龙季度版
/// </summary>
public string smallTypeName { get; set; }
}
/// <summary>
/// 传上来的订单
/// </summary>
public class HtmlOrder
{
//订单类型 例ql
public string ordertype { get; set; }
//订单天数 例30
public int opendays { get; set; }
//月份 例202003
public int month { get; set; }
//金额 例12000
public string arrarrivalpay { get; set; }
/// <summary>
/// 产品 例ql_90_days
/// </summary>
public string key { get; set; }
}
public class Order
{
/// <summary>
/// 开通时间
/// </summary>
public DateTime otime { get; set; }
/// <summary>
/// 订单日子(只取第一天) 例:20120-03-01
/// </summary>
public string orderday { get; set; }
/// <summary>
/// 订单月份 例:20120-03
/// </summary>
public string ordermonth { get; set; }
public int ordermonthINT { get; set; }
/// <summary>
/// 订单年份 例 2020
/// </summary>
public string orderyear { get; set; }
/// <summary>
/// 金额
/// </summary>
public decimal arrarrivalpay { get; set; }
/// <summary>
/// 订单天输
/// </summary>
public int opendays { get; set; }
/// <summary>
/// 每天价值价值金额
/// </summary>
public decimal jiazhi { get; set; }
/// <summary>
/// 首月金额
/// </summary>
public decimal firstjine { get; set; }
/// <summary>
/// 百分之40
/// </summary>
public decimal bfzss { get; set; }
/// <summary>
/// 当月最后一天
/// </summary>
public DateTime monlastday { get; set; }
/// <summary>
/// 到期时间
/// </summary>
public DateTime endday { get; set; }
/// <summary>
/// dn:懂牛 tn套牛 ys永顺
/// </summary>
public string ordertype { get; set; }
/// <summary>
/// 产品小类型 zz:至尊 ql:擒龙版本 tn淘牛版本 ys永顺版本
/// </summary>
public string ptype { get; set; }
/// <summary>
/// 喜欢产品分类 例如ql_90_days
/// </summary>
public string smallType { get; set; }
}
public class JsonConfig
{
public List<ProductModule> module { get; set; }
public List<SmallProduct> product { get; set; }
}
/// <summary>
/// 大产品配置
/// </summary>
public class ProductModule
{
/// <summary>
/// "DN"
/// </summary>
public string producttype { get; set; }
/// <summary>
/// ": "智赢系列",
/// </summary>
public string name { get; set; }
/// <summary>
/// ": "懂牛产品60%算当月40%每天平分",
/// </summary>
public string memo { get; set; }
/// <summary>
/// : 0.6,
/// </summary>
public decimal dangyuebi { get; set; }
/// <summary>
/// ": 0.4
/// </summary>
public decimal qitabi { get; set; }
}
public class SmallProduct
{
/// <summary>
/// 一月版"
/// </summary>
public string name { get; set; }
/// <summary>
/// 30
/// </summary>
public int days { get; set; }
/// <summary>
/// DN
/// </summary>
public string producttype { get; set; }
/// <summary>
/// ql
/// </summary>
public string ntype { get; set; }
}
}