|
@@ -7,6 +7,7 @@ import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.entity.DeptInfo;
|
|
|
import com.diagbot.facade.DeptInfoFacade;
|
|
|
import com.diagbot.vo.AddDeptInfoVO;
|
|
|
+import com.diagbot.vo.GetDeptInfoDetialsVO;
|
|
|
import com.diagbot.vo.GetDeptInfoVO;
|
|
|
import com.diagbot.vo.UpdateDeptInfoVO;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -18,6 +19,8 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import javax.validation.Valid;
|
|
|
+
|
|
|
/**
|
|
|
* <p>
|
|
|
* 科室信息表 前端控制器
|
|
@@ -40,7 +43,7 @@ public class DeptInfoController {
|
|
|
@PostMapping("/addDeptInfo")
|
|
|
@SysLogger("addDeptInfo")
|
|
|
@Transactional
|
|
|
- public RespDTO<Boolean> addDeptInfo(@RequestBody AddDeptInfoVO addDeptInfoVO) {
|
|
|
+ public RespDTO<Boolean> addDeptInfo(@Valid @RequestBody AddDeptInfoVO addDeptInfoVO) {
|
|
|
Boolean data = deptInfoFacade.addDeptInfo(addDeptInfoVO);
|
|
|
return RespDTO.onSuc(data);
|
|
|
}
|
|
@@ -51,7 +54,7 @@ public class DeptInfoController {
|
|
|
@PostMapping("/updateDeptInfo")
|
|
|
@SysLogger("updateDeptInfo")
|
|
|
@Transactional
|
|
|
- public RespDTO<Boolean> updateDeptInfo(@RequestBody UpdateDeptInfoVO updateDeptInfoVO) {
|
|
|
+ public RespDTO<Boolean> updateDeptInfo(@Valid @RequestBody UpdateDeptInfoVO updateDeptInfoVO) {
|
|
|
Boolean data = deptInfoFacade.updateDeptInfo(updateDeptInfoVO);
|
|
|
return RespDTO.onSuc(data);
|
|
|
}
|
|
@@ -61,7 +64,7 @@ public class DeptInfoController {
|
|
|
@PostMapping("/deleteDeptInfo")
|
|
|
@SysLogger("deleteDeptInfo")
|
|
|
@Transactional
|
|
|
- public RespDTO<Boolean> deleteDeptInfo(@RequestBody UpdateDeptInfoVO updateDeptInfoVO) {
|
|
|
+ public RespDTO<Boolean> deleteDeptInfo(@Valid@RequestBody UpdateDeptInfoVO updateDeptInfoVO) {
|
|
|
Boolean data = deptInfoFacade.deleteDeptInfo(updateDeptInfoVO);
|
|
|
return RespDTO.onSuc(data);
|
|
|
}
|
|
@@ -70,9 +73,17 @@ public class DeptInfoController {
|
|
|
notes = "name: 科室名称 <br>")
|
|
|
@PostMapping("/getDeptInfo")
|
|
|
@SysLogger("getDeptInfo")
|
|
|
- @Transactional
|
|
|
- public RespDTO<IPage<DeptInfo>> getDeptInfo(@RequestBody GetDeptInfoVO getDeptInfoVO) {
|
|
|
+ public RespDTO<IPage<DeptInfo>> getDeptInfo(@Valid @RequestBody GetDeptInfoVO getDeptInfoVO) {
|
|
|
IPage<DeptInfo> data = deptInfoFacade.getDeptInfo(getDeptInfoVO);
|
|
|
return RespDTO.onSuc(data);
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "科室维护——详情[by:wangyu]",
|
|
|
+ notes = "deptId: 科室id <br>")
|
|
|
+ @PostMapping("/getDeptInfoDetials")
|
|
|
+ @SysLogger("getDeptInfoDetials")
|
|
|
+ public RespDTO<DeptInfo> getDeptInfoDetials(@Valid @RequestBody GetDeptInfoDetialsVO getDeptInfoDetialsVO) {
|
|
|
+ DeptInfo data = deptInfoFacade.getDeptInfoDetials(getDeptInfoDetialsVO);
|
|
|
+ return RespDTO.onSuc(data);
|
|
|
+ }
|
|
|
}
|