Merge remote-tracking branch 'remotes/origin/feature/salary_i18' into custom/上海港湾-多语言

This commit is contained in:
sy 2023-12-14 09:52:57 +08:00
commit 5b41809853
4 changed files with 26 additions and 20 deletions

View File

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

View File

@ -122,16 +122,19 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
List<ICategoryPO> 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()));

View File

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

View File

@ -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";
}
}