MES.Service/service/BasicData/MesCustomerManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
MES.Service/service/BasicData/MesDepotsManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
MES.Service/service/BasicData/MesItemTypeManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
MES.Service/service/BasicData/MesItemsManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
MES.Service/service/BasicData/MesPositionManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
MES.Service/service/BasicData/MesStaffManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
MES.Service/service/BasicData/MesSupplierManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
MES.Service/service/BasicData/MesUnitManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
MES.Service/service/BasicData/SysDepartmentManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
MES.Service/service/BasicData/MesCustomerManager.cs
@@ -125,10 +125,10 @@ fForbidStatus = "B"; } return new MesCustomer var entity = new MesCustomer { Id = string.IsNullOrEmpty(customer.Id) ? DateTimeOffset.UtcNow.ToUnixTimeSeconds() Id = string.IsNullOrEmpty(customer.Id) ? DateTimeOffset.UtcNow.ToUnixTimeSeconds() : Convert.ToDecimal(customer.Id), CustNo = customer.FNumber, CustSname = customer.FShortName, @@ -150,6 +150,17 @@ DataType = customer.FDocumentStatus, Type = customer.Type, }; var mesCustomer = Db.Queryable<MesCustomer>() .Where(s => s.CustNo == entity.CustNo) .First(); if (mesCustomer != null) { entity.Id = mesCustomer.Id; } return entity; } private bool UpdateCustomerStatusBatch(SqlSugarScope db, MES.Service/service/BasicData/MesDepotsManager.cs
@@ -89,7 +89,7 @@ // 将 ErpDepots 对象转换为 MesDepots 对象的方法 private MesDepots GetMesDepots(ErpDepots depots) { return new MesDepots var entity = new MesDepots { DepotCode = depots.FNumber, DepotName = depots.FName, @@ -114,6 +114,17 @@ Company = "1000", Factory = "1000" }; var mesDepots = Db.Queryable<MesDepots>() .Where(s => s.DepotCode == entity.DepotCode) .First(); if (mesDepots != null) { entity.DepotId = mesDepots.DepotId; } return entity; } // SaveList 方法用于保存多个仓库记录,根据类型批量执行不同的操作 MES.Service/service/BasicData/MesItemTypeManager.cs
@@ -62,7 +62,7 @@ private MesItemType GetMesItemType(ErpItemType department) { return new MesItemType var entity = new MesItemType { Id = string.IsNullOrEmpty(department.Id) ? DateTimeOffset.UtcNow.ToUnixTimeSeconds() @@ -76,6 +76,17 @@ Company = "1000", Factory = "1000" }; var mesItemType = Db.Queryable<MesItemType>() .Where(it => it.Tcode == entity.Tcode) .First(); if (mesItemType != null) { entity.Id = mesItemType.Id; } return entity; } public bool SaveList(List<ErpItemType> departments) MES.Service/service/BasicData/MesItemsManager.cs
@@ -113,7 +113,7 @@ private MesItems GetMesItems(ErpItems item) { return new MesItems var entity = new MesItems { Id = string.IsNullOrEmpty(item.Id) ? DateTimeOffset.UtcNow.ToUnixTimeSeconds() @@ -123,15 +123,26 @@ ItemName = item.FName, ItemModel = item.FSpecification, ItemUnit = item.FBaseUnitId, Lowlimit = !string.IsNullOrEmpty(item.FSafeStock) ? Convert.ToDecimal(item.FSafeStock) : null, Highlimit = !string.IsNullOrEmpty(item.FMaxStock) ? Convert.ToDecimal(item.FMaxStock) : null, PrdPack = !string.IsNullOrEmpty(item.FMinPackCount) ? Convert.ToDecimal(item.FMinPackCount) : null, Lowlimit = !string.IsNullOrEmpty(item.FSafeStock) ? Convert.ToDecimal(item.FSafeStock) : null, Highlimit = !string.IsNullOrEmpty(item.FMaxStock) ? Convert.ToDecimal(item.FMaxStock) : null, PrdPack = !string.IsNullOrEmpty(item.FMinPackCount) ? Convert.ToDecimal(item.FMinPackCount) : null, DepotCode = item.FStockId, Fmaterialgroup = item.FMaterialGroup, Remarks = item.FDescription, Ffinishreceiptoverrate = !string.IsNullOrEmpty(item.FFinishReceiptOverRate) ? Convert.ToInt32(item.FFinishReceiptOverRate) : null, Ffinishreceiptoverrate = !string.IsNullOrEmpty(item.FFinishReceiptOverRate) ? Convert.ToInt32(item.FFinishReceiptOverRate) : null, Fissuetype = item.FIssueType, Fisbatchmanage = !string.IsNullOrEmpty(item.FIsBatchManage) ? Convert.ToInt32(item.FIsBatchManage) : null, Fisbatchmanage = !string.IsNullOrEmpty(item.FIsBatchManage) ? Convert.ToInt32(item.FIsBatchManage) : null, Fpurchaserid = item.FPurchaserId, Fpurchaseunitid = item.FPurchaseUnitId, Storeunit = item.FStoreUnitID, @@ -150,13 +161,27 @@ LossPercent = item.FLOSSPERCENT, MnemonicCode = item.FMnemonicCode, ExpPeriod = item.FExpPeriod, EItemId = !string.IsNullOrEmpty(item.Id) ? long.Parse(item.Id) : null, ItemId = !string.IsNullOrEmpty(item.Id) ? long.Parse(item.Id) : null, EItemId = !string.IsNullOrEmpty(item.Id) ? long.Parse(item.Id) : null, ItemId = !string.IsNullOrEmpty(item.Id) ? long.Parse(item.Id) : null, LastupdateDate = DateTime.Now, CreateDate = DateTime.Now, Company = "1000", Factory = "1000" }; var mesItems = Db.Queryable<MesItems>() .Where(s => s.ItemNo == entity.ItemNo) .First(); if (mesItems != null) { entity.Id = mesItems.Id; } return entity; } private bool UpdateItemStatusBatch(SqlSugarScope db, MES.Service/service/BasicData/MesPositionManager.cs
@@ -1,4 +1,5 @@ using MES.Service.DB; using Masuit.Tools; using MES.Service.DB; using MES.Service.Dto.webApi; using MES.Service.Modes; using SqlSugar; @@ -80,7 +81,7 @@ // 将 ErpPosition 对象转换为 MesPosition 对象的方法 private MesPosition GetMesPosition(ErpPosition position) { return new MesPosition var entity = new MesPosition { Id = string.IsNullOrEmpty(position.Id) ? DateTimeOffset.UtcNow.ToUnixTimeSeconds() @@ -106,6 +107,17 @@ "yyyy-MM-dd HH:mm:ss", null) : null, }; var mesPosition = Db.Queryable<MesPosition>() .Where(s => s.PositionId == entity.PositionId) .First(); if (mesPosition != null) { entity.Id = mesPosition.Id; } return entity; } // SaveList 方法用于保存多个岗位记录,根据类型批量执行不同的操作 MES.Service/service/BasicData/MesStaffManager.cs
@@ -611,6 +611,15 @@ entity.StartDate = DateTime.ParseExact(staff.FStaffStartDate, "yyyy-MM-dd HH:mm:ss", null); } var mesStaff = Db.Queryable<MesStaff>() .Where(s => s.StaffNo == entity.StaffNo) .First(); if (mesStaff != null) { entity.Id = mesStaff.Id; } return entity; } catch (Exception ex) MES.Service/service/BasicData/MesSupplierManager.cs
@@ -114,7 +114,7 @@ private MesSupplier GetMesSupplier(ErpSupplier supplier) { return new MesSupplier var entity = new MesSupplier { Id = string.IsNullOrEmpty(supplier.Id) ? DateTimeOffset.UtcNow.ToUnixTimeSeconds() @@ -139,6 +139,17 @@ Company = "1000", Factory = "1000", }; var mesSupplier = Db.Queryable<MesSupplier>() .Where(s => s.SuppNo == entity.SuppNo) .First(); if (mesSupplier != null) { entity.Id = mesSupplier.Id; } return entity; } private bool UpdateSupplierStatusBatch(SqlSugarScope db, MES.Service/service/BasicData/MesUnitManager.cs
@@ -112,7 +112,6 @@ private MesUnit GetMesUnit(ErpUnit unit) { var fForbidStatus = unit.FForbidStatus; if (unit.FForbidStatus == "0") { @@ -122,8 +121,8 @@ { fForbidStatus = "B"; } return new MesUnit var entity = new MesUnit { Id = string.IsNullOrEmpty(unit.Id) ? DateTimeOffset.UtcNow.ToUnixTimeSeconds() @@ -145,6 +144,17 @@ Factory = "1000", Type = unit.Type }; var mesUnit = Db.Queryable<MesUnit>() .Where(s => s.Fnumber == entity.Fnumber) .First(); if (mesUnit != null) { entity.Id = mesUnit.Id; } return entity; } private bool UpdateUnitStatusBatch(SqlSugarScope db, List<MesUnit> unitList, MES.Service/service/BasicData/SysDepartmentManager.cs
@@ -108,7 +108,7 @@ fForbidStatus = "B"; } return new SysDepartment var entity = new SysDepartment { Departmentcode = department.FNumber, Departmentname = department.FName, @@ -130,6 +130,17 @@ Company = "1000", Factory = "1000" }; var sysDepartment = Db.Queryable<SysDepartment>() .Where(s => s.Departmentcode == entity.Departmentcode) .First(); if (sysDepartment != null) { entity.Id = sysDepartment.Id; } return entity; } // SaveList 方法用于保存多个部门记录,根据类型批量执行不同的操作