@Test public void testInsertNewRecipe() throws Exception { }
@Override public CommonResult insertNewRecipe() { Integer recipeId = recipeMapper.getLatestId(); if (recipeId == null) recipeId = 50000000; recipeId = recipeId + 1; Recipe recipe = new Recipe(); recipe.setId(recipeId); recipe.setMedicineId(0); recipe.setDepartmentId(0); int count = recipeMapper.insertSelective(recipe); if (count <= 0) return CommonResult.fail(); JSONObject returnJson = new JSONObject(); returnJson.put("recipeId", recipeId); return CommonResult.success(returnJson); }
RecipeManagementServiceImpl implements RecipeManagementService { @Override public CommonResult insertNewRecipe() { Integer recipeId = recipeMapper.getLatestId(); if (recipeId == null) recipeId = 50000000; recipeId = recipeId + 1; Recipe recipe = new Recipe(); recipe.setId(recipeId); recipe.setMedicineId(0); recipe.setDepartmentId(0); int count = recipeMapper.insertSelective(recipe); if (count <= 0) return CommonResult.fail(); JSONObject returnJson = new JSONObject(); returnJson.put("recipeId", recipeId); return CommonResult.success(returnJson); } }
RecipeManagementServiceImpl implements RecipeManagementService { @Override public CommonResult insertNewRecipe() { Integer recipeId = recipeMapper.getLatestId(); if (recipeId == null) recipeId = 50000000; recipeId = recipeId + 1; Recipe recipe = new Recipe(); recipe.setId(recipeId); recipe.setMedicineId(0); recipe.setDepartmentId(0); int count = recipeMapper.insertSelective(recipe); if (count <= 0) return CommonResult.fail(); JSONObject returnJson = new JSONObject(); returnJson.put("recipeId", recipeId); return CommonResult.success(returnJson); }  }
RecipeManagementServiceImpl implements RecipeManagementService { @Override public CommonResult insertNewRecipe() { Integer recipeId = recipeMapper.getLatestId(); if (recipeId == null) recipeId = 50000000; recipeId = recipeId + 1; Recipe recipe = new Recipe(); recipe.setId(recipeId); recipe.setMedicineId(0); recipe.setDepartmentId(0); int count = recipeMapper.insertSelective(recipe); if (count <= 0) return CommonResult.fail(); JSONObject returnJson = new JSONObject(); returnJson.put("recipeId", recipeId); return CommonResult.success(returnJson); }  @Override CommonResult listCurrentCaseRecipes(Integer caseId); HashMap medicineInfo(HashMap recipeLog); @Override CommonResult insertNewRecipe(); CommonResult preserveRecipes(RecipeCollectionParam recipeCollectionParam); CommonResult submitRecipes(RecipeCollectionParam recipeCollectionParam); CommonResult updateRecipes(RecipeCollectionParam recipeCollectionParam, Integer status); CommonResult insertTransactionLog(RecipeCollectionParam collectionParam, RecipeParam recipeParam,
                                             Integer creatorRoleId); }
RecipeManagementServiceImpl implements RecipeManagementService { @Override public CommonResult insertNewRecipe() { Integer recipeId = recipeMapper.getLatestId(); if (recipeId == null) recipeId = 50000000; recipeId = recipeId + 1; Recipe recipe = new Recipe(); recipe.setId(recipeId); recipe.setMedicineId(0); recipe.setDepartmentId(0); int count = recipeMapper.insertSelective(recipe); if (count <= 0) return CommonResult.fail(); JSONObject returnJson = new JSONObject(); returnJson.put("recipeId", recipeId); return CommonResult.success(returnJson); }  @Override CommonResult listCurrentCaseRecipes(Integer caseId); HashMap medicineInfo(HashMap recipeLog); @Override CommonResult insertNewRecipe(); CommonResult preserveRecipes(RecipeCollectionParam recipeCollectionParam); CommonResult submitRecipes(RecipeCollectionParam recipeCollectionParam); CommonResult updateRecipes(RecipeCollectionParam recipeCollectionParam, Integer status); CommonResult insertTransactionLog(RecipeCollectionParam collectionParam, RecipeParam recipeParam,
                                             Integer creatorRoleId);  }