Commit 44ab3643 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.7.12' into MVP1.7.12

parents a1c0d086 a1b4c755
......@@ -418,6 +418,15 @@ public class TGzEmpInfo extends BaseEntity {
@ExcelProperty("合同工作地")
@Schema(description = "合同工作地")
private String workLocation;
/**
* 合同工作地描述
*/
@ExcelAttribute(name = "合同工作地描述", maxLength = 200)
@Length(max = 200, message = "合同工作地描述不能超过200个字符")
@ExcelProperty("合同工作地描述")
@Schema(description = "合同工作地描述")
private String workLocationDescr;
/**
* 状态
*/
......
......@@ -384,8 +384,8 @@ public class TEmployeeContractPreVo extends RowIndex implements Serializable {
/**
* 其他 (工资形式其他时的工资)
*/
@Length(max = 20, message = "其他 (工资形式其他时的工资) 不能超过20 个字符")
@ExcelAttribute(name = "其他 (工资形式其他时的工资)", maxLength = 20)
@Length(max = 50, message = "其他 (工资形式其他时的工资) 不能超过50 个字符")
@ExcelAttribute(name = "其他 (工资形式其他时的工资)", maxLength = 50)
@Schema(description = "其他 (工资形式其他时的工资)")
@ExcelProperty("其他 (工资形式其他时的工资)")
private String otherWage;
......
......@@ -230,6 +230,8 @@ public class TGzEmpInfoExportMain implements Serializable {
private String neeProviderId;
@ExcelProperty("合同工作地")
private String workLocation;
@ExcelProperty("合同工作地描述")
private String workLocationDescr;
@ExcelAttribute(name = "合同状态", isDataId = true, readConverterExp = "A=有效")
@ExcelProperty("合同状态")
private String contractState;
......
......@@ -103,4 +103,5 @@ public class TGzEmpInfoSearchVo extends TGzEmpInfo {
@TableField(exist = false)
private TPreEmpDeclaration tPreEmpDeclaration;
}
......@@ -22,8 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 导入-瓜子offer信息接收表
......@@ -34,92 +32,66 @@ import java.util.Date;
@Data
public class TGzOfferInfoImportVo extends RowIndex implements Serializable {
// 序号 offer发放人 录入时间 姓名 姓名拼音 证件类型描述 证件号码 性别 个人手机号 个人邮箱
@ExcelAttribute(name = "人员类别编码", maxLength = 2)
private String emplType;
@ExcelAttribute(name = "人员类别名称", maxLength = 32)
private String emplTypeDescr;
/**
* 外签类型:A: 洼地外签/ B:属地外签
*/
@ExcelAttribute(name = "外签类型", maxLength = 2)
private String outSginType;
/**
* 合同公司主体:公司信息表
*/
@ExcelAttribute(name = "合同公司主体", maxLength = 20)
private String company;
// 无用的3个字段
@ExcelAttribute(name = "序号")
private String noUse1;
@ExcelAttribute(name = "offer发放人")
private String noUse2;
@ExcelAttribute(name = "录入时间")
private String noUse3;
@ExcelAttribute(name = "姓名", maxLength = 50)
private String name;
@ExcelAttribute(name = "姓名拼音", maxLength = 100)
private String nameAc;
@ExcelAttribute(name = "姓氏拼音", maxLength = 50)
private String lastNameAc;
@ExcelAttribute(name = "名字拼音", maxLength = 50)
private String firstNameAc;
@ExcelAttribute(name = "国籍编码", maxLength = 10)
private String country;
@ExcelAttribute(name = "国籍描述", maxLength = 30)
private String countryDescr;
@ExcelAttribute(name = "证件类型编码", maxLength = 6)
private String nationalIdType;
// 1A ——不导入 证件类型编码
// 居民身份证
@ExcelAttribute(name = "证件类型描述", maxLength = 30)
private String nationalIdTypeDescr;
@ExcelAttribute(name = "证件号码", maxLength = 50)
private String nationalId;
// F(女)
// M(男)
@ExcelAttribute(name = "性别", maxLength = 10)
private String sex;
@ExcelAttribute(name = "个人手机号", maxLength = 30)
private String phone;
@ExcelAttribute(name = "个人邮箱", maxLength = 100)
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)
private String jobcodeDescr;
@ExcelAttribute(name = "工作地点", maxLength = 12)
private String workLocation;
@ExcelAttribute(name = "直接上级姓名", maxLength = 200)
private String supervisorName;
// 要翻译工作地点描述——34010001 安徽省合肥市电销中心——34010002 安徽省合肥市区域
@ExcelAttribute(name = "工作地点描述", maxLength = 12)
private String workLocationDescr;
/**
* 预计入职日期:yyyy-MM-dd
*/
@ExcelAttribute(name = "预计入职日期", isDate = true)
private Date expEntryDate;
@ExcelAttribute(name = "部门名称", maxLength = 200)
private String deptName;
@ExcelAttribute(name = "社保缴纳地", maxLength = 30)
private String socialInsuranceLocationDescr;
/**
* 基本工资,两位小数
*/
@ExcelAttribute(name = "基本工资")
private BigDecimal basePay;
private String basePay;
/**
* 绩效工资,两位小数
*/
@ExcelAttribute(name = "绩效工资")
private BigDecimal perfomPay;
private String perfomPay;
// 年终奖月数数字——去除“个月”
@ExcelAttribute(name = "年终奖月数")
private Integer yearBonusMonth;
@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;
private String yearBonus;
}
......@@ -35,6 +35,6 @@ public interface TGzContractService {
* @param offerId offerId
* @param workLocation 工作地点
*/
void saveContractInfoToGzEmpInfo(TEmployeeContractInfo contractInfo, Integer offerId, String workLocation);
void saveContractInfoToGzEmpInfo(TEmployeeContractInfo contractInfo, Integer offerId, String workLocation, String workLocationDescr);
}
......@@ -2284,7 +2284,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
// updStatus == 8:合同审核通过 生成瓜子档案里的合同信息
if(CommonConstants.EIGHT_STRING.equals(updStatus)){
tGzContractService.saveContractInfoToGzEmpInfo(contractInfo, gzOfferInfo.getId(), gzOfferInfo.getWorkLocation());
tGzContractService.saveContractInfoToGzEmpInfo(contractInfo, gzOfferInfo.getId(), gzOfferInfo.getWorkLocation(),gzOfferInfo.getWorkLocationDescr());
}
// 瓜子状态变更增加操作日志
......
......@@ -2634,7 +2634,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
gzOfferInfoMapper.updateById(gzOfferInfo);
// 合同审核通过 生成瓜子档案里的合同信息
tGzContractService.saveContractInfoToGzEmpInfo(c, gzOfferInfo.getId(), gzOfferInfo.getWorkLocation());
tGzContractService.saveContractInfoToGzEmpInfo(c, gzOfferInfo.getId(), gzOfferInfo.getWorkLocation(),gzOfferInfo.getWorkLocationDescr());
// 瓜子状态变更增加操作日志
......
......@@ -52,7 +52,7 @@ public class TGzContractServiceImpl implements TGzContractService {
* @param workLocation 工作地点
*/
@Override
public void saveContractInfoToGzEmpInfo(TEmployeeContractInfo contractInfo, Integer offerId, String workLocation) {
public void saveContractInfoToGzEmpInfo(TEmployeeContractInfo contractInfo, Integer offerId, String workLocation, String workLocationDescr) {
// 获取档案信息
TGzEmpInfo gzEmpInfo = tGzEmpInfoMapper.getInfoByOfferId(offerId);
if (Common.isNotNull(gzEmpInfo)) {
......@@ -99,6 +99,7 @@ public class TGzContractServiceImpl implements TGzContractService {
gzEmpInfo.setNeeProviderId(CommonConstants.GZ_NEE_PROVIDER_ID);
gzEmpInfo.setWorkLocation(workLocation);
gzEmpInfo.setWorkLocationDescr(workLocationDescr);
gzEmpInfo.setContractState("A");
// 存合同信息
......
......@@ -253,6 +253,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
}
}
gzEmpInfoVo.setAttaList(attaInfos);
}
TPreEmpDeclaration declaration = tPreEmpDeclarationService.getTPreEmpDeclarationList();
......
......@@ -59,6 +59,7 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.time.LocalDate;
import java.time.LocalDateTime;
......@@ -290,7 +291,7 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
// 2、检查 该项目该人员是否有在途或审核通过或已归档的状态为“可用”的合同,
// 若有则根据当前状态更新Offer状态,合同未审核通过:存【13:待签署】;合同审核通过:存【8:合同审核通过】;合同已归档:存【99:已归档】,
// 存合同信息;
String changeStatus = this.checkSaveContract(findInfo.getNationalId(),findInfo.getId(), findInfo.getWorkLocation());
String changeStatus = this.checkSaveContract(findInfo.getNationalId(),findInfo.getId(), findInfo.getWorkLocation(), findInfo.getWorkLocationDescr());
tGzOfferInfo.setOfferStatus(changeStatus);
}
......@@ -318,7 +319,7 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
* @param workLocation 工作地点
* @return String 后续offer要更新的状态
*/
private String checkSaveContract(String nationalId,Integer offerId, String workLocation){
private String checkSaveContract(String nationalId,Integer offerId, String workLocation, String workLocationDescr){
// 默认是档案审核通过
String changeStatus = "97";
TEmployeeContractInfo contractInfo = employeeContractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
......@@ -330,14 +331,14 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
if(CommonConstants.ZERO_STRING.equals(contractInfo.getIsFile())
&& CommonConstants.ZERO_STRING.equals(contractInfo.getInUse())){
// 生成瓜子档案里的合同信息
tGzContractService.saveContractInfoToGzEmpInfo(contractInfo, offerId, workLocation);
tGzContractService.saveContractInfoToGzEmpInfo(contractInfo, offerId, workLocation, workLocationDescr);
return "99";
}
// 合同审核通过
if(CommonConstants.TWO_INTEGER.equals(contractInfo.getAuditStatus())
&& CommonConstants.ZERO_STRING.equals(contractInfo.getInUse())){
// 生成瓜子档案里的合同信息
tGzContractService.saveContractInfoToGzEmpInfo(contractInfo, offerId, workLocation);
tGzContractService.saveContractInfoToGzEmpInfo(contractInfo, offerId, workLocation, workLocationDescr);
return CommonConstants.EIGHT_STRING;
}
// 合同已提交待审核
......@@ -748,12 +749,77 @@ 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 = "";
private static final String EXP_ENTRY_DATE = "yyyy年M月d日";
/**
* 插入excel bad record
*/
private void insertExcel(TGzOfferInfoImportVo excel) {
TGzOfferInfo insert = new TGzOfferInfo();
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())) {
Date expEntryDate;
try {
// 将2025年6月3日 转化为date格式日期
expEntryDate = DateUtil.stringToDateByFormat(excel.getExpEntry(), EXP_ENTRY_DATE);
if (expEntryDate == null) {
expEntryDate = DateUtil.stringToDate2(excel.getExpEntry(), KONG_STR);
}
if (expEntryDate != null) {
insert.setExpEntryDate(expEntryDate);
}
} 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");
this.save(insert);
}
......
......@@ -76,6 +76,7 @@
<result property="prcExpDt" column="prc_exp_dt"/>
<result property="neeProviderId" column="nee_provider_id"/>
<result property="workLocation" column="work_location"/>
<result property="workLocationDescr" column="work_location_descr"/>
<result property="contractState" column="contract_state"/>
<result property="hukouType" column="hukou_type"/>
<result property="hukouProvince" column="hukou_province"/>
......@@ -155,6 +156,7 @@
a.prc_exp_dt,
a.nee_provider_id,
a.work_location,
a.work_location_descr,
a.contract_state,
a.hukou_type,
a.hukou_province,
......@@ -477,6 +479,7 @@
date_format(a.prc_exp_dt, '%Y-%m-%d') prc_exp_dt,
a.nee_provider_id,
a.work_location,
a.work_location_descr,
a.contract_state,
a.hukou_type,
a.hukou_province,
......
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