如洲 陈
2025-09-19 e4a50484f60a8859d5b705dae11f65fc9516bb1e
巡检已提交显示修改
已修改2个文件
61 ■■■■■ 文件已修改
MES.Service/service/QC/XJService.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/Controllers/QC/XJController.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/service/QC/XJService.cs
@@ -136,6 +136,62 @@
            .ToPageList(queryObj.PageIndex, queryObj.Limit);
    }
    //获取所有数据分页(携带总数)
    public (List<QsQaItemXj> data, int totalCount) getPageWithTotal(XJPageResult queryObj)
    {
        var db = SqlSugarHelper.GetInstance();
        var id = Convert.ToDecimal(queryObj.id);
        // 取消产线过滤,显示所有产线的数据
        int totalCount = 0;
        var data = db
            .Queryable<QsQaItemXj, Womdaa, MesLine,
                MesItems>((s, a, c, b) =>
                new JoinQueryInfos(
                    JoinType.Inner, s.BillNo == a.Daa001,
                    JoinType.Left, a.Daa015 == c.LineNo,
                    JoinType.Left, s.ItemId == b.Id
                )
            )
            .WhereIF(
                StringUtil.IsNotNullOrEmpty(queryObj.result) &&
                "未完成".Equals(queryObj.result),
                (s, a, c, b) => s.FcheckResu == null)
            .WhereIF(
                StringUtil.IsNotNullOrEmpty(queryObj.result) &&
                !"未完成".Equals(queryObj.result),
                (s, a, c, b) => s.FcheckResu != null)
            .WhereIF(queryObj.fsubmit.HasValue && queryObj.fsubmit.Value == 1,
                (s, a, c, b) => s.Fsubmit == 1)
            .WhereIF(queryObj.fsubmit.HasValue && queryObj.fsubmit.Value == 0,
                (s, a, c, b) => SqlFunc.IsNull(s.Fsubmit, 0) != 1)
            .WhereIF(id > 0, (s, a, c, b) => s.Id == id)
            .Select((s, a, c, b) => new QsQaItemXj
            {
                Daa020 = c.LineNo,
                Id = s.Id,
                PlanQty = a.Daa008,
                CreateBy = s.CreateBy,
                CreateDate = s.CreateDate,
                ReleaseNo = s.ReleaseNo,
                ItemNo = s.ItemNo,
                BillNo = s.BillNo,
                ItemName = b.ItemName,
                ItemModel = b.ItemModel,
                FcheckBy = s.FcheckBy,
                FcheckResu = s.FcheckResu,
                Remarks = s.Remarks,
                Fsubmit = s.Fsubmit,
                FsubmitBy = s.FsubmitBy,
                FsubmitDate = s.FsubmitDate
            }).OrderBy(s => s.CreateDate, OrderByType.Desc)
            .ToPageList(queryObj.PageIndex, queryObj.Limit, ref totalCount);
        return (data, totalCount);
    }
    public List<QsQaItemXj01> setJYItem(string itemNo)
    {
MESApplication/Controllers/QC/XJController.cs
@@ -217,9 +217,10 @@
        try
        {
            dynamic resultInfos = new ExpandoObject();
            var tbBillList =
                new XJService().getPage(queryObj);
            var (tbBillList, totalCount) =
                new XJService().getPageWithTotal(queryObj);
            resultInfos.tbBillList = tbBillList;
            resultInfos.totalCount = totalCount;
            return new ResponseResult
            {
                status = 0,