社保福利通过证件号码导入
This commit is contained in:
parent
238438897b
commit
63851a1fe7
|
|
@ -36,6 +36,8 @@ public class InsuranceArchivesEmployeePO {
|
|||
|
||||
private String telephone;
|
||||
|
||||
private String idNo;
|
||||
|
||||
@I18n
|
||||
private String departmentName;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.salary.entity.siexport.po;
|
|||
|
||||
import com.engine.salary.annotation.I18n;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
|
|
@ -9,6 +10,7 @@ import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
|
|||
* @Date 2022/3/7
|
||||
* @Version V1.0
|
||||
**/
|
||||
@Data
|
||||
public class AccountExportPO extends InsuranceAccountDetailPO {
|
||||
|
||||
@I18n
|
||||
|
|
@ -16,58 +18,12 @@ public class AccountExportPO extends InsuranceAccountDetailPO {
|
|||
|
||||
private String telephone;
|
||||
|
||||
private String idNo;
|
||||
|
||||
@I18n
|
||||
private String departmentName;
|
||||
|
||||
private Integer userStatus;
|
||||
|
||||
private String workcode;
|
||||
|
||||
public void setWorkcode(String workcode) {
|
||||
this.workcode = workcode;
|
||||
}
|
||||
|
||||
public String getWorkcode() {
|
||||
return workcode;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getTelephone() {
|
||||
return telephone;
|
||||
}
|
||||
|
||||
public void setTelephone(String telephone) {
|
||||
this.telephone = telephone;
|
||||
}
|
||||
|
||||
public String getDepartmentName() {
|
||||
return departmentName;
|
||||
}
|
||||
|
||||
public void setDepartmentName(String departmentName) {
|
||||
this.departmentName = departmentName;
|
||||
}
|
||||
|
||||
public Integer getUserStatus() {
|
||||
return userStatus;
|
||||
}
|
||||
|
||||
public void setUserStatus(Integer userStatus) {
|
||||
this.userStatus = userStatus;
|
||||
}
|
||||
|
||||
// public UserStatusEnum getUserStatus() {
|
||||
// return userStatus;
|
||||
// }
|
||||
//
|
||||
// public void setUserStatus(UserStatusEnum userStatus) {
|
||||
// this.userStatus = userStatus;
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
e.MOBILE AS telephone,
|
||||
d.departmentname AS departmentName,
|
||||
e.STATUS AS userStatus,
|
||||
e.certificatenum as idNo,
|
||||
e.workcode AS workcode
|
||||
FROM (
|
||||
SELECT *
|
||||
|
|
@ -32,6 +33,7 @@
|
|||
e.MOBILE AS telephone,
|
||||
d.departmentname AS departmentName,
|
||||
e.STATUS AS userStatus,
|
||||
e.certificatenum as idNo,
|
||||
e.workcode AS workcode
|
||||
FROM (
|
||||
SELECT *
|
||||
|
|
@ -57,6 +59,7 @@
|
|||
e.MOBILE AS telephone,
|
||||
d.departmentname AS departmentName,
|
||||
e.STATUS AS userStatus,
|
||||
e.certificatenum as idNo,
|
||||
e.workcode AS workcode
|
||||
FROM (
|
||||
SELECT *
|
||||
|
|
@ -121,6 +124,7 @@
|
|||
e.MOBILE AS telephone,
|
||||
d.departmentname AS departmentName,
|
||||
e.STATUS AS userStatus,
|
||||
e.certificatenum as idNo,
|
||||
e.workcode AS workcode
|
||||
FROM (
|
||||
SELECT *
|
||||
|
|
@ -147,6 +151,7 @@
|
|||
e.MOBILE AS telephone,
|
||||
d.departmentname AS departmentName,
|
||||
e.STATUS AS userStatus,
|
||||
e.certificatenum as idNo,
|
||||
e.workcode AS workcode
|
||||
FROM (
|
||||
SELECT *
|
||||
|
|
@ -173,6 +178,7 @@
|
|||
e.MOBILE AS telephone,
|
||||
d.departmentname AS departmentName,
|
||||
e.STATUS AS userStatus,
|
||||
e.certificatenum as idNo,
|
||||
e.workcode AS workcode
|
||||
FROM (
|
||||
SELECT *
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@
|
|||
|
||||
<select id="queryEmployeeList" resultType="com.engine.salary.entity.siarchives.po.InsuranceArchivesEmployeePO">
|
||||
SELECT base.id AS baseInfoId, e.ID AS employeeId, e.lastname AS userName, e.departmentid AS departmentId, e.workcode AS jobNum, e.MOBILE AS telephone,
|
||||
d.departmentname AS departmentName, e.jobtitle AS position, e.STATUS AS userStatus,e.companystartdate AS hiredate,
|
||||
d.departmentname AS departmentName, e.jobtitle AS position, e.STATUS AS userStatus,e.companystartdate AS hiredate,e.certificatenum as idNo,
|
||||
e.enddate as dimissionDate,
|
||||
social.siSchemeId,
|
||||
base.payment_organization AS paymentOrganization,
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic
|
|||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86186, "手机号"), "mobile"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 1933, "工号"), "workcode"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86187, "员工状态"), "employeeStatus"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86187, "证件号码"), "idNo"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100377, "数据来源"), "sourceFrom"));
|
||||
if (paymentStatus.equals(PaymentStatusEnum.REPAIR.getValue())) {
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100379, "补缴月份"), "supplementaryMonth"));
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import com.engine.salary.util.db.MapperProxyFactory;
|
|||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.text.ParseException;
|
||||
|
|
@ -104,6 +105,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
record.put("employeeStatus", simpleEmployee.getStatus() != null ? UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(simpleEmployee.getStatus())) : "");
|
||||
ResourceFromEnum from = SalaryEnumUtil.enumMatchByValue(item.getResourceFrom(), ResourceFromEnum.values(), ResourceFromEnum.class);
|
||||
record.put("workcode", StringUtils.isBlank(simpleEmployee.getWorkcode()) ? "" : simpleEmployee.getWorkcode());
|
||||
record.put("idNo", Util.null2String(simpleEmployee.getIdNo()));
|
||||
record.put("sourceFrom", SalaryI18nUtil.getI18nLabel(from.getLabelId(), from.getDefaultLabel()));
|
||||
record.put("socialPayOrg", paymentMap.get(item.getSocialPayOrg()) == null ? "" : paymentMap.get(item.getSocialPayOrg()).getName());
|
||||
record.put("socialAccount", item.getSocialAccount());
|
||||
|
|
|
|||
|
|
@ -1592,10 +1592,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
"部门",
|
||||
SalaryI18nUtil.getI18nLabel(86186, "手机号"),
|
||||
SalaryI18nUtil.getI18nLabel(86317, "工号"),
|
||||
SalaryI18nUtil.getI18nLabel(86317, "证件号码"),
|
||||
SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"),
|
||||
"账单月份");
|
||||
// List<String> dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode", "taxAgentName", "billMonth");
|
||||
List<String> dataIndexList = Lists.newArrayList("userName", "department", "mobile", "workcode", "socialPayOrg", "billMonth");
|
||||
List<String> dataIndexList = Lists.newArrayList("userName", "department", "mobile", "workcode","idNo", "socialPayOrg", "billMonth");
|
||||
// 查询福利核算项目
|
||||
List<String> welfareNames = (List<String>) param.getWelfareNames();
|
||||
headerList.addAll(welfareNames);
|
||||
|
|
@ -1986,10 +1987,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
"部门",
|
||||
SalaryI18nUtil.getI18nLabel(86186, "手机号"),
|
||||
SalaryI18nUtil.getI18nLabel(86317, "工号"),
|
||||
SalaryI18nUtil.getI18nLabel(86317, "证件号码"),
|
||||
SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"),
|
||||
"账单月份",
|
||||
"补缴月份");
|
||||
List<String> dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode", "taxAgentName", "billMonth", "supplementaryMonth");
|
||||
List<String> dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode","idNo", "taxAgentName", "billMonth", "supplementaryMonth");
|
||||
// 查询福利核算项目
|
||||
List<String> welfareNames = (List<String>) param.getWelfareNames();
|
||||
headerList.addAll(welfareNames);
|
||||
|
|
@ -2044,6 +2046,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
resultMap.put("departmentName", employee.getDepartmentName());
|
||||
resultMap.put("mobile", employee.getMobile());
|
||||
resultMap.put("workcode", employee.getWorkcode());
|
||||
resultMap.put("idNo", employee.getIdNo());
|
||||
resultMap.put("taxAgentName", taxAgentPO.getName());
|
||||
resultMap.put("billMonth", billMonth);
|
||||
resultMap.put("supplementaryMonth", po.getSupplementaryMonth());
|
||||
|
|
@ -3761,28 +3764,26 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
"部门",
|
||||
SalaryI18nUtil.getI18nLabel(86186, "手机号"),
|
||||
SalaryI18nUtil.getI18nLabel(86317, "工号"),
|
||||
SalaryI18nUtil.getI18nLabel(86317, "证件号码"),
|
||||
SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人")
|
||||
);
|
||||
List<String> dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode", "taxAgentName");
|
||||
List<String> dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode","idNo", "taxAgentName");
|
||||
// 查询福利核算项目
|
||||
List<String> welfareNames = (List<String>) param.getWelfareNames();
|
||||
headerList.addAll(welfareNames);
|
||||
|
||||
// //查询当前已有的补缴数据
|
||||
// List<Map<String, Object>> resultMapList = getSupplyDataByBillMonth(param.getBillMonth(), param.getPaymentOrganization());
|
||||
// // excel导出的数据
|
||||
// List<List<Object>> rows = Lists.newArrayListWithExpectedSize(resultMapList.size());
|
||||
// rows.add(headerList);
|
||||
// for (Map<String, Object> map : resultMapList) {
|
||||
// List<Object> row = Lists.newArrayListWithExpectedSize(headerList.size());
|
||||
// for (String dataIndex : dataIndexList) {
|
||||
// row.add(map.getOrDefault(dataIndex, StringUtils.EMPTY));
|
||||
// }
|
||||
// rows.add(row);
|
||||
// }
|
||||
|
||||
List<List<Object>> rows = new ArrayList<>();
|
||||
//查询当前已有的补差数据
|
||||
List<Map<String, Object>> resultMapList = getSupplyDataByBillMonth(param.getBillMonth(), param.getPaymentOrganization());
|
||||
// excel导出的数据
|
||||
rows.add(headerList);
|
||||
for (Map<String, Object> map : resultMapList) {
|
||||
List<Object> row = Lists.newArrayListWithExpectedSize(headerList.size());
|
||||
for (String dataIndex : dataIndexList) {
|
||||
row.add(map.getOrDefault(dataIndex, StringUtils.EMPTY));
|
||||
}
|
||||
rows.add(row);
|
||||
}
|
||||
|
||||
String sheetName = "福利核算-补差导入模板";
|
||||
return ExcelUtil.genWorkbookV2(rows, sheetName);
|
||||
|
|
|
|||
|
|
@ -772,9 +772,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
if (insuranceArchivesEmployeePOS == null) {
|
||||
insuranceArchivesEmployeePOS = new ArrayList<>();
|
||||
}
|
||||
// List<Map<String, Object>> records = siArchivesBiz.buildTableData(insuranceArchivesEmployeePOS);
|
||||
List<Map<String, Object>> records = buildTableData(insuranceArchivesEmployeePOS);
|
||||
// List<WeaTableColumn> columns = siArchivesBiz.buildWeaTableColumns(insuranceArchivesEmployeePOS, user.getUID());
|
||||
List<WeaTableColumn> columns = buildWeaTableColumns(insuranceArchivesEmployeePOS);
|
||||
|
||||
//工作簿list
|
||||
|
|
@ -1701,6 +1699,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
map.put("subcompanyName", item.getSubcompanyName());
|
||||
map.put("departmentId", item.getDepartmentId());
|
||||
map.put("jobNum", item.getJobNum());
|
||||
map.put("idNo", item.getIdNo());
|
||||
map.put("companystartdate", item.getCompanystartdate());
|
||||
map.put("dismissdate", item.getDimissionDate());
|
||||
map.put("mobile", item.getTelephone());
|
||||
|
|
@ -1928,10 +1927,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "手机号"), "mobile"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "员工状态"), "status"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "工号"), "jobNum"));
|
||||
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "证件号码"), "idNo"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "入职日期"), "companystartdate"));
|
||||
// list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "合同到期日期"), "dismissdate"));
|
||||
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "社保方案名称"), "socialName"));
|
||||
titleMap.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> list.add(new WeaTableColumn("150px", v, k)));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "社保账号"), "socialAccount"));
|
||||
|
|
|
|||
|
|
@ -289,6 +289,7 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
record.put("supplementaryMonth", item.getSupplementaryMonth());
|
||||
record.put("mobile", item.getTelephone());
|
||||
record.put("workcode", item.getWorkcode());
|
||||
record.put("idNo", item.getIdNo());
|
||||
record.put("employeeStatus", item.getUserStatus() == null ? "" : getDefaultLabelByValue(item.getUserStatus()));
|
||||
ResourceFromEnum from = SalaryEnumUtil.enumMatchByValue(item.getResourceFrom(), ResourceFromEnum.values(), ResourceFromEnum.class);
|
||||
record.put("sourceFrom", SalaryI18nUtil.getI18nLabel(from.getLabelId(), from.getDefaultLabel()));
|
||||
|
|
@ -671,6 +672,7 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86186, "手机号"), "mobile"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86317, "工号"), "workcode"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86187, "员工状态"), "employeeStatus"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86187, "证件号码"), "idNo"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100377, "数据来源"), "sourceFrom"));
|
||||
if (paymentStatus.equals(PaymentStatusEnum.REPAIR.getValue())) {
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100379, "补缴月份"), "supplementaryMonth"));
|
||||
|
|
|
|||
|
|
@ -178,8 +178,7 @@ public class SIImportServiceImpl extends Service implements SIImportService {
|
|||
// 4.注释
|
||||
List<ExcelComment> excelComments = Lists.newArrayList();
|
||||
excelComments.add(new ExcelComment(0, 0, 1, 2, SalaryI18nUtil.getI18nLabel(100344, "必填")));
|
||||
excelComments.add(new ExcelComment(6, 0, 7, 2, SalaryI18nUtil.getI18nLabel(100344, "必填")));
|
||||
excelComments.add(new ExcelComment(7, 0, 8, 2, SalaryI18nUtil.getI18nLabel(100344, "社保,公积金,其他福利方案名称不可同时为空")));
|
||||
excelComments.add(new ExcelComment(8, 0, 9, 2, SalaryI18nUtil.getI18nLabel(100344, "社保,公积金,其他福利方案名称不可同时为空")));
|
||||
|
||||
|
||||
//工作簿数据
|
||||
|
|
@ -203,6 +202,7 @@ public class SIImportServiceImpl extends Service implements SIImportService {
|
|||
result.add(SalaryI18nUtil.getI18nLabel( 86186, "手机号"));
|
||||
result.add(SalaryI18nUtil.getI18nLabel( 86187, "员工状态"));
|
||||
result.add(SalaryI18nUtil.getI18nLabel(86317, "工号"));
|
||||
result.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
|
||||
result.add(SalaryI18nUtil.getI18nLabel( 91323, "社保方案名称"));
|
||||
// result.add(SalaryI18nUtil.getI18nLabel( 91325, "社保缴纳组织"));
|
||||
//社保福利基数
|
||||
|
|
|
|||
|
|
@ -420,6 +420,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
map.put("departmentName", item.getDepartmentName());
|
||||
map.put("departmentId", item.getDepartmentId());
|
||||
map.put("jobNum", item.getJobNum());
|
||||
map.put("idNo", item.getIdNo());
|
||||
map.put("paymentOrganizationName", longTaxAgentPOMap.get(item.getPaymentOrganization()) != null ? longTaxAgentPOMap.get(item.getPaymentOrganization()).getName() : "");
|
||||
map.put("mobile", item.getTelephone());
|
||||
map.put("status", item.getUserStatus() == null ? "" : UserStatusEnum.getDefaultLabelByValue(item.getUserStatus()));
|
||||
|
|
@ -700,6 +701,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86186, "手机号"), "mobile"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86187, "员工状态"), "status"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(1933, "工号"), "jobNum"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(1933, "证件号码"), "idNo"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91323, "社保方案名称"), "socialName"));
|
||||
titleMap.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> list.add(new WeaTableColumn("150px", v, k)));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91324, "社保账号"), "socialAccount"));
|
||||
|
|
@ -1093,6 +1095,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
Map<String, Object> mobileMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86186, "手机号"));
|
||||
Map<String, Object> userStatusMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86187, "员工状态"));
|
||||
Map<String, Object> workcodeMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86317, "工号"));
|
||||
Map<String, Object> idNoMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
|
||||
Map<String, Object> employeeIdMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86187, "员工id"));
|
||||
|
||||
|
||||
|
|
@ -1101,7 +1104,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 idNo = (String) idNoMap.get(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
|
||||
String toAddEmployeeId;
|
||||
if (employeeIdMap.isEmpty()) {
|
||||
toAddEmployeeId = null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue