| | |
| | | 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, |
| | |
| | | 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, |