南骏 池
2025-03-19 82b020497a6e4570a61acf262712bacb757239f3
service/QC/LljService.cs
@@ -23,16 +23,26 @@
        var totalCount = 0;
        var pageList = Db.Queryable<LLJView>()
            .WhereIF(
                StringUtil.IsNotNullOrEmpty(queryObj.result) &&
                "未完成".Equals(queryObj.result),
                a => (a.FcheckResu ?? "") == "")
            .WhereIF(
                StringUtil.IsNotNullOrEmpty(queryObj.result) &&
                !"未完成".Equals(queryObj.result),
                a => (a.FcheckResu ?? "") != "")
            //.WhereIF(
            //    StringUtil.IsNotNullOrEmpty(queryObj.result) &&
            //    "未完成".Equals(queryObj.result),
            //    a => (a.STATUS ?? "") != "已提交")
            //    //a => (a.FcheckResu ?? "") == ""|| (a.FcheckResu ?? "") == "检验中")
            //.WhereIF(
            //    StringUtil.IsNotNullOrEmpty(queryObj.result) &&
            //    !"未完成".Equals(queryObj.result),
            //    a => (a.STATUS ?? "") == "已提交")
            .WhereIF(!string.IsNullOrWhiteSpace(queryObj.keyword), a =>
                a.ItemNo.Contains(queryObj.keyword) ||
                a.ItemName.Contains(queryObj.keyword) ||
                a.LotNo.Contains(queryObj.keyword) ||
                a.ReleaseNo.Contains(queryObj.keyword) ||
                a.SuppName.Contains(queryObj.keyword)
            )
            .WhereIF(UtilityHelper.CheckGuid(parsedGuid),
                a => a.guid == parsedGuid)
                a => a.guid == parsedGuid )
            .Where(a => (a.fsubmit ?? 0) == 0)
            .OrderByDescending(a => a.CreateDate)
            .ToPageList(queryObj.PageIndex, queryObj.Limit, ref totalCount);
@@ -253,6 +263,7 @@
                var item = new MesQaItemsDetectDetail12();
                item.ParentGuid = detail.ParentGuid;
                item.GrandpaGuid = detail.GrandpaGuid;
                item.FcheckItem = detail.FcheckItem;
                item.Fstand = detail.Fstand;
                item.FcheckResu = detail.FcheckResu;
                item.CreateBy = detail.LastupdateBy;
@@ -260,7 +271,7 @@
                result.Add(item);
            }
            return db.Insertable(result).IgnoreColumns(true).ExecuteCommand();
            return db.Insertable(result).PageSize(1).IgnoreColumnsNull().ExecuteCommand();
        });
        detail.CreateBy = detail.LastupdateBy;
@@ -312,6 +323,7 @@
                commit += db.Updateable<MesQaItemsDetectDetail5>()
                    .SetColumns(s => s.FcheckResu == result)
                    .SetColumns(s => s.FenterQty == count)
                    .SetColumns(s => s.FngRate == (s.CheckQyt == 0 ? (decimal?)null : (decimal?)(Convert.ToDouble(noCount) / Convert.ToDouble(count))))
                    .Where(s => s.Guid == detail.ParentGuid)
                    .ExecuteCommand();
@@ -577,7 +589,7 @@
            throw new Exception("该检验单已提交");
        if (mesQaItemsDetect01.FcheckDate == null)
            throw new Exception("该检测单未输入检验日期,请核对。");
            throw new Exception("该检测单没有检验完成,请核对。");
        if (mesQaItemsDetect01.FcheckBy.IsNullOrEmpty())
            throw new Exception("该检测单未输入检验人员,请核对。");