Commit 5abf4a68302417abd906b2ecda7a46c647c9291e
1 parent
7ed0970dad
Exists in
master
and in
6 other branches
1
Showing 2 changed files with 4 additions and 8 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TempController.java
View file @
5abf4a6
| ... | ... | @@ -73,9 +73,9 @@ |
| 73 | 73 | @TokenRequired |
| 74 | 74 | @RequestMapping(value = "/add",method = RequestMethod.POST) |
| 75 | 75 | @ResponseBody |
| 76 | - public BaseResponse addOnceTemp(@Valid TempAddRequest tempRequest,boolean flag,HttpServletRequest request) { | |
| 76 | + public BaseResponse addOnceTemp(@Valid TempAddRequest tempRequest,HttpServletRequest request) { | |
| 77 | 77 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 78 | - return tempFacade.addOrUpdateOneTemp(tempRequest,loginState.getId(),flag); | |
| 78 | + return tempFacade.addOrUpdateOneTemp(tempRequest,loginState.getId()); | |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TempFacade.java
View file @
5abf4a6
| ... | ... | @@ -65,7 +65,7 @@ |
| 65 | 65 | @Autowired |
| 66 | 66 | private MongoTemplate mongoTemplate; |
| 67 | 67 | |
| 68 | - public BaseResponse addOrUpdateOneTemp(TempAddRequest addRequest, Integer userId, boolean flag) { | |
| 68 | + public BaseResponse addOrUpdateOneTemp(TempAddRequest addRequest, Integer userId) { | |
| 69 | 69 | Assert.notNull(addRequest, "请求为空."); |
| 70 | 70 | String hospital = autoMatchFacade.getHospitalId(userId); |
| 71 | 71 | String parentId = mongoUtil.doHidePatient(addRequest.getParentId(), hospital); |
| ... | ... | @@ -102,11 +102,7 @@ |
| 102 | 102 | tempModel.setNow(addRequest.getTemp()); |
| 103 | 103 | tempModel.setCreated(new Date()); |
| 104 | 104 | tempModel.setModified(new Date()); |
| 105 | - if (flag) { | |
| 106 | - mongoTemplate.insert(tempModel); | |
| 107 | - } else { | |
| 108 | - tempService.addOneTemp(tempModel); | |
| 109 | - } | |
| 105 | + tempService.addOneTemp(tempModel); | |
| 110 | 106 | } |
| 111 | 107 | return new BaseResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); |
| 112 | 108 | } |