Commit 4e2522ae by 钟博

多角色导致不能登录问题(全部bug在大屏版已改正)

parent 33bcf556
...@@ -7,43 +7,48 @@ ...@@ -7,43 +7,48 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels namespace Performance.EntityModels
{ {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
[Table("report_performance_category")] [Table("report_performance_category")]
public class report_performance_category public class report_performance_category
{ {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public string Category { get; set; } [Key]
public int Id { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public int HospitalId { get; set; } public int HospitalId { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public string Original { get; set; } public int Year { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public string ItemName { get; set; } public int Month { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public int Year { get; set; } public string Category { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public int Month { get; set; } public string Original { get; set; }
/// <summary>
///
/// </summary>
public string ItemName { get; set; }
} }
} }
...@@ -62,10 +62,10 @@ public List<RoleResponse> GetUsersRole(int userid) ...@@ -62,10 +62,10 @@ public List<RoleResponse> GetUsersRole(int userid)
var ParentUser = _userRepository.GetEntities(c => c.ParentID == userid); var ParentUser = _userRepository.GetEntities(c => c.ParentID == userid);
if (user.ParentID!=null || user.ParentID==0) if (user.ParentID!=null || user.ParentID==0)
{ {
ParentUser=_userRepository.GetEntities(c => c.ID == user.ParentID); ParentUser=_userRepository.GetEntities(c => c.ParentID == user.ParentID);
} }
if (user != null) if (ParentUser != null)
{ {
foreach (var sysUser in ParentUser) foreach (var sysUser in ParentUser)
{ {
......
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