Commit 62e3d12e52640f8bdc18c2c846476848fb55fb6f
1 parent
4d8c4722ba
Exists in
master
and in
8 other branches
update
Showing 2 changed files with 21 additions and 7 deletions
platform-common/src/main/java/com/lyms/platform/common/enums/SexEnum.java
View file @
62e3d12
... | ... | @@ -5,31 +5,32 @@ |
5 | 5 | * Created by Zhang.Rui on 2016/4/7. |
6 | 6 | */ |
7 | 7 | public enum SexEnum { |
8 | - MAN(1, "男"), WOMAN(0, "女"); | |
8 | + MAN("ac334aa6-b0f2-4b25-a231-cf968c14ef8b", "男"), | |
9 | + WOMAN("c23779f1-cb6e-44d0-9fc8-0a990bf6184c", "女"); | |
9 | 10 | |
10 | - private Integer id; | |
11 | + private String id; | |
11 | 12 | private String text; |
12 | 13 | |
13 | 14 | |
14 | - SexEnum(int id, String text) { | |
15 | + SexEnum(String id, String text) { | |
15 | 16 | this.id = id; |
16 | 17 | this.text = text; |
17 | 18 | } |
18 | 19 | |
19 | - public static String getTextById(int id) { | |
20 | + public static String getTextById(String id) { | |
20 | 21 | for (SexEnum sexEnum : values()) { |
21 | - if (sexEnum.getId() == id) { | |
22 | + if (sexEnum.getId().equals(id)) { | |
22 | 23 | return sexEnum.getText(); |
23 | 24 | } |
24 | 25 | } |
25 | 26 | return "未知"; |
26 | 27 | } |
27 | 28 | |
28 | - public Integer getId() { | |
29 | + public String getId() { | |
29 | 30 | return id; |
30 | 31 | } |
31 | 32 | |
32 | - public void setId(Integer id) { | |
33 | + public void setId(String id) { | |
33 | 34 | this.id = id; |
34 | 35 | } |
35 | 36 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/FolicAcidFacade.java
View file @
62e3d12
... | ... | @@ -4,12 +4,14 @@ |
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; | |
7 | 8 | import com.lyms.platform.common.enums.YnEnums; |
8 | 9 | import com.lyms.platform.common.result.BaseListResponse; |
9 | 10 | import com.lyms.platform.common.result.BaseObjectResponse; |
10 | 11 | import com.lyms.platform.common.result.BaseResponse; |
11 | 12 | import com.lyms.platform.common.utils.DateUtil; |
12 | 13 | import com.lyms.platform.common.utils.ExcelUtil; |
14 | +import com.lyms.platform.common.utils.SystemConfig; | |
13 | 15 | import com.lyms.platform.operate.web.request.FolicAcidAddRequest; |
14 | 16 | import com.lyms.platform.operate.web.request.FolicAcidQueryRequest; |
15 | 17 | import com.lyms.platform.operate.web.utils.CommonsHelper; |
16 | 18 | |
... | ... | @@ -18,12 +20,14 @@ |
18 | 20 | import com.lyms.platform.permission.model.Users; |
19 | 21 | import com.lyms.platform.permission.service.OrganizationService; |
20 | 22 | import com.lyms.platform.permission.service.UsersService; |
23 | +import com.lyms.platform.pojo.BasicConfig; | |
21 | 24 | import com.lyms.platform.pojo.FolicAcid; |
22 | 25 | import com.lyms.platform.pojo.ResidentsArchiveModel; |
23 | 26 | import com.lyms.platform.query.FolicAcidQuery; |
24 | 27 | import com.lyms.platform.query.ResidentsArchiveQuery; |
25 | 28 | import org.apache.commons.collections.CollectionUtils; |
26 | 29 | import org.apache.commons.lang.StringUtils; |
30 | +import org.apache.struts.config.BaseConfig; | |
27 | 31 | import org.springframework.beans.factory.annotation.Autowired; |
28 | 32 | import org.springframework.stereotype.Component; |
29 | 33 | |
... | ... | @@ -176,6 +180,15 @@ |
176 | 180 | archiveMap.put("age", archiveModel.getAge()); |
177 | 181 | archiveMap.put("phone", archiveModel.getPhone()); |
178 | 182 | archiveMap.put("id", archiveModel.getId()); |
183 | + if (archiveModel.getSex()== SystemConfig.WOMAN_ID){ | |
184 | + archiveMap.put("sex", SexEnum.getTextById(SystemConfig.WOMAN_ID)); | |
185 | + }else { | |
186 | + archiveMap.put("sex", SexEnum.getTextById(SystemConfig.MAN_ID)); | |
187 | + } | |
188 | + archiveMap.put("residenceRegister",CommonsHelper.getResidence(archiveModel.getProvinceRegisterId(), archiveModel.getCityRegisterId(), | |
189 | + archiveModel.getAreaRegisterId(), archiveModel.getStreetRegisterId(), | |
190 | + archiveModel.getAddressRegister(), basicConfigService)); | |
191 | + archiveMap.put("workUnit",archiveModel.getWorkUnit()); | |
179 | 192 | |
180 | 193 | } |
181 | 194 | resultMap.put("folicAcidResult",folicAcid); |