Commit 62a4b01a66f048189b65a693853d0b38dd22ebde
1 parent
c25fa04f66
Exists in
master
and in
6 other branches
儿童检查列表
Showing 3 changed files with 52 additions and 22 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java
View file @
62a4b01
... | ... | @@ -229,5 +229,19 @@ |
229 | 229 | } |
230 | 230 | |
231 | 231 | |
232 | + /** | |
233 | + * 当天检查的儿童列表 | |
234 | + * @param request | |
235 | + * @return | |
236 | + */ | |
237 | + @RequestMapping("/currentCheckBabyList") | |
238 | + @ResponseBody | |
239 | + @TokenRequired | |
240 | + public Object currentCheckBabyList(HttpServletRequest request){ | |
241 | + | |
242 | + return babyCheckFacade.getCurrentDayCheckBabies(getUserId(request)); | |
243 | + } | |
244 | + | |
245 | + | |
232 | 246 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
62a4b01
... | ... | @@ -1709,13 +1709,7 @@ |
1709 | 1709 | } |
1710 | 1710 | |
1711 | 1711 | |
1712 | - @RequestMapping("/currentCheckBabyList") | |
1713 | - @ResponseBody | |
1714 | - @TokenRequired | |
1715 | - public Object currentCheckBabyList(HttpServletRequest request){ | |
1716 | 1712 | |
1717 | - return babyCheckFacade.getCurrentDayCheckBabies(getUserId(request)); | |
1718 | - } | |
1719 | 1713 | |
1720 | 1714 | |
1721 | 1715 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
62a4b01
... | ... | @@ -8,10 +8,7 @@ |
8 | 8 | import com.lyms.platform.common.result.BaseResponse; |
9 | 9 | import com.lyms.platform.common.utils.*; |
10 | 10 | import com.lyms.platform.operate.web.request.BabyCheckRequest; |
11 | -import com.lyms.platform.operate.web.result.BabyBasicResult; | |
12 | -import com.lyms.platform.operate.web.result.BabyCheckResult; | |
13 | -import com.lyms.platform.operate.web.result.BabyChooseResult; | |
14 | -import com.lyms.platform.operate.web.result.HighScoreResult; | |
11 | +import com.lyms.platform.operate.web.result.*; | |
15 | 12 | import com.lyms.platform.operate.web.utils.MongoUtil; |
16 | 13 | import com.lyms.platform.permission.dao.master.CouponMapper; |
17 | 14 | import com.lyms.platform.permission.model.Organization; |
18 | 15 | |
19 | 16 | |
... | ... | @@ -1778,21 +1775,46 @@ |
1778 | 1775 | } |
1779 | 1776 | } |
1780 | 1777 | } |
1781 | - | |
1778 | + List<BabyManageListResult> list = new ArrayList<>(); | |
1782 | 1779 | if (CollectionUtils.isNotEmpty(babyModels)) |
1783 | 1780 | { |
1784 | - for (BabyModel baby : babyModels) | |
1781 | + for (BabyModel model : babyModels) | |
1785 | 1782 | { |
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); | |
1783 | + BabyManageListResult result = new BabyManageListResult(); | |
1784 | + result.setId(model.getId()); | |
1785 | + if (model.getLastHighRisk() == null || model.getLastHighRisk() == 0) { | |
1786 | + result.setHighRisk("健康"); | |
1787 | + } else { | |
1788 | + result.setHighRisk("高危"); | |
1789 | + } | |
1790 | + result.setSex(model.getSex() == null ? "" : StringUtils.emptyDeal(SexEnum.getTextById(model.getSex()))); | |
1791 | + result.setBabyName(StringUtils.emptyDeal(model.getName())); | |
1792 | + result.setBirthday(StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getBirth()))); | |
1793 | + result.setMommyName(StringUtils.emptyDeal(model.getMname())); | |
1794 | + result.setMommnyPhone(StringUtils.emptyDeal(model.getMphone())); | |
1795 | + result.setMommnyEncryptPhone(StringUtils.encryPhone(model.getMphone())); | |
1796 | + result.setServiceStatus(StringUtils.emptyDeal(model.getServiceStatus() == null ? "" : ServiceStatusEnums.getNameById(model.getServiceStatus()))); | |
1797 | + result.setServiceType(StringUtils.emptyDeal(model.getServiceType() == null ? "" : ServiceTypeEnums.getTitleById(model.getServiceType()))); | |
1798 | + result.setNextDate(StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getNextDate()))); | |
1799 | + result.setMonthAge(StringUtils.emptyDeal(DateUtil.getBabyMonthAge(model.getBirth(), new Date()))); | |
1800 | + result.setPatientId(model.getParentId()); | |
1801 | + result.setBuildTime(DateUtil.getyyyy_MM_dd(model.getBuildDate())); | |
1802 | + result.setHospitalName(organizationService.getOrganization(Integer.valueOf(hospitalId)).getName()); | |
1803 | + | |
1804 | + String diagnose = ""; | |
1805 | + if (StringUtils.isNotEmpty(model.getPid())) { | |
1806 | + List diagList = getBabyLastDiagnose(model.getPid()); | |
1807 | + if (CollectionUtils.isNotEmpty(diagList)) { | |
1808 | + for (Object obj : diagList) { | |
1809 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById((String) obj); | |
1810 | + if (basicConfig != null) { | |
1811 | + diagnose += basicConfig.getName() + " "; | |
1812 | + } | |
1813 | + } | |
1814 | + } | |
1815 | + } | |
1816 | + result.setDiagnose(StringUtils.emptyDeal(diagnose)); | |
1817 | + list.add(result); | |
1796 | 1818 | } |
1797 | 1819 | } |
1798 | 1820 |