Merge branch 'release/2.14.3.2406.01' into release/个税版本2.14.3.2406.01

This commit is contained in:
钱涛 2024-05-28 11:29:37 +08:00
commit f595b1782a
24 changed files with 87 additions and 28 deletions

View File

@ -78,6 +78,7 @@ public class SalaryArchiveBO {
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86185, "部门"), "departmentName"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86185, "工号"), "workcode"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86186, "手机号"), "mobile"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86186, "证件号码"), "idNo"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "员工状态"), "employeeStatus"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "起始发薪日期"), "payStartDate"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "最后发薪日期"), "payEndDate"));

View File

@ -349,6 +349,7 @@ public class SalaryArchiveExcelBO extends Service {
String deparmentName = Optional.ofNullable(map.get(departmentI18n)).orElse("").toString();
String mobileName = Optional.ofNullable(map.get("手机号")).orElse("").toString();
String workcode = Optional.ofNullable(map.get("工号")).orElse("").toString();
String idNo = Optional.ofNullable(map.get("证件号码")).orElse("").toString();
String validType = importHandleParam.getEmpValidType();
List<DataCollectionEmployee> emps = new ArrayList<>();
@ -369,6 +370,10 @@ public class SalaryArchiveExcelBO extends Service {
emps = importHandleParam.getEmployees().stream().filter(e -> (StringUtils.isBlank(workcode) || Objects.equals(e.getWorkcode(), workcode)))
.collect(Collectors.toList());
}
else if ("2".equals(validType)) {
emps = importHandleParam.getEmployees().stream().filter(e -> (StringUtils.isBlank(idNo) || Objects.equals(e.getIdNo(), idNo)))
.collect(Collectors.toList());
}
}
List<Long> employeeSameIds = new ArrayList<>();

View File

