| | |
| | | using MES.Service.DB; |
| | | using MES.Service.Dto.service; |
| | | using MES.Service.Dto.webApi; |
| | | using MES.Service.Modes; |
| | | using SqlSugar; |
| | |
| | | |
| | | public class MesItemsManager : Repository<MesItems> |
| | | { |
| | | public MesItems GetItemQcPrint(WarehouseQuery query) |
| | | { |
| | | return Db.Queryable<MesItems>() |
| | | .Where(c => c.Factory == query.Factory |
| | | && c.Company == query.Company |
| | | && c.ItemNo == query.ItemNo).First(); |
| | | } |
| | | |
| | | |
| | | public bool Save(ErpItems item) |
| | | { |
| | | var entity = GetMesItems(item); |
| | |
| | | return new MesItems |
| | | { |
| | | Id = Convert.ToDecimal(item.Id), |
| | | ItemId= Convert.ToDecimal(item.Id), |
| | | ItemNo = item.FNumber, |
| | | ItemName = item.FName, |
| | | ItemModel = item.FSpecification, |
| | |
| | | Fforbidstatus = item.FForbidStatus, |
| | | MaterialProperti = item.FErpClsID, |
| | | ProductionWorkshop = item.FWorkShopId, |
| | | ProduceUnit = item.FPRODUCEUNITID, |
| | | SubconUnit = item.FSUBCONUNITID, |
| | | CreateOrg = Convert.ToDecimal(item.FCreateOrgId), |
| | | UseOrg = Convert.ToDecimal(item.FUseOrgId), |
| | | LossPercent = item.FLOSSPERCENT, |
| | | MnemonicCode = item.FMnemonicCode, |
| | | ExpPeriod = item.FExpPeriod, |
| | | ColorName = item.FColor, |
| | | CreateDate = DateTime.Now, |
| | | Company = "1000", |
| | | Factory = "1000" |
| | | }; |