Commit 6adc3d2decd28a164d93b912e6f2dccc8254b01c
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 2 changed files
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
6adc3d2
... | ... | @@ -1709,6 +1709,15 @@ |
1709 | 1709 | } |
1710 | 1710 | |
1711 | 1711 | |
1712 | + @RequestMapping("/currentCheckBabyList") | |
1713 | + @ResponseBody | |
1714 | + @TokenRequired | |
1715 | + public Object currentCheckBabyList(HttpServletRequest request){ | |
1716 | + | |
1717 | + return babyCheckFacade.getCurrentDayCheckBabies(getUserId(request)); | |
1718 | + } | |
1719 | + | |
1720 | + | |
1712 | 1721 | |
1713 | 1722 | |
1714 | 1723 | @RequestMapping(value = "/handleSieveTime", method = RequestMethod.GET) |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
6adc3d2
... | ... | @@ -1746,5 +1746,58 @@ |
1746 | 1746 | } |
1747 | 1747 | return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
1748 | 1748 | } |
1749 | + | |
1750 | + | |
1751 | + public List<Map<String,String>> getCurrentDayCheckBabies(Integer userId) | |
1752 | + { | |
1753 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
1754 | + List<Map<String,String>> babyList = new ArrayList<>(); | |
1755 | + | |
1756 | + Date currentDay = DateUtil.parseYMD(DateUtil.getymd()); | |
1757 | + BabyCheckModelQuery query = new BabyCheckModelQuery(); | |
1758 | + query.setHospitalId(hospitalId); | |
1759 | + query.setYn(YnEnums.YES.getId()); | |
1760 | + query.setCheckDateStart(currentDay); | |
1761 | + query.setCheckDateEnd(currentDay); | |
1762 | + | |
1763 | + BabyModelQuery babyQuery = new BabyModelQuery(); | |
1764 | + babyQuery.setYn(YnEnums.YES.getId()); | |
1765 | + | |
1766 | + List<BabyCheckModel> babyCheckList = babyCheckService.queryBabyCheckRecord(query); | |
1767 | + List<BabyModel> babyModels = new ArrayList<>(); | |
1768 | + if (CollectionUtils.isNotEmpty(babyCheckList)) | |
1769 | + { | |
1770 | + for (BabyCheckModel babyCheck : babyCheckList) | |
1771 | + { | |
1772 | + String buildId = babyCheck.getBuildId(); | |
1773 | + if (StringUtils.isNotEmpty(buildId)) | |
1774 | + { | |
1775 | + babyQuery.setId(buildId); | |
1776 | + List<BabyModel> babyResult = babyBookbuildingService.queryBabyBuildByCond(babyQuery); | |
1777 | + babyModels.addAll(babyResult); | |
1778 | + } | |
1779 | + } | |
1780 | + } | |
1781 | + | |
1782 | + if (CollectionUtils.isNotEmpty(babyModels)) | |
1783 | + { | |
1784 | + for (BabyModel baby : babyModels) | |
1785 | + { | |
1786 | + Map<String,String> babyMap = new HashMap<>(); | |
1787 | + babyMap.put("id",baby.getId()); | |
1788 | + babyMap.put("name",baby.getName()); | |
1789 | + babyMap.put("birth",DateUtil.getyyyy_MM_dd(baby.getBirth())); | |
1790 | + babyMap.put("monthName",baby.getMname()); | |
1791 | + babyMap.put("monthPhone",baby.getMphone()); | |
1792 | + babyMap.put("mcardNo",baby.getMcertNo()); | |
1793 | + babyMap.put("mcertTypeId",baby.getMcertTypeId()); | |
1794 | + babyMap.put("vcCardNo",baby.getVcCardNo()); | |
1795 | + babyList.add(babyMap); | |
1796 | + } | |
1797 | + } | |
1798 | + | |
1799 | + return babyList; | |
1800 | + } | |
1801 | + | |
1749 | 1802 | } |