| | |
| | | |
| | | private MesSupplier GetMesSupplier(ErpSupplier supplier) |
| | | { |
| | | return new MesSupplier |
| | | var entity = new MesSupplier |
| | | { |
| | | Id = Convert.ToDecimal(supplier.Id), |
| | | Id = string.IsNullOrEmpty(supplier.Id) |
| | | ? DateTimeOffset.UtcNow.ToUnixTimeSeconds() |
| | | : Convert.ToDecimal(supplier.Id), |
| | | Type = supplier.Type, |
| | | SuppNo = supplier.FNumber, |
| | | SuppSname = supplier.FShortName, |
| | |
| | | Lxr = supplier.FTContact, |
| | | Telf1 = supplier.Fmobilephone, |
| | | Fstaffid = supplier.FStaffId, |
| | | FDocumentStatus = supplier.FDocumentStatus, |
| | | Fforbidstatus = supplier.FForbidStatus, |
| | | FSubsidiary = supplier.FUseOrgId, |
| | | Fumbrella = supplier.FCreateOrgId, |
| | | FSubsidiary = string.IsNullOrEmpty(supplier.FUseOrgId) |
| | | ? "1" |
| | | : supplier.FUseOrgId, |
| | | Fumbrella = string.IsNullOrEmpty(supplier.FCreateOrgId) |
| | | ? "1" |
| | | : supplier.FCreateOrgId, |
| | | Remark = supplier.Remark, |
| | | CreateDate = DateTime.Now, |
| | | LastupdateDate = DateTime.Now, |
| | | 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, |