From 83412113b41fea8c792463c0c7910383f90a2d02 Mon Sep 17 00:00:00 2001 From: liquanyu Date: Thu, 22 Sep 2016 11:45:26 +0800 Subject: [PATCH] code update --- .../lyms/platform/operate/web/facade/StopPregnancyFacade.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/StopPregnancyFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/StopPregnancyFacade.java index ffc9c2a..c636f58 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/StopPregnancyFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/StopPregnancyFacade.java @@ -346,10 +346,15 @@ public class StopPregnancyFacade { List list = new ArrayList<>(); if (id != null) { - Users dbuser = usersService.getUsers(id); + UsersQuery query = new UsersQuery(); + query.setYn(YnEnums.YES.getId()); + query.setEnable(1); + query.setId(id); + List dbusers = usersService.queryUsers(query); - if (dbuser != null) + if (CollectionUtils.isNotEmpty(dbusers)) { + Users dbuser = dbusers.get(0); UsersQuery usersQuery = new UsersQuery(); usersQuery.setYn(YnEnums.YES.getId()); usersQuery.setOrgId(dbuser.getOrgId()); @@ -357,7 +362,7 @@ public class StopPregnancyFacade { { usersQuery.setDeptId(dbuser.getDeptId()); } - List users = usersService.queryUsers2(usersQuery); + List users = usersService.queryUsers(usersQuery); if (CollectionUtils.isNotEmpty(users)) { -- 1.8.3.1