Commit 1d06b323 authored by hongguangwu's avatar hongguangwu

MVP1.6.7-其他附件+监控

parent b233a29c
......@@ -56,12 +56,12 @@ public class TEmpOtherFile {
@Schema(description = "员工主键")
private String empId;
/**
* 员工姓名
* 附件名称
*/
@ExcelAttribute(name = "员工姓名", maxLength = 32)
@Length(max = 32, message = "员工姓名不能超过32个字符")
@ExcelProperty("员工姓名")
@Schema(description = "员工姓名")
@ExcelAttribute(name = "附件名称", maxLength = 32)
@Length(max = 32, message = "附件名称不能超过32个字符")
@ExcelProperty("附件名称")
@Schema(description = "附件名称")
private String attaName;
/**
......
......@@ -66,12 +66,12 @@ public class TPreEmpOtherFile {
@Schema(description = "员工主键")
private String empId;
/**
* 员工姓名
* 附件名称
*/
@ExcelAttribute(name = "员工姓名", maxLength = 32)
@Length(max = 32, message = "员工姓名不能超过32个字符")
@ExcelProperty("员工姓名")
@Schema(description = "员工姓名")
@ExcelAttribute(name = "附件名称", maxLength = 32)
@Length(max = 32, message = "附件名称不能超过32个字符")
@ExcelProperty("附件名称")
@Schema(description = "附件名称")
private String attaName;
/**
* 原ID
......
......@@ -57,5 +57,8 @@ public class TPreEmpMainVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "档案所在地县", isArea = true, parentField = "fileCity")
@ExcelProperty("档案所在地县")
private String fileTown;
@ExcelAttribute(name = "计税月份")
@ExcelProperty("计税月份")
private String taxMonth;
}
......@@ -62,6 +62,7 @@ import java.net.URL;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.*;
import java.util.regex.Pattern;
/**
* 预入职-主表
......@@ -133,6 +134,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
private static final String ID = "id";
public static final String taxMonthRegex = "^2\\d{5}";
/**
* 预入职-主表简单分页查询
*
......@@ -1931,6 +1934,20 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (project == null || Common.isEmpty(project.getId())) {
errorMessageList.add(new ErrorMessage<>(excel.getRowIndex(), "未找到预入职项目档案表!"));
} else {
if (Common.isNotNull(employee.getBankNo()) && Common.isEmpty(excel.getTaxMonth())) {
errorMessageList.add(new ErrorMessage<>(excel.getRowIndex(), "有银行卡号,计税月份必填!"));
continue;
}
if (Common.isNotNull(excel.getTaxMonth())) {
String taxMonth = excel.getTaxMonth().trim();
if (!taxMonth.matches(taxMonthRegex)) {
errorMessageList.add(new ErrorMessage<>(excel.getRowIndex(), "计税月份为6位年月,例如:202407!"));
continue;
}
if (Common.isEmpty(employee.getTaxMonthFlag()) || CommonConstants.ONE_STRING.equals(employee.getTaxMonthFlag())) {
employee.setTaxMonth(excel.getTaxMonth());
}
}
employee.setEmpNatrue(excel.getEmpNatrue());
project.setEmpNatrue(excel.getEmpNatrue());
employee.setFileProvince(Integer.parseInt(excel.getFileProvince()));
......@@ -1941,6 +1958,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
employee.setFileCity(Integer.parseInt(excel.getFileCity()));
} catch (Exception e) {
errorMessageList.add(new ErrorMessage<>(excel.getRowIndex(), "未找到市!"));
continue;
}
}
if (Common.isEmpty(excel.getFileTown())) {
......@@ -1950,6 +1968,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
employee.setFileTown(Integer.parseInt(excel.getFileTown()));
} catch (Exception e) {
errorMessageList.add(new ErrorMessage<>(excel.getRowIndex(), "未找到县!"));
continue;
}
}
tPreEmployeeInfoService.updateById(employee);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment