Commit ccd0ff30 authored by liudong1993's avatar liudong1993

代码优化+

parent 031242bf
using System;
using REBORN.Common.AOP;
using REBORN.Common.Plugin;
namespace Property.Model.Entity
{
/// <summary>
/// 耗材申请时间实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Supplies_Applyfor
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 公司别id -1表示通用
/// </summary>
public int? BranchId
{
get;
set;
}
/// <summary>
/// 状态 0正常 1删除
/// </summary>
public int? Status
{
get;
set;
}
/// <summary>
/// 公司
/// </summary>
public int? RB_Branch_Id
{
get;
set;
}
/// <summary>
/// 集团
/// </summary>
public int? RB_Group_Id
{
get;
set;
}
/// <summary>
/// CreateBy
/// </summary>
public int? CreateBy
{
get;
set;
}
/// <summary>
/// CreateDate
/// </summary>
public DateTime? CreateDate
{
get;
set;
}
/// <summary>
/// UpdateBy
/// </summary>
public int? UpdateBy
{
get;
set;
}
/// <summary>
/// UpdateDate
/// </summary>
public DateTime? UpdateDate
{
get;
set;
}
}
}
\ No newline at end of file
using System;
using REBORN.Common.AOP;
using REBORN.Common.Plugin;
namespace Property.Model.Entity
{
/// <summary>
/// 耗材申请特殊日期实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Supplies_ApplyforSpecial
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 申请id
/// </summary>
public int? ApplyforId
{
get;
set;
}
/// <summary>
/// 特殊日期
/// </summary>
public DateTime? Date
{
get;
set;
}
/// <summary>
/// 开始时间
/// </summary>
public string StartTime
{
get;
set;
}
/// <summary>
/// 结束时间 05:44
/// </summary>
public string EndTime
{
get;
set;
}
/// <summary>
/// 状态 0正常 1删除
/// </summary>
public int? Status
{
get;
set;
}
/// <summary>
/// CreateBy
/// </summary>
public int? CreateBy
{
get;
set;
}
/// <summary>
/// CreateDate
/// </summary>
public DateTime? CreateDate
{
get;
set;
}
/// <summary>
/// UpdateBy
/// </summary>
public int? UpdateBy
{
get;
set;
}
/// <summary>
/// UpdateDate
/// </summary>
public DateTime? UpdateDate
{
get;
set;
}
}
}
\ No newline at end of file
using System;
using REBORN.Common.AOP;
using REBORN.Common.Plugin;
namespace Property.Model.Entity
{
/// <summary>
/// 耗材申请工作日实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Supplies_ApplyforWeekday
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 申请id
/// </summary>
public int? ApplyforId
{
get;
set;
}
/// <summary>
/// 周几 存 周一 周二 周三。。。
/// </summary>
public string Weekday
{
get;
set;
}
/// <summary>
/// 开始时间
/// </summary>
public string StartTime
{
get;
set;
}
/// <summary>
/// 结束时间 05:44
/// </summary>
public string EndTime
{
get;
set;
}
/// <summary>
/// 状态 0正常 1删除
/// </summary>
public int? Status
{
get;
set;
}
/// <summary>
/// 公司
/// </summary>
public int? RB_Branch_Id
{
get;
set;
}
/// <summary>
/// 集团
/// </summary>
public int? RB_Group_Id
{
get;
set;
}
/// <summary>
/// CreateBy
/// </summary>
public int? CreateBy
{
get;
set;
}
/// <summary>
/// CreateDate
/// </summary>
public DateTime? CreateDate
{
get;
set;
}
/// <summary>
/// UpdateBy
/// </summary>
public int? UpdateBy
{
get;
set;
}
/// <summary>
/// UpdateDate
/// </summary>
public DateTime? UpdateDate
{
get;
set;
}
}
}
\ No newline at end of file
using System;
using Property.Model.Entity;
using REBORN.Common.AOP;
namespace Property.Model.Extend
{
/// <summary>
/// 耗材申请特殊日期扩展实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Supplies_ApplyforSpecial_Extend : RB_Supplies_ApplyforSpecial
{
}
}
\ No newline at end of file
using System;
using Property.Model.Entity;
using REBORN.Common.AOP;
namespace Property.Model.Extend
{
/// <summary>
/// 耗材申请工作日扩展实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Supplies_ApplyforWeekday_Extend : RB_Supplies_ApplyforWeekday
{
}
}
\ No newline at end of file
using System;
using Property.Model.Entity;
using REBORN.Common.AOP;
namespace Property.Model.Extend
{
/// <summary>
/// IJչʵ
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Supplies_Applyfor_Extend : RB_Supplies_Applyfor
{
}
}
\ No newline at end of file
[*.cs]
# IDE0059: 不需要赋值
csharp_style_unused_value_assignment_preference = discard_variable:none
# IDE0060: 删除未使用的参数
dotnet_code_quality_unused_parameters = all:none
......@@ -7,9 +7,6 @@ using Property.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using REBORN.Common.Plugin;
using Newtonsoft.Json;
using REBORN.Commom.Plugin;
......@@ -23,38 +20,37 @@ namespace Property.Module.FixedAssets
/// <summary>
/// 物料档案
/// </summary>
private RB_Supplies_MaterialRepository supplies_MaterialRepository = new RB_Supplies_MaterialRepository();
private readonly RB_Supplies_MaterialRepository supplies_MaterialRepository = new RB_Supplies_MaterialRepository();
/// <summary>
/// 仓库
/// </summary>
private RB_Supplies_WareHouseRepository supplies_WareHouseRepository = new RB_Supplies_WareHouseRepository();
private readonly RB_Supplies_WareHouseRepository supplies_WareHouseRepository = new RB_Supplies_WareHouseRepository();
/// <summary>
/// 入库单
/// </summary>
private RB_Supplies_StockInRepository supplies_StockInRepository = new RB_Supplies_StockInRepository();
private readonly RB_Supplies_StockInRepository supplies_StockInRepository = new RB_Supplies_StockInRepository();
/// <summary>
/// 入库明细
/// </summary>
private RB_Supplies_StockInDetailRepository supplies_StockInDetailRepository = new RB_Supplies_StockInDetailRepository();
private readonly RB_Supplies_StockInDetailRepository supplies_StockInDetailRepository = new RB_Supplies_StockInDetailRepository();
/// <summary>
/// 库存表
/// </summary>
private RB_Supplies_InventoryRepository supplies_InventoryRepository = new RB_Supplies_InventoryRepository();
private readonly RB_Supplies_InventoryRepository supplies_InventoryRepository = new RB_Supplies_InventoryRepository();
/// <summary>
/// 库存明细表
/// </summary>
private RB_Supplies_InventoryDetailRepository supplies_InventoryDetailRepository = new RB_Supplies_InventoryDetailRepository();
private readonly RB_Supplies_InventoryDetailRepository supplies_InventoryDetailRepository = new RB_Supplies_InventoryDetailRepository();
/// <summary>
/// 出库单
/// </summary>
private RB_Supplies_StockOutRepository supplies_StockOutRepository = new RB_Supplies_StockOutRepository();
private readonly RB_Supplies_StockOutRepository supplies_StockOutRepository = new RB_Supplies_StockOutRepository();
/// <summary>
/// 出库单明细
/// </summary>
private RB_Supplies_StockOutDetailRepository supplies_StockOutDetailRepository = new RB_Supplies_StockOutDetailRepository();
private Rb_branchRepository branchRepository = new Rb_branchRepository();
private Rb_departmentRepository departmentRepository = new Rb_departmentRepository();
private Rb_employeeRepository employeeRepository = new Rb_employeeRepository();
private readonly RB_Supplies_StockOutDetailRepository supplies_StockOutDetailRepository = new RB_Supplies_StockOutDetailRepository();
private readonly Rb_branchRepository branchRepository = new Rb_branchRepository();
private readonly Rb_departmentRepository departmentRepository = new Rb_departmentRepository();
/// <summary>
/// 获取物料档案分页列表
......@@ -225,7 +221,7 @@ namespace Property.Module.FixedAssets
for (int i = 0; i < images.Count(); i++)
{
string userFile = "/New/Upload/Property/";
string NewFileUrl = "";
string NewFileUrl;
if (Config.GetFilePath(images[i]).Contains("/New/"))
{
NewFileUrl = Config.GetFilePath(images[i]).Replace("Temporary", "Property");
......@@ -873,13 +869,13 @@ namespace Property.Module.FixedAssets
//增加库存明细
supplies_InventoryDetailRepository.Insert(new RB_Supplies_InventoryDetail()
{
CreateBy = demodel.CreateBy,
CreateBy = userInfo.EmployeeId,
CreateDate = DateTime.Now,
InventoryId = iModel.Id,
Number = item.Number,
Money = item.Money,
RB_Branch_Id = demodel.RB_Branch_Id,
RB_Group_Id = demodel.RB_Group_Id,
RB_Branch_Id = userInfo.RB_Branch_id,
RB_Group_Id = userInfo.RB_Group_id,
Status = 0,
Type = 1,
Id = 0,
......@@ -1264,13 +1260,13 @@ namespace Property.Module.FixedAssets
//增加库存明细
supplies_InventoryDetailRepository.Insert(new RB_Supplies_InventoryDetail()
{
CreateBy = demodel.CreateBy,
CreateBy = userInfo.EmployeeId,
CreateDate = DateTime.Now,
InventoryId = iModel.Id,
Number = item.Number,
Money = item.Money,
RB_Branch_Id = demodel.RB_Branch_Id,
RB_Group_Id = demodel.RB_Group_Id,
RB_Branch_Id = userInfo.RB_Branch_id,
RB_Group_Id = userInfo.RB_Group_id,
Status = 0,
Type = 1,
Id = 0,
......@@ -1324,13 +1320,13 @@ namespace Property.Module.FixedAssets
//增加库存明细
supplies_InventoryDetailRepository.Insert(new RB_Supplies_InventoryDetail()
{
CreateBy = demodel.CreateBy,
CreateBy = userInfo.EmployeeId,
CreateDate = DateTime.Now,
InventoryId = iModel.Id,
Number = item.Number,
Money = item.Money,
RB_Branch_Id = demodel.RB_Branch_Id,
RB_Group_Id = demodel.RB_Group_Id,
RB_Branch_Id = userInfo.RB_Branch_id,
RB_Group_Id = userInfo.RB_Group_id,
Status = 0,
Type = 2,
Id = 0,
......
......@@ -7,9 +7,6 @@ using Property.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using REBORN.Common.Plugin;
using Newtonsoft.Json;
using REBORN.Commom.Plugin;
using REBORN.Common.API;
......@@ -23,39 +20,39 @@ namespace Property.Module.FixedAssets
/// </summary>
public class WorkFlowModule
{
private Rb_departmentRepository departmentRepository = new Rb_departmentRepository();
private Rb_employeeRepository employeeRepository = new Rb_employeeRepository();
private Rb_branchRepository branchRepository = new Rb_branchRepository();
private readonly Rb_departmentRepository departmentRepository = new Rb_departmentRepository();
private readonly Rb_employeeRepository employeeRepository = new Rb_employeeRepository();
private readonly Rb_branchRepository branchRepository = new Rb_branchRepository();
//流程
private Rb_Workflow_TemplateRepository workflow_TemplateRepository = new Rb_Workflow_TemplateRepository();
private Rb_Workflow_ConditionRepository workflow_ConditionRepository = new Rb_Workflow_ConditionRepository();
private Rb_Workflow_AuditRepository workflow_AuditRepository = new Rb_Workflow_AuditRepository();
private Rb_Workflow_AuditUserRepository workflow_AuditUserRepository = new Rb_Workflow_AuditUserRepository();
private Rb_Workflow_AuditrecordRepository workflow_AuditrecordRepository = new Rb_Workflow_AuditrecordRepository();
private Rb_Workflow_AuditRelevanceRepository workflow_AuditRelevanceRepository = new Rb_Workflow_AuditRelevanceRepository();
private Rb_Workflow_AuditUserRelevanceRepository workflow_AuditUserRelevanceRepository = new Rb_Workflow_AuditUserRelevanceRepository();
private RB_Audit_DelegateRepository audit_DelegateRepository = new RB_Audit_DelegateRepository();
private Rb_Workflow_CopyToPeopleRepository workflow_CopyToPeopleRepository = new Rb_Workflow_CopyToPeopleRepository();
private RB_Workfolw_Change_LogRepository workfolw_Change_LogRepository = new RB_Workfolw_Change_LogRepository();
private readonly Rb_Workflow_TemplateRepository workflow_TemplateRepository = new Rb_Workflow_TemplateRepository();
private readonly Rb_Workflow_ConditionRepository workflow_ConditionRepository = new Rb_Workflow_ConditionRepository();
private readonly Rb_Workflow_AuditRepository workflow_AuditRepository = new Rb_Workflow_AuditRepository();
private readonly Rb_Workflow_AuditUserRepository workflow_AuditUserRepository = new Rb_Workflow_AuditUserRepository();
private readonly Rb_Workflow_AuditrecordRepository workflow_AuditrecordRepository = new Rb_Workflow_AuditrecordRepository();
private readonly Rb_Workflow_AuditRelevanceRepository workflow_AuditRelevanceRepository = new Rb_Workflow_AuditRelevanceRepository();
private readonly Rb_Workflow_AuditUserRelevanceRepository workflow_AuditUserRelevanceRepository = new Rb_Workflow_AuditUserRelevanceRepository();
private readonly RB_Audit_DelegateRepository audit_DelegateRepository = new RB_Audit_DelegateRepository();
private readonly Rb_Workflow_CopyToPeopleRepository workflow_CopyToPeopleRepository = new Rb_Workflow_CopyToPeopleRepository();
private readonly RB_Workfolw_Change_LogRepository workfolw_Change_LogRepository = new RB_Workfolw_Change_LogRepository();
/// <summary>
/// 资产信息
/// </summary>
private RB_Property_InfoRepository property_InfoRepository = new RB_Property_InfoRepository();
private readonly RB_Property_InfoRepository property_InfoRepository = new RB_Property_InfoRepository();
/// <summary>
/// 资产日志
/// </summary>
private RB_Property_LogRepository property_LogRepository = new RB_Property_LogRepository();
private readonly RB_Property_LogRepository property_LogRepository = new RB_Property_LogRepository();
/// <summary>
/// 资产使用
/// </summary>
private RB_Property_UseReceiveRepository useReceiveRepository = new RB_Property_UseReceiveRepository();
private readonly RB_Property_UseReceiveRepository useReceiveRepository = new RB_Property_UseReceiveRepository();
/// <summary>
/// 资产使用关联
/// </summary>
private RB_Property_UseRelevanceRepository useRelevanceRepository = new RB_Property_UseRelevanceRepository();
private readonly RB_Property_UseRelevanceRepository useRelevanceRepository = new RB_Property_UseRelevanceRepository();
......@@ -297,8 +294,10 @@ namespace Property.Module.FixedAssets
if (newList != null && newList.Count > 0)
{
//制单人
var AuditEmIds = new List<int>();
AuditEmIds.Add(CreateBy);
var AuditEmIds = new List<int>
{
CreateBy
};
#region 判断是否有已审核的人,有的话直接跳过
if (true)
{
......@@ -723,10 +722,10 @@ namespace Property.Module.FixedAssets
InsertBatcheAuditRecord(newList, wfId, financetrans, auditRelevance);
}
}
else
{
InsertBatcheAuditRecord(newList, wfId, financetrans, auditRelevance);
}
//else
//{
// InsertBatcheAuditRecord(newList, wfId, financetrans, auditRelevance);
//}
#endregion
}
#endregion
......@@ -2365,7 +2364,7 @@ namespace Property.Module.FixedAssets
for (int i = 0; i < images.Count(); i++)
{
string userFile = "/New/Upload/Property/";
string NewFileUrl = "";
string NewFileUrl;
if (Config.GetFilePath(images[i]).Contains("/New/"))
{
NewFileUrl = Config.GetFilePath(images[i]).Replace("Temporary", "Property");
......@@ -2410,9 +2409,10 @@ namespace Property.Module.FixedAssets
public void PushAuditMessage(List<EmAccoutIdModel> account, int workFlowId, string content, string title, int? empId, SysTemPushTypeEnum type)
{
//Dictionary<string, object> appExtras = new Dictionary<string, object>();
Dictionary<string, object> webExtras = new Dictionary<string, object>();
webExtras.Add("jumpUrl", "AssetsShenpi?Id=" + workFlowId + "&compType=shenpi");
Dictionary<string, object> webExtras = new Dictionary<string, object>
{
{ "jumpUrl", "AssetsShenpi?Id=" + workFlowId + "&compType=shenpi" }
};
//appExtras.Add("jumpUrl", "vt://financeApprovalDetail/view?ID=" + workFlowId + "&Conditon=3&Source=message&Type=" + Type);
//IMService.PushFinanceMessage(account, empId, content, title, type, SystemPushLogTypeEnum.XMApp, appExtras);
......
using Property.Model.Entity;
using Property.Model.Extend;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Property.Repository
{
/// <summary>
/// 耗材申请仓储类
/// </summary>
public partial class RB_Supplies_ApplyforRepository : RepositoryBase<RB_Supplies_Applyfor>
{
/// <summary>
/// 获取耗材申请分页数据
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="dmodel"></param>
/// <param name="count"></param>
/// <returns></returns>
public List<RB_Supplies_Applyfor_Extend> GetPageList(int pageIndex, int pageSize, RB_Supplies_Applyfor_Extend dmodel, out long count)
{
string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Supplies_Applyfor_Extend.Status), 0);
where += $@" and RB_Group_Id={dmodel.RB_Group_Id}";
if (dmodel.BranchId>=0)
{
where += " and " + nameof(RB_Supplies_Applyfor_Extend.BranchId) + " =" + dmodel.BranchId;
}
string sql = $@" select * from RB_Supplies_Applyfor {where} order by Id desc";
return GetPage<RB_Supplies_Applyfor_Extend>(pageIndex, pageSize, out count, sql).ToList();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Supplies_Applyfor_Extend> GetList(RB_Supplies_Applyfor_Extend dmodel)
{
string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Supplies_Applyfor_Extend.Status), 0);
where += $@" and RB_Group_Id={dmodel.RB_Group_Id}";
if (dmodel.BranchId >= 0)
{
where += " and " + nameof(RB_Supplies_Applyfor_Extend.BranchId) + " =" + dmodel.BranchId;
}
string sql = $@" select * from RB_Supplies_Applyfor {where} order by Id desc";
return Get<RB_Supplies_Applyfor_Extend>(sql).ToList();
}
}
}
using Property.Model.Entity;
using Property.Model.Extend;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Property.Repository
{
/// <summary>
/// 耗材申请特殊日期仓储类
/// </summary>
public partial class RB_Supplies_ApplyforSpecialRepository : RepositoryBase<RB_Supplies_ApplyforSpecial>
{
/// <summary>
/// 获取耗材申请特殊日期分页数据
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="dmodel"></param>
/// <param name="count"></param>
/// <returns></returns>
public List<RB_Supplies_ApplyforSpecial_Extend> GetPageList(int pageIndex, int pageSize, RB_Supplies_ApplyforSpecial_Extend dmodel, out long count)
{
string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Supplies_ApplyforSpecial_Extend.Status), 0);
if (dmodel.ApplyforId>=0)
{
where += " and " + nameof(RB_Supplies_ApplyforSpecial_Extend.ApplyforId) + " =" + dmodel.ApplyforId;
}
string sql = $@" select * from RB_Supplies_ApplyforSpecial {where} order by Id desc";
return GetPage<RB_Supplies_ApplyforSpecial_Extend>(pageIndex, pageSize, out count, sql).ToList();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Supplies_ApplyforSpecial_Extend> GetList(RB_Supplies_ApplyforSpecial_Extend dmodel)
{
string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Supplies_ApplyforSpecial_Extend.Status), 0);
if (dmodel.ApplyforId >= 0)
{
where += " and " + nameof(RB_Supplies_ApplyforSpecial_Extend.ApplyforId) + " =" + dmodel.ApplyforId;
}
string sql = $@" select * from RB_Supplies_ApplyforSpecial {where} order by Id desc";
return Get<RB_Supplies_ApplyforSpecial_Extend>(sql).ToList();
}
}
}
using Property.Model.Entity;
using Property.Model.Extend;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Property.Repository
{
/// <summary>
/// 耗材申请工作日仓储类
/// </summary>
public partial class RB_Supplies_ApplyforWeekdayRepository : RepositoryBase<RB_Supplies_ApplyforWeekday>
{
/// <summary>
/// 获取耗材申请工作日分页数据
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="dmodel"></param>
/// <param name="count"></param>
/// <returns></returns>
public List<RB_Supplies_ApplyforWeekday_Extend> GetPageList(int pageIndex, int pageSize, RB_Supplies_ApplyforWeekday_Extend dmodel, out long count)
{
string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Supplies_ApplyforWeekday_Extend.Status), 0);
where += $@" and RB_Group_Id={dmodel.RB_Group_Id}";
if (dmodel.ApplyforId>=0)
{
where += " and " + nameof(RB_Supplies_ApplyforWeekday_Extend.ApplyforId) + " =" + dmodel.ApplyforId;
}
string sql = $@" select * from RB_Supplies_Applyfor {where} order by Id desc";
return GetPage<RB_Supplies_ApplyforWeekday_Extend>(pageIndex, pageSize, out count, sql).ToList();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Supplies_ApplyforWeekday_Extend> GetList(RB_Supplies_ApplyforWeekday_Extend dmodel)
{
string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Supplies_ApplyforWeekday_Extend.Status), 0);
where += $@" and RB_Group_Id={dmodel.RB_Group_Id}";
if (dmodel.ApplyforId >= 0)
{
where += " and " + nameof(RB_Supplies_ApplyforWeekday_Extend.ApplyforId) + " =" + dmodel.ApplyforId;
}
string sql = $@" select * from RB_Supplies_Applyfor {where} order by Id desc";
return Get<RB_Supplies_ApplyforWeekday_Extend>(sql).ToList();
}
}
}
[*.cs]
# IDE0059: 不需要赋值
csharp_style_unused_value_assignment_preference = discard_variable:none
......@@ -14,7 +14,7 @@ namespace Property.WebApi.Controllers.User
{
public class SuppliesController : PApiController
{
SuppliesModule suppliesModule = new SuppliesModule();
readonly SuppliesModule suppliesModule = new SuppliesModule();
/// <summary>
......@@ -1109,5 +1109,11 @@ namespace Property.WebApi.Controllers.User
}
#region 耗材申请日期
#endregion
}
}
......@@ -14,11 +14,11 @@ namespace Property.WebApi.Controllers.User
public class UserController : PApiController
{
//员工
private EmployeeModule employeeModule = new EmployeeModule();
private readonly EmployeeModule employeeModule = new EmployeeModule();
//公司
private BranchModule branchModule = new BranchModule();
private readonly BranchModule branchModule = new BranchModule();
//部门
private DepartmentModule departmentModule = new DepartmentModule();
private readonly DepartmentModule departmentModule = new DepartmentModule();
/// <summary>
/// 获取公司列表
......@@ -74,8 +74,7 @@ namespace Property.WebApi.Controllers.User
UserInfo userInfo = CacheManager.User.UserReidsCache.GetUserLoginInfo(requestParm.uid);
JObject parms = JObject.Parse(requestParm.msg.ToString());
int BranchId = parms.GetInt("RB_Branch_Id", -1);
List<Module.UserModule.DepartmentModule.DepartmentChooseSell> list = new List<DepartmentModule.DepartmentChooseSell>();
list = departmentModule.GetDepartmentTreeForReceiveQuery(1, userInfo.RB_Group_id, BranchId);
List<Module.UserModule.DepartmentModule.DepartmentChooseSell> list = departmentModule.GetDepartmentTreeForReceiveQuery(1, userInfo.RB_Group_id, BranchId);
//if (!string.IsNullOrEmpty(userInfo.ActionMenuCode) && ("," + userInfo.ActionMenuCode + ",").Contains(",S_CheckAllOrder,"))
//{
// list = departmentModule.GetDepartmentTreeForReceiveQuery(1, userInfo.RB_Group_id, BranchId);
......@@ -103,5 +102,23 @@ namespace Property.WebApi.Controllers.User
return ApiResult.Success("", list);
}
/// <summary>
/// 获取用户登录
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
[HttpPost]
public ApiResult GetUserLoginMenu()
{
var requestParm = GetRequestParm();
UserInfo userInfo = CacheManager.User.UserReidsCache.GetUserLoginInfo(requestParm.uid);
List<RB_Sys_Menu_Extend> resultUserMenuList = employeeModule.GetUserMenuAllList(userInfo.RB_Post_Id, userInfo.EmployeeId, out List<RB_Sys_Menu_Extend> userMenuList);
userInfo.UserMenu = resultUserMenuList;
userInfo.token = requestParm.token;
return ApiResult.Success(data: userInfo);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment