| | |
| | | import com.gkhy.assess.system.domain.AssInvestigation; |
| | | import com.gkhy.assess.system.service.AssInvestigationService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @ApiOperation(value = "根据id获取现场勘验记录表详情") |
| | | @GetMapping("/detail/{investigationId}") |
| | | public CommonResult investigationDetail(@PathVariable(value = "investigationId") Long investigationId){ |
| | | return CommonResult.success(investigationService.getInvestigationByProjectId(investigationId)); |
| | | return CommonResult.success(investigationService.getInvestigationById(investigationId)); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据项目id获取现场勘验记录表详情") |
| | |
| | | @ApiOperation(value = "创建现场勘验记录表") |
| | | @PostMapping("/add") |
| | | public CommonResult addInvestigation(@Validated @RequestBody AssInvestigation investigation){ |
| | | return CommonResult.success(investigationService.addInvestigation(investigation, RequestSourceEnum.WEB.getCode())); |
| | | return CommonResult.success(investigationService.addInvestigation(investigation)); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | | @ApiOperation(value = "现场勘验项目状态流转") |
| | | @PostMapping("/doProcess") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "body", name = "projectId", dataType = "long", required = true, value = "项目id"), |
| | | }) |
| | | public CommonResult doProcess(@RequestBody Map map){ |
| | | investigationService.doInvestigationProcess(map); |
| | | return CommonResult.success(); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | |
| | | return CommonResult.success(investigationService.editInvestigation(investigation)); |
| | | } |
| | | |
| | | // @RepeatSubmit |
| | | // @ApiOperation(value = "现场勘验记录项目状态流转") |
| | | // @PostMapping("/doProcess") |
| | | // public CommonResult doProcess(@RequestBody Long projectId){ |
| | | // investigationService.doInvestigationProcess(projectId); |
| | | // return CommonResult.success(); |
| | | // } |
| | | |
| | | |
| | | } |