|
|
@@ -630,6 +630,53 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
+ #region 一键大盟主
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 一键大盟主
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public string SetBigLeader(string Id)
|
|
|
+ {
|
|
|
+ string[] idlist = Id.Split(new char[] { ',' });
|
|
|
+ AddSysLog(Id, "Users", "SetBigLeader");
|
|
|
+ foreach (string subid in idlist)
|
|
|
+ {
|
|
|
+ int id = int.Parse(subid);
|
|
|
+ Dictionary<string, object> Fields = new Dictionary<string, object>();
|
|
|
+ Fields.Add("LeaderLevel", 2);
|
|
|
+ new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("Users", Fields, id);
|
|
|
+ }
|
|
|
+ db.SaveChanges();
|
|
|
+ return "success";
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 一键小盟主
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 一键小盟主
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public string SetSmallLeader(string Id)
|
|
|
+ {
|
|
|
+ string[] idlist = Id.Split(new char[] { ',' });
|
|
|
+ AddSysLog(Id, "Users", "SetSmallLeader");
|
|
|
+ foreach (string subid in idlist)
|
|
|
+ {
|
|
|
+ int id = int.Parse(subid);
|
|
|
+ Dictionary<string, object> Fields = new Dictionary<string, object>();
|
|
|
+ Fields.Add("LeaderLevel", 1);
|
|
|
+ new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("Users", Fields, id);
|
|
|
+ }
|
|
|
+ db.SaveChanges();
|
|
|
+ return "success";
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
#region 风控
|
|
|
|
|
|
public IActionResult Risk(string right, int Id = 0)
|
|
|
@@ -997,6 +1044,121 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
+
|
|
|
+ #region 直属创客导出Excel
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 直属创客导出Excel
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public JsonResult ExportZSExcel(Users data, string MakerCode, string ParentMakerCode)
|
|
|
+ {
|
|
|
+ Dictionary<string, string> Fields = new Dictionary<string, string>();
|
|
|
+
|
|
|
+ string condition = " and Status>-1";
|
|
|
+ //创客编号
|
|
|
+ if (!string.IsNullOrEmpty(MakerCode))
|
|
|
+ {
|
|
|
+ condition += " and ParentUserId in (select UserId from UserForMakerCode where MakerCode='" + MakerCode + "')";
|
|
|
+ }
|
|
|
+ //直属创客编号
|
|
|
+ if (!string.IsNullOrEmpty(ParentMakerCode))
|
|
|
+ {
|
|
|
+ condition += " and ParentUserId in (select UserId from UserForMakerCode where MakerCode='" + ParentMakerCode + "')";
|
|
|
+ }
|
|
|
+
|
|
|
+ Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("Users", Fields, "Id desc", "True", 1, 20000, condition, "Id,MakerCode,RealName,UserLevel", false);
|
|
|
+ List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
|
|
|
+ foreach (Dictionary<string, object> dic in diclist)
|
|
|
+ {
|
|
|
+ int Id = int.Parse(dic["Id"].ToString());
|
|
|
+ Users userZS = db.Users.FirstOrDefault(m => m.Id == Id) ?? new Users();
|
|
|
+ dic["MakerCode"] = userZS.MakerCode;
|
|
|
+ dic["RealName"] = userZS.RealName;
|
|
|
+ dic["UserLevel"] = RelationClass.GetUserLevelSetInfo(int.Parse(dic["UserLevel"].ToString()));
|
|
|
+ }
|
|
|
+ Dictionary<string, object> result = new Dictionary<string, object>();
|
|
|
+ result.Add("Status", "1");
|
|
|
+ result.Add("Info", "Excel报表-" + DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss") + ".xlsx");
|
|
|
+ result.Add("Obj", diclist);
|
|
|
+ Dictionary<string, object> ReturnFields = new Dictionary<string, object>();
|
|
|
+
|
|
|
+ ReturnFields.Add("Id", "Id");
|
|
|
+ ReturnFields.Add("MakerCode", "创客编号");
|
|
|
+ ReturnFields.Add("RealName", "创客姓名");
|
|
|
+ ReturnFields.Add("UserLevel", "创客等级");
|
|
|
+
|
|
|
+ result.Add("Fields", ReturnFields);
|
|
|
+ AddSysLog("0", "Users", "ExportZSExcel");
|
|
|
+ return Json(result);
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region 上级创客导出Excel
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 上级创客导出Excel
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public JsonResult ExportSJExcel(Users data, string MakerCode, string ParentMakerCode)
|
|
|
+ {
|
|
|
+ Dictionary<string, string> Fields = new Dictionary<string, string>();
|
|
|
+
|
|
|
+ string condition = " and Status>-1";
|
|
|
+ //创客编号
|
|
|
+ if (!string.IsNullOrEmpty(MakerCode))
|
|
|
+ {
|
|
|
+ var query = db.UserForMakerCode.FirstOrDefault(m => m.MakerCode == MakerCode);
|
|
|
+ Users self = db.Users.FirstOrDefault(m => m.Id == query.UserId);
|
|
|
+ if (self != null)
|
|
|
+ {
|
|
|
+ string ParentNav = function.CheckNull(self.ParentNav);
|
|
|
+ condition += " and Id in (" + ParentNav.Trim(',').Replace(",,", ",") + ")";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //直属创客编号
|
|
|
+ if (!string.IsNullOrEmpty(ParentMakerCode))
|
|
|
+ {
|
|
|
+ var query = db.UserForMakerCode.FirstOrDefault(m => m.MakerCode == ParentMakerCode);
|
|
|
+ Users self = db.Users.FirstOrDefault(m => m.Id == query.UserId);
|
|
|
+ if (self != null)
|
|
|
+ {
|
|
|
+ string ParentNav = function.CheckNull(self.ParentNav);
|
|
|
+ condition += " and Id in (" + ParentNav.Trim(',').Replace(",,", ",") + ")";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("Users", Fields, "Id desc", "True", 1, 20000, condition, "Id,MakerCode,RealName,UserLevel", false);
|
|
|
+ List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
|
|
|
+ foreach (Dictionary<string, object> dic in diclist)
|
|
|
+ {
|
|
|
+ int Id = int.Parse(dic["Id"].ToString());
|
|
|
+ Users userSJ = db.Users.FirstOrDefault(m => m.Id == Id) ?? new Users();
|
|
|
+ dic["MakerCode"] = userSJ.MakerCode;
|
|
|
+ dic["RealName"] = userSJ.RealName;
|
|
|
+ dic["UserLevel"] = RelationClass.GetUserLevelSetInfo(int.Parse(dic["UserLevel"].ToString()));
|
|
|
+ }
|
|
|
+ Dictionary<string, object> result = new Dictionary<string, object>();
|
|
|
+ result.Add("Status", "1");
|
|
|
+ result.Add("Info", "Excel报表-" + DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss") + ".xlsx");
|
|
|
+ result.Add("Obj", diclist);
|
|
|
+ Dictionary<string, object> ReturnFields = new Dictionary<string, object>();
|
|
|
+
|
|
|
+ ReturnFields.Add("Id", "Id");
|
|
|
+ ReturnFields.Add("MakerCode", "创客编号");
|
|
|
+ ReturnFields.Add("RealName", "创客姓名");
|
|
|
+ ReturnFields.Add("UserLevel", "创客等级");
|
|
|
+
|
|
|
+ result.Add("Fields", ReturnFields);
|
|
|
+ AddSysLog("0", "Users", "ExportExcel");
|
|
|
+ return Json(result);
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
#region 同步数据
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -1274,6 +1436,8 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
string end = "";
|
|
|
|
|
|
string condition = " and Status>-1";
|
|
|
+ string con = " and Status>-1";
|
|
|
+ string cons = " and Status>=-1";
|
|
|
string sort = "Id desc";
|
|
|
//创客编号
|
|
|
if (!string.IsNullOrEmpty(MakerCode))
|
|
|
@@ -1289,6 +1453,11 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
string[] datelist = CreateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
|
|
|
start = datelist[0].Replace("-", "");
|
|
|
end = datelist[1].Replace("-", "");
|
|
|
+ con += " and TradeDate>='" + start + "' and TradeDate<='" + end + "'";
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrEmpty(BrandSelect.ToString()))
|
|
|
+ {
|
|
|
+ cons += " and BrandId='" + BrandId + "'";
|
|
|
}
|
|
|
|
|
|
Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("Users", Fields, sort, "True", page, limit, condition);
|
|
|
@@ -1338,67 +1507,77 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
Dictionary<string, object> other = new Dictionary<string, object>();
|
|
|
- DataTable dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt + HelpNonDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '"+ParentId+"' and TradeDate >= '"+start+"' and TradeDate <= '"+end+"'");
|
|
|
+ DataTable dt = OtherMySqlConn.dtable("select Sum(HelpDirectTradeAmt + HelpDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '" + ParentId + "'" + con);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
TotalAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '"+ParentId+"' and TradeDate >= '"+start+"' and TradeDate <= '"+end+"'");
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(HelpDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '" + ParentId + "'" + con);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
DAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectDebitTradeAmt),Sum(HelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '"+ParentId+"' and TradeDate >= '"+start+"' and TradeDate <= '"+end+"'");
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(HelpDirectDebitTradeAmt),Sum(HelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '" + ParentId + "'" + con);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
JAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString())) - Convert.ToDecimal(function.CheckNum(dt.Rows[0][1].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(HelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '"+ParentId+"' and TradeDate >= '"+start+"' and TradeDate <= '"+end+"'");
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(HelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '" + ParentId + "'" + con);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
JfAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(HelpDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '"+ParentId+"' and TradeDate >= '"+start+"' and TradeDate <= '"+end+"'");
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(HelpDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '" + ParentId + "'" + con);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
JCountfc = Convert.ToInt32(function.CheckInt(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='self' and UserId= '"+ParentId+"' and TradeDate >= '"+start+"' and TradeDate <= '"+end+"'");
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(HelpDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='self' and UserId= '" + ParentId + "'" + con);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
YAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt + NotHelpNonDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '"+ParentId+"' and TradeDate >= '"+start+"' and TradeDate <= '"+end+"'");
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(NotHelpDirectTradeAmt + NotHelpDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '" + ParentId + "'" + con);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
TotalAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '"+ParentId+"' and TradeDate >= '"+start+"' and TradeDate <= '"+end+"'");
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(NotHelpDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '" + ParentId + "'" + con);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
DAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectDebitTradeAmt),Sum(NotHelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '"+ParentId+"' and TradeDate >= '"+start+"' and TradeDate <= '"+end+"'");
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(NotHelpDirectDebitTradeAmt),Sum(NotHelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '" + ParentId + "'" + con);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
JAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString())) - Convert.ToDecimal(function.CheckNum(dt.Rows[0][1].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(NotHelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '"+ParentId+"' and TradeDate >= '"+start+"' and TradeDate <= '"+end+"'");
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(NotHelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '" + ParentId + "'" + con);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
JfAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(NotHelpDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '"+ParentId+"' and TradeDate >= '"+start+"' and TradeDate <= '"+end+"'");
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(NotHelpDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='self' and UserId= '" + ParentId + "'" + con);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
JCountwd = Convert.ToInt32(function.CheckInt(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='self' and UserId= '"+ParentId+"' and TradeDate >= '"+start+"' and TradeDate <= '"+end+"'");
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(NotHelpDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='self' and UserId= '" + ParentId + "'" + con);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
YAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND ActivationState=0 AND UserId= '" + ParentId + "'" + cons);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ BCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND ActivationState=1 AND UserId= '" + ParentId + "'" + cons);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ ACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
|
|
|
other.Add("TotalAmtfc", TotalAmtfc);
|
|
|
other.Add("DAmtfc", DAmtfc);
|
|
|
@@ -1425,6 +1604,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
public Dictionary<string, object> GetMonthTradeForBrand(int UserId, string sTradeDate, string eTradeDate, int BrandId)
|
|
|
{
|
|
|
string condition = " and Status>-1";
|
|
|
+ string cons = " and Status>=-1";
|
|
|
|
|
|
//产品类型
|
|
|
if (!string.IsNullOrEmpty(BrandId.ToString()) && BrandId > 0)
|
|
|
@@ -1446,6 +1626,10 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
condition += " and TradeDate <=" + Convert.ToInt32(eTradeDate);
|
|
|
}
|
|
|
+ if (!string.IsNullOrEmpty(BrandId.ToString()))
|
|
|
+ {
|
|
|
+ cons += " and BrandId='" + BrandId + "'";
|
|
|
+ }
|
|
|
|
|
|
//扶持期
|
|
|
decimal TotalAmtfc = 0;
|
|
|
@@ -1468,67 +1652,78 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
Dictionary<string, object> obj = new Dictionary<string, object>();
|
|
|
- DataTable dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt + HelpNonDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'"+ condition);
|
|
|
+ DataTable dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt + HelpNonDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
TotalAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'"+ condition);
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
DAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectDebitTradeAmt),Sum(HelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'"+ condition);
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectDebitTradeAmt),Sum(HelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
JAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString())) - Convert.ToDecimal(function.CheckNum(dt.Rows[0][1].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(HelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'"+ condition);
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(HelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
JfAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(HelpDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='team'"+ condition);
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(HelpDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
JCountfc = Convert.ToInt32(function.CheckInt(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='team'"+ condition);
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='team'" + condition);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
YAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt + NotHelpNonDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'"+ condition);
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt + NotHelpNonDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
TotalAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'"+ condition);
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
DAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectDebitTradeAmt),Sum(NotHelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'"+ condition);
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectDebitTradeAmt),Sum(NotHelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
JAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString())) - Convert.ToDecimal(function.CheckNum(dt.Rows[0][1].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(NotHelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'"+ condition);
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(NotHelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
JfAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(NotHelpDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='team'"+ condition);
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(NotHelpDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
JCountwd = Convert.ToInt32(function.CheckInt(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='team'"+ condition);
|
|
|
+ dt = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='team'" + condition);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
YAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND ActivationState=0 AND UserId= '" + UserId + "'" + cons);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ BCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND ActivationState=1 AND UserId= '" + UserId + "'" + cons);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ ACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
obj.Add("TotalAmtfc", TotalAmtfc);
|
|
|
obj.Add("DAmtfc", DAmtfc);
|