Commit f97736644e472c37fefe2193518b459ba90cff79

Authored by liquanyu
1 parent f6490ed7a2

update

Showing 3 changed files with 102 additions and 102 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabayDeathController.java View file @ f977366
1   -package com.lyms.platform.operate.web.controller;
2   -
3   -import com.fasterxml.jackson.annotation.JsonAlias;
4   -import com.lyms.platform.common.annotation.TokenRequired;
5   -import com.lyms.platform.common.base.BaseController;
6   -import com.lyms.platform.common.result.BaseListResponse;
7   -import com.lyms.platform.common.result.BaseResponse;
8   -import com.lyms.platform.operate.web.request.*;
9   -import com.lyms.platform.operate.web.service.IBabyDeathServer;
10   -import com.lyms.platform.operate.web.service.IPregnantDeathServer;
11   -import org.springframework.beans.factory.annotation.Autowired;
12   -import org.springframework.stereotype.Controller;
13   -import org.springframework.web.bind.annotation.RequestBody;
14   -import org.springframework.web.bind.annotation.RequestMapping;
15   -import org.springframework.web.bind.annotation.RequestMethod;
16   -import org.springframework.web.bind.annotation.ResponseBody;
17   -
18   -import javax.servlet.http.HttpServletRequest;
19   -
20   -/**
21   - * @author dongqin
22   - * @description 儿童死亡报告卡
23   - * @date 16:05 2019/11/29
24   - **/
25   -@Controller
26   -@RequestMapping("/babyDeath")
27   -public class BabayDeathController extends BaseController {
28   -
29   - @Autowired
30   - private IBabyDeathServer babyDeathServer;
31   -
32   - /**
33   - *
34   - * 根据身份证号获取对应的建档信息
35   - *
36   - * @param param
37   - * @return
38   - */
39   - @RequestMapping(method = RequestMethod.GET, value = "/getPatientInfoByIdCard")
40   - @ResponseBody
41   - @TokenRequired
42   - public BaseResponse getPatientInfoByIdCard(@JsonAlias CommonParamRequest param,HttpServletRequest request) {
43   - return babyDeathServer.getPatientInfoByIdCard(param,getUserId(request));
44   - }
45   -
46   -
47   - /**
48   - * 保存单个
49   - *
50   - * @param param
51   - * @return
52   - */
53   - @RequestMapping(method = RequestMethod.POST, value = "/add")
54   - @ResponseBody
55   - @TokenRequired
56   - public BaseResponse add(@RequestBody BabyDeathRequest param, HttpServletRequest request) {
57   - param.setUserId(getUserId(request).toString());
58   - return babyDeathServer.add(param,getUserId(request));
59   - }
60   -
61   - /**
62   - * 编辑单个
63   - *
64   - * @param param
65   - * @return
66   - */
67   - @RequestMapping(method = RequestMethod.POST, value = "/edit")
68   - @ResponseBody
69   - @TokenRequired
70   - public BaseResponse edit( @RequestBody BabyDeathRequest param) {
71   - return babyDeathServer.edit(param);
72   - }
73   -
74   - /**
75   - * 列表
76   - *
77   - * @param param
78   - * @return
79   - */
80   - @RequestMapping(method = RequestMethod.GET, value = "/listPage")
81   - @ResponseBody
82   - @TokenRequired
83   - public BaseListResponse listPage(@JsonAlias BabyDeathListRequest param,HttpServletRequest request) {
84   - return babyDeathServer.listPage(param,getUserId(request));
85   - }
86   -
87   - /**
88   - * 单个查询
89   - *
90   - * @param param
91   - * @return
92   - */
93   - @RequestMapping(method = RequestMethod.GET, value = "/detail")
94   - @ResponseBody
95   - @TokenRequired
96   - public BaseResponse detail( @JsonAlias BabyDeathRequest param) {
97   - return babyDeathServer.detail(param);
98   - }
99   -
100   -
101   -}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyDeathController.java View file @ f977366
  1 +package com.lyms.platform.operate.web.controller;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonAlias;
  4 +import com.lyms.platform.common.annotation.TokenRequired;
  5 +import com.lyms.platform.common.base.BaseController;
  6 +import com.lyms.platform.common.result.BaseListResponse;
  7 +import com.lyms.platform.common.result.BaseResponse;
  8 +import com.lyms.platform.operate.web.request.*;
  9 +import com.lyms.platform.operate.web.service.IBabyDeathServer;
  10 +import com.lyms.platform.operate.web.service.IPregnantDeathServer;
  11 +import org.springframework.beans.factory.annotation.Autowired;
  12 +import org.springframework.stereotype.Controller;
  13 +import org.springframework.web.bind.annotation.RequestBody;
  14 +import org.springframework.web.bind.annotation.RequestMapping;
  15 +import org.springframework.web.bind.annotation.RequestMethod;
  16 +import org.springframework.web.bind.annotation.ResponseBody;
  17 +
  18 +import javax.servlet.http.HttpServletRequest;
  19 +
  20 +/**
  21 + * @author dongqin
  22 + * @description 儿童死亡报告卡
  23 + * @date 16:05 2019/11/29
  24 + **/
  25 +@Controller
  26 +@RequestMapping("/babyDeath")
  27 +public class BabyDeathController extends BaseController {
  28 +
  29 + @Autowired
  30 + private IBabyDeathServer babyDeathServer;
  31 +
  32 + /**
  33 + *
  34 + * 根据身份证号获取对应的建档信息
  35 + *
  36 + * @param param
  37 + * @return
  38 + */
  39 + @RequestMapping(method = RequestMethod.GET, value = "/getPatientInfoByIdCard")
  40 + @ResponseBody
  41 + @TokenRequired
  42 + public BaseResponse getPatientInfoByIdCard(@JsonAlias CommonParamRequest param,HttpServletRequest request) {
  43 + return babyDeathServer.getPatientInfoByIdCard(param,getUserId(request));
  44 + }
  45 +
  46 +
  47 + /**
  48 + * 保存单个
  49 + *
  50 + * @param param
  51 + * @return
  52 + */
  53 + @RequestMapping(method = RequestMethod.POST, value = "/add")
  54 + @ResponseBody
  55 + @TokenRequired
  56 + public BaseResponse add(@RequestBody BabyDeathRequest param, HttpServletRequest request) {
  57 + param.setUserId(getUserId(request).toString());
  58 + return babyDeathServer.add(param,getUserId(request));
  59 + }
  60 +
  61 + /**
  62 + * 编辑单个
  63 + *
  64 + * @param param
  65 + * @return
  66 + */
  67 + @RequestMapping(method = RequestMethod.POST, value = "/edit")
  68 + @ResponseBody
  69 + @TokenRequired
  70 + public BaseResponse edit( @RequestBody BabyDeathRequest param) {
  71 + return babyDeathServer.edit(param);
  72 + }
  73 +
  74 + /**
  75 + * 列表
  76 + *
  77 + * @param param
  78 + * @return
  79 + */
  80 + @RequestMapping(method = RequestMethod.GET, value = "/listPage")
  81 + @ResponseBody
  82 + @TokenRequired
  83 + public BaseListResponse listPage(@JsonAlias BabyDeathListRequest param,HttpServletRequest request) {
  84 + return babyDeathServer.listPage(param,getUserId(request));
  85 + }
  86 +
  87 + /**
  88 + * 单个查询
  89 + *
  90 + * @param param
  91 + * @return
  92 + */
  93 + @RequestMapping(method = RequestMethod.GET, value = "/detail")
  94 + @ResponseBody
  95 + @TokenRequired
  96 + public BaseResponse detail( @JsonAlias BabyDeathRequest param) {
  97 + return babyDeathServer.detail(param);
  98 + }
  99 +
  100 +
  101 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyDeathServerImpl.java View file @ f977366
... ... @@ -240,7 +240,7 @@
240 240 Query query = new Query();
241 241 String code = param.getCode();
242 242 if (StringUtils.isNotEmpty(code)) {
243   - query.addCriteria(Criteria.where("code").is(code));
  243 + query.addCriteria(Criteria.where("number").is(code));
244 244 }
245 245  
246 246 String cardNo = param.getCardNo();