xwt
2025-09-17 a65e9ae75629e1d87d6f373f9bdcfac32ccf1fea
MESApplication/Controllers/QC/SJController.cs
@@ -41,14 +41,15 @@
        try
        {
            dynamic resultInfos = new ExpandoObject();
            var tbBillList =
                new SJService().getPage(queryObj);
            var service = new SJService();
            var (tbBillList, totalCount) = service.getPageWithTotal(queryObj);
            resultInfos.tbBillList = tbBillList;
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
                data = resultInfos,
                TotalCount = totalCount
            };
        }
        catch (Exception ex)
@@ -319,4 +320,52 @@
            return ResponseResult.ResponseError(ex);
        }
    }
    [HttpPost("SJQaSubmit")]
    public ResponseResult SJQaSubmit([FromBody] JObject data)
    {
        var userNo = data["userNo"]?.ToString();
        var id = Convert.ToDecimal(data["id"]?.ToString());
        try
        {
            dynamic resultInfos = new ExpandoObject();
            var tbBillList = new SJService().SJQaSubmit(userNo, id);
            resultInfos.tbBillList = tbBillList;
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
    [HttpPost("GenUpdateSJ")]
    public ResponseResult GenUpdateSJ([FromBody] JObject data)
    {
        var id = Convert.ToDecimal(data["id"]?.ToString());
        var no = data["no"]?.ToString();
        var userNo = data["userNo"]?.ToString();
        try
        {
            dynamic resultInfos = new ExpandoObject();
            var service = new SJService();
            var (code, msg) = service.GenUpdateSJ(id, no, userNo);
            resultInfos.tbBillList = new { result = code, message = msg };
            return new ResponseResult
            {
                status = code,
                message = msg,
                data = resultInfos
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
}