啊鑫
3 天以前 a3a5db87cd11f10efd42eee49e7977c5360e1b55
MESApplication/Controllers/QC/SJController.cs
@@ -41,14 +41,14 @@
        try
        {
            dynamic resultInfos = new ExpandoObject();
            var tbBillList =
                new SJService().getPage(queryObj);
            resultInfos.tbBillList = tbBillList;
            var (items, totalCount) = new SJService().getPage(queryObj);
            resultInfos.tbBillList = items;
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
                data = resultInfos,
                TotalCount = totalCount
            };
        }
        catch (Exception ex)
@@ -319,4 +319,68 @@
            return ResponseResult.ResponseError(ex);
        }
    }
    [HttpPost("SJQaSubmit")]
    public ResponseResult SJQaSubmit([FromBody] QsItem item)
    {
        try
        {
            dynamic resultInfos = new ExpandoObject();
            var tbBillList = new SJService();
            var detail021 = tbBillList.SJQaSubmit(item);
            resultInfos.tbBillList = detail021;
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
    /// <summary>
    /// 更新QsItemIpiItem的IsPass值
    /// </summary>
    /// <param name="data">包含id和isPass的JSON对象</param>
    /// <returns>更新结果</returns>
    [HttpPost("UpdateQsItemIpiItemIsPass")]
    public ResponseResult UpdateQsItemIpiItemIsPass([FromBody] JObject data)
    {
        try
        {
            var id = data["id"]?.ToString();
            var isPass = data["isPass"]?.ToString();
            if (string.IsNullOrEmpty(id) || string.IsNullOrEmpty(isPass))
            {
                return new ResponseResult
                {
                    status = 1,
                    message = "参数不能为空",
                    data = null
                };
            }
            dynamic resultInfos = new ExpandoObject();
            var sjService = new SJService();
            var result = sjService.UpdateQsItemIpiItemIsPass(Convert.ToDecimal(id), Convert.ToDecimal(isPass));
            resultInfos.tbBillList = result;
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
}