public string IfEntryExists(int userId, QuerySchemaEntryModel inputModel) { var entries = dal.GetSchemaEntryByUserIdAndType(userId, inputModel.IsConditionOut); var item = entries.FirstOrDefault(m => m.OrgId == inputModel.OrgId && m.Label == inputModel.Label && m.BatchNo == inputModel.BatchNo && m.ProductionModel == inputModel.ProductionModel && m.BtnN == inputModel.SchemaId); if (item != null) { return("条件已存在"); } return(null); }