Просмотр исходного кода

Merge branch 'DuGuYang' into develop

lichunlei 3 лет назад
Родитель
Сommit
b11e5d1a6c

+ 27 - 12
Areas/Admin/Controllers/MainServer/SysRechargeRecordController.cs

@@ -51,12 +51,12 @@ namespace MySystem.Areas.Admin.Controllers
         /// 创客奖励记录列表
         /// </summary>
         /// <returns></returns>
-        public JsonResult IndexData(SysRechargeRecord data, string MakerCode, string RealName, string RechargeRecNo, string BatchCode, string BizTimeData, string StatusSelect, string SyncStatusSelect, int page = 1, int limit = 30)
+        public JsonResult IndexData(SysRechargeRecord data, string MakerCode, string RealName, string RechargeRecNo, string BatchCode, string BizTimeData, string BizTypeSelect, string StatusSelect, string SyncStatusSelect, int page = 1, int limit = 30)
         {
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
             // Fields.Add("RechargeRecNo", "1"); //奖励单号
-            Fields.Add("BizType", "0"); //业务类型
+            // Fields.Add("BizType", "0"); //业务类型
             // Fields.Add("BatchCode", "1"); //批次号
             // Fields.Add("BizTime", "3"); //奖励时间
 
@@ -82,10 +82,10 @@ namespace MySystem.Areas.Admin.Controllers
                 condition += " and BatchCode=" + BatchCode;
             }
             //业务类型
-            // if (BizType > 0) 
-            // {
-            //     condition += " and BizType=" + BizType;
-            // }
+            if (!string.IsNullOrEmpty(BizTypeSelect))
+            {
+                condition += " and BizType=" + BizTypeSelect;
+            }
             //状态
             if (!string.IsNullOrEmpty(StatusSelect))
             {
@@ -366,12 +366,12 @@ namespace MySystem.Areas.Admin.Controllers
         /// 导出Excel
         /// </summary>
         /// <returns></returns>
-        public JsonResult ExportExcel(SysRechargeRecord data, string MakerCode, string RealName, string StatusSelect, string SyncStatusSelect, string BizTimeData)
+        public JsonResult ExportExcel(SysRechargeRecord data, string MakerCode, string RealName, string RechargeRecNo, string BatchCode, string BizTimeData, string BizTypeSelect, string StatusSelect, string SyncStatusSelect)
         {
             Dictionary<string, string> Fields = new Dictionary<string, string>();
-            Fields.Add("RechargeRecNo", "1"); //奖励单号
-            Fields.Add("BizType", "0"); //业务类型
-            Fields.Add("BatchCode", "1"); //批次号
+            // Fields.Add("RechargeRecNo", "1"); //奖励单号
+            // Fields.Add("BizType", "0"); //业务类型
+            // Fields.Add("BatchCode", "1"); //批次号
             // Fields.Add("BizTime", "3"); //奖励时间
 
             string condition = " and Status>-1";
@@ -385,6 +385,21 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 condition += " and UserId in (select UserId from UserForRealName where RealName='" + RealName + "')";
             }
+            //奖励单号
+            if (!string.IsNullOrEmpty(RechargeRecNo))
+            {
+                condition += " and RechargeRecNo=" + RechargeRecNo;
+            }
+            //批次号
+            if (!string.IsNullOrEmpty(BatchCode))
+            {
+                condition += " and BatchCode=" + BatchCode;
+            }
+            //业务类型
+            if (!string.IsNullOrEmpty(BizTypeSelect))
+            {
+                condition += " and BizType=" + BizTypeSelect;
+            }
             //状态
             if (!string.IsNullOrEmpty(StatusSelect))
             {
@@ -400,7 +415,7 @@ namespace MySystem.Areas.Admin.Controllers
                 string[] datelist = BizTimeData.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'";
+                condition += " and BizTime>='" + start + " 00:00:00' and BizTime<='" + end + " 23:59:59'";
             }
 
             Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("SysRechargeRecord", Fields, "Id desc", "0", 1, 20000, condition, "RechargeRecNo,ProductType,UserId,BizType,BizTime,Amount,SyncStatus,BatchCode,Status,SeoDescription,CreateMan", false);
@@ -411,7 +426,7 @@ namespace MySystem.Areas.Admin.Controllers
                 Users user = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
                 dic["MakerCode"] = user.MakerCode;
                 dic["RealName"] = user.RealName;
-                dic["BizType"] = RelationClassForConst.GetBizTypeInfo(int.Parse(dic["BizType"].ToString()));
+                dic["BizType"] = RelationClassForConst.GetChangeTypeInfo(int.Parse(dic["BizType"].ToString()));
                 dic["ProductType"] = RelationClass.GetKqProductBrandInfo(int.Parse(dic["ProductType"].ToString()));
                 int Status = int.Parse(dic["Status"].ToString());
                 if (Status == 0) dic["Status"] = "初始";

+ 9 - 9
Areas/Admin/Controllers/MainServer/SysToolsController.cs

@@ -477,7 +477,7 @@ namespace MySystem.Areas.Admin.Controllers
                 else if (pos.BrandId == 9)
                 {
                     CreditTrade = spdb.TradeRecord.Where(m => m.Id > StartId && m.TradeSnNo == pos.PosSn && m.ProductType == "9").Sum(m => m.TradeAmount) / 100;
-                }                
+                }
                 else if (pos.BrandId == 10 || pos.BrandId == 11)
                 {
                     CreditTrade = spdb.TradeRecord.Where(m => m.Id > StartId && m.TradeSnNo == pos.PosSn && m.ProductType == "10").Sum(m => m.TradeAmount);
@@ -697,7 +697,7 @@ namespace MySystem.Areas.Admin.Controllers
                         {
                             prizes.Add(50);
                         }
-                        else if((pos.BrandId == 10 || pos.BrandId == 11) && pos.IsFirst == 1 && ActPrize == 0) //联动首台无押金机返50
+                        else if ((pos.BrandId == 10 || pos.BrandId == 11) && pos.IsFirst == 1 && ActPrize == 0) //联动首台无押金机返50
                         {
                             prizes.Add(50);
                         }
@@ -1022,8 +1022,8 @@ namespace MySystem.Areas.Admin.Controllers
                 string results = "该机具为故障机" + "\n";
                 results += "所在仓库:" + storeInfo.StoreNo + "\n";
                 results += "仓库名称:" + storeInfo.StoreName + "\n";
-                results += "押金返现实际返现对象:" + DepositUsers + "\n";
-                results += "押金:" + Deposits + "\n";
+                results += "服务费返现实际返现对象:" + DepositUsers + "\n";
+                results += "服务费:" + Deposits + "\n";
                 results += "是否返现:" + DepositGets + ",领取时间:" + ActiveTimes + "\n";
                 return results;
             }
