Commit 08ad960b authored by fangxinjiang's avatar fangxinjiang

学历

parent d78193dc
......@@ -104,7 +104,7 @@ public class TEmpEducation extends BaseEntity {
* 最高学历标识0是/1否
*/
@Schema(description ="最高学历标识0是/1否")
private String hightIdentification;
private String highIdentification;
/**
* 学历类型:全日制、自考、函授等
......@@ -131,6 +131,12 @@ public class TEmpEducation extends BaseEntity {
*/
@Schema(description ="派单标识 1 代表派单生成, 派单审核通过后清空标识 专门用于派单作废")
private String dispatchFlag;
/**
* 证书名称
*/
@Schema(description ="证书名称")
private String certificationName;
/**
* 备注
*/
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 员工伤残excel 对应的实体
*
* @author fxz
* @date 2022/3/21
*/
@Data
@ColumnWidth(30)
public class EmpEducationExcelVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 员工姓名
*/
@Schema(description ="员工姓名")
private String empName;
/**
* 身份证号
*/
@Schema(description ="身份证号")
private String empIdcard;
/**
* 入学时间
*/
@Schema(description ="入学时间")
private LocalDateTime entryDate;
/**
* 结业日期
*/
@Schema(description ="毕业时间")
private LocalDateTime gradutionDate;
/**
* 学历名称
*/
@Schema(description ="学历")
private String educationName;
/**
* 学校名称
*/
@Schema(description ="学校名")
private String school;
/**
* 学制类型:四年、三年、五年、二年
*/
@Schema(description ="学制")
private String educationSystem;
/**
* 最高学历标识0是/1否
*/
@Schema(description ="最高学历标识")
private String highIdentification;
/**
* 学历类型:全日制、自考、函授等
*/
@Schema(description ="学历类型")
private String type;
/**
* 院系名称
*/
@Schema(description ="院系")
private String collageSystem;
/**
* 证书名称
*/
@Schema(description ="证书名称")
private String certificationName;
/**
* 备注
*/
@Schema(description ="备注")
private String remark;
/*JSR303 是一套JavaBean参数校验的标准,它定义了很多常用的校验注解,我们可以直接将这些注解加在我们JavaBean的属性上面,就可以在需要校验的时候进行校验了。注解如下:
参考配置
@Null 限制只能为null
@NotNull 限制必须不为null
@AssertFalse 限制必须为false
@AssertTrue 限制必须为true
@DecimalMax(value) 限制必须为一个不大于指定值的数字
@DecimalMin(value) 限制必须为一个不小于指定值的数字
@Digits(integer,fraction) 限制必须为一个小数,且整数部分的位数不能超过integer,小数部分的位数不能超过fraction
@Future 限制必须是一个将来的日期
@Max(value) 限制必须为一个不大于指定值的数字
@Min(value) 限制必须为一个不小于指定值的数字
@Past 限制必须是一个过去的日期
@Pattern(value) 限制必须符合指定的正则表达式
@Size(max,min) 限制字符长度必须在min到max之间
@Past 验证注解的元素值(日期类型)比当前时间早
@NotEmpty 验证注解的元素值不为null且不为空(字符串长度不为0、集合大小不为0)
@NotBlank 验证注解的元素值不为空(不为null、去除首位空格后长度为0),不同于@NotEmpty,@NotBlank只应用于字符串且在比较时会去除字符串的空格
@Email 验证注解的元素值是Email,也可以通过正则表达式和flag指定自定义的email格式*/
}
......@@ -43,7 +43,6 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/tcustomerinfo")
@Tag(name = "客户信息管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TCustomerInfoController {
private final TCustomerInfoService tCustomerInfoService;
......
......@@ -43,7 +43,6 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/tcutsomerdatapermisson")
@Tag(name = "客户数据权限表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TCutsomerDataPermissonController {
private final TCutsomerDataPermissonService tCutsomerDataPermissonService;
......
......@@ -42,7 +42,6 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/telecemployeeinfo" )
@Tag(name = "电子档案信息表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TElecEmployeeInfoController {
private final TElecEmployeeInfoService tElecEmployeeInfoService;
......
......@@ -42,7 +42,6 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/tempchangeinfo" )
@Tag(name = "档案划转日志表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TEmpChangeInfoController {
private final TEmpChangeInfoService tEmpChangeInfoService;
......
......@@ -52,7 +52,6 @@ import java.util.List;
@RequiredArgsConstructor
@RequestMapping("/tempdisabilityinfo" )
@Tag(name = "员工伤残信息表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TEmpDisabilityInfoController {
private final TEmpDisabilityInfoService tEmpDisabilityInfoService;
......
......@@ -17,10 +17,17 @@
package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.plugin.excel.annotation.RequestExcel;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpEducationService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationExcelVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpWorkRecordExcelVO;
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.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import io.swagger.v3.oas.annotations.Operation;
......@@ -29,8 +36,11 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 员工学历信息表
......@@ -42,7 +52,6 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/tempeducation" )
@Tag(name = "员工学历信息表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TEmpEducationController {
private final TEmpEducationService tEmpEducationService;
......@@ -56,7 +65,7 @@ public class TEmpEducationController {
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('archives_tempeducation_get')" )
public R getTEmpEducationPage(Page page, TEmpEducation tEmpEducation) {
public R<IPage<TEmpEducation>> getTEmpEducationPage(Page page, TEmpEducation tEmpEducation) {
return R.ok(tEmpEducationService.page(page, Wrappers.query(tEmpEducation)));
}
......@@ -69,7 +78,7 @@ public class TEmpEducationController {
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('archives_tempeducation_get')" )
public R getById(@PathVariable("id" ) Long id) {
public R<TEmpEducation> getById(@PathVariable("id" ) Long id) {
return R.ok(tEmpEducationService.getById(id));
}
......@@ -82,7 +91,7 @@ public class TEmpEducationController {
@SysLog("新增员工学历信息表" )
@PostMapping
@PreAuthorize("@pms.hasPermission('archives_tempeducation_add')" )
public R save(@RequestBody TEmpEducation tEmpEducation) {
public R<Boolean> save(@RequestBody TEmpEducation tEmpEducation) {
return R.ok(tEmpEducationService.save(tEmpEducation));
}
......@@ -95,7 +104,7 @@ public class TEmpEducationController {
@SysLog("修改员工学历信息表" )
@PutMapping
@PreAuthorize("@pms.hasPermission('archives_tempeducation_edit')" )
public R updateById(@RequestBody TEmpEducation tEmpEducation) {
public R<Boolean> updateById(@RequestBody TEmpEducation tEmpEducation) {
return R.ok(tEmpEducationService.updateById(tEmpEducation));
}
......@@ -108,8 +117,39 @@ public class TEmpEducationController {
@SysLog("通过id删除员工学历信息表" )
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('archives_tempeducation_del')" )
public R removeById(@PathVariable Long id) {
public R<Boolean> removeById(@PathVariable Long id) {
return R.ok(tEmpEducationService.removeById(id));
}
/**
* 通过id删除员工学历信息表
* @param ids
* @return R
*/
@Operation(summary = "通过id删除员工学历信息表", description = "通过id删除员工学历息表 @pms.hasPermission('archives_education_del_batch')")
@SysLog("通过id删除员工学历信息表" )
@DeleteMapping("/removeByIds" )
@PreAuthorize("@pms.hasPermission('archives_education_del_batch')" )
public R<Boolean> removeByIds(String ids) {
List<String> idList = null;
if (Common.isNotNull(ids)){
idList = Common.initStrToList(ids, CommonConstants.COMMA_STRING);
}
return R.ok(tEmpEducationService.removeByIds(idList));
}
/**
* 批量新增员工学历信息
*
* @param excelVOList
* @return
* @Author fxj
* @Date 2019-08-16
**/
@Operation(description = "批量新增员工学历信息 hasPermission('archives_education_importListAdd')")
@SysLog("批量新增员工学历信息")
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('archives_education_importListAdd')")
public R<List<ErrorMessage>> batchAddByJsonString(@RequestExcel List<EmpEducationExcelVO> excelVOList, BindingResult bindingResult) {
return tEmpEducationService.importEmpEducation(excelVOList, bindingResult);
}
}
......@@ -51,7 +51,6 @@ import java.util.List;
@RequiredArgsConstructor
@RequestMapping("/tempfamily" )
@Tag(name = "员工家庭信息表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TEmpFamilyController {
private final TEmpFamilyService tEmpFamilyService;
......
......@@ -42,7 +42,6 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/tempprofessionalqualification" )
@Tag(name = "员工职业资格信息表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TEmpProfessionalQualificationController {
private final TEmpProfessionalQualificationService tEmpProfessionalQualificationService;
......
......@@ -24,7 +24,6 @@ import com.pig4cloud.plugin.excel.annotation.RequestExcel;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpWorkRecording;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpWorkRecordingService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpFamilyExcelVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpWorkRecordExcelVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
......@@ -52,7 +51,6 @@ import java.util.List;
@RequiredArgsConstructor
@RequestMapping("/tempworkrecording" )
@Tag(name = "员工工作履历信息表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TEmpWorkRecordingController {
private final TEmpWorkRecordingService tEmpWorkRecordingService;
......@@ -127,8 +125,8 @@ public class TEmpWorkRecordingController {
* @param ids
* @return R
*/
@Operation(summary = "通过id删除员工家庭信息表", description = "通过id删除员工家庭信息表 @pms.hasPermission('archives_tempworkrecording_del_batch')")
@SysLog("通过id删除员工家庭信息表" )
@Operation(summary = "通过id删除员工家庭信息表", description = "通过id删除员工工作信息表 @pms.hasPermission('archives_tempworkrecording_del_batch')")
@SysLog("通过id删除员工家工作息表" )
@DeleteMapping("/removeByIds" )
@PreAuthorize("@pms.hasPermission('archives_tempworkrecording_del_batch')" )
public R<Boolean> removeByIds(String ids) {
......@@ -147,11 +145,11 @@ public class TEmpWorkRecordingController {
* @Author fxj
* @Date 2019-08-16
**/
@Operation(description = "批量新增员工家庭信息 hasPermission('archives_tempworkrecording_importListAdd')")
@Operation(description = "批量新增员工工作信息 hasPermission('archives_tempworkrecording_importListAdd')")
@SysLog("批量新增员工工作信息")
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('archives_tempworkrecording_importListAdd')")
public R<List<ErrorMessage>> batchAddByJsonString(@RequestExcel List<EmpWorkRecordExcelVO> excelVOList, BindingResult bindingResult) {
return tEmpWorkRecordingService.importEmpFamilys(excelVOList, bindingResult);
return tEmpWorkRecordingService.importEmpWorkRecord(excelVOList, bindingResult);
}
}
......@@ -43,7 +43,6 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/temployeeinfo")
@Tag(name = "人员档案表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TEmployeeInfoController {
private final TEmployeeInfoService tEmployeeInfoService;
......
......@@ -43,7 +43,6 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/temployeelog")
@Tag(name = "档案变更日志表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TEmployeeLogController {
private final TEmployeeLogService tEmployeeLogService;
......
......@@ -42,7 +42,6 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/temployeeproject" )
@Tag(name = "项目档案表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TEmployeeProjectController {
private final TEmployeeProjectService tEmployeeProjectService;
......
......@@ -43,7 +43,6 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/tsettledomain")
@Tag(name = "结算主体表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TSettleDomainController {
private final TSettleDomainService tSettleDomainService;
......
......@@ -18,7 +18,13 @@
package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationExcelVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import org.springframework.validation.BindingResult;
import java.util.List;
/**
* 员工学历信息表
......@@ -28,4 +34,5 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation;
*/
public interface TEmpEducationService extends IService<TEmpEducation> {
R<List<ErrorMessage>> importEmpEducation(List<EmpEducationExcelVO> excelVOList, BindingResult bindingResult);
}
......@@ -34,5 +34,5 @@ import java.util.List;
*/
public interface TEmpWorkRecordingService extends IService<TEmpWorkRecording> {
R<List<ErrorMessage>> importEmpFamilys(List<EmpWorkRecordExcelVO> excelVOList, BindingResult bindingResult);
R<List<ErrorMessage>> importEmpWorkRecord(List<EmpWorkRecordExcelVO> excelVOList, BindingResult bindingResult);
}
......@@ -17,10 +17,16 @@
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpEducationMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpEducationService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationExcelVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import org.springframework.stereotype.Service;
import org.springframework.validation.BindingResult;
import java.util.List;
/**
* 员工学历信息表
......@@ -31,4 +37,8 @@ import org.springframework.stereotype.Service;
@Service
public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, TEmpEducation> implements TEmpEducationService {
@Override
public R<List<ErrorMessage>> importEmpEducation(List<EmpEducationExcelVO> excelVOList, BindingResult bindingResult) {
return null;
}
}
......@@ -51,7 +51,7 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
private final TEmployeeInfoMapper employeeInfoMapper;
@Override
public R<List<ErrorMessage>> importEmpFamilys(List<EmpWorkRecordExcelVO> excelVOList, BindingResult bindingResult) {
public R<List<ErrorMessage>> importEmpWorkRecord(List<EmpWorkRecordExcelVO> excelVOList, BindingResult bindingResult) {
// 通用校验获取失败的数据
List<ErrorMessage> errorMessageList = (List<ErrorMessage>) bindingResult.getTarget();
Map<Long,ErrorMessage> errorMsgMap = new HashMap<>();
......
......@@ -14,7 +14,7 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
url: jdbc:mysql://192.168.1.65:22306/mvp_archives?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
......
......@@ -15,4 +15,4 @@ spring:
username: root
password: yf_zsk
#url: jdbc:mysql://127.0.0.1:3306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
url: jdbc:mysql://192.168.1.65:22306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
\ No newline at end of file
url: jdbc:mysql://192.168.1.65:22306/mvp_archives?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
\ No newline at end of file
......@@ -34,7 +34,7 @@
<result property="gradutionDate" column="GRADUTION_DATE"/>
<result property="school" column="SCHOOL"/>
<result property="educationSystem" column="EDUCATION_SYSTEM"/>
<result property="hightIdentification" column="HIGHT_IDENTIFICATION"/>
<result property="highIdentification" column="HIGH_IDENTIFICATION"/>
<result property="type" column="TYPE"/>
<result property="collageSystem" column="COLLAGE_SYSTEM"/>
<result property="deleteFlag" column="DELETE_FLAG"/>
......@@ -45,5 +45,7 @@
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="remark" column="REMARK"/>
<result property="certificationName" column="CERTIFICATION_NAME"/>
</resultMap>
</mapper>
......@@ -12,6 +12,7 @@ import com.aliyun.oss.model.PutObjectRequest;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.bean.OSSObjectBean;
import lombok.Data;
import lombok.experimental.UtilityClass;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
......
......@@ -3,4 +3,5 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.common.core.config.RedisTemplateConfiguration,\
com.yifu.cloud.plus.v1.yifu.common.core.config.RestTemplateConfiguration,\
com.yifu.cloud.plus.v1.yifu.common.core.util.SpringContextHolder,\
com.yifu.cloud.plus.v1.yifu.common.core.config.WebMvcConfiguration
com.yifu.cloud.plus.v1.yifu.common.core.config.WebMvcConfiguration,\
com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil
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