Commit 24cd15ea1423577f8c12523a274eb6cf6a5b4b20
1 parent
061e478edf
Exists in
master
and in
6 other branches
儿童眼保健检查
Showing 5 changed files with 70 additions and 28 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyEyeCheckController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/BabyEyeCheckService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
View file @
24cd15e
... | ... | @@ -279,7 +279,8 @@ |
279 | 279 | * 唐山零时限制 |
280 | 280 | */ |
281 | 281 | Organization organization = organizationService.getOrganization(usersService.getUsers(((LoginContext) request.getAttribute("loginContext")).getId()).getOrgId()); |
282 | - if ("4".equals(organization.getCityId())) | |
282 | + //遵化市妇幼保健院单独放开 | |
283 | + if (!"1000000094".equals(String.valueOf(organization.getId())) && "4".equals(organization.getCityId())) | |
283 | 284 | { |
284 | 285 | String date = DateUtil.getyyyy_MM_dd(DateUtil.addMonth(new Date(), -3))+" - "+DateUtil.getyyyy_MM_dd(new Date()); |
285 | 286 | antExManagerQueryRequest.setcTime(date); |
... | ... | @@ -333,7 +334,8 @@ |
333 | 334 | * 唐山零时限制 |
334 | 335 | */ |
335 | 336 | Organization organization = organizationService.getOrganization(usersService.getUsers(((LoginContext) request.getAttribute("loginContext")).getId()).getOrgId()); |
336 | - if ("4".equals(organization.getCityId())) | |
337 | + //遵化市妇幼保健院单独放开 | |
338 | + if (!"1000000094".equals(String.valueOf(organization.getId())) && "4".equals(organization.getCityId())) | |
337 | 339 | { |
338 | 340 | String date = DateUtil.getyyyy_MM_dd(DateUtil.addMonth(new Date(), -3))+" - "+DateUtil.getyyyy_MM_dd(new Date()); |
339 | 341 | antExManagerQueryRequest.setcTime(date); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyEyeCheckController.java
View file @
24cd15e
... | ... | @@ -153,7 +153,7 @@ |
153 | 153 | Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin,String noPassIds) { |
154 | 154 | return babyEyeCheckService.list(getUserId(request), startDate, endDate, doctor, key, |
155 | 155 | currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, page, limit, |
156 | - bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin,noPassIds); | |
156 | + bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin, noPassIds); | |
157 | 157 | } |
158 | 158 | |
159 | 159 | /** |
160 | 160 | |
... | ... | @@ -167,9 +167,9 @@ |
167 | 167 | @RequestMapping(value = "/childrenFilingList", method = RequestMethod.GET) |
168 | 168 | public BaseResponse childrenFilingList( Date startBuildDate, Date endBuildDate,Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, Integer page, Integer limit, HttpServletRequest request, |
169 | 169 | Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin,String noPassIds) { |
170 | - return babyEyeCheckService.childrenFilingList(getUserId(request),startBuildDate, endBuildDate,startDate, endDate, doctor, key, | |
170 | + return babyEyeCheckService.childrenFilingList(getUserId(request), startBuildDate, endBuildDate, startDate, endDate, doctor, key, | |
171 | 171 | currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, page, limit, |
172 | - bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin,noPassIds); | |
172 | + bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin, noPassIds); | |
173 | 173 | } |
174 | 174 | @ResponseBody |
175 | 175 | @TokenRequired |
... | ... | @@ -184,6 +184,21 @@ |
184 | 184 | public BaseResponse listInit( HttpServletRequest request) { |
185 | 185 | return babyEyeCheckService.listInit(getUserId(request)); |
186 | 186 | } |
187 | + | |
188 | + | |
189 | + /** | |
190 | + * 用于小程序调去儿童眼保检查 | |
191 | + * @param request | |
192 | + * @param hospitalId | |
193 | + * @param babyId | |
194 | + * @return | |
195 | + */ | |
196 | + @ResponseBody | |
197 | + @RequestMapping(value = "/getBabyEyeCheckInfo", method = RequestMethod.GET) | |
198 | + public BaseResponse getBabyEyeCheckInfo(HttpServletRequest request,@RequestParam String hospitalId,@RequestParam String babyId) { | |
199 | + return babyEyeCheckService.getBabyEyeCheckInfo(hospitalId,babyId); | |
200 | + } | |
201 | + | |
187 | 202 | |
188 | 203 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
View file @
24cd15e
... | ... | @@ -149,7 +149,8 @@ |
149 | 149 | * 唐山零时限制 |
150 | 150 | */ |
151 | 151 | Organization organization = organizationService.getOrganization(usersService.getUsers(((LoginContext) request.getAttribute("loginContext")).getId()).getOrgId()); |
152 | - if ("4".equals(organization.getCityId())) | |
152 | + //遵化市妇幼保健院单独放开 | |
153 | + if (!"1000000094".equals(String.valueOf(organization.getId())) && "4".equals(organization.getCityId())) | |
153 | 154 | { |
154 | 155 | String date = DateUtil.getyyyy_MM_dd(DateUtil.addMonth(new Date(), -3))+" - "+DateUtil.getyyyy_MM_dd(new Date()); |
155 | 156 | patientsQueryRequest.setBuildTime(date); |
... | ... | @@ -528,7 +529,8 @@ |
528 | 529 | * 唐山零时限制 |
529 | 530 | */ |
530 | 531 | Organization organization = organizationService.getOrganization(usersService.getUsers(((LoginContext) request.getAttribute("loginContext")).getId()).getOrgId()); |
531 | - if ("4".equals(organization.getCityId())) | |
532 | + //遵化市妇幼保健院单独放开 | |
533 | + if (!"1000000094".equals(String.valueOf(organization.getId())) && "4".equals(organization.getCityId())) | |
532 | 534 | { |
533 | 535 | String date = DateUtil.getyyyy_MM_dd(DateUtil.addMonth(new Date(), -3))+" - "+DateUtil.getyyyy_MM_dd(new Date()); |
534 | 536 | patientsQueryRequest.setBuildTime(date); |
... | ... | @@ -559,7 +561,8 @@ |
559 | 561 | * 唐山零时限制 |
560 | 562 | */ |
561 | 563 | Organization organization = organizationService.getOrganization(usersService.getUsers(((LoginContext) httpServletRequest.getAttribute("loginContext")).getId()).getOrgId()); |
562 | - if ("4".equals(organization.getCityId())) | |
564 | + //遵化市妇幼保健院单独放开 | |
565 | + if (!"1000000094".equals(String.valueOf(organization.getId())) && "4".equals(organization.getCityId())) | |
563 | 566 | { |
564 | 567 | String date = DateUtil.getyyyy_MM_dd(DateUtil.addMonth(new Date(),-3))+" - "+DateUtil.getyyyy_MM_dd(new Date()); |
565 | 568 | patientManagerRequest.setBookBuildingDate(date); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/BabyEyeCheckService.java
View file @
24cd15e
... | ... | @@ -43,5 +43,7 @@ |
43 | 43 | BaseResponse listInit(Integer userId); |
44 | 44 | |
45 | 45 | void export(Integer userId, Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, HttpServletResponse response, Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin); |
46 | + | |
47 | + BaseResponse getBabyEyeCheckInfo(String hospitalId, String babyId); | |
46 | 48 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java
View file @
24cd15e
... | ... | @@ -51,16 +51,13 @@ |
51 | 51 | public class BabyEyeCheckServiceImpl extends BaseServiceImpl implements BabyEyeCheckService { |
52 | 52 | @Autowired |
53 | 53 | private BabyEyeCheckMapper babyEyeCheckMapper; |
54 | + | |
54 | 55 | @Autowired |
55 | - private OrganizationGroupsFacade groupsFacade; | |
56 | - @Autowired | |
57 | 56 | private BabyBookbuildingService babyBookbuildingService; |
58 | 57 | @Autowired |
59 | 58 | private AutoMatchFacade autoMatchFacade; |
59 | + | |
60 | 60 | @Autowired |
61 | - @Qualifier("commonThreadPool") | |
62 | - private ThreadPoolTaskExecutor commonThreadPool; | |
63 | - @Autowired | |
64 | 61 | private MongoTemplate mongoTemplate; |
65 | 62 | @Autowired |
66 | 63 | private OrganizationService organizationService; |
67 | 64 | |
... | ... | @@ -429,10 +426,15 @@ |
429 | 426 | |
430 | 427 | @Override |
431 | 428 | public BaseResponse info(String id) { |
429 | + Map<String, Object> map= getEyeCheckView(id); | |
430 | + return RespBuilder.buildSuccess(map); | |
431 | + } | |
432 | + | |
433 | + | |
434 | + private Map<String, Object> getEyeCheckView(String id) | |
435 | + { | |
432 | 436 | BabyEyeCheck babyEyeCheck = mongoTemplate.findById(id, BabyEyeCheck.class); |
433 | - if (babyEyeCheck == null) { | |
434 | - return RespBuilder.buildSuccess(); | |
435 | - } | |
437 | + | |
436 | 438 | Map<String, Object> map = ReflectionUtils.beanToMap(babyEyeCheck); |
437 | 439 | map.put("eyeMovementsId", "xz".equals(babyEyeCheck.getEyeMovementsId()) ? "限制" : "xt".equals(babyEyeCheck.getEyeMovementsId()) ? "协调" : "qhz".equals(babyEyeCheck.getEyeMovementsId()) ? "欠合作" : ""); |
438 | 440 | map.put("nystagmus", parseYinYang(babyEyeCheck.getNystagmus())); |
... | ... | @@ -579,7 +581,7 @@ |
579 | 581 | map.put("filePath", filePath); |
580 | 582 | // |
581 | 583 | CollectionUtils.removeNullValue(map); |
582 | - return RespBuilder.buildSuccess(map); | |
584 | + return map; | |
583 | 585 | } |
584 | 586 | |
585 | 587 | /** |
... | ... | @@ -1958,6 +1960,8 @@ |
1958 | 1960 | ResponseUtil.responseExcel(cnames, results, response); |
1959 | 1961 | } |
1960 | 1962 | |
1963 | + | |
1964 | + | |
1961 | 1965 | private void syncData(String action, Object data, String id) { |
1962 | 1966 | try { |
1963 | 1967 | SyncDataModel model = new SyncDataModel(); |
1964 | 1968 | |
1965 | 1969 | |
1966 | 1970 | |
1967 | 1971 | |
1968 | 1972 | |
1969 | 1973 | |
... | ... | @@ -1979,23 +1983,39 @@ |
1979 | 1983 | } |
1980 | 1984 | } |
1981 | 1985 | |
1986 | + @Override | |
1987 | + public BaseResponse getBabyEyeCheckInfo(String hospitalId, String babyId) { | |
1982 | 1988 | |
1983 | - public static void main(String[] args) { | |
1984 | - List<String> ls = new ArrayList<>(); | |
1985 | - ls.add("1"); | |
1986 | - ls.add("2"); | |
1987 | - ls.add("3"); | |
1988 | - ls.add("4"); | |
1989 | 1989 | |
1990 | - List<String> ls2 = new ArrayList<>(); | |
1991 | - ls2.add("1"); | |
1992 | - ls2.add("6"); | |
1990 | + List<Map> datas = new ArrayList<>(); | |
1993 | 1991 | |
1994 | - System.out.println(ls.containsAll(ls2)); | |
1992 | + List<BabyEyeCheck> babyEyeChecks = mongoTemplate.find(Query.query(Criteria.where("babyId").is(babyId).and("hospitalId").is(hospitalId).and("yn").ne("0")) | |
1993 | + .with(new Sort(Sort.Direction.ASC, "checkTime")), BabyEyeCheck.class); | |
1994 | + for (BabyEyeCheck babyEyeCheck : babyEyeChecks) { | |
1995 | + Map<String, Object> temp = new HashMap<>(); | |
1996 | + temp.put("id", babyEyeCheck.getId()); | |
1997 | + temp.put("hospitalId", babyEyeCheck.getHospitalId()); | |
1998 | + temp.put("pid", babyEyeCheck.getPid()); | |
1999 | + temp.put("checkMonth", CheckMonthEnums.getName(babyEyeCheck.getCheckMonthId())); | |
2000 | + BabyModel babyModel = mongoTemplate.findById(babyEyeCheck.getBabyId(), BabyModel.class); | |
2001 | + if (babyModel != null) { | |
2002 | + temp.put("name", babyModel.getName()); | |
2003 | + if (babyModel.getSex() != null) { | |
2004 | + temp.put("sex", SexEnum.getTextById(babyModel.getSex())); | |
2005 | + } | |
2006 | + } | |
2007 | + temp.put("checkTime", babyEyeCheck.getCheckTime() == null ? null : DateUtil.getYyyyMmDd(babyEyeCheck.getCheckTime())); | |
2008 | + temp.put("type", "2"); | |
2009 | + CollectionUtils.removeNullValue(temp); | |
1995 | 2010 | |
2011 | + Map<String, Object> map = getEyeCheckView(babyEyeCheck.getId()); | |
2012 | + temp.put("viewData",map); | |
1996 | 2013 | |
1997 | - } | |
2014 | + datas.add(temp); | |
2015 | + } | |
2016 | + return new BaseObjectResponse().setData(datas).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
1998 | 2017 | |
2018 | + } | |
1999 | 2019 | |
2000 | 2020 | } |