@@ -1156,7 +1156,7 @@ namespace MySystem.Areas.Admin.Controllers
             if (openreward.Id > 0)
             {
                 Users user = db.Users.FirstOrDefault(m => m.Id == openreward.UserId) ?? new Users();
-                OpenUser20 = "创客编号:" + user.MakerCode + ",姓名:" + user.RealName;
+                OpenUser20 = "创客编号:" + user.MakerCode + ",姓名:" + user.RealName + "发放时间:" + openreward.CreateDate.Value.ToString("yyyy-MM-dd hh:mm:ss");
                 // OpenUser20 = "创客编号:" + user.MakerCode + ",姓名:" + user.RealName + ",手机号:" + user.Mobile;
             }
             openreward = OpenRewardDetail.FirstOrDefault(m => m.CreditRewardAmount == 10) ?? new OpenRewardDetail();
@@ -1231,11 +1231,11 @@ namespace MySystem.Areas.Admin.Controllers
             result += "是否循环:" + RecycFlag + ",申请循环时间:" + ApplyDate + "\n";
             result += "申请循环后的SN:" + applyorder.SnNos + "\n";
             result += "是否发货:" + SendStatus + ",发货时间:" + SendDate + "\n";
-            result += "押金:" + Deposit + "\n";
+            result += "服务费:" + Deposit + "\n";
             result += "是否返现:" + DepositGet + ",领取时间:" + ActiveTime + "\n";
             result += "返现金额:" + headAmount + " " + " " + footAmount + "\n";
-            result += "押金返现应返现对象:" + DepositToUser + "\n";
-            result += "押金返现实际返现对象:" + DepositUser + "\n";
+            result += "服务费返现应返现对象:" + DepositToUser + "\n";
+            result += "服务费返现实际返现对象:" + DepositUser + "\n";
             if (pos.BrandId == 6)
             {
                 result += "立刷10000奖励:" + DepositGet6 + ",领取时间:" + ActiveTime6 + "\n";
@@ -4274,7 +4274,7 @@ namespace MySystem.Areas.Admin.Controllers
                     opData.Add(oldpos.BuyUserId + ":" + oldpos.BrandId);
                 }
                 oldpos.Status = 1;
-                oldpos.PosSnType= 0;
+                oldpos.PosSnType = 0;
                 oldpos.QueryCount = 0;
                 oldpos.UpdateDate = null;
                 oldpos.ActivityList = null;

+ 1 - 1
Areas/Admin/Views/MainServer/SysRechargeRecord/Index.cshtml

@@ -67,7 +67,7 @@
                     <div class="layui-inline">
                         <label class="layui-form-label">业务类型</label>
                         <div class="layui-input-inline">
-                            <select id="BizType" name="BizType" lay-search="">
+                            <select id="BizTypeSelect" name="BizTypeSelect" lay-search="">
                                 <option value="">全部...</option>
                                 <option value="30">红包奖励</option>
                                 <option value="31">活动奖励</option>