DoctorPageModeController.java 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package com.diagbot.web;
  2. import com.diagbot.annotation.SysLogger;
  3. import com.diagbot.dto.DoctorPageModeDTO;
  4. import com.diagbot.dto.RespDTO;
  5. import com.diagbot.facade.DoctorPageModeFacade;
  6. import com.diagbot.vo.DoctorIdVO;
  7. import com.diagbot.vo.DoctorPageModeAllVO;
  8. import com.diagbot.vo.DoctorPageModeVO;
  9. import io.swagger.annotations.Api;
  10. import io.swagger.annotations.ApiOperation;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import org.springframework.transaction.annotation.Transactional;
  13. import org.springframework.web.bind.annotation.PostMapping;
  14. import org.springframework.web.bind.annotation.RequestBody;
  15. import org.springframework.web.bind.annotation.RequestMapping;
  16. import org.springframework.web.bind.annotation.RestController;
  17. import javax.validation.Valid;
  18. import java.util.List;
  19. /**
  20. * <p>
  21. *
  22. * </p>
  23. *
  24. * @author wangfeng
  25. * @since 2018-11-20
  26. */
  27. /**
  28. * @author wangfeng
  29. * @Description: 医生页面结构设置(文本和半结构) 前端控制器
  30. * @date 2018年11月20日 下午2:50:40
  31. */
  32. @RestController
  33. @RequestMapping("/doctorPageMode")
  34. @Api(value = "医生页面结构设置API[by:wangfeng]", tags = { "WF——医生页面结构设置API" })
  35. @SuppressWarnings("unchecked")
  36. public class DoctorPageModeController {
  37. @Autowired
  38. DoctorPageModeFacade doctorPageModeFacade;
  39. @ApiOperation(value = "保存医生页面结构设置信息[by:wangfeng]",
  40. notes = "医生id : doctorId;</br>模式分类: modeClassify;</br> 模式值: modeValue;")
  41. @PostMapping("/saveDoctorPageModes")
  42. @SysLogger("saveDoctorPageModes")
  43. @Transactional
  44. public RespDTO<Boolean> saveDoctorPageModes(@Valid @RequestBody DoctorPageModeAllVO doctorPageModeAllVO) {
  45. boolean res = doctorPageModeFacade.saveDoctorPageMode(doctorPageModeAllVO);
  46. return RespDTO.onSuc(res);
  47. }
  48. @ApiOperation(value = "获取医生页面结构设置信息[by:wangfeng]", notes = "获取医生页面结构设置信息</br>" +
  49. "添加四个配置:1:现病史是否默认选择(0不选择)</br>" +
  50. "2:其它史是否默认选择(0不选择)</br>" +
  51. "3:字体方案(0标准,1较大)</br>" +
  52. "4:颜色方案(0黑,1灰)")
  53. @PostMapping("/getDoctorPageModes")
  54. @SysLogger("getDoctorPageModes")
  55. public RespDTO<List<DoctorPageModeDTO>> getDoctorPageModes(@Valid @RequestBody DoctorIdVO doctorIdVO) {
  56. List<DoctorPageModeDTO> doctorPageModeData = doctorPageModeFacade.getDoctorPageMode(doctorIdVO);
  57. return RespDTO.onSuc(doctorPageModeData);
  58. }
  59. }