11
啊鑫
2024-12-12 f9190154ed17006dca9c44bb28c38cbc0fe9ee27
11
已修改9个文件
91 ■■■■■ 文件已修改
Controllers/QC/LljController.cs 补丁 | 查看 | 原始文档 | blame | 历史
entity/MesInvItemStocks.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
entity/MesSysPageview.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
entity/MessageCenter.cs 补丁 | 查看 | 原始文档 | blame | 历史
service/QC/LljService.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/Warehouse/MesInvItemInCDetailsManager.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/Warehouse/MesInvItemOutsManager.cs 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/base/LoginService.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/base/MessageCenterManager.cs 补丁 | 查看 | 原始文档 | blame | 历史
Controllers/QC/LljController.cs
entity/MesInvItemStocks.cs
@@ -210,5 +210,14 @@
    [SugarColumn(ColumnName = "ITEM_ID")]
    public long? ItemId { get; set; }
    [SugarColumn(ColumnName = "SUPP_ID")] public string? SuppId { get; set; }
    /// <summary>
    /// </summary>
    [SugarColumn(ColumnName = "SUPP_ID")]
    public string? SuppId { get; set; }
    /// <summary>
    ///     仓库ID
    /// </summary>
    [SugarColumn(ColumnName = "DEPOT_ID")]
    public int? DepotId { get; set; }
}
entity/MesSysPageview.cs
@@ -34,19 +34,16 @@
    public string Icoimg { get; set; }
    /// <summary>
    ///
    ///</summary>
    [SugarColumn(ColumnName = "PAGE_GROUP")]
    public string PageGroup { get; set; }
    /// <summary>
    ///
    ///</summary>
    [SugarColumn(ColumnName = "PAGE_IDX")]
    public int? PageIdx { get; set; }
    /// <summary>
    ///
    ///</summary>
    [SugarColumn(ColumnName = "PAGE_STATUS")]
    public bool? PageStatus { get; set; }
entity/MessageCenter.cs
service/QC/LljService.cs
@@ -451,9 +451,7 @@
            if (qsItemOqcItem.FupAllow.IsNullOrEmpty()
                && qsItemOqcItem.FdownAllow.IsNullOrEmpty()
                && qsItemOqcItem.Fstand == null)
            {
                mesQaItemsDetectDetail12.isNumber = false;
            }
        }
        return rkjDto;
service/Warehouse/MesInvItemInCDetailsManager.cs
@@ -558,7 +558,8 @@
                EbelnK3id = itemBarcodeDetails.EbelnK3id,
                LineK3id = itemBarcodeDetails.LineK3id,
                ItemId = itemBarcodeDetails.ItemId,
                BillNo = itemBarcodeDetails.BillNo
                BillNo = itemBarcodeDetails.BillNo,
                DepotId = Convert.ToInt32(depotCode2)
            }).IgnoreColumns(true).ExecuteCommand();
            itemBarcodeDetails.Hbdy ??= 0;
service/Warehouse/MesInvItemOutsManager.cs
@@ -340,9 +340,7 @@
        }
        if (!UtilityHelper.CheckGuid(parsedGuid))
        {
            throw new ApplicationException("更新错误,数据是不合法的");
        }
        var userName = entity.userName ?? "system";
        return Db.Updateable<MesInvItemOuts>()
@@ -382,10 +380,7 @@
        message.Pid = newGuid;
        var executeReturnIdentity =
            Db.Insertable(message).IgnoreColumns(true).ExecuteCommand();
        if (executeReturnIdentity > 0)
        {
            return message;
        }
        if (executeReturnIdentity > 0) return message;
        throw new Exception("获取数据失败");
    }
@@ -528,7 +523,7 @@
                FUnitID = d.Fnumber,
                FLot = b.WorkNo,
                F_MES_ENTRYID = b.Guid,
                FsrcEntryId = e.Guid.ToString(),
                FsrcEntryId = e.Guid.ToString()
            }).ToList();
@@ -537,13 +532,13 @@
        var jsonEntries = materials.Select(d => new
        {
            FMaterialId = d.FMaterialId,
            FRMREALQTY = d.FRMREALQTY,
            FStockId = d.FStockId,
            FUnitID = d.FUnitID,
            FLot = d.FLot,
            d.FMaterialId,
            d.FRMREALQTY,
            d.FStockId,
            d.FUnitID,
            d.FLot,
            F_MES_ENTRYID = d.F_MES_ENTRYID.ToString(),
            FsrcEntryId = d.FsrcEntryId,
            d.FsrcEntryId
        }).ToList();
        var fdate = DateTime.Now.ToString("yyyy-MM-dd");
        var jsonString = JsonConvert.SerializeObject(jsonEntries);
@@ -642,10 +637,7 @@
        //调用存储过程 
        var prcRfPdaBarcodeCgth = PrcRfPdaBarcodeCgth(query);
        if (!prcRfPdaBarcodeCgth)
        {
            throw new Exception("执行失败");
        }
        if (!prcRfPdaBarcodeCgth) throw new Exception("执行失败");
        // 变量用于保存查询结果
        decimal? C_SQ_QTY = 0;
