Merge branch 'lybDevelop'
| | |
| | | **/spy.log |
| | | */.DS_Store |
| | | /.txlcn/ |
| | | /febs-server/febs-server-hr/Users/work/mavenRepository/ |
| | | /febs-cloud/Users/work/mavenRepository/ |
| | |
| | | </dependencies> |
| | | |
| | | <build> |
| | | |
| | | <resources> |
| | | <resource> |
| | | <directory>src/main/java</directory> |
| | | <includes> |
| | | <include>**/*.xml</include> |
| | | </includes> |
| | | <filtering>false</filtering> |
| | | </resource> |
| | | </resources> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| New file |
| | |
| | | package cc.mrbird.febs.server.hr.controller; |
| | | |
| | | import cc.mrbird.febs.common.core.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.exception.FebsException; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.server.hr.entity.Label; |
| | | import cc.mrbird.febs.server.hr.service.ILabelService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 标签 Controller |
| | | * |
| | | * @author yz |
| | | * @date 2021-02-17 22:18:51 |
| | | */ |
| | | @Slf4j |
| | | @Validated |
| | | @RestController |
| | | @RequestMapping("label") |
| | | @RequiredArgsConstructor |
| | | public class LabelController { |
| | | |
| | | private final ILabelService labelService; |
| | | |
| | | @GetMapping |
| | | @PreAuthorize("hasAuthority('label:list')") |
| | | public FebsResponse getAllLabels(Label label) { |
| | | return new FebsResponse().data(labelService.findLabels(label)); |
| | | } |
| | | |
| | | @GetMapping("list") |
| | | @PreAuthorize("hasAuthority('label:list')") |
| | | public FebsResponse labelList(QueryRequest request, Label label) { |
| | | Map<String, Object> dataTable = FebsUtil.getDataTable(this.labelService.findLabels(request, label)); |
| | | return new FebsResponse().data(dataTable); |
| | | } |
| | | |
| | | @PostMapping |
| | | @PreAuthorize("hasAuthority('label:add')") |
| | | public void addLabel(@Valid Label label) throws FebsException { |
| | | try { |
| | | this.labelService.createLabel(label); |
| | | } catch (Exception e) { |
| | | String message = "新增Label失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @PreAuthorize("hasAuthority('label:delete')") |
| | | public void deleteLabel(Label label) throws FebsException { |
| | | try { |
| | | this.labelService.deleteLabel(label); |
| | | } catch (Exception e) { |
| | | String message = "删除Label失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | |
| | | @PutMapping |
| | | @PreAuthorize("hasAuthority('label:update')") |
| | | public void updateLabel(Label label) throws FebsException { |
| | | try { |
| | | this.labelService.updateLabel(label); |
| | | } catch (Exception e) { |
| | | String message = "修改Label失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | } |
| | |
| | | */ |
| | | @TableField("empId") |
| | | private Long empid; |
| | | /** |
| | | * 文件存储地址 |
| | | */ |
| | | @TableField("filesAddress") |
| | | private String filesaddress; |
| | | |
| | | /** |
| | | * 工伤数量 |
| | | * 文件格式 |
| | | */ |
| | | @TableField("lz") |
| | | private Integer lz; |
| | | @TableField("filesFormat") |
| | | private String filesformat; |
| | | |
| | | /** |
| | | * 劳资数量 |
| | | * 文件名称 |
| | | */ |
| | | @TableField("gz") |
| | | private Integer gz; |
| | | @TableField("filesName") |
| | | private String filesname; |
| | | |
| | | /** |
| | | * 回执数量 |
| | | * 文件夹ID |
| | | */ |
| | | @TableField("hz") |
| | | private Integer hz; |
| | | @TableField("labelId") |
| | | private Long labelid; |
| | | |
| | | /** |
| | | * 截图记录数量 |
| | | */ |
| | | @TableField("jljt") |
| | | private Integer jljt; |
| | | |
| | | /** |
| | | * 劳动合同数量 |
| | | */ |
| | | @TableField("ldht") |
| | | private Integer ldht; |
| | | |
| | | /** |
| | | * 离职手续数量 |
| | | */ |
| | | @TableField("lzsx") |
| | | private Integer lzsx; |
| | | |
| | | /** |
| | | * 记录最后更新人 |
| | | */ |
| | | @TableField("modifier") |
| | | private String modifier; |
| | | |
| | | /** |
| | | * 记录最后更新时间 |
| | | */ |
| | | @TableField("modifyTime") |
| | | private Date modifytime; |
| | | |
| | | /** |
| | | * 请假数量 |
| | | */ |
| | | @TableField("qj") |
| | | private Integer qj; |
| | | |
| | | /** |
| | | * 入职表数量 |
| | | */ |
| | | @TableField("rzb") |
| | | private Integer rzb; |
| | | |
| | | /** |
| | | * 社保数量 |
| | | */ |
| | | @TableField("sb") |
| | | private Integer sb; |
| | | |
| | | /** |
| | | * 身份证数量 |
| | | */ |
| | | @TableField("sfz") |
| | | private Integer sfz; |
| | | |
| | | /** |
| | | * 失业金数量 |
| | | */ |
| | | @TableField("syj") |
| | | private Integer syj; |
| | | |
| | | /** |
| | | * 记录版本号,用来进行乐观锁控制 |
| | | */ |
| | | @TableField("version") |
| | | private Integer version; |
| | | |
| | | /** |
| | | * 相关合同数量 |
| | | */ |
| | | @TableField("xght") |
| | | private Integer xght; |
| | | |
| | | /** |
| | | * 相关证件数量 |
| | | */ |
| | | @TableField("xgzj") |
| | | private Integer xgzj; |
| | | |
| | | /** |
| | | * 银行卡数量 |
| | | */ |
| | | @TableField("yhk") |
| | | private Integer yhk; |
| | | |
| | | /** |
| | | * 意外险数量 |
| | | */ |
| | | @TableField("ywx") |
| | | private Integer ywx; |
| | | |
| | | /** |
| | | * 自离数量 |
| | | */ |
| | | @TableField("zl") |
| | | private Integer zl; |
| | | |
| | | /** |
| | | * 照片数量 |
| | | */ |
| | | @TableField("zp") |
| | | private Integer zp; |
| | | |
| | | /** |
| | | * 体检表数量 |
| | | */ |
| | | @TableField("tjb") |
| | | private Integer tjb; |
| | | |
| | | } |
| | |
| | | @TableField("empName") |
| | | private String empName = ""; |
| | | |
| | | @FieldInfo(name = "empStatus", type = "varchar", explain = "员工状态") |
| | | @TableField("empStatus") |
| | | private String empStatus = ""; |
| | | |
| | | @FieldInfo(name = "sex", type = "varchar", explain = "性别码") |
| | | @TableField("sex") |
| | | private String sex = ""; |
| | |
| | | @Version |
| | | private Integer version = 0; |
| | | |
| | | @TableField(exist = false) |
| | | private String injuredTimeStr; |
| | | |
| | | @TableField(exist = false) |
| | | private String hrDoDateStr; |
| | | } |
| | |
| | | @FieldInfo(name = "remark", type = "varchar", explain = "备注") |
| | | @TableField("remark") |
| | | private String remark = ""; |
| | | |
| | | @TableField(exist = false) |
| | | private String badDateStr= ""; |
| | | |
| | | } |
| | |
| | | @TableField("empName") |
| | | private String empName = ""; |
| | | |
| | | @FieldInfo(name = "empStatus", type = "varchar", explain = "员工状态") |
| | | @TableField("empStatus") |
| | | private String empStatus = ""; |
| | | |
| | | @FieldInfo(name = "sex", type = "varchar", explain = "性别码") |
| | | @TableField("sex") |
| | | private String sex = ""; |
| | |
| | | @TableField("remark") |
| | | private String remark = ""; |
| | | |
| | | @TableField(exist = false) |
| | | private String applayDateStr; |
| | | |
| | | } |
| | |
| | | @TableField("empName") |
| | | private String empName = ""; |
| | | |
| | | @FieldInfo(name = "empStatus", type = "varchar", explain = "员工状态") |
| | | @TableField("empStatus") |
| | | private String empStatus = ""; |
| | | |
| | | @FieldInfo(name = "sex", type = "varchar", explain = "性别码") |
| | | @TableField("sex") |
| | | private String sex = ""; |
| | |
| | | @TableField("remark") |
| | | private String remark = ""; |
| | | |
| | | @TableField(exist = false) |
| | | private String arbitrationDateStr= ""; |
| | | |
| | | @TableField(exist = false) |
| | | private String settleDateStr= ""; |
| | | |
| | | } |
| | |
| | | @TableField("empName") |
| | | private String empName = ""; |
| | | |
| | | @FieldInfo(name = "empStatus", type = "varchar", explain = "员工状态") |
| | | @TableField("empStatus") |
| | | private String empStatus = ""; |
| | | |
| | | @FieldInfo(name = "sex", type = "varchar", explain = "性别码") |
| | | @TableField("sex") |
| | | private String sex = ""; |
| | |
| | | @TableField("remark") |
| | | private String remark = ""; |
| | | |
| | | @TableField(exist = false) |
| | | private String hrDoDateStr= ""; |
| | | |
| | | @TableField(exist = false) |
| | | private String injuredTimeStr= ""; |
| | | |
| | | } |
| | |
| | | @TableField("version") |
| | | @Version |
| | | private Integer version = 0; |
| | | |
| | | @TableField(exist = false) |
| | | private String remarkDateStr= ""; |
| | | |
| | | } |
| | |
| | | @TableField("remark") |
| | | private String remark = ""; |
| | | |
| | | @TableField(exist = false) |
| | | private String applayDateStr; |
| | | } |
| | |
| | | @TableField("version") |
| | | @Version |
| | | private Integer version = 0; |
| | | |
| | | @TableField(exist = false) |
| | | private String applayDateStr; |
| | | |
| | | } |
| New file |
| | |
| | | package cc.mrbird.febs.server.hr.entity; |
| | | |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | /** |
| | | * 标签 Entity |
| | | * |
| | | * @author yz |
| | | * @date 2021-02-17 22:18:51 |
| | | */ |
| | | @Data |
| | | @TableName("t_label") |
| | | public class Label { |
| | | |
| | | /** |
| | | * 记录状态 0-正常 1-删除 2-暂存 |
| | | */ |
| | | @TableField("delFlag") |
| | | private Integer delFlag = 0; |
| | | /** |
| | | * 记录版本号,用来进行乐观锁控制 |
| | | */ |
| | | @TableField("version") |
| | | private Integer version; |
| | | |
| | | /** |
| | | * 记录创建时间 |
| | | */ |
| | | @TableField("createTime") |
| | | private Date createtime; |
| | | |
| | | /** |
| | | * 记录创建人 |
| | | */ |
| | | @TableField("creator") |
| | | private String creator; |
| | | |
| | | /** |
| | | * 记录最后更新时间 |
| | | */ |
| | | @TableField("modifyTime") |
| | | private Date modifytime; |
| | | |
| | | /** |
| | | * 记录最后更新人 |
| | | */ |
| | | @TableField("modifier") |
| | | private String modifier; |
| | | |
| | | /** |
| | | * id |
| | | */ |
| | | @TableId(value = "labelId") |
| | | private Long labelid; |
| | | |
| | | /** |
| | | * 标签名称 |
| | | */ |
| | | @TableField("labelName") |
| | | private String labelname; |
| | | /** |
| | | * 标签名称 |
| | | */ |
| | | @TableField("labelCode") |
| | | private String labelcode; |
| | | |
| | | /** |
| | | * 标签显示顺序 |
| | | */ |
| | | @TableField("sort") |
| | | private Integer sort; |
| | | |
| | | } |
| | |
| | | public interface EmpAccessoryMapper extends BaseMapper<EmpAccessory> { |
| | | |
| | | |
| | | @Select("select * from (select 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,b.jljt,b.zp,b.ldht,b.sfz,b.rzb,b.tjb,b.hz,b.yhk,b.xgzj,b.xght,b.qj,b.cf,b.czsq,b.lzsx,b.zl,b.sb,b.syj,b.ywx,b.gs,b.lz from t_emp_baseinfo a left join t_emp_accessory b on a.empId = b.empId where a.delFlag = 0) a ${ew.customSqlSegment}") |
| | | IPage<Map<String,Object>> selectPageVo(Page<?> page, @Param(Constants.WRAPPER) Wrapper wrapper); |
| | | @Select("${sql} ${ew.customSqlSegment}") |
| | | IPage<Map<String,Object>> selectPageVo(Page<?> page, @Param(Constants.WRAPPER) Wrapper wrapper, @Param("sql") String sql); |
| | | |
| | | String getQuerySql(); |
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cc.mrbird.febs.server.generator.gen.mapper.EmpAccessoryMapper"> |
| | | <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 |
| | | 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) AS ''', |
| | | label.labelCode, '''' |
| | | ) |
| | | ) |
| | | FROM t_label label order by label.sort),' from t_emp_baseinfo a') as querySql |
| | | </select> |
| | | </mapper> |
| New file |
| | |
| | | package cc.mrbird.febs.server.hr.mapper; |
| | | |
| | | import cc.mrbird.febs.server.hr.entity.Label; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * 标签 Mapper |
| | | * |
| | | * @author yz |
| | | * @date 2021-02-17 22:18:51 |
| | | */ |
| | | public interface LabelMapper extends BaseMapper<Label> { |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cc.mrbird.febs.server.hr.mapper.LabelMapper"> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package cc.mrbird.febs.server.hr.service; |
| | | |
| | | |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.server.hr.entity.Label; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 标签 Service接口 |
| | | * |
| | | * @author yz |
| | | * @date 2021-02-17 22:18:51 |
| | | */ |
| | | public interface ILabelService extends IService<Label> { |
| | | /** |
| | | * 查询(分页) |
| | | * |
| | | * @param request QueryRequest |
| | | * @param label label |
| | | * @return IPage<Label> |
| | | */ |
| | | IPage<Label> findLabels(QueryRequest request, Label label); |
| | | |
| | | /** |
| | | * 查询(所有) |
| | | * |
| | | * @param label label |
| | | * @return List<Label> |
| | | */ |
| | | List<Label> findLabels(Label label); |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param label label |
| | | */ |
| | | void createLabel(Label label); |
| | | |
| | | /** |
| | | * 修改 |
| | | * |
| | | * @param label label |
| | | */ |
| | | void updateLabel(Label label); |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param label label |
| | | */ |
| | | void deleteLabel(Label label); |
| | | } |
| | |
| | | queryWrapper.eq("a.politics", vo.getPolitics()); |
| | | } |
| | | } |
| | | queryWrapper.eq("a.delFlag",0); |
| | | Page<EmpAccessory> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return empAccessoryMapper.selectPageVo(page, queryWrapper); |
| | | String querySql = empAccessoryMapper.getQuerySql(); |
| | | return empAccessoryMapper.selectPageVo(page, queryWrapper,querySql); |
| | | } |
| | | |
| | | @Override |
| | |
| | | package cc.mrbird.febs.server.hr.service.impl; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.server.hr.entity.EmpAccidentCases; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpAccidentCasesMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpAccidentCasesService; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | |
| | | import java.util.*; |
| | | import cc.mrbird.febs.server.hr.entity.EmpAccidentCases; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpAccidentCasesMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpAccidentCasesService; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | /** |
| | | * name:EmpAccidentcases |
| | | * package:cc.mrbird.febs.server.hr.controller |
| | | * name:EmpAccidentcases package:cc.mrbird.febs.server.hr.controller |
| | | * description:员工意外险案件服务接口实现 |
| | | * |
| | | * @author luoyibo |
| | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) |
| | | class EmpAccidentCasesServiceImpl extends ServiceImpl<EmpAccidentCasesMapper, EmpAccidentCases> implements IEmpAccidentCasesService { |
| | | class EmpAccidentCasesServiceImpl extends ServiceImpl<EmpAccidentCasesMapper, EmpAccidentCases> |
| | | implements IEmpAccidentCasesService { |
| | | |
| | | private final EmpAccidentCasesMapper empAccidentcasesMapper; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()).map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | | |
| | | @Override |
| | | public IPage<EmpAccidentCases> findEmpAccidentcasess(QueryRequest request, EmpAccidentCases empAccidentcases) { |
| | | LambdaQueryWrapper<EmpAccidentCases> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpAccidentCases::getDelFlag, empAccidentcases.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empAccidentcases.getEmpNumb())) { |
| | | queryWrapper.like(EmpAccidentCases::getEmpNumb, empAccidentcases.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empAccidentcases.getEmpName())) { |
| | | queryWrapper.like(EmpAccidentCases::getEmpName, empAccidentcases.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empAccidentcases.getCertificateNumb())) { |
| | | queryWrapper.like(EmpAccidentCases::getCertificateNumb, empAccidentcases.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empAccidentcases.getDeptName())) { |
| | | queryWrapper.like(EmpAccidentCases::getDeptName, empAccidentcases.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empAccidentcases.getInjuredTimeStr())) { |
| | | queryWrapper.between(EmpAccidentCases::getInjuredTime, empAccidentcases.getInjuredTimeStr().split(",")[0], |
| | | empAccidentcases.getInjuredTimeStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empAccidentcases.getHrDoDateStr())) { |
| | | queryWrapper.between(EmpAccidentCases::getHrDoDate, empAccidentcases.getHrDoDateStr().split(",")[0], |
| | | empAccidentcases.getHrDoDateStr().split(",")[1]); |
| | | } |
| | | if (empAccidentcases.getHospitalizatioFlag() != null && empAccidentcases.getHospitalizatioFlag() != 0) { |
| | | queryWrapper.eq(EmpAccidentCases::getHospitalizatioFlag, empAccidentcases.getHospitalizatioFlag()); |
| | | } |
| | | if (empAccidentcases.getSettleStatus() != null && empAccidentcases.getSettleStatus() != 0) { |
| | | queryWrapper.eq(EmpAccidentCases::getSettleStatus, empAccidentcases.getSettleStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empAccidentcases.getEmpStatus())) { |
| | | queryWrapper.eq(EmpAccidentCases::getEmpStatus, empAccidentcases.getEmpStatus()); |
| | | } |
| | | Page<EmpAccidentCases> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.page(page, queryWrapper); |
| | | } |
| | |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.server.hr.entity.EmpBadRecord; |
| | | import cc.mrbird.febs.server.hr.entity.EmpBadRecord; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpBadRecordMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBadRecordService; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | |
| | | public IPage<EmpBadRecord> findEmpBadrecords(QueryRequest request, EmpBadRecord empBadrecord) { |
| | | LambdaQueryWrapper<EmpBadRecord> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpBadRecord::getDelFlag, empBadrecord.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empBadrecord.getEmpNumb())) { |
| | | queryWrapper.like(EmpBadRecord::getEmpNumb, empBadrecord.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empBadrecord.getEmpName())) { |
| | | queryWrapper.like(EmpBadRecord::getEmpName, empBadrecord.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empBadrecord.getCertificateNumb())) { |
| | | queryWrapper.like(EmpBadRecord::getCertificateNumb, empBadrecord.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empBadrecord.getDeptName())) { |
| | | queryWrapper.like(EmpBadRecord::getDeptName, empBadrecord.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empBadrecord.getBadDateStr())) { |
| | | queryWrapper.between(EmpBadRecord::getBadDate, empBadrecord.getBadDateStr().split(",")[0], |
| | | empBadrecord.getBadDateStr().split(",")[1]); |
| | | } |
| | | Page<EmpBadRecord> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.page(page, queryWrapper); |
| | | } |
| | |
| | | LambdaQueryWrapper<EmpBaseInfo> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpBaseInfo::getDelFlag, empBaseInfo.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empBaseInfo.getEmpNumb())) { |
| | | queryWrapper.eq(EmpBaseInfo::getEmpNumb, empBaseInfo.getEmpNumb()); |
| | | queryWrapper.like(EmpBaseInfo::getEmpNumb, empBaseInfo.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empBaseInfo.getEmpName())) { |
| | | queryWrapper.eq(EmpBaseInfo::getEmpName, empBaseInfo.getEmpName()); |
| | | queryWrapper.like(EmpBaseInfo::getEmpName, empBaseInfo.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empBaseInfo.getCertificateNumb())) { |
| | | queryWrapper.eq(EmpBaseInfo::getCertificateNumb, empBaseInfo.getCertificateNumb()); |
| | | queryWrapper.like(EmpBaseInfo::getCertificateNumb, empBaseInfo.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empBaseInfo.getDeptName())) { |
| | | queryWrapper.eq(EmpBaseInfo::getDeptName, empBaseInfo.getDeptName()); |
| | | queryWrapper.like(EmpBaseInfo::getDeptName, empBaseInfo.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empBaseInfo.getEntryDateStr())) { |
| | | queryWrapper.between(EmpBaseInfo::getEntryDate, empBaseInfo.getEntryDateStr().split(",")[0], empBaseInfo.getEntryDateStr().split(",")[1]); |
| | |
| | | queryWrapper.eq(EmpBaseInfo::getSex, empBaseInfo.getSex()); |
| | | } |
| | | if (StringUtils.isNotBlank(empBaseInfo.getEducation())) { |
| | | queryWrapper.eq(EmpBaseInfo::getEducation, empBaseInfo.getEducation()); |
| | | queryWrapper.like(EmpBaseInfo::getEducation, empBaseInfo.getEducation()); |
| | | } |
| | | if (StringUtils.isNotBlank(empBaseInfo.getPolitics())) { |
| | | queryWrapper.eq(EmpBaseInfo::getPolitics, empBaseInfo.getPolitics()); |
| | | queryWrapper.like(EmpBaseInfo::getPolitics, empBaseInfo.getPolitics()); |
| | | } |
| | | if (StringUtils.isNotBlank(empBaseInfo.getAgeStr())) { |
| | | queryWrapper.between(EmpBaseInfo::getAge, empBaseInfo.getAgeStr().split(",")[0], empBaseInfo.getAgeStr().split(",")[1]); |
| | |
| | | if (StringUtils.isNotBlank(empBaseInfo.getEmpStatus())) { |
| | | queryWrapper.eq(EmpBaseInfo::getEmpStatus, empBaseInfo.getEmpStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empBaseInfo.getHandbookStatus())) { |
| | | queryWrapper.eq(EmpBaseInfo::getHandbookStatus, empBaseInfo.getHandbookStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empBaseInfo.getEmpCardStatus())) { |
| | | queryWrapper.eq(EmpBaseInfo::getEmpCardStatus, empBaseInfo.getEmpCardStatus()); |
| | | } |
| | | Page<EmpBaseInfo> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | IPage<EmpBaseInfo> iPage = this.page(page, queryWrapper); |
| | | //设置部门 |
| | |
| | | LambdaQueryWrapper<EmpContractInfo> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpContractInfo::getDelFlag, empContractinfo.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empContractinfo.getEmpNumb())) { |
| | | queryWrapper.eq(EmpContractInfo::getEmpNumb, empContractinfo.getEmpNumb()); |
| | | queryWrapper.like(EmpContractInfo::getEmpNumb, empContractinfo.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empContractinfo.getEmpName())) { |
| | | queryWrapper.eq(EmpContractInfo::getEmpName, empContractinfo.getEmpName()); |
| | | queryWrapper.like(EmpContractInfo::getEmpName, empContractinfo.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empContractinfo.getCertificateNumb())) { |
| | | queryWrapper.eq(EmpContractInfo::getCertificateNumb, empContractinfo.getCertificateNumb()); |
| | | queryWrapper.like(EmpContractInfo::getCertificateNumb, empContractinfo.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empContractinfo.getDeptName())) { |
| | | queryWrapper.eq(EmpContractInfo::getDeptName, empContractinfo.getDeptName()); |
| | | queryWrapper.like(EmpContractInfo::getDeptName, empContractinfo.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empContractinfo.getSigningDateStr())) { |
| | | queryWrapper.between(EmpContractInfo::getSigningDate, empContractinfo.getSigningDateStr().split(",")[0], empContractinfo.getSigningDateStr().split(",")[1]); |
| | |
| | | queryWrapper.between(EmpContractInfo::getEndDate, empContractinfo.getEndDateStr().split(",")[0], empContractinfo.getEndDateStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empContractinfo.getDeptName())) { |
| | | queryWrapper.eq(EmpContractInfo::getEmpStatus, empContractinfo.getEmpStatus()); |
| | | queryWrapper.like(EmpContractInfo::getEmpStatus, empContractinfo.getEmpStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empContractinfo.getContractStatus())) { |
| | | queryWrapper.eq(EmpContractInfo::getContractStatus, empContractinfo.getContractStatus()); |
| | |
| | | LambdaQueryWrapper<EmpDimissionAttend> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpDimissionAttend::getDelFlag, empDimissionattend.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empDimissionattend.getEmpNumb())) { |
| | | queryWrapper.eq(EmpDimissionAttend::getEmpNumb, empDimissionattend.getEmpNumb()); |
| | | queryWrapper.like(EmpDimissionAttend::getEmpNumb, empDimissionattend.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empDimissionattend.getEmpName())) { |
| | | queryWrapper.eq(EmpDimissionAttend::getEmpName, empDimissionattend.getEmpName()); |
| | | queryWrapper.like(EmpDimissionAttend::getEmpName, empDimissionattend.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empDimissionattend.getCertificateNumb())) { |
| | | queryWrapper.eq(EmpDimissionAttend::getCertificateNumb, empDimissionattend.getCertificateNumb()); |
| | | queryWrapper.like(EmpDimissionAttend::getCertificateNumb, empDimissionattend.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empDimissionattend.getDeptName())) { |
| | | queryWrapper.eq(EmpDimissionAttend::getDeptName, empDimissionattend.getDeptName()); |
| | | queryWrapper.like(EmpDimissionAttend::getDeptName, empDimissionattend.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empDimissionattend.getAttendYear())) { |
| | | queryWrapper.eq(EmpDimissionAttend::getAttendYear, empDimissionattend.getAttendYear()); |
| | | queryWrapper.like(EmpDimissionAttend::getAttendYear, empDimissionattend.getAttendYear()); |
| | | } |
| | | if (StringUtils.isNotBlank(empDimissionattend.getAttendMonth())) { |
| | | queryWrapper.eq(EmpDimissionAttend::getAttendMonth, empDimissionattend.getAttendMonth()); |
| | | queryWrapper.like(EmpDimissionAttend::getAttendMonth, empDimissionattend.getAttendMonth()); |
| | | } |
| | | if (StringUtils.isNotBlank(empDimissionattend.getDeductStr())) { |
| | | queryWrapper.eq(EmpDimissionAttend::getDeduct, empDimissionattend.getDeductStr()); |
| | | queryWrapper.like(EmpDimissionAttend::getDeduct, empDimissionattend.getDeductStr()); |
| | | } |
| | | if (StringUtils.isNotBlank(empDimissionattend.getEmpStatus())) { |
| | | queryWrapper.eq(EmpDimissionAttend::getEmpStatus, empDimissionattend.getEmpStatus()); |
| | |
| | | package cc.mrbird.febs.server.hr.service.impl; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.server.hr.entity.EmpBaseInfo; |
| | | import cc.mrbird.febs.server.hr.entity.EmpInsurance; |
| | | import cc.mrbird.febs.server.hr.entity.EmpUnemployment; |
| | | import cc.mrbird.febs.server.hr.entity.EmpInsurance; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpInsuranceMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpInsuranceService; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * name:EmpInsurance |
| | | * package:cc.mrbird.febs.server.hr.controller |
| | | * name:EmpInsurance package:cc.mrbird.febs.server.hr.controller |
| | | * description:员工社保申请服务接口实现 |
| | | * |
| | | * @author luoyibo |
| | |
| | | class EmpInsuranceServiceImpl extends ServiceImpl<EmpInsuranceMapper, EmpInsurance> implements IEmpInsuranceService { |
| | | |
| | | private final EmpInsuranceMapper empInsuranceMapper; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()).map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | | |
| | | @Override |
| | | public IPage<EmpInsurance> findEmpInsurances(QueryRequest request, EmpInsurance empInsurance) { |
| | | LambdaQueryWrapper<EmpInsurance> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpInsurance::getDelFlag, empInsurance.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empInsurance.getEmpNumb())) { |
| | | queryWrapper.like(EmpInsurance::getEmpNumb, empInsurance.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getEmpName())) { |
| | | queryWrapper.like(EmpInsurance::getEmpName, empInsurance.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getCertificateNumb())) { |
| | | queryWrapper.like(EmpInsurance::getCertificateNumb, empInsurance.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getDeptName())) { |
| | | queryWrapper.like(EmpInsurance::getDeptName, empInsurance.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getApplayDateStr())) { |
| | | queryWrapper.between(EmpInsurance::getApplayDate, empInsurance.getApplayDateStr().split(",")[0], |
| | | empInsurance.getApplayDateStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getInsuranceGaers())) { |
| | | queryWrapper.eq(EmpInsurance::getInsuranceGaers, empInsurance.getInsuranceGaers()); |
| | | } |
| | | if (empInsurance.getReportStatus() != null && empInsurance.getReportStatus() != 0) { |
| | | queryWrapper.eq(EmpInsurance::getReportStatus, empInsurance.getReportStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getEmpStatus())) { |
| | | queryWrapper.eq(EmpInsurance::getEmpStatus, empInsurance.getEmpStatus()); |
| | | } |
| | | |
| | | Page<EmpInsurance> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.page(page, queryWrapper); |
| | | } |
| | |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.server.hr.entity.EmpLaborTrouble; |
| | | import cc.mrbird.febs.server.hr.entity.EmpOccupational; |
| | | import cc.mrbird.febs.server.hr.entity.EmpLaborTrouble; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpLaborTroubleMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpLaborTroubleService; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | |
| | | public IPage<EmpLaborTrouble> findEmpLabortroubles(QueryRequest request, EmpLaborTrouble empLabortrouble) { |
| | | LambdaQueryWrapper<EmpLaborTrouble> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpLaborTrouble::getDelFlag, empLabortrouble.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empLabortrouble.getEmpNumb())) { |
| | | queryWrapper.like(EmpLaborTrouble::getEmpNumb, empLabortrouble.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getEmpName())) { |
| | | queryWrapper.like(EmpLaborTrouble::getEmpName, empLabortrouble.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getCertificateNumb())) { |
| | | queryWrapper.like(EmpLaborTrouble::getCertificateNumb, empLabortrouble.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getDeptName())) { |
| | | queryWrapper.like(EmpLaborTrouble::getDeptName, empLabortrouble.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getArbitrationDateStr())) { |
| | | queryWrapper.between(EmpLaborTrouble::getArbitrationDate, empLabortrouble.getArbitrationDateStr().split(",")[0], |
| | | empLabortrouble.getArbitrationDateStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getSettleDateStr())) { |
| | | queryWrapper.between(EmpLaborTrouble::getSettleDate, empLabortrouble.getSettleDateStr().split(",")[0], |
| | | empLabortrouble.getSettleDateStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getArbitrationType())) { |
| | | queryWrapper.eq(EmpLaborTrouble::getArbitrationType, empLabortrouble.getArbitrationType()); |
| | | } |
| | | if (empLabortrouble.getArbitrationStatus() != null && empLabortrouble.getArbitrationStatus() != 0) { |
| | | queryWrapper.eq(EmpLaborTrouble::getArbitrationStatus, empLabortrouble.getArbitrationStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getEmpStatus())) { |
| | | queryWrapper.eq(EmpLaborTrouble::getEmpStatus, empLabortrouble.getEmpStatus()); |
| | | } |
| | | Page<EmpLaborTrouble> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.page(page, queryWrapper); |
| | | } |
| | |
| | | LambdaQueryWrapper<EmpLeaveInfo> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpLeaveInfo::getDelFlag, empLeaveinfo.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empLeaveinfo.getEmpNumb())) { |
| | | queryWrapper.eq(EmpLeaveInfo::getEmpNumb, empLeaveinfo.getEmpNumb()); |
| | | queryWrapper.like(EmpLeaveInfo::getEmpNumb, empLeaveinfo.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLeaveinfo.getEmpName())) { |
| | | queryWrapper.eq(EmpLeaveInfo::getEmpName, empLeaveinfo.getEmpName()); |
| | | queryWrapper.like(EmpLeaveInfo::getEmpName, empLeaveinfo.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLeaveinfo.getCertificateNumb())) { |
| | | queryWrapper.eq(EmpLeaveInfo::getCertificateNumb, empLeaveinfo.getCertificateNumb()); |
| | | queryWrapper.like(EmpLeaveInfo::getCertificateNumb, empLeaveinfo.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLeaveinfo.getDeptName())) { |
| | | queryWrapper.eq(EmpLeaveInfo::getDeptName, empLeaveinfo.getDeptName()); |
| | | queryWrapper.like(EmpLeaveInfo::getDeptName, empLeaveinfo.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLeaveinfo.getEmpStatus())) { |
| | | queryWrapper.eq(EmpLeaveInfo::getEmpStatus, empLeaveinfo.getEmpStatus()); |
| | |
| | | package cc.mrbird.febs.server.hr.service.impl; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.server.hr.entity.EmpOccupational; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpOccupationalMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpOccupationalService; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | |
| | | import java.util.*; |
| | | import cc.mrbird.febs.server.hr.entity.EmpOccupational; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpOccupationalMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpOccupationalService; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | /** |
| | | * name:EmpOccupational |
| | |
| | | public IPage<EmpOccupational> findEmpOccupationals(QueryRequest request, EmpOccupational empOccupational) { |
| | | LambdaQueryWrapper<EmpOccupational> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpOccupational::getDelFlag, empOccupational.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empOccupational.getEmpNumb())) { |
| | | queryWrapper.like(EmpOccupational::getEmpNumb, empOccupational.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empOccupational.getEmpName())) { |
| | | queryWrapper.like(EmpOccupational::getEmpName, empOccupational.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empOccupational.getCertificateNumb())) { |
| | | queryWrapper.like(EmpOccupational::getCertificateNumb, empOccupational.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empOccupational.getDeptName())) { |
| | | queryWrapper.like(EmpOccupational::getDeptName, empOccupational.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empOccupational.getInjuredTimeStr())) { |
| | | queryWrapper.between(EmpOccupational::getInjuredTime, empOccupational.getInjuredTimeStr().split(",")[0], |
| | | empOccupational.getInjuredTimeStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empOccupational.getHrDoDateStr())) { |
| | | queryWrapper.between(EmpOccupational::getHrDoDate, empOccupational.getHrDoDateStr().split(",")[0], |
| | | empOccupational.getHrDoDateStr().split(",")[1]); |
| | | } |
| | | if (empOccupational.getHospitalizatioFlag() != null && empOccupational.getHospitalizatioFlag() != 0) { |
| | | queryWrapper.eq(EmpOccupational::getHospitalizatioFlag, empOccupational.getHospitalizatioFlag()); |
| | | } |
| | | if (empOccupational.getSettleStatus() != null && empOccupational.getSettleStatus() != 0) { |
| | | queryWrapper.eq(EmpOccupational::getSettleStatus, empOccupational.getSettleStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empOccupational.getEmpStatus())) { |
| | | queryWrapper.eq(EmpOccupational::getEmpStatus, empOccupational.getEmpStatus()); |
| | | } |
| | | Page<EmpOccupational> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.page(page, queryWrapper); |
| | | } |
| | |
| | | LambdaQueryWrapper<EmpPhysicalExam> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpPhysicalExam::getDelFlag, empPhysicalexam.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empPhysicalexam.getEmpNumb())) { |
| | | queryWrapper.eq(EmpPhysicalExam::getEmpNumb, empPhysicalexam.getEmpNumb()); |
| | | queryWrapper.like(EmpPhysicalExam::getEmpNumb, empPhysicalexam.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empPhysicalexam.getEmpName())) { |
| | | queryWrapper.eq(EmpPhysicalExam::getEmpName, empPhysicalexam.getEmpName()); |
| | | queryWrapper.like(EmpPhysicalExam::getEmpName, empPhysicalexam.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empPhysicalexam.getCertificateNumb())) { |
| | | queryWrapper.eq(EmpPhysicalExam::getCertificateNumb, empPhysicalexam.getCertificateNumb()); |
| | | queryWrapper.like(EmpPhysicalExam::getCertificateNumb, empPhysicalexam.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empPhysicalexam.getDeptName())) { |
| | | queryWrapper.eq(EmpPhysicalExam::getDeptName, empPhysicalexam.getDeptName()); |
| | | queryWrapper.like(EmpPhysicalExam::getDeptName, empPhysicalexam.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empPhysicalexam.getPhysicalExamDateStr())) { |
| | | queryWrapper.between(EmpPhysicalExam::getPhysicalExamDate, empPhysicalexam.getPhysicalExamDateStr().split(",")[0], empPhysicalexam.getPhysicalExamDateStr().split(",")[1]); |
| | |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.server.hr.entity.EmpRemarkInfo; |
| | | import cc.mrbird.febs.server.hr.entity.EmpRemarkInfo; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpRemarkInfoMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpRemarkinfoService; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | |
| | | public IPage<EmpRemarkInfo> findEmpRemarkinfos(QueryRequest request, EmpRemarkInfo empRemarkinfo) { |
| | | LambdaQueryWrapper<EmpRemarkInfo> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpRemarkInfo::getDelFlag, empRemarkinfo.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empRemarkinfo.getEmpNumb())) { |
| | | queryWrapper.like(EmpRemarkInfo::getEmpNumb, empRemarkinfo.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empRemarkinfo.getEmpName())) { |
| | | queryWrapper.like(EmpRemarkInfo::getEmpName, empRemarkinfo.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empRemarkinfo.getCertificateNumb())) { |
| | | queryWrapper.like(EmpRemarkInfo::getCertificateNumb, empRemarkinfo.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empRemarkinfo.getDeptName())) { |
| | | queryWrapper.like(EmpRemarkInfo::getDeptName, empRemarkinfo.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empRemarkinfo.getRemarkDateStr())) { |
| | | queryWrapper.between(EmpRemarkInfo::getRemarkDate, empRemarkinfo.getRemarkDateStr().split(",")[0], |
| | | empRemarkinfo.getRemarkDateStr().split(",")[1]); |
| | | } |
| | | Page<EmpRemarkInfo> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.page(page, queryWrapper); |
| | | } |
| | |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.server.hr.entity.EmpResign; |
| | | import cc.mrbird.febs.server.hr.entity.EmpResign; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpResignMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpResignService; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | |
| | | LambdaQueryWrapper<EmpResign> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpResign::getDelFlag, empResign.getDelFlag()); |
| | | Page<EmpResign> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | if (StringUtils.isNotBlank(empResign.getEmpNumb())) { |
| | | queryWrapper.like(EmpResign::getEmpNumb, empResign.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empResign.getEmpName())) { |
| | | queryWrapper.like(EmpResign::getEmpName, empResign.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empResign.getCertificateNumb())) { |
| | | queryWrapper.like(EmpResign::getCertificateNumb, empResign.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empResign.getDeptName())) { |
| | | queryWrapper.like(EmpResign::getDeptName, empResign.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empResign.getApplayDateStr())) { |
| | | queryWrapper.between(EmpResign::getApplayDate, empResign.getApplayDateStr().split(",")[0], empResign.getApplayDateStr().split(",")[1]); |
| | | } |
| | | return this.page(page, queryWrapper); |
| | | } |
| | | |
| | |
| | | package cc.mrbird.febs.server.hr.service.impl; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.server.hr.entity.EmpUnemployment; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpUnemploymentMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpUnemploymentService; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | |
| | | import java.util.*; |
| | | import cc.mrbird.febs.server.hr.entity.EmpUnemployment; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpUnemploymentMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpUnemploymentService; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | /** |
| | | * name:EmpUnemployment |
| | |
| | | public IPage<EmpUnemployment> findEmpUnemployments(QueryRequest request, EmpUnemployment empUnemployment) { |
| | | LambdaQueryWrapper<EmpUnemployment> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpUnemployment::getDelFlag, empUnemployment.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empUnemployment.getEmpNumb())) { |
| | | queryWrapper.like(EmpUnemployment::getEmpNumb, empUnemployment.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empUnemployment.getEmpName())) { |
| | | queryWrapper.like(EmpUnemployment::getEmpName, empUnemployment.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empUnemployment.getCertificateNumb())) { |
| | | queryWrapper.like(EmpUnemployment::getCertificateNumb, empUnemployment.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empUnemployment.getDeptName())) { |
| | | queryWrapper.like(EmpUnemployment::getDeptName, empUnemployment.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empUnemployment.getApplayDateStr())) { |
| | | queryWrapper.between(EmpUnemployment::getApplayDate, empUnemployment.getApplayDateStr().split(",")[0], empUnemployment.getApplayDateStr().split(",")[1]); |
| | | } |
| | | Page<EmpUnemployment> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.page(page, queryWrapper); |
| | | } |
| | |
| | | LambdaQueryWrapper<EmpWorkExperience> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpWorkExperience::getDelFlag,empWorkexperience.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empWorkexperience.getEmpNumb())) { |
| | | queryWrapper.eq(EmpWorkExperience::getEmpNumb, empWorkexperience.getEmpNumb()); |
| | | queryWrapper.like(EmpWorkExperience::getEmpNumb, empWorkexperience.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empWorkexperience.getEmpName())) { |
| | | queryWrapper.eq(EmpWorkExperience::getEmpName, empWorkexperience.getEmpName()); |
| | | queryWrapper.like(EmpWorkExperience::getEmpName, empWorkexperience.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empWorkexperience.getCertificateNumb())) { |
| | | queryWrapper.eq(EmpWorkExperience::getCertificateNumb, empWorkexperience.getCertificateNumb()); |
| | | queryWrapper.like(EmpWorkExperience::getCertificateNumb, empWorkexperience.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empWorkexperience.getEmpStatus())) { |
| | | queryWrapper.eq(EmpWorkExperience::getEmpStatus, empWorkexperience.getEmpStatus()); |
| | |
| | | public void download(String fileids, HttpServletRequest request, HttpServletResponse response) { |
| | | String[] arr = fileids.split(","); |
| | | List<File> files = new ArrayList<>(); |
| | | List<String> fileName = new ArrayList<>(); |
| | | Arrays.stream(arr).forEach(i -> { |
| | | FilesUpload filesUpload = this.getById(i); |
| | | files.add(new File(properties.getUploadPpath() + filesUpload.getFilesaddress())); |
| | | fileName.add(filesUpload.getFilesname()); |
| | | }); |
| | | //设置压缩包的名字 |
| | | //解决不同浏览器压缩包名字含有中文时乱码的问题 |
| | |
| | | try { |
| | | //添加ZipEntry,并ZipEntry中写入文件流 |
| | | //这里,加上i是防止要下载的文件有重名的导致下载失败 |
| | | zipos.putNextEntry(new ZipEntry(file.getName())); |
| | | zipos.putNextEntry(new ZipEntry(fileName.get(i))); |
| | | os = new DataOutputStream(zipos); |
| | | InputStream is = new FileInputStream(file); |
| | | byte[] b = new byte[100]; |
| | |
| | | folder.setModifier(operatorId); |
| | | folder.setCreatetime(new Date()); |
| | | folder.setModifytime(new Date()); |
| | | folder.setVersion(0); |
| | | this.save(folder); |
| | | } |
| | | |
| | |
| | | public void deleteFolder(Folder folder) { |
| | | LambdaUpdateWrapper<Folder> wapper = new LambdaUpdateWrapper<>(); |
| | | wapper.eq(Folder::getFolderid,folder.getFolderid()).setSql("delFlag = 1"); |
| | | // TODO 设置删除条件 |
| | | this.update(wapper); |
| | | } |
| | | } |
| New file |
| | |
| | | package cc.mrbird.febs.server.hr.service.impl; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | import cc.mrbird.febs.server.hr.entity.Folder; |
| | | import cc.mrbird.febs.server.hr.entity.Label; |
| | | import cc.mrbird.febs.server.hr.mapper.LabelMapper; |
| | | import cc.mrbird.febs.server.hr.service.ILabelService; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | import java.util.function.Predicate; |
| | | |
| | | /** |
| | | * 标签 Service实现 |
| | | * |
| | | * @author yz |
| | | * @date 2021-02-17 22:18:51 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) |
| | | public class LabelServiceImpl extends ServiceImpl<LabelMapper, Label> implements ILabelService { |
| | | |
| | | private final LabelMapper labelMapper; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | | @Override |
| | | public IPage<Label> findLabels(QueryRequest request, Label label) { |
| | | LambdaQueryWrapper<Label> queryWrapper = new LambdaQueryWrapper<>(); |
| | | // TODO 设置查询条件 |
| | | Page<Label> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.page(page, queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<Label> findLabels(Label label) { |
| | | LambdaQueryWrapper<Label> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.select(Label::getLabelcode,Label::getLabelname,Label::getLabelid).eq(Label::getDelFlag,0); |
| | | return this.baseMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void createLabel(Label label) { |
| | | label.setLabelid(SequenceUtil.generateId(0L, ModuleCode.HR_FIlE)); |
| | | label.setCreator(operatorId); |
| | | label.setModifier(operatorId); |
| | | label.setCreatetime(new Date()); |
| | | label.setModifytime(new Date()); |
| | | label.setVersion(0); |
| | | this.save(label); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void updateLabel(Label label) { |
| | | this.saveOrUpdate(label); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void deleteLabel(Label label) { |
| | | LambdaUpdateWrapper<Label> wapper = new LambdaUpdateWrapper<>(); |
| | | wapper.eq(Label::getLabelid,label.getLabelid()).setSql("delFlag = 1"); |
| | | this.update(wapper); |
| | | } |
| | | } |
| | |
| | | config: |
| | | server-addr: ${nacos.url}:8848 |
| | | group: DEFAULT_GROUP |
| | | prefix: febs-server-Hr |
| | | prefix: febs-server-hr |
| | | file-extension: yaml |
| | | discovery: |
| | | server-addr: ${nacos.url}:8848 |
| | |
| | | # 批量插入单次最大值,比如配置为1000,那么数据库插入1000条数据commit一次 |
| | | febs.server.hr.uploadPpath=D:/upload/hr/ |
| | | febs.server.hr.uploadPpath=C:/upload/hr/ |