啊鑫
8 天以前 0aa54059b26e6641196e9953490dd18616e916e3
service/Warehouse/MesStrkManager.cs
@@ -1,16 +1,12 @@
using Masuit.Tools;
using MES.Service.Models;
using MES.Service.Modes;
using System.Data;
using System.Data.SqlClient;
using Masuit.Tools;
using NewPdaSqlServer.DB;
using NewPdaSqlServer.Dto.service;
using NewPdaSqlServer.entity;
using NewPdaSqlServer.entity.Base;
using NewPdaSqlServer.util;
using OracleInternal.Sharding;
using SqlSugar;
using SqlSugar.Extensions;
using System.Data;
using System.Data.SqlClient;
namespace NewPdaSqlServer.service.Warehouse;
@@ -39,8 +35,8 @@
    {
        // 关联查询物料表、物料明细表和物料基础信息表
        var mesItemTblDetails = Db
            .Queryable<MesShouTuo, MesShouTuoDetail, MesItems>(
                (a, b, c) => new JoinQueryInfos(
            .Queryable<MesShouTuo, MesShouTuoDetail, MesItems>((a, b, c) =>
                new JoinQueryInfos(
                    JoinType.Left,
                    a.Guid == b.PGuid,
                    JoinType.Left,
@@ -66,7 +62,7 @@
    }
    /// <summary>
    /// 受托入库入库
    ///     受托入库入库
    /// </summary>
    /// <param name="unity"></param>
    /// <returns></returns>
@@ -78,7 +74,8 @@
        using (var conn = new SqlConnection(DbHelperSQL.strConn))
        {
            if (unity.userName.IsNullOrEmpty()) throw new Exception("用户名不允许为空");
            if (unity.sectionCode.IsNullOrEmpty()) throw new Exception("库位编号不允许为空");
            if (unity.sectionCode.IsNullOrEmpty())
                throw new Exception("库位编号不允许为空");
            if (unity.barcode.IsNullOrEmpty()) throw new Exception("条码不允许为空");
            if (unity.billNo.IsNullOrEmpty()) throw new Exception("申请单号不允许为空");
@@ -96,12 +93,11 @@
                        new("@pi_user", unity.userName),
                        new("@pi_barcode", unity.barcode),
                        new("@pi_sectionCode", unity.sectionCode),
                        new("@pi_billno", unity.billNo),
                        new("@pi_billno", unity.billNo)
                    };
                    parameters[0].Direction = ParameterDirection.Output;
                    parameters[1].Direction = ParameterDirection.Output;
                   // parameters[2].Direction = ParameterDirection.Output;
                    // parameters[2].Direction = ParameterDirection.Output;
                    foreach (var parameter in parameters)
                        cmd.Parameters.Add(parameter);
@@ -115,7 +111,6 @@
                    return _strMsg;
                    //return 0;
                }
                catch (Exception ex)
                {