| | |
| | | @Primary |
| | | public DefaultTokenServices defaultTokenServices() { |
| | | DefaultTokenServices tokenServices = new DefaultTokenServices(); |
| | | |
| | | tokenServices.setTokenStore(tokenStore()); |
| | | tokenServices.setSupportRefreshToken(true); |
| | | tokenServices.setClientDetailsService(redisClientDetailsService); |
| | |
| | | */ |
| | | public interface FebsConstant { |
| | | |
| | | Integer REDIS_PAST_DUE_DAY = 60 * 60 * 24; |
| | | |
| | | Integer REDIS_PAST_DUE_HOUR = 60 * 24; |
| | | |
| | | /** |
| | | * 排序规则:降序 |
| | | */ |
| | |
| | | if (file.getSize() <= 0) { |
| | | throw new FebsException("上传的文件大小需要大于0kb"); |
| | | } |
| | | if (file.getSize() > 50 * 1024* 1024) { |
| | | throw new FebsException("上传的文件大于50M"); |
| | | if (file.getSize() > 200 * 1024* 1024) { |
| | | throw new FebsException("上传的文件大于200M"); |
| | | } |
| | | if (!FileUtil.exist(uploadPpath)) { |
| | | FileUtil.mkdir(uploadPpath); |
| | |
| | | public interface EmpAccessoryMapper extends BaseMapper<EmpAccessory> { |
| | | |
| | | |
| | | @Select("${sql} ${ew.customSqlSegment}") |
| | | |
| | | IPage<Map<String,Object>> selectPageVo(Page<?> page, @Param(Constants.WRAPPER) Wrapper wrapper, @Param("sql") String sql); |
| | | |
| | | String getQuerySql(); |
| | |
| | | <mapper namespace="cc.mrbird.febs.server.hr.mapper.EmpAccessoryMapper"> |
| | | |
| | | <select id="getQuerySql" resultType="java.lang.String"> |
| | | select CONCAT('select a.delFlag,a.empName,a.empId,a.empNumb,a.age,a.archivesStatus,a.sex,a.insuranceType,a.politics,a.education,a.entryDate,a.certificateNumb, |
| | | (select dept_Name from t_dept as dept where dept.dept_Id= a.deptId) as deptName,a.jobName,',(SELECT |
| | | select CONCAT(',',(SELECT |
| | | GROUP_CONCAT(DISTINCT |
| | | CONCAT( |
| | | '(SELECT COUNT(1) FROM t_emp_accessory accessory inner join t_label label where label.labelId=accessory.labelId and accessory.delFlag = 0 and label.delFlag = 0 and a.empId = accessory.empId and label.labelCode = ''',label.labelCode,''') AS ''', |
| | | label.labelCode, '''' |
| | | ) |
| | | ) |
| | | FROM t_label label where label.delFlag = 0 order by label.sort),' from t_emp_baseinfo a') as querySql |
| | | FROM t_label label where label.delFlag = 0 order by label.sort)) as querySql |
| | | </select> |
| | | <select id="selectPageVo" resultType="java.util.Map"> |
| | | select a.delFlag,a.empName,a.empStatus,a.empId,a.empNumb,a.age,a.archivesStatus,a.sex,a.insuranceType,a.politics,a.education,a.entryDate,a.certificateNumb, |
| | | (select dept_Name from t_dept as dept where dept.dept_Id= a.deptId) as deptName,a.jobName ${sql} from t_emp_baseinfo a ${ew.customSqlSegment} |
| | | </select> |
| | | </mapper> |
| | |
| | | package cc.mrbird.febs.server.hr.runner; |
| | | |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.server.hr.properties.FebsServerHrProperties; |
| | | import cn.hutool.core.io.FileUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | |
| | | |
| | | private final ConfigurableApplicationContext context; |
| | | private final Environment environment; |
| | | |
| | | private final FebsServerHrProperties properties; |
| | | @Override |
| | | public void run(ApplicationArguments args) { |
| | | if (context.isActive()) { |
| | | FebsUtil.printSystemUpBanner(environment); |
| | | } |
| | | if (! FileUtil.exist( properties.getEmpBaseInfoPath())){ |
| | | FileUtil.mkdir( properties.getEmpBaseInfoPath()); |
| | | } |
| | | } |
| | | } |
| | |
| | | import cn.hutool.core.util.ZipUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import org.aspectj.weaver.ast.Or; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> findEmpAccessorys(QueryRequest request, EmpAccessoryVO vo) { |
| | | QueryWrapper<EmpAccessoryVO> queryWrapper = new QueryWrapper<>(); |
| | | QueryWrapper<EmpAccessoryVO> queryWrapper = new QueryWrapper<>(); |
| | | if (StrUtil.isNotBlank(vo.getBasic())) { |
| | | queryWrapper.like("a.empNumb", vo.getBasic()).or().like("a.deptName", vo.getBasic()).or().like("a.certificateNumb", vo.getBasic()).or().like("a.certificateNumb", vo.getBasic()).or().like("a.jobName", vo.getBasic()); |
| | | } |
| | | if (StrUtil.isNotBlank(vo.getEmpName())) { |
| | | queryWrapper.like("a.empName", vo.getEmpName()); |
| | | } |
| | |
| | | if (StrUtil.isNotBlank(vo.getPolitics())) { |
| | | queryWrapper.in("a.politics", vo.getPolitics()); |
| | | } |
| | | if (StrUtil.isNotBlank(vo.getEmpStatus())) { |
| | | queryWrapper.in("a.empStatus", vo.getEmpStatus()); |
| | | } |
| | | queryWrapper.eq("a.delFlag", 0); |
| | | Page<EmpAccessory> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | String querySql = empAccessoryMapper.getQuerySql(); |
| | |
| | | private String age; |
| | | private String archivesStatus; |
| | | private String insuranceType; |
| | | private String basic; |
| | | private String empStatus; |
| | | } |