| | |
| | | using MES.Service.DB; |
| | | using Masuit.Tools; |
| | | using MES.Service.DB; |
| | | using MES.Service.Dto.webApi; |
| | | using MES.Service.Modes; |
| | | using SqlSugar; |
| | |
| | | Lxr = supplier.FTContact, |
| | | Telf1 = supplier.Fmobilephone, |
| | | Fstaffid = supplier.FStaffId, |
| | | Fforbidstatus = supplier.FForbidStatus, |
| | | FSubsidiary = string.IsNullOrEmpty(supplier.FUseOrgId) |
| | | ? "1" |
| | | : supplier.FUseOrgId, |
| | | Fumbrella = string.IsNullOrEmpty(supplier.FCreateOrgId) |
| | | ? "1" |
| | | : supplier.FCreateOrgId, |
| | | // FSubsidiary = string.IsNullOrEmpty(supplier.FUseOrgId) |
| | | // ? "1" |
| | | // : supplier.FUseOrgId, |
| | | // Fumbrella = string.IsNullOrEmpty(supplier.FCreateOrgId) |
| | | // ? "1" |
| | | // : supplier.FCreateOrgId, |
| | | FSubsidiary = "1", |
| | | Fumbrella = "1", |
| | | Remark = supplier.Remark, |
| | | CreateDate = DateTime.Now, |
| | | LastupdateDate = DateTime.Now, |
| | |
| | | Factory = "1000", |
| | | }; |
| | | |
| | | //Fforbidstatus = supplier.FForbidStatus, |
| | | if (supplier.FForbidStatus.IsNullOrEmpty()) |
| | | { |
| | | entity.Fforbidstatus = "A"; |
| | | } |
| | | else |
| | | { |
| | | //我期望的值是A=否,B=是 |
| | | //实际给我的值是0或1,我希望为我转换从A和B的方式 |
| | | entity.Fforbidstatus = supplier.FForbidStatus == "1" ? "B" : "A"; |
| | | } |
| | | |
| | | // 查找是否已存在相同供应商编码的记录 |
| | | var existingSupplier = Db.Queryable<MesSupplier>() |
| | | .Where(s => s.SuppNo == entity.SuppNo) |