| | |
| | | }).ToList(); |
| | | } |
| | | |
| | | public List<QsQaItemXj> getPage(XJPageResult queryObj) |
| | | public (List<QsQaItemXj> item, int TotalCount) getPage(XJPageResult queryObj) |
| | | { |
| | | var db = SqlSugarHelper.GetInstance(); |
| | | |
| | | var id = Convert.ToDecimal(queryObj.id); |
| | | |
| | | var totalCount = 0; |
| | | |
| | | string[]? lineNo = null; |
| | | |
| | | // if (StringUtil.IsNotNullOrEmpty(queryObj.createUser)) |
| | | // lineNo = _baseService.getUserLineNo(queryObj.createUser); |
| | | |
| | | return db |
| | | .Queryable<QsQaItemXj, Womdaa, MesLine, |
| | | MesItems>((s, a, c, b) => |
| | | var pageList = db |
| | | .Queryable<QsQaItemXj, Womdaa, |
| | | MesItems>((s, a, b) => |
| | | new JoinQueryInfos( |
| | | JoinType.Inner, s.BillNo == a.Daa001, |
| | | JoinType.Left, a.Daa015 == c.LineNo, |
| | | JoinType.Left, s.ItemId == b.Id |
| | | ) |
| | | ) |
| | | .WhereIF(lineNo != null && lineNo.Length > 0, |
| | | (s, a, c, b) => lineNo.Contains(c.LineNo)) |
| | | |
| | | .WhereIF( |
| | | StringUtil.IsNotNullOrEmpty(queryObj.result) && |
| | | "未完成".Equals(queryObj.result), |
| | | (s, a, c, b) => s.FcheckResu == null) |
| | | (s, a, b) => s.Fsubmit == null || s.Fsubmit == 0) |
| | | // .WhereIF( |
| | | // StringUtil.IsNotNullOrEmpty(queryObj.result) && |
| | | // !"未完成".Equals(queryObj.result), |
| | | // (s, a, b) => s.FcheckResu != null) |
| | | .WhereIF( |
| | | StringUtil.IsNotNullOrEmpty(queryObj.result) && |
| | | !"未完成".Equals(queryObj.result), |
| | | (s, a, c, b) => s.FcheckResu != null) |
| | | .WhereIF(id > 0, (s, a, c, b) => s.Id == id) |
| | | .Select((s, a, c, b) => new QsQaItemXj |
| | | (s, a, b) => s.Fsubmit == 1) |
| | | .WhereIF(id > 0, (s, a, b) => s.Id == id) |
| | | .Select((s, a, b) => new QsQaItemXj |
| | | { |
| | | Daa020 = c.LineNo, |
| | | Id = s.Id, |
| | | PlanQty = a.Daa008, |
| | | CreateBy = s.CreateBy, |
| | |
| | | ItemModel = b.ItemModel, |
| | | FcheckBy = s.FcheckBy, |
| | | FcheckResu = s.FcheckResu, |
| | | Remarks = s.Remarks |
| | | Remarks = s.Remarks, |
| | | Fsubmit = s.Fsubmit, |
| | | FcheckDate = s.FcheckDate, |
| | | FsubmitBy = s.FsubmitBy |
| | | }).OrderBy(s => s.CreateDate, OrderByType.Desc) |
| | | .ToPageList(queryObj.PageIndex, queryObj.Limit); |
| | | .ToPageList(queryObj.PageIndex, queryObj.Limit, ref totalCount); |
| | | |
| | | return (pageList, totalCount); |
| | | } |
| | | |
| | | public bool XJQaSubmit(LLJDto rkjDto) |
| | | { |
| | | var useTransactionWithOracle = |
| | | SqlSugarHelper.UseTransactionWithOracle(db => |
| | | { |
| | | return db.Updateable<QsQaItemXj>() |
| | | .SetColumns(s => s.Fsubmit == 1) |
| | | .SetColumns(s => s.FsubmitBy == rkjDto.userNo) |
| | | .SetColumns(s => s.FsubmitDate == DateTime.Now) |
| | | .Where(s => s.Id == rkjDto.gid) |
| | | .ExecuteCommand(); |
| | | }); |
| | | |
| | | return useTransactionWithOracle > 0; |
| | | } |
| | | |
| | | public List<QsQaItemXj01> setJYItem(string itemNo) |
| | | { |