From 97b30d5a7337a17e230c18e655657dae5022b848 Mon Sep 17 00:00:00 2001 From: sy Date: Thu, 14 Dec 2023 09:51:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-=E5=A4=9A?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=EF=BC=8C=E8=A1=A5=E7=BC=B4=E3=80=81=E8=96=AA?= =?UTF-8?q?=E8=B5=84=E6=A0=B8=E7=AE=97=E5=AF=BC=E5=87=BA=E3=80=81=E8=A1=A5?= =?UTF-8?q?=E5=B7=AE=E7=BC=96=E8=BE=91=E6=98=BE=E7=A4=BA=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SIBalanceServiceImpl.java | 12 ++++++------ .../service/impl/SIRepairServiceImpl.java | 9 ++++++--- .../salary/util/excel/ExcelUtilPlus.java | 6 ++++-- .../salary/util/page/SalaryPageUtil.java | 19 ++++++++++--------- 4 files changed, 26 insertions(+), 20 deletions(-) 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"; } }