Commit 297d1a2d14985e5f45624cbe319da7daa1ab82c8

Authored by shiyang
1 parent f90e7aac16

儿保检查隆化指导意见修改

Showing 1 changed file with 21 additions and 1 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/GuideLineController.java View file @ 297d1a2
1 1 package com.lyms.platform.operate.web.controller;
2 2  
3 3 import com.lyms.platform.biz.service.GuidelinesService;
  4 +import com.lyms.platform.common.annotation.TokenRequired;
4 5 import com.lyms.platform.common.base.BaseController;
  6 +import com.lyms.platform.common.base.LoginContext;
  7 +import com.lyms.platform.operate.web.facade.AutoMatchFacade;
5 8 import com.lyms.platform.operate.web.request.GuideQuery;
6 9 import com.lyms.platform.pojo.Guidelines;
7 10 import com.lyms.platform.query.GuidelinesQuery;
8 11  
... ... @@ -12,7 +15,10 @@
12 15 import org.springframework.web.bind.annotation.RequestMethod;
13 16 import org.springframework.web.bind.annotation.ResponseBody;
14 17  
  18 +import javax.servlet.http.HttpServletRequest;
15 19 import javax.validation.Valid;
  20 +import java.io.UnsupportedEncodingException;
  21 +import java.net.URLEncoder;
16 22 import java.util.List;
17 23  
18 24 /**
19 25  
20 26  
... ... @@ -25,9 +31,23 @@
25 31 public class GuideLineController extends BaseController {
26 32 @Autowired
27 33 private GuidelinesService guidelinesService;
  34 + @Autowired
  35 + private AutoMatchFacade autoMatchFacade;
28 36 @ResponseBody
  37 + @TokenRequired
29 38 @RequestMapping(method = RequestMethod.GET,value = "/guide")
30   - public String matchGuide(@Valid GuideQuery guideQuery){
  39 + public String matchGuide(@Valid GuideQuery guideQuery, HttpServletRequest request) throws UnsupportedEncodingException {
  40 + Integer userId=((LoginContext) request.getAttribute("loginContext")).getId();
  41 + String hospitalId = autoMatchFacade.getHospitalId(userId);
  42 + //隆化定制儿保检查指导意见
  43 + if("2100001605".equals(hospitalId)){
  44 + String text="1.科学喂养\n" +
  45 + "2.生长发育\n" +
  46 + "3.疾病预防\n" +
  47 + "4.预防意外伤害\n" +
  48 + "5.口腔保健";
  49 + return text;
  50 + }
31 51 GuidelinesQuery guidelinesQuery=new GuidelinesQuery();
32 52 guidelinesQuery.setType(guideQuery.getType());
33 53 guidelinesQuery.setMaxStart(guideQuery.getNum());