啊鑫
2 天以前 00a72fff219241eb5b0405a066cc859d07cf7735
service/Warehouse/MesStrkManager.cs
@@ -1,12 +1,17 @@
using System.Data;
using System.Data.SqlClient;
using Masuit.Tools;
using Masuit.Tools;
using MES.Service.Models;
using MES.Service.Modes;
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;
using DbHelperSQL = NewPdaSqlServer.DB.DbHelperSQL;
namespace NewPdaSqlServer.service.Warehouse;
@@ -35,8 +40,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,
@@ -62,7 +67,7 @@
    }
    /// <summary>
    ///     受托入库入库
    /// 受托入库入库
    /// </summary>
    /// <param name="unity"></param>
    /// <returns></returns>
@@ -74,8 +79,7 @@
        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("申请单号不允许为空");
@@ -93,11 +97,12 @@
                        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);
@@ -111,6 +116,7 @@
                    return _strMsg;
                    //return 0;
                }
                catch (Exception ex)
                {