Commit a95ea9df authored by hongguangwu's avatar hongguangwu

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

# Conflicts:
#	yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TAttaInfo.java
parents fb6482e2 5ec33286
......@@ -63,6 +63,9 @@ public class TAttaInfo extends BaseEntity {
@NotBlank(message = "关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业)不能为空")
@Length(max = 2, message = "关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业)不能超过2个字符")
@Schema(description = "关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业);21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件)")
@NotBlank(message = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本)不能为空")
@Length(max = 2, message = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本)不能超过2个字符")
@Schema(description = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本)")
private String relationType;
/**
* 实体id和关系类型共同确定附件所属
......
......@@ -151,4 +151,13 @@ public class TEmpBadRecord extends BaseEntity {
@TableField(exist = false)
@ExcelIgnore
private String attaIds;
/**
* 是否曾经或正在追究与承担过刑事责任 0 是 1 否
*/
@ExcelAttribute(name = "是否曾经或正在追究与承担过刑事责任" , isNotEmpty = true, errorInfo = "是否曾经或正在追究与承担过刑事责任不可为空",readConverterExp = "0=是,1=否")
@Schema(description ="是否曾经或正在追究与承担过刑事责任 0 是 1 否 ")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否曾经或正在追究与承担过刑事责任")
private BigDecimal badRecordFlag;
}
/*
* 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.archives.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.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;
/**
* @author fxj
* @date 2024-06-17 14:29:11
*/
@Data
@TableName("t_emp_contact_info")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "")
public class TEmpContactInfo extends BaseEntity {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
private String id;
/**
* empId
*/
@ExcelAttribute(name = "empId", maxLength = 32)
@Length(max = 32, message = "empId不能超过32个字符")
@ExcelProperty("empId")
@Schema(description = "empId")
private String empId;
/**
* 姓名
*/
@ExcelAttribute(name = "姓名", isNotEmpty = true, errorInfo = "姓名不能为空", maxLength = 20)
@NotBlank(message = "姓名不能为空")
@Length(max = 20, message = "姓名不能超过20个字符")
@ExcelProperty("姓名")
@Schema(description = "姓名")
private String empName;
/**
* 身份证
*/
@ExcelAttribute(name = "身份证", isNotEmpty = false, errorInfo = "身份证不能为空", maxLength = 20)
@NotBlank(message = "身份证不能为空")
@Length(max = 20, message = "身份证不能超过20个字符")
@ExcelProperty("身份证")
@Schema(description = "身份证")
private String empIdcard;
/**
* 与本人关系
*/
@ExcelAttribute(name = "与本人关系", isNotEmpty = true, errorInfo = "与本人关系不能为空", maxLength = 50)
@NotBlank(message = "与本人关系不能为空")
@Length(max = 50, message = "与本人关系不能超过50个字符")
@ExcelProperty("与本人关系")
@Schema(description = "与本人关系")
private String relationType;
/**
* 联系地址-街道、详情
*/
@ExcelAttribute(name = "联系地址-街道、详情", isNotEmpty = true, errorInfo = "联系地址-街道、详情不能为空", maxLength = 100)
@NotBlank(message = "联系地址-街道、详情不能为空")
@Length(max = 100, message = "联系地址-街道、详情不能超过100个字符")
@ExcelProperty("联系地址-街道、详情")
@Schema(description = "联系地址-街道、详情")
private String address;
/**
* 联系电话
*/
@ExcelAttribute(name = "联系电话", isNotEmpty = true, errorInfo = "联系电话不能为空", maxLength = 20)
@NotBlank(message = "联系电话不能为空")
@Length(max = 20, message = "联系电话不能超过20个字符")
@ExcelProperty("联系电话")
@Schema(description = "联系电话")
private String tel;
}
......@@ -67,6 +67,12 @@ public class TEmpDisabilityInfo extends BaseEntity {
@Schema(description ="身份证号")
private String empIdcard;
/**
* 传染病名称
*/
@Schema(description ="传染病名称")
private String infectiousName;
/**
* 伤残病名称
*/
......@@ -85,6 +91,29 @@ public class TEmpDisabilityInfo extends BaseEntity {
@Schema(description ="是否工伤标识0是/1否")
private String injuryIdentification;
/**
* 是否职业病0是/1否
*/
@Schema(description ="是否职业病 0是/1否")
private String occupationalDiseaseFlag;
/**
* 是否传染病病 0是/1否
*/
@Schema(description ="是否传染病病 0是/1否")
private String infectiousDiseaseFlag;
/**
* 是否持有残疾人证明 0是/1否
*/
@Schema(description ="是否持有残疾人证明 0是/1否")
private String disabilityFlag;
/**
* 是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种 0是/1否
*/
@Schema(description ="是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种 0是/1否")
private String otherFlag;
/**
* 伤残开始日期
*/
......
......@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -66,9 +67,9 @@ public class TEmpProfessionalQualification extends BaseEntity {
private String empIdcard;
/**
* 资格类型
* 职业资格名称 --- 原名 资格类型 2024-06-17 fxj update
*/
@Schema(description ="资格类型")
@Schema(description ="职业资格名称")
private String qualificationType;
/**
......@@ -132,4 +133,12 @@ public class TEmpProfessionalQualification extends BaseEntity {
**/
@TableField(exist = false)
private String attaIds;
/**
* 是否有职业资格证书:0 是 1 否
*/
@ExcelAttribute(name = "是否有职业资格证书",isNotEmpty = true,isDataId = true, readConverterExp = "0=是,1=否")
@Schema(description ="是否有职业资格证书:0 是 1 否")
private String haveQualification;
}
......@@ -128,4 +128,11 @@ public class TEmpWorkRecording extends BaseEntity {
@Schema(description ="备注")
private String remark;
/**
* 是否为首份工作 0是/1否
*/
@Schema(description ="是否为首份工作 0是/1否")
private String firstWorkFlag;
}
......@@ -140,6 +140,7 @@ public class TEmployeeInfo extends BaseEntity {
/**
* 婚姻状态
*/
@ExcelAttribute(name = "婚姻状态", isDataId = true, dataType = ExcelAttributeConstants.EMP_MARRIED)
@Schema(description = "婚姻状态")
private String empMarriStatus;
......@@ -152,6 +153,7 @@ public class TEmployeeInfo extends BaseEntity {
/**
* 政治面貌
*/
@ExcelAttribute(name = "政治面貌", isDataId = true, dataType = ExcelAttributeConstants.POLITICAL_STATUS)
@Schema(description = "政治面貌")
@Size(max = 32, message = "政治面貌不可超过32位")
private String politicalStatus;
......
......@@ -57,7 +57,7 @@ public class EmpBadRecordVo extends RowIndex implements Serializable {
/**
* 发生时间
*/
@ExcelAttribute(name = "发生时间" , isNotEmpty = true)
@ExcelAttribute(name = "发生时间" , isNotEmpty = false)
@Schema(description ="发生时间")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("发生时间")
......@@ -89,4 +89,14 @@ public class EmpBadRecordVo extends RowIndex implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("其他损失")
private BigDecimal loseFeeOther;
/**
* 是否曾经或正在追究与承担过刑事责任 0 是 1 否
*/
@ExcelAttribute(name = "是否曾经或正在追究与承担过刑事责任" , isNotEmpty = true, errorInfo = "是否曾经或正在追究与承担过刑事责任不可为空",readConverterExp = "0=是,1=否")
@Schema(description ="是否曾经或正在追究与承担过刑事责任 0 是 1 否 ")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否曾经或正在追究与承担过刑事责任")
private BigDecimal badRecordFlag;
}
......@@ -42,10 +42,10 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable {
/**
* 资格类型
*/
@ExcelAttribute(name = "资格类型",isNotEmpty = true,errorInfo = "资格类型不可为空",isDataId = true, dataType = ExcelAttributeConstants.QUALIFICATION_TYPE)
@NotNull(message = "资格类型不可为空")
@ExcelAttribute(name = "职业资格名称",isNotEmpty = true,errorInfo = "职业资格名称不可为空",isDataId = true, dataType = ExcelAttributeConstants.QUALIFICATION_TYPE)
@NotNull(message = "职业资格名称不可为空")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="资格类型")
@ExcelProperty(value ="职业资格名称")
private String qualificationType;
/**
......@@ -84,7 +84,7 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable {
/**
* 申报年度
*/
@ExcelAttribute(name = "申报年度",isInteger = true)
@ExcelAttribute(name = "申报年度",isInteger = true,isNotEmpty = true,errorInfo = "申报年度不可为空")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="申报年度")
private String declareYear;
......@@ -104,4 +104,12 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="备注")
private String remark;
/**
* 是否有职业资格证书:0 是 1 否
*/
@ExcelAttribute(name = "是否有职业资格证书",isNotEmpty = true,isDataId = true, readConverterExp = "0=是,1=否")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="获取方式")
private String haveQualification;
}
......@@ -7,6 +7,7 @@ import com.alibaba.excel.annotation.write.style.HeadFontStyle;
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.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
......@@ -53,6 +54,14 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable {
@ExcelProperty(value ="伤残病名称")
private String disabilityName;
/**
* 传染病名称
*/
@ExcelAttribute(name = "传染病名称",maxLength = 50)
@HeadFontStyle(fontHeightInPoints = 11)
@Schema(description ="传染病名称")
private String infectiousName;
/**
* 职业病名称
*/
......@@ -70,10 +79,11 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable {
@ExcelProperty(value ="伤残等级")
private String disabilityLevel;
/**
* 伤残开始日期
*/
@ExcelAttribute(name = "伤残开始日期",isNotEmpty = true, errorInfo = "伤残开始日期不能为空",isDate = true)
@ExcelAttribute(name = "伤残开始日期",isNotEmpty = false, errorInfo = "伤残开始日期不能为空",isDate = true)
@NotNull(message = "伤残开始日期不能为空")
@Past
@DateTimeFormat("yyyy-MM-dd")
......@@ -84,7 +94,7 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable {
/**
* 伤残结束日期
*/
@ExcelAttribute(name = "伤残结束日期",isNotEmpty = true, errorInfo = "伤残结束日期不能为空",isDate = true)
@ExcelAttribute(name = "伤残结束日期",isNotEmpty = false, errorInfo = "伤残结束日期不能为空",isDate = true)
@NotNull(message = "伤残结束日期不能为空")
@Past
@DateTimeFormat("yyyy-MM-dd")
......@@ -101,6 +111,36 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable {
@ExcelProperty(value ="是否工伤")
private String injuryIdentification;
/**
* 是否职业病0是/1否
*/
@ExcelAttribute(name = "是否职业病",isNotEmpty = false, errorInfo = "是否职业病不可为空",readConverterExp = "0=是,1=否")
@HeadFontStyle(fontHeightInPoints = 11)
@Schema(description ="是否职业病 0是/1否")
private String occupationalDiseaseFlag;
/**
* 是否传染病病 0是/1否
*/
@ExcelAttribute(name = "是否传染病病",isNotEmpty = false, errorInfo = "是否传染病病不可为空",readConverterExp = "0=是,1=否")
@HeadFontStyle(fontHeightInPoints = 11)
@Schema(description ="是否传染病病 0是/1否")
private String infectiousDiseaseFlag;
/**
* 是否持有残疾人证明 0是/1否
*/
@ExcelAttribute(name = "是否持有残疾人证明",isNotEmpty = false, errorInfo = "是否持有残疾人证明不可为空",readConverterExp = "0=是,1=否")
@HeadFontStyle(fontHeightInPoints = 11)
@Schema(description ="是否持有残疾人证明 0是/1否")
private String disabilityFlag;
/**
* 是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种 0是/1否
*/
@ExcelAttribute(name = "是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种",readConverterExp = "0=是,1=否")
@HeadFontStyle(fontHeightInPoints = 11)
@Schema(description ="是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种 0是/1否")
private String otherFlag;
/**
* 备注
*/
......
......@@ -72,7 +72,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable {
/**
* 学历名称
*/
@ExcelAttribute(name = "学历",isNotEmpty = true, errorInfo = "学历不可为空",isDataId = true,dataType = ExcelAttributeConstants.EDUCATION)
@ExcelAttribute(name = "学历",isNotEmpty = false, errorInfo = "学历不可为空",isDataId = true,dataType = ExcelAttributeConstants.EDUCATION)
@NotNull(message = "学历不可为空")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="学历")
......
......@@ -59,7 +59,7 @@ public class EmpEducationUpdateExcelVo extends RowIndex {
/**
* 学历名称
*/
@ExcelAttribute(name = "学历", isNotEmpty = true,errorInfo = "学历不可为空", isDataId = true, dataType = ExcelAttributeConstants.EDUCATION)
@ExcelAttribute(name = "学历", isNotEmpty = false,errorInfo = "学历不可为空", isDataId = true, dataType = ExcelAttributeConstants.EDUCATION)
@NotNull(message = "学历不可为空")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="学历")
......
......@@ -7,6 +7,7 @@ import com.alibaba.excel.annotation.write.style.HeadFontStyle;
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.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
......@@ -54,7 +55,7 @@ public class EmpWorkRecordExcelVO extends RowIndex implements Serializable {
/**
* 工作部门
*/
@ExcelAttribute(name = "工作部门",isNotEmpty = true,errorInfo = "工作部门不可为空",maxLength = 100)
@ExcelAttribute(name = "工作部门",isNotEmpty = false,errorInfo = "工作部门不可为空",maxLength = 100)
@NotNull(message = "工作部门不可为空")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="工作部门")
......@@ -79,7 +80,7 @@ public class EmpWorkRecordExcelVO extends RowIndex implements Serializable {
/**
* 是否在岗:0是/1否
*/
@ExcelAttribute(name = "在职状态",isNotEmpty = true,errorInfo = "在职状态不可为空",isDataId = true,readConverterExp = "0=在职,1=离职")
@ExcelAttribute(name = "在职状态",isNotEmpty = false,errorInfo = "在职状态不可为空",isDataId = true,readConverterExp = "0=在职,1=离职")
@NotNull(message = "是否在岗不可为空")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="在职状态")
......@@ -104,6 +105,11 @@ public class EmpWorkRecordExcelVO extends RowIndex implements Serializable {
@ExcelProperty(value ="结束工作日期")
private Date endDate;
/**
* 是否为首份工作 0是/1否
*/
@Schema(description ="是否为首份工作 0是/1否")
private String firstWorkFlag;
/*JSR303 是一套JavaBean参数校验的标准,它定义了很多常用的校验注解,我们可以直接将这些注解加在我们JavaBean的属性上面,就可以在需要校验的时候进行校验了。注解如下:
参考配置
......
......@@ -105,7 +105,7 @@ public class EmployeeBusinessVo {
* 学历
*/
@TableField(exist = false)
@ExcelAttribute(name = "学历", maxLength = 32,isNotEmpty = true,isDataId = true, dataType = ExcelAttributeConstants.EDUCATION)
@ExcelAttribute(name = "学历", maxLength = 32,isNotEmpty = false,isDataId = true, dataType = ExcelAttributeConstants.EDUCATION)
@Schema(description = "学历", name = "educationName")
private String educationName;
......
/*
* 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.archives.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContactInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* @author fxj
* @date 2024-06-17 14:29:11
*/
@Data
public class TEmpContactInfoSearchVo extends TEmpContactInfo {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
/*
* 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.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
/**
* @author fxj
* @date 2024-06-17 14:29:11
*/
@Data
public class TEmpContactInfoVo extends RowIndex implements Serializable {
/**
* id
*/
@TableId(type = IdType.ASSIGN_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 id;
/**
* empId
*/
@Length(max = 32, message = "empId 不能超过32 个字符")
@ExcelAttribute(name = "empId", maxLength = 32)
@Schema(description = "empId")
@ExcelProperty("empId")
private String empId;
/**
* 身份证
*/
@ExcelAttribute(name = "身份证", isNotEmpty = false, errorInfo = "身份证不能为空", maxLength = 20)
@NotBlank(message = "身份证不能为空")
@Length(max = 20, message = "身份证不能超过20个字符")
@ExcelProperty("身份证")
@Schema(description = "身份证")
private String empIdcard;
/**
* 姓名
*/
@NotBlank(message = "姓名 不能为空")
@Length(max = 20, message = "姓名 不能超过20 个字符")
@ExcelAttribute(name = "姓名", isNotEmpty = true, errorInfo = "姓名 不能为空", maxLength = 20)
@Schema(description = "姓名")
@ExcelProperty("姓名")
private String empName;
/**
* 与本人关系
*/
@NotBlank(message = "与本人关系 不能为空")
@Length(max = 50, message = "与本人关系 不能超过50 个字符")
@ExcelAttribute(name = "与本人关系", isNotEmpty = true, errorInfo = "与本人关系 不能为空", maxLength = 50)
@Schema(description = "与本人关系")
@ExcelProperty("与本人关系")
private String relationType;
/**
* 联系地址-街道、详情
*/
@NotBlank(message = "联系地址-街道、详情 不能为空")
@Length(max = 100, message = "联系地址-街道、详情 不能超过100 个字符")
@ExcelAttribute(name = "联系地址-街道、详情", isNotEmpty = true, errorInfo = "联系地址-街道、详情 不能为空", maxLength = 100)
@Schema(description = "联系地址-街道、详情")
@ExcelProperty("联系地址-街道、详情")
private String address;
/**
* 联系电话
*/
@NotBlank(message = "联系电话 不能为空")
@Length(max = 20, message = "联系电话 不能超过20 个字符")
@ExcelAttribute(name = "联系电话", isNotEmpty = true, errorInfo = "联系电话 不能为空", maxLength = 20)
@Schema(description = "联系电话")
@ExcelProperty("联系电话")
private String tel;
/**
* 创建者
*/
@Length(max = 64, message = "创建者 不能超过64 个字符")
@ExcelAttribute(name = "创建者", maxLength = 64)
@Schema(description = "创建者")
@ExcelProperty("创建者")
private String createBy;
/**
* 更新人
*/
@Length(max = 64, message = "更新人 不能超过64 个字符")
@ExcelAttribute(name = "更新人", maxLength = 64)
@Schema(description = "更新人")
@ExcelProperty("更新人")
private String updateBy;
/**
* 创建人姓名
*/
@Length(max = 32, message = "创建人姓名 不能超过32 个字符")
@ExcelAttribute(name = "创建人姓名", maxLength = 32)
@Schema(description = "创建人姓名")
@ExcelProperty("创建人姓名")
private String createName;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间", isDate = true)
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private Date createTime;
/**
* 更新时间
*/
@ExcelAttribute(name = "更新时间", isDate = true)
@Schema(description = "更新时间")
@ExcelProperty("更新时间")
private Date updateTime;
}
......@@ -101,7 +101,7 @@ public class TEmpEducationExportVo implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@Max(value = 50)
@Schema(description = "学历名称")
@ExcelAttribute(name = "学历", isNotEmpty = true,errorInfo = "学历不可为空", isDataId = true, dataType = ExcelAttributeConstants.EDUCATION)
@ExcelAttribute(name = "学历", isNotEmpty = false,errorInfo = "学历不可为空", isDataId = true, dataType = ExcelAttributeConstants.EDUCATION)
@ExcelProperty("学历")
private String educationName;
......
/*
* 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.archives.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContactInfo;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpContactInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpContactInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* @author fxj
* @date 2024-06-17 14:29:11
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tempcontactinfo")
@Tag(name = "紧急联系人")
public class TEmpContactInfoController {
private final TEmpContactInfoService tEmpContactInfoService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tEmpContactInfo
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TEmpContactInfo>> getTEmpContactInfoPage(Page<TEmpContactInfo> page, TEmpContactInfoSearchVo tEmpContactInfo) {
return new R<>(tEmpContactInfoService.getTEmpContactInfoPage(page, tEmpContactInfo));
}
/**
* 不分页查询
*
* @param tEmpContactInfo
* @return
*/
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage")
//@PreAuthorize("@pms.hasPermission('archives_tempcontactinfo_get')" )
public R<List<TEmpContactInfo>> getTEmpContactInfoNoPage(@RequestBody TEmpContactInfoSearchVo tEmpContactInfo) {
return R.ok(tEmpContactInfoService.noPageDiy(tEmpContactInfo));
}
/**
* 通过id查询
*
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('archives_tempcontactinfo_get')")
@GetMapping("/{id}")
@PreAuthorize("@pms.hasPermission('archives_tempcontactinfo_get')")
public R<TEmpContactInfo> getById(@PathVariable("id") String id) {
return R.ok(tEmpContactInfoService.getById(id));
}
/**
* 新增
*
* @param tEmpContactInfo
* @return R
*/
@Operation(summary = "新增", description = "新增:hasPermission('archives_tempcontactinfo_add')")
@SysLog("新增")
@PostMapping
@PreAuthorize("@pms.hasPermission('archives_tempcontactinfo_add')")
public R<Boolean> save(@RequestBody TEmpContactInfo tEmpContactInfo) {
return R.ok(tEmpContactInfoService.save(tEmpContactInfo));
}
/**
* 修改
*
* @param tEmpContactInfo
* @return R
*/
@Operation(summary = "修改", description = "修改:hasPermission('archives_tempcontactinfo_edit')")
@SysLog("修改")
@PutMapping
@PreAuthorize("@pms.hasPermission('archives_tempcontactinfo_edit')")
public R<Boolean> updateById(@RequestBody TEmpContactInfo tEmpContactInfo) {
return R.ok(tEmpContactInfoService.updateById(tEmpContactInfo));
}
/**
* 通过id删除
*
* @param id id
* @return R
*/
@Operation(summary = "通过id删除", description = "通过id删除:hasPermission('archives_tempcontactinfo_del')")
@SysLog("通过id删除")
@DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('archives_tempcontactinfo_del')")
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tEmpContactInfoService.removeById(id));
}
/**
* 批量导入
*
* @author fxj
* @date 2024-06-17 14:29:11
**/
@SneakyThrows
@Operation(description = "批量新增 hasPermission('archives_tempcontactinfo-batch-import')")
@SysLog("批量新增")
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('archives_tempcontactinfo-batch-import')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file) {
return tEmpContactInfoService.importDiy(file.getInputStream());
}
/**
* 批量导出
*
* @author fxj
* @date 2024-06-17 14:29:11
**/
@Operation(description = "导出 hasPermission('archives_tempcontactinfo-export')")
@PostMapping("/export")
@PreAuthorize("@pms.hasPermission('archives_tempcontactinfo-export')")
public void export(HttpServletResponse response, @RequestBody TEmpContactInfoSearchVo searchVo) {
tEmpContactInfoService.listExport(response, searchVo);
}
}
......@@ -22,6 +22,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpDisabilityInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.DisabilitySearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
......@@ -98,10 +100,31 @@ public class TEmpDisabilityInfoController {
@PostMapping
@PreAuthorize("@pms.hasPermission('archives_tempdisabilityinfo_add')" )
public R<Boolean> save(@RequestBody TEmpDisabilityInfo tEmpDisabilityInfo) {
R<Boolean> failed = getCheckRes(tEmpDisabilityInfo);
if (failed != null) return failed;
return tEmpDisabilityInfoService.saveDiy(tEmpDisabilityInfo);
}
private R<Boolean> getCheckRes(TEmpDisabilityInfo tEmpDisabilityInfo) {
if (CommonConstants.ZERO_STRING.equals(tEmpDisabilityInfo.getOccupationalDiseaseFlag())
&& Common.isEmpty(tEmpDisabilityInfo.getOccupationalDisease())){
return R.failed("职业病名称不可为空!");
}
if (CommonConstants.ZERO_STRING.equals(tEmpDisabilityInfo.getInfectiousDiseaseFlag())
&& Common.isEmpty(tEmpDisabilityInfo.getInfectiousName())){
return R.failed("传染病名称不可为空!");
}
if (CommonConstants.ZERO_STRING.equals(tEmpDisabilityInfo.getDisabilityFlag())){
if (Common.isEmpty(tEmpDisabilityInfo.getDisabilityName())){
return R.failed("伤残病名称不可为空!");
}
if (Common.isEmpty(tEmpDisabilityInfo.getDisabilityLevel())){
return R.failed("伤残等级不可为空!");
}
}
return null;
}
/**
* 修改员工伤残信息表
* @param tEmpDisabilityInfo 员工伤残信息表
......@@ -112,6 +135,8 @@ public class TEmpDisabilityInfoController {
@PutMapping
@PreAuthorize("@pms.hasPermission('archives_tempdisabilityinfo_edit')" )
public R<Boolean> updateById(@RequestBody TEmpDisabilityInfo tEmpDisabilityInfo) {
R<Boolean> failed = getCheckRes(tEmpDisabilityInfo);
if (failed != null) return failed;
return tEmpDisabilityInfoService.updateByIdDiy(tEmpDisabilityInfo);
}
......
/*
* 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.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContactInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* @author fxj
* @date 2024-06-17 14:29:11
*/
@Mapper
public interface TEmpContactInfoMapper extends BaseMapper<TEmpContactInfo> {
/**
* 简单分页查询
*
* @param tEmpContactInfo
* @return
*/
IPage<TEmpContactInfo> getTEmpContactInfoPage(Page<TEmpContactInfo> page, @Param("tEmpContactInfo") TEmpContactInfo tEmpContactInfo);
}
/*
* 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.archives.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContactInfo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpContactInfoSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
/**
*
*
* @author fxj
* @date 2024-06-17 14:29:11
*/
public interface TEmpContactInfoService extends IService<TEmpContactInfo> {
/**
* 简单分页查询
* @param tEmpContactInfo
* @return
*/
IPage<TEmpContactInfo> getTEmpContactInfoPage(Page<TEmpContactInfo> page, TEmpContactInfoSearchVo tEmpContactInfo);
R<List<ErrorMessage>> importDiy(InputStream inputStream);
void listExport(HttpServletResponse response, TEmpContactInfoSearchVo searchVo);
List<TEmpContactInfo> noPageDiy(TEmpContactInfoSearchVo searchVo);
}
......@@ -150,10 +150,10 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
for (int i = 0; i < excelVOList.size(); i++) {
// 已有验证报错直接下一个
EmpBadRecordVo excel = excelVOList.get(i);
if (Common.isEmpty(excel.getLoseFee()) && Common.isEmpty(excel.getLoseFeeOther())){
/*if (Common.isEmpty(excel.getLoseFee()) && Common.isEmpty(excel.getLoseFeeOther())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_PROJECT_EMP_LOSE_FEE_NOT_EMPTY)));
continue;
}
}*/
emp = employeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard,excel.getEmpIdcard())
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
......
/*
* 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.archives.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContactInfo;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpContactInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpContactInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpContactInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpContactInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
/**
* @author fxj
* @date 2024-06-17 14:29:11
*/
@Log4j2
@Service
public class TEmpContactInfoServiceImpl extends ServiceImpl<TEmpContactInfoMapper, TEmpContactInfo> implements TEmpContactInfoService {
/**
* 简单分页查询
*
* @param tEmpContactInfo
* @return
*/
@Override
public IPage<TEmpContactInfo> getTEmpContactInfoPage(Page<TEmpContactInfo> page, TEmpContactInfoSearchVo tEmpContactInfo) {
return baseMapper.getTEmpContactInfoPage(page, tEmpContactInfo);
}
/**
* 批量导出
*
* @param searchVo
* @return
*/
@Override
public void listExport(HttpServletResponse response, TEmpContactInfoSearchVo searchVo) {
String fileName = "批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TEmpContactInfo> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TEmpContactInfo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TEmpContactInfo> util = new ExcelUtil<>(TEmpContactInfo.class);
for (TEmpContactInfo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
if (Common.isNotNull(list)) {
list.clear();
}
}
} else {
WriteSheet writeSheet = EasyExcel.writerSheet("" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
list.clear();
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
} finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
@Override
public List<TEmpContactInfo> noPageDiy(TEmpContactInfoSearchVo searchVo) {
LambdaQueryWrapper<TEmpContactInfo> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)) {
wrapper.in(TEmpContactInfo::getId, idList);
}
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0) {
wrapper.last(" limit " + searchVo.getLimitStart() + "," + searchVo.getLimitEnd());
}
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectList(wrapper);
}
private Long noPageCountDiy(TEmpContactInfoSearchVo searchVo) {
LambdaQueryWrapper<TEmpContactInfo> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)) {
wrapper.in(TEmpContactInfo::getId, idList);
}
return baseMapper.selectCount(wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(TEmpContactInfoSearchVo entity) {
LambdaQueryWrapper<TEmpContactInfo> wrapper = Wrappers.lambdaQuery();
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(TEmpContactInfo::getCreateTime, entity.getCreateTimes()[0])
.le(TEmpContactInfo::getCreateTime,
entity.getCreateTimes()[1]);
}
if (Common.isNotNull(entity.getCreateName())) {
wrapper.eq(TEmpContactInfo::getCreateName, entity.getCreateName());
}
return wrapper;
}
@Override
public R<List<ErrorMessage>> importDiy(InputStream inputStream) {
List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<TEmpContactInfoVo> util1 = new ExcelUtil<>(TEmpContactInfoVo.class);
;
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try {
EasyExcel.read(inputStream, TEmpContactInfoVo.class, new ReadListener<TEmpContactInfoVo>() {
/**
* 单次缓存的数据量
*/
public static final int BATCH_COUNT = CommonConstants.BATCH_COUNT;
/**
*临时存储
*/
private List<TEmpContactInfoVo> cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
@Override
public void invoke(TEmpContactInfoVo data, AnalysisContext context) {
ReadRowHolder readRowHolder = context.readRowHolder();
Integer rowIndex = readRowHolder.getRowIndex();
data.setRowIndex(rowIndex + 1);
ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex());
if (Common.isNotNull(errorMessage)) {
errorMessageList.add(errorMessage);
} else {
cachedDataList.add(data);
}
if (cachedDataList.size() >= BATCH_COUNT) {
saveData();
// 存储完成清理 list
cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
}
}
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
saveData();
}
/**
* 加上存储数据库
*/
private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTEmpContactInfo(cachedDataList, errorMessageList);
log.info("存储数据库成功!");
}
}).sheet().doRead();
} catch (Exception e) {
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
return R.ok(errorMessageList);
}
private void importTEmpContactInfo(List<TEmpContactInfoVo> excelVOList, List<ErrorMessage> errorMessageList) {
// 个性化校验逻辑
ErrorMessage errorMsg;
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
TEmpContactInfoVo excel = excelVOList.get(i);
// 数据合法情况 TODO
// 插入
insertExcel(excel);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS));
}
}
/**
* 插入excel bad record
*/
private void insertExcel(TEmpContactInfoVo excel) {
TEmpContactInfo insert = new TEmpContactInfo();
BeanUtil.copyProperties(excel, insert);
this.save(insert);
}
}
......@@ -103,8 +103,29 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(exist)){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_DISABILITY_NAME_EXISTING)));
continue;
}
// 数据合法情况
if (CommonConstants.ZERO_STRING.equals(excel.getOccupationalDiseaseFlag())
&& Common.isEmpty(excel.getOccupationalDisease())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),"职业病名称不可为空!"));
continue;
}
if (CommonConstants.ZERO_STRING.equals(excel.getInfectiousDiseaseFlag())
&& Common.isEmpty(excel.getInfectiousName())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),"传染病名称不可为空!"));
continue;
}
if (CommonConstants.ZERO_STRING.equals(excel.getDisabilityFlag())){
if (Common.isEmpty(excel.getDisabilityName())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),"伤残病名称不可为空!"));
continue;
}
if (Common.isEmpty(excel.getDisabilityLevel())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),"伤残等级不可为空!"));
continue;
}
}
// 数据合法情况
insertExcel(excel,emp);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS));
......
......@@ -1921,9 +1921,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (Common.isEmpty(employeeInfo.getEmpNational())) {
errorMsg.add(EmployeeConstants.EMP_NATIONAL);
}
if (Common.isEmpty(employeeInfo.getIdProvince())) {
/*if (Common.isEmpty(employeeInfo.getIdProvince())) {
errorMsg.add(EmployeeConstants.ID_PROVINCE);
}
}*/
if (Common.isEmpty(employeeInfo.getFileProvince())) {
errorMsg.add(EmployeeConstants.FILE_PROVINCE);
}
......@@ -1951,9 +1951,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
}
if (Common.isNotNull(employeeInfo.getIdCity()) && Common.isEmpty(employeeInfo.getIdProvince())) {
/*if (Common.isNotNull(employeeInfo.getIdCity()) && Common.isEmpty(employeeInfo.getIdProvince())) {
errorMsg.add(EmployeeConstants.ID_ROVINCE_MUST);
}
}*/
if (Common.isNotNull(employeeInfo.getIdTown()) && Common.isEmpty(employeeInfo.getIdCity())) {
errorMsg.add(EmployeeConstants.ID_CITY_MUST);
}
......
......@@ -40,5 +40,6 @@
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="badRecordFlag" column="BAD_RECORD_FLAG"/>
</resultMap>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ 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)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpContactInfoMapper">
<resultMap id="tEmpContactInfoMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContactInfo">
<id property="id" column="ID"/>
<result property="empId" column="EMP_ID"/>
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="relationType" column="RELATION_TYPE"/>
<result property="address" column="ADDRESS"/>
<result property="tel" column="TEL"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.EMP_ID,
a.EMP_NAME,
a.RELATION_TYPE,
a.ADDRESS,
a.TEL,
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_TIME
</sql>
<sql id="tEmpContactInfo_where">
<if test="tEmpContactInfo != null">
<if test="tEmpContactInfo.id != null and tEmpContactInfo.id.trim() != ''">
AND a.ID = #{tEmpContactInfo.id}
</if>
<if test="tEmpContactInfo.empId != null and tEmpContactInfo.empId.trim() != ''">
AND a.EMP_ID = #{tEmpContactInfo.empId}
</if>
<if test="tEmpContactInfo.empName != null and tEmpContactInfo.empName.trim() != ''">
AND a.EMP_NAME = #{tEmpContactInfo.empName}
</if>
<if test="tEmpContactInfo.empIdcard != null and tEmpContactInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tEmpContactInfo.empIdcard}
</if>
<if test="tEmpContactInfo.relationType != null and tEmpContactInfo.relationType.trim() != ''">
AND a.RELATION_TYPE = #{tEmpContactInfo.relationType}
</if>
<if test="tEmpContactInfo.address != null and tEmpContactInfo.address.trim() != ''">
AND a.ADDRESS = #{tEmpContactInfo.address}
</if>
<if test="tEmpContactInfo.tel != null and tEmpContactInfo.tel.trim() != ''">
AND a.TEL = #{tEmpContactInfo.tel}
</if>
<if test="tEmpContactInfo.createBy != null and tEmpContactInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{tEmpContactInfo.createBy}
</if>
<if test="tEmpContactInfo.updateBy != null and tEmpContactInfo.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tEmpContactInfo.updateBy}
</if>
<if test="tEmpContactInfo.createName != null and tEmpContactInfo.createName.trim() != ''">
AND a.CREATE_NAME = #{tEmpContactInfo.createName}
</if>
<if test="tEmpContactInfo.createTime != null">
AND a.CREATE_TIME = #{tEmpContactInfo.createTime}
</if>
<if test="tEmpContactInfo.updateTime != null">
AND a.UPDATE_TIME = #{tEmpContactInfo.updateTime}
</if>
</if>
</sql>
<!--tEmpContactInfo简单分页查询-->
<select id="getTEmpContactInfoPage" resultMap="tEmpContactInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_emp_contact_info a
<where>
1=1
<include refid="tEmpContactInfo_where"/>
</where>
</select>
</mapper>
......@@ -43,5 +43,14 @@
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="remark" column="REMARK"/>
<result property="occupationalDiseaseFlag" column="OCCUPATIONAL_DISEASE_FLAG"/>
<result property="infectiousDiseaseFlag" column="INFECTIOUS_DISEASE_FLAG"/>
<result property="infectiousName" column="INFECTIOUS_NAME"/>
<result property="disabilityFlag" column="DISABILITY_FLAG"/>
<result property="otherFlag" column="OTHER_FLAG"/>
</resultMap>
</mapper>
......@@ -44,5 +44,6 @@
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="remark" column="REMARK"/>
<result property="haveQualification" column="HAVE_QUALIFICATION"/>
</resultMap>
</mapper>
......@@ -44,5 +44,7 @@
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="remark" column="REMARK"/>
<result property="firstWorkFlag" column="FIRST_WORK_FLAG"/>
</resultMap>
</mapper>
......@@ -98,7 +98,7 @@ public class ExcelAttributeConstants {
//学历信息:学历类型
public static final String EDUCATION_TYPE = "education_type";
//职业资格:资格类型
//职业资格:职业资格名称 (原名 '资格类型')
public static final String QUALIFICATION_TYPE = "qualification_type";
//职业资格:资格等级
......
......@@ -28,7 +28,7 @@ seata:
enable-degrade: false # 降级开关
disable-global-transaction: false # 禁用全局事务(默认false)
grouplist:
default: 192.168.0.153:33091
default: 192.168.1.65:33091
transport:
shutdown:
wait: 3
......
......@@ -54,5 +54,40 @@
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.icbc</groupId>
<artifactId>icbc-api-sdk-cop</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.icbc</groupId>
<artifactId>icbc-api-sdk-cop-io</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.icbc</groupId>
<artifactId>icbc-ca</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.icbc</groupId>
<artifactId>InfosecCrypto_Java1_02_JDK14</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.icbc</groupId>
<artifactId>proguard</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.icbc</groupId>
<artifactId>hsm-software-share</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>com.icbc</groupId>
<artifactId>commons-logging-icbc</artifactId>
<version>1.2.0</version>
</dependency>
</dependencies>
</project>
package com.yifu.cloud.plus.v1.ekp.controller;
import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowIssueService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 聚富通代发工资相关
*
* @author huyc
* @date 2024-05-23 10:24:12
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/icbcIssue" )
@Tag(name = "聚富通代发工资相关")
public class IcbcTransactionFlowIssueController {
private final IcbcTransactionFlowIssueService icbcTransactionFlowIssueService;
/**
* 聚富通代发工资确认提交
*
* @param
* @param
* @return
*/
@Operation(summary = "聚富通代发工资确认提交接口", description = "聚富通代发工资确认提交接口")
@PostMapping("/submit")
public R submitIcbcTransactionFlow() {
return icbcTransactionFlowIssueService.submitIcbcTransactionFlow();
}
/**
* 代发工资明细查询
*
* @param
* @param
* @return
*/
@Operation(summary = "代发工资明细查询", description = "代发工资明细查询")
@PostMapping("/page")
public R selectIcbcTransactionFlowInfo() {
return icbcTransactionFlowIssueService.selectIcbcTransactionFlowInfo();
}
}
//package com.yifu.cloud.plus.v1.ekp.controller;
//
//import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowIssueService;
//import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import lombok.RequiredArgsConstructor;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * 聚富通代发工资相关
// *
// * @author huyc
// * @date 2024-05-23 10:24:12
// */
//@RestController
//@RequiredArgsConstructor
//@RequestMapping("/icbcIssue" )
//@Tag(name = "聚富通代发工资相关")
//public class IcbcTransactionFlowIssueController {
//
// private final IcbcTransactionFlowIssueService icbcTransactionFlowIssueService;
//
// /**
// * 聚富通代发工资确认提交
// *
// * @param
// * @param
// * @return
// */
// @Operation(summary = "聚富通代发工资确认提交接口", description = "聚富通代发工资确认提交接口")
// @PostMapping("/submit")
// public R submitIcbcTransactionFlow() {
// return icbcTransactionFlowIssueService.submitIcbcTransactionFlow();
// }
//
// /**
// * 代发工资明细查询
// *
// * @param
// * @param
// * @return
// */
// @Operation(summary = "代发工资明细查询", description = "代发工资明细查询")
// @PostMapping("/page")
// public R selectIcbcTransactionFlowInfo() {
// return icbcTransactionFlowIssueService.selectIcbcTransactionFlowInfo();
// }
//}
package com.yifu.cloud.plus.v1.ekp.controller;
import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 聚富通到账通知交易流水查询
*
* @author huyc
* @date 2024-05-23 10:24:12
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/icbcQuery" )
@Tag(name = "聚富通到账通知交易流水查询")
public class IcbcTransactionFlowQueryController {
private final IcbcTransactionFlowQueryService icbcTransactionFlowQueryService;
/**
* 交易流水查询
*
* @param
* @return
*/
@Operation(summary = "交易流水查询", description = "交易流水查询")
@PostMapping("/page")
public R getIcbcTransactionFlow() {
return icbcTransactionFlowQueryService.getIcbcTransactionFlow();
}
/**
* 预订单接口
*
* @param
* @return
*/
@Operation(summary = "预订单接口", description = "预订单接口")
@PostMapping("/save")
public R saveIcbcManagerCard() {
return icbcTransactionFlowQueryService.saveIcbcManagerCard();
}
}
//package com.yifu.cloud.plus.v1.ekp.controller;
//
//import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService;
//import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import lombok.RequiredArgsConstructor;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * 聚富通到账通知交易流水查询
// *
// * @author huyc
// * @date 2024-05-23 10:24:12
// */
//@RestController
//@RequiredArgsConstructor
//@RequestMapping("/icbcQuery" )
//@Tag(name = "聚富通到账通知交易流水查询")
//public class IcbcTransactionFlowQueryController {
//
// private final IcbcTransactionFlowQueryService icbcTransactionFlowQueryService;
//
// /**
// * 交易流水查询
// *
// * @param
// * @return
// */
// @Operation(summary = "交易流水查询", description = "交易流水查询")
// @PostMapping("/page")
// public R getIcbcTransactionFlow() {
// return icbcTransactionFlowQueryService.getIcbcTransactionFlow();
// }
//
// /**
// * 预订单接口
// *
// * @param
// * @return
// */
// @Operation(summary = "预订单接口", description = "预订单接口")
// @PostMapping("/save")
// public R saveIcbcManagerCard() {
// return icbcTransactionFlowQueryService.saveIcbcManagerCard();
// }
//}
package com.yifu.cloud.plus.v1.ekp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
/**
* 聚富通代发工资相关
*
* @author huyc
* @date 2024-05-24 10:55:24
*/
public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo> {
R submitIcbcTransactionFlow();
R selectIcbcTransactionFlowInfo();
}
//package com.yifu.cloud.plus.v1.ekp.service;
//
//import com.baomidou.mybatisplus.extension.service.IService;
//import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
//import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//
///**
// * 聚富通代发工资相关
// *
// * @author huyc
// * @date 2024-05-24 10:55:24
// */
//public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo> {
//
// R submitIcbcTransactionFlow();
//
// R selectIcbcTransactionFlowInfo();
//
//}
package com.yifu.cloud.plus.v1.ekp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
/**
* 聚富通到账通知交易流水查询
*
* @author huyc
* @date 2024-05-23 11:21:56
*/
public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo> {
R getIcbcTransactionFlow();
R saveIcbcManagerCard();
}
//package com.yifu.cloud.plus.v1.ekp.service;
//
//import com.baomidou.mybatisplus.extension.service.IService;
//import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
//import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//
///**
// * 聚富通到账通知交易流水查询
// *
// * @author huyc
// * @date 2024-05-23 11:21:56
// */
//public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo> {
//
// R getIcbcTransactionFlow();
//
// R saveIcbcManagerCard();
//
//}
......@@ -2313,7 +2313,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
|| Common.isEmpty(excel.getEmpMobile())
|| Common.isEmpty(excel.getEmpType())
|| Common.isEmpty(excel.getPost())
|| Common.isEmpty(excel.getEducationName())
//|| Common.isEmpty(excel.getEducationName())
|| Common.isEmpty(excel.getContractName())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_NOT_EMPTY)));
return true;
......
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