/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the yifu4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */
package com.yifu.cloud.plus.v1.yifu.social.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * 派单信息记录表
 *
 * @author fxj
 * @date 2022-07-15 11:38:05
 */
@Data
@TableName("t_dispatch_info" )
@EqualsAndHashCode(callSuper = true)
@Schema(description = "派单信息记录表" )
public class TDispatchInfo extends BaseEntity {

	/**
	 * ID
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@Schema(description = "ID" )
	@ExcelProperty("ID" )
	private String id;

	/**
	 * 派单申请编码
	 */
	@ExcelAttribute(name = "派单申请编码", maxLength = 30)
	@Schema(description = "派单申请编码" )
	@ExcelProperty("派单申请编码" )
	private String dispatchCode;

	/**
	 * 员工ID
	 */
	@NotBlank(message = "员工ID不能为空" )
	@Length(max = 32, message = "员工ID 不能超过32个字符" )
	@ExcelAttribute(name = "员工ID", isNotEmpty = true, errorInfo = "员工ID不能为空", maxLength = 32)
	@Schema(description = "员工ID" )
	@ExcelProperty("员工ID" )
	private String empId;
	/**
	 * 员工姓名
	 */
	@Length(max = 50, message = "员工姓名 不能超过50个字符" )
	@ExcelAttribute(name = "员工姓名", maxLength = 50)
	@Schema(description = "员工姓名" )
	@ExcelProperty("员工姓名" )
	private String empName;
	/**
	 * 员工编码
	 */
	@Length(max = 30, message = "员工编码 不能超过30个字符" )
	@ExcelAttribute(name = "员工编码", maxLength = 30)
	@Schema(description = "员工编码" )
	@ExcelProperty("员工编码" )
	private String empNo;
	/**
	 * 员工身份证
	 */
	@Length(max = 20, message = "员工身份证 不能超过20个字符" )
	@ExcelAttribute(name = "员工身份证", maxLength = 20)
	@Schema(description = "员工身份证" )
	@ExcelProperty("员工身份证" )
	private String empIdcard;
	/**
	 * 员工类型
	 */
	@Length(max = 32, message = "员工类型 不能超过32个字符" )
	@ExcelAttribute(name = "员工类型", isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
	@Schema(description = "员工类型" )
	@ExcelProperty("员工类型" )
	private String empType;
	/**
	 * 员工电话  （手机号码）
	 */
	@Length(max = 32, message = "员工电话 不能超过32个字符" )
	@ExcelAttribute(name = "员工电话", maxLength = 32)
	@Schema(description = "员工电话" )
	@ExcelProperty("员工电话" )
	private String empMobile;
	/**
	 * 民族
	 */
	@Length(max = 32, message = "民族 不能超过32个字符" )
	@ExcelAttribute(name = "民族", isDataId = true,dataType = ExcelAttributeConstants.EMP_NATIONAL)
	@Schema(description = "民族" )
	@ExcelProperty("民族" )
	private String empNational;
	/**
	 * 0未提交1待审核2审核通过3审核不通过4办理完成
	 */
	@NotBlank(message = "0未提交1待审核2审核通过3审核不通过4办理完成不能为空" )
	@Length(max = 1, message = "0未提交1待审核2审核通过3审核不通过4办理完成 不能超过1个字符" )
	@ExcelAttribute(name = "0未提交1待审核2审核通过3审核不通过4办理完成", isNotEmpty = true, errorInfo = "0未提交1待审核2审核通过3审核不通过4办理完成不能为空", maxLength = 1)
	@Schema(description = "0未提交1待审核2审核通过3审核不通过4办理完成" )
	@ExcelProperty("0未提交1待审核2审核通过3审核不通过4办理完成" )
	private String status;
	/**
	 * 0派增1派减
	 */
	@NotBlank(message = "0派增1派减不能为空" )
	@Length(max = 1, message = "0派增1派减 不能超过1个字符" )
	@ExcelAttribute(name = "0派增1派减", isNotEmpty = true, errorInfo = "0派增1派减不能为空", maxLength = 1)
	@Schema(description = "0派增1派减" )
	@ExcelProperty("0派增1派减" )
	private String type;
	/**
	 * 社保ID
	 */
	@Length(max = 32, message = "社保ID 不能超过32个字符" )
	@ExcelAttribute(name = "社保ID", maxLength = 32)
	@Schema(description = "社保ID" )
	@ExcelProperty("社保ID" )
	private String socialId;
	/**
	 * 公积金ID
	 */
	@Length(max = 32, message = "公积金ID 不能超过32个字符" )
	@ExcelAttribute(name = "公积金ID", maxLength = 32)
	@Schema(description = "公积金ID" )
	@ExcelProperty("公积金ID" )
	private String fundId;
	/**
	 * 0社保1公积金
	 */
	@Length(max = 1, message = "0社保1公积金 不能超过1个字符" )
	@ExcelAttribute(name = "0社保1公积金", maxLength = 1)
	@Schema(description = "0社保1公积金" )
	@ExcelProperty("0社保1公积金" )
	private String typeSub;
	/**
	 * 流程实例ID
	 */
	@Length(max = 20, message = "流程实例ID 不能超过20个字符" )
	@ExcelAttribute(name = "流程实例ID", maxLength = 20)
	@Schema(description = "流程实例ID" )
	@ExcelProperty("流程实例ID" )
	private String processInstId;
	/**
	 * 项目
	 */
	@Length(max = 32, message = "项目 不能超过32个字符" )
	@ExcelAttribute(name = "项目", maxLength = 32)
	@Schema(description = "项目" )
	@ExcelProperty("项目" )
	private String settleDomain;

	/**
	 * 0未删除1删除
	 */
	@Length(max = 1, message = "0未删除1删除 不能超过1个字符" )
	@ExcelAttribute(name = "0未删除1删除", maxLength = 1)
	@Schema(description = "0未删除1删除" )
	@ExcelProperty("0未删除1删除" )
	private String deleteFlag;
	/**
	 * 社保停缴日期
	 */
	@ExcelAttribute(name = "社保停缴日期", isDate = true)
	@Schema(description = "社保停缴日期" )
	@ExcelProperty("社保停缴日期" )
	private Date socialReduceDate;
	/**
	 * 公积金停缴日期
	 */
	@ExcelAttribute(name = "公积金停缴日期", isDate = true)
	@Schema(description = "公积金停缴日期" )
	@ExcelProperty("公积金停缴日期" )
	private Date fundReduceDate;
	/**
	 * 离职日期
	 */
	@ExcelAttribute(name = "离职日期", isDate = true)
	@Schema(description = "离职日期" )
	@ExcelProperty("离职日期" )
	private Date leaveDate;
	/**
	 * 减少原因
	 */
	@Length(max = 32, message = "减少原因 不能超过32个字符" )
	@ExcelAttribute(name = "减少原因", maxLength = 32)
	@Schema(description = "减少原因" )
	@ExcelProperty("减少原因" )
	private String reduceReason;
	/**
	 * 减少备注
	 */
	@Length(max = 200, message = "减少备注 不能超过200个字符" )
	@ExcelAttribute(name = "减少备注", maxLength = 200)
	@Schema(description = "减少备注" )
	@ExcelProperty("减少备注" )
	private String reduceRemark;
	/**
	 * 所属单位
	 */
	@Length(max = 32, message = "所属单位 不能超过32个字符" )
	@ExcelAttribute(name = "所属单位", maxLength = 32)
	@Schema(description = "所属单位" )
	@ExcelProperty("所属单位" )
	private String belongUnit;
	/**
	 * 当前操作人
	 */
	@Length(max = 32, message = "当前操作人 不能超过32个字符" )
	@ExcelAttribute(name = "当前操作人", maxLength = 32)
	@Schema(description = "当前操作人" )
	@ExcelProperty("当前操作人" )
	private String currentOperator;
	/**
	 * 数据迁移使用
	 */
	@Length(max = 32, message = "数据迁移使用 不能超过32个字符" )
	@ExcelAttribute(name = "数据迁移使用", maxLength = 32)
	@Schema(description = "数据迁移使用" )
	@ExcelProperty("数据迁移使用" )
	private String dispatchIdBak;
	/**
	 * 合同起始时间
	 */
	@ExcelAttribute(name = "合同起始时间", isDate = true)
	@Schema(description = "合同起始时间" )
	@ExcelProperty("合同起始时间" )
	private Date contractStart;
	/**
	 * 合同到期时间
	 */
	@ExcelAttribute(name = "合同到期时间", isDate = true)
	@Schema(description = "合同到期时间" )
	@ExcelProperty("合同到期时间" )
	private Date contractEnd;
	/**
	 * 合同年限
	 */
	@ExcelAttribute(name = "合同年限" )
	@Schema(description = "合同年限" )
	@ExcelProperty("合同年限" )
	private String contractTerm;

	/**
	 * 合同ID ---- 派增持有
	 */
	@ExcelAttribute(name = "合同ID" )
	@Schema(description = "合同ID---- 派增持有" )
	@ExcelProperty("合同ID" )
	private String contractId;
	/**
	 * 户口性质
	 */
	@Length(max = 32, message = "户口性质 不能超过32个字符" )
	@ExcelAttribute(name = "户口性质", maxLength = 32)
	@Schema(description = "户口性质" )
	@ExcelProperty("户口性质" )
	private String empRegisType;

	/**
	 * 档案所在地
	 */
	@Length(max = 50, message = "档案所在地 不能超过50个字符" )
	@ExcelAttribute(name = "档案所在地", maxLength = 50)
	@Schema(description = "档案所在地" )
	@ExcelProperty("档案所在地" )
	private String fileAddr;
	/**
	 * 就职岗位
	 */
	@Length(max = 30, message = "就职岗位 不能超过30个字符" )
	@ExcelAttribute(name = "就职岗位", maxLength = 30)
	@Schema(description = "就职岗位" )
	@ExcelProperty("就职岗位" )
	private String post;
	/**
	 * 委托备注
	 */
	@Length(max = 100, message = "委托备注 不能超过100个字符" )
	@ExcelAttribute(name = "委托备注", maxLength = 100)
	@Schema(description = "委托备注" )
	@ExcelProperty("委托备注" )
	private String trustRemark;
	/**
	 * 档案-省
	 */
	@ExcelAttribute(name = "档案-省" )
	@Schema(description = "档案-省" )
	@ExcelProperty("档案-省" )
	private Integer fileProvince;
	/**
	 * 档案-市
	 */
	@ExcelAttribute(name = "档案-市" )
	@Schema(description = "档案-市" )
	@ExcelProperty("档案-市" )
	private Integer fileCity;
	/**
	 * 档案-县
	 */
	@ExcelAttribute(name = "档案-县" )
	@Schema(description = "档案-县" )
	@ExcelProperty("档案-县" )
	private Integer fileTown;
	/**
	 * 合同类型
	 */
	@NotBlank(message = "合同类型不能为空")
	@Length(max = 32, message = "合同类型不能超过32个字符")
	@ExcelAttribute(name = "合同类型", maxLength = 32, needExport = true)
	@Schema(description = "合同类型", name = "contractName")
	private String contractName;

	/**
	 * 业务细分 personnel_type_sub
	 */
	@ExcelAttribute(name = "业务细分", maxLength = 32)
	@Schema(description = "业务细分", name = "contractSubName")
	private String contractSubName;

	/**
	 * 签订期限e
	 * 0        已完成一定工作任务为期限
	 * 1        固定期限
	 * 2        无固定期限
	 */
	@NotBlank(message = "签订期限不能为空")
	@Length(max = 32, message = "签订期限不能超过32个字符")
	@ExcelAttribute(name = "签订期限", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.EMPLOYEE_CONTRACT_TYPE, needExport = true)
	@Schema(description = "签订期限", name = "contractType")
	private String contractType;


	/**
	 * 社保办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败（原-办理失败）  3 部分办理成功 4 办理中
	 */
	@Length(max = 1, message = "社保办理状态  不能超过1个字符" )
	@ExcelAttribute(name = "社保办理状态", maxLength = 1)
	@Schema(description = "社保办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败（原-办理失败） 3 部分办理成功 4 办理中" )
	@ExcelProperty("社保办理状态" )
	private String socialHandleStatus;
	/**
	 * 公积金办理状态:0 未办理 1办理成功 2 办理失败 3 已派减
	 */
	@Length(max = 1, message = "公积金办理状态 不能超过1个字符" )
	@ExcelAttribute(name = "公积金办理状态", maxLength = 1)
	@Schema(description = "公积金办理状态:0 未办理 1办理成功 2 办理失败 3 已派减" )
	@ExcelProperty("公积金办理状态" )
	private String fundHandleStatus;
	/**
	 * 当前流程环节的处理意见
	 */
	@Length(max = 200, message = "当前流程环节的处理意见 不能超过200个字符" )
	@ExcelAttribute(name = "当前流程环节的处理意见", maxLength = 200)
	@Schema(description = "当前流程环节的处理意见" )
	@ExcelProperty("当前流程环节的处理意见" )
	private String handleRemark;
	/**
	 * 审核意见
	 */
	@Length(max = 255, message = "审核意见 不能超过255个字符" )
	@ExcelAttribute(name = "审核意见", maxLength = 255)
	@Schema(description = "审核意见" )
	@ExcelProperty("审核意见" )
	private String auditRemark;

	/**
	 * 公积金办理备注
	 */
	@Length(max = 255, message = "公积金办理备注 不能超过255个字符" )
	@ExcelAttribute(name = "公积金办理备注", maxLength = 255)
	@Schema(description = "公积金办理备注" )
	@ExcelProperty("公积金办理备注" )
	private String fundHandleRemark;
	/**
	 * 办理备注
	 */
	@Length(max = 255, message = "办理备注 不能超过255个字符" )
	@ExcelAttribute(name = "办理备注", maxLength = 255)
	@Schema(description = "办理备注" )
	@ExcelProperty("办理备注" )
	private String socialHandleRemark;
	/**
	 * 缴纳地-省
	 */
	@Length(max = 32, message = "缴纳地-省 不能超过32个字符" )
	@ExcelAttribute(name = "缴纳地-省", maxLength = 32)
	@Schema(description = "缴纳地-省" )
	@ExcelProperty("缴纳地-省" )
	private String socialProvince;
	/**
	 * 缴纳地-市
	 */
	@Length(max = 11, message = "缴纳地-市 不能超过11个字符" )
	@ExcelAttribute(name = "缴纳地-市", maxLength = 11)
	@Schema(description = "缴纳地-市" )
	@ExcelProperty("缴纳地-市" )
	private String socialCity;
	/**
	 * 缴纳地-县
	 */
	@Length(max = 32, message = "缴纳地-县 不能超过32个字符" )
	@ExcelAttribute(name = "缴纳地-县", maxLength = 32)
	@Schema(description = "缴纳地-县" )
	@ExcelProperty("缴纳地-县" )
	private String socialTown;
	/**
	 * 缴纳地-省
	 */
	@Length(max = 32, message = "缴纳地-省 不能超过32个字符" )
	@ExcelAttribute(name = "缴纳地-省", maxLength = 32)
	@Schema(description = "缴纳地-省" )
	@ExcelProperty("缴纳地-省" )
	private String fundProvince;
	/**
	 * 缴纳地-市
	 */
	@Length(max = 32, message = "缴纳地-市 不能超过32个字符" )
	@ExcelAttribute(name = "缴纳地-市", maxLength = 32)
	@Schema(description = "缴纳地-市" )
	@ExcelProperty("缴纳地-市" )
	private String fundCity;
	/**
	 * 缴纳地-县
	 */
	@Length(max = 32, message = "缴纳地-县 不能超过32个字符" )
	@ExcelAttribute(name = "缴纳地-县", maxLength = 32)
	@Schema(description = "缴纳地-县" )
	@ExcelProperty("缴纳地-县" )
	private String fundTown;
	/**
	 * 审核人
	 */
	@Length(max = 32, message = "审核人 不能超过32个字符" )
	@ExcelAttribute(name = "审核人", maxLength = 32)
	@Schema(description = "审核人" )
	@ExcelProperty("审核人" )
	private String auditUser;
	/**
	 * 审核时间
	 */
	@ExcelAttribute(name = "审核时间", isDate = true)
	@Schema(description = "审核时间" )
	@ExcelProperty("审核时间" )
	private Date auditTime;
	/**
	 * 工时制：1标准工时 2 综合工时 3不定时工时制
	 */
	@Length(max = 1, message = "工时制 不能超过1个字符" )
	@ExcelAttribute(name = "工时制", maxLength = 1, readConverterExp = "1=标准工时,2=综合工时,3=不定时工时制")
	@Schema(description = "工时制：1标准工时 2 综合工时 3不定时工时制" )
	@ExcelProperty("工时制" )
	private String workingHours;
	/**
	 * 申请人所在部门
	 */
	@Length(max = 50, message = "申请人所在部门 不能超过50个字符" )
	@ExcelAttribute(name = "申请人所在部门", maxLength = 50)
	@Schema(description = "申请人所在部门" )
	@ExcelProperty("申请人所在部门" )
	private String organName;
	/**
	 * 派单项：如 养老、公积金
	 */
	@Length(max = 50, message = "派单项：如 养老、公积金 不能超过50个字符" )
	@ExcelAttribute(name = "派单项：如 养老、公积金", maxLength = 50)
	@Schema(description = "派单项：如 养老、公积金" )
	@ExcelProperty("派单项：如 养老、公积金" )
	private String dispatchItem;
	/**
	 * 项目名称
	 */
	@Length(max = 50, message = "项目名称 不能超过50个字符" )
	@ExcelAttribute(name = "项目名称", maxLength = 50)
	@Schema(description = "项目名称" )
	@ExcelProperty("项目名称" )
	private String settleDomainName;

	/**
	 * 项目编码
	 */
	@Length(max = 50, message = "项目编码 不能超过50个字符" )
	@ExcelAttribute(name = "项目编码", maxLength = 50)
	@Schema(description = "项目编码" )
	@ExcelProperty("项目编码" )
	private String settleDomainCode;

	/**
	 * 单位名称
	 */
	@Length(max = 50, message = "单位名称 不能超过50个字符" )
	@ExcelAttribute(name = "单位名称", maxLength = 50)
	@Schema(description = "单位名称" )
	@ExcelProperty("单位名称" )
	private String belongUnitName;


	/**
	 * 学历
	 */
	@ExcelAttribute(name = "学历", maxLength = 32)
	@Schema(description = "学历", name = "contractName")
	private String educationName;

	/**
	 * 试用期（单位月）
	 */
	@Length(max = 2, message = "试用期 不能超过2 个字符" )
	@ExcelAttribute(name = "试用期", maxLength = 32)
	@Schema(description = "试用期" )
	@ExcelProperty("试用期" )
	private String tryPeriod;

	/**
	 * 身份证省
	 */
	@ExcelAttribute(name = "身份证省" ,isArea = true)
	@Schema(description = "身份证省" )
	@ExcelProperty("身份证省" )
	private String idCardProvince;
	/**
	 * 身份证市
	 */
	@ExcelAttribute(name = "身份证市" ,isArea = true,parentField = "idCardProvince")
	@Schema(description = "身份证市" )
	@ExcelProperty("身份证市" )
	private String idCardCity;
	/**
	 * 身份证县
	 */
	@ExcelAttribute(name = "身份证县",isArea = true,parentField = "idCardCity")
	@Schema(description = "身份证县" )
	@ExcelProperty("身份证县" )
	private String idCardTown;

	/**
	 * 身份证所在地
	 */
	@ExcelAttribute(name = "身份证所在地")
	@Schema(description = "身份证所在地" )
	@ExcelProperty("身份证所在地" )
	private String idCardAddress;

}
