| | |
| | | switch (customerGroup.Key) |
| | | { |
| | | case "0": |
| | | if (!UpdateCustomerStatusBatch(db, customerGroup.Value, |
| | | "A")) |
| | | if (!UpdateCustomerStatusBatch(db, customerGroup.Value,"A")) |
| | | throw new NotImplementedException("启用失败"); |
| | | break; |
| | | case "1": |
| | | if (!UpdateCustomerStatusBatch(db, customerGroup.Value, |
| | | "B")) |
| | | if (!UpdateCustomerStatusBatch(db, customerGroup.Value,"B")) |
| | | throw new NotImplementedException("禁用失败"); |
| | | break; |
| | | case "2": |
| | |
| | | |
| | | private MesCustomer GetSysDepartment(ErpCustomer customer) |
| | | { |
| | | |
| | | //ERP傳輸的接口數據轉換為MES數據庫字段 |
| | | |
| | | return new MesCustomer |
| | | { |
| | | Id = Convert.ToDecimal(customer.Id), |
| | | CustNo = customer.FNumber, |
| | | CustSname = customer.FShortName, |
| | | CustName = customer.FName, |
| | | Anred = customer.Fcontact, |
| | | Telf1 = customer.Fmobilephone, |
| | | Fseller = customer.Fseller, |
| | | Anred = customer.FContact, |
| | | Telf1 = customer.FMobilephone, |
| | | Fseller = customer.FSeller, |
| | | Fforbidstatus = customer.FForbidStatus, |
| | | fremarks =customer.Fremarks, |
| | | FSubsidiary =customer.FSubsidiary, |
| | | Fumbrella = customer.Fumbrella, |
| | | CreateDate=DateTime.Now, |
| | | LastupdateDate=DateTime.Now, |
| | | CreateDate = DateTime.Now, |
| | | CreateOrg= Convert.ToDecimal(customer.FCreateOrgId), |
| | | UseOrg= Convert.ToDecimal(customer.FUseOrgId), |
| | | Company = "1000", |
| | | Factory = "1000" |
| | | }; |