kyy
2025-10-16 6641af672fc78890f1f36f062337ec6129e86a06
MES.Service/service/QC/MesOqcItemsDetect02Manager.cs
@@ -46,12 +46,14 @@
                !"未完成".Equals(queryObj.result),
                (a, b, c, d, e) => a.FcheckResu != null && a.Fsubmit == 1)
            .WhereIF(id > 0, (a, b, c, d, e) => a.Id == id)
            .WhereIF(StringUtil.IsNotNullOrEmpty(queryObj.createUser),
            .WhereIF(StringUtil.IsNotNullOrEmpty(queryObj.createUser) && queryObj.SearchIndex != null,
                (a, b, c, d, e) => c.Fname.Contains(queryObj.createUser))
            .WhereIF(StringUtil.IsNotNullOrEmpty(queryObj.ItemNo), 
                (a, b, c, d, e) => b.ItemNo.Contains(queryObj.ItemNo))
            .WhereIF(StringUtil.IsNotNullOrEmpty(queryObj.ItemName), 
                (a, b, c, d, e) => b.ItemName.Contains(queryObj.ItemName))
            .WhereIF(StringUtil.IsNotNullOrEmpty(queryObj.ReleaseNo),
                (a, b, c, d, e) => a.ReleaseNo.Contains(queryObj.ReleaseNo))
            .OrderByDescending((a, b, c, d, e) => a.Id)
            .Select((a, b, c, d, e) => new MesOqcItemsDetect02()
            {
@@ -502,6 +504,30 @@
        }
    }
    public bool OqcQagetTable(LLJDto dto)
    {
        try
        {
            // 1. 根据releaseNo查询MesOqcItemsDetect02实体
            var detect02Entity = Db.Queryable<MesOqcItemsDetect02>()
                .Where(s => s.ReleaseNo == dto.releaseNo)
                .First();
            // 2. 校验实体是否存在
            if (detect02Entity == null)
            {
                throw new Exception($"未找到ReleaseNo为{dto.releaseNo}的检验单数据");
            }
            // 3. 调用Regenerate方法(复用现有逻辑)
            Regenerate(detect02Entity);
            return true;
        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }
    public int saveRemarksGid(LLJDto dto)
    {
        return SqlSugarHelper.UseTransactionWithOracle(db =>