|
|
@@ -50,7 +50,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// 设置商户型创客记录
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public JsonResult IndexData(SetMerchantTypeRecord data, string PosSn, string MerUserTypeMakerCode, string PosFromMakerCode, string OperateType, string CreateDateData, int page = 1, int limit = 30)
|
|
|
+ public JsonResult IndexData(SetMerchantTypeRecord data, string PosSn, string MerUserTypeMakerCode, string PosFromMakerCode, string OperateTypeSelect, string CreateDateData, int page = 1, int limit = 30)
|
|
|
{
|
|
|
|
|
|
Dictionary<string, string> Fields = new Dictionary<string, string>();
|
|
|
@@ -69,44 +69,41 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
condition += " and UserId in (select UserId from UserForRealName where RealName='" + PosFromMakerCode + "')";
|
|
|
}
|
|
|
//操作类型
|
|
|
- if(!string.IsNullOrEmpty(OperateType))
|
|
|
+ if(!string.IsNullOrEmpty(OperateTypeSelect))
|
|
|
{
|
|
|
- condition += " and OperateType=" + OperateType;
|
|
|
+ condition += " and OperateType=" + OperateTypeSelect;
|
|
|
+ }
|
|
|
+ //操作时间
|
|
|
+ if (!string.IsNullOrEmpty(CreateDateData))
|
|
|
+ {
|
|
|
+ string[] datelist = CreateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
|
|
|
+ string start = datelist[0];
|
|
|
+ string end = datelist[1];
|
|
|
+ condition += " and CreateDate>='" + start + " 00:00:00' and CreateDate<='" + end + " 23:59:59'";
|
|
|
}
|
|
|
|
|
|
Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("SetMerchantTypeRecord", Fields, "Id desc", "0", page, limit, condition);
|
|
|
List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
|
|
|
foreach (Dictionary<string, object> dic in diclist)
|
|
|
{
|
|
|
- dic["BrandName"] = RelationClass.GetKqProductBrandInfo(int.Parse(dic["BrandId"].ToString()));
|
|
|
- dic["SwapExtProductTypes"] = RelationClass.GetKqProductBrandList(dic["SwapExtProductTypes"].ToString());
|
|
|
-
|
|
|
- //创客信息
|
|
|
- int UserId = int.Parse(dic["UserId"].ToString());
|
|
|
- Users puser = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
|
|
|
- dic["MakerCode"] = puser.MakerCode;
|
|
|
- dic["MakerName"] = puser.RealName;
|
|
|
-
|
|
|
- //SN类型
|
|
|
- int SnType = int.Parse(dic["SnType"].ToString());
|
|
|
- if(SnType == 0) dic["SnType"] = "兑换机具";
|
|
|
- if(SnType == 1) dic["SnType"] = "循环机具";
|
|
|
-
|
|
|
- //兑换状态
|
|
|
- int SwapStatus = int.Parse(dic["SwapStatus"].ToString());
|
|
|
- if(SwapStatus == 0) dic["SwapStatus"] = "未兑换";
|
|
|
- if(SwapStatus == 1) dic["SwapStatus"] = "兑换中";
|
|
|
- if(SwapStatus == 2) dic["SwapStatus"] = "已兑换";
|
|
|
+ // dic["BrandName"] = RelationClass.GetKqProductBrandInfo(int.Parse(dic["BrandId"].ToString()));
|
|
|
+
|
|
|
+ //商户型创客信息
|
|
|
+ int ToUserId = int.Parse(dic["ToUserId"].ToString());
|
|
|
+ Users tuser = db.Users.FirstOrDefault(m => m.Id == ToUserId) ?? new Users();
|
|
|
+ dic["MerUserTypeMakerCode"] = tuser.MakerCode;
|
|
|
+ dic["MerUserTypeName"] = tuser.RealName;
|
|
|
+
|
|
|
+ //机具所属创客信息
|
|
|
+ int FromUserId = int.Parse(dic["FromUserId"].ToString());
|
|
|
+ Users fuser = db.Users.FirstOrDefault(m => m.Id == FromUserId) ?? new Users();
|
|
|
+ dic["PosFromMakerCode"] = fuser.MakerCode;
|
|
|
+ dic["PosFromName"] = fuser.RealName;
|
|
|
|
|
|
//业务状态
|
|
|
- int BizStatus = int.Parse(dic["BizStatus"].ToString());
|
|
|
- if(BizStatus == 0) dic["BizStatus"] = "正常";
|
|
|
- if(BizStatus == 1) dic["BizStatus"] = "异常";
|
|
|
-
|
|
|
- //风控状态
|
|
|
- int RiskStatus = int.Parse(dic["RiskStatus"].ToString());
|
|
|
- if(RiskStatus == 0) dic["RiskStatus"] = "未风控";
|
|
|
- if(RiskStatus == 1) dic["RiskStatus"] = "已风控";
|
|
|
+ int OperateType = int.Parse(dic["OperateType"].ToString());
|
|
|
+ if(OperateType == 1) dic["OperateTypeName"] = "正常";
|
|
|
+ if(OperateType == 2) dic["OperateTypeName"] = "异常";
|
|
|
|
|
|
}
|
|
|
return Json(obj);
|