啊鑫
2024-08-21 70f330ed92609309b73a3d7f2ad8d8f70c5df316
MES.Service/service/BasicData/MesSupplierManager.cs
@@ -1,4 +1,5 @@
using MES.Service.DB;
using Castle.Core.Resource;
using MES.Service.DB;
using MES.Service.Dto.webApi;
using MES.Service.Modes;
using SqlSugar;
@@ -28,7 +29,7 @@
                        return 1;
                    break;
                case "3":
                    if (DeleteSupplier(db, entity.Id))
                    if (DeleteSupplier(entity.Id))
                        return 1;
                    break;
                case "4":
@@ -108,12 +109,9 @@
        throw new NotImplementedException("插入失败");
    }
    private bool DeleteSupplier(SqlSugarScope db, decimal supplierId)
    private bool DeleteSupplier(decimal supplierId)
    {
        var deleteById = db.Deleteable<MesSupplier>().In(supplierId)
            .ExecuteCommand();
        if (deleteById > 0)
            return true;
        if (base.DeleteById(supplierId)) return true;
        throw new NotImplementedException("删除失败");
    }
@@ -130,6 +128,12 @@
            Telf1 = supplier.F_UNW_LXRDH,
            Fstaffid = supplier.FStaffId,
            Fforbidstatus = supplier.FForbidStatus,
            type= supplier.Type,
            fremarks = supplier.Fremarks,
            FSubsidiary = supplier.Fsubsidiary,
            Fumbrella = supplier.Fumbrella,
            CreateDate = DateTime.Now,
            LastupdateDate = DateTime.Now,
            Company = "1000",
            Factory = "1000"
        };