Forráskód Böngészése

合并sp数据查询

DuGuYang 3 éve
szülő
commit
11b6a8dc71

+ 1 - 1
Areas/Admin/Controllers/SpServer/BindRecordController.cs

@@ -61,7 +61,7 @@ namespace MySystem.Areas.Admin.Controllers
             Fields.Add("MerName", "1"); //商户名称
             Fields.Add("MerSnNo", "1"); //终端机身号
             Fields.Add("MerNewSnNo", "1"); //新终端机身号
-            Fields.Add("CreateTime", "3"); //创建时间
+            // Fields.Add("CreateTime", "3"); //创建时间
             Fields.Add("ChannelSerial", "1"); //渠道流水号
 
 

+ 1 - 1
Areas/Admin/Controllers/SpServer/ChangeBindRecordController.cs

@@ -61,7 +61,7 @@ namespace MySystem.Areas.Admin.Controllers
             Fields.Add("MerName", "1"); //商户名称
             Fields.Add("MerSnNo", "1"); //终端机身号
             Fields.Add("MerNewSnNo", "1"); //新终端机身号
-            Fields.Add("ConfirmTime", "3"); //提交时间
+            // Fields.Add("ConfirmTime", "3"); //提交时间
             Fields.Add("ChannelSerial", "1"); //渠道流水号
 
 

+ 11 - 0
Areas/Admin/Controllers/SpServer/TradeFluxRecordController.cs

@@ -100,6 +100,17 @@ namespace MySystem.Areas.Admin.Controllers
                 if (BankCardType == "0001") dic["BankCardType"] = "贷记卡";
                 if (BankCardType == "0002") dic["BankCardType"] = "借记卡";
                 if (BankCardType == "") dic["BankCardType"] = "";
+                //流量费
+                decimal FeeAmount = Convert.ToDecimal(dic["FeeAmount"].ToString());
+                var Brand = dic["ProductType"].ToString();
+                if (Brand == "1" || Brand == "4" || Brand == "6" || Brand == "8" || Brand == "9")
+                {
+                    dic["FeeAmount"] = FeeAmount / 100;
+                }
+                if (Brand == "2" || Brand == "7")
+                {
+                    dic["FeeAmount"] = FeeAmount;
+                }
                 //产品类型
                 dic["ProductType"] = RelationClass.GetKqProductBrandList(dic["ProductType"].ToString());
                 // //产品类型

+ 1 - 1
Areas/Admin/Controllers/SpServer/UnBindRecordController.cs

@@ -60,7 +60,7 @@ namespace MySystem.Areas.Admin.Controllers
             Fields.Add("MerNo", "1"); //商户编号
             Fields.Add("MerName", "1"); //商户名称
             Fields.Add("MerSnNo", "1"); //终端机身号
-            Fields.Add("UnBindTime", "3"); //解绑时间
+            // Fields.Add("UnBindTime", "3"); //解绑时间
             Fields.Add("ChannelSerial", "1"); //渠道流水号
 
 

+ 1 - 1
Areas/Admin/Views/SpServer/BindRecord/Index.cshtml

@@ -73,7 +73,7 @@
                         </div>
                     </div>
                     <div class="layui-inline">
-                        <label class="layui-form-label">终端机身号</label>
+                        <label class="layui-form-label">终端机身号</label>
                         <div class="layui-input-inline">
                             <input class="layui-input" type="text" name="MerSnNo" placeholder="" autocomplete="off">
                         </div>

+ 1 - 1
Areas/Admin/Views/SpServer/ChangeBindRecord/Index.cshtml

@@ -73,7 +73,7 @@
                         </div>
                     </div>
                     <div class="layui-inline">
-                        <label class="layui-form-label">终端机身号</label>
+                        <label class="layui-form-label">终端机身号</label>
                         <div class="layui-input-inline">
                             <input class="layui-input" type="text" name="MerSnNo" placeholder="" autocomplete="off">
                         </div>

+ 26 - 0
Startup.cs

@@ -93,8 +93,10 @@ namespace MySystem
             initMainServer();
             initBsServer();
             initCashServer();
