啊鑫
2024-10-29 4f0cb973a7db26a9e65247033a95d9a8b3380d4b
MES.Service/service/BasicData/MesSupplierManager.cs
@@ -123,12 +123,11 @@
            SuppNo = supplier.FNumber,
            SuppSname = supplier.FShortName,
            SuppName = supplier.FName,
            Lxr = supplier.FContact,
            Telf1 = supplier.FTel,
            Lxr = supplier.FTContact,
            Telf1 = supplier.Fmobilephone,
            Fstaffid = supplier.FStaffId,
            Fforbidstatus = supplier.FForbidStatus,
            Type = supplier.Type,
            Remark = supplier.FDescription,
            FSubsidiary = supplier.FUseOrgId,
            Fumbrella = supplier.FCreateOrgId,
            CreateDate = DateTime.Now,
@@ -166,7 +165,8 @@
        List<MesSupplier> supplierList)
    {
        var ids = supplierList.Select(it => it.Id).ToArray();
        var deleteByIds = db.Deleteable<MesSupplier>().In(ids).ExecuteCommand();
        var deleteByIds = db.Deleteable<MesSupplier>()
            .Where(s => ids.Contains(s.Id)).ExecuteCommand();
        if (deleteByIds > 0)
            return true;
@@ -188,10 +188,6 @@
    private bool InsertOrUpdateBatch(SqlSugarScope db,
        List<MesSupplier> supplierList)
    {
        foreach (var entity in supplierList)
            if (!InsertOrUpdate(db, entity))
                return false;
        return true;
        return supplierList.All(entity => InsertOrUpdate(db, entity));
    }
}