@Test public void testCancelSubmittedCollection() throws Exception { }
public CommonResult cancelSubmittedCollection(Integer collectionId, Integer type){ int count = 0; Byte status = 3; if (type == 1){ count = inspectionMapper.updateStatusToCancel(collectionId, status); } else if (type == 2){ count = examinationMapper.updateStatusToCancel(collectionId, status); } else if (type == 3){ count = treatmentMapper.updateStatusToCancel(collectionId, status); } else return CommonResult.fail(ResultCode.E_802); if(count <= 0) return CommonResult.fail(ResultCode.E_804); return CommonResult.success(count); }
ProjectCollectionManagementServiceImpl implements ProjectCollectionManagementService { public CommonResult cancelSubmittedCollection(Integer collectionId, Integer type){ int count = 0; Byte status = 3; if (type == 1){ count = inspectionMapper.updateStatusToCancel(collectionId, status); } else if (type == 2){ count = examinationMapper.updateStatusToCancel(collectionId, status); } else if (type == 3){ count = treatmentMapper.updateStatusToCancel(collectionId, status); } else return CommonResult.fail(ResultCode.E_802); if(count <= 0) return CommonResult.fail(ResultCode.E_804); return CommonResult.success(count); } }
ProjectCollectionManagementServiceImpl implements ProjectCollectionManagementService { public CommonResult cancelSubmittedCollection(Integer collectionId, Integer type){ int count = 0; Byte status = 3; if (type == 1){ count = inspectionMapper.updateStatusToCancel(collectionId, status); } else if (type == 2){ count = examinationMapper.updateStatusToCancel(collectionId, status); } else if (type == 3){ count = treatmentMapper.updateStatusToCancel(collectionId, status); } else return CommonResult.fail(ResultCode.E_802); if(count <= 0) return CommonResult.fail(ResultCode.E_804); return CommonResult.success(count); }  }
ProjectCollectionManagementServiceImpl implements ProjectCollectionManagementService { public CommonResult cancelSubmittedCollection(Integer collectionId, Integer type){ int count = 0; Byte status = 3; if (type == 1){ count = inspectionMapper.updateStatusToCancel(collectionId, status); } else if (type == 2){ count = examinationMapper.updateStatusToCancel(collectionId, status); } else if (type == 3){ count = treatmentMapper.updateStatusToCancel(collectionId, status); } else return CommonResult.fail(ResultCode.E_802); if(count <= 0) return CommonResult.fail(ResultCode.E_804); return CommonResult.success(count); }  @Override CommonResult listCollections(Integer caseId, Integer type); @Override CommonResult applyNewCollection(Integer collectionType); @Override CommonResult savePresentCollection(CollectionParam collectionParam); @Override CommonResult submitPresentCollection(CollectionParam collectionParam); CommonResult chooseByType(CollectionParam collectionParam, int operation); CommonResult saveInspection(CollectionParam collectionParam, int operation); CommonResult saveExamination(CollectionParam collectionParam, int operation); CommonResult saveTreatment(CollectionParam collectionParam, int operation); int insertInspectionProject(Integer collectionId, Integer projectId, ItemParam itemParam); int insertExaminationProject(Integer collectionId, Integer projectId, ItemParam itemParam); CommonResult insertTransactionLog(CollectionParam collectionParam, ProjectParam projectParam,
                                             ItemParam itemParam, Integer creatorRoleId); CommonResult cancelSubmittedCollection(Integer collectionId, Integer type); CommonResult deleteCollection(Integer collectionId, Integer type); CommonResult getProjectResult(ProjectParam projectParam); }
ProjectCollectionManagementServiceImpl implements ProjectCollectionManagementService { public CommonResult cancelSubmittedCollection(Integer collectionId, Integer type){ int count = 0; Byte status = 3; if (type == 1){ count = inspectionMapper.updateStatusToCancel(collectionId, status); } else if (type == 2){ count = examinationMapper.updateStatusToCancel(collectionId, status); } else if (type == 3){ count = treatmentMapper.updateStatusToCancel(collectionId, status); } else return CommonResult.fail(ResultCode.E_802); if(count <= 0) return CommonResult.fail(ResultCode.E_804); return CommonResult.success(count); }  @Override CommonResult listCollections(Integer caseId, Integer type); @Override CommonResult applyNewCollection(Integer collectionType); @Override CommonResult savePresentCollection(CollectionParam collectionParam); @Override CommonResult submitPresentCollection(CollectionParam collectionParam); CommonResult chooseByType(CollectionParam collectionParam, int operation); CommonResult saveInspection(CollectionParam collectionParam, int operation); CommonResult saveExamination(CollectionParam collectionParam, int operation); CommonResult saveTreatment(CollectionParam collectionParam, int operation); int insertInspectionProject(Integer collectionId, Integer projectId, ItemParam itemParam); int insertExaminationProject(Integer collectionId, Integer projectId, ItemParam itemParam); CommonResult insertTransactionLog(CollectionParam collectionParam, ProjectParam projectParam,
                                             ItemParam itemParam, Integer creatorRoleId); CommonResult cancelSubmittedCollection(Integer collectionId, Integer type); CommonResult deleteCollection(Integer collectionId, Integer type); CommonResult getProjectResult(ProjectParam projectParam);  }