zhaowc
2024-09-06 1b108e8d7335d5a5a59dfcf2f4eeef034a53b9b8
Wms/Wms/Controllers/BasisController.cs
@@ -21,12 +21,15 @@
using System.Data;
using Model.ModelDto.LogDto;
using Utility;
using Model.ModelVm.LogVm;
using System.Diagnostics;
namespace Wms.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    [Authorize]
    [ServiceFilter(typeof(ApiResponseActionFilter))]
    public class BasisController : ControllerBase
    {
        /// <summary>
@@ -60,7 +63,10 @@
        /// <param name="department">部门</param>
        /// <param name="setting">功能设定</param>
        /// <param name="operation">操作日志</param>
        public BasisController(ICustomerServer customerSvc, ILogisticsInfoServer logisticsSvc, IUserInforServer userInforServer, IRolesServer rolesServer, IRoleRightServer roleRightServer, IRBACServer rBACServer, IUnitServer unitSvc, IPackagServer packagServer, IMaterialsServer mate, IDepartmentServer department, IFunSettingServer setting, IInterfaceServer interfaceS, IOperationSysServer operation, UserManager userManager)
        public BasisController(ICustomerServer customerSvc, ILogisticsInfoServer logisticsSvc, IUserInforServer userInforServer,
            IRolesServer rolesServer, IRoleRightServer roleRightServer, IRBACServer rBACServer, IUnitServer unitSvc,
            IPackagServer packagServer, IMaterialsServer mate, IDepartmentServer department, IFunSettingServer setting,
            IInterfaceServer interfaceS, IOperationSysServer operation, UserManager userManager)
        {
            _customerSvc = customerSvc;//客户Svc
            _logisticsSvc = logisticsSvc;//物流Svc
@@ -92,7 +98,6 @@
        /// <param name="Status">状态</param>
        /// <returns></returns>
        [HttpGet]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<List<UserInfoDto>> GetUserRoleList(string UserName, string DepartmentNo, string RoleNo, string Status)
        {
            return await _userInforServer.GetUserRoleList(UserName, DepartmentNo, RoleNo, Status);
@@ -104,7 +109,6 @@
        /// <param name="id">用户id</param>
        /// <returns></returns>
        [HttpGet]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<SysUserInfor> GetUserinfoListById(int id)
        {
            return await _userInforServer.GetUserInfoById(id);
@@ -118,12 +122,18 @@
        /// <returns></returns>
        /// <exception cref="System.Exception">捕获异常</exception>
        [HttpPost]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        [UnitOfWork]
        public async Task InsertUserinfo(UserInfoDto UserInfoDto)
        {
            await _userInforServer.InsertUserInfo(UserInfoDto);
            await _operation.InsertOperation("系统设置", "用户管理", UserInfoDto.UserNo, "添加", "添加用户信息 用户号:" + UserInfoDto.UserNo, _userManager.UserId);
            await _operation.InsertOperation(new OperationInputVm()
            {
                ParentName = "系统设置",
                MenuName = "用户管理",
                FkNo = UserInfoDto.UserNo,
                TypeName = "添加",
                Msg = "添加用户信息 用户号:" + UserInfoDto.UserNo
            });
        }
@@ -134,13 +144,20 @@
        /// <returns></returns>
        /// <exception cref="System.Exception">异常</exception>
        [HttpGet]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        [UnitOfWork]
        public async Task DeleteUserInfo(int userids)
        {
            //获取用户信息
            SysUserInfor user = await _userInforServer.GetUserInfoById(userids);
            await _userInforServer.DeleteUserinfo(user);
            await _operation.InsertOperation("系统设置", "用户管理", user.UserNo, "删除", "删除用户信息 用户号:" + user.UserNo, _userManager.UserId);
            await _operation.InsertOperation(new OperationInputVm()
            {
                ParentName = "系统设置",
                MenuName = "用户管理",
                FkNo = user.UserNo,
                TypeName = "删除",
                Msg = "删除用户信息 用户号:" + user.UserNo
            });
        }
@@ -151,12 +168,18 @@
        /// <returns></returns>
        /// <exception cref="System.Exception">捕获异常</exception>
        [HttpPost]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        [UnitOfWork]
        public async Task UpdateUserinfo(UserInfoDto userdto)
        {
            await _userInforServer.UpdateUserinfo(userdto);
            await _operation.InsertOperation("系统设置", "用户管理", userdto.UserNo, "修改", "修改用户信息 用户号:" + userdto.UserNo, _userManager.UserId);
            await _operation.InsertOperation(new OperationInputVm()
            {
                ParentName = "系统设置",
                MenuName = "用户管理",
                FkNo = userdto.UserNo,
                TypeName = "编辑",
                Msg = "修改用户信息 用户号:" + userdto.UserNo
            });
        }
@@ -174,36 +197,27 @@
        /// <returns></returns>
        /// <exception cref="Exception">捕获异常</exception>
        [HttpGet]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task UptUserPassWord(string pwdOld, string pwdNew, string pwdNewTwo/*, int userId*/)
        {
            pwdOld = Md5Tools.CalcMd5(pwdOld);
            pwdNew = Md5Tools.CalcMd5(pwdNew);
            pwdNewTwo = Md5Tools.CalcMd5(pwdNewTwo);
            //pwdNewTwo = Md5Tools.CalcMd5(pwdNewTwo);
            //获取当前操作用户id
            SysUserInfor user = await _userInforServer.GetUserInfoById(_userManager.UserId);
            if (user == null)
            {
                throw Oops.Bah("找不到用户信息");
            }
            if (user.PassWord != pwdOld)
            {
                throw Oops.Bah("原密码不正确");
            }
            else
            {
                //修改密码
                int i = await _userInforServer.UptUserPassWord(pwdNew, _userManager.UserId);
                if (i <= 0)
                    throw Oops.Bah("修改密码失败");
            }
            //修改密码
            int i = await _userInforServer.UptUserPassWord(pwdNew, pwdNewTwo, _userManager.UserId);
            if (i <= 0)
                throw Oops.Bah("修改密码失败");
        }
        /// <summary>
        /// x天后提醒用户修改密码
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<int> IsPassWordTime()
        {
            return await _userInforServer.IsPassWordTime(_userManager.UserId);
@@ -221,7 +235,6 @@
        /// <param name="RoleName">角色名称</param>
        /// <returns></returns>
        [HttpGet]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<List<RoleDto>> GetRolesList(string RoleNo, string RoleName)
        {
            return await _rolesServer.GetRoleList(RoleNo, RoleName);
@@ -233,7 +246,6 @@
        /// <param name="roleid">角色id</param>
        /// <returns></returns>
        [HttpGet]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<SysRoles> GetRolesListById(int roleid)
        {
            return await _rolesServer.GetRoleInfoById(roleid);
@@ -246,13 +258,18 @@
        /// <returns></returns>
        /// <exception cref="System.Exception">捕获异常</exception>
        [HttpPost]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        [UnitOfWork]
        public async Task InsertRoleInfo(RoleDto roledto)
        {
            await _rolesServer.InsertRoleInfo(roledto);
            await _operation.InsertOperation("系统设置", "角色权限", roledto.RoleNo, "添加", "添加角色信息 角色号:" + roledto.RoleNo, _userManager.UserId);
            await _operation.InsertOperation(new OperationInputVm()
            {
                ParentName = "系统设置",
                MenuName = "角色权限",
                FkNo = roledto.RoleNo,
                TypeName = "添加",
                Msg = "添加角色信息 角色号:" + roledto.RoleNo
            });
        }
        /// <summary>
@@ -262,14 +279,20 @@
        /// <returns></returns>
        /// <exception cref="System.Exception"></exception>
        [HttpGet]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        [UnitOfWork]
        public async Task DeleteRoleInfo(int roleids)
        {
            //根据角色id获取角色信息
            SysRoles role = await _rolesServer.GetRoleInfoById(roleids);
            await _rolesServer.DeleteRoleInfo(role);
            await _operation.InsertOperation("系统设置", "角色权限", role.RoleNo, "删除", "删除角色信息 角色号:" + role.RoleNo, _userManager.UserId);
            await _operation.InsertOperation(new OperationInputVm()
            {
                ParentName = "系统设置",
                MenuName = "角色权限",
                FkNo = role.RoleNo,
                TypeName = "删除",
                Msg = "删除角色信息 角色号:" + role.RoleNo
            });
        }
        /// <summary>
@@ -279,12 +302,18 @@
        /// <returns></returns>
        /// <exception cref="System.Exception">捕获异常</exception>
        [HttpPost]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        [UnitOfWork]
        public async Task UpdateRolesInfo(SysRoles role)
        {
            await _rolesServer.UpdateRoleInfo(role);
            await _operation.InsertOperation("系统设置", "角色权限", role.RoleNo, "修改", "修改角色信息 角色号:" + role.RoleNo, _userManager.UserId);
            await _operation.InsertOperation(new OperationInputVm()
            {
                ParentName = "系统设置",
                MenuName = "角色权限",
                FkNo = role.RoleNo,
                TypeName = "编辑",
                Msg = "修改角色信息 角色号:" + role.RoleNo
            });
        }
        #endregion
@@ -296,7 +325,6 @@
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<List<FunctionMenuDto>> GetRBACLists(int id)
        {
            return await _rBACServer.GetMenuByroleIdNew(id);
@@ -308,10 +336,9 @@
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<List<FunctionMenuDto>> GetRoleRightRBAC(int id, string MenuNo)
        {
            return await _rBACServer.GetRoleRightRBAC(MenuNo, UserId);
            return await _rBACServer.GetRoleRightRBAC(MenuNo, _userManager.UserId.ToString());
        }
        /// <summary>
@@ -319,7 +346,6 @@
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<List<RoleRightDto>> GetRoleRightLists(int id)
        {
            return await _rBACServer.GetRoleRightList(id);
@@ -331,10 +357,15 @@
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<List<RoleRightDto>> GetRoleRightList()
        {
            return await _roleRightServer.GetRoleMenuList();
            Stopwatch stopwatch = new Stopwatch();
            stopwatch.Start();
            var model =  await _roleRightServer.GetRoleMenuList();
            stopwatch.Stop();
            var time = stopwatch.ElapsedMilliseconds;
            return model;
        }
        /// <summary>
@@ -343,7 +374,6 @@
        /// <param name="id">角色权限id</param>
        /// <returns></returns>
        [HttpGet]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<List<SysRoleRight>> GetRoleRightOneListById(int id)
        {
            return await _roleRightServer.GetRoleRightOneListById(id);
@@ -357,7 +387,6 @@
        /// <returns></returns>
        /// <exception cref="Exception">捕获异常</exception>
        [HttpPost]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        [UnitOfWork]
        public async Task InsertRoleRight(string MenuNo, int id)
        {
@@ -365,8 +394,14 @@
            SysRoles roles = await _rolesServer.GetRoleInfoById(id);
            //保存角色权限信息
            await _roleRightServer.InsertRoleRight(MenuNo, roles.RoleNo);
            await _operation.InsertOperation("系统设置", "角色权限", roles.RoleNo, "修改", "分配角色权限 角色号:" + roles.RoleNo, _userManager.UserId);
            await _operation.InsertOperation(new OperationInputVm()
            {
                ParentName = "系统设置",
                MenuName = "角色权限",
                FkNo = roles.RoleNo,
                TypeName = "编辑",
                Msg = "分配角色权限 角色号:" + roles.RoleNo
            });
        }
        #endregion
@@ -380,15 +415,9 @@
        /// <param name="DepartmentNo">部门号</param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetDepartmentList(string DepartmentName, string DepartmentNo)
        public async Task<List<DepartmentDto>> GetDepartmentList(string DepartmentName, string DepartmentNo)
        {
            List<DepartmentDto> departmentlist = _department.GetDepartmentList(DepartmentName, DepartmentNo);
            return Ok(new
            {
                data = departmentlist,
                code = 0,
                msg = "获取部门信息列表成功"
            });
            return await _department.GetDepartmentList(DepartmentName, DepartmentNo);
        }
        /// <summary>
@@ -397,15 +426,9 @@
        /// <param name="id">部门id</param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetDepartmentById(int id)
        public async Task<SysDepartment> GetDepartmentById(int id)
        {
            SysDepartment department = _department.GetDepartmentById(id);
            return Ok(new
            {
                data = department,
                msg = "成功",
                code = 0
            });
            return await _department.GetDepartmentById(id);
        }
        /// <summary>
@@ -415,56 +438,18 @@
        /// <returns></returns>
        /// <exception cref="Exception">捕获异常</exception>
        [HttpPost]
        public async Task<IActionResult> AddDepartment(DepartmentDto departmentdto)
        [UnitOfWork]
        public async Task AddDepartment(DepartmentDto departmentdto)
        {
            //捕获异常
            try
            await _department.AddDepartment(departmentdto);
            await _operation.InsertOperation(new OperationInputVm()
            {
                //获取当前操作用户id
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                int uid = Convert.ToInt32(userId);
                //更改人
                departmentdto.CreateUser = uid;
                int i = await _department.AddDepartment(departmentdto);
                //判断是否新增成功
                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("基础信息", "部门管理", departmentdto.DepartmentNo, "添加", "添加部门信息 部门号:" + departmentdto.DepartmentNo, uid);
                    return Ok(new
                    {
                        data = i,
                        code = 0,
                        msg = "新增成功"
                    });
                }
            }
            catch (Exception ex)
            {
                //抛出异常
                throw new Exception("新增部门异常", ex);
            }
                ParentName = "基础信息",
                MenuName = "部门管理",
                FkNo = departmentdto.DepartmentNo,
                TypeName = "添加",
                Msg = "添加部门信息 部门号:" + departmentdto.DepartmentNo
            });
        }
        /// <summary>
@@ -474,46 +459,19 @@
        /// <returns></returns>
        /// <exception cref="Exception">捕获异常</exception>
        [HttpGet]
        public async Task<IActionResult> DelDepartment(int Id)
        [UnitOfWork]
        public async Task DelDepartment(int Id)
        {
            //捕获异常
            try
            SysDepartment department = await _department.GetDepartmentById(Id);
            await _department.DelDepartment(department);
            await _operation.InsertOperation(new OperationInputVm()
            {
                SysDepartment department = _department.GetDepartmentById(Id);
                //获取当前操作用户id
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                int uid = Convert.ToInt32(userId);
                //更改人
                department.UpdateUser = uid;
                int i = await _department.DelDepartment(department);
                //判断是否删除成功
                if (i == 0)
                {
                    return Ok(new
                    {
                        data = i,
                        code = 1,
                        msg = "删除失败"
                    });
                }
                else
                {
                    await _operation.InsertOperation("基础信息", "部门管理", department.DepartmentNo, "删除", "删除部门信息 部门号:" + department.DepartmentNo, uid);
                    return Ok(new
                    {
                        data = i,
                        code = 0,
                        msg = "删除成功"
                    });
                }
            }
            catch (Exception ex)
            {
                //抛出异常
                throw new Exception("删除部门异常", ex);
            }
                ParentName = "基础信息",
                MenuName = "部门管理",
                FkNo = department.DepartmentNo,
                TypeName = "删除",
                Msg = "删除部门信息 部门号:" + department.DepartmentNo
            });
        }
        /// <summary>
@@ -523,44 +481,18 @@
        /// <returns></returns>
        /// <exception cref="Exception">捕获异常</exception>
        [HttpPost]
        public async Task<IActionResult> ExitDepartment(DepartmentDto departmentdto)
        [UnitOfWork]
        public async Task ExitDepartment(DepartmentDto departmentdto)
        {
            //捕获异常
            try
            await _department.ExitDepartment(departmentdto);
            await _operation.InsertOperation(new OperationInputVm()
            {
                //获取当前操作用户id
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                int uid = Convert.ToInt32(userId);
                //更改人
                departmentdto.UpdateUser = uid;
                int i = await _department.ExitDepartment(departmentdto);
                //判断是否编辑成功
                if (i == 0)
                {
                    return Ok(new
                    {
                        data = i,
                        code = 1,
                        msg = "编辑失败"
                    });
                }
                else
                {
                    await _operation.InsertOperation("基础信息", "部门管理", departmentdto.DepartmentNo, "修改", "编辑部门信息 部门号:" + departmentdto.DepartmentNo, uid);
                    return Ok(new
                    {
                        data = i,
                        code = 0,
                        msg = "编辑成功"
                    });
                }
            }
            catch (Exception ex)
            {
                //抛出异常
                throw new Exception("编辑部门异常", ex);
            }
                ParentName = "基础信息",
                MenuName = "部门管理",
                FkNo = departmentdto.DepartmentNo,
                TypeName = "编辑",
                Msg = "编辑部门信息 部门号:" + departmentdto.DepartmentNo
            });
        }
        #endregion
@@ -575,15 +507,9 @@
        /// <param name="GroupNo">组号</param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetFunSettingList(string FunSetName, string IsEnable, string GroupNo)
        public async Task<List<FunSettingDto>> GetFunSettingList(string FunSetName, string IsEnable, string GroupNo)
        {
            List<FunSettingDto> settinglist = _setting.GetFunSettingList(FunSetName, IsEnable, GroupNo);
            return Ok(new
            {
                data = settinglist,
                code = 0,
                msg = "成功"
            });
            return await _setting.GetFunSettingList(FunSetName, IsEnable, GroupNo);
        }
        /// <summary>
@@ -592,15 +518,9 @@
        /// <param name="id">功能id</param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetFunSettingById(int id)
        public async Task<SysFunSetting> GetFunSettingById(int id)
        {
            SysFunSetting settinglist = _setting.GetFunSettingById(id);
            return Ok(new
            {
                data = settinglist,
                code = 0,
                msg = "成功"
            });
            return await _setting.GetFunSettingById(id);
        }
        /// <summary>
@@ -609,18 +529,9 @@
        /// <param name="funSetNo">功能编号</param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetFunSettingByNo(string funSetNo)
        public async Task<SysFunSetting> GetFunSettingByNo(string funSetNo)
        {
            try
            {
                var models = _setting.GetFunSettingByNo(funSetNo);
                return Ok(new { code = 0, msg = "功能设定信息", data = models });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            return await _setting.GetFunSettingByNo(funSetNo);
        }
        /// <summary>
        /// 新增功能信息
@@ -629,80 +540,18 @@
        /// <returns></returns>
        /// <exception cref="Exception">捕获异常</exception>
        [HttpPost]
        public async Task<IActionResult> AddFunSettings(FunSettingDto settingdto)
        [UnitOfWork]
        public async Task AddFunSettings(FunSettingDto settingdto)
        {
            //捕获异常
            try
            await _setting.AddFunSettings(settingdto);
            await _operation.InsertOperation(new OperationInputVm()
            {
                //获取当前操作用户id
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                int uid = Convert.ToInt32(userId);
                //创建人
                settingdto.CreateUser = uid;
                //新增
                int i = await _setting.AddFunSettings(settingdto);
                //判断是否新增成功
                if (i == 0)
                {
                    return Ok(new
                    {
                        data = i,
                        code = 1,
                        msg = "失败"
                    });
                }
                else if (i == 3)
                {
                    return Ok(new
                    {
                        data = i,
                        code = 3,
                        msg = "功能号必须唯一"
                    });
                }
                else if (i == 4)
                {
                    return Ok(new
                    {
                        data = i,
                        code = 4,
                        msg = "显示顺序范围为1---5"
                    });
                }
                else if (i == 5)
                {
                    return Ok(new
                    {
                        data = i,
                        code = 5,
                        msg = "请输入正确组号"
                    });
                }
                else if (i == 6)
                {
                    return Ok(new
                    {
                        data = i,
                        code = 6,
                        msg = "每一组只能开启一个功能"
                    });
                }
                else
                {
                    await _operation.InsertOperation("系统设置", "功能设定", settingdto.FunSetNo, "添加", "添加功能设定 功能号:" + settingdto.FunSetNo, uid);
                    return Ok(new
                    {
                        data = i,
                        code = 0,
                        msg = "成功"
                    });
                }
            }
            catch (Exception ex)
            {
                return Ok(new { data = "", code = 1, msg = "新增功能异常:" + ex.Message });
            }
                ParentName = "系统设置",
                MenuName = "功能设定",
                FkNo = settingdto.FunSetNo,
                TypeName = "添加",
                Msg = "添加功能设定 功能号:" + settingdto.FunSetNo
            });
        }
        /// <summary>
@@ -712,46 +561,19 @@
        /// <returns></returns>
        /// <exception cref="Exception">捕获异常</exception>
        [HttpGet]
        public async Task<IActionResult> DelFunSettings(int id)
        [UnitOfWork]
        public async Task DelFunSettings(int id)
        {
            //捕获异常
            try
            SysFunSetting funSetting = await _setting.GetFunSettingById(id);
            await _setting.DelFunSettings(funSetting);
            await _operation.InsertOperation(new OperationInputVm()
            {
                SysFunSetting funSetting = _setting.GetFunSettingById(id);
                //获取当前操作用户id
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                int uid = Convert.ToInt32(userId);
                //更改人
                funSetting.UpdateUser = uid;
                //删除
                int i = await _setting.DelFunSettings(funSetting);
                //判断是否删除成功
                if (i == 0)
                {
                    return Ok(new
                    {
                        data = i,
                        code = 1,
                        msg = "失败"
                    });
                }
                else
                {
                    await _operation.InsertOperation("系统设置", "功能设定", funSetting.FunSetNo, "删除", "删除功能设定 功能号:" + funSetting.FunSetNo, uid);
                    return Ok(new
                    {
                        data = i,
                        code = 0,
                        msg = "成功"
                    });
                }
            }
            catch (Exception ex)
            {
                //抛出异常
                throw new Exception("删除功能异常", ex);
            }
                ParentName = "系统设置",
                MenuName = "功能设定",
                FkNo = funSetting.FunSetNo,
                TypeName = "删除",
                Msg = "删除功能设定 功能号:" + funSetting.FunSetNo
            });
        }
        /// <summary>
@@ -761,79 +583,23 @@
        /// <returns></returns>
        /// <exception cref="Exception">捕获异常</exception>
        [HttpPost]
        public async Task<IActionResult> ExitFunSettings(FunSettingDto settingdto)
        [UnitOfWork]
        public async Task ExitFunSettings(FunSettingDto settingdto)
        {
            //捕获异常
            try
            await _setting.ExitFunSettings(settingdto);
            await _operation.InsertOperation(new OperationInputVm()
            {
                //获取当前操作用户id
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                int uid = Convert.ToInt32(userId);
                //更改人
                settingdto.UpdateUser = uid;
                //编辑
                int i = await _setting.ExitFunSettings(settingdto);
                //判断是否编辑成功
                if (i == 0)
                {
                    return Ok(new
                    {
                        data = i,
                        code = 1,
                        msg = "失败"
                    });
                }
                else if (i == 6)
                {
                    return Ok(new
                    {
                        data = i,
                        code = 6,
                        msg = "每一组只能开启一个功能"
                    });
                }
                else
                {
                    await _operation.InsertOperation("系统设置", "功能设定", settingdto.FunSetNo, "修改", "修改功能设定 功能号:" + settingdto.FunSetNo, uid);
                    return Ok(new
                    {
                        data = i,
                        code = 0,
                        msg = "成功"
                    });
                }
            }
            catch (Exception ex)
            {
                return Ok(new { data = "", code = 1, msg = "编辑功能异常:" + ex.Message });
            }
                ParentName = "系统设置",
                MenuName = "功能设定",
                FkNo = settingdto.FunSetNo,
                TypeName = "编辑",
                Msg = "修改功能设定 功能号:" + settingdto.FunSetNo
            });
        }
        #endregion
        #region 物料管理
        ///// <summary>
        ///// 查询物料信息
        ///// </summary>
        ///// <param name="matevm">物料编码视图模型</param>
        ///// <returns></returns>
        //[HttpPost]
        //public IActionResult GetMaterialsList(GetMaterialsVm matevm)
        //{
        //    try
        //    {
        //        var bolls = _mate.GetMaterialsList(matevm.SkuNo, matevm.SkuName, matevm.Type, matevm.IsInspect, matevm.Page, matevm.Limit, out int count);
        //        return Ok(new { code = 0, count, msg = "物料信息", data = bolls });
        //    }
        //    catch (Exception e)
        //    {
        //        return Ok(new { code = 1, msg = e.Message });
        //    }
        //}
        #region yyk
@@ -852,15 +618,9 @@
        /// <param name="categoryNo">类别编码</param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetMateList(string skuNo, string skuName, string auditStatusNo, string type, string isControlled, string isInspect, string environment, string categoryNo)
        public async Task<List<MaterialsDto>> GetMateList(string skuNo, string skuName, string auditStatusNo, string type, string isControlled, string isInspect, string environment, string categoryNo)
        {
            List<MaterialsDto> matedto = _mate.GetMateList(skuNo, skuName, auditStatusNo, type, isControlled, isInspect, environment, categoryNo);
            return Ok(new
            {
                data = matedto,
                code = 0,
                msg = "成功"
            });
            return await _mate.GetMateList(skuNo, skuName, auditStatusNo, type, isControlled, isInspect, environment, categoryNo);
        }
        /// <summary>
@@ -869,15 +629,9 @@
        /// <param name="id">物料id</param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetMateById(int id)
        public async Task<SysMaterials> GetMateById(int id)
        {
            SysMaterials mate = _mate.GetMateById(id);
            return Ok(new
            {
                data = mate,
                code = 0,
                msg = "成功"
            });
            return await _mate.GetMateById(id);
        }
        /// <summary>
@@ -885,31 +639,18 @@
        /// </summary>
        /// <param name="matedto">物料dto</param>
        /// <returns></returns>
        /// <exception cref="Exception">捕获异常</exception>
        [HttpPost]
        public async Task<IActionResult> AddMate(MaterialsDto matedto)
        public async Task AddMate(MaterialsDto matedto)
        {
            //捕获异常
            try
            await _mate.AddMate(matedto);
            await _operation.InsertOperation(new OperationInputVm()
            {
                //获取当前操作用户id
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                int uid = Convert.ToInt32(userId);
                //创建人
                matedto.CreateUser = uid;
                //新增
                int i = await _mate.AddMate(matedto);
                await _operation.InsertOperation("基础信息", "物料管理", matedto.SkuNo, "添加", "添加物料信息 物料号:" + matedto.SkuNo, uid);
                return Ok(new { data = i, code = 0, msg = "成功" });
            }
            catch (Exception ex)
            {
                //抛出异常
                return Ok(new { code = 1, msg = "新增物料异常" + ex.Message });
            }
                ParentName = "基础信息",
                MenuName = "物料管理",
                FkNo = matedto.SkuNo,
                TypeName = "添加",
                Msg = "添加物料信息 物料号:" + matedto.SkuNo
            });
        }
        /// <summary>
@@ -919,45 +660,18 @@
        /// <returns></returns>
        /// <exception cref="Exception">捕获异常</exception>
        [HttpGet]
        public async Task<IActionResult> DelMate(int id)
        public async Task DelMate(int id)
        {
            //捕获异常
            try
            SysMaterials mate = await _mate.GetMateById(id);
            await _mate.DelMate(mate);
            await _operation.InsertOperation(new OperationInputVm()
            {
                SysMaterials mate = _mate.GetMateById(id);
                //获取当前操作用户id
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                int uid = Convert.ToInt32(userId);
                mate.UpdateUser = uid;
                //删除
                int i = await _mate.DelMate(mate);
                //判断是否删除成功
                if (i == 0)
                {
                    return Ok(new
                    {
                        data = i,
                        code = 1,
                        msg = "失败"
                    });
                }
                else
                {
                    await _operation.InsertOperation("基础信息", "物料管理", mate.SkuNo, "删除", "删除物料信息 物料号:" + mate.SkuNo, uid);
                    return Ok(new
                    {
                        data = i,
                        code = 0,
                        msg = "成功"
                    });
                }
            }
            catch (Exception ex)
            {
                //抛出异常
                throw new Exception("删除物料异常", ex);
            }
                ParentName = "基础信息",
                MenuName = "物料管理",
                FkNo = mate.SkuNo,
                TypeName = "删除",
                Msg = "删除物料信息 物料号:" + mate.SkuNo
            });
        }
        /// <summary>
@@ -967,43 +681,17 @@
        /// <returns></returns>
        /// <exception cref="Exception">捕获异常</exception>
        [HttpPost]
        public async Task<IActionResult> ExitMate(MaterialsDto matedto)
        public async Task ExitMate(MaterialsDto matedto)
        {
            //捕获异常
            try
            await _mate.ExitMate(matedto);
            await _operation.InsertOperation(new OperationInputVm()
            {
                //获取当前操作用户id
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                int uid = Convert.ToInt32(userId);
                //更新人
                matedto.UpdateUser = uid;
                //编辑
                int i = await _mate.ExitMate(matedto);
                //判断是否编辑成功
                if (i == 0)
                {
                    return Ok(new { data = i, code = 1, msg = "修改失败" });
                }
                else if (i == 2)
                {
                    return Ok(new { data = i, code = 2, msg = "临期天数不可大于365及小于30" });
                }
                //else if (i == 4)
                //{
                //    return Ok(new { data = i, code = 4, msg = "低库存不可高于1000" });
                //}
                else
                {
                    await _operation.InsertOperation("基础信息", "物料管理", matedto.SkuNo, "修改", "编辑物料信息 物料号:" + matedto.SkuNo, uid);
                    return Ok(new { data = i, code = 0, msg = "修改成功" });
                }
            }
            catch (Exception ex)
            {
                //抛出异
                return Ok(new { code = 1, msg = "编辑物料异常" + ex.Message });
            }
                ParentName = "基础信息",
                MenuName = "物料管理",
                FkNo = matedto.SkuNo,
                TypeName = "编辑",
                Msg = "编辑物料信息 物料号:" + matedto.SkuNo
            });
        }
        #region 包装 单位
@@ -1013,15 +701,9 @@
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetUnitList()
        public async Task<List<SysUnit>> GetUnitList()
        {
            List<SysUnit> unitlist = _mate.GetUnitList();
            return Ok(new
            {
                data = unitlist,
                code = 0,
                msg = "成功"
            });
            return await _mate.GetUnitList();
        }
        /// <summary>
@@ -1029,15 +711,9 @@
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetPackagList()
        public async Task<List<SysPackag>> GetPackagList()
        {
            List<SysPackag> packlist = _mate.GetPackagList();
            return Ok(new
            {
                data = packlist,
                code = 0,
                msg = "成功"
            });
            return await _mate.GetPackagList();
        }
        #endregion
@@ -1225,18 +901,11 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetCustomerList(GetCustomerVm model)
        public async Task<SqlSugarPagedList> GetCustomerList(GetCustomerVm model)
        {
            try
            {
                var bolls = _customerSvc.GetCustomerList(model.CustomerNo, model.CustomerName, model.Type, model.LinkMan, model.Phone, model.Page, model.Limit, out int count);
                return Ok(new { code = 0, count, msg = "客户信息", data = bolls });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            RefAsync<int> count = new RefAsync<int>();
            var bolls = await _customerSvc.GetCustomerList(model.CustomerNo, model.CustomerName, model.Type, model.LinkMan, model.Phone, model.Page, model.Limit, count);
            return new SqlSugarPagedList() { Items = bolls, Total = count };
        }
        /// <summary>
        /// 查询单条客户信息
@@ -1244,36 +913,18 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetCustomer(IdVm model)
        public async Task<SysCustomer> GetCustomer(IdVm model)
        {
            try
            {
                var bolls = _customerSvc.GetCustomer(model.Id);
                return Ok(new { code = 0, count = 0, msg = "客户信息", data = bolls });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            return await _customerSvc.GetCustomer(model.Id);
        }
        /// <summary>
        /// 查询全部客户信息
        /// </summary> 
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetCustomerSelect()
        public async Task<List<SysCustomer>> GetCustomerSelect()
        {
            try
            {
                var bolls = _customerSvc.GetCustomerSelect();
                return Ok(new { code = 0, count = 0, msg = "客户信息", data = bolls });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            return await _customerSvc.GetCustomerSelect();
        }
        /// <summary>
        /// 添加客户信息
@@ -1281,38 +932,11 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult AddCustomer(AddCustomerVm model)
        [UnitOfWork]
        public async Task AddCustomer(AddCustomerVm model)
        {
            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 bolls = _customerSvc.AddCustomer(model.CustomerNo, model.CustomerName, model.Type, model.Address, model.LinkMan, model.Phone, model.BankAccount, model.CreditRating, model.Demo, int.Parse(userId));
                if (bolls)
                {
                    _operation.InsertOperation("基础信息", "客户管理", model.CustomerNo, "添加", "添加客户信息 客户号:" + model.CustomerNo, Convert.ToInt32(userId));
                    return Ok(new { code = 0, msg = "添加成功" });
                }
                else
                {
                    return Ok(new { code = 1, msg = "添加失败" });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            await _customerSvc.AddCustomer(model.CustomerNo, model.CustomerName, model.Type, model.Address, model.LinkMan, model.Phone, model.BankAccount, model.CreditRating, model.Demo, _userManager.UserId);
            await _operation.InsertOperation("基础信息", "客户管理", model.CustomerNo, "添加", "添加客户信息 客户号:" + model.CustomerNo, _userManager.UserId);
        }
        /// <summary>
        /// 编辑客户信息
@@ -1320,38 +944,11 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult EditCustomer(EditCustomerVm model)
        [UnitOfWork]
        public async Task EditCustomer(EditCustomerVm model)
        {
            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 bolls = _customerSvc.EditCustomer(model.Id, model.CustomerNo, model.CustomerName, model.Type, model.Address, model.LinkMan, model.Phone, model.BankAccount, model.CreditRating, model.Demo, int.Parse(userId));
                if (bolls)
                {
                    _operation.InsertOperation("基础信息", "客户管理", model.CustomerNo, "编辑", "编辑客户信息 客户号:" + model.CustomerNo, Convert.ToInt32(userId));
                    return Ok(new { code = 0, msg = "编辑成功" });
                }
                else
                {
                    return Ok(new { code = 1, msg = "编辑失败" });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            await _customerSvc.EditCustomer(model.Id, model.CustomerNo, model.CustomerName, model.Type, model.Address, model.LinkMan, model.Phone, model.BankAccount, model.CreditRating, model.Demo, _userManager.UserId);
            await _operation.InsertOperation("基础信息", "客户管理", model.CustomerNo, "编辑", "编辑客户信息 客户号:" + model.CustomerNo, _userManager.UserId);
        }
        /// <summary>
        /// 删除客户信息
@@ -1359,38 +956,12 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult DelCustomer(IdVm model)
        [UnitOfWork]
        public async Task DelCustomer(IdVm model)
        {
            try
            {
                SysCustomer customer = _customerSvc.GetCustomer(model.Id);
                //获取当前登录的用户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 bolls = _customerSvc.DelCustomer(model.Id, int.Parse(userId));
                if (bolls)
                {
                    _operation.InsertOperation("基础信息", "客户管理", customer.CustomerNo, "删除", "删除客户信息 客户号:" + customer.CustomerNo, Convert.ToInt32(userId));
                    return Ok(new { code = 0, msg = "删除成功" });
                }
                else
                {
                    return Ok(new { code = 1, msg = "删除失败" });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            SysCustomer customer = await _customerSvc.GetCustomer(model.Id);
            var bolls = await _customerSvc.DelCustomer(model.Id, _userManager.UserId);
            await _operation.InsertOperation("基础信息", "客户管理", customer.CustomerNo, "删除", "删除客户信息 客户号:" + customer.CustomerNo, _userManager.UserId);
        }
        /// <summary>
        /// 删除客户信息(多删除)
@@ -1398,36 +969,10 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult DelsCustomer(IdVm model)
        [UnitOfWork]
        public async Task DelsCustomer(IdVm model)
        {
            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 bolls = _customerSvc.DelsCustomer(model.Ids, int.Parse(userId));
                if (bolls)
                {
                    return Ok(new { code = 0, msg = "删除成功" });
                }
                else
                {
                    return Ok(new { code = 1, msg = "删除失败" });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            await _customerSvc.DelsCustomer(model.Ids, _userManager.UserId);
        }
        #endregion
@@ -1438,18 +983,11 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetLogisticsInfoList(GetLogisticsInfoVm model)
        public async Task<SqlSugarPagedList> GetLogisticsInfoList(GetLogisticsInfoVm model)
        {
            try
            {
                var bolls = _logisticsSvc.GetLogisticsInfoList(model.CarrierName, model.LinkMan, model.Phone, model.LicensePlate, model.Type, model.Page, model.Limit, out int count);
                return Ok(new { code = 0, count, msg = "物流信息", data = bolls });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            RefAsync<int> count = new RefAsync<int>();
            var list = await _logisticsSvc.GetLogisticsInfoList(model.CarrierName, model.LinkMan, model.Phone, model.LicensePlate, model.Type, model.Page, model.Limit, count);
            return new SqlSugarPagedList() { Items = list, Total = count };
        }
        /// <summary>
        /// 查询单条物流信息
@@ -1457,36 +995,18 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetLogisticsInfo(IdVm model)
        public async Task<SysLogisticsInfo> GetLogisticsInfo(IdVm model)
        {
            try
            {
                var bolls = _logisticsSvc.GetLogisticsInfo(model.Id);
                return Ok(new { code = 0, data = bolls });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            return await _logisticsSvc.GetLogisticsInfo(model.Id);
        }
        /// <summary>
        /// 查询全部物流信息
        /// </summary> 
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetLogisticsInfoSelect()
        public async Task<List<SysLogisticsInfo>> GetLogisticsInfoSelect()
        {
            try
            {
                var bolls = _logisticsSvc.GetLogisticsInfoSelect();
                return Ok(new { code = 0, data = bolls });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            return await _logisticsSvc.GetLogisticsInfoSelect();
        }
        /// <summary>
@@ -1495,38 +1015,11 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult AddLogisticsInfo(AddLogisticsInfoVm model)
        [UnitOfWork]
        public async Task AddLogisticsInfo(AddLogisticsInfoVm model)
        {
            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 bolls = _logisticsSvc.AddLogisticsInfo(model, int.Parse(userId));
                if (bolls)
                {
                    _operation.InsertOperation("基础信息", "物流管理", model.CarrierName, "添加", "添加物流信息 公司名称:" + model.CarrierName, Convert.ToInt32(userId));
                    return Ok(new { code = 0, msg = "添加成功" });
                }
                else
                {
                    return Ok(new { code = 1, msg = "添加失败" });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            await _logisticsSvc.AddLogisticsInfo(model, _userManager.UserId);
            await _operation.InsertOperation("基础信息", "物流管理", model.CarrierName, "添加", "添加物流信息 公司名称:" + model.CarrierName, _userManager.UserId);
        }
        /// <summary>
        /// 编辑物流信息
@@ -1534,38 +1027,11 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult EditLogisticsInfo(EditLogisticsInfoVm model)
        [UnitOfWork]
        public async Task EditLogisticsInfo(EditLogisticsInfoVm model)
        {
            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 bolls = _logisticsSvc.EditLogisticsInfo(model, int.Parse(userId));
                if (bolls)
                {
                    _operation.InsertOperation("基础信息", "物流管理", model.CarrierName, "编辑", "编辑物流信息 公司名称:" + model.CarrierName, Convert.ToInt32(userId));
                    return Ok(new { code = 0, msg = "编辑成功" });
                }
                else
                {
                    return Ok(new { code = 1, msg = "编辑失败" });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            await _logisticsSvc.EditLogisticsInfo(model, _userManager.UserId);
            await _operation.InsertOperation("基础信息", "物流管理", model.CarrierName, "编辑", "编辑物流信息 公司名称:" + model.CarrierName, _userManager.UserId);
        }
        /// <summary>
        /// 删除物流信息
@@ -1573,39 +1039,12 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult DelLogisticsInfo(IdVm model)
        [UnitOfWork]
        public async Task DelLogisticsInfo(IdVm model)
        {
            try
            {
                SysLogisticsInfo logisit = _logisticsSvc.GetLogisticsInfo(model.Id);
                //获取当前登录的用户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 bolls = _logisticsSvc.DelLogisticsInfo(model.Id, int.Parse(userId));
                if (bolls)
                {
                    _operation.InsertOperation("基础信息", "物流管理", logisit.CarrierName, "删除", "删除物流信息 公司名称:" + logisit.CarrierName, Convert.ToInt32(userId));
                    return Ok(new { code = 0, msg = "删除成功" });
                }
                else
                {
                    return Ok(new { code = 1, msg = "删除失败" });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            await _logisticsSvc.DelLogisticsInfo(model.Id, _userManager.UserId);
            SysLogisticsInfo logisit = await _logisticsSvc.GetLogisticsDelInfo(model.Id);
            await _operation.InsertOperation("基础信息", "物流管理", logisit.CarrierName, "删除", "删除物流信息 公司名称:" + logisit.CarrierName, _userManager.UserId);
        }
        /// <summary>
        /// 删除物流信息(多条信息)
@@ -1613,36 +1052,10 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult DelsLogisticsInfo(IdVm model)
        [UnitOfWork]
        public async Task DelsLogisticsInfo(IdVm model)
        {
            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 bolls = _logisticsSvc.DelsLogisticsInfo(model.Ids, int.Parse(userId));
                if (bolls)
                {
                    return Ok(new { code = 0, msg = "删除成功" });
                }
                else
                {
                    return Ok(new { code = 1, msg = "删除失败" });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            await _logisticsSvc.DelsLogisticsInfo(model.Ids, _userManager.UserId);
        }
        #endregion
@@ -1654,18 +1067,11 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetUnitList(GetUnitVm model)
        public async Task<SqlSugarPagedList> GetUnitList(GetUnitVm model)
        {
            try
            {
                var list = _unitSvc.GetUnitList(model.UnitNo, model.UnitName, model.Page, model.Limit, out int count);
                return Ok(new { code = 0, count, msg = "物流信息", data = list });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            RefAsync<int> count = new RefAsync<int>();
            var list = await _unitSvc.GetUnitList(model.UnitNo, model.UnitName, model.Page, model.Limit, count);
            return new SqlSugarPagedList() { Items = list, Total = count };
        }
        /// <summary>
        /// 查询单条单位信息
@@ -1673,24 +1079,9 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetUnit(IdVm model)
        public async Task<SysUnit> GetUnit(IdVm model)
        {
            try
            {
                var data = _unitSvc.GetUnit(model.Id);
                if (data != null)
                {
                    return Ok(new { code = 0, data });
                }
                else
                {
                    return Ok(new { code = 1, data = "未查询到物流信息" });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            return await _unitSvc.GetUnit(model.Id);
        }
        /// <summary>
        /// 添加计量信息
@@ -1698,43 +1089,16 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult AddUnit(AddEditUnitVm model)
        [UnitOfWork]
        public async Task AddUnit(AddEditUnitVm model)
        {
            if (ModelState.IsValid)
            {
                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 bolls = _unitSvc.AddUnit(model.UnitName, model.Abbrev, int.Parse(userId));
                    if (bolls)
                    {
                        return Ok(new { code = 0, msg = "添加成功" });
                    }
                    else
                    {
                        return Ok(new { code = 1, msg = "添加失败" });
                    }
                }
                catch (Exception e)
                {
                    return Ok(new { code = 1, msg = e.Message });
                }
                await _unitSvc.AddUnit(model.UnitName, model.Abbrev, _userManager.UserId);
            }
            else
            {
                return Ok(new { code = 1, msg = "数据格式错误" });
                throw Oops.Bah("数据格式错误");
            }
        }
@@ -1744,45 +1108,18 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult EditUnit(AddEditUnitVm model)
        [UnitOfWork]
        public async Task EditUnit(AddEditUnitVm model)
        {
            if (ModelState.IsValid)
            {
                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 bolls = _unitSvc.EditUnit(model.Id, model.UnitName, model.Abbrev, int.Parse(userId));
                    if (bolls)
                    {
                        SysUnit unit = _unitSvc.GetUnit(model.Id);
                        _operation.InsertOperation("基础信息", "计量单位", unit.UnitNo, "编辑", "编辑计量单位 单位名称:" + unit.UnitNo, Convert.ToInt32(userId));
                        return Ok(new { code = 0, msg = "编辑成功" });
                    }
                    else
                    {
                        return Ok(new { code = 1, msg = "编辑失败" });
                    }
                }
                catch (Exception e)
                {
                    return Ok(new { code = 1, msg = e.Message });
                }
                await _unitSvc.EditUnit(model.Id, model.UnitName, model.Abbrev, _userManager.UserId);
                SysUnit unit = await _unitSvc.GetUnit(model.Id);
                await _operation.InsertOperation("基础信息", "计量单位", unit.UnitNo, "编辑", "编辑计量单位 单位名称:" + unit.UnitNo, _userManager.UserId);
            }
            else
            {
                return Ok(new { code = 1, msg = "数据格式错误" });
                throw Oops.Bah("数据格式错误");
            }
        }
@@ -1792,35 +1129,10 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult DelUnit(IdVm model)
        [UnitOfWork]
        public async Task DelUnit(IdVm model)
        {
            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 bolls = _unitSvc.DelUnit(model.Id, int.Parse(userId));
                if (bolls)
                {
                    return Ok(new { code = 0, msg = "删除成功" });
                }
                else
                {
                    return Ok(new { code = 1, msg = "删除失败" });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            await _unitSvc.DelUnit(model.Id, _userManager.UserId);
        }
        /// <summary>
        /// 删除计量单位信息(多删除)
@@ -1828,53 +1140,14 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult DelsUnit(IdVm model)
        [UnitOfWork]
        public async Task DelsUnit(IdVm model)
        {
            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 bolls = _unitSvc.DelsUnit(model.Ids, int.Parse(userId));
                if (bolls)
                {
                    return Ok(new { code = 0, msg = "删除成功" });
                }
                else
                {
                    return Ok(new { code = 1, msg = "删除失败" });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            var bolls = await _unitSvc.DelsUnit(model.Ids, _userManager.UserId);
        }
        #endregion
        #region 包装管理
        private string UserId;
        //public BasisController()
        //{
        //    var claimsIdentity = this.User.Identity as ClaimsIdentity;
        //    if (claimsIdentity == null)
        //    {
        //        throw new Exception("未获取到用户信息");
        //    }
        //    UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
        //    if (string.IsNullOrWhiteSpace(UserId))
        //    {
        //        throw new Exception("未获取到用户信息");
        //    }
        //}
        /// <summary>
        /// 查询包装信息
@@ -1882,18 +1155,11 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetPackagList(GetPackagVm model)
        public async Task<SqlSugarPagedList> GetPackagList(GetPackagVm model)
        {
            try
            {
                var list = _packagSvc.GetPackagList(model.PackagNo, model.PackagName, model.Level, model.Page, model.Limit, out int count);
                return Ok(new { code = 0, count, msg = "物流信息", data = list });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            RefAsync<int> count = new RefAsync<int>();
            var list = await _packagSvc.GetPackagList(model.PackagNo, model.PackagName, model.Level, model.Page, model.Limit, count);
            return new SqlSugarPagedList { Items = list, Total = count };
        }
        /// <summary>
@@ -1902,15 +1168,9 @@
        /// <param name="id">包装id</param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetPackagById(int id)
        public async Task<SysPackag> GetPackagById(int id)
        {
            SysPackag packag = _packagSvc.GetPackagById(id);
            return Ok(new
            {
                data = packag,
                code = 0,
                msg = "成功"
            });
            return await _packagSvc.GetPackagById(id);
        }
        /// <summary>
@@ -1919,47 +1179,11 @@
        /// <param name="model">包装信息</param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult AddPackag(AddEditPackagVm model)
        [UnitOfWork]
        public async Task AddPackag(AddEditPackagVm model)
        {
            try
            {
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                if (claimsIdentity == null)
                {
                    throw new Exception("未获取到用户信息");
                }
                UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                if (string.IsNullOrWhiteSpace(UserId))
                {
                    throw new Exception("未获取到用户信息");
                }
                model.CreateUser = int.Parse(UserId);
                int i = _packagSvc.AddPackag(model);
                if (i == 1)
                {
                    _operation.InsertOperation("基础信息", "包装管理", model.PackagNo, "添加", "添加包装信息 包装编号:" + model.PackagNo, Convert.ToInt32(UserId));
                    return Ok(new { code = 0, msg = "添加成功" });
                }
                else if (i > 1)
                {
                    return Ok(new { code = i, msg = "包装等级不可越级添加" });
                }
                else
                {
                    return Ok(new { code = 1, msg = "添加失败" });
                }
            }
            catch (Exception e)
            {
                return Ok(new
                {
                    code = 1,
                    msg = e.Message
                });
            }
            await _packagSvc.AddPackag(model);
            await _operation.InsertOperation("基础信息", "包装管理", model.PackagNo, "添加", "添加包装信息 包装编号:" + model.PackagNo, _userManager.UserId);
        }
        /// <summary>
@@ -1968,42 +1192,11 @@
        /// <param name="model">包装信息</param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult EditPackag(AddEditPackagVm model)
        [UnitOfWork]
        public async Task EditPackag(AddEditPackagVm model)
        {
            try
            {
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                if (claimsIdentity == null)
                {
                    throw new Exception("未获取到用户信息");
                }
                UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                if (string.IsNullOrWhiteSpace(UserId))
                {
                    throw new Exception("未获取到用户信息");
                }
                model.CreateUser = int.Parse(UserId);
                int i = _packagSvc.EditPackag(model);
                if (i == 1)
                {
                    _operation.InsertOperation("基础信息", "包装管理", model.PackagNo, "编辑", "编辑包装信息 包装编号:" + model.PackagNo, Convert.ToInt32(UserId));
                    return Ok(new { code = 0, msg = "编辑成功" });
                }
                if (i == 2)
                {
                    return Ok(new { code = i, msg = "包装等级不可越级修改 请重新输入" });
                }
                else
                {
                    return Ok(new { code = 1, msg = "编辑失败" });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            await _packagSvc.EditPackag(model);
            await _operation.InsertOperation("基础信息", "包装管理", model.PackagNo, "编辑", "编辑包装信息 包装编号:" + model.PackagNo, _userManager.UserId);
        }
        /// <summary>
@@ -2012,37 +1205,11 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult DelPackag(AddEditPackagVm model)
        [UnitOfWork]
        public async Task DelPackag(AddEditPackagVm model)
        {
            try
            {
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                if (claimsIdentity == null)
                {
                    throw new Exception("未获取到用户信息");
                }
                UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                if (string.IsNullOrWhiteSpace(UserId))
                {
                    throw new Exception("未获取到用户信息");
                }
                var bolls = _packagSvc.DelPackag(model.Id, int.Parse(UserId));
                if (bolls)
                {
                    _operation.InsertOperation("基础信息", "包装管理", model.PackagNo, "删除", "删除包装信息 包装编号:" + model.PackagNo, Convert.ToInt32(UserId));
                    return Ok(new { code = 0, msg = "删除成功" });
                }
                else
                {
                    return Ok(new { code = 1, msg = "删除失败" });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            await _packagSvc.DelPackag(model.Id, _userManager.UserId);
            await _operation.InsertOperation("基础信息", "包装管理", model.PackagNo, "删除", "删除包装信息 包装编号:" + model.PackagNo, _userManager.UserId);
        }
        #endregion
@@ -2051,22 +1218,11 @@
        /// <summary>
        /// 获取操作日志信息列表
        /// </summary>
        /// <param name="menuName">菜单名称</param>
        /// <param name="type">操作类型</param>
        /// <param name="msg">操作内容</param>
        /// <param name="menuNo">菜单号</param>
        /// <param name="parentNo">模块号</param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetSysOperationList(string menuName, string type, string msg, string menuNo, string parentNo)
        [HttpPost]
        public async Task<SqlSugarPagedList> GetSysOperationList(GetOperationVm model)
        {
            List<OperationDto> operation = _operation.GetSysOperationList(menuName, type, msg, menuNo, parentNo);
            return Ok(new
            {
                data = operation,
                code = 0,
                msg = "成功"
            });
            return await _operation.GetSysOperationList(model);
        }
        /// <summary>
@@ -2075,15 +1231,9 @@
        /// <param name="dicName">字典名称</param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetDicTypeList(string dicName)
        public async Task<List<SysDictionary>> GetDicTypeList(string dicName)
        {
            List<SysDictionary> diclist = _operation.GetDicTypeList(dicName);
            return Ok(new
            {
                data = diclist,
                code = 0,
                msg = "成功"
            });
            return await _operation.GetDicTypeList(dicName);
        }
        #endregion
@@ -2095,18 +1245,9 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetInterfaceList(InterfaceVm model)
        public async Task<SqlSugarPagedList> GetInterfaceList(InterfaceVm model)
        {
            try
            {
                var models = _interface.GetInterfaceList(model, out int count);
                return Ok(new { code = 0, count, msg = "接口列表", data = models });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            return await _interface.GetInterfaceList(model);
        }
        /// <summary>
@@ -2115,18 +1256,9 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetInterfaceDetailList(InterfaceDetailVm model)
        public async Task<SqlSugarPagedList> GetInterfaceDetailList(InterfaceDetailVm model)
        {
            try
            {
                var models = _interface.GetInterfaceDetailList(model, out int count);
                return Ok(new { code = 0, count, msg = "接口明细列表", data = models });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            return await _interface.GetInterfaceDetailList(model);
        }
        /// <summary>
@@ -2135,41 +1267,18 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult AddInterface(InterfaceVm model)
        [UnitOfWork]
        public async Task AddInterface(InterfaceVm model)
        {
            try
            await _interface.AddInterface(model);
            await _operation.InsertOperation(new OperationInputVm()
            {
                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("未获取到用户信息");
                }
                model.CreateUser = int.Parse(UserId);
                string strMesage = _interface.AddInterface(model);
                if (strMesage == "")
                {
                    return Ok(new { code = 0, msg = "添加成功" });
                }
                if (strMesage.Contains("-1"))
                {
                    return Ok(new { code = 1, msg = strMesage });
                }
                else
                {
                    return Ok(new { code = 0, msg = strMesage });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
                ParentName = "系统设置",
                MenuName = "接口管理",
                FkNo = model.InterfaceNo,
                TypeName = "添加",
                Msg = $"添加了接口编号为{model.InterfaceNo}的接口信息"
            });
        }
        /// <summary>
@@ -2178,41 +1287,18 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult EditInterface(InterfaceVm model)
        [UnitOfWork]
        public async Task EditInterface(InterfaceVm model)
        {
            try
            await _interface.EditInterface(model);
            await _operation.InsertOperation(new OperationInputVm()
            {
                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("未获取到用户信息");
                }
                model.CreateUser = int.Parse(UserId);
                string strMesage = _interface.EditInterface(model);
                if (strMesage == "")
                {
                    return Ok(new { code = 0, msg = "编辑成功" });
                }
                if (strMesage.Contains("-1"))
                {
                    return Ok(new { code = 0, msg = "部分成功" });
                }
                else
                {
                    return Ok(new { code = 1, msg = strMesage });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
                ParentName = "系统设置",
                MenuName = "接口管理",
                FkNo = model.InterfaceNo,
                TypeName = "编辑",
                Msg = $"编辑了接口编号为{model.InterfaceNo}的接口信息"
            });
        }
        /// <summary>
@@ -2221,37 +1307,18 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult DelInterface(InterfaceVm model)
        [UnitOfWork]
        public async Task DelInterface(InterfaceVm model)
        {
            try
            await _interface.DelInterface(model);
            await _operation.InsertOperation(new OperationInputVm()
            {
                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("未获取到用户信息");
                }
                model.CreateUser = int.Parse(UserId);
                string strMesage = _interface.DelInterface(model);
                if (strMesage == "")
                {
                    return Ok(new { code = 0, msg = "删除成功" });
                }
                else
                {
                    return Ok(new { code = 1, msg = strMesage });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
                ParentName = "系统设置",
                MenuName = "接口管理",
                FkNo = model.InterfaceNo,
                TypeName = "编辑",
                Msg = $"删除了接口编号为{model.InterfaceNo}的接口信息"
            });
        }
        /// <summary>
@@ -2260,37 +1327,18 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult DelInterfaceDetail(InterfaceDetailVm model)
        [UnitOfWork]
        public async Task DelInterfaceDetail(InterfaceDetailVm model)
        {
            try
            await _interface.DelInterfaceDetail(model);
            await _operation.InsertOperation(new OperationInputVm()
            {
                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("未获取到用户信息");
                }
                model.CreateUser = int.Parse(UserId);
                string strMesage = _interface.DelInterfaceDetail(model);
                if (strMesage == "")
                {
                    return Ok(new { code = 0, msg = "删除成功" });
                }
                else
                {
                    return Ok(new { code = 1, msg = strMesage });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
                ParentName = "系统设置",
                MenuName = "接口管理",
                FkNo = model.InterfaceNo,
                TypeName = "编辑",
                Msg = $"删除了接口编号为{model.InterfaceNo}的接口信息,本系统字段为{model.Field}的接口信息"
            });
        }
        #endregion
    }