Compare commits

...

10 Commits

5 changed files with 17 additions and 5 deletions

View File

@ -601,10 +601,14 @@ public class EmployeeDeclareExcelServiceImpl extends Service implements Employee
Set<String> emptyNames = new HashSet<>();
for (PropertyDescriptor pd : pds) {
Object srcValue = src.getPropertyValue(pd.getName());
String name = pd.getName();
if("dismissDate".equals(name)){
continue;
}
Object srcValue = src.getPropertyValue(name);
// 此处判断可根据需求修改
if (srcValue == null) {
emptyNames.add(pd.getName());
emptyNames.add(name);
}
}
String[] result = new String[emptyNames.size()];

View File

@ -660,6 +660,7 @@ public class EmployeeDeclareServiceImpl extends Service implements EmployeeDecla
ImmutableMap<String, String> requestParam = ImmutableMap.of("requestId", employeeDeclareRecord.getRequestId());
Map<String, String> header = SingnatureData.initHeader(Collections.emptyMap(), apiConfig.getAppKey(), apiConfig.getAppSecret());
String res = HttpUtil.getRequest(url, header, requestParam);
log.info("人员报送反馈:{}", res);
DeclareEmployeeFeedbackResponse declareEmployeeFeedbackResponse = JsonUtil.parseObject(res, DeclareEmployeeFeedbackResponse.class);
if (Objects.isNull(declareEmployeeFeedbackResponse) || Objects.isNull(declareEmployeeFeedbackResponse.getHead())) {
log.error("服务异常:" + res);

View File

@ -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) {

View File

@ -1,5 +1,6 @@
package com.engine.salary.service.impl;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
@ -917,7 +918,8 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe
declareStatus.setTaxDeclareStatus(taxDeclareStatusEnum.getValue());
// 申报类型
declareStatus.setTaxPayAmount(Util.null2String(declareTaxFeedbackResponse.getBody().get("ykjse")));
declareStatus.setPersonNum(Integer.parseInt(Optional.ofNullable(declareTaxFeedbackResponse.getBody().get("nsrc")).orElse("0").toString()));
String nsrc = Util.null2String(declareTaxFeedbackResponse.getBody().get("nsrc"));
declareStatus.setPersonNum(Integer.parseInt(NumberUtil.isNumber(nsrc) ? nsrc : "0"));
declareStatus.setDeclareRequestId(declareStatus.getRequestId());
declareStatus.setRequestId("");
//实缴不含滞纳金

View File

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