+            initSpServer();
 
             RedisDbconn.csredis = new CSRedis.CSRedisClient(Configuration["Setting:RedisConnStr"]);
+            // TendisDbconn.csredis = new CSRedis.CSRedisClient(Configuration["Setting:TendisConnStr"]);
         }
 
         // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@@ -217,5 +219,29 @@ namespace MySystem
             Library.OtherMySqlConn.connstr = "";
             PublicFunction.CashTables = tables;
         }
+
+        private void initSpServer()
+        {
+            Dictionary<string, Dictionary<string, string>> tables = new Dictionary<string, Dictionary<string, string>>();
+            Library.OtherMySqlConn.connstr = Configuration["Setting:SpSqlConnStr"];
+            System.Data.DataTable tablecollection = Library.OtherMySqlConn.dtable("select DISTINCT TABLE_NAME from information_schema.columns where table_schema = 'KxsSpServer'");
+            foreach (System.Data.DataRow subtable in tablecollection.Rows)
+            {
+                Dictionary<string, string> Columns = new Dictionary<string, string>();
+                System.Data.DataTable columncollection = Library.OtherMySqlConn.dtable("select COLUMN_NAME,DATA_TYPE from information_schema.columns where table_schema = 'KxsSpServer' and TABLE_NAME='" + subtable["TABLE_NAME"].ToString() + "'");
+                foreach (System.Data.DataRow column in columncollection.Rows)
+                {
+                    string datatype = column["DATA_TYPE"].ToString();
+                    if (datatype == "decimal")
+                    {
+                        datatype = "numeric";
+                    }
+                    Columns.Add(column["COLUMN_NAME"].ToString(), datatype);
+                }
+                tables.Add(subtable["TABLE_NAME"].ToString(), Columns);
+            }
+            Library.OtherMySqlConn.connstr = "";
+            PublicFunction.SpTables = tables;
+        }
     }
 }

+ 27 - 0
wwwroot/layuiadmin/modules_sp/ActivateRecord_Admin.js

