Commit ec06025ba206858366adf7997cbc205cfb720f38
1 parent
457814c49b
Exists in
master
and in
6 other branches
儿童疾病
Showing 2 changed files with 5 additions and 10 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java
View file @
ec06025
| ... | ... | @@ -817,7 +817,7 @@ |
| 817 | 817 | */ |
| 818 | 818 | @RequestMapping(value = "/getBabyDiseases", method = RequestMethod.GET) |
| 819 | 819 | @ResponseBody |
| 820 | - public String getBabyDisease(@RequestParam(required = true) String id) { | |
| 820 | + public List<String> getBabyDisease(@RequestParam(required = true) String id) { | |
| 821 | 821 | |
| 822 | 822 | return babyBookbuildingFacade.getBabyDisease(id); |
| 823 | 823 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
ec06025
| ... | ... | @@ -4881,21 +4881,16 @@ |
| 4881 | 4881 | } |
| 4882 | 4882 | |
| 4883 | 4883 | |
| 4884 | - public String getBabyDisease(String id) { | |
| 4885 | - StringBuffer diseases = new StringBuffer(); | |
| 4884 | + public List<String> getBabyDisease(String id) { | |
| 4885 | + List<String> diseases = new ArrayList<>(); | |
| 4886 | 4886 | BabyModel babyModel = babyBookbuildingService.queryBabyBuildById(id); |
| 4887 | 4887 | if (babyModel != null && CollectionUtils.isNotEmpty(babyModel.getDiseases())) |
| 4888 | 4888 | { |
| 4889 | 4889 | for (int i = 0, len = babyModel.getDiseases().size(); i < len; i++) { |
| 4890 | - if (i != len - 1) { | |
| 4891 | - diseases.append(BabyDiseaseEnums.getNameById(Integer.parseInt(babyModel.getDiseases().get(i)))); | |
| 4892 | - diseases.append(","); | |
| 4893 | - } else { | |
| 4894 | - diseases.append(BabyDiseaseEnums.getNameById(Integer.parseInt(babyModel.getDiseases().get(i)))); | |
| 4895 | - } | |
| 4890 | + diseases.add(BabyDiseaseEnums.getNameById(Integer.parseInt(babyModel.getDiseases().get(i)))); | |
| 4896 | 4891 | } |
| 4897 | 4892 | } |
| 4898 | - return diseases.toString(); | |
| 4893 | + return diseases; | |
| 4899 | 4894 | } |
| 4900 | 4895 | } |