diff --git a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java index 53c1dcaa3..21884ad0f 100644 --- a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java @@ -497,6 +497,11 @@ public class SalarySendServiceImpl extends Service implements SalarySendService if (salarySendInfo == null) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100511, "工资单信息不存在")); } + + if (!Objects.equals(salarySendInfo.getSendStatus(), 1)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100511, "工资单信息不存在")); + } + Long employeeId = salarySendInfo.getEmployeeId(); if (currentEmployeeId.compareTo(employeeId) != 0) { @@ -1386,7 +1391,6 @@ public class SalarySendServiceImpl extends Service implements SalarySendService } - @Override public Map withdraw(SalarySendWithdrawParam param) { if (param.getSalarySendId() == null) { diff --git a/src/com/engine/salary/util/excel/ExcelUtilPlus.java b/src/com/engine/salary/util/excel/ExcelUtilPlus.java index 2131c6f38..34e8f6d4d 100644 --- a/src/com/engine/salary/util/excel/ExcelUtilPlus.java +++ b/src/com/engine/salary/util/excel/ExcelUtilPlus.java @@ -9,6 +9,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.xssf.usermodel.*; +import weaver.wechat.util.Utils; import java.awt.Color; import java.math.BigDecimal; @@ -139,7 +140,7 @@ public class ExcelUtilPlus { rowZeroCell.setCellValue(columnGroupItem.getText()); rowZeroCell.setCellStyle(titleCellStyle); //设置列宽 - sheet.setColumnWidth(i, Math.min(255, Math.max(12, columnGroupItem.getText().length() * 4)) * 256); + sheet.setColumnWidth(i, Math.min(255, Math.max(12, Utils.null2String(columnGroupItem.getText()).length() * 4)) * 256); patternList.add(columnGroupItem.getPattern()); }