package com.gkhy.assess.admin.controller.web;
|
|
|
import com.gkhy.assess.common.annotation.RepeatSubmit;
|
import com.gkhy.assess.common.api.CommonResult;
|
import com.gkhy.assess.common.enums.RequestSourceEnum;
|
import com.gkhy.assess.system.domain.AssInvestigation;
|
import com.gkhy.assess.system.service.AssInvestigationService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.validation.annotation.Validated;
|
import org.springframework.web.bind.annotation.*;
|
|
/**
|
* <p>
|
* 现场勘验记录表 前端控制器
|
* </p>
|
*
|
* @author kzy
|
* @since 2023-12-12 10:46:54
|
*/
|
@Api(tags = "现场勘验记录 前端控制器")
|
@RestController
|
@RequestMapping("/manage/investigation")
|
public class AssInvestigationController {
|
|
@Autowired
|
private AssInvestigationService investigationService;
|
|
@ApiOperation(value = "根据id获取现场勘验记录表详情")
|
@GetMapping("/detail/{investigationId}")
|
public CommonResult investigationDetail(@PathVariable(value = "investigationId") Long investigationId){
|
return CommonResult.success(investigationService.getInvestigationByProjectId(investigationId));
|
}
|
|
@ApiOperation(value = "根据项目id获取现场勘验记录表详情")
|
@GetMapping("/getInvestigationByProjectId")
|
public CommonResult getInvestigationByProjectId( Long projectId){
|
return CommonResult.success(investigationService.getInvestigationByProjectId(projectId));
|
}
|
|
@RepeatSubmit
|
@ApiOperation(value = "创建现场勘验记录表")
|
@PostMapping("/add")
|
public CommonResult addInvestigation(@Validated @RequestBody AssInvestigation investigation){
|
return CommonResult.success(investigationService.addInvestigation(investigation, RequestSourceEnum.WEB.getCode()));
|
}
|
|
@RepeatSubmit
|
@ApiOperation(value = "编辑现场勘验记录表")
|
@PutMapping("/edit")
|
public CommonResult editInvestigation(@Validated @RequestBody AssInvestigation investigation){
|
return CommonResult.success(investigationService.editInvestigation(investigation));
|
}
|
|
// @RepeatSubmit
|
// @ApiOperation(value = "现场勘验记录项目状态流转")
|
// @PostMapping("/doProcess")
|
// public CommonResult doProcess(@RequestBody Long projectId){
|
// investigationService.doInvestigationProcess(projectId);
|
// return CommonResult.success();
|
// }
|
|
|
}
|