Commit fab44712ffaf4acb65de52507892997673c87a18
1 parent
4c707e7771
Exists in
master
提交代码
Showing 3 changed files with 67 additions and 5 deletions
webApi/src/main/java/com/lyms/yimiao/web/controller/v1/ConfigController.java
View file @
fab4471
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 | */ |
| 29 | 29 | @RequestMapping(value = "/iosConfigs", method = RequestMethod.GET) |
| 30 | 30 | public void getIosConfig(HttpServletResponse response) { |
| 31 | - AppVersion version = new AppVersion(100, "1.0.0", "",""); | |
| 31 | + AppVersion version = new AppVersion(100, "1.0.0", "当前为最新版本",""); | |
| 32 | 32 | Map<String, Object> map = new HashMap<>(); |
| 33 | 33 | map.put("version", version); |
| 34 | 34 | map.put("errorcode", ConstantInterface.SUCCESS); |
| ... | ... | @@ -42,7 +42,7 @@ |
| 42 | 42 | */ |
| 43 | 43 | @RequestMapping(value = "/androidConfigs", method = RequestMethod.GET) |
| 44 | 44 | public void getAndroidConfig(HttpServletResponse response) { |
| 45 | - AppVersion version = new AppVersion(100, "1.0.0", "",""); | |
| 45 | + AppVersion version = new AppVersion(100, "1.0.0", "当前为最新版本",""); | |
| 46 | 46 | Map<String, Object> map = new HashMap<>(); |
| 47 | 47 | map.put("version", version); |
| 48 | 48 | map.put("forceUpdate", 0); |
webApi/src/main/java/com/lyms/yimiao/web/controller/v1/KidsController.java
View file @
fab4471
| ... | ... | @@ -49,6 +49,10 @@ |
| 49 | 49 | private MedVaccineInfoService medVaccineinfoService; |
| 50 | 50 | @Autowired |
| 51 | 51 | private MedOrganizationService medOrganizationService; |
| 52 | + @Autowired | |
| 53 | + private MedVaccineNameService medVaccineNameService; | |
| 54 | + @Autowired | |
| 55 | + private MedInoculateRecordService medInoculateRecordService; | |
| 52 | 56 | |
| 53 | 57 | |
| 54 | 58 | // /** |
| ... | ... | @@ -152,7 +156,11 @@ |
| 152 | 156 | ResultUtils.buildSuccessResultAndWrite(response,list); |
| 153 | 157 | } |
| 154 | 158 | |
| 155 | - //添加宝宝接口(当前登陆用户与小孩子进行关联) | |
| 159 | + /** | |
| 160 | + * 添加宝宝接口(当前登陆用户与小孩子进行关联 | |
| 161 | + * @param response | |
| 162 | + * @param id 宝宝id | |
| 163 | + */ | |
| 156 | 164 | @RequestMapping(value = "/relateKids", method = RequestMethod.POST) |
| 157 | 165 | @TokenRequired |
| 158 | 166 | public void UserRelateKids(HttpServletResponse response, |
| ... | ... | @@ -242,7 +250,61 @@ |
| 242 | 250 | @RequestMapping(value = "/kidsVaccines", method = RequestMethod.GET) |
| 243 | 251 | @TokenRequired |
| 244 | 252 | public void getKidVaccines(HttpServletResponse response, |
| 245 | - @RequestParam("mouthAge")String mouthAge) { | |
| 253 | + @RequestParam("mouthAge")String mouthAge, | |
| 254 | + @RequestParam("id")String id) { | |
| 255 | + | |
| 256 | + List<Map> list = new ArrayList<>(); | |
| 257 | + List<Map> freeList = new ArrayList<>(); | |
| 258 | + List<Map> chargeList = new ArrayList<>(); | |
| 259 | + | |
| 260 | + //先根据月龄去找这个月龄下要接种的所有疫苗 | |
| 261 | + MedVaccineNameQuery vaccineNameQuery = new MedVaccineNameQuery(); | |
| 262 | + vaccineNameQuery.setVnMonthAge(mouthAge); | |
| 263 | + List<MedVaccineName> vaccineNameList = medVaccineNameService.queryMedVaccineName(vaccineNameQuery); | |
| 264 | + if (CollectionUtils.isNotEmpty(vaccineNameList)){ | |
| 265 | + for (MedVaccineName data : vaccineNameList){ | |
| 266 | + //免费 | |
| 267 | + if (data.getVnVaccineType()==1){ | |
| 268 | + Map<String,Object> map = new HashMap<>(); | |
| 269 | + | |
| 270 | + map.put("id",data.getVnId()); | |
| 271 | + map.put("name",data.getVnName()); | |
| 272 | + //需要处理剂次 | |
| 273 | + map.put("jiCi",""); | |
| 274 | + //去接种预约表里面查某个疫苗是否接种,如果在指定时间内没有接种 | |
| 275 | + MedInoculateRecordQuery inoculateRecordQuery = new MedInoculateRecordQuery(); | |
| 276 | + inoculateRecordQuery.setIcKidId(id); | |
| 277 | + inoculateRecordQuery.setIcVaccineId(data.getVnId()); | |
| 278 | + List<MedInoculateRecord> inoculateRecordList = medInoculateRecordService.queryMedInoculateRecord(inoculateRecordQuery); | |
| 279 | + if (CollectionUtils.isNotEmpty(inoculateRecordList)){ | |
| 280 | + MedInoculateRecord medInoculateRecord = inoculateRecordList.get(0); | |
| 281 | + | |
| 282 | + | |
| 283 | + } | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + //收费 | |
| 288 | + }else if (data.getVnVaccineType()==2){ | |
| 289 | + Map<String,Object> map = new HashMap<>(); | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + } | |
| 295 | + } | |
| 296 | + } | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 246 | 308 | |
| 247 | 309 | } |
| 248 | 310 |
webApi/src/main/java/com/lyms/yimiao/web/controller/v1/UserController.java
View file @
fab4471
| ... | ... | @@ -184,7 +184,7 @@ |
| 184 | 184 | * @param avatar |
| 185 | 185 | * @param nickname |
| 186 | 186 | */ |
| 187 | - @RequestMapping(value = "/updateUserInfo", method = RequestMethod.PUT) | |
| 187 | + @RequestMapping(value = "/usersInfo", method = RequestMethod.PUT) | |
| 188 | 188 | @TokenRequired |
| 189 | 189 | public void updateUser(HttpServletResponse response, |
| 190 | 190 | @RequestParam(value = "avatar",required = false) String avatar, |