diff --git a/Src/Dlhis.Basic/Organization/Controllers/WerksController.cs b/Src/Dlhis.Basic/Organization/Controllers/WerksController.cs
index 815977fa..1c9cc3e2 100644
--- a/Src/Dlhis.Basic/Organization/Controllers/WerksController.cs
+++ b/Src/Dlhis.Basic/Organization/Controllers/WerksController.cs
@@ -11,6 +11,7 @@ namespace Dlhis.Basic.Organization.Controllers;
[Authorize]
[Route("api/[controller]")]
[ApiController]
+[Obsolete]
public class WerksController : ControllerBase
{
private readonly IWerkService _werkService;
diff --git a/Src/Dlhis.Basic/Organization/Response/GainfoCurrentResponse.cs b/Src/Dlhis.Basic/Organization/Response/GainfoCurrentResponse.cs
index 774a39bc..607133fe 100644
--- a/Src/Dlhis.Basic/Organization/Response/GainfoCurrentResponse.cs
+++ b/Src/Dlhis.Basic/Organization/Response/GainfoCurrentResponse.cs
@@ -45,6 +45,11 @@ public class GainfoCurrentResponse
///
public DateTime Birthday { get; set; }
+ ///
+ /// 厂区
+ ///
+ public string Factory { get; set; }
+
///
/// 就餐信息
///
diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs
index edb11c45..e7c95bc4 100644
--- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs
+++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs
@@ -203,6 +203,7 @@ public class GainfoService : IGainfoService
Gender = ga.Gender,
UserCode = ga.Code,
UserName = ga.Name,
+ Factory = ga.Factory,
MealInfo = new GainfoCurrentMealInfoResponse
{
Balance = mealUser.Balance
@@ -210,6 +211,12 @@ public class GainfoService : IGainfoService
})
.FirstAsync();
+ if (info != null)
+ {
+ var tenantResult = await _tenantApi.GetTenantByCodeAsync(info.Factory);
+ info.Factory = tenantResult.Data.Name;
+ }
+
return info;
}
diff --git a/Src/Dlhis.Common/EnumSetting/EnumsController.cs b/Src/Dlhis.Common/EnumSetting/EnumsController.cs
index f76610bf..cc940da5 100644
--- a/Src/Dlhis.Common/EnumSetting/EnumsController.cs
+++ b/Src/Dlhis.Common/EnumSetting/EnumsController.cs
@@ -51,7 +51,9 @@ public class EnumsController : ControllerBase
Key = fd,
Value = (int)item.GetValue(null)
};
- }).ToList()
+ })
+ .OrderBy(x => x.Value)
+ .ToList()
};
})
.ToList();
@@ -66,9 +68,10 @@ public class EnumsController : ControllerBase
Name = type,
Data = g.AsEnumerable().Select(x => new KeyValueDto
{
- Key = x.Code,
- Value = x.Display
+ Key = x.Display,
+ Value = x.Code
})
+ .OrderBy(x => x.Value)
.ToList()
};
});
@@ -97,6 +100,7 @@ public class EnumsController : ControllerBase
Value = (int)item.GetValue(null)
};
})
+ .OrderBy(x => x.Value)
.ToList()
};
}