Ams/AmsService.cs

master
wet 3 years ago
parent 5e67463395
commit ec842cbb91

@ -37,8 +37,13 @@ namespace djy.Service.Ams
{
var result = new TableData();
var user = DbBus.Get(DbList.djydb).Select<User>().Where(w => w.GID == userid).ToOne();
string[] ReportStates = null;
if (req.ReportState!=null) {
ReportStates = req.ReportState.Split(',');
}
var dto = DbBus.Get(DbList.AMSCenter).Select<AMS_Master>().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<AMSDto>();
if (list != null)
@ -277,7 +282,7 @@ namespace djy.Service.Ams
{
try
{
var List = DbBus.Get(DbList.Common).Select<CodeDangerGrade>().WhereIf(strlink != "",x=>x.Code.Contains(strlink) || x.Grade.Contains(strlink)).ToList().Select(x => new CodeDangerGradeDto
var List = DbBus.Get(DbList.Common).Select<CodeDangerGrade>().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<CodePort>().WhereIf(strlink != "", x => x.Code.Contains(strlink) || x.EnName.Contains(strlink)).ToList().Select(x => new CommonCodeValue
var List = DbBus.Get(DbList.Common).Select<CodePort>().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<CodeVessel>().WhereIf(strlink != "", x => x.Name.Contains(strlink)).ToList().Select(x => new CommonCodeValue
var List = DbBus.Get(DbList.Common).Select<CodeVessel>().WhereIf(strlink != "", x => x.Name.Contains(strlink.Trim())).ToList().Select(x => new CommonCodeValue
{
Code = x.Name,
Value = x.Name,

Loading…
Cancel
Save