Commit 7b044e9592b483693c7fe462a197ce31318041e0

Authored by 房远帅
1 parent af36720b

合同打印模板修改:自动填充法定代表人、委托代理人、电话及传真、日期

@@ -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());