Commit de318fc8516fd61ac05735636536728ce12d02c5
1 parent
62e3d12e52
Exists in
master
and in
8 other branches
update
Showing 2 changed files with 9 additions and 11 deletions
platform-common/src/main/java/com/lyms/platform/common/enums/SexEnum.java
View file @
de318fc
| ... | ... | @@ -5,32 +5,31 @@ |
| 5 | 5 | * Created by Zhang.Rui on 2016/4/7. |
| 6 | 6 | */ |
| 7 | 7 | public enum SexEnum { |
| 8 | - MAN("ac334aa6-b0f2-4b25-a231-cf968c14ef8b", "男"), | |
| 9 | - WOMAN("c23779f1-cb6e-44d0-9fc8-0a990bf6184c", "女"); | |
| 8 | + MAN(1, "男"), WOMAN(0, "女"); | |
| 10 | 9 | |
| 11 | - private String id; | |
| 10 | + private Integer id; | |
| 12 | 11 | private String text; |
| 13 | 12 | |
| 14 | 13 | |
| 15 | - SexEnum(String id, String text) { | |
| 14 | + SexEnum(int id, String text) { | |
| 16 | 15 | this.id = id; |
| 17 | 16 | this.text = text; |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | - public static String getTextById(String id) { | |
| 19 | + public static String getTextById(int id) { | |
| 21 | 20 | for (SexEnum sexEnum : values()) { |
| 22 | - if (sexEnum.getId().equals(id)) { | |
| 21 | + if (sexEnum.getId() == id) { | |
| 23 | 22 | return sexEnum.getText(); |
| 24 | 23 | } |
| 25 | 24 | } |
| 26 | 25 | return "未知"; |
| 27 | 26 | } |
| 28 | 27 | |
| 29 | - public String getId() { | |
| 28 | + public Integer getId() { | |
| 30 | 29 | return id; |
| 31 | 30 | } |
| 32 | 31 | |
| 33 | - public void setId(String id) { | |
| 32 | + public void setId(Integer id) { | |
| 34 | 33 | this.id = id; |
| 35 | 34 | } |
| 36 | 35 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/FolicAcidFacade.java
View file @
de318fc
| ... | ... | @@ -4,7 +4,6 @@ |
| 4 | 4 | import com.lyms.platform.biz.service.FolicAcidService; |
| 5 | 5 | import com.lyms.platform.biz.service.ResidentsArchiveService; |
| 6 | 6 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 7 | -import com.lyms.platform.common.enums.SexEnum; | |
| 8 | 7 | import com.lyms.platform.common.enums.YnEnums; |
| 9 | 8 | import com.lyms.platform.common.result.BaseListResponse; |
| 10 | 9 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 11 | 10 | |
| ... | ... | @@ -181,9 +180,9 @@ |
| 181 | 180 | archiveMap.put("phone", archiveModel.getPhone()); |
| 182 | 181 | archiveMap.put("id", archiveModel.getId()); |
| 183 | 182 | if (archiveModel.getSex()== SystemConfig.WOMAN_ID){ |
| 184 | - archiveMap.put("sex", SexEnum.getTextById(SystemConfig.WOMAN_ID)); | |
| 183 | + archiveMap.put("sex", "女"); | |
| 185 | 184 | }else { |
| 186 | - archiveMap.put("sex", SexEnum.getTextById(SystemConfig.MAN_ID)); | |
| 185 | + archiveMap.put("sex", "男"); | |
| 187 | 186 | } |
| 188 | 187 | archiveMap.put("residenceRegister",CommonsHelper.getResidence(archiveModel.getProvinceRegisterId(), archiveModel.getCityRegisterId(), |
| 189 | 188 | archiveModel.getAreaRegisterId(), archiveModel.getStreetRegisterId(), |