sjz
2 天以前 5de35354e8dfcb4933350d0d1b645d400bcf23ab
MES.Service/service/BasicData/MesSupplierManager.cs
@@ -89,10 +89,10 @@
    private bool InsertSupplier(SqlSugarScope db, MesSupplier entity)
    {
        var exists = db.Queryable<MesSupplier>().Any(e => e.Id == entity.Id);
        var exists = db.Queryable<MesSupplier>().Any(e => e.Id == entity.Id && e.SuppNo == entity.SuppNo);
        if (exists)
        {
            var result = db.Updateable<MesSupplier>().ExecuteCommand();
            var result = db.Updateable(entity).Where(e => e.Id == entity.Id && e.SuppNo == entity.SuppNo).ExecuteCommand();
            return true;
        }
        else
@@ -111,10 +111,10 @@
    private bool InsertOrUpdate(SqlSugarScope db, MesSupplier entity)
    {
        var exists = db.Queryable<MesSupplier>().Any(e => e.Id == entity.Id);
        var exists = db.Queryable<MesSupplier>().Any(e => e.Id == entity.Id && e.SuppNo == entity.SuppNo);
        if (exists)
        {
            var update = db.Updateable(entity).ExecuteCommand();
            var update = db.Updateable(entity).Where(e => e.Id == entity.Id && e.SuppNo == entity.SuppNo).ExecuteCommand();
            return true;
        }
        else
@@ -144,9 +144,9 @@
            Fstaffid = supplier.FStaffId,
            Fforbidstatus = supplier.FForbidStatus,
            CreateDate = DateTime.Now,
            CreateOrg= Convert.ToDecimal(supplier.FCreateOrgId),
            UseOrg= Convert.ToDecimal(supplier.FUseOrgId),
            Remark=supplier.FDescription,
            CreateOrg = Convert.ToDecimal(supplier.FCreateOrgId),
            UseOrg = Convert.ToDecimal(supplier.FUseOrgId),
            Remark = supplier.FDescription,
            Company = "1000",
            Factory = "1000"
        };