zyf
2025-04-12 b2be3b6939b4382f9165c78857a072f1aa7b01d0
MES.Service/service/BasicData/MesItemsManager.cs
@@ -1,4 +1,5 @@
using MES.Service.DB;
using MES.Service.Dto.service;
using MES.Service.Dto.webApi;
using MES.Service.Modes;
using SqlSugar;
@@ -7,6 +8,15 @@
public class MesItemsManager : Repository<MesItems>
{
    public MesItems GetItemQcPrint(WarehouseQuery query)
    {
        return Db.Queryable<MesItems>()
            .Where(c => c.Factory == query.Factory
                        && c.Company == query.Company
                        && c.ItemNo == query.ItemNo).First();
    }
    public bool Save(ErpItems item)
    {
        var entity = GetMesItems(item);
@@ -120,6 +130,7 @@
        return new MesItems
        {
            Id = Convert.ToDecimal(item.Id),
            Type = item.Type,
            ItemNo = item.FNumber,
            ItemName = item.FName,
            ItemModel = item.FSpecification,
@@ -135,7 +146,7 @@
            Fissuetype = item.FIssueType,
            Fisbatchmanage = item.FIsBatchManage,
            Fpurchaserid = item.FPurchaserId,
            Fpurchaseunitid = Convert.ToDecimal(item.FPurchaseUnitId),
            Fpurchaseunitid = item.FPurchaseUnitId,
            Storeunit = item.FStoreUnitID,
            Saleunit = item.FSaleUnitId,
            Fforbidstatus = item.FForbidStatus,
@@ -143,8 +154,12 @@
            ProductionWorkshop = item.FWorkShopId,
            ProduceUnit = item.FPRODUCEUNITID,
            SubconUnit = item.FSUBCONUNITID,
            CreateDate = DateTime.Now,
            Company = "1000",
            Factory = "1000"
            Factory = "1000",
            CheckbosSFBZ = item.F_UNW_CheckBox_SFBZ,
            CheckbosSFDB = item.F_UNW_CheckBox_SFDB
        };
    }