Commit 93788c53 authored by huyuchen's avatar huyuchen

huych-社保自动化相关提交

parent 3fa2ab1c
...@@ -463,6 +463,9 @@ public class TEmployeeContractInfo extends BaseEntity { ...@@ -463,6 +463,9 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema(description = "作废、终止选择的合同id", name = "reason") @Schema(description = "作废、终止选择的合同id", name = "reason")
private String oldContractId; private String oldContractId;
@Schema(description = "签署方式1线下签0电子签")
private String signType;
/** /**
* 是否附件 0是/1否 * 是否附件 0是/1否
*/ */
......
...@@ -207,6 +207,9 @@ public class EmployeeContractVO extends RowIndex implements Serializable { ...@@ -207,6 +207,9 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
@ExcelProperty("备注") @ExcelProperty("备注")
private String remark; private String remark;
@Schema(description = "签署方式1线下签0电子签")
private String signType;
/** /**
* 0 是 1 否 * 0 是 1 否
*/ */
......
...@@ -1447,6 +1447,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1447,6 +1447,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
// b = b.setScale(1, BigDecimal.ROUND_HALF_UP); // b = b.setScale(1, BigDecimal.ROUND_HALF_UP);
// insert.setContractTerm(String.valueOf(b)); // insert.setContractTerm(String.valueOf(b));
} }
// 处理signType字段
if (Common.isNotNull(excel.getSignType())) {
insert.setSignType(excel.getSignType());
}
// 核心保存 // 核心保存
R<List<ErrorMessage>> info = this.setBaseInfo(insert, project); R<List<ErrorMessage>> info = this.setBaseInfo(insert, project);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), info.getMsg())); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), info.getMsg()));
......
...@@ -352,7 +352,38 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra ...@@ -352,7 +352,38 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
errorMessage.setData(contractVO); errorMessage.setData(contractVO);
errorMessageListAll.add(errorMessage); errorMessageListAll.add(errorMessage);
} else { } else {
// 未超过一个月,调用FascService的submitContract方法 // 未超过一个月,先调用contractInfoService.importContract方法创建合同
List<EmployeeContractVO> singleContractList = new ArrayList<>();
singleContractList.add(contractVO);
List<ErrorMessage> singleErrorMessageList = new ArrayList<>();
// 调用合同导入方法
contractInfoService.importContract(singleContractList, singleErrorMessageList);
// 检查合同创建是否成功
boolean contractCreateSuccess = singleErrorMessageList.stream()
.allMatch(message -> message.getMessage().equals(CommonConstants.SAVE_SUCCESS));
if (!contractCreateSuccess) {
// 合同创建失败,统计错误并更新状态
customerStats.setFailedCount(customerStats.getFailedCount() + 1);
customerStats.setElectronicSignFailedCount(customerStats.getElectronicSignFailedCount() + 1);
String errorMsg = singleErrorMessageList.isEmpty() ? "合同创建失败" : singleErrorMessageList.get(0).getMessage();
// 更新processStatus为电子签发起失败
LambdaUpdateWrapper<TEmployeeContractPre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TEmployeeContractPre::getId, contractPre.getId())
.set(TEmployeeContractPre::getProcessStatus, CommonConstants.FIVE_STRING)
.set(TEmployeeContractPre::getErrorInfo, errorMsg)
.set(TEmployeeContractPre::getErrorTime, LocalDateTimeUtils.convertLDToDate(LocalDate.now()));
this.update(updateWrapper);
// 添加错误信息
ErrorMessage<EmployeeContractVO> errorMessage = new ErrorMessage<>(contractVO.getRowIndex(), errorMsg);
errorMessage.setData(contractVO);
errorMessageListAll.add(errorMessage);
} else {
// 合同创建成功,继续调用FascService的submitContract方法
R<String> result = null; R<String> result = null;
try { try {
result = fascService.submitContract(contractPre.getId()); result = fascService.submitContract(contractPre.getId());
...@@ -380,6 +411,7 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra ...@@ -380,6 +411,7 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
} }
} }
} }
}
// 处理线下签合同(走原逻辑) // 处理线下签合同(走原逻辑)
if (!offlineSignList.isEmpty()) { if (!offlineSignList.isEmpty()) {
......
...@@ -144,6 +144,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -144,6 +144,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
private final TGzPushEntryService tGzPushEntryService; private final TGzPushEntryService tGzPushEntryService;
private final TEmployeeContractPreMapper contractPreMapper;
@Autowired @Autowired
private OSSUtil ossUtil; private OSSUtil ossUtil;
...@@ -2624,6 +2626,15 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2624,6 +2626,15 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} }
//tEmployeeProjectService.updateContractStatus(c.getEmpId(), c.getSettleDomain(), CommonConstants.ONE_INT) //tEmployeeProjectService.updateContractStatus(c.getEmpId(), c.getSettleDomain(), CommonConstants.ONE_INT)
baseMapper.updateContractStatus(c.getEmpId(), CommonConstants.ONE_INT); baseMapper.updateContractStatus(c.getEmpId(), CommonConstants.ONE_INT);
//更新合同状态为4线下签待归档
TEmployeeContractPre contractPre = contractPreMapper.selectOne(Wrappers.<TEmployeeContractPre>query().lambda()
.eq(TEmployeeContractPre::getContractId, c.getId())
.eq(TEmployeeContractPre::getProcessStatus, CommonConstants.TWO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(contractPre)) {
contractPre.setProcessStatus(CommonConstants.FOUR_STRING);
contractPreMapper.updateById(contractPre);
}
//瓜子项目编码:皖A694302 //瓜子项目编码:皖A694302
if (CommonConstants.GZ_DEPT_NO.equals(c.getDeptNo())) { if (CommonConstants.GZ_DEPT_NO.equals(c.getDeptNo())) {
//审核通过瓜子合同状态更新合同审核通过 //审核通过瓜子合同状态更新合同审核通过
......
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
<result property="contractSubName" column="CONTRACT_SUB_NAME"/> <result property="contractSubName" column="CONTRACT_SUB_NAME"/>
<result property="reason" column="REASON"/> <result property="reason" column="REASON"/>
<result property="auditTimeLast" column="AUDIT_TIME_LAST"/> <result property="auditTimeLast" column="AUDIT_TIME_LAST"/>
<result property="signType" column="sign_type"/>
<result property="type" column="TYPE"/> <result property="type" column="TYPE"/>
<result property="leaveDate" column="LEAVE_DATE"/> <result property="leaveDate" column="LEAVE_DATE"/>
...@@ -208,7 +209,7 @@ ...@@ -208,7 +209,7 @@
a.AUDIT_USER_NAME, a.AUDIT_USER_NAME,
a.REDUCE_REASON, a.REDUCE_REASON,
a.type, a.type,
a.TRY_PERIOD a.TRY_PERIOD,a.sign_type
</sql> </sql>
......
...@@ -354,6 +354,7 @@ ...@@ -354,6 +354,7 @@
null leaveDate, null leaveDate,
null reduceReason, null reduceReason,
null remark, null remark,
a.sign_type signType,
null changeContractAndEmployee, null changeContractAndEmployee,
if(a.TRY_PERIOD = '' or a.TRY_PERIOD is null,'无',a.TRY_PERIOD) as tryPeriod, if(a.TRY_PERIOD = '' or a.TRY_PERIOD is null,'无',a.TRY_PERIOD) as tryPeriod,
a.id preId, a.id preId,
......
...@@ -1274,11 +1274,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1274,11 +1274,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return RegistConstants.PHONE_FORMAT_ERROR; return RegistConstants.PHONE_FORMAT_ERROR;
} }
//姓名、身份证+手机号真实性校验 //姓名、身份证+手机号真实性校验
R<Boolean> checkRes = checkDaprUtil.checkIdCardAndMobile(registration.getEmployeeName(), // R<Boolean> checkRes = checkDaprUtil.checkIdCardAndMobile(registration.getEmployeeName(),
registration.getEmpIdcard(),registration.getEmpPhone()); // registration.getEmpIdcard(),registration.getEmpPhone());
if (Common.isEmpty(checkRes) || checkRes.getCode() != CommonConstants.SUCCESS){ // if (Common.isEmpty(checkRes) || checkRes.getCode() != CommonConstants.SUCCESS){
return checkRes.getMsg(); // return checkRes.getMsg();
} // }
EmployeeRegistration exit = baseMapper.selectOne(Wrappers.<EmployeeRegistration>query().lambda() EmployeeRegistration exit = baseMapper.selectOne(Wrappers.<EmployeeRegistration>query().lambda()
.eq(EmployeeRegistration::getEmpIdcard, registration.getEmpIdcard()) .eq(EmployeeRegistration::getEmpIdcard, registration.getEmpIdcard())
.eq(EmployeeRegistration::getDeptNo, registration.getDeptNo()) .eq(EmployeeRegistration::getDeptNo, registration.getDeptNo())
......
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