@@ -687,10 +679,7 @@
        var commit = UseTransaction(db =>
        {
            if (string.IsNullOrEmpty(p_bill_no))
            {
                throw new Exception("请选取单据号!");
            }
            if (string.IsNullOrEmpty(p_bill_no)) throw new Exception("请选取单据号!");
            // Retrieve mes_inv_item_outs
            var c_mes_inv_item_outs = db.Queryable<MesInvItemOuts>()
@@ -698,19 +687,13 @@
                .First();
            if (c_mes_inv_item_outs == null)
            {
                throw new Exception("请选择或扫描正确的采购退货单!");
            }
            if (c_mes_inv_item_outs.Status == 0)
            {
                throw new Exception("采购退货申请单未审核!");
            }
            if (c_mes_inv_item_outs.Nflag == 1)
            {
                throw new Exception("采购退货单已完结推送ERP,不能操作!");
            }
            // Check for duplicate barcode scan
            c_num = db.Queryable<MesInvItemOutCDetails>()
@@ -719,10 +702,7 @@
                    b.ItemOutId == c_mes_inv_item_outs.Guid)
                .Count();
            if (c_num > 0)
            {
                throw new Exception("此条码已采购退货扫码完成!");
            }
            if (c_num > 0) throw new Exception("此条码已采购退货扫码完成!");
            // Query item stock info
            var c_mes_inv_item_stocks = db.Queryable<MesInvItemStocks>()
@@ -730,17 +710,13 @@
                .First();
            if (c_mes_inv_item_stocks == null)
            {
                throw new Exception($"库存中无此条码,请核对!{p_item_barcode}");
            }
            // Validate depot codes
            if (c_mes_inv_item_outs.DepotCode !=
                c_mes_inv_item_stocks.DepotsCode)
            {
                throw new Exception(
                    $"此条码属于仓库 {c_mes_inv_item_stocks.DepotsCode} 与采购退货申请仓库 {c_mes_inv_item_outs.DepotCode} 不一致,请核对!");
            }
            C_STOCKNUM = c_mes_inv_item_stocks.Quantity.Value;
@@ -748,7 +724,7 @@
            var quantities = db.Queryable<MesInvItemOutItems, MesInvItemOuts>(
                    (s, d) => new object[]
                    {
                        JoinType.Left, s.ItemOutId == d.Guid,
                        JoinType.Left, s.ItemOutId == d.Guid
                    })
                .Where((s, d) =>
                    d.ItemOutNo == p_bill_no &&
@@ -763,9 +739,7 @@
                .First();
            if (quantities == null)
            {
                throw new Exception("采购退料单 '" + p_bill_no + "'未审核");
            }
            C_SQTY = quantities.TotalQuantity ?? 0;
            C_OKQTY = quantities.CompletedQuantity ?? 0;
@@ -774,7 +748,7 @@
            if (C_CQTY < C_STOCKNUM) return 1;
            // Handle barcode reduction
            decimal p_number2 = C_STOCKNUM;
            var p_number2 = C_STOCKNUM;
            var itemOutItems = db.Queryable<MesInvItemOutItems>()
                .Where(s =>
                    s.ItemOutId == c_mes_inv_item_outs.Guid &&
@@ -799,9 +773,7 @@
                    .First();
                if (c_mes_inv_item_arn_detail == null)
                {
                    throw new Exception("未找到采购退料来源单据");
                }
                if (CMI.Quantity - CMI.TlQty <= p_number2)
                {
@@ -862,15 +834,13 @@
                        TaskNo = CMI.WorkNo,
                        ItemId = c_mes_inv_item_stocks.ItemId,
                        EbelnK3id = c_mes_inv_item_stocks.EbelnK3id,
                        LineK3id = c_mes_inv_item_stocks.LineK3id,
                        LineK3id = c_mes_inv_item_stocks.LineK3id
                    }).IgnoreColumns(true).ExecuteCommand();
                    if (p_number2 == 0)
                    {
                        db.Deleteable<MesInvItemStocks>()
                            .Where(s => s.Guid == c_mes_inv_item_outs.Guid)
                            .ExecuteCommand();
                    }
                }
                else
                {
@@ -935,16 +905,13 @@
                        SuppId = c_mes_inv_item_outs.SuppId.ToString(),
                        ItemId = c_mes_inv_item_stocks.ItemId,
                        EbelnK3id = c_mes_inv_item_stocks.EbelnK3id,
                        LineK3id = c_mes_inv_item_stocks.LineK3id,
                        LineK3id = c_mes_inv_item_stocks.LineK3id
                    }).IgnoreColumns(true).ExecuteCommand();
                    p_number2 = 0;
                }
            }
            if (p_number2 > 0)
            {
                throw new Exception("物料数量将超采购退料申请单数量,无法出库");
            }
            if (p_number2 > 0) throw new Exception("物料数量将超采购退料申请单数量,无法出库");
            return 1;
        });
service/base/LoginService.cs
@@ -36,7 +36,8 @@
        if ("admin".Equals(name))
        {
            var groupedPageViews = pageViewList  
                .GroupBy(p => string.IsNullOrEmpty(p.PageGroup) ? "未分组" : p.PageGroup)
                .GroupBy(p =>
                    string.IsNullOrEmpty(p.PageGroup) ? "未分组" : p.PageGroup)
                .ToList();
            
            foreach (var group in groupedPageViews)  
@@ -46,8 +47,7 @@
                groupObj.child = new List<MesSysPageview>();  
                foreach (var pageView in group)  
                {
                    groupObj.child.Add(new MesSysPageview()
                    groupObj.child.Add(new MesSysPageview
                    {  
                        Guid = pageView.Guid,  
                        PageView = pageView.PageView,  
@@ -57,7 +57,6 @@
                        PageIdx = pageView.PageIdx,  
                        PageStatus = pageView.PageStatus  
                    });  
                }
                result.Add(groupObj);  
            }  
service/base/MessageCenterManager.cs