Commit 114ea2d5df682d95e976899bd203447572308f61
1 parent
0cac4e2e27
Exists in
master
and in
1 other branch
新增删除叶酸接口
Showing 2 changed files with 23 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FolicAcidController.java
View file @
114ea2d
... | ... | @@ -57,6 +57,17 @@ |
57 | 57 | return folicAcidFacade.queryFolicAcid(folicAcidQueryRequest); |
58 | 58 | } |
59 | 59 | |
60 | + //删除叶酸发放记录 | |
61 | + @RequestMapping(value = "/deleteFolicAcid", method = RequestMethod.DELETE) | |
62 | + @ResponseBody | |
63 | +// @TokenRequired | |
64 | + public BaseResponse deleteFolicAcid(@RequestParam("id") String id, | |
65 | + HttpServletRequest request) { | |
66 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
67 | + return folicAcidFacade.deleteFolicAcid(id,792); | |
68 | + } | |
69 | + | |
70 | + | |
60 | 71 | //叶酸数据导出 |
61 | 72 | @RequestMapping(value = "/folicAcidExport", method = RequestMethod.GET) |
62 | 73 | @ResponseBody |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/FolicAcidFacade.java
View file @
114ea2d
... | ... | @@ -19,14 +19,12 @@ |
19 | 19 | import com.lyms.platform.permission.model.Users; |
20 | 20 | import com.lyms.platform.permission.service.OrganizationService; |
21 | 21 | import com.lyms.platform.permission.service.UsersService; |
22 | -import com.lyms.platform.pojo.BasicConfig; | |
23 | 22 | import com.lyms.platform.pojo.FolicAcid; |
24 | 23 | import com.lyms.platform.pojo.ResidentsArchiveModel; |
25 | 24 | import com.lyms.platform.query.FolicAcidQuery; |
26 | 25 | import com.lyms.platform.query.ResidentsArchiveQuery; |
27 | 26 | import org.apache.commons.collections.CollectionUtils; |
28 | 27 | import org.apache.commons.lang.StringUtils; |
29 | -import org.apache.struts.config.BaseConfig; | |
30 | 28 | import org.springframework.beans.factory.annotation.Autowired; |
31 | 29 | import org.springframework.stereotype.Component; |
32 | 30 | |
... | ... | @@ -286,6 +284,18 @@ |
286 | 284 | baseListResponse.setData(list); |
287 | 285 | baseListResponse.setPageInfo(folicAcidQuery.getPageInfo()); |
288 | 286 | return baseListResponse; |
287 | + } | |
288 | + | |
289 | + public BaseResponse deleteFolicAcid(String id,Integer userId){ | |
290 | + BaseResponse br = new BaseResponse(); | |
291 | + if (StringUtils.isNotEmpty(id)){ | |
292 | + FolicAcid folicAcid = folicAcidService.getFolicAcid(id); | |
293 | + folicAcid.setYn(YnEnums.NO.getId()); | |
294 | + folicAcid.setModified(new Date()); | |
295 | + folicAcidService.updateFolicAcid(folicAcid,id); | |
296 | + return br.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
297 | + } | |
298 | + return br.setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("id is null"); | |
289 | 299 | } |
290 | 300 | |
291 | 301 | //叶酸发放导出 |