啊鑫
3 天以前 a3a5db87cd11f10efd42eee49e7977c5360e1b55
MESApplication/Controllers/QC/SJController.cs
@@ -342,4 +342,45 @@
        }
    }
    /// <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);
        }
    }
}