This commit is contained in:
李鹏飞 2026-04-03 18:54:02 +08:00
parent aa7f9f9499
commit 15b3c87ac1
2 changed files with 5 additions and 8 deletions

View File

@ -18,12 +18,8 @@ namespace BLL
{ {
get; get;
set; set;
} }
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.SitePerson_PersonInOut> getDataLists = from x in Funs.DB.SitePerson_PersonInOut select x;
/// <summary> /// <summary>
/// 获取分页列表 /// 获取分页列表
@ -37,7 +33,8 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static IEnumerable getListData(string projectId, string unitId, string name, string idCard, string inOutWay, DateTime? startDate, DateTime? endDate, Grid Grid1) public static IEnumerable getListData(string projectId, string unitId, string name, string idCard, string inOutWay, DateTime? startDate, DateTime? endDate, Grid Grid1)
{ {
IQueryable<Model.SitePerson_PersonInOut> getDataList = getDataLists.Where(x => x.ProjectId == projectId && (inOutWay == "0" || x.InOutWay == inOutWay)); IQueryable<Model.SitePerson_PersonInOut> getDataList = from x in Funs.DB.SitePerson_PersonInOut select x;
getDataList = getDataList.Where(x => x.ProjectId == projectId && (inOutWay == "0" || x.InOutWay == inOutWay));
if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null) if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null)
{ {
getDataList = getDataList.Where(e => e.UnitId == unitId); getDataList = getDataList.Where(e => e.UnitId == unitId);

View File

@ -64,7 +64,7 @@ namespace FineUIPro.Web.HSSE.License
/// </summary> /// </summary>
private void BindGrid() private void BindGrid()
{ {
string strSql = "SELECT LicenseManager.LicenseManagerId,LicenseManager.ProjectId,LicenseManager.LicenseTypeId,CodeRecords.Code AS LicenseManagerCode,LicenseManager.LicenseManageName,LicenseManager.UnitId,LicenseManager.LicenseManageContents,LicenseManager.CompileMan,LicenseManager.CompileDate,LicenseManager.States,LicenseManager.ProjectCode,LicenseManager.ProjectName,LicenseManager.LicenseTypeName,LicenseManager.UnitName,LicenseManager.PersonName,LicenseManager.WorkAreaName,LicenseManager.StartDate,LicenseManager.EndDate" string strSql = "SELECT LicenseManager.LicenseManagerId,LicenseManager.ProjectId,LicenseManager.LicenseTypeId,CodeRecords.Code AS LicenseManagerCode,LicenseManager.LicenseManageName,LicenseManager.UnitId,LicenseManager.LicenseManageContents,LicenseManager.CompileMan,LicenseManager.CompileDate,LicenseManager.States,LicenseManager.ProjectCode,LicenseManager.ProjectName,LicenseManager.LicenseTypeName,LicenseManager.UnitName,LicenseManager.UserName,LicenseManager.WorkAreaName,LicenseManager.StartDate,LicenseManager.EndDate"
+ @" ,(CASE WHEN LicenseManager.States = " + BLL.Const.State_0 + " OR LicenseManager.States IS NULL THEN '待['+OperatePerson.PersonName+']提交' WHEN LicenseManager.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperatePerson.PersonName+']办理' END) AS FlowOperateName,LicenseManager.SourceDes" + @" ,(CASE WHEN LicenseManager.States = " + BLL.Const.State_0 + " OR LicenseManager.States IS NULL THEN '待['+OperatePerson.PersonName+']提交' WHEN LicenseManager.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperatePerson.PersonName+']办理' END) AS FlowOperateName,LicenseManager.SourceDes"
+ @" FROM View_License_LicenseManager AS LicenseManager " + @" FROM View_License_LicenseManager AS LicenseManager "
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON LicenseManager.LicenseManagerId=CodeRecords.DataId " + @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON LicenseManager.LicenseManagerId=CodeRecords.DataId "