| | |
| | | using Castle.Core.Resource; |
| | | using MES.Service.DB; |
| | | 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, |
| | |
| | | Highlimit = item.FMaxStock, |
| | | PrdPack = item.FMinPackCount, |
| | | DepotCode = item.FStockId, |
| | | Ppbom00019124 = item.PPBOM00019124, |
| | | Fmaterialgroup = item.FMaterialGroup, |
| | | Remarks = item.FDescription, |
| | | Ffinishreceiptoverrate = item.FFinishReceiptOverRate, |
| | | Fissuetype = item.FIssueType, |
| | | Fisbatchmanage = item.FIsBatchManage, |
| | | Fpurchaserid = item.FPurchaserId, |
| | | Fpurchaseunitid = Convert.ToDecimal(item.FPurchaseUnitId), |
| | | Fpurchaseunitid = item.FPurchaseUnitId, |
| | | Storeunit = item.FStoreUnitID, |
| | | Saleunit = item.FSaleUnitId, |
| | | Fforbidstatus = item.FForbidStatus, |
| | |
| | | ProductionWorkshop = item.FWorkShopId, |
| | | ProduceUnit = item.FPRODUCEUNITID, |
| | | SubconUnit = item.FSUBCONUNITID, |
| | | FSubsidiary = item.FSubsidiary, |
| | | Fumbrella = item.Fumbrella, |
| | | FLOSSPERCENT = item.FLOSSPERCENT , |
| | | FMnemonicCode = item.FMnemonicCode, |
| | | FExpPeriod = item.FExpPeriod, |
| | | LastupdateDate=DateTime.Now, |
| | | CreateDate=DateTime.Now, |
| | | 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" |
| | | }; |