@Test public void testRecordResult() throws Exception { }
@Override public CommonResult recordResult(ProjectParam projectParam){ JSONObject jsonObject = new JSONObject(); Integer departmentId = projectParam.getDepartmentId(); Integer collectionId = projectParam.getCollectionId(); Integer projectId = projectParam.getProjectId(); String resultDescription = projectParam.getResultDescription(); String resultImage = projectParam.getResultImage(); String advice = projectParam.getAdvice(); if (collectionId == null) return CommonResult.fail(E_801); if(projectId == null) return CommonResult.fail(E_801); if(resultDescription == null || advice == null) return CommonResult.fail(ResultCode.E_805); int count; String projectType = departmentMapper.getClassificationById(departmentId); switch (projectType){ case "医学影像科": count = inspectionMapper.updateResult(collectionId, projectId, resultDescription, resultImage, advice); break; case "医技科": count = examinationMapper.updateResult(collectionId, projectId, resultDescription, resultImage, advice); break; default: return CommonResult.fail(E_801); } jsonObject.put("count", count); return CommonResult.success(jsonObject); }
TechMedicalProjectServiceImpl implements TechMedicalProjectService { @Override public CommonResult recordResult(ProjectParam projectParam){ JSONObject jsonObject = new JSONObject(); Integer departmentId = projectParam.getDepartmentId(); Integer collectionId = projectParam.getCollectionId(); Integer projectId = projectParam.getProjectId(); String resultDescription = projectParam.getResultDescription(); String resultImage = projectParam.getResultImage(); String advice = projectParam.getAdvice(); if (collectionId == null) return CommonResult.fail(E_801); if(projectId == null) return CommonResult.fail(E_801); if(resultDescription == null || advice == null) return CommonResult.fail(ResultCode.E_805); int count; String projectType = departmentMapper.getClassificationById(departmentId); switch (projectType){ case "医学影像科": count = inspectionMapper.updateResult(collectionId, projectId, resultDescription, resultImage, advice); break; case "医技科": count = examinationMapper.updateResult(collectionId, projectId, resultDescription, resultImage, advice); break; default: return CommonResult.fail(E_801); } jsonObject.put("count", count); return CommonResult.success(jsonObject); } }
TechMedicalProjectServiceImpl implements TechMedicalProjectService { @Override public CommonResult recordResult(ProjectParam projectParam){ JSONObject jsonObject = new JSONObject(); Integer departmentId = projectParam.getDepartmentId(); Integer collectionId = projectParam.getCollectionId(); Integer projectId = projectParam.getProjectId(); String resultDescription = projectParam.getResultDescription(); String resultImage = projectParam.getResultImage(); String advice = projectParam.getAdvice(); if (collectionId == null) return CommonResult.fail(E_801); if(projectId == null) return CommonResult.fail(E_801); if(resultDescription == null || advice == null) return CommonResult.fail(ResultCode.E_805); int count; String projectType = departmentMapper.getClassificationById(departmentId); switch (projectType){ case "医学影像科": count = inspectionMapper.updateResult(collectionId, projectId, resultDescription, resultImage, advice); break; case "医技科": count = examinationMapper.updateResult(collectionId, projectId, resultDescription, resultImage, advice); break; default: return CommonResult.fail(E_801); } jsonObject.put("count", count); return CommonResult.success(jsonObject); }  }
TechMedicalProjectServiceImpl implements TechMedicalProjectService { @Override public CommonResult recordResult(ProjectParam projectParam){ JSONObject jsonObject = new JSONObject(); Integer departmentId = projectParam.getDepartmentId(); Integer collectionId = projectParam.getCollectionId(); Integer projectId = projectParam.getProjectId(); String resultDescription = projectParam.getResultDescription(); String resultImage = projectParam.getResultImage(); String advice = projectParam.getAdvice(); if (collectionId == null) return CommonResult.fail(E_801); if(projectId == null) return CommonResult.fail(E_801); if(resultDescription == null || advice == null) return CommonResult.fail(ResultCode.E_805); int count; String projectType = departmentMapper.getClassificationById(departmentId); switch (projectType){ case "医学影像科": count = inspectionMapper.updateResult(collectionId, projectId, resultDescription, resultImage, advice); break; case "医技科": count = examinationMapper.updateResult(collectionId, projectId, resultDescription, resultImage, advice); break; default: return CommonResult.fail(E_801); } jsonObject.put("count", count); return CommonResult.success(jsonObject); }  @Override CommonResult listPreparedPatientsByCaseIdOrDateOrName(PatientParam patientParam); @Override CommonResult listAllProjectsByCaseId(PatientParam patientParam); @Override CommonResult listItemsByCollectionIdAndProjectId(ProjectParam projectParam); @Override CommonResult checkInProject(ProjectParam projectParam); @Override CommonResult cancelProject(ProjectParam projectParam); @Override CommonResult listCheckedInButNotRecordedProjects(ProjectParam projectParam); @Override CommonResult recordResult(ProjectParam projectParam); @Override CommonResult showResult(ProjectParam projectParam); CommonResult confirmProject(ProjectParam projectParam); }
TechMedicalProjectServiceImpl implements TechMedicalProjectService { @Override public CommonResult recordResult(ProjectParam projectParam){ JSONObject jsonObject = new JSONObject(); Integer departmentId = projectParam.getDepartmentId(); Integer collectionId = projectParam.getCollectionId(); Integer projectId = projectParam.getProjectId(); String resultDescription = projectParam.getResultDescription(); String resultImage = projectParam.getResultImage(); String advice = projectParam.getAdvice(); if (collectionId == null) return CommonResult.fail(E_801); if(projectId == null) return CommonResult.fail(E_801); if(resultDescription == null || advice == null) return CommonResult.fail(ResultCode.E_805); int count; String projectType = departmentMapper.getClassificationById(departmentId); switch (projectType){ case "医学影像科": count = inspectionMapper.updateResult(collectionId, projectId, resultDescription, resultImage, advice); break; case "医技科": count = examinationMapper.updateResult(collectionId, projectId, resultDescription, resultImage, advice); break; default: return CommonResult.fail(E_801); } jsonObject.put("count", count); return CommonResult.success(jsonObject); }  @Override CommonResult listPreparedPatientsByCaseIdOrDateOrName(PatientParam patientParam); @Override CommonResult listAllProjectsByCaseId(PatientParam patientParam); @Override CommonResult listItemsByCollectionIdAndProjectId(ProjectParam projectParam); @Override CommonResult checkInProject(ProjectParam projectParam); @Override CommonResult cancelProject(ProjectParam projectParam); @Override CommonResult listCheckedInButNotRecordedProjects(ProjectParam projectParam); @Override CommonResult recordResult(ProjectParam projectParam); @Override CommonResult showResult(ProjectParam projectParam); CommonResult confirmProject(ProjectParam projectParam);  }