Commit a381ebbc92d4752a1da657e9a9bf05a71f1d0ad4
1 parent
f4c5fa5296
Exists in
master
and in
1 other branch
s
Showing 3 changed files with 19 additions and 7 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/BabyModel.java
View file @
a381ebb
| ... | ... | @@ -207,6 +207,16 @@ |
| 207 | 207 | //分娩孕周 |
| 208 | 208 | private Integer dueWeek; |
| 209 | 209 | private String enable; |
| 210 | + //操作人 | |
| 211 | + private Integer operator; | |
| 212 | + | |
| 213 | + public Integer getOperator() { | |
| 214 | + return operator; | |
| 215 | + } | |
| 216 | + | |
| 217 | + public void setOperator(Integer operator) { | |
| 218 | + this.operator = operator; | |
| 219 | + } | |
| 210 | 220 | |
| 211 | 221 | public String getEnable() { |
| 212 | 222 | return enable; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBookbuildingController.java
View file @
a381ebb
| ... | ... | @@ -42,11 +42,13 @@ |
| 42 | 42 | */ |
| 43 | 43 | @RequestMapping(method = RequestMethod.POST, value = "/addOrUpBabyBuild") |
| 44 | 44 | @ResponseBody |
| 45 | - public BaseResponse addOrUpBabyBuild(@Valid @RequestBody BabyBookbuildingAddRequest request) { | |
| 45 | + @TokenRequired | |
| 46 | + public BaseResponse addOrUpBabyBuild(@Valid @RequestBody BabyBookbuildingAddRequest request,HttpServletRequest httpServletRequest) { | |
| 47 | + LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext"); | |
| 46 | 48 | if (request != null && !StringUtils.isEmpty(request.getId())) { |
| 47 | - return babyBookbuildingFacade.updateBabyBookbuilding(request); | |
| 49 | + return babyBookbuildingFacade.updateBabyBookbuilding(request,loginState.getId()); | |
| 48 | 50 | } |
| 49 | - return babyBookbuildingFacade.addBabyBookbuilding(request); | |
| 51 | + return babyBookbuildingFacade.addBabyBookbuilding(request,loginState.getId()); | |
| 50 | 52 | } |
| 51 | 53 | |
| 52 | 54 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
a381ebb
| ... | ... | @@ -177,10 +177,10 @@ |
| 177 | 177 | * @param request |
| 178 | 178 | * @return |
| 179 | 179 | */ |
| 180 | - public BaseResponse updateBabyBookbuilding(BabyBookbuildingAddRequest request) { | |
| 180 | + public BaseResponse updateBabyBookbuilding(BabyBookbuildingAddRequest request,Integer userId) { | |
| 181 | 181 | BabyModel model = getBabyModel(request); |
| 182 | 182 | model.setModified(new Date()); |
| 183 | - | |
| 183 | + model.setOperator(userId); | |
| 184 | 184 | if (StringUtils.isNotEmpty(request.getMommyCertificateNum())) { |
| 185 | 185 | |
| 186 | 186 | String cardId = request.getMommyCertificateNum() + |
| ... | ... | @@ -265,7 +265,7 @@ |
| 265 | 265 | * @param request |
| 266 | 266 | * @return |
| 267 | 267 | */ |
| 268 | - public BaseObjectResponse addBabyBookbuilding(BabyBookbuildingAddRequest request) { | |
| 268 | + public BaseObjectResponse addBabyBookbuilding(BabyBookbuildingAddRequest request,Integer userId) { | |
| 269 | 269 | BaseObjectResponse br = new BaseObjectResponse(); |
| 270 | 270 | |
| 271 | 271 | //判断儿童是否建档在该医院 |
| ... | ... | @@ -456,7 +456,7 @@ |
| 456 | 456 | |
| 457 | 457 | BabyModel model = getBabyModel(request); |
| 458 | 458 | model.setPid(babyPersonId); |
| 459 | - | |
| 459 | + model.setOperator(userId); | |
| 460 | 460 | if (StringUtils.isNotEmpty(request.getMommyCertificateNum())) { |
| 461 | 461 | |
| 462 | 462 | String cardId = request.getMommyCertificateNum() + |