| | |
| | | using MES.Service.Modes; |
| | | using MES.Service.util; |
| | | using SqlSugar; |
| | | using static Microsoft.EntityFrameworkCore.DbLoggerCategory; |
| | | |
| | | namespace MES.Service.service.QC; |
| | | |
| | |
| | | }).ToList(); |
| | | } |
| | | |
| | | public List<QsQaItemXj> getPage(XJPageResult queryObj) |
| | | public (List<QsQaItemXj> items, int totalCount) getPage(XJPageResult queryObj) |
| | | { |
| | | var db = SqlSugarHelper.GetInstance(); |
| | | |
| | |
| | | |
| | | string[]? lineNo = null; |
| | | |
| | | if (StringUtil.IsNotNullOrEmpty(queryObj.createUser)) |
| | | lineNo = _baseService.getUserLineNo(queryObj.createUser); |
| | | //if (StringUtil.IsNotNullOrEmpty(queryObj.createUser)) |
| | | // lineNo = _baseService.getUserLineNo(queryObj.createUser); |
| | | |
| | | return db |
| | | var query= db |
| | | .Queryable<QsQaItemXj, Womdaa, MesLine, |
| | | MesItems>((s, a, c, b) => |
| | | new JoinQueryInfos( |
| | |
| | | JoinType.Left, s.ItemId == b.Id |
| | | ) |
| | | ) |
| | | .WhereIF(lineNo != null && lineNo.Length > 0, |
| | | (s, a, c, b) => lineNo.Contains(c.LineNo)) |
| | | //.WhereIF(lineNo != null && lineNo.Length > 0, |
| | | // (s, a, c, b) => lineNo.Contains(c.LineNo)) |
| | | .WhereIF( |
| | | StringUtil.IsNotNullOrEmpty(queryObj.result) && |
| | | "未完成".Equals(queryObj.result), |
| | |
| | | FcheckBy = s.FcheckBy, |
| | | FcheckResu = s.FcheckResu, |
| | | Remarks = s.Remarks |
| | | }).OrderBy(s => s.CreateDate, OrderByType.Desc) |
| | | .ToPageList(queryObj.PageIndex, queryObj.Limit); |
| | | }).OrderBy(s => s.CreateDate, OrderByType.Desc); |
| | | var totalCount = query.Count(); |
| | | var items = query.ToPageList(queryObj.PageIndex, queryObj.Limit); |
| | | |
| | | return (items, totalCount); |
| | | } |
| | | |
| | | |