Showing
1 changed file
with
4 additions
and
19 deletions
| @@ -1458,17 +1458,11 @@ public class ContractDistributorStandardController extends DefaultBaseController | @@ -1458,17 +1458,11 @@ public class ContractDistributorStandardController extends DefaultBaseController | ||
| 1458 | } | 1458 | } |
| 1459 | 1459 | ||
| 1460 | private String getUserContactPhone(SysUser user) { | 1460 | private String getUserContactPhone(SysUser user) { |
| 1461 | - if (user == null) { | ||
| 1462 | - return ""; | ||
| 1463 | - } | ||
| 1464 | - | ||
| 1465 | - for (String methodName : Arrays.asList("getTelephone", "getPhone", "getMobile")) { | ||
| 1466 | - String value = invokeStringMethod(user, methodName); | ||
| 1467 | - if (StringUtils.isNotBlank(value)) { | ||
| 1468 | - return value; | ||
| 1469 | - } | 1461 | + String telephone = ""; |
| 1462 | + if (user != null) { | ||
| 1463 | + telephone = user.getTelephone(); | ||
| 1470 | } | 1464 | } |
| 1471 | - return ""; | 1465 | + return telephone; |
| 1472 | } | 1466 | } |
| 1473 | 1467 | ||
| 1474 | private String getOfficeLandline(String deptId) { | 1468 | private String getOfficeLandline(String deptId) { |
| @@ -1510,15 +1504,6 @@ public class ContractDistributorStandardController extends DefaultBaseController | @@ -1510,15 +1504,6 @@ public class ContractDistributorStandardController extends DefaultBaseController | ||
| 1510 | return StringUtils.defaultString(officeLandline); | 1504 | return StringUtils.defaultString(officeLandline); |
| 1511 | } | 1505 | } |
| 1512 | 1506 | ||
| 1513 | - private String invokeStringMethod(Object target, String methodName) { | ||
| 1514 | - try { | ||
| 1515 | - Object value = target.getClass().getMethod(methodName).invoke(target); | ||
| 1516 | - return value instanceof String ? (String) value : ""; | ||
| 1517 | - } catch (Exception e) { | ||
| 1518 | - return ""; | ||
| 1519 | - } | ||
| 1520 | - } | ||
| 1521 | - | ||
| 1522 | private File convertExcelToPdf(File excelFile) throws IOException, InterruptedException { | 1507 | private File convertExcelToPdf(File excelFile) throws IOException, InterruptedException { |
| 1523 | if (!excelFile.exists()) { | 1508 | if (!excelFile.exists()) { |
| 1524 | throw new IllegalArgumentException("Excel 文件不存在: " + excelFile.getAbsolutePath()); | 1509 | throw new IllegalArgumentException("Excel 文件不存在: " + excelFile.getAbsolutePath()); |