|
@@ -1,13 +1,16 @@
|
|
|
|
|
|
|
|
|
-
|
|
|
+using Google.Protobuf.WellKnownTypes;
|
|
|
+using OASystem.Domain.Dtos.UserDto;
|
|
|
+using OASystem.Infrastructure.Repositories.System;
|
|
|
+using System.ComponentModel.Design;
|
|
|
|
|
|
namespace OASystem.API.Controllers
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 系统设置
|
|
|
/// </summary>
|
|
|
-
|
|
|
+ //[Authorize]
|
|
|
[Route("api/[controller]/[action]")]
|
|
|
public class SystemController : ControllerBase
|
|
|
{
|
|
@@ -17,44 +20,25 @@ namespace OASystem.API.Controllers
|
|
|
private readonly UsersRepository _userRep;
|
|
|
private readonly IMapper _mapper;
|
|
|
|
|
|
+ private readonly SetDataRepository _setDataRepository;
|
|
|
+ private readonly SystemMenuPermissionRepository _SystemMenuPermissionRepository;
|
|
|
+ private readonly CompanyRepository _CompanyRepository;
|
|
|
+ private readonly JobPostRepository _jobRep;
|
|
|
+
|
|
|
public SystemController( CompanyRepository syscom,DepartmentRepository sysDepRep, UsersRepository userRep,
|
|
|
- IMapper mapper)
|
|
|
+ IMapper mapper, SetDataRepository setDataRepository, CompanyRepository companyRepository,
|
|
|
+ SystemMenuPermissionRepository systemMenuPermissionRepository, JobPostRepository jobRep)
|
|
|
{
|
|
|
_syscomRep = syscom;
|
|
|
_sysDepRep = sysDepRep;
|
|
|
_userRep = userRep;
|
|
|
_mapper = mapper;
|
|
|
+ _setDataRepository = setDataRepository;
|
|
|
+ _CompanyRepository = companyRepository;
|
|
|
+ _SystemMenuPermissionRepository = systemMenuPermissionRepository;
|
|
|
+ _jobRep = jobRep;
|
|
|
}
|
|
|
|
|
|
- #region user 操作
|
|
|
- /// <summary>
|
|
|
- /// 查询所有员工(web)
|
|
|
- /// </summary>
|
|
|
- /// <param name="dto"></param>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpPost]
|
|
|
- [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
- public async Task<IActionResult> GetUserList(DtoBase dto)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- var result = _userRep.GetUserList(dto.PortType,string.Empty);
|
|
|
- if (result.Result.Code != 0)
|
|
|
- {
|
|
|
- return Ok(JsonView(false, "暂无数据!"));
|
|
|
-
|
|
|
- }
|
|
|
- return Ok(JsonView(true,"查询成功!",result.Result.Data));
|
|
|
- }
|
|
|
- catch (Exception)
|
|
|
- {
|
|
|
- return Ok(JsonView(false, "程序错误!"));
|
|
|
- throw;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion
|
|
|
-
|
|
|
#region 企业操作
|
|
|
/// <summary>
|
|
|
/// 查询企业数据
|
|
@@ -69,16 +53,23 @@ namespace OASystem.API.Controllers
|
|
|
{
|
|
|
if (dto.PortType == 1)
|
|
|
{
|
|
|
- return Ok(JsonView(false, "暂无数据!"));
|
|
|
+ var CompanyDataResult = _CompanyRepository.GetCompanyData();
|
|
|
+ if (CompanyDataResult.Code != 0)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(CompanyDataResult.Msg));
|
|
|
+ }
|
|
|
+
|
|
|
+ return Ok(JsonView(true, "查询成功!", CompanyDataResult.Data));
|
|
|
}
|
|
|
else if (dto.PortType == 2)
|
|
|
{
|
|
|
- var companyList = _sysDepRep.QueryDto<Sys_Company, CompanyView>(a=>a.IsDel!=null).ToList();
|
|
|
- if (companyList.Count == 0)
|
|
|
+ var CompanyDataResult = _CompanyRepository.GetCompanyData();
|
|
|
+ if (CompanyDataResult.Code != 0)
|
|
|
{
|
|
|
- return Ok(JsonView(false, "暂无数据!"));
|
|
|
+ return Ok(JsonView(CompanyDataResult.Msg));
|
|
|
}
|
|
|
- return Ok(JsonView(true,"查询成功!",companyList));
|
|
|
+
|
|
|
+ return Ok(JsonView(true,"查询成功!", CompanyDataResult.Data));
|
|
|
}
|
|
|
else if (dto.PortType == 3)
|
|
|
{
|
|
@@ -199,8 +190,8 @@ namespace OASystem.API.Controllers
|
|
|
return Ok(JsonView(false, "程序错误!"));
|
|
|
throw;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|
|
|
#endregion
|
|
@@ -210,27 +201,27 @@ namespace OASystem.API.Controllers
|
|
|
/// <summary>
|
|
|
/// 查询部门数据
|
|
|
/// </summary>
|
|
|
- /// <param name = "dto" ></param>
|
|
|
+ /// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
- [Authorize]
|
|
|
+
|
|
|
[HttpPost]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> QueryDepartmentList(DepartmentDto dto)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- if (dto.PortType == 1)
|
|
|
+ if (dto.PortType==1)
|
|
|
{
|
|
|
return Ok(JsonView(false, "暂无数据!"));
|
|
|
}
|
|
|
- else if (dto.PortType == 2)
|
|
|
+ else if (dto.PortType==2)
|
|
|
{
|
|
|
var result = _sysDepRep.QueryDto<Sys_Department, DepartmentIView>(s => s.CompanyId == dto.CompanyId).ToList();
|
|
|
if (result.Count == 0)
|
|
|
{
|
|
|
return Ok(JsonView(false, "暂无数据!"));
|
|
|
}
|
|
|
- return Ok(JsonView(true, "查询成功!", result));
|
|
|
+ return Ok(JsonView(true,"查询成功!",result));
|
|
|
}
|
|
|
else if (dto.PortType == 3)
|
|
|
{
|
|
@@ -246,12 +237,12 @@ namespace OASystem.API.Controllers
|
|
|
return Ok(JsonView(false, "程序错误!"));
|
|
|
throw;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 部门添加
|
|
|
/// </summary>
|
|
|
- /// <param name = "dto" ></param>
|
|
|
+ /// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
@@ -279,22 +270,22 @@ namespace OASystem.API.Controllers
|
|
|
return Ok(JsonView(false, "程序错误!"));
|
|
|
throw;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 部门修改
|
|
|
/// </summary>
|
|
|
- /// <param name = "dto" ></param>
|
|
|
- /// <returns ></returns>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
[HttpPost]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> EditDepartment(EditDepartmentDto dto)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- if (dto.Id == 0 || string.IsNullOrWhiteSpace(dto.DepName) || dto.CompanyId == 0 || string.IsNullOrWhiteSpace(dto.DepCode))
|
|
|
+ if (dto.Id==0 || string.IsNullOrWhiteSpace(dto.DepName) || dto.CompanyId == 0 || string.IsNullOrWhiteSpace(dto.DepCode))
|
|
|
{
|
|
|
return Ok(JsonView(false, "请检查信息是否输入完整!"));
|
|
|
}
|
|
@@ -302,12 +293,12 @@ namespace OASystem.API.Controllers
|
|
|
{
|
|
|
bool res = await _sysDepRep.UpdateAsync<Sys_Department>(a => a.Id == dto.Id, a => new Sys_Department
|
|
|
{
|
|
|
- CompanyId = dto.CompanyId,
|
|
|
- DepCode = dto.DepCode,
|
|
|
- DepName = dto.DepName,
|
|
|
- ParentDepId = dto.ParentDepId,
|
|
|
- Remark = dto.Remark,
|
|
|
- });
|
|
|
+ CompanyId=dto.CompanyId,
|
|
|
+ DepCode=dto.DepCode,
|
|
|
+ DepName=dto.DepName,
|
|
|
+ ParentDepId=dto.ParentDepId,
|
|
|
+ Remark=dto.Remark,
|
|
|
+ });
|
|
|
if (!res)
|
|
|
{
|
|
|
return Ok(JsonView(false, "修改失败!"));
|
|
@@ -327,7 +318,7 @@ namespace OASystem.API.Controllers
|
|
|
/// <summary>
|
|
|
/// 部门删除
|
|
|
/// </summary>
|
|
|
- /// <param name = "dto" ></param>
|
|
|
+ /// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
@@ -341,7 +332,7 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- bool res = await _sysDepRep.SoftDeleteAsync<Sys_Department>(dto.Id.ToString());
|
|
|
+ bool res =await _sysDepRep.SoftDeleteAsync<Sys_Department>(dto.Id.ToString());
|
|
|
if (!res)
|
|
|
{
|
|
|
return Ok(JsonView(false, "删除失败!"));
|
|
@@ -359,7 +350,154 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
+ #region 岗位板块
|
|
|
+ /// <summary>
|
|
|
+ /// 岗位查询
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> QueryJobPost(QueryJobPostDto dto)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if (dto.PortType == 1)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "暂无数据!"));
|
|
|
+ }
|
|
|
+ else if (dto.PortType == 2)
|
|
|
+ {
|
|
|
+ var result = _jobRep.QueryDto<Sys_JobPost, JobPostView>(s => s.CompanyId == dto.CompanyId && s.DepId==dto.DepId).ToList();
|
|
|
+ if (result.Count == 0)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "暂无数据!"));
|
|
|
+ }
|
|
|
+ return Ok(JsonView(true, "查询成功!", result));
|
|
|
+ }
|
|
|
+ else if (dto.PortType == 3)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "暂无数据!"));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "暂无数据!"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
+ throw;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 添加岗位
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> AddJobPost(AddJobPostDto dto)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ Sys_JobPost sys_Job = _mapper.Map<Sys_JobPost>(dto);
|
|
|
+ int id = await _jobRep.AddAsyncReturnId(sys_Job);
|
|
|
+ if (id == 0)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "添加失败"));
|
|
|
+ }
|
|
|
+ return Ok(JsonView(true, "添加成功", new { Id = id }));
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
+ throw;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 修改岗位
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> EditJobPost(EditJobPostDto dto)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ bool res = await _jobRep.UpdateAsync<Sys_JobPost>(a=>a.Id==dto.Id,a =>new Sys_JobPost
|
|
|
+ {
|
|
|
+ CompanyId=dto.CompanyId,
|
|
|
+ DepId=dto.DepId,
|
|
|
+ JobName=dto.JobName,
|
|
|
+ Remark=dto.Remark,
|
|
|
+ });
|
|
|
+ if (!res)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "修改失败"));
|
|
|
+ }
|
|
|
+ return Ok(JsonView(true, "修改成功"));
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
+ throw;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 删除岗位
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> DelJobPost(DelJobPostDto dto)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ bool res = await _jobRep.SoftDeleteAsync<Sys_JobPost>(dto.Id.ToString());
|
|
|
+ if (!res)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "删除失败!"));
|
|
|
+ }
|
|
|
+ return Ok(JsonView(true, "删除成功"));
|
|
|
+ }
|
|
|
+ catch (Exception)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
+ throw;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
#region 用户操作
|
|
|
+ /// <summary>
|
|
|
+ /// 查询所有员工(web)
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> GetUserList(DtoBase dto)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var result = _userRep.GetUserList(dto.PortType, string.Empty);
|
|
|
+ if (result.Result.Code != 0)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "暂无数据!"));
|
|
|
+
|
|
|
+ }
|
|
|
+ return Ok(JsonView(true, "查询成功!", result.Result.Data));
|
|
|
+ }
|
|
|
+ catch (Exception)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
+ throw;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 查询用户数据
|
|
|
/// </summary>
|
|
@@ -400,7 +538,156 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 修改用户信息(上级修改/分配 公司、部门、岗位、工号等信息)
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> EditUser(EditUserDto dto)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ bool res = await _userRep.UpdateAsync<Sys_Users>(a => a.Id == dto.Id, a => new Sys_Users
|
|
|
+ {
|
|
|
+ Number = dto.Number,
|
|
|
+ CompanyId = dto.CompanyId,
|
|
|
+ DepId = dto.DepId,
|
|
|
+ JobPostId = dto.JobPostId,
|
|
|
+ Ext = dto.Ext,
|
|
|
+ UsePeriod = dto.UsePeriod,
|
|
|
+ HrAudit = dto.HrAudit
|
|
|
+ });
|
|
|
+ if (!res)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "修改失败!"));
|
|
|
+ }
|
|
|
+ return Ok(JsonView(true, "修改成功!"));
|
|
|
+ }
|
|
|
+ catch (Exception)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
+ throw;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 修改用户信息(登录用户修改个人信息)
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> EditMyUser(EditMyUserDto dto)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if (string.IsNullOrWhiteSpace(dto.CnName) || string.IsNullOrWhiteSpace(dto.Address) || string.IsNullOrWhiteSpace(dto.IDCard) || dto.Sex != 0 && dto.Sex != 1 ||
|
|
|
+ string.IsNullOrWhiteSpace(dto.MaritalStatus) || string.IsNullOrWhiteSpace(dto.HomeAddress)|| dto.Birthday>=DateTime.Now.AddYears(-1))
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "请完善你的个人信息!"));
|
|
|
+ }
|
|
|
+ else if (string.IsNullOrWhiteSpace(dto.GraduateInstitutions) || string.IsNullOrWhiteSpace(dto.Professional) || dto.Education == 0 || string.IsNullOrWhiteSpace(dto.GraduateInstitutions))
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "请完善你的学历信息!"));
|
|
|
+ }
|
|
|
+ else if (string.IsNullOrWhiteSpace(dto.Phone) || string.IsNullOrWhiteSpace(dto.UrgentPhone) || string.IsNullOrWhiteSpace(dto.Email))
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "请检查联系方式、紧急联系人及邮箱输写是否正确!"));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ bool res = await _userRep.UpdateAsync<Sys_Users>(a => a.Id == dto.Id, a => new Sys_Users
|
|
|
+ {
|
|
|
+ CnName = dto.CnName,
|
|
|
+ EnName = dto.EnName,
|
|
|
+ Sex = dto.Sex,
|
|
|
+ Phone = dto.Phone,
|
|
|
+ UrgentPhone = dto.UrgentPhone,
|
|
|
+ Email = dto.Email,
|
|
|
+ Address = dto.Address,
|
|
|
+ Edate = dto.Edate,
|
|
|
+ Birthday = dto.Birthday,
|
|
|
+ IDCard = dto.IDCard,
|
|
|
+ GraduateInstitutions = dto.GraduateInstitutions,
|
|
|
+ Professional = dto.Professional,
|
|
|
+ Education = dto.Education,
|
|
|
+ TheOrAdultEducation = dto.TheOrAdultEducation,
|
|
|
+ MaritalStatus = dto.MaritalStatus,
|
|
|
+ HomeAddress = dto.HomeAddress,
|
|
|
+ WorkExperience = dto.WorkExperience,
|
|
|
+ Certificate = dto.Certificate
|
|
|
+ });
|
|
|
+ if (!res)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "修改失败!"));
|
|
|
+ }
|
|
|
+ return Ok(JsonView(true, "修改成功!"));
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (Exception)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
+ throw;
|
|
|
+ }
|
|
|
+ }
|
|
|
#endregion
|
|
|
|
|
|
+ #region 权限模块
|
|
|
+ /// <summary>
|
|
|
+ /// 权限数据页面初始化
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ //[Authorize]
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> GetAuth(AuthDto dto)
|
|
|
+ {
|
|
|
+ Result result = new Result();
|
|
|
+ //模块数据
|
|
|
+ var setDataResult = await _setDataRepository.GetSySDefultModule(_setDataRepository);
|
|
|
+ if (setDataResult.Code != 0)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(setDataResult.Msg));
|
|
|
+ }
|
|
|
+
|
|
|
+ List<SetDataView> setDataList = _mapper.Map<List<SetDataView>>(setDataResult.Data);
|
|
|
+ var mod = setDataList.Find(x => x.Name == "权限模块");
|
|
|
+ if (mod == null)
|
|
|
+ {
|
|
|
+ return Ok(JsonView("未找到权限模块!"));
|
|
|
+ }
|
|
|
+
|
|
|
+ //页面数据
|
|
|
+ var SystemMenuPermissionData = _SystemMenuPermissionRepository.GetSystemMenuViweData(_SystemMenuPermissionRepository, mod.Id, dto.pageSize, dto.currentPage);
|
|
|
+ if (SystemMenuPermissionData.Code != 0)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(SystemMenuPermissionData.Msg));
|
|
|
+ }
|
|
|
+
|
|
|
+ //公司数据
|
|
|
+ var CompanyDataResult = _CompanyRepository.GetCompanyData();
|
|
|
+ if (CompanyDataResult.Code != 0)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(CompanyDataResult.Msg));
|
|
|
+ }
|
|
|
+
|
|
|
+ result.Code = 0;
|
|
|
+ result.Msg = "成功!";
|
|
|
+ var Dyresult = new
|
|
|
+ {
|
|
|
+ setDataResult = setDataResult.Data,
|
|
|
+ CompanyDataResult = CompanyDataResult.Data,
|
|
|
+ SystemMenuPermissionData = SystemMenuPermissionData.Data
|
|
|
+ };
|
|
|
+
|
|
|
+ return Ok(JsonView(200, "成功!", Dyresult));
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
}
|
|
|
}
|