zjh
8 天以前 cf5e996699836cc380b1cb469fea341475eb2b81
StandardPda/MESApplication/Controllers/QC/LljController.cs
@@ -1,12 +1,13 @@
using System.Data;
using System.Dynamic;
using MES.Service.Dto.service;
using MES.Service.Dto.service;
using MES.Service.Modes;
using MES.Service.service.QC;
using MES.Service.util;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Data;
using System.Dynamic;
namespace MESApplication.Controllers.QC;
@@ -207,6 +208,15 @@
        var dt = JsonConvert.DeserializeObject<DataTable>(dataDt);
        try
        {
            if (!dt.Columns.Contains("id"))
            {
                return new ResponseResult
                {
                    status = 1,
                    message = "请先选择数据再保存!",
                    data = "请先选择数据再保存!"
                };
            }
            new LljService().saveYzxBDlist(id, dt);
            var msg = new LljService().YzxImgVerify(id);
@@ -290,12 +300,40 @@
            var tbBillList =
                new LljService().getFromInfo(id);
            resultInfos.tbBillList = tbBillList;
            return new ResponseResult
            if (resultInfos.tbBillList.Rows.Count>0)
            {
                status = 0,
                message = "OK",
                data = resultInfos
            };
                return new ResponseResult
                {
                    status = 0,
                    message = "OK",
                    data = resultInfos
                };
            }
            else
            {
                var mj =
                new LljService().getFromMJCount(id);
                if (mj>0)
                {
                    return new ResponseResult
                    {
                        status = 1,
                        message = "该物料为免检物料,无需检验!",
                        data = resultInfos
                    };
                }
                else
                {
                    return new ResponseResult
                    {
                        status = 1,
                        message = "找不到检验单据,请确认货物是否签收!",
                        data = resultInfos
                    };
                }
            }
        }
        catch (Exception ex)
        {
@@ -580,4 +618,53 @@
            return ResponseResult.ResponseError(ex);
        }
    }
    /// <summary>
    ///     送货单签收并生成到货单
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    [HttpPost("SignDelivery2")]
    public async Task<ResponseResult> SignDelivery2(string id,string c_user)
    {
        try
        {
            //string[] msg = new LljService().SaveSysSubmit(sysSubmit);
            var msg = await new LljService().SignDelivery2(id, c_user);
            return new ResponseResult
            {
                status = int.Parse(msg[0]),
                message = msg[1],
                data = msg[1]
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
    /// <summary>
    ///     获取携客云测试环境签名
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    [HttpGet("getTestXKYSign")]
    public async Task<ResponseResult> getTestXKYSign()
    {
        try
        {
            //string[] msg = new LljService().SaveSysSubmit(sysSubmit);
            var msg = await new LljService().getTestXKYSign();
            return new ResponseResult
            {
                status = int.Parse(msg[0]),
                message = "OK",
                data = msg[1]
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
}