diff --git a/src/com/engine/salary/service/impl/SIBalanceServiceImpl.java b/src/com/engine/salary/service/impl/SIBalanceServiceImpl.java index 5e245ca95..167e15dd0 100644 --- a/src/com/engine/salary/service/impl/SIBalanceServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIBalanceServiceImpl.java @@ -164,7 +164,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { comMap.put("titleSign", welfareTypeSign); comMap.put("insuranceId", k); comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); - comMap.put("paymentScope", "公司"); + comMap.put("paymentScope", SalaryI18nUtil.getI18nLabel(user.getLanguage(),545314, "公司")); comMap.put("paymentScopeSign", "com"); resultList.add(comMap); } @@ -175,7 +175,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { perMap.put("titleSign", welfareTypeSign); perMap.put("insuranceId", k); perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); - perMap.put("paymentScope", "个人"); + perMap.put("paymentScope", SalaryI18nUtil.getI18nLabel(user.getLanguage(),500201, "个人")); perMap.put("paymentScopeSign", "per"); resultList.add(perMap); } @@ -198,7 +198,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { comMap.put("titleSign", welfareTypeSign); comMap.put("insuranceId", k); comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); - comMap.put("paymentScope", "公司"); + comMap.put("paymentScope", SalaryI18nUtil.getI18nLabel(user.getLanguage(),545314, "公司")); comMap.put("paymentScopeSign", "com"); resultList.add(comMap); } @@ -209,7 +209,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { perMap.put("titleSign", welfareTypeSign); perMap.put("insuranceId", k); perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); - perMap.put("paymentScope", "个人"); + perMap.put("paymentScope", SalaryI18nUtil.getI18nLabel(user.getLanguage(),500201, "个人")); perMap.put("paymentScopeSign", "per"); resultList.add(perMap); } @@ -232,7 +232,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { comMap.put("titleSign", welfareTypeSign); comMap.put("insuranceId", k); comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); - comMap.put("paymentScope", "公司"); + comMap.put("paymentScope", SalaryI18nUtil.getI18nLabel(user.getLanguage(),545314, "公司")); comMap.put("paymentScopeSign", "com"); resultList.add(comMap); } @@ -243,7 +243,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { perMap.put("titleSign", welfareTypeSign); perMap.put("insuranceId", k); perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); - perMap.put("paymentScope", "个人"); + perMap.put("paymentScope", SalaryI18nUtil.getI18nLabel(user.getLanguage(),500201, "个人")); perMap.put("paymentScopeSign", "per"); resultList.add(perMap); } diff --git a/src/com/engine/salary/service/impl/SIRepairServiceImpl.java b/src/com/engine/salary/service/impl/SIRepairServiceImpl.java index ff79b7031..6166ba59c 100644 --- a/src/com/engine/salary/service/impl/SIRepairServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIRepairServiceImpl.java @@ -122,16 +122,19 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { List list = getICategoryMapper().listByDataType(DataTypeEnum.SYSTEM.getValue()); if (projects.contains(ProjectTypeEnum.ENDOWMENT_INSURANCE.getValue())) { - ICategoryPO insuranceCategoryPO = list.stream().filter(item -> SalaryI18nUtil.getI18nLabel(user.getLanguage(),542517, "养老保险").equals(item.getInsuranceName())).findFirst() +// ICategoryPO insuranceCategoryPO = list.stream().filter(item -> SalaryI18nUtil.getI18nLabel(user.getLanguage(),542517, "养老保险").equals(item.getInsuranceName())).findFirst() +// .get(); + ICategoryPO insuranceCategoryPO = list.stream().filter(item -> "9001".equals(item.getId().toString())).findFirst() .get(); - if (socialBaseMap != null && socialBaseMap.containsKey(insuranceCategoryPO.getId().toString())) { targetBaseMap.put(insuranceCategoryPO.getId().toString(), socialBaseMap.get(insuranceCategoryPO.getId().toString())); } } if (projects.contains(ProjectTypeEnum.MEDICAL_INSURANCE.getValue())) { - ICategoryPO insuranceCategoryPO = list.stream().filter(item -> SalaryI18nUtil.getI18nLabel(user.getLanguage(),25139, "医疗保险").equals(item.getInsuranceName())).findFirst() +// ICategoryPO insuranceCategoryPO = list.stream().filter(item -> SalaryI18nUtil.getI18nLabel(user.getLanguage(),25139, "医疗保险").equals(item.getInsuranceName())).findFirst() +// .get(); + ICategoryPO insuranceCategoryPO = list.stream().filter(item -> "9002".equals(item.getId().toString())).findFirst() .get(); if (socialBaseMap != null && socialBaseMap.containsKey(insuranceCategoryPO.getId().toString())) { targetBaseMap.put(insuranceCategoryPO.getId().toString(), socialBaseMap.get(insuranceCategoryPO.getId().toString())); diff --git a/src/com/engine/salary/util/excel/ExcelUtilPlus.java b/src/com/engine/salary/util/excel/ExcelUtilPlus.java index 21e932ed8..6f09ce0d9 100644 --- a/src/com/engine/salary/util/excel/ExcelUtilPlus.java +++ b/src/com/engine/salary/util/excel/ExcelUtilPlus.java @@ -438,7 +438,8 @@ public class ExcelUtilPlus { rowOneCell.setCellValue(columnGroupItem.getText().toString()); rowOneCell.setCellStyle(titleCellStyle); //设置列宽 - sheet.setColumnWidth(startIndex, Math.max(12, columnGroupItem.getText().length() * 4) * 256); +// sheet.setColumnWidth(startIndex, Math.max(12, columnGroupItem.getText().length() * 4) * 256); + sheet.setColumnWidth(startIndex,Math.min(40 * 256, Math.max(12, getStrlength(header.get(i).toString())*4)*256)); startIndex++; patternList.add(columnGroupItem.getPattern()); } else { @@ -460,7 +461,8 @@ public class ExcelUtilPlus { subHeader.setCellValue(childrenItem.getText().toString()); subHeader.setCellStyle(titleCellStyle); //设置列宽 - sheet.setColumnWidth(startIndex + j, Math.max(12, childrenItem.getText().length() * 4) * 256); +// sheet.setColumnWidth(startIndex + j, Math.max(12, childrenItem.getText().length() * 4) * 256); + sheet.setColumnWidth(startIndex + j,Math.min(40 * 256, Math.max(12, childrenItem.getText().length() * 4) * 256)); patternList.add(childrenItem.getPattern()); } diff --git a/src/com/engine/salary/util/page/SalaryPageUtil.java b/src/com/engine/salary/util/page/SalaryPageUtil.java index 6ba084dfc..20e566d86 100644 --- a/src/com/engine/salary/util/page/SalaryPageUtil.java +++ b/src/com/engine/salary/util/page/SalaryPageUtil.java @@ -113,14 +113,15 @@ public class SalaryPageUtil { } public static String selfAdaption(String chars) { - int adaption = 0; - - if (chars != null) { - adaption = chars.length() * 12 + 55; - } - if (adaption < 79) { - adaption = 79; - } - return adaption + ""; +// int adaption = 0; +// +// if (chars != null) { +// adaption = chars.length() * 12 + 55; +// } +// if (adaption < 79) { +// adaption = 79; +// } +// return adaption + ""; + return "150"; } }