Compare commits
4 Commits
4a2821d793
...
9c06f080c5
| Author | SHA1 | Date |
|---|---|---|
|
|
9c06f080c5 | |
|
|
81e87ec9ce | |
|
|
05e92add4a | |
|
|
7de3dca2a3 |
|
|
@ -485,6 +485,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) {
|
||||
|
||||
|
|
@ -1343,7 +1348,6 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> withdraw(SalarySendWithdrawParam param) {
|
||||
if (param.getSalarySendId() == null) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.util.excel;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationLaborListDTO;
|
||||
import com.engine.salary.util.JsonUtil;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
|
|
@ -139,8 +140,10 @@ public class ExcelUtil {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof BigDecimal) {
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||
|
|
@ -235,8 +238,10 @@ public class ExcelUtil {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof BigDecimal) {
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||
|
|
@ -311,8 +316,10 @@ public class ExcelUtil {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof BigDecimal) {
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||
|
|
@ -377,8 +384,10 @@ public class ExcelUtil {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof Boolean) {
|
||||
cell.setCellType(CellType.BOOLEAN);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
|
|
@ -458,8 +467,10 @@ public class ExcelUtil {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof Boolean) {
|
||||
cell.setCellType(CellType.BOOLEAN);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.engine.salary.util.excel;
|
||||
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.engine.salary.component.WeaTableColumnGroup;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.ContrastListDTO;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
|
|
@ -9,6 +10,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 +141,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());
|
||||
}
|
||||
|
||||
|
|
@ -195,8 +197,10 @@ public class ExcelUtilPlus {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof BigDecimal) {
|
||||
if (lastRowRed && rowIndex == rowList.size() - 1) {
|
||||
cell.setCellStyle(numberRedCellStyleMap.get(patternList.get(cellIndex)));
|
||||
|
|
@ -204,7 +208,7 @@ public class ExcelUtilPlus {
|
|||
cell.setCellStyle(numberCellStyleMap.get(patternList.get(cellIndex)));
|
||||
}
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||
cell.setCellValue(((BigDecimal) o).doubleValue());
|
||||
} else if (o instanceof Boolean) {
|
||||
cell.setCellType(CellType.BOOLEAN);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
|
|
@ -224,6 +228,7 @@ public class ExcelUtilPlus {
|
|||
}
|
||||
return workbook;
|
||||
}
|
||||
|
||||
public static XSSFWorkbook genWorkbookV2(List<List<Object>> rowList, String sheetName) {
|
||||
XSSFWorkbook workbook = new XSSFWorkbook();
|
||||
|
||||
|
|
@ -284,11 +289,13 @@ public class ExcelUtilPlus {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof BigDecimal) {
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||
cell.setCellValue(((BigDecimal) o).doubleValue());
|
||||
} else if (o instanceof Boolean) {
|
||||
cell.setCellType(CellType.BOOLEAN);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
|
|
@ -371,8 +378,10 @@ public class ExcelUtilPlus {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof Boolean) {
|
||||
cell.setCellType(CellType.BOOLEAN);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
|
|
@ -480,11 +489,13 @@ public class ExcelUtilPlus {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof BigDecimal) {
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||
cell.setCellValue(((BigDecimal) o).doubleValue());
|
||||
} else if (o instanceof Boolean) {
|
||||
cell.setCellType(CellType.BOOLEAN);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
|
|
@ -678,8 +689,10 @@ public class ExcelUtilPlus {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof BigDecimal) {
|
||||
if (lastRowRed && rowIndex == rowList.size() - 1) {
|
||||
cell.setCellStyle(numberRedCellStyleMap.get(patternList.get(cellIndex)));
|
||||
|
|
@ -843,8 +856,10 @@ public class ExcelUtilPlus {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof BigDecimal) {
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||
|
|
|
|||
Loading…
Reference in New Issue