|
@@ -98,42 +98,42 @@ public class ReportContentController {
|
|
|
@PostMapping("/pageProjectReport")
|
|
|
public Page<ProjectReportContent> pageContent(@RequestBody ReportContentQuery query) {
|
|
|
ProjectReportType reportType = ProjectReportType.PROJECT_REPORT;
|
|
|
- return contentService.pageQuery(query,reportType);
|
|
|
+ return contentService.pageQuery(query, reportType);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("分页查询实施周报内容")
|
|
|
@PostMapping("/pageCarryOut")
|
|
|
public Page<ProjectReportCarryOut> pageCarryOut(@RequestBody ReportContentQuery query) {
|
|
|
ProjectReportType reportType = ProjectReportType.CARRY_OUT;
|
|
|
- return carryOutService.pageQuery(query,reportType);
|
|
|
+ return carryOutService.pageQuery(query, reportType);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("分页查询测绘周报内容")
|
|
|
@PostMapping("/pageMapping")
|
|
|
public Page<ProjectReportMapping> pageMapping(@RequestBody ReportContentQuery query) {
|
|
|
ProjectReportType reportType = ProjectReportType.MAPPING;
|
|
|
- return mappingService.pageQuery(query,reportType);
|
|
|
+ return mappingService.pageQuery(query, reportType);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("分页查询研发周报内容")
|
|
|
@PostMapping("/pageDevelopment")
|
|
|
public Page<ProjectReportDevelopment> pageDevelopment(@RequestBody ReportContentQuery query) {
|
|
|
ProjectReportType reportType = ProjectReportType.DEVELOPMENT;
|
|
|
- return developmentService.pageQuery(query,reportType);
|
|
|
+ return developmentService.pageQuery(query, reportType);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("分页查询产品周报内容")
|
|
|
@PostMapping("/pageProduct")
|
|
|
public Page<ProjectReportProduct> pageProduct(@RequestBody ReportContentQuery query) {
|
|
|
ProjectReportType reportType = ProjectReportType.PRODUCT;
|
|
|
- return productService.pageQuery(query,reportType);
|
|
|
+ return productService.pageQuery(query, reportType);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("分页查询测试周报内容")
|
|
|
@PostMapping("/pageTest")
|
|
|
public Page<ProjectReportTest> pageTest(@RequestBody ReportContentQuery query) {
|
|
|
ProjectReportType reportType = ProjectReportType.TEST;
|
|
|
- return testService.pageQuery(query,reportType);
|
|
|
+ return testService.pageQuery(query, reportType);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -261,32 +261,37 @@ public class ReportContentController {
|
|
|
**/
|
|
|
@ApiOperation("根据项目id和周报id查询填报的详情")
|
|
|
@GetMapping("/getReportProjectReport")
|
|
|
- public ProjectReportContent getReportProjectReport(@RequestParam("reportId") String reportId,@RequestParam("projectId") Integer projectId) {
|
|
|
+ public ProjectReportContent getReportProjectReport(@RequestParam("reportId") String reportId, @RequestParam("projectId") Integer projectId) {
|
|
|
return contentService.getEntityByReportIdAndProjectId(reportId, projectId);
|
|
|
}
|
|
|
+
|
|
|
@ApiOperation("根据项目id和周报id查询填报的详情")
|
|
|
@GetMapping("/getReportDevelopment")
|
|
|
- public ProjectReportDevelopment getReportDevelopment(@RequestParam("reportId") String reportId,@RequestParam("projectId") Integer projectId) {
|
|
|
+ public ProjectReportDevelopment getReportDevelopment(@RequestParam("reportId") String reportId, @RequestParam("projectId") Integer projectId) {
|
|
|
return developmentService.getEntityByReportIdAndProjectId(reportId, projectId);
|
|
|
}
|
|
|
+
|
|
|
@ApiOperation("根据项目id和周报id查询填报的详情")
|
|
|
@GetMapping("/getReportProduct")
|
|
|
- public ProjectReportProduct getReportProduct(@RequestParam("reportId") String reportId,@RequestParam("projectId") Integer projectId) {
|
|
|
+ public ProjectReportProduct getReportProduct(@RequestParam("reportId") String reportId, @RequestParam("projectId") Integer projectId) {
|
|
|
return productService.getEntityByReportIdAndProjectId(reportId, projectId);
|
|
|
}
|
|
|
+
|
|
|
@ApiOperation("根据项目id和周报id查询填报的详情")
|
|
|
@GetMapping("/getReportTest")
|
|
|
- public ProjectReportTest getReportTest(@RequestParam("reportId") String reportId,@RequestParam("projectId") Integer projectId) {
|
|
|
+ public ProjectReportTest getReportTest(@RequestParam("reportId") String reportId, @RequestParam("projectId") Integer projectId) {
|
|
|
return testService.getEntityByReportIdAndProjectId(reportId, projectId);
|
|
|
}
|
|
|
+
|
|
|
@ApiOperation("根据项目id和周报id查询填报的详情")
|
|
|
@GetMapping("/getReportCarryOut")
|
|
|
- public ProjectReportCarryOut getReportCarryOut(@RequestParam("reportId") String reportId,@RequestParam("projectId") Integer projectId) {
|
|
|
+ public ProjectReportCarryOut getReportCarryOut(@RequestParam("reportId") String reportId, @RequestParam("projectId") Integer projectId) {
|
|
|
return carryOutService.getEntityByReportIdAndProjectId(reportId, projectId);
|
|
|
}
|
|
|
+
|
|
|
@ApiOperation("根据项目id和周报id查询填报的详情")
|
|
|
@GetMapping("/getReportMapping")
|
|
|
- public ProjectReportMapping getReportMapping(@RequestParam("reportId") String reportId,@RequestParam("projectId") Integer projectId) {
|
|
|
+ public ProjectReportMapping getReportMapping(@RequestParam("reportId") String reportId, @RequestParam("projectId") Integer projectId) {
|
|
|
return mappingService.getEntityByReportIdAndProjectId(reportId, projectId);
|
|
|
}
|
|
|
|
|
@@ -303,9 +308,10 @@ public class ReportContentController {
|
|
|
})
|
|
|
public ProjectReportContent getNextReportProjectReport(@RequestParam("reportId") String reportId,
|
|
|
@RequestParam("projectId") Integer projectId,
|
|
|
- @RequestParam("next")String next) {
|
|
|
- return contentService.getEntityByNext(reportId, projectId,next);
|
|
|
+ @RequestParam("next") String next) {
|
|
|
+ return contentService.getEntityByNext(reportId, projectId, next);
|
|
|
}
|
|
|
+
|
|
|
@ApiOperation("根据项目id和周报id查询next期的详情")
|
|
|
@GetMapping("/getNextReportDevelopment")
|
|
|
@ApiImplicitParams({
|
|
@@ -315,9 +321,10 @@ public class ReportContentController {
|
|
|
})
|
|
|
public ProjectReportDevelopment getNextReportDevelopment(@RequestParam("reportId") String reportId,
|
|
|
@RequestParam("projectId") Integer projectId,
|
|
|
- @RequestParam("next")String next) {
|
|
|
- return developmentService.getEntityByNext(reportId, projectId,next);
|
|
|
+ @RequestParam("next") String next) {
|
|
|
+ return developmentService.getEntityByNext(reportId, projectId, next);
|
|
|
}
|
|
|
+
|
|
|
@ApiOperation("根据项目id和周报id查询next期的详情")
|
|
|
@GetMapping("/getNextReportProduct")
|
|
|
@ApiImplicitParams({
|
|
@@ -327,9 +334,10 @@ public class ReportContentController {
|
|
|
})
|
|
|
public ProjectReportProduct getNextReportProduct(@RequestParam("reportId") String reportId,
|
|
|
@RequestParam("projectId") Integer projectId,
|
|
|
- @RequestParam("next")String next) {
|
|
|
- return productService.getEntityByNext(reportId, projectId,next);
|
|
|
+ @RequestParam("next") String next) {
|
|
|
+ return productService.getEntityByNext(reportId, projectId, next);
|
|
|
}
|
|
|
+
|
|
|
@ApiOperation("根据项目id和周报id查询next期的详情")
|
|
|
@GetMapping("/getNextReportTest")
|
|
|
@ApiImplicitParams({
|
|
@@ -339,9 +347,10 @@ public class ReportContentController {
|
|
|
})
|
|
|
public ProjectReportTest getNextReportTest(@RequestParam("reportId") String reportId,
|
|
|
@RequestParam("projectId") Integer projectId,
|
|
|
- @RequestParam("next")String next) {
|
|
|
- return testService.getEntityByNext(reportId, projectId,next);
|
|
|
+ @RequestParam("next") String next) {
|
|
|
+ return testService.getEntityByNext(reportId, projectId, next);
|
|
|
}
|
|
|
+
|
|
|
@ApiOperation("根据项目id和周报id查询next期的详情")
|
|
|
@GetMapping("/getNextReportCarryOut")
|
|
|
@ApiImplicitParams({
|
|
@@ -351,9 +360,10 @@ public class ReportContentController {
|
|
|
})
|
|
|
public ProjectReportCarryOut getNextReportCarryOut(@RequestParam("reportId") String reportId,
|
|
|
@RequestParam("projectId") Integer projectId,
|
|
|
- @RequestParam("next")String next) {
|
|
|
- return carryOutService.getEntityByNext(reportId, projectId,next);
|
|
|
+ @RequestParam("next") String next) {
|
|
|
+ return carryOutService.getEntityByNext(reportId, projectId, next);
|
|
|
}
|
|
|
+
|
|
|
@ApiOperation("根据项目id和周报id查询next期的详情")
|
|
|
@GetMapping("/getNextReportMapping")
|
|
|
@ApiImplicitParams({
|
|
@@ -363,7 +373,38 @@ public class ReportContentController {
|
|
|
})
|
|
|
public ProjectReportMapping getNextReportMapping(@RequestParam("reportId") String reportId,
|
|
|
@RequestParam("projectId") Integer projectId,
|
|
|
- @RequestParam("next")String next) {
|
|
|
- return mappingService.getEntityByNext(reportId, projectId,next);
|
|
|
+ @RequestParam("next") String next) {
|
|
|
+ return mappingService.getEntityByNext(reportId, projectId, next);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * ================================根据项目id和周报id复制上一期项目周报内容================================================
|
|
|
+ **/
|
|
|
+ @ApiOperation("根据项目id和周报id复制上一期项目周报内容")
|
|
|
+ @GetMapping("/copyPreviousReport")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "reportId", value = "周报编号", required = true, dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "projectId", value = "项目id", required = true, dataType = "Integer"),
|
|
|
+ @ApiImplicitParam(name = "reportType", value = "周报类型", required = true)
|
|
|
+ })
|
|
|
+ public ReportContent copyPreviousReport(@RequestParam("reportId") String reportId,
|
|
|
+ @RequestParam("projectId") Integer projectId,
|
|
|
+ @RequestParam("reportType") ProjectReportType reportType) {
|
|
|
+ switch (reportType) {
|
|
|
+ case PROJECT_REPORT:
|
|
|
+ return contentService.copyPreviousReport(reportId, projectId);
|
|
|
+ case DEVELOPMENT:
|
|
|
+ return developmentService.copyPreviousReport(reportId, projectId);
|
|
|
+ case PRODUCT:
|
|
|
+ return productService.copyPreviousReport(reportId, projectId);
|
|
|
+ case TEST:
|
|
|
+ return testService.copyPreviousReport(reportId, projectId);
|
|
|
+ case CARRY_OUT:
|
|
|
+ return carryOutService.copyPreviousReport(reportId, projectId);
|
|
|
+ case MAPPING:
|
|
|
+ return mappingService.copyPreviousReport(reportId, projectId);
|
|
|
+ default:
|
|
|
+ throw new IllegalArgumentException("周报类型不存在");
|
|
|
+ }
|
|
|
}
|
|
|
}
|