public Response GetDefectCodeApp(DefectCodeModel defectCodeModel) { Response <List <DefectCodeModel> > Response = new Response <List <DefectCodeModel> >(); //if (!CheckLogin()) //{ // Response.Code = 500; // Response.Status = false; // Response.Message = "请先登录!"; // return Response; //} try { DefectCode defectCode = new DefectCode { Code = defectCodeModel.Code, Name = defectCodeModel.Name, }; Response.Result = _unitWork.Find(EntityToExpression <DefectCode> .GetExpressions(defectCode)).MapToList <DefectCodeModel>(); } catch (Exception ex) { Response.Code = 500; Response.Status = false; Response.Message = ex.Message; } return(Response); }
public PadResponse GetCheckCountApp(Repair repair) { PadResponse Response = new PadResponse(); try { Repair rep = new Repair { NGMarkUser = repair.NGMarkUser, }; var pcount = from it in _unitWork.Find(EntityToExpression <Repair> .GetExpressions(rep)) group it by it.NGMarkUser into g select new { name = g.Key, value = g.Count(), }; Response.Result = pcount.ToList(); } catch (Exception ex) { Response.Code = 500; Response.Status = false; Response.Message = ex.Message; } return(Response); }
public TableData Query(Location entity) { var result = new TableData(); var data = _app.Find(EntityToExpression <Location> .GetExpressions(entity)); GetData(data, result); result.count = data.Count(); return(result); }
public TableData Query(MaterialCallHeader entity) { var result = new TableData(); var data = _app.Find(EntityToExpression <MaterialCallHeader> .GetExpressions(entity)); GetData(data, result); result.count = data.Count(); return(result); }
public TableData Query(EquipmentProp entity) { var result = new TableData(); var data = _app.Find(EntityToExpression <EquipmentProp> .GetExpressions(entity)); GetData(data, result); result.count = data.Count(); return(result); }
public TableData Query(ProductBarcodeRule entity) { var result = new TableData(); var data = _app.Find(EntityToExpression <ProductBarcodeRule> .GetExpressions(entity)); GetData(data, result); result.count = data.Count(); return(result); }
public TableData Query(OrderHeaderHistory entity) { var result = new TableData(); var data = _app.Find(EntityToExpression <OrderHeaderHistory> .GetExpressions(entity)); GetData(data, result); result.count = data.Count(); return(result); }
public TableData Query(InventoryAlert entity) { var result = new TableData(); var data = _app.Find(EntityToExpression <InventoryAlert> .GetExpressions(entity)); GetData(data, result); result.count = data.Count(); return(result); }
public TableData Query(StepTraceLog entity) { var result = new TableData(); var data = _app.Find(EntityToExpression <StepTraceLog> .GetExpressions(entity)); GetData(data, result); result.count = data.Count(); return(result); }
public TableData Query(MaterialDistributeTaskDetail entity) { var result = new TableData(); var data = _app.Find(EntityToExpression <MaterialDistributeTaskDetail> .GetExpressions(entity)); GetData(data, result); result.count = data.Count(); return(result); }
public TableData FindStockPlace(PageReq pageRequest, Location entity) { var result = new TableData(); var data = _app.Find(EntityToExpression <Location> .GetExpressions(entity)); data = data.Where(u => u.Type == "S"); GetData(data, result, pageRequest); result.count = data.Count(); return(result); }
public TableData Load(PageReq pageRequest, OrderAlert entity) { var result = new TableData(); var data = _app.Find(EntityToExpression <OrderAlert> .GetExpressions(entity)); data = data.Where(u => u.Flag != 1); GetData(data, result, pageRequest); result.count = data.Count(); return(result); }
public TableData DistinctLoad(PageReq pageRequest, ProductHeader entity) { var result = new TableData(); var data = _app.Find(EntityToExpression <ProductHeader> .GetExpressions(entity)); data = data.GroupBy(p => new { p.MachineType }).Select(g => g.First()); GetData(data, result, pageRequest); result.count = data.Count(); return(result); }
public Response GetCurrentStock(InventoryModel inventoryModel) { Response <List <InventoryModel> > Response = new Response <List <InventoryModel> >(); if (!CheckLogin()) { Response.Code = 500; Response.Status = false; Response.Message = "请先登录!"; return(Response); } try { Inventory inventory = new Inventory { WarehouseCode = inventoryModel.WarehouseType, LocationCode = inventoryModel.LocationCode, ContainerCode = inventoryModel.ContainerCode, MaterialCode = inventoryModel.MaterialCode, Lot = inventoryModel.Lot, Status = inventoryModel.Status, Qty = null, }; Response.Result = _unitWork.Find(EntityToExpression <Inventory> .GetExpressions(inventory)).MapToList <InventoryModel>(); } catch (Exception ex) { Response.Code = 500; Response.Status = false; Response.Message = ex.Message; } return(Response); }