|
|
@@ -34,6 +34,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
@@ -48,13 +49,13 @@ import java.util.List;
|
|
|
@AllArgsConstructor
|
|
|
public class BaseStudentAssessmentInspectionController {
|
|
|
|
|
|
- private final IBaseStudentAssessmentInspectionService baseStudentAssessmentInspectionService;
|
|
|
+ private final IBaseStudentAssessmentInspectionService inspectionService;
|
|
|
|
|
|
@GetMapping(value = "/page")
|
|
|
@ApiOperation(value = "学生班级巡查考核列表(分页)")
|
|
|
@SaCheckPermission("basestudentassessmentinspection:detail")
|
|
|
public RT<PageOutput<BaseStudentAssessmentInspectionPageVo>> page(@Valid BaseStudentAssessmentInspectionPageDto dto) {
|
|
|
- Page<BaseStudentAssessmentInspectionPageVo> page = baseStudentAssessmentInspectionService.getPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
|
|
|
+ Page<BaseStudentAssessmentInspectionPageVo> page = inspectionService.getPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
|
|
|
return RT.ok(ConventPage.getPageOutput(page, BaseStudentAssessmentInspectionPageVo.class));
|
|
|
}
|
|
|
|
|
|
@@ -62,7 +63,7 @@ public class BaseStudentAssessmentInspectionController {
|
|
|
@ApiOperation(value = "根据id查询学生班级巡查考核信息")
|
|
|
@SaCheckPermission("basestudentassessmentinspection:detail")
|
|
|
public RT<BaseStudentAssessmentInspectionVo> info(@RequestParam Long id) {
|
|
|
- BaseStudentAssessmentInspectionVo result = baseStudentAssessmentInspectionService.getInfo(id);
|
|
|
+ BaseStudentAssessmentInspectionVo result = inspectionService.getInfo(id);
|
|
|
return RT.ok(result);
|
|
|
}
|
|
|
|
|
|
@@ -70,7 +71,7 @@ public class BaseStudentAssessmentInspectionController {
|
|
|
@ApiOperation(value = "学生操行分记录管理列表(移动端)")
|
|
|
@SaCheckPermission("basestudentbehaviormanage:detail")
|
|
|
public RT<PageOutput<BaseStudentAssessmentInspectionMobilePageVo>> mobilePage(@Valid BaseStudentAssessmentInspectionMobilePageDto dto) {
|
|
|
- Page<BaseStudentAssessmentInspectionMobilePageVo> page = baseStudentAssessmentInspectionService.getMobilePage(new Page<>(dto.getLimit(), dto.getSize()), dto);
|
|
|
+ Page<BaseStudentAssessmentInspectionMobilePageVo> page = inspectionService.getMobilePage(new Page<>(dto.getLimit(), dto.getSize()), dto);
|
|
|
if (page == null) {
|
|
|
return RT.ok(ConventPage.getPageOutputNull(BaseStudentAssessmentInspectionMobilePageVo.class));
|
|
|
}
|
|
|
@@ -81,7 +82,7 @@ public class BaseStudentAssessmentInspectionController {
|
|
|
@ApiOperation(value = "根据id查询学生班级巡查考核信息(移动端)")
|
|
|
@SaCheckPermission("basestudentassessmentinspection:detail")
|
|
|
public RT<BaseStudentAssessmentInspectionMobileVo> mobileInfo(@Valid Long id) {
|
|
|
- BaseStudentAssessmentInspectionMobileVo result = baseStudentAssessmentInspectionService.getMobileInfo(id);
|
|
|
+ BaseStudentAssessmentInspectionMobileVo result = inspectionService.getMobileInfo(id);
|
|
|
return RT.ok(result);
|
|
|
}
|
|
|
|
|
|
@@ -89,8 +90,9 @@ public class BaseStudentAssessmentInspectionController {
|
|
|
@ApiOperation(value = "新增学生班级巡查考核")
|
|
|
@SaCheckPermission("basestudentassessmentinspection:add")
|
|
|
public RT<Boolean> add(@Valid @RequestBody AddBaseStudentAssessmentInspectionDto dto) {
|
|
|
- BaseStudentAssessmentInspection baseStudentAssessmentInspection = BeanUtil.toBean(dto, BaseStudentAssessmentInspection.class);
|
|
|
- boolean isSuccess = baseStudentAssessmentInspectionService.save(baseStudentAssessmentInspection);
|
|
|
+ BaseStudentAssessmentInspection inspection = BeanUtil.toBean(dto, BaseStudentAssessmentInspection.class);
|
|
|
+ inspection.setCreateDate(new Date());
|
|
|
+ boolean isSuccess = inspectionService.save(inspection);
|
|
|
return RT.ok(isSuccess);
|
|
|
}
|
|
|
|
|
|
@@ -100,7 +102,7 @@ public class BaseStudentAssessmentInspectionController {
|
|
|
public RT<Boolean> update(@Valid @RequestBody UpdateBaseStudentAssessmentInspectionDto dto) {
|
|
|
|
|
|
BaseStudentAssessmentInspection baseStudentAssessmentInspection = BeanUtil.toBean(dto, BaseStudentAssessmentInspection.class);
|
|
|
- return RT.ok(baseStudentAssessmentInspectionService.updateById(baseStudentAssessmentInspection));
|
|
|
+ return RT.ok(inspectionService.updateById(baseStudentAssessmentInspection));
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -108,14 +110,14 @@ public class BaseStudentAssessmentInspectionController {
|
|
|
@ApiOperation(value = "删除学生班级巡查考核")
|
|
|
@SaCheckPermission("basestudentassessmentinspection:delete")
|
|
|
public RT<Boolean> delete(@Valid @RequestBody List<Long> ids) {
|
|
|
- return RT.ok(baseStudentAssessmentInspectionService.removeBatchByIds(ids));
|
|
|
+ return RT.ok(inspectionService.removeBatchByIds(ids));
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = "/calss-quantitative-assessment-page")
|
|
|
@ApiOperation(value = "班级量化考核列表(分页)")
|
|
|
@SaCheckPermission("basestudentassessmentinspection:detail")
|
|
|
public RT<PageOutput<CalssQuantitativeAssessmentPageVo>> calssQuantitativeAssessmentPage(@Valid CalssQuantitativeAssessmentPageDto dto) {
|
|
|
- IPage<CalssQuantitativeAssessmentPageVo> page = baseStudentAssessmentInspectionService.getCalssQuantitativeAssessmentPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
|
|
|
+ IPage<CalssQuantitativeAssessmentPageVo> page = inspectionService.getCalssQuantitativeAssessmentPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
|
|
|
return RT.ok(ConventPage.getPageOutput(page, CalssQuantitativeAssessmentPageVo.class));
|
|
|
}
|
|
|
|
|
|
@@ -125,6 +127,6 @@ public class BaseStudentAssessmentInspectionController {
|
|
|
@GetMapping("/export")
|
|
|
@ApiOperation(value = "导出")
|
|
|
public ResponseEntity<byte[]> exportDataQuery() {
|
|
|
- return baseStudentAssessmentInspectionService.getQuantitativeAssessmentExcelByte(new QuantitativeAssessmentExcelDto());
|
|
|
+ return inspectionService.getQuantitativeAssessmentExcelByte(new QuantitativeAssessmentExcelDto());
|
|
|
}
|
|
|
}
|