| | |
| | | statusArray.Contains(a.Daa018)) |
| | | .GroupBy((a, b) => new |
| | | { |
| | | b.LineNo, b.LineName |
| | | b.LineNo, |
| | | b.LineName |
| | | }) |
| | | .Select((a, b) => new MesLine |
| | | { |
| | |
| | | }).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); |
| | | // 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) |
| | | { |
| | |
| | | return db |
| | | .Queryable<MesQualityStandard>() |
| | | .Where(b => b.QsType == "2" |
| | | && b.ItemNo == itemNo).Select( |
| | | b => new QsQaItemXj01 |
| | | { |
| | | ProjName = b.ProjName, |
| | | ItemMod = b.ItemMod, |
| | | InspectionMethod = b.InspectionMethod, |
| | | UsingInstruments = b.UsingInstruments, |
| | | LevelNum = SqlFunc.IsNull( |
| | | SqlFunc.IsNull(b.LevelNum * b.InspectionLevel, 1), |
| | | b.InspectionLevel), |
| | | MaxValue = b.MaxValue, |
| | | StandardValue = b.StandardValue, |
| | | MinValue = b.MinValue, |
| | | Notes = b.Notes, |
| | | FcheckLevel = b.FcheckLevel, |
| | | FacLevel = b.FacLevel, |
| | | QsCode = b.QsCode, |
| | | QsName = b.QsName, |
| | | result = "未检测", |
| | | isCheck = 0, |
| | | Picture = b.Picture, |
| | | Picturename = b.Picturename |
| | | }).ToList(); |
| | | && b.ItemNo == itemNo).Select(b => new QsQaItemXj01 |
| | | { |
| | | ProjName = b.ProjName, |
| | | ItemMod = b.ItemMod, |
| | | InspectionMethod = b.InspectionMethod, |
| | | UsingInstruments = b.UsingInstruments, |
| | | LevelNum = SqlFunc.IsNull( |
| | | SqlFunc.IsNull(b.LevelNum * b.InspectionLevel, 1), |
| | | b.InspectionLevel), |
| | | MaxValue = b.MaxValue, |
| | | StandardValue = b.StandardValue, |
| | | MinValue = b.MinValue, |
| | | Notes = b.Notes, |
| | | FcheckLevel = b.FcheckLevel, |
| | | FacLevel = b.FacLevel, |
| | | QsCode = b.QsCode, |
| | | QsName = b.QsName, |
| | | result = "未检测", |
| | | isCheck = 0, |
| | | Picture = b.Picture, |
| | | Picturename = b.Picturename |
| | | }).ToList(); |
| | | } |
| | | |
| | | public List<QsQaItemXj01> getJYItem(decimal? pid, decimal? id) |
| | |
| | | |
| | | if (count == passCount) result = 1; |
| | | |
| | | var useTransactionWithOracle = SqlSugarHelper.UseTransactionWithOracle( |
| | | db => |
| | | var useTransactionWithOracle = |
| | | SqlSugarHelper.UseTransactionWithOracle(db => |
| | | { |
| | | var commit = 0; |
| | | commit += db.Updateable<QsQaItemXj01>() |