zjh
2025-04-26 f8187896eeafc43457b81f4d08a1f0821bf51f1c
StandardPda/MESApplication/Controllers/QC/LljController.cs
@@ -3,6 +3,7 @@
using MES.Service.service.QC;
using MES.Service.util;
using Microsoft.AspNetCore.Mvc;
using NetTaste;
using Newtonsoft.Json.Linq;
using System.Dynamic;
@@ -45,8 +46,8 @@
        try
        {
            dynamic resultInfos = new ExpandoObject();
            string[] msg= new LljService().SetItems(itemNo, quantity, releaseNo);
            string[] msg = new LljService().SetItems(itemNo, quantity, releaseNo);
            return new ResponseResult
            {
@@ -83,6 +84,35 @@
        }
    }
    [HttpPost("SaveCheckBy")]
    public ResponseResult SaveCheckBy([FromBody] JObject data)
    {
        try
        {
            var NewStaffName = data["NewStaffName"].ToString();
            var userID = data["userID"].ToString();
            var releaseNo = data["releaseNo"].ToString();
            var NewStaffUserID = data["NewStaffUserID"].ToString();
            string[] msg = new LljService().SaveCheckBy(NewStaffUserID, userID, releaseNo);
            return new ResponseResult
            {
                status = int.Parse(msg[0]),
                message = msg[1],
                data = msg[1]
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
    //getItems
    [HttpPost("getJYItem")]
    public ResponseResult getJYItem([FromBody] JObject data)
@@ -108,6 +138,31 @@
            return ResponseResult.ResponseError(ex);
        }
    }
    /// <summary>
    /// 获取所有检验员信息
    /// </summary>
    /// <param name="data"></param>
    /// <returns></returns>
    [HttpPost("getAllInspectors")]
    public ResponseResult getAllInspectors([FromBody] JObject data)
    {
        try
        {
            var tbBillList = new LljService().getAllInspectors();
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = tbBillList
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
    //getXjDetail02ById
    [HttpPost("getXjDetail02ById")]
@@ -133,6 +188,37 @@
            return ResponseResult.ResponseError(ex);
        }
    }
    /// <summary>
    /// 通过条码获取送检单信息
    /// </summary>
    /// <param name="data"></param>
    /// <returns></returns>
    [HttpPost("getFromInfo")]
    public ResponseResult getFromInfo([FromBody] JObject data)
    {
        var id = data["Barcode"]?.ToString();
        try
        {
            dynamic resultInfos = new ExpandoObject();
            var tbBillList =
                new LljService().getFromInfo(id);
            resultInfos.tbBillList = tbBillList;
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
    [HttpPost("SetQSItemDetail")]
@@ -258,14 +344,13 @@
        try
        {
            dynamic resultInfos = new ExpandoObject();
            var tbBillList =
                new LljService().IqcQaSubmit(rkjDto);
            resultInfos.tbBillList = tbBillList;
            var msg = new LljService().IqcQaSubmit(rkjDto);
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
                status = int.Parse(msg[0]),
                message = msg[1],
                data = msg[1]
            };
        }
        catch (Exception ex)
@@ -274,7 +359,11 @@
        }
    }
    //IqcQaSubmit
    /// <summary>
    /// 获取U9图纸数据
    /// </summary>
    /// <param name="data"></param>
    /// <returns></returns>
    [HttpPost("GetFileUrlByU9List")]
    public async Task<ResponseResult> GetFileUrlByU9List([FromBody] JObject data)
    {
@@ -310,4 +399,29 @@
            return ResponseResult.ResponseError(ex);
        }
    }
    /// <summary>
    /// 实验室送检数据保存
    /// </summary>
    /// <param name="sysSubmit">实验室送检数据</param>
    /// <returns></returns>
    [HttpPost("SaveSysSubmit")]
    public ResponseResult SaveSysSubmit(SysSubmit sysSubmit)
    {
        try
        {
            string[] msg = new LljService().SaveSysSubmit(sysSubmit);
            return new ResponseResult
            {
                status = int.Parse(msg[0]),
                message = msg[1],
                data = msg[1]
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
}