@ -89,6 +89,12 @@ public class SalaryArchiveListDTO {
@TableTitle(title = "工号", dataIndex = "workcode", key = "workcode")
private String workcode;
/**
* 证件号码
*/
@TableTitle(title = "证件号码", dataIndex = "idNo", key = "idNo")
private String idNo;
/**
* 员工状态
*/

View File

@ -54,10 +54,16 @@ public class SalarySobRangeImportListDTO {
@ExcelProperty(index = 3)
private String jobNum;
//证件号码
@SalaryTableColumn(text = "证件号码", width = "10%", column = "idNo")
@TableTitle(title = "证件号码", dataIndex = "idNo", key = "idNo")
@ExcelProperty(index = 4)
private String idNo;
//人员状态
@SalaryTableColumn(text = "员工状态", width = "10%", column = "employeeStatus")
@TableTitle(title = "员工状态", dataIndex = "employeeStatus", key = "employeeStatus")
@ExcelProperty(index = 4)
@ExcelProperty(index = 5)
private String employeeStatus;
}

View File

@ -62,10 +62,16 @@ public class TaxAgentManageRangeEmployeeListDTO {
@ExcelProperty(index = 3)
private String jobNum;
//
@SalaryTableColumn(text = "证件号码", width = "10%", column = "idNo")
@TableTitle(title = "证件号码", dataIndex = "idNo", key = "idNo")
@ExcelProperty(index = 4)
private String idNo;
//人员状态
@SalaryTableColumn(text = "员工状态", width = "10%", column = "employeeStatus")
@TableTitle(title = "员工状态", dataIndex = "employeeStatus", key = "employeeStatus")
@ExcelProperty(index = 4)
@ExcelProperty(index = 5)
private String employeeStatus;

View File

@ -94,11 +94,13 @@
, t.employee_type
, e.mobile
, e.workcode
, e.certificatenum as idNo
, e.lastname as username
, e.status AS employeeStatus
, e.companystartdate as companystartdate
, e.enddate as dismissdate
, e.status AS employeeStatus
,e.certificatenum as idNo
, d.departmentname AS departmentName
, c.subcompanyname AS subcompanyName
</sql>

View File

@ -9,6 +9,7 @@
e.status,
e.mobile,
e.workcode,
e.certificatenum as idNo,
'false' as extEmp
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id

View File

@ -86,9 +86,10 @@ public interface SalaryEmployeeService {
* @param deparmentName 部门
* @param mobile 手机号
* @param workcode 工号
* @param idNo 身份证号
* @param uid 人员id
*/
List<DataCollectionEmployee> matchImportEmployee(String confValue, List<DataCollectionEmployee> employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid);
List<DataCollectionEmployee> matchImportEmployee(String confValue, List<DataCollectionEmployee> employeeList, String userName, String deparmentName, String mobile, String workcode, String idNo, Long uid);
String empValidType();

View File

@ -296,9 +296,10 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
String deparmentName = dto.getDepartmentName();
String mobile = dto.getMobile();
String workcode = dto.getJobNum();
String idNo = dto.getIdNo();
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null);
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo, null);
if (StringUtils.isBlank(userName) && "0".equals(confValue)) {
//姓名 不能为空

View File

@ -618,9 +618,10 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
String deparmentName = dto.getDepartmentName();
String mobile = dto.getMobile();
String workcode = dto.getJobNum();
String idNo = dto.getIdNo();
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null);
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo,null);
//当人员信息导入筛选的全局配置为"0"姓名才是必填项
if (StringUtils.isBlank(userName) && "0".equals(confValue)) {

View File

@ -32,6 +32,7 @@ import com.engine.salary.entity.salarysob.po.SalarySobRangePO;
import com.engine.salary.enums.OperateTypeEnum;
import com.engine.salary.enums.UserStatusEnum;
import com.engine.salary.enums.datacollection.AttendQuoteSourceTypeEnum;
import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.datacollection.AttendQuoteDataMapper;
import com.engine.salary.mapper.salarysob.SalarySobMapper;
@ -551,6 +552,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
header.add(SalaryI18nUtil.getI18nLabel(86185, "部门"));
header.add(SalaryI18nUtil.getI18nLabel(86186, "手机号"));
header.add(SalaryI18nUtil.getI18nLabel(86317, "工号"));
header.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
// 动态列
for (AttendQuoteFieldPO attendQuoteField : attendQuoteFields) {
header.add(attendQuoteField.getFieldName());
@ -630,7 +632,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
// 获取租户下所有的人员
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listAll(UseEmployeeTypeEnum.ALL);
// 获取已设置的可同步的考勤字段
List<AttendQuoteFieldPO> attendQuoteFields = getAttendQuoteSetFields(AttendQuoteSourceTypeEnum.IMPORT);
// 生成获取考勤引用
@ -702,10 +704,11 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
String deparmentName = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86185, "部门"))).orElse("").toString();
String mobile = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86186, "手机号"))).orElse("").toString();
String workcode = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86317, "工号"))).orElse("").toString();
String idNo = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86317, "证件号码"))).orElse("").toString();
List<Long> employeeSameIds = new ArrayList<>();
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user).matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null);
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo, null);
//含在职和离职选在职数据
if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) {
employeeSameIds = emps.stream()

View File

@ -251,10 +251,11 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
String deparmentName = dto.getDepartmentName();
String mobile = dto.getMobile();
String workcode = dto.getJobNum();
String idNo = dto.getIdNo();
List<Long> employeeSameIds = new ArrayList<>();
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null);
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo,null);
//含在职和离职选在职数据
if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) {
employeeSameIds = emps.stream()

View File

@ -1758,6 +1758,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
String deparmentName = (String) map.getOrDefault("部门", "");
String mobile = (String) map.getOrDefault("手机号", "");
String workcode = (String) map.getOrDefault("工号", "");
String idNo = (String) map.getOrDefault("证件号码", "");
if (StringUtils.equals(SalaryI18nUtil.getI18nLabel(85429, "姓名"), dataKey.toString())) {
@ -1770,7 +1771,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
} else {
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, dataValue, deparmentName, mobile, workcode, null);
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, dataValue, deparmentName, mobile, workcode,idNo, null);
if (CollectionUtils.isEmpty(employeeSameIds)) {
isError = true;
@ -3036,6 +3037,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
String deparmentName = (String) map.getOrDefault("部门", "");
String mobile = (String) map.getOrDefault("手机号", "");
String workcode = (String) map.getOrDefault("工号", "");
String idNo = (String) map.getOrDefault("证件号码", "");
if (StringUtils.equals(SalaryI18nUtil.getI18nLabel(85429, "姓名"), dataKey.toString())) {
@ -3048,7 +3050,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
} else {
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, dataValue, deparmentName, mobile, workcode, null);
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, dataValue, deparmentName, mobile, workcode, idNo,null);
if (CollectionUtils.isEmpty(employeeSameIds)) {
isError = true;
@ -3898,6 +3900,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
String departmentName = (String) map.getOrDefault("部门", "");
String mobile = (String) map.getOrDefault("手机号", "");
String workcode = (String) map.getOrDefault("工号", "");
String idNo = (String) map.getOrDefault("证件号码", "");
if (StringUtils.equals(SalaryI18nUtil.getI18nLabel(85429, "姓名"), dataKey.toString())) {
@ -3910,7 +3913,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
} else {
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, name, departmentName, mobile, workcode, null);
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, name, departmentName, mobile, workcode,idNo, null);
if (CollectionUtils.isEmpty(employeeSameIds)) {
isError = true;

View File

@ -1101,6 +1101,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
String mobile = (String) mobileMap.get(SalaryI18nUtil.getI18nLabel(86186, "手机号"));
String userStatus = (String) userStatusMap.get(SalaryI18nUtil.getI18nLabel(86187, "员工状态"));
String workcode = (String) workcodeMap.get(SalaryI18nUtil.getI18nLabel(86317, "工号"));
String idNo = (String) workcodeMap.get(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
String toAddEmployeeId;
if (employeeIdMap.isEmpty()) {
toAddEmployeeId = null;
@ -1126,7 +1127,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
isError = true;
}
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
employees = getSalaryEmployeeService(user).matchImportEmployee(confValue,employeeByIds, userName, deparmentName, mobile, workcode, null);
employees = getSalaryEmployeeService(user).matchImportEmployee(confValue,employeeByIds, userName, deparmentName, mobile, workcode,idNo, null);
} else {
employees = employeeByIds.stream().filter(f -> f.getEmployeeId().equals(addEmployeeId)).collect(Collectors.toList());
}

View File

@ -727,6 +727,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
headerRangeList.add("username");
headerRangeList.add("mobile");
headerRangeList.add("workcode");
headerRangeList.add("idNo");
headerRangeList.add("taxAgentName");
headerRangeList.add("departmentName");
// 查询列表的表头
@ -1125,6 +1126,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
String deparmentName = (String) map.getOrDefault("部门", "");
String mobile = (String) map.getOrDefault("手机号", "");
String workcode = (String) map.getOrDefault("工号", "");
String idNo = (String) map.getOrDefault("证件号码", "");
if (StringUtils.equals(SalaryI18nUtil.getI18nLabel(85429, "姓名"), dataKey.toString())) {
usernameIndex = j;
@ -1136,7 +1138,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
//salaryBatchService.createExcelComment(excelComments, SalaryI18nUtil.getI18nLabel(102838, "姓名不能为空"), i, i, j, j);
} else {
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, salaryEmployees, dataValue, deparmentName, mobile, workcode, null);
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, salaryEmployees, dataValue, deparmentName, mobile, workcode,idNo, null);
if (CollectionUtils.isEmpty(employeeSameIds)) {
isError = true;

View File

@ -277,6 +277,7 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch
header.add(SalaryI18nUtil.getI18nLabel(86185, "部门"));
header.add(SalaryI18nUtil.getI18nLabel(1933, "工号"));
header.add(SalaryI18nUtil.getI18nLabel(86186, "手机号"));
header.add(SalaryI18nUtil.getI18nLabel(86186, "证件号码"));
header.add(SalaryI18nUtil.getI18nLabel(15890, "员工状态"));
// if (enableHr) {
// header.add(SalaryI18nUtil.getI18nLabel(106277, "身份证号码"));
@ -335,6 +336,7 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch
row.add(Optional.ofNullable(e.get("departmentName")).orElse("").toString());
row.add(Optional.ofNullable(e.get("workcode")).orElse("").toString());
row.add(e.get("mobile") == null ? "" : e.get("mobile").toString());
row.add(Util.null2String(e.get("idNo")));
row.add(Util.null2String(e.get("employeeStatus")));
// if (enableHr) {
// row.add(Optional.ofNullable(e.get("idNo")).orElse("").toString());

View File

@ -496,6 +496,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
map.put("departmentName", e.getDepartmentName());
map.put("mobile", e.getMobile());
map.put("workcode", e.getWorkcode());
map.put("idNo", e.getIdNo());
map.put("employeeStatus", e.getEmployeeStatus());
map.put("payStartDate", SalaryDateUtil.getFormatLocalDate(e.getPayStartDate()));
map.put("payEndDate", SalaryDateUtil.getFormatLocalDate(e.getPayEndDate()));
@ -524,6 +525,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
SalaryI18nUtil.getI18nLabel(86185, "部门"),
SalaryI18nUtil.getI18nLabel(86176, "工号"),
SalaryI18nUtil.getI18nLabel(86186, "手机号"),
SalaryI18nUtil.getI18nLabel(86186, "证件号码"),
SalaryI18nUtil.getI18nLabel(15890, "员工状态"),
SalaryI18nUtil.getI18nLabel(91075, "起始发薪日期"),
SalaryI18nUtil.getI18nLabel(91075, "最后发薪日期")};
@ -579,6 +581,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
row.add(Util.null2String(e.get("departmentName")));
row.add(Util.null2String(e.get("workcode")));
row.add(Util.null2String(e.get("mobile")));
row.add(Util.null2String(e.get("idNo")));
row.add(Util.null2String(e.get("employeeStatus")));
row.add(Util.null2String(e.get("payStartDate")));
row.add(Util.null2String(e.get("payEndDate")));

