diff --git a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java index 62d9196a6..fabbfd1b0 100644 --- a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java +++ b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java @@ -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")); diff --git a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java index cfe3d8d43..3332fff79 100644 --- a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java +++ b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java @@ -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 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 employeeSameIds = new ArrayList<>(); diff --git a/src/com/engine/salary/entity/salaryarchive/dto/SalaryArchiveListDTO.java b/src/com/engine/salary/entity/salaryarchive/dto/SalaryArchiveListDTO.java index 82b97bf05..1083ca4dd 100644 --- a/src/com/engine/salary/entity/salaryarchive/dto/SalaryArchiveListDTO.java +++ b/src/com/engine/salary/entity/salaryarchive/dto/SalaryArchiveListDTO.java @@ -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; + /** * 员工状态 */ diff --git a/src/com/engine/salary/entity/salarysob/dto/SalarySobRangeImportListDTO.java b/src/com/engine/salary/entity/salarysob/dto/SalarySobRangeImportListDTO.java index f1a29db50..86973e4a4 100644 --- a/src/com/engine/salary/entity/salarysob/dto/SalarySobRangeImportListDTO.java +++ b/src/com/engine/salary/entity/salarysob/dto/SalarySobRangeImportListDTO.java @@ -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; } diff --git a/src/com/engine/salary/entity/taxagent/dto/TaxAgentManageRangeEmployeeListDTO.java b/src/com/engine/salary/entity/taxagent/dto/TaxAgentManageRangeEmployeeListDTO.java index 8865e6742..efb2bd799 100644 --- a/src/com/engine/salary/entity/taxagent/dto/TaxAgentManageRangeEmployeeListDTO.java +++ b/src/com/engine/salary/entity/taxagent/dto/TaxAgentManageRangeEmployeeListDTO.java @@ -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; diff --git a/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml b/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml index 0ad41c310..a1fa6af6b 100644 --- a/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml +++ b/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml @@ -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 diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml index 97ff1970a..a85801244 100644 --- a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml @@ -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 diff --git a/src/com/engine/salary/service/SalaryEmployeeService.java b/src/com/engine/salary/service/SalaryEmployeeService.java index 5c84a0efb..a320545cb 100644 --- a/src/com/engine/salary/service/SalaryEmployeeService.java +++ b/src/com/engine/salary/service/SalaryEmployeeService.java @@ -86,9 +86,10 @@ public interface SalaryEmployeeService { * @param deparmentName 部门 * @param mobile 手机号 * @param workcode 工号 + * @param idNo 身份证号 * @param uid 人员id */ - List matchImportEmployee(String confValue, List employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid); + List matchImportEmployee(String confValue, List employeeList, String userName, String deparmentName, String mobile, String workcode, String idNo, Long uid); String empValidType(); diff --git a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java index 8a3fcd474..a89542508 100644 --- a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java @@ -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 employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null); + List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo, null); if (StringUtils.isBlank(userName) && "0".equals(confValue)) { //姓名 不能为空 diff --git a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java index 1943b49ee..19cc49ed6 100644 --- a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java @@ -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 employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null); + List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo,null); //当人员信息导入筛选的全局配置为"0"时,姓名才是必填项 if (StringUtils.isBlank(userName) && "0".equals(confValue)) { diff --git a/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java b/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java index 9216e7841..c43ffb7c3 100644 --- a/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java +++ b/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java @@ -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 employees = getSalaryEmployeeService(user).listEmployee(); + List employees = getSalaryEmployeeService(user).listAll(UseEmployeeTypeEnum.ALL); // 获取已设置的可同步的考勤字段 List 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 employeeSameIds = new ArrayList<>(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List emps = getSalaryEmployeeService(user).matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null); + List emps = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo, null); //含在职和离职,选在职数据 if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) { employeeSameIds = emps.stream() diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index 6ac7b89cf..d5877254e 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -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 employeeSameIds = new ArrayList<>(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List emps = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null); + List emps = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo,null); //含在职和离职,选在职数据 if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) { employeeSameIds = emps.stream() diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 2b54dc5dc..b0a3288d2 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -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 employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, dataValue, deparmentName, mobile, workcode, null); + List 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 employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, dataValue, deparmentName, mobile, workcode, null); + List 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 employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, name, departmentName, mobile, workcode, null); + List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, name, departmentName, mobile, workcode,idNo, null); if (CollectionUtils.isEmpty(employeeSameIds)) { isError = true; diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index d96af1c37..5cf0cdcb3 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -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()); } diff --git a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java index 2cbb928b9..a7e648150 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java @@ -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 employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, salaryEmployees, dataValue, deparmentName, mobile, workcode, null); + List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, salaryEmployees, dataValue, deparmentName, mobile, workcode,idNo, null); if (CollectionUtils.isEmpty(employeeSameIds)) { isError = true; diff --git a/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java index c34c1fcc3..a63856ca1 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java @@ -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()); diff --git a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java index 22b6eb738..2bfd9f8c3 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java @@ -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"))); diff --git a/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java b/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java index 41f0f9875..8f5a6707b 100644 --- a/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java @@ -227,7 +227,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee } @Override - public List matchImportEmployee(String confValue, List employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid) { + public List matchImportEmployee(String confValue, List 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)); } diff --git a/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java index cebcefa63..0432abfee 100644 --- a/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java @@ -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 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 employeeSameIds = new ArrayList<>(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 List 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 salarySobRangeImportList = ExcelParseHelper.parse2Map(fileInputStream, SalarySobRangeImportListDTO.class, 0, 1, 5, "TaxAgentEmployee.xlsx"); + List 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> rowList = new ArrayList<>(); rowList.add(headers); diff --git a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java index efe53fae3..80fee7f92 100644 --- a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java @@ -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 employeeSameIds = new ArrayList<>(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 List 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() diff --git a/src/com/engine/salary/service/impl/TaxAgentExcelServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentExcelServiceImpl.java index 932f8a2ee..636c65c4c 100644 --- a/src/com/engine/salary/service/impl/TaxAgentExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentExcelServiceImpl.java @@ -46,7 +46,7 @@ public class TaxAgentExcelServiceImpl extends Service implements TaxAgentExcelSe // 注释 List 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 taxAgentManageRangeEmployees = ExcelParseHelper.parse2Map(fileInputStream, TaxAgentManageRangeEmployeeListDTO.class, 0, 1, 5, "TaxAgentEmployee.xlsx"); + List 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> rowList = new ArrayList<>(); rowList.add(headers); diff --git a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java index e789ea5c2..5d17168b5 100644 --- a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java @@ -826,7 +826,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM InputStream fileInputStream = null; try { fileInputStream = ImageFileManager.getInputStreamById(Integer.parseInt(imageId)); - List rangeEmployees = ExcelParseHelper.parse2Map(fileInputStream, TaxAgentManageRangeEmployeeListDTO.class, 0, 1, 5, "TaxAgentEmployee.xlsx"); + List 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 employeeSameIds = new ArrayList<>(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 List 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) diff --git a/src/com/engine/salary/sys/enums/MatchEmployeeModeEnum.java b/src/com/engine/salary/sys/enums/MatchEmployeeModeEnum.java index 0fcfc35c6..1536718cb 100644 --- a/src/com/engine/salary/sys/enums/MatchEmployeeModeEnum.java +++ b/src/com/engine/salary/sys/enums/MatchEmployeeModeEnum.java @@ -11,7 +11,8 @@ public enum MatchEmployeeModeEnum implements BaseEnum { //"0"代表按照姓名+部门+手机号为条件的人员匹配方式,"1"代表按照工号为条件的人员匹配方式 NAMEDEPMOBILEMATCH("0", "姓名-部门-手机号", 1), - WORKCODEMATCH("1", "工号", 1); + WORKCODEMATCH("1", "工号", 1), + IDNO("2", "证件号码", 1); private String value; diff --git a/src/com/engine/salary/web/SalarySobController.java b/src/com/engine/salary/web/SalarySobController.java index 3782721f4..6f214c507 100644 --- a/src/com/engine/salary/web/SalarySobController.java +++ b/src/com/engine/salary/web/SalarySobController.java @@ -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; } }