| | |
| | | using AngleSharp.Dom; |
| | | using Castle.Core.Resource; |
| | | using MES.Service.DB; |
| | | using MES.Service.Dto.webApi; |
| | | using MES.Service.Modes; |
| | |
| | | Fumbrella = string.IsNullOrEmpty(unit.FCreateOrgId) ? "1" : unit.FCreateOrgId, |
| | | }; |
| | | |
| | | //物料编码转ID,ItemNo=unit.FNumber, |
| | | var entityItemNo = Db.Queryable<MesItems>() |
| | | .Where(x => x.ItemNo == unit.FNumber) |
| | | .Select(x => x.Id.ToString()) |
| | | .First(); |
| | | if (!string.IsNullOrWhiteSpace(entityItemNo)) |
| | | { |
| | | entity.ItemNo = entityItemNo; |
| | | } |
| | | else |
| | | { |
| | | entity.ItemNo = "0"; |
| | | } |
| | | |
| | | // ERP: 0=未禁用, 1=禁用 |
| | | // MES: A=未禁用, B=禁用 |
| | | if (string.IsNullOrEmpty(unit.FForbidStatus)) |