Commit 8abe2817 authored by huyuchen's avatar huyuchen

huych-入职登记商险待办提交

parent c16097ca
......@@ -16,14 +16,10 @@
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TAutoInsurStandard;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
/**
......@@ -64,7 +60,7 @@ public class TAutoInsurStandardSearchVo extends TAutoInsurStandard {
* 项目编码
**/
@Schema(description = "项目编码")
private int projectNo;
private String projectNo;
/**
* 购买标准min
......
......@@ -589,7 +589,15 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
vo.setDeptNo(registration.getDeptNo());
EmpProjectStatusVo exit = getEmpProjectStatus(vo);
if (Common.isNotNull(exit)) {
return R.ok(exit);
EmployeeRegistrationReceiveVo receiveVo = new EmployeeRegistrationReceiveVo();
receiveVo.setId(registration.getId());
receiveVo.setEmployeeName(registration.getEmployeeName());
receiveVo.setEmpIdcard(registration.getEmpIdcard());
receiveVo.setReason(RegistConstants.BEFORE_IN_PROJECT);
receiveVo.setEmpProjectId(exit.getEmpProjectId());
receiveVo.setProjectCreateTime(exit.getProjectTime());
receiveVo.setPreVo(preVo);
return R.ok(receiveVo);
}
registration.setProcessStatus(CommonConstants.ZERO_STRING);
baseMapper.updateById(registration);
......@@ -1225,6 +1233,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo.setCreateBy(user.getId());
preVo.setCreateName(user.getNickname());
preVo.setUpdateBy(user.getId());
preVo.setRegistTime(LocalDateTimeUtils.convertLDTToDate(registration.getCreateTime()));
preVo.setRegistUser(registration.getCreateName());
//预计派单日期
// if (Common.isEmpty(preVo.getExpectedCollectionTime()) && Common.isNotNull(preVo.getPolicyStartType()) && CommonConstants.ONE_STRING.equals(preVo.getPolicyStartType())) {
......
......@@ -45,6 +45,13 @@ public class TEmployeeInsurancePre extends BaseEntity {
@Schema(description = "入职日期")
private Date joinLeaveDate;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "登记日期")
private Date registTime;
@Schema(description = "登记人")
private String registUser;
@Schema(description = "状态,0待确认,1待派单,2派单失败,3待投保,4投保中,5投保退回,6已完成")
private String processStatus;
......@@ -133,6 +140,9 @@ public class TEmployeeInsurancePre extends BaseEntity {
@Schema(description = "配置名称")
private String configName;
@Schema(description = "配置id")
private String configId;
@Schema(description = "商险ID")
private String insurancesId;
......
......@@ -47,6 +47,23 @@ public class TEmployeeInsurancePreVo implements Serializable {
@Schema(description = "入职日期")
@ExcelProperty("入职日期")
private Date joinLeaveDate;
/**
* 登记人
*/
@ExcelAttribute(name = "登记人")
@Schema(description = "登记人")
@ExcelProperty("登记人")
private String registUser;
/**
* 登记时间
*/
@ExcelAttribute(name = "登记时间")
@Schema(description = "登记时间")
@ExcelProperty("登记时间")
private Date registTime;
/**
* 状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职4已完成
*/
......@@ -265,6 +282,14 @@ public class TEmployeeInsurancePreVo implements Serializable {
@ExcelProperty("配置名称")
private String configName;
/**
* 配置id
*/
@ExcelAttribute(name = "配置id")
@Schema(description = "配置id")
@ExcelProperty("配置id")
private String configId;
@Schema(description = "创建人-姓名")
private String createName;
......
......@@ -209,7 +209,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam.setInsurancePreId(insurancePre.getId());
addParamList.add(addParam);
}
if (CommonConstants.TWO_INT == insurancePre.getBuyType()) {
if (CommonConstants.THREE_INT == insurancePre.getBuyType()) {
InsuranceBatchParam addParam = new InsuranceBatchParam();
addParam.setEmpName(insurancePre.getEmployeeName());
addParam.setEmpIdcardNo(insurancePre.getEmpIdcard());
......@@ -307,14 +307,14 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
.collect(Collectors.toList());
//派单成功的更新状态为代投保,派单失败更新成派单失败
if (!existingList.isEmpty()){
List<String> onIdList = insurancePreList.stream().map(TEmployeeInsurancePre::getId).collect(Collectors.toList());
List<String> onIdList = existingList.stream().map(TEmployeeInsurancePre::getId).collect(Collectors.toList());
LambdaUpdateWrapper<TEmployeeInsurancePre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.in(TEmployeeInsurancePre::getId,onIdList)
.set(TEmployeeInsurancePre::getProcessStatus, CommonConstants.TWO_STRING);
this.update(updateWrapper);
}
if (!nonExistingList.isEmpty()){
List<String> unIdList = insurancePreList.stream().map(TEmployeeInsurancePre::getId).collect(Collectors.toList());
List<String> unIdList = nonExistingList.stream().map(TEmployeeInsurancePre::getId).collect(Collectors.toList());
LambdaUpdateWrapper<TEmployeeInsurancePre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.in(TEmployeeInsurancePre::getId,unIdList)
.set(TEmployeeInsurancePre::getProcessStatus, CommonConstants.THREE_STRING);
......
......@@ -39,12 +39,15 @@
<result property="replaceEmpIdcard" column="replace_emp_idcard"/>
<result property="replaceDeptNo" column="replace_dept_no"/>
<result property="configName" column="config_name"/>
<result property="configId" column="config_id"/>
<result property="insurancesId" column="insurances_id"/>
<result property="createBy" column="create_by"/>
<result property="createName" column="create_name"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="registTime" column="regist_time"/>
<result property="registUser" column="regist_user"/>
</resultMap>
<resultMap id="tEmployeeInsurancePreExportMap" type="com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreExportVo">
......@@ -98,7 +101,7 @@
a.create_name,
a.create_time,
a.update_by,
a.update_time,a.policy_no,a.config_name,a.policy_effect,a.insurances_id
a.update_time,a.policy_no,a.config_name,a.policy_effect,a.insurances_id,a.regist_time,a.regist_user,a.config_id
</sql>
<sql id="tEmployeeInsurancePre_where">
<if test="tEmployeeInsurancePre != null">
......@@ -118,6 +121,9 @@
<if test="tEmployeeInsurancePre.empIdcard != null and tEmployeeInsurancePre.empIdcard.trim() != ''">
AND a.emp_idcard like CONCAT('%',#{tEmployeeInsurancePre.empIdcard},'%')
</if>
<if test="tEmployeeInsurancePre.registUser != null and tEmployeeInsurancePre.registUser.trim() != ''">
AND a.regist_user like CONCAT('%',#{tEmployeeInsurancePre.registUser},'%')
</if>
<if test="tEmployeeInsurancePre.empPhone != null and tEmployeeInsurancePre.empPhone.trim() != ''">
AND a.emp_phone like CONCAT('%',#{tEmployeeInsurancePre.empPhone},'%')
</if>
......@@ -151,7 +157,7 @@
<if test="tEmployeeInsurancePre.expectedCollectionTime != null">
AND a.expected_collection_time = #{tEmployeeInsurancePre.expectedCollectionTime}
</if>
<if test="tEmployeeInsurancePre.joinTimeStart != null">
<if test="tEmployeeInsurancePre.registTimeStart != null">
AND a.regist_time <![CDATA[ >= ]]> #{tEmployeeInsurancePre.registTimeStart}
</if>
<if test="tEmployeeInsurancePre.registTimeEnd != null">
......
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