| | |
| | | using System.Data; |
| | | using System.Dynamic; |
| | | using MES.Service.DB; |
| | | using MES.Service.Dto.service; |
| | | using MES.Service.Modes; |
| | |
| | | |
| | | public class LljService |
| | | { |
| | | public List<LtsLlj> GetPage(XJPageResult queryObj) |
| | | public (List<LtsLlj> item, int TotalCount) GetPage(XJPageResult queryObj) |
| | | { |
| | | var db = SqlSugarHelper.GetInstance(); |
| | | |
| | | var id = Convert.ToDecimal(queryObj.id); |
| | | |
| | | return db.Queryable<LtsLlj>() |
| | | var totalCount = 0; |
| | | |
| | | var pageList = db.Queryable<LtsLlj>() |
| | | .WhereIF( |
| | | StringUtil.IsNotNullOrEmpty(queryObj.result) && |
| | | "未完成".Equals(queryObj.result), |
| | |
| | | StringUtil.IsNotNullOrEmpty(queryObj.result) && |
| | | !"未完成".Equals(queryObj.result), |
| | | a => a.FcheckResu != null) |
| | | .WhereIF(id > 0, (a) => a.Id == id) |
| | | .OrderByDescending(a=>a.Id) |
| | | .ToPageList(queryObj.PageIndex, queryObj.Limit); |
| | | .WhereIF(id > 0, a => a.Id == id) |
| | | .OrderByDescending(a => a.Id) |
| | | .ToPageList(queryObj.PageIndex, queryObj.Limit, ref totalCount); |
| | | |
| | | return (pageList, totalCount); |
| | | } |
| | | |
| | | //根据检验标准来计算检验个数 |
| | |
| | | // FcheckItemDesc = "0", |
| | | // FcheckResu = "0", |
| | | FcheckTool = b.FcheckTool, |
| | | FspecRequ = b.FspecRequ, |
| | | FspecRequ = b.FspecRequ |
| | | // FtextType = "0", |
| | | // Funit = "0", |
| | | // LastupdateBy = "0", |
| | |
| | | .Where(x1 => x1.MainId == s.Id).Count(); |
| | | |
| | | if (ifck > s.FreQty && s.CheckQyt == count) |
| | | { |
| | | s.FcheckResu = "不合格"; |
| | | } |
| | | else if (ifck < s.FreQty && s.CheckQyt == count) |
| | | { |
| | | s.FcheckResu = "合格"; |
| | | } |
| | | else |
| | | { |
| | | s.FcheckResu = "未完成"; |
| | | } |
| | | |
| | | |
| | | var detail = new MesQaItemsDetectDetail12(); |
| | |
| | | var resultValue = outputResult.Value?.ToString(); |
| | | var messageValue = outputMessage.Value?.ToString(); |
| | | |
| | | if ("1".Equals(resultValue)) |
| | | { |
| | | throw new Exception(messageValue); |
| | | } |
| | | if ("1".Equals(resultValue)) throw new Exception(messageValue); |
| | | |
| | | return true; |
| | | } |