/// <summary> /// 出货牌名称获取 /// </summary> /// <param name="jsondata"></param> /// <returns></returns> public async Task <List <GlueDetailModel> > StrstepNameSelecte(CurrenStepSelectChangesParam jsondata) { string strstepNameSelecte = string.Format(@"select d.item_name, d.item_value,d.MONITOR,d.USERNAME,d.ITEM_WEIGHT from t_mes_stir_info d, T_MES_MACHINE_USEINFO c where d.shipment_no = c.shipment_no and d.step_num = c.step_num and d.step_name='{0}' and c.shipment_no = '{1}'", jsondata.stepName, jsondata.shipCard); return(await base.SqlQuery <GlueDetailModel>(strstepNameSelecte, new { })); }
/// <summary> /// 打胶参数录入-当前步骤值改变事件 /// </summary> /// <param name="jsondata"></param> /// <returns></returns> public async Task <CurrenStepSelectChangesReturns> CurrenStepSelectChanges(CurrenStepSelectChangesParam jsondata) { //返回信息实体 CurrenStepSelectChangesReturns modelReturns = new CurrenStepSelectChangesReturns(); var result = await _dal.StrstepNameSelecte(jsondata); if (result.Count > 0) { int j = 0; modelReturns.MONITOR = result[0].MONITOR; modelReturns.USERNAME = result[0].USERNAME; for (int i = 0; i < result.Count; i++) { string StrItem_Name = result[i].item_name; string StrItem_Value = result[i].item_value; if (StrItem_Name == "公转转速") { modelReturns.PublicSpeed = StrItem_Value; } else if (StrItem_Name == "自转转速") { modelReturns.SelfVelocity = StrItem_Value; } else if (StrItem_Name == "搅拌时间") { modelReturns.Time = StrItem_Value; } else if (StrItem_Name == "温度") { modelReturns.Temperature = StrItem_Value; } else if (StrItem_Name == "真空度") { modelReturns.Vacuum = StrItem_Value; } else if (StrItem_Name == "粘度") { modelReturns.Viscosity = StrItem_Value; } else if (StrItem_Name == "细度") { modelReturns.Fineness = StrItem_Value; } else if (StrItem_Name == "过筛况") { modelReturns.Filter = StrItem_Value; } else if (StrItem_Name == "除铁要求") { modelReturns.chutie = StrItem_Value; } else { //3个项目名称、值、重量 if (j == 0) { j++; modelReturns.ItemName1 = StrItem_Name; modelReturns.ItemValue1 = StrItem_Value; modelReturns.Weight1 = result[i].ITEM_WEIGHT; } else if (j == 1) { j++; modelReturns.ItemName2 = StrItem_Name; modelReturns.ItemValue2 = StrItem_Value; modelReturns.Weight2 = result[i].ITEM_WEIGHT; } else if (j == 2) { j++; modelReturns.ItemName3 = StrItem_Name; modelReturns.ItemValue3 = StrItem_Value; modelReturns.Weight3 = result[i].ITEM_WEIGHT; } else if (j == 3) { j++; modelReturns.ItemName4 = StrItem_Name; modelReturns.ItemValue4 = StrItem_Value; modelReturns.Weight4 = result[i].ITEM_WEIGHT; } } } } return(modelReturns); }