@@ -30,6 +30,33 @@ layui.config({
 
     //- 筛选条件-日期
     var laydate = layui.laydate;
+    var layCreateTime = laydate.render({
+        elem: '#ActivateDate',
+        trigger: 'click',
+        type: 'date',
+        range: true,
+        change: function (value, date, endDate) {
+            var op = true;
+            if (date.year == endDate.year && endDate.month - date.month <= 1) {
+                if (endDate.month - date.month == 1 && endDate.date > date.date) {
+                    op = false;
+                    layCreateTime.hint('日期范围请不要超过1个月');
+                    setTimeout(function () {
+                        $(".laydate-btns-confirm").addClass("laydate-disabled");
+                    }, 1);
+                }
+            } else {
+                op = false;
+                layCreateTime.hint('日期范围请不要超过1个月');
+                setTimeout(function () {
+                    $(".laydate-btns-confirm").addClass("laydate-disabled");
+                }, 1);
+            }
+            if (op) {
+                $('#ActivateDate').val(value);
+            }
+        }
+    });
 
 
     //excel导入

+ 4 - 4
wwwroot/layuiadmin/modules_sp/BindRecord_Admin.js

@@ -33,7 +33,7 @@ layui.config({
     var layCreateTime = laydate.render({
         elem: '#CreateTime',
         trigger: 'click',
-        type: 'datetime',
+        type: 'date',
         range: true,
         change: function (value, date, endDate) {
             var op = true;
@@ -93,15 +93,15 @@ layui.config({
             { type: 'checkbox', fixed: 'left' }
             // , { field: 'Id', fixed: 'left', title: 'ID', width: 80, sort: true, unresize: true }
             , { field: 'Status', width: 200, title: '状态', sort: true }
-            , { field: 'CreateTime', width: 200, title: '创建时间', sort: true }
+            , { field: 'CreateTime', width: 200, title: '绑定时间', sort: true }
             , { field: 'SeoTitle', width: 200, title: '名称', sort: true }
             , { field: 'SeoKeyword', width: 200, title: '交易卡号', sort: true }
             , { field: 'ChannelSerial', width: 200, title: '渠道流水号', sort: true }
             , { field: 'AgentName', width: 200, title: '机构名称', sort: true }
             , { field: 'MerNo', width: 200, title: '商户编号', sort: true }
             , { field: 'MerName', width: 200, title: '商户名称', sort: true }
-            , { field: 'MerSnNo', width: 200, title: '终端机身号', sort: true }
-            , { field: 'MerOperateDate', width: 200, title: '操作时间', sort: true }
+            , { field: 'MerSnNo', width: 200, title: '终端机身号', sort: true }
+            // , { field: 'MerOperateDate', width: 200, title: '操作时间', sort: true }
             // , { field: 'MerOperateType', width: 200, title: '操作类型', sort: true }
             // , { field: 'MerStatus', width: 200, title: '商户状态', sort: true }
             , { field: 'ProductType', width: 200, title: '产品类型', sort: true }

+ 30 - 3
wwwroot/layuiadmin/modules_sp/ChangeBindRecord_Admin.js

@@ -33,7 +33,7 @@ layui.config({
     var layConfirmTime = laydate.render({
         elem: '#ConfirmTime',
         trigger: 'click',
-        type: 'datetime',
+        type: 'date',
         range: true,
         change: function (value, date, endDate) {
             var op = true;
@@ -57,6 +57,33 @@ layui.config({
             }
         }
     });
+    var layReBindTime = laydate.render({
+        elem: '#ReBindTime',
+        trigger: 'click',
+        type: 'date',
+        range: true,
+        change: function (value, date, endDate) {
+            var op = true;
+            if (date.year == endDate.year && endDate.month - date.month <= 1) {
+                if (endDate.month - date.month == 1 && endDate.date > date.date) {
+                    op = false;
+                    layReBindTime.hint('日期范围请不要超过1个月');
+                    setTimeout(function () {
+                        $(".laydate-btns-confirm").addClass("laydate-disabled");
+                    }, 1);
+                }
+            } else {
+                op = false;
+                layReBindTime.hint('日期范围请不要超过1个月');
+                setTimeout(function () {
+                    $(".laydate-btns-confirm").addClass("laydate-disabled");
+                }, 1);
+            }
+            if (op) {
+                $('#ReBindTime').val(value);
+            }
+        }
+    });
 
 
     //excel导入
@@ -93,12 +120,12 @@ layui.config({
             { type: 'checkbox', fixed: 'left' }
             // , { field: 'Id', fixed: 'left', title: 'ID', width: 80, sort: true, unresize: true }
             , { field: 'Status', width: 200, title: '状态', sort: true }
-            , { field: 'CreateTime', width: 200, title: '创建时间', sort: true }
+            , { field: 'CreateDate', width: 200, title: '创建时间', sort: true }
             , { field: 'AgentNo', width: 200, title: '机构号', sort: true }
             , { field: 'AgentName', width: 200, title: '机构名称', sort: true }
             , { field: 'MerNo', width: 200, title: '商户编号', sort: true }
             , { field: 'MerName', width: 200, title: '商户名称', sort: true }
-            , { field: 'MerSnNo', width: 200, title: '终端机身号', sort: true }
+            , { field: 'MerSnNo', width: 200, title: '终端机身号', sort: true }
             , { field: 'ProductType', width: 200, title: '产品类型', sort: true }
             , { field: 'MerNewSnNo', width: 200, title: '新终端机身号', sort: true }
             , { field: 'ConfirmTime', width: 200, title: '提交时间', sort: true }

+ 28 - 1
wwwroot/layuiadmin/modules_sp/TradeFluxRecord_Admin.js

@@ -30,6 +30,33 @@ layui.config({
 
     //- 筛选条件-日期
     var laydate = layui.laydate;
+    var layCreateDate = laydate.render({
+        elem: '#CreateDate',
+        trigger: 'click',
+        type: 'date',
+        range: true,
+        change: function (value, date, endDate) {
+            var op = true;
+            if (date.year == endDate.year && endDate.month - date.month <= 1) {
+                if (endDate.month - date.month == 1 && endDate.date > date.date) {
+                    op = false;
+                    layCreateDate.hint('日期范围请不要超过1个月');
+                    setTimeout(function () {
+                        $(".laydate-btns-confirm").addClass("laydate-disabled");
+                    }, 1);
+                }
+            } else {
+                op = false;
+                layCreateDate.hint('日期范围请不要超过1个月');
+                setTimeout(function () {
+                    $(".laydate-btns-confirm").addClass("laydate-disabled");
+                }, 1);
+            }
+            if (op) {
+                $('#CreateDate').val(value);
+            }
+        }
+    });
 
 
     //excel导入
@@ -80,7 +107,7 @@ layui.config({
             // , { field: 'BankCardType', width: 200, title: '银行卡类型', sort: true }
             // , { field: 'DigAmt', width: 200, title: '挖款金额', sort: true }
             // , { field: 'BankCardNo', width: 200, title: '交易卡号', sort: true }
-            , { field: 'FeeAmount', width: 200, title: '手续费', sort: true }
+            , { field: 'FeeAmount', width: 200, title: '流量费', sort: true }
             , { field: 'KqTradeSeq', width: 200, title: '快钱交易流水号', sort: true }
             , { field: 'ProductType', width: 200, title: '产品类型', sort: true }
             , { field: 'AgentNo', width: 200, title: '代理商编号', sort: true }

+ 27 - 0
wwwroot/layuiadmin/modules_sp/TradeRecord_Admin.js

@@ -30,6 +30,33 @@ layui.config({
 
     //- 筛选条件-日期
     var laydate = layui.laydate;
+    var layCreateDate = laydate.render({
+        elem: '#CreateDate',
+        trigger: 'click',
+        type: 'date',
+        range: true,
+        change: function (value, date, endDate) {
+            var op = true;
+            if (date.year == endDate.year && endDate.month - date.month <= 1) {
+                if (endDate.month - date.month == 1 && endDate.date > date.date) {
+                    op = false;
+                    layCreateDate.hint('日期范围请不要超过1个月');
+                    setTimeout(function () {
+                        $(".laydate-btns-confirm").addClass("laydate-disabled");
+                    }, 1);
+                }
+            } else {
+                op = false;
+                layCreateDate.hint('日期范围请不要超过1个月');
+                setTimeout(function () {
+                    $(".laydate-btns-confirm").addClass("laydate-disabled");
+                }, 1);
+            }
+            if (op) {
+                $('#CreateDate').val(value);
+            }
+        }
+    });
 
 
     //excel导入

+ 3 - 3
wwwroot/layuiadmin/modules_sp/UnBindRecord_Admin.js

@@ -33,7 +33,7 @@ layui.config({
     var layUnBindTime = laydate.render({
         elem: '#UnBindTime',
         trigger: 'click',
-        type: 'datetime',
+        type: 'date',
         range: true,
         change: function (value, date, endDate) {
             var op = true;
@@ -93,13 +93,13 @@ layui.config({
             { type: 'checkbox', fixed: 'left' }
             // , { field: 'Id', fixed: 'left', title: 'ID', width: 80, sort: true, unresize: true }
             , { field: 'Status', width: 200, title: '状态', sort: true }
-            , { field: 'CreateTime', width: 200, title: '创建时间', sort: true }
+            , { field: 'CreateDate', width: 200, title: '创建时间', sort: true }
             , { field: 'AgentName', width: 200, title: '机构名称', sort: true }
             , { field: 'MerNo', width: 200, title: '商户编号', sort: true }
             , { field: 'MerName', width: 200, title: '商户名称', sort: true }
             , { field: 'MerSnNo', width: 200, title: '终端机身号', sort: true }
             , { field: 'ProductType', width: 200, title: '产品类型', sort: true }
-            // , { field: 'UnBindTime', width: 200, title: '解绑时间', sort: true }
+            , { field: 'UnBindTime', width: 200, title: '解绑时间', sort: true }
             // , { field: 'ChannelSerial', width: 200, title: '渠道流水号', sort: true }
             , { field: 'AgentNo', width: 200, title: '机构号', sort: true }