11
啊鑫
2024-12-23 06287f58cd161d8daa0942a950ca62aa2e10c30f
service/Warehouse/WomdaaManager.cs
@@ -32,23 +32,13 @@
    public ProductionPickDto ScanCode(WarehouseQuery query)
    {
        string _strMsg = "";
        string _intSum = "";
        var _strMsg = "";
        var _intSum = "";
        using (var conn = new SqlConnection(DbHelperSQL.strConn))
        {
            if (query.userName.IsNullOrEmpty())
            {
                throw new Exception("用户名不允许为空");
            }
            if (query.daa001.IsNullOrEmpty())
            {
                throw new Exception("领料单号不允许为空");
            }
            if (query.barcode.IsNullOrEmpty())
            {
                throw new Exception("条码不允许为空");
            }
            if (query.userName.IsNullOrEmpty()) throw new Exception("用户名不允许为空");
            if (query.daa001.IsNullOrEmpty()) throw new Exception("领料单号不允许为空");
            if (query.barcode.IsNullOrEmpty()) throw new Exception("条码不允许为空");
                
            using (var cmd =new SqlCommand("[prc_pda_SCLL]", conn))
            {
@@ -80,10 +70,7 @@
                    var splitNum = parameters[3].Value.ToString();
                    var result = Convert.ToInt32(_intSum);
                    if (result <= 0)
                    {
                        throw new Exception(_strMsg);
                    }
                    if (result <= 0) throw new Exception(_strMsg);
                    
                    var dto = new ProductionPickDto
                    {
@@ -94,7 +81,6 @@
                    };
                    return dto;
                }
                catch (Exception ex)
                {
@@ -111,27 +97,14 @@
    //prC_pda_SCLL_CF
    public ProductionPickDto ScanCodeCF(WarehouseQuery query)
    {
        if (query.userName.IsNullOrEmpty()) throw new Exception("用户名不允许为空");
        if (query.daa001.IsNullOrEmpty()) throw new Exception("领料单号不允许为空");
        if (query.barcode.IsNullOrEmpty()) throw new Exception("条码不允许为空");
        
        if (query.userName.IsNullOrEmpty())
        {
            throw new Exception("用户名不允许为空");
        }
        if (query.daa001.IsNullOrEmpty())
        {
            throw new Exception("领料单号不允许为空");
        }
        if (query.barcode.IsNullOrEmpty())
        {
            throw new Exception("条码不允许为空");
        }
        if (query.Num is null or 0) throw new Exception("条码拆分数不允许为空或者为0");
        
        if (query.Num is null or 0)
        {
            throw new Exception("条码拆分数不允许为空或者为0");
        }
        string _strMsg = "";
        string _intSum = "";
        var _strMsg = "";
        var _intSum = "";
        using (var conn = new SqlConnection(DbHelperSQL.strConn))
        {
            using (var cmd =new SqlCommand("[prc_pda_SCLL_CF]", conn))
@@ -147,7 +120,7 @@
                        new("@c_User", query.userName),
                        new("@p_biLL_no", query.daa001),
                        new("@p_item_barcode", query.barcode),
                        new("@num", query.Num),
                        new("@num", query.Num)
                    };
                    parameters[0].Direction = ParameterDirection.Output;
                    parameters[1].Direction = ParameterDirection.Output;
@@ -159,10 +132,7 @@
                    
                    var result = Convert.ToInt32(_intSum);
                    if (result <= 0)
                    {
                        throw new Exception(_strMsg);
                    }
                    if (result <= 0) throw new Exception(_strMsg);
                    
                    var dto = new ProductionPickDto
                    {
@@ -171,7 +141,6 @@
                    };
                    return dto;
                }
                catch (Exception ex)
                {
@@ -242,11 +211,12 @@
                DepotId = a.DepotId,
                WorkNo = a.WorkNo,
                DepotName = c.DepotName,
                Quantity = a.Quantity,
                Quantity = a.Quantity
            })
            .ToList();
        var womcaa = Db.Queryable<Womcaa>().Where(s=>s.Guid == womdaa.CaaGuid).First();
        var womcaa = Db.Queryable<Womcaa>().Where(s => s.Guid == womdaa.CaaGuid)
            .First();
        var dto = new ProductionPickDto
        {