Showing
1 changed file
with
20 additions
and
1 deletions
| ... | ... | @@ -154,7 +154,7 @@ public class CustomerCreditBatchExportTaskWorker implements |
| 154 | 154 | CorePersonnel legal = bo.getCorePersonnelList().get(0); |
| 155 | 155 | m.setUserName1(legal.getName()); |
| 156 | 156 | m.setAge1(legal.getAge()); |
| 157 | - m.setSex1(legal.getSex()); | |
| 157 | + m.setSex1(convertSex(legal.getSex())); | |
| 158 | 158 | m.setNativePlace1(legal.getNativePlace()); |
| 159 | 159 | m.setAddress1(legal.getAddress()); |
| 160 | 160 | m.setMobile1(legal.getMobile()); |
| ... | ... | @@ -200,6 +200,25 @@ public class CustomerCreditBatchExportTaskWorker implements |
| 200 | 200 | return date == null ? "" : date.format(DATE_FORMATTER); |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | + /** | |
| 204 | + * 性别转中文(导入Listener存储规则:男=1,女=2) | |
| 205 | + */ | |
| 206 | + private static String convertSex(String sex) { | |
| 207 | + if (StringUtil.isBlank(sex)) { | |
| 208 | + return ""; | |
| 209 | + } | |
| 210 | + switch (sex) { | |
| 211 | + case "1": | |
| 212 | + case "男": | |
| 213 | + return "男"; | |
| 214 | + case "2": | |
| 215 | + case "女": | |
| 216 | + return "女"; | |
| 217 | + default: | |
| 218 | + return sex; | |
| 219 | + } | |
| 220 | + } | |
| 221 | + | |
| 203 | 222 | private static String convertEnterpriseType(String type) { |
| 204 | 223 | if (StringUtil.isBlank(type)) { |
| 205 | 224 | return ""; | ... | ... |