xwt
2025-10-30 dabfdd9dbf0364b1134daaad86af7e13f6437295
StandardInterface/MES.Service/service/QC/XJService.cs
@@ -153,10 +153,23 @@
                )
            );
            
        // 添加线体筛选条件
        // 添加线体筛选条件(基于用户权限)
        if (lineNo != null && lineNo.Length > 0)
        {
            query = query.Where((s, a, c, b) => lineNo.Contains(c.LineNo));
        }
        // 添加QC筛选条件:车间和线体
        if (!string.IsNullOrEmpty(queryObj.departmentId))
        {
            // 如果指定了车间,筛选该车间下的线体
            query = query.Where((s, a, c, b) => c.DepotId.ToString() == queryObj.departmentId);
        }
        if (!string.IsNullOrEmpty(queryObj.lineId))
        {
            // 如果指定了线体,直接筛选线体
            query = query.Where((s, a, c, b) => c.LineNo == queryObj.lineId);
        }
        
        // 添加状态筛选条件 - 明确匹配前端传递的值
@@ -287,6 +300,7 @@
        var qsQaItemXj01s = db.Queryable<QsQaItemXj01>()
            .WhereIF(pid > 0, a => a.Pid == pid)
            .WhereIF(id > 0, a => a.Id == id)
            .OrderBy(a => a.Forder ?? 0)
            .ToList();
        var array = qsQaItemXj01s.Select(s => s.Id).ToArray();
@@ -323,8 +337,10 @@
                s.imageData = Convert.ToBase64String(s.Picture);
        });
        //排序,未完成的排在前面
        qsQaItemXj01s = qsQaItemXj01s.OrderBy(s => s.isCheck).ToList();
        //排序:只按FORDER顺序排序
        qsQaItemXj01s = qsQaItemXj01s
            .OrderBy(s => s.Forder ?? 0)
            .ToList();
        return qsQaItemXj01s;
    }