Commit bcd22a3a6c8c985eef5772a4325ec212172d2fc9
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 6 changed files
- platform-common/src/main/java/com/lyms/platform/common/enums/SmsServiceEnums.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ModularFunctionConfigController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ModularFunctionConfigFacde.java
platform-common/src/main/java/com/lyms/platform/common/enums/SmsServiceEnums.java
View file @
bcd22a3
| ... | ... | @@ -47,7 +47,8 @@ |
| 47 | 47 | TSGQTX(33,"儿童听筛过期提醒",32,"2"), |
| 48 | 48 | YKGQTX(34,"儿童眼科过期提醒",32,"2"), |
| 49 | 49 | EBGQTX(35,"儿童儿保过期提醒",32,"2"), |
| 50 | - FWDGTX(36,"服务订购提醒",18,"1"); | |
| 50 | + FWDGTX(36,"服务订购提醒",18,"1"), | |
| 51 | + JSGWZD(37,"及时高危指导",1,""); | |
| 51 | 52 | |
| 52 | 53 | private SmsServiceEnums(int id,String name,int pid,String serviceObj){ |
| 53 | 54 | this.id = id; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java
View file @
bcd22a3
| ... | ... | @@ -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 BaseObjectResponse 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/ModularFunctionConfigController.java
View file @
bcd22a3
| ... | ... | @@ -12,6 +12,7 @@ |
| 12 | 12 | import org.springframework.web.bind.annotation.*; |
| 13 | 13 | |
| 14 | 14 | import javax.servlet.http.HttpServletRequest; |
| 15 | +import java.util.Map; | |
| 15 | 16 | |
| 16 | 17 | |
| 17 | 18 | /** |
| ... | ... | @@ -64,6 +65,18 @@ |
| 64 | 65 | @ResponseBody |
| 65 | 66 | public BaseResponse queryDiagnoseConfig(@RequestParam("hospitalId") String hospitalId) { |
| 66 | 67 | return modularFunctionConfigFacde.queryDiagnoseConfig(hospitalId); |
| 68 | + } | |
| 69 | + | |
| 70 | + | |
| 71 | + /** | |
| 72 | + * 查询医院是否补发推送失败后的短信 | |
| 73 | + * @param hospitalId | |
| 74 | + * @return | |
| 75 | + */ | |
| 76 | + @RequestMapping(method = RequestMethod.GET, value = "/queryHospitalSmsSendConfig") | |
| 77 | + @ResponseBody | |
| 78 | + public Map<String,String> queryHospitalSmsSendConfig(@RequestParam(required = false) String hospitalId) { | |
| 79 | + return modularFunctionConfigFacde.queryHospitalSmsSendConfig(hospitalId); | |
| 67 | 80 | } |
| 68 | 81 | |
| 69 | 82 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
bcd22a3
| ... | ... | @@ -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 @
bcd22a3
| ... | ... | @@ -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 | |
| ... | ... | @@ -1748,11 +1745,9 @@ |
| 1748 | 1745 | } |
| 1749 | 1746 | |
| 1750 | 1747 | |
| 1751 | - public List<Map<String,String>> getCurrentDayCheckBabies(Integer userId) | |
| 1748 | + public BaseObjectResponse getCurrentDayCheckBabies(Integer userId) | |
| 1752 | 1749 | { |
| 1753 | 1750 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 1754 | - List<Map<String,String>> babyList = new ArrayList<>(); | |
| 1755 | - | |
| 1756 | 1751 | Date currentDay = DateUtil.parseYMD(DateUtil.getymd()); |
| 1757 | 1752 | BabyCheckModelQuery query = new BabyCheckModelQuery(); |
| 1758 | 1753 | query.setHospitalId(hospitalId); |
| 1759 | 1754 | |
| 1760 | 1755 | |
| 1761 | 1756 | |
| ... | ... | @@ -1778,25 +1773,49 @@ |
| 1778 | 1773 | } |
| 1779 | 1774 | } |
| 1780 | 1775 | } |
| 1781 | - | |
| 1776 | + List<BabyManageListResult> list = new ArrayList<>(); | |
| 1782 | 1777 | if (CollectionUtils.isNotEmpty(babyModels)) |
| 1783 | 1778 | { |
| 1784 | - for (BabyModel baby : babyModels) | |
| 1779 | + for (BabyModel model : babyModels) | |
| 1785 | 1780 | { |
| 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); | |
| 1781 | + BabyManageListResult result = new BabyManageListResult(); | |
| 1782 | + result.setId(model.getId()); | |
| 1783 | + if (model.getLastHighRisk() == null || model.getLastHighRisk() == 0) { | |
| 1784 | + result.setHighRisk("健康"); | |
| 1785 | + } else { | |
| 1786 | + result.setHighRisk("高危"); | |
| 1787 | + } | |
| 1788 | + result.setSex(model.getSex() == null ? "" : StringUtils.emptyDeal(SexEnum.getTextById(model.getSex()))); | |
| 1789 | + result.setBabyName(StringUtils.emptyDeal(model.getName())); | |
| 1790 | + result.setBirthday(StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getBirth()))); | |
| 1791 | + result.setMommyName(StringUtils.emptyDeal(model.getMname())); | |
| 1792 | + result.setMommnyPhone(StringUtils.emptyDeal(model.getMphone())); | |
| 1793 | + result.setMommnyEncryptPhone(StringUtils.encryPhone(model.getMphone())); | |
| 1794 | + result.setServiceStatus(StringUtils.emptyDeal(model.getServiceStatus() == null ? "" : ServiceStatusEnums.getNameById(model.getServiceStatus()))); | |
| 1795 | + result.setServiceType(StringUtils.emptyDeal(model.getServiceType() == null ? "" : ServiceTypeEnums.getTitleById(model.getServiceType()))); | |
| 1796 | + result.setNextDate(StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getNextDate()))); | |
| 1797 | + result.setMonthAge(StringUtils.emptyDeal(DateUtil.getBabyMonthAge(model.getBirth(), new Date()))); | |
| 1798 | + result.setPatientId(model.getParentId()); | |
| 1799 | + result.setBuildTime(DateUtil.getyyyy_MM_dd(model.getBuildDate())); | |
| 1800 | + result.setHospitalName(organizationService.getOrganization(Integer.valueOf(hospitalId)).getName()); | |
| 1801 | + | |
| 1802 | + String diagnose = ""; | |
| 1803 | + if (StringUtils.isNotEmpty(model.getPid())) { | |
| 1804 | + List diagList = getBabyLastDiagnose(model.getPid()); | |
| 1805 | + if (CollectionUtils.isNotEmpty(diagList)) { | |
| 1806 | + for (Object obj : diagList) { | |
| 1807 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById((String) obj); | |
| 1808 | + if (basicConfig != null) { | |
| 1809 | + diagnose += basicConfig.getName() + " "; | |
| 1810 | + } | |
| 1811 | + } | |
| 1812 | + } | |
| 1813 | + } | |
| 1814 | + result.setDiagnose(StringUtils.emptyDeal(diagnose)); | |
| 1815 | + list.add(result); | |
| 1796 | 1816 | } |
| 1797 | 1817 | } |
| 1798 | - | |
| 1799 | - return babyList; | |
| 1818 | + return new BaseObjectResponse().setData(list).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 1800 | 1819 | } |
| 1801 | 1820 | |
| 1802 | 1821 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ModularFunctionConfigFacde.java
View file @
bcd22a3
| ... | ... | @@ -7,6 +7,7 @@ |
| 7 | 7 | import com.lyms.platform.common.enums.YnEnums; |
| 8 | 8 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 9 | 9 | import com.lyms.platform.common.result.BaseResponse; |
| 10 | +import com.lyms.platform.common.utils.ExceptionUtils; | |
| 10 | 11 | import com.lyms.platform.common.utils.StringUtils; |
| 11 | 12 | import com.lyms.platform.operate.web.request.ModularFunctionConfigRequest; |
| 12 | 13 | import com.lyms.platform.operate.web.result.ModularFunctionConfigResult; |
| ... | ... | @@ -121,5 +122,41 @@ |
| 121 | 122 | return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有数据"); |
| 122 | 123 | } |
| 123 | 124 | |
| 125 | + public Map<String,String> queryHospitalSmsSendConfig(String hospitalId) { | |
| 126 | + Map<String,String> map = new HashMap<>(); | |
| 127 | + ModularFunctionConfigQuery diagnoseConfigQuery = new ModularFunctionConfigQuery(); | |
| 128 | + if(StringUtils.isNotEmpty(hospitalId)) | |
| 129 | + { | |
| 130 | + diagnoseConfigQuery.setHospitalId(hospitalId); | |
| 131 | + } | |
| 132 | + | |
| 133 | + try { | |
| 134 | + List<ModularFunctionConfigModel> configModels = modularFunctionConfigServcie.queryDiagnoseConfigs(diagnoseConfigQuery); | |
| 135 | + if (CollectionUtils.isNotEmpty(configModels)) | |
| 136 | + { | |
| 137 | + for (ModularFunctionConfigModel model : configModels) | |
| 138 | + { | |
| 139 | + List<Map<String, Object>> list = model.getConfigs(); | |
| 140 | + if (CollectionUtils.isNotEmpty(list)) | |
| 141 | + { | |
| 142 | + for (Map<String, Object> config : list) | |
| 143 | + { | |
| 144 | + //是否推送发送失败后补发短信 | |
| 145 | + if ("10".equals(String.valueOf(config.get("type")))) | |
| 146 | + { | |
| 147 | + String isOpen = "2".equals(String.valueOf(config.get("value"))) ? "true" : "false"; | |
| 148 | + map.put(model.getHospitalId(),isOpen); | |
| 149 | + } | |
| 150 | + } | |
| 151 | + } | |
| 152 | + } | |
| 153 | + } | |
| 154 | + } | |
| 155 | + catch (Exception e) | |
| 156 | + { | |
| 157 | + ExceptionUtils.catchException(e,"queryHospitalSmsSendConfig error."); | |
| 158 | + } | |
| 159 | + return map; | |
| 160 | + } | |
| 124 | 161 | } |