Merge branch 'release/3.0.2.2504.01' into custom/联特
# Conflicts: # src/com/engine/salary/util/excel/ExcelUtilPlus.java
This commit is contained in:
commit
a16a16d13a
|
|
@ -630,7 +630,8 @@ public class SalaryBillBO {
|
|||
} else {
|
||||
for (Object keyName : e.keySet()) {
|
||||
if ((salaryItem.getId() + SalaryArchiveConstant.DYNAMIC_SUFFIX).equals(keyName.toString())) {
|
||||
boolean isHide = (isHideNull && StringUtils.isEmpty(e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString()))
|
||||
String itemValue = Util.null2String(e.get(keyName.toString()));
|
||||
boolean isHide = (isHideNull && StringUtils.isEmpty(itemValue))
|
||||
||
|
||||
(isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString())
|
||||
&& BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString())) == 0);
|
||||
|
|
@ -641,7 +642,7 @@ public class SalaryBillBO {
|
|||
emailContent.append("</th>");
|
||||
|
||||
emailContent.append("<td style=\"padding: 16px 24px;display: table-cell;flex: 1;color: #000000d9;font-size: 12px;line-height: 1.5715;word-break: break-word;overflow-wrap: break-word;border-collapse: collapse;border: 1px solid rgba(0,0,0,.06);\">");
|
||||
emailContent.append(e.get(keyName.toString()));
|
||||
emailContent.append(itemValue.replaceAll("null", ""));
|
||||
emailContent.append("</td>");
|
||||
}
|
||||
break;
|
||||
|
|
@ -710,7 +711,8 @@ public class SalaryBillBO {
|
|||
SalaryTemplateSalaryItemListDTO salaryItem = itemPartition.get(i);
|
||||
for (Object keyName : e.keySet()) {
|
||||
if ((salaryItem.getId() + SalaryArchiveConstant.DYNAMIC_SUFFIX).equals(keyName.toString())) {
|
||||
boolean isHide = (isHideNull && StringUtils.isEmpty(e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString()))
|
||||
String itemValue = Util.null2String(e.get(keyName.toString()));
|
||||
boolean isHide = (isHideNull && StringUtils.isEmpty(itemValue))
|
||||
||
|
||||
(isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString())
|
||||
&& BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString())) == 0);
|
||||
|
|
@ -721,7 +723,7 @@ public class SalaryBillBO {
|
|||
emailContent.append("</th>");
|
||||
|
||||
emailContent.append("<td style=\"padding: 16px 24px;display: table-cell;flex: 1;color: #000000d9;font-size: 12px;line-height: 1.5715;word-break: break-word;overflow-wrap: break-word;border-collapse: collapse;border: 1px solid rgba(0,0,0,.06);\">");
|
||||
emailContent.append(e.get(keyName.toString()));
|
||||
emailContent.append(itemValue.replaceAll("null", ""));
|
||||
emailContent.append("</td>");
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@ public class SalaryStatisticsDataPerspectiveQueryParam extends BaseQueryParam {
|
|||
//个税扣缴义务人配置
|
||||
private List<Long> taxAgent;
|
||||
|
||||
@JsonIgnore
|
||||
private List<Long> salarySob;
|
||||
|
||||
@JsonIgnore
|
||||
//收入所得项目配置
|
||||
private List<Integer> incomeCategory;
|
||||
|
|
|
|||
|
|
@ -464,12 +464,21 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
|||
if (reportPO.getTaxAgentSetting() != null) {
|
||||
param.setTaxAgent(((List<Map>) JSON.parseArray(reportPO.getTaxAgentSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
if (reportPO.getSalarySobSetting() != null) {
|
||||
param.setSalarySob(((List<Map>) JSON.parseArray(reportPO.getSalarySobSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
if (reportPO.getSubCompanySetting() != null) {
|
||||
param.setSubCompany(((List<Map>) JSON.parseArray(reportPO.getSubCompanySetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
if (reportPO.getDepartSetting() != null) {
|
||||
param.setDepart(((List<Map>) JSON.parseArray(reportPO.getDepartSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
if (reportPO.getPositionSetting() != null) {
|
||||
param.setPosition(((List<Map>) JSON.parseArray(reportPO.getPositionSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
if (reportPO.getStatusSetting() != null) {
|
||||
param.setStatus(((List<Map>) JSON.parseArray(reportPO.getStatusSetting(), Map.class)).stream().map(m -> m.get(key).toString()).collect(Collectors.toList()));
|
||||
}
|
||||
if (reportPO.getEmployeeSetting() != null) {
|
||||
param.setEmployee(((List<Map>) JSON.parseArray(reportPO.getEmployeeSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<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)));
|
||||
|
|
@ -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