diff --git a/ams/djy.Service/Ams/AmsService.cs b/ams/djy.Service/Ams/AmsService.cs index 69b3728..b35de24 100644 --- a/ams/djy.Service/Ams/AmsService.cs +++ b/ams/djy.Service/Ams/AmsService.cs @@ -37,8 +37,13 @@ namespace djy.Service.Ams { var result = new TableData(); var user = DbBus.Get(DbList.djydb).Select().Where(w => w.GID == userid).ToOne(); + string[] ReportStates = null; + if (req.ReportState!=null) { + + ReportStates = req.ReportState.Split(','); + } var dto = DbBus.Get(DbList.AMSCenter).Select().Where(x => (x.IsDel == false || x.IsDel == null) && x.CompID == user.CompId) - .WhereIf(req.MBLNO != null, x => x.MBLNO == req.MBLNO).WhereIf(req.ReportState != null, x => x.ReportState == req.ReportState); + .WhereIf(req.MBLNO != null, x => x.MBLNO == req.MBLNO).WhereIf(req.ReportState != null, x =>ReportStates.Contains(x.ReportState)); result.count = dto.ToList().Count(); var list = dto.Page(req.Page, req.Limit).ToList(); if (list != null) @@ -277,7 +282,7 @@ namespace djy.Service.Ams { try { - var List = DbBus.Get(DbList.Common).Select().WhereIf(strlink != "",x=>x.Code.Contains(strlink) || x.Grade.Contains(strlink)).ToList().Select(x => new CodeDangerGradeDto + var List = DbBus.Get(DbList.Common).Select().WhereIf(strlink != "",x=>x.Code.Contains(strlink.Trim()) || x.Grade.Contains(strlink.Trim())).ToList().Select(x => new CodeDangerGradeDto { Code = x.Code, Grade = x.Grade, @@ -295,7 +300,7 @@ namespace djy.Service.Ams { try { - var List = DbBus.Get(DbList.Common).Select().WhereIf(strlink != "", x => x.Code.Contains(strlink) || x.EnName.Contains(strlink)).ToList().Select(x => new CommonCodeValue + var List = DbBus.Get(DbList.Common).Select().WhereIf(strlink != "", x => x.Code.Contains(strlink.Trim()) || x.EnName.Contains(strlink.Trim())).ToList().Select(x => new CommonCodeValue { Code = x.Code, Value = x.EnName, @@ -314,7 +319,7 @@ namespace djy.Service.Ams { try { - var List = DbBus.Get(DbList.Common).Select().WhereIf(strlink != "", x => x.Name.Contains(strlink)).ToList().Select(x => new CommonCodeValue + var List = DbBus.Get(DbList.Common).Select().WhereIf(strlink != "", x => x.Name.Contains(strlink.Trim())).ToList().Select(x => new CommonCodeValue { Code = x.Name, Value = x.Name,