hwh
2024-06-28 6778ebf0295313ce2b56bba000cef96e18afedd4
角色、权限
53个文件已修改
932 ■■■■■ 已修改文件
HTML/views/ASNSetting/ArrivalLogTask.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/ASNSetting/ArrivalNotice.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/ASNSetting/ArrivalReturnsNotice.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/ASNSetting/AuditLog.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/ASNSetting/BoxInfo.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/ASNSetting/LabelBox.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/ASNSetting/PalletBind.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/ASNSetting/ProcurePlanNotice.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/Archiving/StockCheck.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/BaseSetting/Customer.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/BaseSetting/Department.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/BaseSetting/LogisticsInfo.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/BaseSetting/Materials.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/BaseSetting/Packag.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/BaseSetting/Unit.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/HouseWithinSetting/StockCheck.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/HouseWithinSetting/TaskSync.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/QualityControl/InspectionRequest.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/QualityControl/QualityChangeLog.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/QualityControl/QualityInformation.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/QualityControl/QualityInspection.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SOSetting/ExportAllot.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SOSetting/ExportLogTask.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SOSetting/ExportNotice.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SOSetting/PalletNoOut.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SOSetting/WaveMage.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SystemSettings/Category.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SystemSettings/Dictionary.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SystemSettings/FunSetting.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SystemSettings/Interface.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SystemSettings/Menumanagement.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SystemSettings/Role.html 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SystemSettings/RoleForm.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SystemSettings/RoleRight.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SystemSettings/UserForm.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SystemSettings/UserManage.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/WareHouseSetting/Area.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/WareHouseSetting/Exception.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/WareHouseSetting/Locate.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/WareHouseSetting/Pallets.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/WareHouseSetting/Roadway.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/WareHouseSetting/Warehouse.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/index.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/SysServer/RBACServer.cs 96 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/SysServer/RoleRightServer.cs 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/SysServer/RolesServer.cs 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/SysServer/UserInforServer.cs 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.IBLL/ISysServer/IRBACServer.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.IBLL/ISysServer/IRoleRightServer.cs 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.IBLL/ISysServer/IRolesServer.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.IBLL/ISysServer/IUserInforServer.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/Controllers/BasisController.cs 332 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/Controllers/WeatherForecastController.cs 78 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/ASNSetting/ArrivalLogTask.html
@@ -619,7 +619,7 @@
                    }
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].MenuName == "入库任务取消") {
                                $(function () {
HTML/views/ASNSetting/ArrivalNotice.html
@@ -626,7 +626,7 @@
                    
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].MenuName == "添加入库单") {
                                $(function() {
HTML/views/ASNSetting/ArrivalReturnsNotice.html
@@ -878,7 +878,7 @@
                    
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].MenuName == "添加入库单") {
                                $(function() {
HTML/views/ASNSetting/AuditLog.html
@@ -404,7 +404,7 @@
                        $(".editClass").hide(); 
                    });
                    sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                        if (res.code == 0) { //成功
                        if (res.code == 200) { //成功
                            for (var k = 0; k < res.data.length; k++) { 
                                if (res.data[k].MenuName == "编辑审核记录") {
                                    $(function() {
HTML/views/ASNSetting/BoxInfo.html
@@ -619,7 +619,7 @@
                    $(".delClass").hide();
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].MenuName == "添加箱支录入") {
                                $(function () {
HTML/views/ASNSetting/LabelBox.html
@@ -525,7 +525,7 @@
                    $(".delLabelClass").hide(); 
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].MenuName == "补打标签") {
                                $(function () {
HTML/views/ASNSetting/PalletBind.html
@@ -849,7 +849,7 @@
                    $(".chexiaoClass").hide();
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].MenuName == "添加托盘绑定") {
                                $(function () {
HTML/views/ASNSetting/ProcurePlanNotice.html
@@ -426,7 +426,7 @@
                    
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].MenuName == "生成入库单") {
                                $(function() {
HTML/views/Archiving/StockCheck.html
@@ -564,7 +564,7 @@
                        $(".editDemoClass").hide();//备注
                    });
                    sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                        if (res.code == 0) { //成功
                        if (res.code == 200) { //成功
                            for (var k = 0; k < res.data.length; k++) {
                                if (res.data[k].MenuName == "添加盘点单") {
                                    $(function() {
HTML/views/BaseSetting/Customer.html
@@ -150,7 +150,7 @@
                            $(".addClass").hide();
                        });
                        sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                            if (res.code == 0) { //成功
                            if (res.code == 200) { //成功
                                for (var k = 0; k < res.data.length; k++) {
                                    if (res.data[k].MenuName == "编辑客户") {
                                        $(".editClass").show();
HTML/views/BaseSetting/Department.html
@@ -133,7 +133,7 @@
                    $(function() {
                        $(".approvalBtnupt").hide();
                    });
                    if (res.code == 0) //成功
                    if (res.code == 200) //成功
                    {
                        for (var k = 0; k < res.data.length; k++)
                        {
HTML/views/BaseSetting/LogisticsInfo.html
@@ -261,7 +261,7 @@
                    $(".addClass").hide();
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].MenuName == "编辑物流") {
                                $(".editClass").show();
HTML/views/BaseSetting/Materials.html
@@ -275,7 +275,7 @@
                    $(function() {
                        $(".approvalBtnupt").hide();
                    });
                    if (res.code == 0) //成功
                    if (res.code == 200) //成功
                    {
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].MenuName == "添加物料")
HTML/views/BaseSetting/Packag.html
@@ -149,7 +149,7 @@
                        $(".delClass").hide();
                    });
                    sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                        if (res.code == 0) { //成功
                        if (res.code == 200) { //成功
                            for (var k = 0; k < res.data.length; k++) {
                                if (res.data[k].MenuName == "编辑包装") {
                                    $(function() {
@@ -282,7 +282,7 @@
                $(".delClass").hide();
            });
            sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                if (res.code == 0) { //成功
                if (res.code == 200) { //成功
                    for (var k = 0; k < res.data.length; k++) {
                        if (res.data[k].MenuName == "添加包装")
                        {
HTML/views/BaseSetting/Unit.html
@@ -125,7 +125,7 @@
                        $(".delClass").hide();
                    });
                    sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
                        if (res.code == 0) { //成功
                        if (res.code == 200) { //成功
                            for (var k = 0; k < res.data.length; k++) {
                                if (res.data[k].MenuName == "编辑单位") {
@@ -358,7 +358,7 @@
                $(".delClass").hide();
            });
            sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
                if (res.code == 0) { //成功
                if (res.code == 200) { //成功
                    for (var k = 0; k < res.data.length; k++) {
                        if (res.data[k].MenuName == "添加单位") {
                            $(function () {
HTML/views/HouseWithinSetting/StockCheck.html
@@ -603,7 +603,7 @@
                        $(".editDemoClass").hide();//备注
                    });
                    sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                        if (res.code == 0) { //成功
                        if (res.code == 200) { //成功
                            for (var k = 0; k < res.data.length; k++) {
                                if (res.data[k].MenuName == "添加盘点单") {
                                    $(function() {
HTML/views/HouseWithinSetting/TaskSync.html
@@ -411,7 +411,7 @@
                        
                    });
                    sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                        if (res.code == 0) { //成功
                        if (res.code == 200) { //成功
                            for (var k = 0; k < res.data.length; k++) {
                                if (res.data[k].MenuName == "处理同步任务") {
                                    $(function() {
HTML/views/QualityControl/InspectionRequest.html
@@ -458,7 +458,7 @@
                    $(".clossClass").hide();
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].MenuName == "请验") {
                                $(function () {
HTML/views/QualityControl/QualityChangeLog.html
@@ -259,7 +259,7 @@
                        $("#approvalBtn").hide();
                    });
                    sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
                        if (res.code == 0) { //成功
                        if (res.code == 200) { //成功
                            for (var k = 0; k < res.data.length; k++) {
                                if (res.data[k].MenuName == "添加质检结果")
                                {
HTML/views/QualityControl/QualityInformation.html
@@ -294,7 +294,7 @@
                        $("#approvalBtn").hide();
                    });
                    sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
                        if (res.code == 0) { //成功
                        if (res.code == 200) { //成功
                            for (var k = 0; k < res.data.length; k++) {
                                if (res.data[k].MenuName == "添加质检结果")
                                {
HTML/views/QualityControl/QualityInspection.html
@@ -215,7 +215,7 @@
                    $(function() {
                        $("#approvalBtn").hide();
                    });
                    if (res.code == 0) //成功
                    if (res.code == 200) //成功
                    {
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].MenuName == "添加质检结果")
HTML/views/SOSetting/ExportAllot.html
@@ -789,7 +789,7 @@
                    $(".chexiaoClass").hide(); //撤销
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].ParentNo == "2400") {
                                if (res.data[k].MenuName == "撤销") {
HTML/views/SOSetting/ExportLogTask.html
@@ -518,7 +518,7 @@
                    $(".outClass").hide(); //完成
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        for (var k = 0; k < res.data.length; k++) {
                            if(res.data[k].ParentNo == "2600")
                            {
HTML/views/SOSetting/ExportNotice.html
@@ -1033,7 +1033,7 @@
                    $(".editDemoClass").hide();//备注
                    $(".checkClass").hide(); //复核
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
                sendData(IP + "/Basis/", {}, 'get', function (res) {
                    if (res.code == 0) { //成功 
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].ParentNo == "2100") {
HTML/views/SOSetting/PalletNoOut.html
@@ -376,7 +376,7 @@
                        $(".outClass").hide(); //出库
                    });
                    sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                        if (res.code == 0) { //成功
                        if (res.code == 200) { //成功
                            for (var k = 0; k < res.data.length; k++) {
                                if(res.data[k].ParentNo == "2800")
                                {
HTML/views/SOSetting/WaveMage.html
@@ -579,7 +579,7 @@
                    $(".delWaveClass").hide(); 
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].MenuName == "添加波次") {
                                $(function () {
HTML/views/SystemSettings/Category.html
@@ -136,7 +136,7 @@
                    $(function() {
                        $(".approvalBtndel").hide();
                    });
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].MenuName == "新增类别") {
                                $(function() {
HTML/views/SystemSettings/Dictionary.html
@@ -217,7 +217,7 @@
                    $(function() {
                        $(".approvalBtndel").hide();
                    });
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].MenuName == "添加字典") {
                                $(function() {
HTML/views/SystemSettings/FunSetting.html
@@ -125,7 +125,7 @@
                                    $(".approvalBtndel").hide();
                                });
                                console.log(res)
                                if (res.code == 0) { //成功
                                if (res.code == 200) { //成功
                                    for (var k = 0; k < res.data.length; k++) {
                                        if (res.data[k].MenuName == "添加设定") {
                                            $(function() {
HTML/views/SystemSettings/Interface.html
@@ -525,7 +525,7 @@
                    $(".delClass").hide(); 
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].MenuName == "添加接口") {
                                $(function() {
HTML/views/SystemSettings/Menumanagement.html
@@ -203,7 +203,7 @@
                                    $(".approvalBtnupt").hide();
                                    $(".approvalBtndel").hide();
                                });
                                if (res.code == 0) { //成功
                                if (res.code == 200) { //成功
                                    var list = res.data.filter(item => item.Layer == 0);
                                    if (list) {
                                        for (var i = 0; i < list.length; i++) {
HTML/views/SystemSettings/Role.html
@@ -96,8 +96,8 @@
                        RoleNo: RoleNo,
                        RoleName: RoleName,
                    };
                    sendData(IP + "/Basis/GetRolesList?RoleNo=" + RoleNo + "&&RoleName=" + RoleName, {}, "get", function (res) {
                        if (res.code == 0)
                    sendData(IP + "/Basis/GetRolesList?RoleNo=" + RoleNo + "&RoleName=" + RoleName, {}, "get", function (res) {
                        if (res.code == 200)
                        {
                            //成功
                            var list = res.data;
@@ -136,7 +136,7 @@
                    $(function() {
                        $(".approvalBtndel").hide();
                    });
                    if (res.code == 0)
                    if (res.code == 200)
                    {
                        //成功
                        for (var k = 0; k < res.data.length; k++)
@@ -232,7 +232,7 @@
                sendData(IP + "/basis/GetRolesList", {}, "get", function (res) {
                    var html = "";
                    if (res.code == 0)
                    if (res.code == 200)
                    {
                        //成功
                        var list = res.data;
@@ -298,7 +298,7 @@
                                            Demo: field.Demo, //备注
                                        };
                                        sendData( IP + "/basis/UpdateRolesInfo", param, "post", function (res) {
                                            if (res.code == 0)
                                            if (res.code == 200)
                                            {
                                                //成功
                                                layer.msg(
@@ -365,7 +365,7 @@
                                        Demo: field.Demo, //备注
                                    };
                                    sendData( IP + "/basis/UpdateRolesInfo", param, "post", function (res) {
                                        if (res.code == 0)
                                        if (res.code == 200)
                                        {
                                            //成功
                                            layer.msg(
@@ -416,7 +416,7 @@
                                doing = false;
                                sendData( IP + "/Basis/DeleteRoleInfo?Roleids=" + data.Id + "", {}, "get", function (res) {
                                    console.log(res);
                                    if (res.code == 0)
                                    if (res.code == 200)
                                    {
                                        //成功
                                        layer.msg(
@@ -487,7 +487,7 @@
                                    {
                                        doing = false;
                                        sendData( IP + "/basis/InsertRoleInfo", param, "post", function (res) {
                                            if (res.code == 0)
                                            if (res.code == 200)
                                            {
                                                //成功
                                                layer.msg(
HTML/views/SystemSettings/RoleForm.html
@@ -65,7 +65,7 @@
                    };
                    console.log(id)
                    sendData(IP + "/basis/GetRolesListById?Roleid="+id, {} , 'get', function(res) {
                        if (res.code == 0) //成功
                        if (res.code == 200) //成功
                        {
                            console.log(res.data)
                            //页面赋值
HTML/views/SystemSettings/RoleRight.html
@@ -462,7 +462,7 @@
                        }
                    }
                    synData(IP +"/basis/InsertRoleRight?MenuNo="+rightListStr+"&&Id="+ids+"",{},"post",function (res) {
                        if (res.code == 0)
                        if (res.code == 200)
                        {
                            //成功
                            layer.msg(res.msg,{
HTML/views/SystemSettings/UserForm.html
@@ -135,7 +135,7 @@
                var istrue = "0";
                //角色
                sendData(IP + "/basis/GetRolesList", {}, 'get', function(res) {
                    if (res.code == 0) //成功
                    if (res.code == 200) //成功
                    {
                        console.log(res.data)
                        //角色拼接HTML
HTML/views/SystemSettings/UserManage.html
@@ -116,7 +116,7 @@
                  //获取角色信息
                sendData(IP + "/basis/GetRolesList", {}, 'get', function(res) {
                    var html = '';
                    if (res.code == 0) //成功
                    if (res.code == 200) //成功
                    {
                        var list = res.data;
                        for (var i = 0; i < list.length; i++) {
@@ -203,7 +203,7 @@
                    $(function() {
                        $(".approvalBtnupt").hide();
                    });
                    if (res.code == 0) //成功
                    if (res.code == 200) //成功
                    {
                        var list = res.data.filter(item => item.Layer == 0);
                        if (list)
HTML/views/WareHouseSetting/Area.html
@@ -162,7 +162,7 @@
                                $("#approvalBtn").hide();
                            });
                            sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                                if (res.code == 0) { //成功
                                if (res.code == 200) { //成功
                                    for (var k = 0; k < res.data.length; k++) {
                                        if (res.data[k].MenuName == "编辑区域") {
                                            $(function() {
HTML/views/WareHouseSetting/Exception.html
@@ -157,7 +157,7 @@
                                $(".editClass").hide();
                            });
                            sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                                if (res.code == 0) { //成功
                                if (res.code == 200) { //成功
                                    for (var k = 0; k < res.data.length; k++) {
                                        if (res.data[k].MenuName == "处理异常") {
                                            $(function() {
HTML/views/WareHouseSetting/Locate.html
@@ -292,7 +292,7 @@
                            $(".editClass").hide();
                        });
                        sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                            if (res.code == 0) { //成功
                            if (res.code == 200) { //成功
                                for (var k = 0; k < res.data.length; k++) {
                                    if (res.data[k].MenuName == "编辑储位") {
                                        $(function() {
HTML/views/WareHouseSetting/Pallets.html
@@ -111,7 +111,7 @@
                            $(".add").hide();
                        });
                        sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                            if (res.code == 0) { //成功
                            if (res.code == 200) { //成功
                                for (var k = 0; k < res.data.length; k++) {
                                    if (res.data[k].MenuName == "添加条码") {
                                        $(function() {
@@ -205,7 +205,7 @@
                    $(".addClass").hide(); 
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        for (var k = 0; k < res.data.length; k++) {
                            if (res.data[k].MenuName == "添加条码") {
                                $(function() {
HTML/views/WareHouseSetting/Roadway.html
@@ -161,7 +161,7 @@
                                $(".onOffClass").hide();
                            });
                            sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                                if (res.code == 0) { //成功
                                if (res.code == 200) { //成功
                                    for (var k = 0; k < res.data.length; k++) {
                                        if (res.data[k].MenuName == "编辑巷道") {
                                            $(function() {
HTML/views/WareHouseSetting/Warehouse.html
@@ -106,7 +106,7 @@
                                $(".editClass").hide();
                            });
                            sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                                if (res.code == 0) { //成功
                                if (res.code == 200) { //成功
                                    for (var k = 0; k < res.data.length; k++) {
                                        if (res.data[k].MenuName == "编辑仓库") {
                                            $(function() {
HTML/views/index.html
@@ -167,7 +167,7 @@
                }
                
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                    if (res.code == 0) { //成功
                    if (res.code == 200) { //成功
                        var list = res.data.filter(item => item.level == "0");
                         
                        if (list) {
Wms/WMS.BLL/SysServer/RBACServer.cs
@@ -12,6 +12,9 @@
using WMS.IDAL;
using WMS.IDAL.ISysInterface;
using Model.ModelVm.SysVm;
using WMS.Entity.Context;
using Utility;
using Talk.Extensions;
namespace WMS.BLL.SysServer
{
@@ -26,17 +29,20 @@
        public IRBACRepository _rbac { get; set; }
        private readonly IMenuRepository _menu;
        private readonly IRoleRightRepository _roleright;
        private static readonly SqlSugarScope Db = DataContext.Db;
        private readonly UserManager _userManager;
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="rbac"></param>
        /// <param name="menu"></param>
        /// <param name="roleright"></param>
        public RBACServer(IRBACRepository rbac, IMenuRepository menu, IRoleRightRepository roleright)
        public RBACServer(IRBACRepository rbac, IMenuRepository menu, IRoleRightRepository roleright, UserManager userManager)
        {
            _rbac = rbac;
            _menu = menu;
            _roleright = roleright;
            _userManager = userManager;
        }
        /// <summary>
@@ -54,10 +60,14 @@
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public List<RoleRightDto> GetRoleRightList(int id)
        public async Task<List<RoleRightDto>> GetRoleRightList(int id)
        {
            List<RoleRightDto> roleRightDtos = _roleright.GetRoleRightListById(id);
            return roleRightDtos;
            return await Db.Queryable<SysRoleRight>()
                           .LeftJoin<SysRoles>((a, b) => a.RoleNo == b.RoleNo)
                           .LeftJoin<SysFunctionMenu>((a, b, c) => a.MenuNo == c.MenuNo)
                           .Where((a, b, c) => a.Id == id && a.IsDel == "0")
                           .Select<RoleRightDto>()
                           .ToListAsync();
        }
        /// <summary>
@@ -65,53 +75,31 @@
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public object GetMenuByroleIdNew(int id)
        public async Task<List<FunctionMenuDto>> GetMenuByroleIdNew(int id)
        {
            try
            List<RoleRightDto> rolerightlist = await Db.Queryable<SysRoleRight>().LeftJoin<SysRoles>((a, b) => a.RoleNo == b.RoleNo)
                                                                           .LeftJoin<SysFunctionMenu>((a, b, c) => a.MenuNo == c.MenuNo)
                                                                           .Where((a, b, c) => a.Id == id && a.IsDel == "0")
                                                                           .Select<RoleRightDto>()
                                                                           .ToListAsync();
            var listMenuNo = rolerightlist.Select(s => s.MenuNo).Distinct().ToList();
            List<FunctionMenuDto> listMenu = await Db.Queryable<SysFunctionMenu>().OrderBy(m => m.MenuNo).Select(m => new FunctionMenuDto()
            {
                List<RoleRightDto> rolerightlist = _roleright.GetRoleRightListById(id);
                //var list = DataContext.WmsSysRight.Where(m => m.UserGroupId == id).ToList();
                var str = new List<string>();
                foreach (var item in rolerightlist)
                {
                    str.Add(item.MenuNo);
                }
                string sql1 = $"select * from SysFunctionMenu where IsDel = '0' and ParentNo = ''";
                List<FunctionMenuDto> parent = _menu.GetMenuList(sql1).OrderBy(m => m.MenuNo).Select(m => new FunctionMenuDto()
                {
                    //Id = m.Id,
                    MenuNo = m.MenuNo,
                    ParentId = m.ParentNo,
                    title = m.MenuName,
                    //expand = str.Contains(m.Id),
                    @checked = str.Contains(m.MenuNo)
                }).ToList();
                string sql2 = $"select * from SysFunctionMenu where IsDel = '0' and ParentNo != ''";
                List<FunctionMenuDto> child = _menu.GetMenuList(sql2).OrderBy(m => m.MenuNo).Select(m => new FunctionMenuDto()
                {
                    //Id = m.Id,
                    MenuNo = m.MenuNo,
                    ParentId = m.ParentNo,
                    title = m.MenuName,
                    Expand = str.Contains(m.MenuNo),
                    @checked = str.Contains(m.MenuNo)
                }).ToList();
                List<FunctionMenuDto> data = new List<FunctionMenuDto>();
                foreach (var item in parent)
                {
                    data.Add(item);
                    FunNew(child, item);
                }
                return data;
            }
            catch (Exception ex)
                //Id = m.Id,
                MenuNo = m.MenuNo,
                ParentId = m.ParentNo,
                title = m.MenuName,
                Expand = listMenuNo.Contains(m.MenuNo),
                @checked = listMenuNo.Contains(m.MenuNo)
            }).ToListAsync();
            var listParent = listMenu.Where(s => s.ParentId == "").ToList();
            var listChild = listMenu.Where(s => s.ParentId != "").ToList();
            foreach (var item in listParent)
            {
                throw new Exception("获取角色对应的菜单信息" + ex.Message);
                FunNew(listChild, item);
            }
            return listParent;
        }
        public void FunNew(List<FunctionMenuDto> all, FunctionMenuDto curItem)
        {
@@ -123,7 +111,6 @@
            {
                FunNew(all, subItem);
            }
        }
@@ -134,11 +121,16 @@
        /// <param name="MenuNo"></param>
        /// <param name="UserId"></param>
        /// <returns></returns>
        public List<FunctionMenuDto> GetRoleRightRBAC(string MenuNo, string UserId)
        public async Task<List<FunctionMenuDto>> GetRoleRightRBAC(string MenuNo, string UserId)
        {
            List<FunctionMenuDto> menudto = _menu.GetMenuDtoList(MenuNo,UserId);
            return menudto;
            var modUser = await Db.Queryable<SysUserInfor>().FirstAsync(s => s.Id == _userManager.UserId);
            return await Db.Queryable<SysFunctionMenu>()
                            .Where(s => s.IsDel == "0")
                            .WhereIF(!string.IsNullOrEmpty(MenuNo), s => s.ParentNo == MenuNo)
                            .WhereIF(modUser.UserName.ToUpper() != "ADMIN", s => SqlFunc.Subqueryable<SysRoleRight>().Where(c => c.RoleNo == modUser.RoleNo && s.MenuNo == c.MenuNo).Any())
                            .OrderBy(s => s.Ord, OrderByType.Asc)
                            .Select<FunctionMenuDto>()
                            .ToListAsync();
        }
    }
}
Wms/WMS.BLL/SysServer/RoleRightServer.cs
@@ -7,7 +7,10 @@
using AutoMapper;
using Model.ModelDto.SysDto;
using Model.ModelVm.SysVm;
using SqlSugar;
using Utility;
using WMS.DAL.SystemService;
using WMS.Entity.Context;
using WMS.Entity.SysEntity;
using WMS.IBLL.ISysServer;
using WMS.IDAL.ISysInterface;
@@ -23,13 +26,16 @@
        /// 依赖注入
        /// </summary>
        public IRoleRightRepository _rolerights { get; set; }
        private static readonly SqlSugarScope Db = DataContext.Db;
        private readonly UserManager _userManager;
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="roles"></param>
        public RoleRightServer(IRoleRightRepository rolerights)
        public RoleRightServer(IRoleRightRepository rolerights, UserManager userManager)
        {
            _rolerights = rolerights;
            _userManager = userManager;
        }
        /// <summary>
@@ -37,28 +43,24 @@
        /// </summary>
        /// <param name="userId">用户Id</param>
        /// <returns></returns>
        public List<RoleRightDto> GetRoleMenuList(int userId)
        public async Task<List<RoleRightDto>> GetRoleMenuList()
        {
            try
            var modUser = await Db.Queryable<SysUserInfor>().FirstAsync(m => m.Id == _userManager.UserId && m.IsDel == "0");
            if (modUser == null)
            {
                var user = _rolerights.GetRoleMenuList(userId);
                return user;
                throw Oops.Bah("未查询到登录人信息");
            }
            catch (Exception e)
            if (string.IsNullOrWhiteSpace(modUser.RoleNo))
            {
                throw new Exception(e.Message);
                throw Oops.Bah("未查询到登录人的所属角色信息");
            }
        }
        /// <summary>
        /// 获取角色权限信息列表
        /// 多表:角色权限、角色、菜单
        /// </summary>
        /// <returns></returns>
        public List<RoleRightDto> GetRoleRightList()
        {
            List<RoleRightDto> roleRightDtos = _rolerights.GetRoleRightList();
            return roleRightDtos;
            return await Db.Queryable<SysRoleRight>()
                            .LeftJoin<SysFunctionMenu>((a, b) => a.MenuNo == b.MenuNo)
                            .LeftJoin<SysRoles>((a, b, c) => a.RoleNo == c.RoleNo)
                            .Where((a, b, c) => a.IsDel == "0" && b.IsDel == "0" && c.IsDel == "0")
                            .Where((a, b, c) => a.RoleNo == modUser.RoleNo)
                            .Select<RoleRightDto>()
                            .ToListAsync();
        }
        /// <summary>
@@ -66,21 +68,9 @@
        /// </summary>
        /// <param name="rolerightids">角色权限id</param>
        /// <returns></returns>
        public List<SysRoleRight> GetRoleRightOneListById(int id)
        public async Task<List<SysRoleRight>> GetRoleRightOneListById(int id)
        {
            List<SysRoleRight> roleRights = _rolerights.GetRoleRightOneListById(id);
            return roleRights;
        }
        /// <summary>
        /// 根据角色号获取角色权限信息列表(单表)
        /// </summary>
        /// <param name="roleno">角色好</param>
        /// <returns></returns>
        public List<SysRoleRight> GetRoleRightOneListByNo(string roleno)
        {
            List<SysRoleRight> roleRights = _rolerights.GetRoleRightOneListByNo(roleno);
            return roleRights;
            return await Db.Queryable<SysRoleRight>().Where(s => s.IsDel == "0" && s.RoleNo == SqlFunc.Subqueryable<SysRoles>().Where(c => c.IsDel == "0" && c.Id == id).Select(c => c.RoleNo)).ToListAsync();
        }
        /// <summary>
@@ -90,79 +80,44 @@
        /// <param name="RoleNo">角色号</param>
        /// <returns></returns>
        /// <exception cref="Exception">捕获异常</exception>
        public async Task<int> InsertRoleRight(string MenuNo, string RoleNo, string userId)
        public async Task InsertRoleRight(string MenuNo, string RoleNo)
        {
            //捕获异常
            try
            List<SysRoleRight> listRole = await Db.Queryable<SysRoleRight>().Where(s => s.RoleNo == RoleNo).ToListAsync();
            if (listRole.Count > 0)
            {
                //将菜单号进行分割 存储数组中
                var arr = MenuNo.Split(',');
                int i = 0;
                //查询该角色是否拥有权限
                List<SysRoleRight> rolelist = GetRoleRightOneListByNo(RoleNo);
                //有
                if (rolelist.Count > 0)
                await Db.Deleteable<SysRoleRight>().Where(s => s.RoleNo == RoleNo).ExecuteCommandAsync();
            }
            var arr = MenuNo.Split(',');
            var listRight = new List<SysRoleRight>();
            //循环将菜单数组分别加入到数据模型中
            for (int j = 0; j < arr.Count(); j++)
            {
                SysRoleRight roleright = new SysRoleRight();
                roleright.RoleNo = RoleNo;//角色号
                roleright.MenuNo = arr[j];//菜单号
                roleright.CreateUser = _userManager.UserId;//创建人
                roleright.CreateTime = DateTime.Now;
                listRight.Add(roleright);
            }
            await Db.Insertable(listRight).ExecuteCommandAsync();
            //删除子级角色权限信息。(角色权限减少,角色下级权限同时减少)
            List<SysRoles> listRoleDel = await Db.Queryable<SysRoles>().Where(s => SqlFunc.Subqueryable<SysUserInfor>().Where(c => c.RoleNo == RoleNo && s.Id == c.Id).Any()).ToListAsync();
            var listRoleNo = listRoleDel.Select(s => s.RoleNo).Distinct().ToList();
            List<SysRoleRight> listRoleRight = await Db.Queryable<SysRoleRight>().Where(s => listRoleNo.Contains(s.RoleNo)).ToListAsync();
            foreach (var item in listRoleDel)
            {
                var listChildRoleRight = listRoleRight.Where(s => s.RoleNo == item.RoleNo).ToList();
                foreach (var right in listChildRoleRight)
                {
                    //删除该角色所有菜单信息
                    i = await DeleteRoleRight(RoleNo);
                }
                //无
                else if (rolelist.Count == 0)
                {
                    i = 1;
                }
                //开始新增权限
                if (i > 0)
                {
                    SysRoleRight roleright = new SysRoleRight();
                    //循环将菜单数组分别加入到数据模型中
                    for (int j = 0; j < arr.Count(); j++)
                    int first1 = Array.IndexOf(arr, right.MenuNo);
                    if (first1 <= -1)
                    {
                        roleright.RoleNo = RoleNo;//角色号
                        roleright.MenuNo = arr[j];//菜单号
                        roleright.CreateUser = Convert.ToInt32(userId);//创建人
                        //成功 将菜单号和角色号新增为新的数据
                        i = await _rolerights.InsertRoleRight(roleright);
                        await Db.Deleteable<SysRoleRight>().Where(s => s.RoleNo == item.RoleNo && s.MenuNo == right.MenuNo).ExecuteCommandAsync();
                    }
                    //删除子级角色权限信息。(角色权限减少,角色下级权限同时减少)
                    await _rolerights.DeleteChildRoleRight(RoleNo, MenuNo);
                    //返回
                    return i;
                }
                else
                {
                    return i;
                }
            }
            catch (Exception ex)
            {
                //抛出异常
                throw new Exception("新增角色权限信息异常", ex);
            }
        }
        /// <summary>
        /// 删除角色权限信息
        /// </summary>
        /// <param name="RoleNo">角色号</param>
        /// <returns></returns>
        /// <exception cref="Exception">捕获异常</exception>
        public async Task<int> DeleteRoleRight(string RoleNo)
        {
            //捕获异常
            try
            {
                //删除
                int i = await _rolerights.DeleteRoleRight(RoleNo);
                return i;
            }
            catch (Exception ex)
            {
                //抛出异常
                throw new Exception("删除角色权限信息异常", ex);
            }
        }
    }
}
Wms/WMS.BLL/SysServer/RolesServer.cs
@@ -1,10 +1,13 @@
using AutoMapper;
using Model.ModelDto.SysDto;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Utility;
using WMS.Entity.Context;
using WMS.Entity.SysEntity;
using WMS.IBLL.ISysServer;
using WMS.IDAL.ISysInterface;
@@ -19,17 +22,18 @@
        /// <summary>
        /// 依赖注入
        /// </summary>
        public IRolesRepository _roles { get; set; }
        private readonly IMapper _mapper;
        private static readonly SqlSugarScope Db = DataContext.Db;
        private readonly UserManager _userManager;
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="roles">角色</param>
        /// <param name="mapper">automapper</param>
        public RolesServer(IRolesRepository roles,IMapper mapper)
        public RolesServer(IMapper mapper, UserManager userManager)
        {
            _roles = roles; //角色
            _mapper = mapper; //automapper
            _userManager = userManager;
        }
        /// <summary>
@@ -38,12 +42,22 @@
        /// <param name="RoleNo">角色号</param>
        /// <param name="RoleName">角色名称</param>
        /// <returns></returns>
        public List<RoleDto> GetRoleList(string RoleNo, string RoleName,string UserId)
        public async Task<List<RoleDto>> GetRoleList(string RoleNo, string RoleName)
        {
            //获取角色信息
            List<RoleDto> rolelist = _roles.GetRoleList(RoleNo, RoleName, UserId);
            //返回数据
            return rolelist;
            var modUser = await Db.Queryable<SysUserInfor>().FirstAsync(s => s.Id == _userManager.UserId);
            return await Db.Queryable<SysRoles>()
                            .LeftJoin<SysUserInfor>((a, b) => a.CreateUser == b.Id)
                            .LeftJoin<SysUserInfor>((a, b, c) => a.UpdateUser == c.Id)
                            .WhereIF(modUser.UserName.ToUpper() != "ADMIN", a => a.CreateUser == _userManager.UserId)
                            .WhereIF(!string.IsNullOrEmpty(RoleNo), a => a.RoleNo.Contains(RoleNo))
                            .WhereIF(!string.IsNullOrEmpty(RoleName), a => a.RoleName.Contains(RoleName))
                            .Where(a => a.IsDel == "0")
                            .Select<RoleDto>((a, b, c) => new RoleDto()
                            {
                                CreateUserName = b.RealName,
                                UpdateUserName = c.RealName
                            }, true)
                            .ToListAsync();
        }
        /// <summary>
@@ -51,10 +65,9 @@
        /// </summary>
        /// <param name="RoleNo">角色编号</param>
        /// <returns></returns>
        public int GetRoleByNo(string RoleNo)
        public async Task<int> GetRoleByNo(string RoleNo)
        {
            List<SysRoles> role = _roles.GetRoleByNo(RoleNo);
            return role.Count;
            return await Db.Queryable<SysRoles>().CountAsync(s => s.RoleNo == RoleNo && s.IsDel == "0");
        }
        /// <summary>
@@ -65,31 +78,21 @@
        /// <exception cref="Exception">捕获异常</exception>
        public async Task<int> InsertRoleInfo(RoleDto roledto)
        {
            //捕获异常
            try
            //模型映射
            SysRoles roles = _mapper.Map<SysRoles>(roledto);
            //判断角色号是否唯一
            int count = await GetRoleByNo(roledto.RoleNo);
            if (count > 0)
            {
                //模型映射
                SysRoles roles = _mapper.Map<SysRoles>(roledto);
                //判断角色号是否唯一
                int count = GetRoleByNo(roledto.RoleNo);
                int i = 0;
                if (count > 0)
                {
                    i = 3;
                }
                else if (count == 0)
                {
                    //新增角色信息
                    i = await _roles.InsertRoleInfo(roles);
                }
                return i;
                throw Oops.Bah("角色号必须唯一");
            }
            catch (Exception ex)
            {
                //抛出异常
                throw new Exception("角色信息新增异常", ex);
            }
            //新增角色信息
            roles.CreateTime = DateTime.Now;
            roles.CreateUser = _userManager.UserId;
            var i = await Db.Insertable(roles).ExecuteCommandAsync();
            if (i <= 0)
                throw Oops.Bah("新增角色数据信息失败");
            return i;
        }
@@ -100,8 +103,12 @@
        /// <returns></returns>
        public async Task<int> DeleteRoleInfo(SysRoles roles)
        {
            int i = await _roles.DeleteRoleInfo(roles);
            return i;
            return await Db.Updateable<SysRoles>()
                           .Where(s => s.Id == roles.Id)
                           .SetColumns(s => s.IsDel == "1")
                           .SetColumns(s => s.UpdateTime == DateTime.Now)
                           .SetColumns(s => s.UpdateUser == _userManager.UserId)
                           .ExecuteCommandAsync();
        }
@@ -112,10 +119,17 @@
        /// <returns></returns>
        public async Task<int> UpdateRoleInfo(SysRoles role)
        {
            //修改
            int i = await _roles.UpdateRoleInfo(role);
            int count = await Db.Queryable<SysRoles>().CountAsync(s => s.RoleNo == role.RoleNo && s.Id != role.Id && s.IsDel == "0");
            if (count > 0)
                throw Oops.Bah("角色号必须唯一");
            role.UpdateTime = DateTime.Now;
            role.UpdateUser = _userManager.UserId;
            int i = await Db.Updateable(role)
                .UpdateColumns(s => new { s.RoleNo, s.RoleName, s.Demo, s.UpdateUser, s.UpdateTime })
                .ExecuteCommandAsync();
            if (i <= 0)
                throw Oops.Bah("修改角色数据信息失败");
            return i;
        }
        /// <summary>
@@ -123,10 +137,9 @@
        /// </summary>
        /// <param name="roleids">角色id</param>
        /// <returns></returns>
        public SysRoles GetRoleInfoById(int roleids)
        public async Task<SysRoles> GetRoleInfoById(int roleids)
        {
            SysRoles role= _roles.GetRoleInfoById(roleids);
            return role;
            return await Db.Queryable<SysRoles>().FirstAsync(s => s.Id == roleids && s.IsDel == "0");
        }
    }
Wms/WMS.BLL/SysServer/UserInforServer.cs
@@ -21,14 +21,12 @@
{
    public class UserInforServer : IUserInforServer
    {
        public IUserInforRepository UserSvc { get; set; }
        readonly IMapper _mapper;
        private readonly IFunSettingServer _setting;
        private static readonly SqlSugarScope Db = DataContext.Db;
        private readonly UserManager _userManager;
        public UserInforServer(IUserInforRepository userSvc, IMapper mapper, IFunSettingServer setting, UserManager userManager)
        public UserInforServer(IMapper mapper, IFunSettingServer setting, UserManager userManager)
        {
            UserSvc = userSvc;
            _mapper = mapper;
            _setting = setting;
            _userManager = userManager;
@@ -37,7 +35,7 @@
        public async Task<int> LoginAdmin(string loginName, string loginPwd)
        {
            //loginPwd = Md5Tools.CalcMd5(loginPwd);
            var modUser = await Db.Queryable<SysUserInfor>().FirstAsync(m => m.UserName == loginName && m.PassWord == loginPwd);
            var modUser = await Db.Queryable<SysUserInfor>().FirstAsync(m => m.UserName == loginName && m.PassWord == loginPwd &&m.IsDel=="0");
            if (modUser != null) //账号密码是否正确
            {
                if (modUser.Status == "0") //当前账号是否正常启用
@@ -56,13 +54,6 @@
                return -1;
            }
        }
        public SysUserInfor CeShi()
        {
            var date = UserSvc.ceshi();
            return date;
        }
        /// <summary>
        /// 获取用户角色信息
@@ -79,7 +70,13 @@
                                        .WhereIF(!string.IsNullOrEmpty(RoleNo), a => a.RoleNo == RoleNo)
                                        .WhereIF(!string.IsNullOrEmpty(Status), a => a.Status == Status)
                                        .Where(a => a.IsDel == "0")
                                        .Select<UserInfoDto>()
                                        .Select<UserInfoDto>((a, b, c, d) => new UserInfoDto()
                                        {
                                            RealName = a.RealName,
                                            CreateUserName = b.RealName,
                                            DepartmentName = c.DepartmentName,
                                            RoleName = d.RoleName,
                                        }, true)
                                        .ToListAsync();
        }
@@ -118,11 +115,10 @@
            }
            else if (count == 0)
            {
                //新增用户
                //i = await UserSvc.InsertUserInfo(userinfo);
                userinfo.PassWord = Md5Tools.CalcMd5("boxline");
                userinfo.SetPasswordTime = DateTime.Now;
                userinfo.CreateTime = DateTime.Now;
                userinfo.CreateUser = _userManager.UserId;
                i = await Db.Insertable(userinfo).ExecuteCommandAsync();
                if (i <= 0)
                    throw Oops.Bah("新增用户信息失败");
@@ -167,9 +163,10 @@
            }
            else if (count == 0)
            {
                userdto.UpdateUser = _userManager.UserId;
                userdto.UpdateTime = DateTime.Now;
                i = await Db.Updateable(userlist)
                    .UpdateColumns(s => new { s.UserName, s.UserNo, s.Sex, s.RoleNo, s.RealName, s.Phone, s.Paper, s.Nationality, s.JobNo, s.Email, s.Demo, s.Addres })
                    .UpdateColumns(s => new { s.UserName, s.UserNo, s.Sex, s.RoleNo, s.RealName, s.Phone, s.Paper, s.Nationality, s.JobNo, s.Email, s.Demo, s.Addres, s.UpdateUser, s.UpdateTime })
                    .ExecuteCommandAsync();
                if (i <= 0)
                    throw Oops.Bah("编辑用户信息失败");
@@ -182,9 +179,9 @@
        /// </summary>
        /// <param name="userids">用户id</param>
        /// <returns></returns>
        public async Task<SysUserInfor> GetUserInfoById(int userids)
        public async Task<SysUserInfor> GetUserInfoById(int userid)
        {
            return await Db.Queryable<SysUserInfor>().FirstAsync(s => s.Id == userids && s.IsDel == "0");
            return await Db.Queryable<SysUserInfor>().FirstAsync(s => s.Id == userid && s.IsDel == "0");
        }
        /// <summary>
Wms/WMS.IBLL/ISysServer/IRBACServer.cs
@@ -24,20 +24,20 @@
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<RoleRightDto> GetRoleRightList(int id);
        Task<List<RoleRightDto>> GetRoleRightList(int id);
        /// <summary>
        /// 根据角色Id获取对应的菜单选中
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        object GetMenuByroleIdNew(int id);
        Task<List<FunctionMenuDto>> GetMenuByroleIdNew(int id);
        /// <summary>
        /// 分配权限显示
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<FunctionMenuDto> GetRoleRightRBAC(string MenuNo,string UserId);
        Task<List<FunctionMenuDto>> GetRoleRightRBAC(string MenuNo,string UserId);
    }
}
Wms/WMS.IBLL/ISysServer/IRoleRightServer.cs
@@ -17,27 +17,14 @@
        /// </summary>
        /// <param name="userId">用户Id</param>
        /// <returns></returns>
        List<RoleRightDto> GetRoleMenuList(int userId);
        /// <summary>
        /// 获取角色权限信息列表
        /// 多表:角色权限、角色、菜单
        /// </summary>
        /// <returns></returns>
        List<RoleRightDto> GetRoleRightList();
        Task<List<RoleRightDto>> GetRoleMenuList();
        /// <summary>
        /// 获取角色权限信息列表(单表)
        /// </summary>
        /// <param name="rolerightids">角色权限id</param>
        /// <returns></returns>
        List<SysRoleRight> GetRoleRightOneListById(int id);
        /// <summary>
        /// 根据角色号获取角色权限信息列表(单表)
        /// </summary>
        /// <param name="roleno">角色号</param>
        /// <returns></returns>
        List<SysRoleRight> GetRoleRightOneListByNo(string roleno);
        Task<List<SysRoleRight>> GetRoleRightOneListById(int id);
        /// <summary>
        /// 新增角色权限信息
@@ -45,13 +32,7 @@
        /// <param name="MenuNo">菜单号</param>
        /// <param name="RoleNo">角色号</param>
        /// <returns></returns>
        Task<int> InsertRoleRight(string MenuNo, string RoleNo,string userId);
        Task InsertRoleRight(string MenuNo, string RoleNo);
        /// <summary>
        /// 删除角色权限信息
        /// </summary>
        /// <param name="roleNo">角色号</param>
        /// <returns></returns>
        Task<int> DeleteRoleRight(string roleNo);
    }
}
Wms/WMS.IBLL/ISysServer/IRolesServer.cs
@@ -18,14 +18,14 @@
        /// <param name="RoleNo">角色号</param>
        /// <param name="RoleName">角色名称</param>
        /// <returns></returns>
        List<RoleDto> GetRoleList(string RoleNo, string RoleName,string UserId);
        Task<List<RoleDto>> GetRoleList(string RoleNo, string RoleName);
        /// <summary>
        /// 根据编号获取角色信息列表
        /// </summary>
        /// <param name="RoleNo">角色编号</param>
        /// <returns></returns>
        int GetRoleByNo(string RoleNo);
        Task<int> GetRoleByNo(string RoleNo);
        /// <summary>
        /// 新增角色数据信息
@@ -54,6 +54,6 @@
        /// </summary>
        /// <param name="roleid">角色id</param>
        /// <returns></returns>
        SysRoles GetRoleInfoById(int roleids);
        Task<SysRoles> GetRoleInfoById(int roleids);
    }
}
Wms/WMS.IBLL/ISysServer/IUserInforServer.cs
@@ -10,7 +10,6 @@
    public interface IUserInforServer
    {
        Task<int> LoginAdmin(string loginName, string loginPwd);
        SysUserInfor CeShi();
        /// <summary>
        /// 获取用户角色信息
@@ -56,9 +55,8 @@
        /// <summary>
        /// 根据id获取用户信息列表
        /// </summary>
        /// <param name="userids">用户id</param>
        /// <returns></returns>
        Task<SysUserInfor> GetUserInfoById(int userids);
        Task<SysUserInfor> GetUserInfoById(int userid);
        /// <summary>
        /// 修改用户密码
Wms/Wms/Controllers/BasisController.cs
@@ -121,7 +121,6 @@
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task InsertUserinfo(UserInfoDto UserInfoDto)
        {
            UserInfoDto.CreateUser = _userManager.UserId;
            await _userInforServer.InsertUserInfo(UserInfoDto);
            await _operation.InsertOperation("系统设置", "用户管理", UserInfoDto.UserNo, "添加", "添加用户信息 用户号:" + UserInfoDto.UserNo, _userManager.UserId);
@@ -155,7 +154,6 @@
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task UpdateUserinfo(UserInfoDto userdto)
        {
            userdto.UpdateUser = _userManager.UserId;
            await _userInforServer.UpdateUserinfo(userdto);
            await _operation.InsertOperation("系统设置", "用户管理", userdto.UserNo, "修改", "修改用户信息 用户号:" + userdto.UserNo, _userManager.UserId);
@@ -165,27 +163,6 @@
        #endregion
        #region 修改密码
        /// <summary>
        /// 修改密码 根据id获取用户原密码
        /// </summary>
        /// <param name="PassWord">用户原密码</param>
        /// <returns></returns>
        //[HttpGet]
        //public async int GetUserUptPassById(string PassWord, int userId)
        //{
        //    //根据用户id获取用户密码
        //    SysUserInfor user = await _userInforServer.GetUserInfoById(userId);
        //    //判断原密码是否正确
        //    if (user.PassWord == PassWord)
        //    {
        //        return 1;
        //    }
        //    else
        //    {
        //        return 0;
        //    }
        //}
        ///// <param name="userId">用户id</param>
        /// <summary>
@@ -244,29 +221,10 @@
        /// <param name="RoleName">角色名称</param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetRolesList(string RoleNo, string RoleName)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<List<RoleDto>> GetRolesList(string RoleNo, string RoleName)
        {
            //获取当前操作用户id
            var claimsIdentity = this.User.Identity as ClaimsIdentity;
            if (claimsIdentity == null)
            {
                throw new Exception("未获取到用户信息");
            }
            string UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
            if (string.IsNullOrWhiteSpace(UserId))
            {
                throw new Exception("未获取到用户信息");
            }
            //查询
            List<RoleDto> roles = _rolesServer.GetRoleList(RoleNo, RoleName, UserId);
            //返回数据
            return Ok(new
            {
                data = roles,
                code = 0,
                msg = "获取成功"
            });
            return await _rolesServer.GetRoleList(RoleNo, RoleName);
        }
        /// <summary>
@@ -275,15 +233,10 @@
        /// <param name="roleid">角色id</param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetRolesListById(int roleid)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<SysRoles> GetRolesListById(int roleid)
        {
            SysRoles role = _rolesServer.GetRoleInfoById(roleid);
            return Ok(new
            {
                data = role,
                code = 0,
                msg = "获取成功"
            });
            return await _rolesServer.GetRoleInfoById(roleid);
        }
        /// <summary>
@@ -293,52 +246,13 @@
        /// <returns></returns>
        /// <exception cref="System.Exception">捕获异常</exception>
        [HttpPost]
        public async Task<IActionResult> InsertRoleInfo(RoleDto roledto)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        [UnitOfWork]
        public async Task InsertRoleInfo(RoleDto roledto)
        {
            //捕获异常
            try
            {
                //获取当前操作用户id
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                int uid = Convert.ToInt32(userId);
                //创建人
                roledto.CreateUser = uid;
                int i = await _rolesServer.InsertRoleInfo(roledto);
                if (i == 0)
                {
                    return Ok(new
                    {
                        data = i,
                        code = 1,
                        msg = "新增失败"
                    });
                }
                else if (i == 3)
                {
                    return Ok(new
                    {
                        data = i,
                        code = 3,
                        msg = "角色号必须唯一"
                    });
                }
                else
                {
                    await _operation.InsertOperation("系统设置", "角色权限", roledto.RoleNo, "添加", "添加角色信息 角色号:" + roledto.RoleNo, uid);
                    return Ok(new
                    {
                        data = i,
                        code = 0,
                        msg = "新增成功"
                    });
                }
            }
            catch (System.Exception ex)
            {
                //抛出异常
                throw new System.Exception("角色新增异常", ex);
            }
            await _rolesServer.InsertRoleInfo(roledto);
            await _operation.InsertOperation("系统设置", "角色权限", roledto.RoleNo, "添加", "添加角色信息 角色号:" + roledto.RoleNo, _userManager.UserId);
        }
        /// <summary>
@@ -348,45 +262,14 @@
        /// <returns></returns>
        /// <exception cref="System.Exception"></exception>
        [HttpGet]
        public async Task<IActionResult> DeleteRoleInfo(int roleids)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        [UnitOfWork]
        public async Task DeleteRoleInfo(int roleids)
        {
            //捕获异常
            try
            {
                //根据角色id获取角色信息
                SysRoles role = _rolesServer.GetRoleInfoById(roleids);
                //获取当前操作用户id
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                int uid = Convert.ToInt32(userId);
                role.UpdateUser = uid;
                int i = await _rolesServer.DeleteRoleInfo(role);
                //判断是否删除成功
                if (i == 0)
                {
                    return Ok(new
                    {
                        data = i,
                        code = 1,
                        msg = "删除失败"
                    });
                }
                else
                {
                    await _operation.InsertOperation("系统设置", "角色权限", role.RoleNo, "删除", "删除角色信息 角色号:" + role.RoleNo, uid);
                    return Ok(new
                    {
                        data = i,
                        code = 0,
                        msg = "删除成功"
                    });
                }
            }
            catch (System.Exception ex)
            {
                //抛出异常
                throw new System.Exception("角色删除异常", ex);
            }
            //根据角色id获取角色信息
            SysRoles role = await _rolesServer.GetRoleInfoById(roleids);
            await _rolesServer.DeleteRoleInfo(role);
            await _operation.InsertOperation("系统设置", "角色权限", role.RoleNo, "删除", "删除角色信息 角色号:" + role.RoleNo, _userManager.UserId);
        }
        /// <summary>
@@ -396,45 +279,12 @@
        /// <returns></returns>
        /// <exception cref="System.Exception">捕获异常</exception>
        [HttpPost]
        public async Task<IActionResult> UpdateRolesInfo(SysRoles role)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        [UnitOfWork]
        public async Task UpdateRolesInfo(SysRoles role)
        {
            //捕获异常
            try
            {
                //获取当前操作用户id
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                int uid = Convert.ToInt32(userId);
                //更改人
                role.UpdateUser = uid;
                int i = await _rolesServer.UpdateRoleInfo(role);
                //判断是否编辑成功
                if (i == 0)
                {
                    return Ok(new
                    {
                        data = i,
                        code = 1,
                        msg = "编辑失败"
                    });
                }
                else
                {
                    await _operation.InsertOperation("系统设置", "角色权限", role.RoleNo, "修改", "修改角色信息 角色号:" + role.RoleNo, uid);
                    return Ok(new
                    {
                        data = i,
                        code = 0,
                        msg = "编辑成功"
                    });
                }
            }
            catch (System.Exception ex)
            {
                //抛出异常
                throw new System.Exception("编辑角色异常", ex);
            }
            await _rolesServer.UpdateRoleInfo(role);
            await _operation.InsertOperation("系统设置", "角色权限", role.RoleNo, "修改", "修改角色信息 角色号:" + role.RoleNo, _userManager.UserId);
        }
        #endregion
@@ -446,16 +296,10 @@
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetRBACLists(int id)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<List<FunctionMenuDto>> GetRBACLists(int id)
        {
            //List<RoleRightDto> roleright =
            var obj = _rBACServer.GetMenuByroleIdNew(id);
            return Ok(new
            {
                data = obj,
                code = 0,
                msg = "成功"
            });
            return await _rBACServer.GetMenuByroleIdNew(id);
        }
@@ -464,27 +308,10 @@
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetRoleRightRBAC(int id, string MenuNo)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<List<FunctionMenuDto>> GetRoleRightRBAC(int id, string MenuNo)
        {
            //获取当前操作用户id
            var claimsIdentity = this.User.Identity as ClaimsIdentity;
            if (claimsIdentity == null)
            {
                throw new Exception("未获取到用户信息");
            }
            string UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
            if (string.IsNullOrWhiteSpace(UserId))
            {
                throw new Exception("未获取到用户信息");
            }
            List<FunctionMenuDto> menudto = _rBACServer.GetRoleRightRBAC(MenuNo, UserId);
            return Ok(new
            {
                data = menudto,
                code = 0,
                msg = "成功"
            });
            return await _rBACServer.GetRoleRightRBAC(MenuNo, UserId);
        }
        /// <summary>
@@ -492,15 +319,10 @@
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetRoleRightLists(int id)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<List<RoleRightDto>> GetRoleRightLists(int id)
        {
            List<RoleRightDto> roleRightDtos = _rBACServer.GetRoleRightList(id);
            return Ok(new
            {
                data = roleRightDtos,
                code = 0,
                msg = "成功"
            });
            return await _rBACServer.GetRoleRightList(id);
        }
        /// <summary>
@@ -509,33 +331,10 @@
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetRoleRightList()
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<List<RoleRightDto>> GetRoleRightList()
        {
            try
            {
                //获取当前登录的用户ID
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                if (claimsIdentity == null)
                {
                    return Ok(new { code = 1, msg = "为获取到当前操作人信息" });
                }
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                if (string.IsNullOrWhiteSpace(userId))
                {
                    return Ok(new { code = 1, msg = "为获取到当前操作人信息" });
                }
                var roleRightDtos = _roleRightServer.GetRoleMenuList(int.Parse(userId));
                return Ok(new
                {
                    data = roleRightDtos,
                    msg = "成功",
                    code = 0
                });
            }
            catch (Exception e)
            {
                return Ok(new { msg = e.Message, code = 0 });
            }
            return await _roleRightServer.GetRoleMenuList();
        }
        /// <summary>
@@ -544,15 +343,10 @@
        /// <param name="id">角色权限id</param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetRoleRightOneListById(int id)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<List<SysRoleRight>> GetRoleRightOneListById(int id)
        {
            List<SysRoleRight> roleRights = _roleRightServer.GetRoleRightOneListById(id);
            return Ok(new
            {
                data = roleRights,
                msg = "成功",
                core = 0
            });
            return await _roleRightServer.GetRoleRightOneListById(id);
        }
        /// <summary>
@@ -563,46 +357,16 @@
        /// <returns></returns>
        /// <exception cref="Exception">捕获异常</exception>
        [HttpPost]
        public async Task<IActionResult> InsertRoleRight(string MenuNo, int id)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        [UnitOfWork]
        public async Task InsertRoleRight(string MenuNo, int id)
        {
            //捕获异常
            try
            {
                //获取当前操作用户id
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                //根据Id获取角色号
                SysRoles roles = _rolesServer.GetRoleInfoById(id);
                //保存角色权限信息
                int i = await _roleRightServer.InsertRoleRight(MenuNo, roles.RoleNo, userId);
                //判断是否新增成功
                if (i == 0)
                {
                    return Ok(new
                    {
                        data = i,
                        msg = "分配失败",
                        code = 1
                    });
                }
                else
                {
                    await _operation.InsertOperation("系统设置", "角色权限", roles.RoleNo, "修改", "分配角色权限 角色号:" + roles.RoleNo, Convert.ToInt32(userId));
                    return Ok(new
                    {
                        data = i,
                        msg = "分配成功",
                        code = 0
                    });
                }
            }
            catch (Exception ex)
            {
                //抛出异常
                throw new Exception("新增角色权限信息异常", ex);
            }
            //根据Id获取角色号
            SysRoles roles = await _rolesServer.GetRoleInfoById(id);
            //保存角色权限信息
            await _roleRightServer.InsertRoleRight(MenuNo, roles.RoleNo);
            await _operation.InsertOperation("系统设置", "角色权限", roles.RoleNo, "修改", "分配角色权限 角色号:" + roles.RoleNo, _userManager.UserId);
        }
        #endregion
Wms/Wms/Controllers/WeatherForecastController.cs
@@ -19,6 +19,7 @@
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    [ServiceFilter(typeof(ApiResponseActionFilter))]
    public class WeatherForecastController : ControllerBase
    {
        private static readonly string[] Summaries = new[]
@@ -37,21 +38,21 @@
            _userMan = userMan;
        }
        [HttpGet]
        public IEnumerable<WeatherForecast> Get()
        {
            var rng = new Random();
            var data = Enumerable.Range(1, 5).Select(index => new WeatherForecast
            {
                Date = DateTime.Now.AddDays(index),
                TemperatureC = rng.Next(-20, 55),
                Summary = Summaries[rng.Next(Summaries.Length)]
            })
            .ToArray();
            var list = JsonConvert.SerializeObject(data);
            _logger.LogWarning("接收物料转移任务:(" + list + "),");
            return data;
        }
        //[HttpGet]
        //public IEnumerable<WeatherForecast> Get()
        //{
        //    var rng = new Random();
        //    var data = Enumerable.Range(1, 5).Select(index => new WeatherForecast
        //    {
        //        Date = DateTime.Now.AddDays(index),
        //        TemperatureC = rng.Next(-20, 55),
        //        Summary = Summaries[rng.Next(Summaries.Length)]
        //    })
        //    .ToArray();
        //    var list = JsonConvert.SerializeObject(data);
        //    _logger.LogWarning("接收物料转移任务:(" + list + "),");
        //    return data;
        //}
        /// <summary>
        /// 登录
@@ -59,7 +60,6 @@
        /// <param name="model">登录名</param> 
        /// <returns></returns>
        [HttpPost]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<string> Login(LoginVm model)
        {
            if (ModelState.IsValid)
@@ -98,30 +98,30 @@
        /// 登录
        /// </summary>
        /// <returns></returns> 
        [HttpPost]
        public IActionResult ceshi()
        {
            //if (ModelState.IsValid)
            //{
            try
            {
                //获取当前登录的用户ID
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                var bolls = _userMan.CeShi();
        //[HttpPost]
        //public IActionResult ceshi()
        //{
        //    //if (ModelState.IsValid)
        //    //{
        //    try
        //    {
        //        //获取当前登录的用户ID
        //        var claimsIdentity = this.User.Identity as ClaimsIdentity;
        //        var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
        //        var bolls = _userMan.CeShi();
                return Ok(new { code = 200, data = bolls });
        //        return Ok(new { code = 200, data = bolls });
            }
            catch (Exception e)
            {
                return Ok(new { code = 400, ErrorMsg = "请联系管理员/" + e.Message });
            }
            //}
            //else //数据格式错误
            //{
            //    return Ok(new { code = 400, ErrorMsg = "数据格式错误" });
            //}
        }
        //    }
        //    catch (Exception e)
        //    {
        //        return Ok(new { code = 400, ErrorMsg = "请联系管理员/" + e.Message });
        //    }
        //    //}
        //    //else //数据格式错误
        //    //{
        //    //    return Ok(new { code = 400, ErrorMsg = "数据格式错误" });
        //    //}
        //}
    }
}