View File

@ -227,7 +227,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
}
@Override
public List<DataCollectionEmployee> matchImportEmployee(String confValue, List<DataCollectionEmployee> employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid) {
public List<DataCollectionEmployee> matchImportEmployee(String confValue, List<DataCollectionEmployee> employeeList, String userName, String deparmentName, String mobile, String workcode, String idNo, Long uid) {
if (uid != null) {
return employeeList.stream()
.filter(e -> Objects.equals(e.getEmployeeId(), uid))
@ -244,6 +244,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
} else if ("1".equals(confValue)) {
employees = employeeList.stream().filter(e -> (StringUtils.isBlank(workcode) || Objects.equals(e.getWorkcode(), workcode)))
.collect(Collectors.toList());
} else if ("2".equals(confValue)) {
employees = employeeList.stream().filter(e -> (StringUtils.isBlank(idNo) || Objects.equals(e.getIdNo(), idNo)))
.collect(Collectors.toList());
}
return SalaryI18nUtil.i18nList(employees);
@ -272,7 +275,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
if (CollectionUtils.isEmpty(virtualDepartmentIds)) {
return Collections.emptyList();
}
return SalaryI18nUtil.i18nList(getEmployMapper().getVirtualDeptInfoList(virtualDepartmentIds));
return SalaryI18nUtil.i18nList(getEmployMapper().getVirtualDeptInfoList(virtualDepartmentIds));
}

View File

@ -249,13 +249,14 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
// 注释
List<ExcelComment> excelComments = Lists.newArrayList();
if (confValue.equals("1")) {
// 人员校验规则为工号
excelComments.add(new ExcelComment(3, 0, 4, 2, SalaryI18nUtil.getI18nLabel(100344, "必填")));
} else {
if (confValue.equals("0")) {
excelComments.add(new ExcelComment(0, 0, 1, 2, SalaryI18nUtil.getI18nLabel(100344, "必填")));
} else if(confValue.equals("1")){
excelComments.add(new ExcelComment(3, 0, 4, 2, SalaryI18nUtil.getI18nLabel(100344, "必填")));
} else if(confValue.equals("2")){
excelComments.add(new ExcelComment(4, 0, 5, 2, SalaryI18nUtil.getI18nLabel(100344, "必填")));
}
excelComments.add(new ExcelComment(4, 0, 6, 3, SalaryI18nUtil.getI18nLabel(100344, "若不填,默认全部员工状态。指定员工状态格式:试用、正式、临时、试用延期")));
excelComments.add(new ExcelComment(5, 0, 7, 3, SalaryI18nUtil.getI18nLabel(100344, "若不填,默认全部员工状态。指定员工状态格式:试用、正式、临时、试用延期")));
//获取excel
@ -325,12 +326,13 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange
String deparmentName = dto.getDepartmentName();
String mobile = dto.getMobile();
String workcode = dto.getJobNum();
String idNo = dto.getIdNo();
String employeeStatusStr = dto.getEmployeeStatus();
List<Long> employeeSameIds = new ArrayList<>();
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user)
.matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null);
.matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, idNo,null);
//含在职和离职选在职数据
if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) {
employeeSameIds = emps.stream()
@ -477,7 +479,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange
InputStream fileInputStream = null;
try {
fileInputStream = ImageFileManager.getInputStreamById(Integer.parseInt(imageId));
List<SalarySobRangeImportListDTO> salarySobRangeImportList = ExcelParseHelper.parse2Map(fileInputStream, SalarySobRangeImportListDTO.class, 0, 1, 5, "TaxAgentEmployee.xlsx");
List<SalarySobRangeImportListDTO> salarySobRangeImportList = ExcelParseHelper.parse2Map(fileInputStream, SalarySobRangeImportListDTO.class, 0, 1, 6, "TaxAgentEmployee.xlsx");
apidatas.put("preview", salarySobRangeImportList);
} finally {
IOUtils.closeQuietly(fileInputStream);
@ -499,6 +501,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange
headers.add(SalaryI18nUtil.getI18nLabel(86185, "部门"));
headers.add(SalaryI18nUtil.getI18nLabel(86186, "手机号"));
headers.add(SalaryI18nUtil.getI18nLabel(86317, "工号"));
headers.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
headers.add(SalaryI18nUtil.getI18nLabel(86318, "员工状态"));
List<List<Object>> rowList = new ArrayList<>();
rowList.add(headers);

View File

@ -242,11 +242,12 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
String deparmentName = dto.getDepartmentName();
String mobile = dto.getMobile();
String workcode = dto.getJobNum();
String idNo = dto.getIdNo();
List<Long> employeeSameIds = new ArrayList<>();
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user)
.matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null);
.matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo,null);
//含在职和离职选在职数据
if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) {
employeeSameIds = emps.stream()

View File

@ -46,7 +46,7 @@ public class TaxAgentExcelServiceImpl extends Service implements TaxAgentExcelSe
// 注释
List<ExcelComment> excelComments = Lists.newArrayList();
excelComments.add(new ExcelComment(0, 0, 1, 2, SalaryI18nUtil.getI18nLabel(100344, "必填")));
excelComments.add(new ExcelComment(4, 0, 6, 3, SalaryI18nUtil.getI18nLabel(100344, "若不填,默认全部员工状态。指定员工状态格式:试用、正式、临时、试用延期")));
excelComments.add(new ExcelComment(5, 0, 7, 3, SalaryI18nUtil.getI18nLabel(100344, "若不填,默认全部员工状态。指定员工状态格式:试用、正式、临时、试用延期")));
//获取excel
return ExcelUtil.genWorkbookV2(rowList, "个税扣缴义务人人员范围", excelComments);
}
@ -62,7 +62,7 @@ public class TaxAgentExcelServiceImpl extends Service implements TaxAgentExcelSe
InputStream fileInputStream = null;
try {
fileInputStream = ImageFileManager.getInputStreamById(Integer.parseInt(imageId));
List<TaxAgentManageRangeEmployeeListDTO> taxAgentManageRangeEmployees = ExcelParseHelper.parse2Map(fileInputStream, TaxAgentManageRangeEmployeeListDTO.class, 0, 1, 5, "TaxAgentEmployee.xlsx");
List<TaxAgentManageRangeEmployeeListDTO> taxAgentManageRangeEmployees = ExcelParseHelper.parse2Map(fileInputStream, TaxAgentManageRangeEmployeeListDTO.class, 0, 1, 6, "TaxAgentEmployee.xlsx");
apidatas.put("preview", taxAgentManageRangeEmployees);
} finally {
IOUtils.closeQuietly(fileInputStream);
@ -86,6 +86,7 @@ public class TaxAgentExcelServiceImpl extends Service implements TaxAgentExcelSe
headers.add(SalaryI18nUtil.getI18nLabel( 86185, "部门"));
headers.add(SalaryI18nUtil.getI18nLabel(86186, "手机号"));
headers.add(SalaryI18nUtil.getI18nLabel(86317, "工号"));
headers.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
headers.add(SalaryI18nUtil.getI18nLabel(86318, "员工状态"));
List<List<Object>> rowList = new ArrayList<>();
rowList.add(headers);

View File

@ -826,7 +826,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
InputStream fileInputStream = null;
try {
fileInputStream = ImageFileManager.getInputStreamById(Integer.parseInt(imageId));
List<TaxAgentManageRangeEmployeeListDTO> rangeEmployees = ExcelParseHelper.parse2Map(fileInputStream, TaxAgentManageRangeEmployeeListDTO.class, 0, 1, 5, "TaxAgentEmployee.xlsx");
List<TaxAgentManageRangeEmployeeListDTO> rangeEmployees = ExcelParseHelper.parse2Map(fileInputStream, TaxAgentManageRangeEmployeeListDTO.class, 0, 1, 6, "TaxAgentEmployee.xlsx");
int total = rangeEmployees.size();
int index = 0;
@ -867,12 +867,14 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
String deparmentName = dto.getDepartmentName();
String mobile = dto.getMobile();
String workcode = dto.getJobNum();
String idNo = dto.getIdNo();
String employeeStatusStr = dto.getEmployeeStatus();
List<Long> employeeSameIds = new ArrayList<>();
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> emps = getSalaryEmployeeService()
.matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null);
.matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode,idNo, null);
if (CollectionUtils.isNotEmpty(emps)) {
employeeSameIds = emps.stream()
.map(DataCollectionEmployee::getEmployeeId)

View File

@ -11,7 +11,8 @@ public enum MatchEmployeeModeEnum implements BaseEnum<String> {
//"0"代表按照姓名+部门+手机号为条件的人员匹配方式"1"代表按照工号为条件的人员匹配方式
NAMEDEPMOBILEMATCH("0", "姓名-部门-手机号", 1),
WORKCODEMATCH("1", "工号", 1);
WORKCODEMATCH("1", "工号", 1),
IDNO("2", "证件号码", 1);
private String value;

View File

@ -16,6 +16,7 @@ import com.engine.salary.util.page.PageInfo;
import com.engine.salary.wrapper.*;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@ -45,6 +46,7 @@ import java.util.Objects;
* @author qiantao
* @version 1.0
**/
@Slf4j
public class SalarySobController {
@ -283,6 +285,7 @@ public class SalarySobController {
response.setContentType("application/octet-stream");
return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
} catch (Exception e) {
log.error("人员范围导入失败",e);
throw e;
}
}