| | |
| | | SuppNo = supplier.FNumber, |
| | | SuppSname = supplier.FShortName, |
| | | SuppName = supplier.FName, |
| | | Lxr = supplier.FTContact, |
| | | Telf1 = supplier.Fmobilephone, |
| | | Lxr = supplier.F_UNW_LXR, |
| | | Telf1 = supplier.F_UNW_LXRDH, |
| | | Fstaffid = supplier.FStaffId, |
| | | //Fforbidstatus = supplier.FForbidStatus, |
| | | Type = supplier.Type, |
| | |
| | | Fumbrella = string.IsNullOrEmpty(supplier.FCreateOrgId) ? "1" : supplier.FCreateOrgId, |
| | | }; |
| | | |
| | | //负责人名称编码转ID,Fstaffid = supplier.FStaffId |
| | | var entitySubconUnit = Db.Queryable<MesStaff>() |
| | | .Where(x => x.StaffNo == supplier.FStaffId) |
| | | .Select(x => x.Id.ToString()) |
| | | .First(); |
| | | if (!string.IsNullOrWhiteSpace(entitySubconUnit)) |
| | | { |
| | | entity.Fstaffid = entitySubconUnit; |
| | | } |
| | | else if (!string.IsNullOrWhiteSpace(supplier.FStaffId)) |
| | | { |
| | | entity.Fstaffid = supplier.FStaffId; |
| | | } |
| | | else |
| | | { |
| | | entity.Fstaffid = "0"; |
| | | } |
| | | |
| | | // ERP: 0=未禁用, 1=禁用 |
| | | // MES: A=未禁用, B=禁用 |
| | | if (supplier.FForbidStatus.IsNullOrEmpty()) |