12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- package com.diagbot.web;
- import java.util.List;
- import java.util.Map;
- import javax.validation.Valid;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import com.diagbot.annotation.SysLogger;
- import com.diagbot.dto.DoctorInfoDTO;
- import com.diagbot.dto.RespDTO;
- import com.diagbot.entity.DoctorInfo;
- import com.diagbot.facade.DoctorInfoFacade;
- import com.diagbot.vo.DoctorInfoVO;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import springfox.documentation.annotations.ApiIgnore;
- /**
- * <p>
- * 医生信息表 前端控制器
- * </p>
- *
- * @author wangyu
- * @since 2018-11-19
- */
- @RestController
- @RequestMapping("/doctorInfo")
- @Api(value = "医生信息API", tags = { "医生信息API" })
- @SuppressWarnings("unchecked")
- /*@ApiIgnore*/
- public class DoctorInfoController {
- @Autowired
- private DoctorInfoFacade doctorInfoFacade;
-
- @ApiOperation(value = "医生信息——保存[by:QQ]",
- notes = "deptCode:科室编号,必填<br>" +
- "hospitalCode: 医院编号,必填<br>" +
- "doctorCode: 医生编号,必填<br>")
- @PostMapping("/saveDoctorInfo")
- @SysLogger("saveDoctorInfo")
- @ApiIgnore
- public RespDTO<Boolean> saveDoctorInfo(@Valid @RequestBody DoctorInfoVO doctorInfoVo){
- Boolean res = doctorInfoFacade.createDoctor(doctorInfoVo);
- return RespDTO.onSuc(res);
- }
- @ApiOperation(value = "医生信息——查询[by:wangyu]",
- notes = "deptCode:科室编号,必填<br>" +
- "hospitalCode: 医院编号,必填<br>" +
- "doctorCode: 医生编号,必填<br>")
- @PostMapping("/getDoctorInfo")
- @SysLogger("getDoctorInfo")
- @ApiIgnore
- public RespDTO<List<DoctorInfoDTO>> getDoctorInfo(@Valid @RequestBody DoctorInfoVO doctorInfoVo) {
- List<DoctorInfoDTO> data = doctorInfoFacade.getDoctorInfo(doctorInfoVo);
- return RespDTO.onSuc(data);
- }
-
- @PostMapping(value = "/doctorInfoMapByIds")
- @SysLogger("doctorInfoMapByIds")
- @ApiOperation(value = "根据ids获取医生信息map[by:rengb]")
- @ApiIgnore
- RespDTO<Map<Long, DoctorInfo>> doctorInfoMapByIds(@RequestBody List<Long> ids) {
- Map<Long, DoctorInfo> result = doctorInfoFacade.doctorInfoMapByIds(ids);
- return RespDTO.onSuc(result);
- }
- }
|