|
@@ -8,6 +8,7 @@ import com.ruoyi.web.work.domain.Request;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import com.ruoyi.common.annotation.Log;
|
|
import com.ruoyi.common.annotation.Log;
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
@@ -23,7 +24,6 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|
* @date 2024-07-23
|
|
* @date 2024-07-23
|
|
*/
|
|
*/
|
|
@Api(tags = "检测项目管理")
|
|
@Api(tags = "检测项目管理")
|
|
-@Anonymous
|
|
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/work/result")
|
|
@RequestMapping("/work/result")
|
|
public class ResultController extends BaseController {
|
|
public class ResultController extends BaseController {
|
|
@@ -32,7 +32,7 @@ public class ResultController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "根据患者ID获取此人的全部检查结果列表")
|
|
@ApiOperation(value = "根据患者ID获取此人的全部检查结果列表")
|
|
- //@PreAuthorize("@ss.hasPermi('work:request:list')")
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('work:result:list')")
|
|
@GetMapping("/patid/{patId}")
|
|
@GetMapping("/patid/{patId}")
|
|
public TableDataInfo getAllResultByPatId(@PathVariable("patId") Long patId){
|
|
public TableDataInfo getAllResultByPatId(@PathVariable("patId") Long patId){
|
|
startPage();
|
|
startPage();
|
|
@@ -41,8 +41,7 @@ public class ResultController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "获取检测项目列表")
|
|
@ApiOperation(value = "获取检测项目列表")
|
|
- @Anonymous
|
|
|
|
- //@PreAuthorize("@ss.hasPermi('work:request:list')")
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('work:result:list')")
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
public TableDataInfo list(Result result){
|
|
public TableDataInfo list(Result result){
|
|
startPage();
|
|
startPage();
|
|
@@ -51,31 +50,27 @@ public class ResultController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "根据Id获取检测项目列表")
|
|
@ApiOperation(value = "根据Id获取检测项目列表")
|
|
- @Anonymous
|
|
|
|
- //@PreAuthorize("@ss.hasPermi('work:request:query')")
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('work:result:query')")
|
|
@GetMapping(value = "/detail/{id}")
|
|
@GetMapping(value = "/detail/{id}")
|
|
public AjaxResult detail(@PathVariable("id") Long id){
|
|
public AjaxResult detail(@PathVariable("id") Long id){
|
|
return AjaxResult.success(resultService.getById(id));
|
|
return AjaxResult.success(resultService.getById(id));
|
|
}
|
|
}
|
|
|
|
|
|
- @Anonymous
|
|
|
|
- //@PreAuthorize("@ss.hasPermi('work:request:add')")
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('work:result:add')")
|
|
@Log(title = "request", businessType = BusinessType.INSERT)
|
|
@Log(title = "request", businessType = BusinessType.INSERT)
|
|
@PostMapping("/add")
|
|
@PostMapping("/add")
|
|
public AjaxResult add(@RequestBody Result request){
|
|
public AjaxResult add(@RequestBody Result request){
|
|
return toAjax(resultService.save(request));
|
|
return toAjax(resultService.save(request));
|
|
}
|
|
}
|
|
|
|
|
|
- @Anonymous
|
|
|
|
- //@PreAuthorize("@ss.hasPermi('work:request:edit')")
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('work:result:edit')")
|
|
@Log(title = "request", businessType = BusinessType.UPDATE)
|
|
@Log(title = "request", businessType = BusinessType.UPDATE)
|
|
@PostMapping("/edit")
|
|
@PostMapping("/edit")
|
|
public AjaxResult edit(@RequestBody Result request){
|
|
public AjaxResult edit(@RequestBody Result request){
|
|
return toAjax(resultService.updateById(request));
|
|
return toAjax(resultService.updateById(request));
|
|
}
|
|
}
|
|
|
|
|
|
- @Anonymous
|
|
|
|
- //@PreAuthorize("@ss.hasPermi('work:request:remove')")
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('work:result:remove')")
|
|
@Log(title = "request", businessType = BusinessType.DELETE)
|
|
@Log(title = "request", businessType = BusinessType.DELETE)
|
|
@GetMapping("/remove/{ids}")
|
|
@GetMapping("/remove/{ids}")
|
|
public AjaxResult remove(@PathVariable Long[] ids){
|
|
public AjaxResult remove(@PathVariable Long[] ids){
|