Commit 0cbaf2c6 authored by hongguangwu's avatar hongguangwu

MVP1.7.12-社保字

parent 6f4e5f03
...@@ -22,8 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex; ...@@ -22,8 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/** /**
* 导入-瓜子offer信息接收表 * 导入-瓜子offer信息接收表
...@@ -34,92 +32,66 @@ import java.util.Date; ...@@ -34,92 +32,66 @@ import java.util.Date;
@Data @Data
public class TGzOfferInfoImportVo extends RowIndex implements Serializable { public class TGzOfferInfoImportVo extends RowIndex implements Serializable {
// 序号 offer发放人 录入时间 姓名 姓名拼音 证件类型描述 证件号码 性别 个人手机号 个人邮箱
@ExcelAttribute(name = "人员类别编码", maxLength = 2) // 无用的3个字段
private String emplType; @ExcelAttribute(name = "序号")
private String noUse1;
@ExcelAttribute(name = "人员类别名称", maxLength = 32) @ExcelAttribute(name = "offer发放人")
private String emplTypeDescr; private String noUse2;
@ExcelAttribute(name = "录入时间")
/** private String noUse3;
* 外签类型:A: 洼地外签/ B:属地外签
*/
@ExcelAttribute(name = "外签类型", maxLength = 2)
private String outSginType;
/**
* 合同公司主体:公司信息表
*/
@ExcelAttribute(name = "合同公司主体", maxLength = 20)
private String company;
@ExcelAttribute(name = "姓名", maxLength = 50) @ExcelAttribute(name = "姓名", maxLength = 50)
private String name; private String name;
@ExcelAttribute(name = "姓名拼音", maxLength = 100) @ExcelAttribute(name = "姓名拼音", maxLength = 100)
private String nameAc; private String nameAc;
@ExcelAttribute(name = "姓氏拼音", maxLength = 50)
private String lastNameAc;
@ExcelAttribute(name = "名字拼音", maxLength = 50)
private String firstNameAc;
@ExcelAttribute(name = "国籍编码", maxLength = 10) // 1A ——不导入 证件类型编码
private String country; // 居民身份证
@ExcelAttribute(name = "国籍描述", maxLength = 30)
private String countryDescr;
@ExcelAttribute(name = "证件类型编码", maxLength = 6)
private String nationalIdType;
@ExcelAttribute(name = "证件类型描述", maxLength = 30) @ExcelAttribute(name = "证件类型描述", maxLength = 30)
private String nationalIdTypeDescr; private String nationalIdTypeDescr;
@ExcelAttribute(name = "证件号码", maxLength = 50) @ExcelAttribute(name = "证件号码", maxLength = 50)
private String nationalId; private String nationalId;
// F(女)
// M(男)
@ExcelAttribute(name = "性别", maxLength = 10) @ExcelAttribute(name = "性别", maxLength = 10)
private String sex; private String sex;
@ExcelAttribute(name = "个人手机号", maxLength = 30) @ExcelAttribute(name = "个人手机号", maxLength = 30)
private String phone; private String phone;
@ExcelAttribute(name = "个人邮箱", maxLength = 100) @ExcelAttribute(name = "个人邮箱", maxLength = 100)
private String email; private String email;
@ExcelAttribute(name = "直接上级姓名", maxLength = 200)
private String supervisorName; // 预计入职日期 部门名称 职务描述 直接上级姓名 工作地点描述 社保缴纳地 基本工资 绩效工资 年终奖月数
// 要翻译为这个
@ExcelAttribute(name = "预计入职日期")
private String expEntry;
@ExcelAttribute(name = "部门名称", maxLength = 200)
private String deptName;
@ExcelAttribute(name = "职务描述", maxLength = 50) @ExcelAttribute(name = "职务描述", maxLength = 50)
private String jobcodeDescr; private String jobcodeDescr;
@ExcelAttribute(name = "工作地点", maxLength = 12) @ExcelAttribute(name = "直接上级姓名", maxLength = 200)
private String workLocation; private String supervisorName;
// 要翻译工作地点描述——34010001 安徽省合肥市电销中心——34010002 安徽省合肥市区域
@ExcelAttribute(name = "工作地点描述", maxLength = 12) @ExcelAttribute(name = "工作地点描述", maxLength = 12)
private String workLocationDescr; private String workLocationDescr;
/**
* 预计入职日期:yyyy-MM-dd @ExcelAttribute(name = "社保缴纳地", maxLength = 30)
*/ private String socialInsuranceLocationDescr;
@ExcelAttribute(name = "预计入职日期", isDate = true)
private Date expEntryDate;
@ExcelAttribute(name = "部门名称", maxLength = 200)
private String deptName;
/** /**
* 基本工资,两位小数 * 基本工资,两位小数
*/ */
@ExcelAttribute(name = "基本工资") @ExcelAttribute(name = "基本工资")
private BigDecimal basePay; private String basePay;
/** /**
* 绩效工资,两位小数 * 绩效工资,两位小数
*/ */
@ExcelAttribute(name = "绩效工资") @ExcelAttribute(name = "绩效工资")
private BigDecimal perfomPay; private String perfomPay;
// 年终奖月数数字——去除“个月”
@ExcelAttribute(name = "年终奖月数") @ExcelAttribute(name = "年终奖月数")
private Integer yearBonusMonth; private String yearBonus;
@ExcelAttribute(name = "社保缴纳地编码", maxLength = 12)
private String socialInsuranceLocation;
@ExcelAttribute(name = "社保缴纳地", maxLength = 30)
private String socialInsuranceLocationDescr;
@ExcelAttribute(name = "社保基数")
private BigDecimal socialInsuranceBase;
@ExcelAttribute(name = "公积金基数")
private BigDecimal houseAccFundBaseMax;
/**
* 是否转正后缴纳公积金(Y:是 N:否)
*/
@ExcelAttribute(name = "是否转正后缴纳公积金", maxLength = 1)
private String beRegularEmpPay;
@ExcelAttribute(name = "申请人邮箱", maxLength = 60)
private String applyUserEmail;
} }
...@@ -59,6 +59,7 @@ import javax.servlet.ServletOutputStream; ...@@ -59,6 +59,7 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.math.BigDecimal;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
...@@ -748,12 +749,68 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz ...@@ -748,12 +749,68 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
} }
} }
private static final String SFZ_TYPE = "1A";
private static final String SFZ = "居民身份证";
private static final String SEX_M = "M";
private static final String SEX_F = "F";
private static final String SEX_NAN = "男";
private static final String SEX_NV = "女";
private static final String WORK_LOCATION1_CODE = "34010001";
private static final String WORK_LOCATION2_CODE = "34010002";
private static final String WORK_LOCATION1 = "安徽省合肥市电销中心";
private static final String WORK_LOCATION2 = "安徽省合肥市区域";
private static final String YEAR_BONUS = "个月";
private static final String KONG_STR = "";
/** /**
* 插入excel bad record * 插入excel bad record
*/ */
private void insertExcel(TGzOfferInfoImportVo excel) { private void insertExcel(TGzOfferInfoImportVo excel) {
TGzOfferInfo insert = new TGzOfferInfo(); TGzOfferInfo insert = new TGzOfferInfo();
BeanUtil.copyProperties(excel, insert); BeanUtil.copyProperties(excel, insert);
insert.setNationalIdType(SFZ_TYPE);
insert.setNationalIdTypeDescr(SFZ);
if (Common.isNotNull(insert.getSex())) {
if (SEX_NAN.equals(insert.getSex())) {
insert.setSex(SEX_M);
} else if (SEX_NV.equals(insert.getSex())) {
insert.setSex(SEX_F);
}
}
if (Common.isNotNull(excel.getExpEntry())) {
try {
insert.setExpEntryDate(DateUtil.stringToDate2(excel.getExpEntry(), null));
} catch (Exception e) {
// 错误格式,不转化
}
}
if (Common.isNotNull(insert.getWorkLocationDescr())) {
if (WORK_LOCATION1.equals(insert.getWorkLocationDescr())) {
insert.setWorkLocation(WORK_LOCATION1_CODE);
} else if (WORK_LOCATION2.equals(insert.getWorkLocationDescr())) {
insert.setWorkLocation(WORK_LOCATION2_CODE);
}
}
if (Common.isNotNull(excel.getYearBonus())) {
try {
insert.setYearBonusMonth(Integer.parseInt(excel.getYearBonus().replace(YEAR_BONUS, KONG_STR)));
} catch (Exception e) {
// 错误月份,则不录入改字段
}
}
if (Common.isNotNull(excel.getBasePay())) {
try {
insert.setBasePay(new BigDecimal(excel.getBasePay()));
} catch (Exception e) {
// 错误金额,则不录入改字段
}
}
if (Common.isNotNull(excel.getPerfomPay())) {
try {
insert.setPerfomPay(new BigDecimal(excel.getPerfomPay()));
} catch (Exception e) {
// 错误金额,则不录入改字段
}
}
insert.setBizId("0"); insert.setBizId("0");
this.save(insert); this.save(insert);
} }
......
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