xx
孔祥富
2021-03-14 97da80513b900a42de9ecf3fbbaa35000b57fd17
xx
5个文件已修改
540 ■■■■■ 已修改文件
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/controller/EmpBaseInfoController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.java 94 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.xml 315 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/service/IEmpBaseInfoService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/service/impl/EmpBaseInfoServiceImpl.java 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/controller/EmpBaseInfoController.java
@@ -2,6 +2,7 @@
import cc.mrbird.febs.common.core.entity.FebsResponse;
import cc.mrbird.febs.common.core.entity.QueryRequest;
import cc.mrbird.febs.common.core.entity.constant.StringConstant;
import cc.mrbird.febs.common.core.entity.system.DicItem;
import cc.mrbird.febs.common.core.exception.FebsException;
import cc.mrbird.febs.common.core.utils.FebsUtil;
@@ -9,6 +10,7 @@
import cc.mrbird.febs.server.hr.entity.EmpBaseInfo;
import cc.mrbird.febs.server.hr.entity.EmpDimissionLog;
import cc.mrbird.febs.server.hr.entity.EmpJobChange;
import cc.mrbird.febs.server.hr.feign.IRemoteDeptService;
import cc.mrbird.febs.server.hr.feign.IRemoteDicItemService;
import cc.mrbird.febs.server.hr.service.*;
import cc.mrbird.febs.server.hr.util.PoiExportExcel;
@@ -51,7 +53,7 @@
@RequestMapping("empBaseInfo")
@RequiredArgsConstructor
public class EmpBaseInfoController {
    private final IRemoteDeptService remoteDeptService;
    private final IEmpBaseInfoService empBaseInfoService;
    private final IEmpWorkExperienceService empWorkExperienceService;
    private final IEmpPhysicalExamService empPhysicalExamService;
@@ -165,10 +167,11 @@
    @GetMapping("options")
    public FebsResponse roles() {
        QueryWrapper<EmpBaseInfo> wrapper=new QueryWrapper();
        wrapper.eq("empStatus",0);
        wrapper.eq("delFlag",0);
        wrapper.orderByDesc("createTime");
        List<EmpBaseInfo> allRoles = empBaseInfoService.list(wrapper);
        wrapper.eq("a.empStatus",0);
        wrapper.eq("a.delFlag",0);
        wrapper.orderByDesc("a.createTime");
        wrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA));
        List<EmpBaseInfo> allRoles = empBaseInfoService.listAll(wrapper);
        return new FebsResponse().data(allRoles);
    }
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.java
@@ -4,6 +4,7 @@
import cc.mrbird.febs.server.hr.entity.*;
import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
@@ -27,7 +28,7 @@
public interface EmpBaseInfoMapper extends BaseMapper<EmpBaseInfo> {
    
    IPage<EmpBaseInfo> selectPageVo(Page<?> page, @Param(Constants.WRAPPER) Wrapper wrapper);
    List<EmpBaseInfo> listAll(@Param(Constants.WRAPPER) QueryWrapper<EmpBaseInfo> wrapper);
    /**
     * 根据Id批量逻辑删除记录
     * <p>
@@ -114,93 +115,98 @@
            "</script>")
    int changeEmpJob(@Param("list") List<String> list, @Param("mapParams") Map<String,Object> mapParams);
    @SqlParser(filter=true)
    Map<String, Object> countBaseInfoList(@Param("index") String index, @Param("btime") String btime, @Param("etime") String etime,@Param("manOld") String manOld,@Param("womanOld") String womanOld);
    Map<String, Object> countBaseInfoList(@Param("index") String index, @Param("btime") String btime, @Param("etime") String etime,@Param("manOld") String manOld,@Param("womanOld") String womanOld,@Param(Constants.WRAPPER) Wrapper wrapper);
    Integer countXjygBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime);
    Integer countXjygBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    @SqlParser(filter=true)
    Map<String, Object> countLzygBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime);
    Map<String, Object> countLzygBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    Integer countCzygBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime);
    Integer countCzygBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    @SqlParser(filter=true)
    Map<String, Object> countYxhtBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime);
    Map<String, Object> countYxhtBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    @SqlParser(filter=true)
    Integer countDqhtBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime);
    Integer countDqhtBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    @SqlParser(filter=true)
    Map<String, Object> countCqrsBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime);
    Map<String, Object> countCqrsBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    @SqlParser(filter=true)
    Integer countYgqjBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime);
    Integer countYgqjBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    @SqlParser(filter=true)
    Integer countLzajBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime);
    Integer countLzajBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    @SqlParser(filter=true)
    Map<String, Object> countGsajBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime);
    Map<String, Object> countGsajBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    @SqlParser(filter=true)
    Integer countSbsqBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime);
    Integer countSbsqBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    @SqlParser(filter=true)
    Integer countSyjBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime);
    Integer countSyjBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    @SqlParser(filter=true)
    Integer countYgtjBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime);
    Integer countYgtjBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    @SqlParser(filter=true)
    Integer countSfzBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime);
    Integer countSfzBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    @SqlParser(filter=true)
    Integer countYgtgBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime);
    Integer countYgtgBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    @SqlParser(filter=true)
    Integer countBljlBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime);
    Integer countBljlBaseInfoList(@Param("index")String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    @SqlParser(filter=true)
    Integer selectCountlz(@Param(Constants.WRAPPER) Wrapper wrapper);
    @SqlParser(filter=true)
    Map<String, Object> countZcygBaseInfoList(@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    @SqlParser(filter=true)
    Map<String, Object> countXqhtBaseInfoList(@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param(Constants.WRAPPER) Wrapper wrapper);
    IPage<EmpBaseInfo> baseInfoList(Page<EmpBaseInfo> page, String index, String btime, String etime, String name);
    @SqlParser(filter=true)
    IPage<EmpBaseInfo> zzbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name);
    IPage<EmpBaseInfo> zzbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpBaseInfo> xjbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name);
    IPage<EmpBaseInfo> xjbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpBaseInfo> zsbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name);
    IPage<EmpBaseInfo> zsbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpBaseInfo> lsbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name);
    IPage<EmpBaseInfo> lsbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpBaseInfo> lzbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name);
    IPage<EmpBaseInfo> lzbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpBaseInfo> cjbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name);
    IPage<EmpBaseInfo> cjbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpBaseInfo> zcbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number);
    IPage<EmpBaseInfo> zcbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpBaseInfo> yxbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number);
    IPage<EmpBaseInfo> yxbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpBaseInfo> dqbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name);
    IPage<EmpBaseInfo> dqbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpBaseInfo> jcseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name);
    IPage<EmpBaseInfo> jcseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpDimissionAttend> empBaseInfoCqList(@Param("page") Page<EmpDimissionAttend> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number);
    IPage<EmpDimissionAttend> empBaseInfoCqList(@Param("page") Page<EmpDimissionAttend> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpLeaveInfo> empBaseInfoQjList(@Param("page") Page<EmpLeaveInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number);
    IPage<EmpLeaveInfo> empBaseInfoQjList(@Param("page") Page<EmpLeaveInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpPhysicalExam> empBaseInfoTjList(@Param("page") Page<EmpPhysicalExam> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number);
    IPage<EmpPhysicalExam> empBaseInfoTjList(@Param("page") Page<EmpPhysicalExam> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpLaborTrouble> empBaseInfoLzList(@Param("page") Page<EmpLaborTrouble> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number);
    IPage<EmpLaborTrouble> empBaseInfoLzList(@Param("page") Page<EmpLaborTrouble> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpOccupational> empBaseInfoGsList(@Param("page") Page<EmpOccupational> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number);
    IPage<EmpOccupational> empBaseInfoGsList(@Param("page") Page<EmpOccupational> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpAccidentCases> empBaseInfoYwList(@Param("page") Page<EmpAccidentCases> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number);
    IPage<EmpAccidentCases> empBaseInfoYwList(@Param("page") Page<EmpAccidentCases> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpInsurance> empBaseInfoSbList(@Param("page") Page<EmpInsurance> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number);
    IPage<EmpInsurance> empBaseInfoSbList(@Param("page") Page<EmpInsurance> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpUnemployment> empBaseInfoSyjList(@Param("page") Page<EmpUnemployment> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number);
    IPage<EmpUnemployment> empBaseInfoSyjList(@Param("page") Page<EmpUnemployment> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpBadRecord> empBaseInfoBlList(@Param("page") Page<EmpBadRecord> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number);
    IPage<EmpBadRecord> empBaseInfoBlList(@Param("page") Page<EmpBadRecord> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpBaseInfo> sfzbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name);
    IPage<EmpBaseInfo> sfzbaseInfoList(@Param("page") Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    IPage<EmpJobChange> empBaseInfoTgList(@Param("page")Page<EmpJobChange> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number);
    IPage<EmpJobChange> empBaseInfoTgList(@Param("page")Page<EmpJobChange> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("number") String number,@Param("list") List<String> lists);
    @SqlParser(filter=true)
    List<SysConfig> sysConfig();
    @SqlParser(filter=true)
    IPage<EmpBaseInfo> clbaseInfoList(@Param("page")Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("manOld") String manOld,@Param("womanOld") String womanOld);
    @SqlParser(filter=true)
    Map<String, Object> countZcygBaseInfoList(@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime);
    @SqlParser(filter=true)
    Map<String, Object> countXqhtBaseInfoList(@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime);
    IPage<EmpBaseInfo> clbaseInfoList(@Param("page")Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("manOld") String manOld,@Param("womanOld") String womanOld,@Param("list") List<String> lists);
}
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.xml
@@ -11,7 +11,11 @@
        inner join t_dept c on a.deptId = c.DEPT_ID
        ${ew.customSqlSegment}
    </select>
    <select id="listAll" resultType="cc.mrbird.febs.server.hr.entity.EmpBaseInfo">
        select a.* from t_emp_baseInfo a
        inner join t_dept c on a.deptId = c.DEPT_ID
        ${ew.customSqlSegment}
    </select>
    <select id="countZcygBaseInfoList" resultType="java.util.Map">
        SELECT
        count(
@@ -24,7 +28,7 @@
        IF (t.dimissionType = '4', 1, NULL)
        ) gsct
        FROM
        t_emp_baseinfo t where 1=1 and t.delFlag=0 and t.empStatus='1'
        t_emp_baseinfo t inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t.empStatus='1'
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t.createTime,'%Y-%m-%d') &gt;= #{btime}  and date_format(t.createTime,'%Y-%m-%d') &lt;= #{etime}
@@ -51,7 +55,8 @@
            count(IF(t.empType = '02', 1, NULL)) lsyg,
        count( if(t.sex is not null and t.age !=0 and t.sex=1 and t.age&gt;=${manOld},1,null))+count( if(t.sex is not null and t.age !=0 and t.sex=2 and t.age&gt;=${womanOld},1,null)) clyg
        FROM
            t_emp_baseinfo t where 1=1 and t.delFlag=0 and t.empStatus = 0
            t_emp_baseinfo t inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t.empStatus = 0
    </select>
@@ -59,7 +64,7 @@
        SELECT
        count(1) xjyg
        FROM
        t_emp_baseinfo t where 1=1 and t.delFlag=0
        t_emp_baseinfo t inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t.entryDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t.entryDate,'%Y-%m-%d') &lt;= #{etime}
@@ -80,10 +85,10 @@
    </select>
    <select id="countLzygBaseInfoList" resultType="java.util.Map">
        SELECT
        count(IF(t1.contractStatus = 3, 1, NULL)) jcht
        count(IF(t2.contractStatus = 3, 1, NULL)) jcht
        FROM
        t_emp_baseinfo t left JOIN t_emp_contractinfo t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t left JOIN t_emp_contractinfo t2 on t.empId=t2.empId inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t2.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t.dimissionDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t.dimissionDate,'%Y-%m-%d') &lt;= #{etime}
@@ -106,73 +111,73 @@
        SELECT
        count(1) czyg
        FROM
        t_emp_baseinfo t INNER JOIN t_emp_resign t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t INNER JOIN t_emp_resign t2 on t.empId=t2.empId inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t2.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.applayDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.applayDate,'%Y-%m-%d') &lt;= #{etime}
                and date_format(t2.applayDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t2.applayDate,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.applayDate) = TO_DAYS(NOW())
                and TO_DAYS(t2.applayDate) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.applayDate,'%Y-%m-%d')) = YEARWEEK(now())
                and YEARWEEK(date_format(t2.applayDate,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.applayDate,'%Y-%m') = date_format(now(),'%Y-%m')
                and date_format(t2.applayDate,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.applayDate)=YEAR(NOW())
                and YEAR(t2.applayDate)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
    <select id="countXqhtBaseInfoList" resultType="java.util.Map">
        SELECT
        count(IF(t1.contractStatus = 1, 1, NULL)) xinqht,
        count(IF(t1.contractStatus = 2, 1, NULL)) xqht
        count(IF(t2.contractStatus = 1, 1, NULL)) xinqht,
        count(IF(t2.contractStatus = 2, 1, NULL)) xqht
        FROM
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t2 on t.empId=t2.empId inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t2.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.signingDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.signingDate,'%Y-%m-%d') &lt;= #{etime}
                and date_format(t2.signingDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t2.signingDate,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.signingDate) = TO_DAYS(NOW())
                and TO_DAYS(t2.signingDate) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.signingDate,'%Y-%m-%d')) = YEARWEEK(now())
                and YEARWEEK(date_format(t2.signingDate,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.signingDate,'%Y-%m') = date_format(now(),'%Y-%m')
                and date_format(t2.signingDate,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.signingDate)=YEAR(NOW())
                and YEAR(t2.signingDate)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
    <select id="countYxhtBaseInfoList" resultType="java.util.Map">
        SELECT
        count(IF(t1.contractStatus = 1 or t1.contractStatus = 2, 1, NULL)) yxht
        count(IF(t2.contractStatus = 1 or t2.contractStatus = 2, 1, NULL)) yxht
        FROM
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t2 on t.empId=t2.empId inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t2.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.signingDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.signingDate,'%Y-%m-%d') &lt;= #{etime}
                and date_format(t2.signingDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t2.signingDate,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.signingDate) = TO_DAYS(NOW())
                and TO_DAYS(t2.signingDate) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.signingDate,'%Y-%m-%d')) = YEARWEEK(now())
                and YEARWEEK(date_format(t2.signingDate,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.signingDate,'%Y-%m') = date_format(now(),'%Y-%m')
                and date_format(t2.signingDate,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.signingDate)=YEAR(NOW())
                and YEAR(t2.signingDate)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
@@ -180,24 +185,24 @@
    <select id="countDqhtBaseInfoList" resultType="java.lang.Integer">
        SELECT
        count(IF(t1.contractStatus = 4, 1, NULL)) dqht
        count(IF(t2.contractStatus = 4, 1, NULL)) dqht
        FROM
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t2 on t.empId=t2.empId inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t2.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.endDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.endDate,'%Y-%m-%d') &lt;= #{etime}
                and date_format(t2.endDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t2.endDate,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.endDate) = TO_DAYS(NOW())
                and TO_DAYS(t2.endDate) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.endDate,'%Y-%m-%d')) = YEARWEEK(now())
                and YEARWEEK(date_format(t2.endDate,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.endDate,'%Y-%m') = date_format(now(),'%Y-%m')
                and date_format(t2.endDate,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.endDate)=YEAR(NOW())
                and YEAR(t2.endDate)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
@@ -205,20 +210,20 @@
    <select id="countCqrsBaseInfoList" resultType="java.util.Map">
        SELECT
        count(1) cqrs,count(IF(t1.overtimeDay!=0 or t1.overtimeHour!=0, 1, NULL)) ygjb
        ,count(IF(t1.absenteeism !=0 , 1, NULL)) ygkg
        count(1) cqrs,count(IF(t2.overtimeDay!=0 or t2.overtimeHour!=0, 1, NULL)) ygjb
        ,count(IF(t2.absenteeism !=0 , 1, NULL)) ygkg
        FROM
        t_emp_baseinfo t right  JOIN t_emp_dimissionattend t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right  JOIN t_emp_dimissionattend t2 on t.empId=t2.empId inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t2.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and t1.attendMonth &gt;= #{btime}  and t1.attendMonth &lt;= #{etime}
                and t2.attendMonth &gt;= #{btime}  and t2.attendMonth &lt;= #{etime}
            </when>
            <when test="index==2">
                and t1.attendMonth = date_format(now(),'%Y-%m')
                and t2.attendMonth = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and t1.attendMonth=YEAR(NOW())
                and t2.attendMonth=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
@@ -228,22 +233,22 @@
        SELECT
        count(1) ygqj
        FROM
        t_emp_baseinfo t right  JOIN t_emp_leaveinfo t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right  JOIN t_emp_leaveinfo t2 on t.empId=t2.empId inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t2.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.returnDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.returnDate,'%Y-%m-%d') &lt;= #{etime}
                and date_format(t2.returnDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t2.returnDate,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.returnDate) = TO_DAYS(NOW())
                and TO_DAYS(t2.returnDate) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.returnDate,'%Y-%m-%d')) = YEARWEEK(now())
                and YEARWEEK(date_format(t2.returnDate,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.returnDate,'%Y-%m') = date_format(now(),'%Y-%m')
                and date_format(t2.returnDate,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.returnDate)=YEAR(NOW())
                and YEAR(t2.returnDate)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
@@ -261,22 +266,22 @@
        SELECT
        count(1) lzaj
        FROM
        t_emp_baseinfo t right  JOIN t_emp_labortrouble t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right  JOIN t_emp_labortrouble t2 on t.empId=t2.empId inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t2.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.arbitrationDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.arbitrationDate,'%Y-%m-%d') &lt;= #{etime}
                and date_format(t2.arbitrationDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t2.arbitrationDate,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.arbitrationDate) = TO_DAYS(NOW())
                and TO_DAYS(t2.arbitrationDate) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.arbitrationDate,'%Y-%m-%d')) = YEARWEEK(now())
                and YEARWEEK(date_format(t2.arbitrationDate,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.arbitrationDate,'%Y-%m') = date_format(now(),'%Y-%m')
                and date_format(t2.arbitrationDate,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.arbitrationDate)=YEAR(NOW())
                and YEAR(t2.arbitrationDate)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
@@ -285,43 +290,43 @@
    <select id="countGsajBaseInfoList" resultType="java.util.Map">
        SELECT (SELECT  count(1)
        FROM
        t_emp_baseinfo t right  JOIN t_emp_accidentcases t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right  JOIN t_emp_accidentcases t2 on t.empId=t2.empId inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t2.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.injuredTime,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.injuredTime,'%Y-%m-%d') &lt;= #{etime}
                and date_format(t2.injuredTime,'%Y-%m-%d') &gt;= #{btime}  and date_format(t2.injuredTime,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.injuredTime) = TO_DAYS(NOW())
                and TO_DAYS(t2.injuredTime) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.injuredTime,'%Y-%m-%d')) = YEARWEEK(now())
                and YEARWEEK(date_format(t2.injuredTime,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.injuredTime,'%Y-%m') = date_format(now(),'%Y-%m')
                and date_format(t2.injuredTime,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.injuredTime)=YEAR(NOW())
                and YEAR(t2.injuredTime)=YEAR(NOW())
            </otherwise>
        </choose>) ywxaj,(
        SELECT
        count(1)
        FROM
        t_emp_baseinfo t right  JOIN t_emp_occupational t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right  JOIN t_emp_occupational t2 on t.empId=t2.empId inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t2.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.injuredTime,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.injuredTime,'%Y-%m-%d') &lt;= #{etime}
                and date_format(t2.injuredTime,'%Y-%m-%d') &gt;= #{btime}  and date_format(t2.injuredTime,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.injuredTime) = TO_DAYS(NOW())
                and TO_DAYS(t2.injuredTime) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.injuredTime,'%Y-%m-%d')) = YEARWEEK(now())
                and YEARWEEK(date_format(t2.injuredTime,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.injuredTime,'%Y-%m') = date_format(now(),'%Y-%m')
                and date_format(t2.injuredTime,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.injuredTime)=YEAR(NOW())
                and YEAR(t2.injuredTime)=YEAR(NOW())
            </otherwise>
        </choose>) gsaj
@@ -333,22 +338,22 @@
        SELECT
        count(1) sbsq
        FROM
        t_emp_baseinfo t right  JOIN t_emp_insurance t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right  JOIN t_emp_insurance t2 on t.empId=t2.empId inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t2.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.applayDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.applayDate,'%Y-%m-%d') &lt;= #{etime}
                and date_format(t2.applayDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t2.applayDate,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.applayDate) = TO_DAYS(NOW())
                and TO_DAYS(t2.applayDate) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.applayDate,'%Y-%m-%d')) = YEARWEEK(now())
                and YEARWEEK(date_format(t2.applayDate,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.applayDate,'%Y-%m') = date_format(now(),'%Y-%m')
                and date_format(t2.applayDate,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.applayDate)=YEAR(NOW())
                and YEAR(t2.applayDate)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
@@ -356,22 +361,22 @@
        SELECT
        count(1) syj
        FROM
        t_emp_baseinfo t right  JOIN t_emp_unemployment t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right  JOIN t_emp_unemployment t2 on t.empId=t2.empId inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t2.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.applayDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.applayDate,'%Y-%m-%d') &lt;= #{etime}
                and date_format(t2.applayDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t2.applayDate,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.applayDate) = TO_DAYS(NOW())
                and TO_DAYS(t2.applayDate) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.applayDate,'%Y-%m-%d')) = YEARWEEK(now())
                and YEARWEEK(date_format(t2.applayDate,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.applayDate,'%Y-%m') = date_format(now(),'%Y-%m')
                and date_format(t2.applayDate,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.applayDate)=YEAR(NOW())
                and YEAR(t2.applayDate)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
@@ -379,22 +384,22 @@
        SELECT
        count(1) ygtj
        FROM
        t_emp_baseinfo t right  JOIN t_emp_physicalexam t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right  JOIN t_emp_physicalexam t2 on t.empId=t2.empId inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t2.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.physicalExamDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.physicalExamDate,'%Y-%m-%d') &lt;= #{etime}
                and date_format(t2.physicalExamDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t2.physicalExamDate,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.physicalExamDate) = TO_DAYS(NOW())
                and TO_DAYS(t2.physicalExamDate) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.physicalExamDate,'%Y-%m-%d')) = YEARWEEK(now())
                and YEARWEEK(date_format(t2.physicalExamDate,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.physicalExamDate,'%Y-%m') = date_format(now(),'%Y-%m')
                and date_format(t2.physicalExamDate,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.physicalExamDate)=YEAR(NOW())
                and YEAR(t2.physicalExamDate)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
@@ -402,7 +407,7 @@
        SELECT
        count(1) sfz
        FROM
        t_emp_baseinfo t  where 1=1 and t.delFlag=0 and t.empStatus=0
        t_emp_baseinfo t  inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t.empStatus=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t.certificateValidity,'%Y-%m-%d') &gt;= #{btime}  and date_format(t.certificateValidity,'%Y-%m-%d') &lt;= #{etime}
@@ -426,19 +431,19 @@
        SELECT
        count(1) ygtg
        FROM
        t_emp_baseinfo t right  JOIN t_emp_jobChange t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right  JOIN t_emp_jobChange t2 on t.empId=t2.empId inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t2.delFlag=0
        <choose>
            <when test="index==0">
                and TO_DAYS(t1.changeDate) = TO_DAYS(NOW())
                and TO_DAYS(t2.changeDate) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.changeDate,'%Y-%m-%d')) = YEARWEEK(now())
                and YEARWEEK(date_format(t2.changeDate,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.changeDate,'%Y-%m') = date_format(now(),'%Y-%m')
                and date_format(t2.changeDate,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.changeDate)=YEAR(NOW())
                and YEAR(t2.changeDate)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
@@ -447,30 +452,40 @@
        SELECT
        count(1) bljl
        FROM
        t_emp_baseinfo t right  JOIN t_emp_badrecord t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right  JOIN t_emp_badrecord t2 on t.empId=t2.empId inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment} and t.delFlag=0 and t2.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.badDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.badDate,'%Y-%m-%d') &lt;= #{etime}
                and date_format(t2.badDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t2.badDate,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.badDate) = TO_DAYS(NOW())
                and TO_DAYS(t2.badDate) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.badDate,'%Y-%m-%d')) = YEARWEEK(now())
                and YEARWEEK(date_format(t2.badDate,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.badDate,'%Y-%m') = date_format(now(),'%Y-%m')
                and date_format(t2.badDate,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.badDate)=YEAR(NOW())
                and YEAR(t2.badDate)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
    <select id="selectCountlz" resultType="java.lang.Integer">
        SELECT
        count(1)
        FROM
        t_emp_baseinfo t inner  join t_dept t1 on t.deptId=t1.DEPT_ID  ${ew.customSqlSegment}
    </select>
    <select id="zzbaseInfoList" resultType="cc.mrbird.febs.server.hr.entity.EmpBaseInfo">
        select t1.* from t_emp_baseinfo t1 left join t_dept t2 on t1.deptId=t2.DEPT_ID where t1.empStatus=0 and t1.delFlag=0
        select t1.* from t_emp_baseinfo t1 left join t_dept t2 on t1.deptId=t2.DEPT_ID where 1=1 and t1.empStatus=0 and t1.delFlag=0
         and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
        #{item}
       </foreach>
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
@@ -482,13 +497,19 @@
                SELECT
                t.*
                FROM
                t_emp_baseinfo t left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t.empStatus = 0 and t.delFlag=0  and t.sex is not null and t.age !=0 and t.sex=1 and t.age&gt;=${manOld}
                t_emp_baseinfo t left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t.empStatus = 0 and t.delFlag=0  and t.sex is not null and t.age !=0 and t.sex=1 and t.age&gt;=${manOld}  and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach>
                UNION
                SELECT
                t.*
                FROM
                t_emp_baseinfo t left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t.empStatus = 0 and t.delFlag=0  and t.sex is not null and t.age !=0 and t.sex=2 and t.age&gt;=${womanOld}
                t_emp_baseinfo t left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t.empStatus = 0 and t.delFlag=0  and t.sex is not null and t.age !=0 and t.sex=2 and t.age&gt;=${womanOld}  and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach>
        ) t1 where 1=1
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
@@ -500,6 +521,10 @@
    <select id="sfzbaseInfoList" resultType="cc.mrbird.febs.server.hr.entity.EmpBaseInfo">
        select t1.* from t_emp_baseinfo t1 left join t_dept t2 on t1.deptId=t2.DEPT_ID where 1=1 and t1.delFlag=0 and t1.empStatus=0
        and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach>
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
@@ -525,6 +550,10 @@
    </select>
    <select id="xjbaseInfoList" resultType="cc.mrbird.febs.server.hr.entity.EmpBaseInfo">
        select t1.* from t_emp_baseinfo t1 left join t_dept t2 on t1.deptId=t2.DEPT_ID where 1=1 and t1.delFlag=0
        and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach>
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
@@ -553,6 +582,10 @@
    <select id="zsbaseInfoList" resultType="cc.mrbird.febs.server.hr.entity.EmpBaseInfo">
        select t1.* from t_emp_baseinfo t1 left join t_dept t2 on t1.deptId=t2.DEPT_ID where t1.empType='01' and t1.delFlag=0 and t1.empStatus=0
        and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach>
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
@@ -560,7 +593,11 @@
    </select>
    <select id="lsbaseInfoList" resultType="cc.mrbird.febs.server.hr.entity.EmpBaseInfo">
        select t1.* from t_emp_baseinfo t1 left join t_dept t2 on t1.deptId=t2.DEPT_ID where t1.empType='02' and t1.delFlag=0 and t1.empStatus=0
        select t1.* from t_emp_baseinfo t1 left join t_dept t2 on t1.deptId=t2.DEPT_ID where t1.empType='02'
        and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach> and t1.delFlag=0 and t1.empStatus=0
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
@@ -570,7 +607,11 @@
    <select id="lzbaseInfoList" resultType="cc.mrbird.febs.server.hr.entity.EmpBaseInfo">
        select t1.* from t_emp_baseinfo t1 left join t_dept t2 on t1.deptId=t2.DEPT_ID where 1=1 and t1.delFlag=0 and t1.empStatus=1
        select t1.* from t_emp_baseinfo t1 left join t_dept t2 on t1.deptId=t2.DEPT_ID where 1=1
        and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach> and t1.delFlag=0 and t1.empStatus=1
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
@@ -583,7 +624,11 @@
        SELECT
        t.*,t1.applayDate,t1.reason,t1.reporter
        FROM
        t_emp_baseinfo t INNER JOIN t_emp_resign t1 on t.empId=t1.empId left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t INNER JOIN t_emp_resign t1 on t.empId=t1.empId left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1
        and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach> and t.delFlag=0 and t1.delFlag=0
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t.empNumb like CONCAT('%',#{name},'%') or t.empName like CONCAT('%',#{name},'%') or
            t.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
@@ -611,6 +656,10 @@
    <select id="zcbaseInfoList" resultType="cc.mrbird.febs.server.hr.entity.EmpBaseInfo">
        select t1.* from t_emp_baseinfo t1 left join t_dept t2 on t1.deptId=t2.DEPT_ID where 1=1 and t1.delFlag=0 and t1.empStatus='1'
        and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach>
        <choose>
            <when test="number==8">
               and t1.dimissionType = '1'
@@ -652,6 +701,10 @@
    <select id="yxbaseInfoList" resultType="cc.mrbird.febs.server.hr.entity.EmpBaseInfo">
        select t1.*,t.allDeptName from t_emp_baseinfo t left join t_dept t2 on t.deptId=t2.DEPT_ID INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach>
        <choose>
            <when test="number==14">
                and t1.contractStatus = '2'
@@ -728,7 +781,11 @@
        SELECT
        t1.*,t.allDeptName
        FROM
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t.delFlag=0 and t1.delFlag=0 and t1.contractStatus = '4'
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1
        and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach> and t.delFlag=0 and t1.delFlag=0 and t1.contractStatus = '4'
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t.empNumb like CONCAT('%',#{name},'%') or t.empName like CONCAT('%',#{name},'%') or
            t.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
@@ -756,7 +813,11 @@
        SELECT
        t1.*,t.allDeptName
        FROM
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t.delFlag=0 and t1.delFlag=0 and t1.contractStatus = '3'
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1
        and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach> and t.delFlag=0 and t1.delFlag=0 and t1.contractStatus = '3'
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t.empNumb like CONCAT('%',#{name},'%') or t.empName like CONCAT('%',#{name},'%') or
            t.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
@@ -784,7 +845,10 @@
        SELECT
        t1.*,t.allDeptName
        FROM
        t_emp_baseinfo t right JOIN t_emp_dimissionattend t1 on t.empId=t1.empId left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right JOIN t_emp_dimissionattend t1 on t.empId=t1.empId left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1  and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach> and t.delFlag=0 and t1.delFlag=0
        <choose>
            <when test="number==3">
              and  t1.absenteeism !=0
@@ -820,7 +884,10 @@
        SELECT
        t1.*,t.allDeptName
        FROM
        t_emp_baseinfo t right JOIN t_emp_leaveinfo t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right JOIN t_emp_leaveinfo t1 on t.empId=t1.empId inner  join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1  and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach> and t.delFlag=0 and t1.delFlag=0
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t1.deptName like CONCAT('%',#{name},'%'))
@@ -849,7 +916,10 @@
        SELECT
        t1.*,t.allDeptName
        FROM
        t_emp_baseinfo t right JOIN t_emp_physicalexam t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right JOIN t_emp_physicalexam t1 on t.empId=t1.empId inner  join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1  and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach> and t.delFlag=0 and t1.delFlag=0
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t1.deptName like CONCAT('%',#{name},'%'))
@@ -881,7 +951,10 @@
        SELECT
        t1.*,t.allDeptName
        FROM
        t_emp_baseinfo t right JOIN t_emp_labortrouble t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right JOIN t_emp_labortrouble t1 on t.empId=t1.empId inner  join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1  and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach> and t.delFlag=0 and t1.delFlag=0
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t1.deptName like CONCAT('%',#{name},'%'))
@@ -912,7 +985,10 @@
        SELECT
        t1.*,t.allDeptName
        FROM
        t_emp_baseinfo t right JOIN t_emp_occupational t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right JOIN t_emp_occupational t1 on t.empId=t1.empId inner  join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1  and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach> and t.delFlag=0 and t1.delFlag=0
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t1.deptName like CONCAT('%',#{name},'%'))
@@ -941,7 +1017,10 @@
        SELECT
        t1.*,t.allDeptName
        FROM
        t_emp_baseinfo t right JOIN t_emp_accidentcases t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right JOIN t_emp_accidentcases t1 on t.empId=t1.empId inner  join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1  and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach> and t.delFlag=0 and t1.delFlag=0
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t1.deptName like CONCAT('%',#{name},'%'))
@@ -971,7 +1050,10 @@
        SELECT
        t1.*,t.allDeptName
        FROM
        t_emp_baseinfo t right JOIN t_emp_insurance t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right JOIN t_emp_insurance t1 on t.empId=t1.empId inner  join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1  and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach> and t.delFlag=0 and t1.delFlag=0
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t1.deptName like CONCAT('%',#{name},'%'))
@@ -1001,7 +1083,10 @@
        SELECT
        t1.*,t.allDeptName
        FROM
        t_emp_baseinfo t right JOIN t_emp_unemployment t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right JOIN t_emp_unemployment t1 on t.empId=t1.empId inner  join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1  and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach> and t.delFlag=0 and t1.delFlag=0
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t1.deptName like CONCAT('%',#{name},'%'))
@@ -1030,7 +1115,10 @@
        SELECT
        t1.*,t.allDeptName
        FROM
        t_emp_baseinfo t right JOIN t_emp_badrecord t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right JOIN t_emp_badrecord t1 on t.empId=t1.empId inner  join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1  and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach> and t.delFlag=0 and t1.delFlag=0
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t1.deptName like CONCAT('%',#{name},'%'))
@@ -1060,7 +1148,10 @@
        SELECT
        t1.*,t.empNumb,t.deptName,t.certificateNumb,t.allDeptName
        FROM
        t_emp_baseinfo t right JOIN t_emp_jobChange t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        t_emp_baseinfo t right JOIN t_emp_jobChange t1 on t.empId=t1.empId inner  join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1  and t2.DEPT_ID in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach> and t.delFlag=0 and t1.delFlag=0
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t.certificateNumb like CONCAT('%',#{name},'%') or t.deptName like CONCAT('%',#{name},'%'))
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/service/IEmpBaseInfoService.java
@@ -7,6 +7,7 @@
import cc.mrbird.febs.common.core.entity.QueryRequest;
import cc.mrbird.febs.server.hr.entity.EmpDimissionLog;
import cc.mrbird.febs.server.hr.entity.EmpJobChange;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
@@ -199,4 +200,6 @@
    void exportEmpAll(HttpServletResponse response, EmpBaseInfo empBaseinfo) throws IOException;
    boolean verifyCertificateNumb(EmpBaseInfo empBaseInfo);
    List<EmpBaseInfo> listAll(QueryWrapper<EmpBaseInfo> wrapper);
}
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/service/impl/EmpBaseInfoServiceImpl.java
@@ -571,24 +571,26 @@
            manOld = sysConfig.get(0).getConfigValue();
            womanOld = sysConfig.get(1).getConfigValue();
        }
        String[] split = remoteDeptService.userRightDepts().split(StringConstant.COMMA);
        List<String> lists= Arrays.asList(split);
        if ("1".equals(number)) { //在职员工
            iPage = this.empBaseInfoMapper.zzbaseInfoList(page, index, btime, etime, name);
            iPage = this.empBaseInfoMapper.zzbaseInfoList(page, index, btime, etime, name,lists);
        } else if ("2".equals(number)) { //新进员工
            iPage = this.empBaseInfoMapper.xjbaseInfoList(page, index, btime, etime, name);
            iPage = this.empBaseInfoMapper.xjbaseInfoList(page, index, btime, etime, name,lists);
        } else if ("3".equals(number)) { //正式员工
            iPage = this.empBaseInfoMapper.zsbaseInfoList(page, index, btime, etime, name);
            iPage = this.empBaseInfoMapper.zsbaseInfoList(page, index, btime, etime, name,lists);
        } else if ("4".equals(number)) { //临时员工
            iPage = this.empBaseInfoMapper.lsbaseInfoList(page, index, btime, etime, name);
            iPage = this.empBaseInfoMapper.lsbaseInfoList(page, index, btime, etime, name,lists);
        } else if ("5".equals(number)) { //超龄员工
            iPage = this.empBaseInfoMapper.clbaseInfoList(page, index, btime, etime, name, manOld, womanOld);
            iPage = this.empBaseInfoMapper.clbaseInfoList(page, index, btime, etime, name, manOld, womanOld,lists);
        } else if ("6".equals(number)) { //离职员工总数
            iPage = this.empBaseInfoMapper.lzbaseInfoList(page, index, btime, etime, name);
            iPage = this.empBaseInfoMapper.lzbaseInfoList(page, index, btime, etime, name,lists);
        } else if ("7".equals(number)) { //辞职申请人数
            iPage = this.empBaseInfoMapper.cjbaseInfoList(page, index, btime, etime, name);
            iPage = this.empBaseInfoMapper.cjbaseInfoList(page, index, btime, etime, name,lists);
        } else if ("8".equals(number) || "9".equals(number) || "10".equals(number)) { //正常离职人数 ,自动离职人数 ,公司辞退人数
            iPage = this.empBaseInfoMapper.zcbaseInfoList(page, index, btime, etime, name, number);
            iPage = this.empBaseInfoMapper.zcbaseInfoList(page, index, btime, etime, name, number,lists);
        } else if ("11".equals(number)) { //身份证到期
            iPage = this.empBaseInfoMapper.sfzbaseInfoList(page, index, btime, etime, name);
            iPage = this.empBaseInfoMapper.sfzbaseInfoList(page, index, btime, etime, name,lists);
        }
        //设置部门
        List<EmpBaseInfo> list = setDeptName(iPage.getRecords());
@@ -652,12 +654,14 @@
    public IPage<EmpBaseInfo> baseInfoHeList(String index, String btime, String etime, String pageSize, String pageNum, String number, String name) {
        Page<EmpBaseInfo> page = new Page<EmpBaseInfo>(new Long(pageNum), new Long(pageSize));
        IPage<EmpBaseInfo> iPage = null;
        String[] split = remoteDeptService.userRightDepts().split(StringConstant.COMMA);
        List<String> lists= Arrays.asList(split);
        if ("11".equals(number) || "13".equals(number) || "14".equals(number)) { //有效合同   ,新签合同,续签合同
            iPage = this.empBaseInfoMapper.yxbaseInfoList(page, index, btime, etime, name, number);
            iPage = this.empBaseInfoMapper.yxbaseInfoList(page, index, btime, etime, name, number,lists);
        } else if ("12".equals(number)) { //到期合同
            iPage = this.empBaseInfoMapper.dqbaseInfoList(page, index, btime, etime, name);
            iPage = this.empBaseInfoMapper.dqbaseInfoList(page, index, btime, etime, name,lists);
        } else if ("15".equals(number)) { //解除合同
            iPage = this.empBaseInfoMapper.jcseInfoList(page, index, btime, etime, name);
            iPage = this.empBaseInfoMapper.jcseInfoList(page, index, btime, etime, name,lists);
        }
        //设置部门
        List<EmpBaseInfo> list = setDeptName(iPage.getRecords());
@@ -681,7 +685,9 @@
        Page<EmpDimissionAttend> page = new Page<EmpDimissionAttend>(new Long(pageNum), new Long(pageSize));
        IPage<EmpDimissionAttend> iPage = null;
        //q出勤人数   员工加班   员工旷工
        iPage = this.empBaseInfoMapper.empBaseInfoCqList(page, index, btime, etime, name, number);
        String[] split = remoteDeptService.userRightDepts().split(StringConstant.COMMA);
        List<String> lists= Arrays.asList(split);
        iPage = this.empBaseInfoMapper.empBaseInfoCqList(page, index, btime, etime, name, number,lists);
        return iPage;
    }
@@ -691,7 +697,9 @@
        Page<EmpLeaveInfo> page = new Page<EmpLeaveInfo>(new Long(pageNum), new Long(pageSize));
        IPage<EmpLeaveInfo> iPage = null;
        //员工请假
        iPage = this.empBaseInfoMapper.empBaseInfoQjList(page, index, btime, etime, name, number);
        String[] split = remoteDeptService.userRightDepts().split(StringConstant.COMMA);
        List<String> lists= Arrays.asList(split);
        iPage = this.empBaseInfoMapper.empBaseInfoQjList(page, index, btime, etime, name, number,lists);
        return iPage;
    }
@@ -700,7 +708,9 @@
        Page<EmpPhysicalExam> page = new Page<EmpPhysicalExam>(new Long(pageNum), new Long(pageSize));
        IPage<EmpPhysicalExam> iPage = null;
        //员工体检
        iPage = this.empBaseInfoMapper.empBaseInfoTjList(page, index, btime, etime, name, number);
        String[] split = remoteDeptService.userRightDepts().split(StringConstant.COMMA);
        List<String> lists= Arrays.asList(split);
        iPage = this.empBaseInfoMapper.empBaseInfoTjList(page, index, btime, etime, name, number,lists);
        return iPage;
    }
@@ -709,7 +719,9 @@
        Page<EmpLaborTrouble> page = new Page<EmpLaborTrouble>(new Long(pageNum), new Long(pageSize));
        IPage<EmpLaborTrouble> iPage = null;
        //劳资案件
        iPage = this.empBaseInfoMapper.empBaseInfoLzList(page, index, btime, etime, name, number);
        String[] split = remoteDeptService.userRightDepts().split(StringConstant.COMMA);
        List<String> lists= Arrays.asList(split);
        iPage = this.empBaseInfoMapper.empBaseInfoLzList(page, index, btime, etime, name, number,lists);
        return iPage;
    }
@@ -718,7 +730,9 @@
        Page<EmpJobChange> page = new Page<EmpJobChange>(new Long(pageNum), new Long(pageSize));
        IPage<EmpJobChange> iPage = null;
        //调岗
        iPage = this.empBaseInfoMapper.empBaseInfoTgList(page, index, btime, etime, name, number);
        String[] split = remoteDeptService.userRightDepts().split(StringConstant.COMMA);
        List<String> lists= Arrays.asList(split);
        iPage = this.empBaseInfoMapper.empBaseInfoTgList(page, index, btime, etime, name, number,lists);
        return iPage;
    }
@@ -727,7 +741,9 @@
        Page<EmpOccupational> page = new Page<EmpOccupational>(new Long(pageNum), new Long(pageSize));
        IPage<EmpOccupational> iPage = null;
        //工伤案件
        iPage = this.empBaseInfoMapper.empBaseInfoGsList(page, index, btime, etime, name, number);
        String[] split = remoteDeptService.userRightDepts().split(StringConstant.COMMA);
        List<String> lists= Arrays.asList(split);
        iPage = this.empBaseInfoMapper.empBaseInfoGsList(page, index, btime, etime, name, number,lists);
        return iPage;
    }
@@ -736,7 +752,9 @@
        Page<EmpAccidentCases> page = new Page<EmpAccidentCases>(new Long(pageNum), new Long(pageSize));
        IPage<EmpAccidentCases> iPage = null;
        //意外险案件
        iPage = this.empBaseInfoMapper.empBaseInfoYwList(page, index, btime, etime, name, number);
        String[] split = remoteDeptService.userRightDepts().split(StringConstant.COMMA);
        List<String> lists= Arrays.asList(split);
        iPage = this.empBaseInfoMapper.empBaseInfoYwList(page, index, btime, etime, name, number,lists);
        return iPage;
    }
@@ -745,7 +763,9 @@
        Page<EmpInsurance> page = new Page<EmpInsurance>(new Long(pageNum), new Long(pageSize));
        IPage<EmpInsurance> iPage = null;
        //社保
        iPage = this.empBaseInfoMapper.empBaseInfoSbList(page, index, btime, etime, name, number);
        String[] split = remoteDeptService.userRightDepts().split(StringConstant.COMMA);
        List<String> lists= Arrays.asList(split);
        iPage = this.empBaseInfoMapper.empBaseInfoSbList(page, index, btime, etime, name, number,lists);
        return iPage;
    }
@@ -754,7 +774,9 @@
        Page<EmpUnemployment> page = new Page<EmpUnemployment>(new Long(pageNum), new Long(pageSize));
        IPage<EmpUnemployment> iPage = null;
        //失业金
        iPage = this.empBaseInfoMapper.empBaseInfoSyjList(page, index, btime, etime, name, number);
        String[] split = remoteDeptService.userRightDepts().split(StringConstant.COMMA);
        List<String> lists= Arrays.asList(split);
        iPage = this.empBaseInfoMapper.empBaseInfoSyjList(page, index, btime, etime, name, number,lists);
        return iPage;
    }
@@ -763,7 +785,9 @@
        Page<EmpBadRecord> page = new Page<EmpBadRecord>(new Long(pageNum), new Long(pageSize));
        IPage<EmpBadRecord> iPage = null;
        //不良记录
        iPage = this.empBaseInfoMapper.empBaseInfoBlList(page, index, btime, etime, name, number);
        String[] split = remoteDeptService.userRightDepts().split(StringConstant.COMMA);
        List<String> lists= Arrays.asList(split);
        iPage = this.empBaseInfoMapper.empBaseInfoBlList(page, index, btime, etime, name, number,lists);
        return iPage;
    }
@@ -776,55 +800,59 @@
            manOld = sysConfig.get(0).getConfigValue();
            womanOld = sysConfig.get(1).getConfigValue();
        }
        QueryWrapper queryWrapper=new QueryWrapper();
        queryWrapper.in("t1.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA));
        //在职员工,正式员工,临时员工,超龄员工
        Map<String, Object> stringObjectMap = this.baseMapper.countBaseInfoList(index, btime, etime, manOld, womanOld);
        Map<String, Object> stringObjectMap = this.baseMapper.countBaseInfoList(index, btime, etime, manOld, womanOld,queryWrapper);
        //正常离职,自动离职,公司辞退    判断条件创建日期
        Map<String, Object> zclzObjectMap = this.baseMapper.countZcygBaseInfoList(index, btime, etime);
        Map<String, Object> zclzObjectMap = this.baseMapper.countZcygBaseInfoList(index, btime, etime,queryWrapper);
        if (zclzObjectMap != null) {
            stringObjectMap.put("zclz", zclzObjectMap.get("zclz").toString());
            stringObjectMap.put("zdlz", zclzObjectMap.get("zdlz").toString());
            stringObjectMap.put("gsct", zclzObjectMap.get("gsct").toString());
        }
        //新进员工      判断条件入职日期
        Integer xjygObjectMap = this.baseMapper.countXjygBaseInfoList(index, btime, etime);
        Integer xjygObjectMap = this.baseMapper.countXjygBaseInfoList(index, btime, etime,queryWrapper);
        if (xjygObjectMap != null) {
            stringObjectMap.put("xjyg", xjygObjectMap);
        }
        //离职员工总数
        Integer empStatus = this.baseMapper.selectCount(new QueryWrapper<EmpBaseInfo>().eq("delFlag", 0).eq("empStatus", 1));
        Integer empStatus = this.baseMapper.selectCountlz(new QueryWrapper<EmpBaseInfo>()
                .eq("t.delFlag", 0).eq("t.empStatus", 1)
                .in("t1.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)));
        if (empStatus != null) {
            stringObjectMap.put("lzyg", empStatus);
        }
        //解除合同        判断条件离职申请日期
        Map<String, Object> lzygObjectMap = this.baseMapper.countLzygBaseInfoList(index, btime, etime);
        Map<String, Object> lzygObjectMap = this.baseMapper.countLzygBaseInfoList(index, btime, etime,queryWrapper);
        if (lzygObjectMap != null) {
            stringObjectMap.put("jcht", lzygObjectMap.get("jcht").toString());
        }
        //辞职申请员工总数     判断条件辞职申请日期
        Integer czygObjectMap = this.baseMapper.countCzygBaseInfoList(index, btime, etime);
        Integer czygObjectMap = this.baseMapper.countCzygBaseInfoList(index, btime, etime,queryWrapper);
        if (czygObjectMap != null) {
            stringObjectMap.put("czyg", czygObjectMap);
        }
        //有效合同    判断条件合同签订日期
        Map<String, Object> yxhtObjectMap = this.baseMapper.countYxhtBaseInfoList(index, btime, etime);
        Map<String, Object> yxhtObjectMap = this.baseMapper.countYxhtBaseInfoList(index, btime, etime,queryWrapper);
        if (yxhtObjectMap != null) {
            stringObjectMap.put("yxht", yxhtObjectMap.get("yxht").toString());
        }
        //新签合同,续签合同    判断条件合同签订日期
        Map<String, Object> xqhtObjectMap = this.baseMapper.countXqhtBaseInfoList(index, btime, etime);
        Map<String, Object> xqhtObjectMap = this.baseMapper.countXqhtBaseInfoList(index, btime, etime,queryWrapper);
        if (yxhtObjectMap != null) {
            stringObjectMap.put("xinqht", xqhtObjectMap.get("xinqht").toString());
            stringObjectMap.put("xqht", xqhtObjectMap.get("xqht").toString());
        }
        //到期合同     判断条件合同结束时间
        Integer dqhtObjectMap = this.baseMapper.countDqhtBaseInfoList(index, btime, etime);
        Integer dqhtObjectMap = this.baseMapper.countDqhtBaseInfoList(index, btime, etime,queryWrapper);
        if (dqhtObjectMap != null) {
            stringObjectMap.put("dqht", dqhtObjectMap);
        }
        //出勤人数,员工加班,员工旷工    判断条件考勤月份    本年,本月
        Map<String, Object> cqrsObjectMap = this.baseMapper.countCqrsBaseInfoList(index, btime, etime);
        Map<String, Object> cqrsObjectMap = this.baseMapper.countCqrsBaseInfoList(index, btime, etime,queryWrapper);
        if (cqrsObjectMap != null) {
            stringObjectMap.put("cqrs", cqrsObjectMap.get("cqrs").toString());
            stringObjectMap.put("ygjb", cqrsObjectMap.get("ygjb").toString());
@@ -832,51 +860,51 @@
        }
        //员工请假     判断条件到岗时间
        Integer ygqjObjectMap = this.baseMapper.countYgqjBaseInfoList(index, btime, etime);
        Integer ygqjObjectMap = this.baseMapper.countYgqjBaseInfoList(index, btime, etime,queryWrapper);
        if (ygqjObjectMap != null) {
            stringObjectMap.put("ygqj", ygqjObjectMap);
        }
        //劳资案件     判断条件仲裁日期
        Integer lzajObjectMap = this.baseMapper.countLzajBaseInfoList(index, btime, etime);
        Integer lzajObjectMap = this.baseMapper.countLzajBaseInfoList(index, btime, etime,queryWrapper);
        if (lzajObjectMap != null) {
            stringObjectMap.put("lzaj", lzajObjectMap);
        }
        //工伤案件,意外险案件     判断条件受伤日期
        Map<String, Object> gsajObjectMap = this.baseMapper.countGsajBaseInfoList(index, btime, etime);
        Map<String, Object> gsajObjectMap = this.baseMapper.countGsajBaseInfoList(index, btime, etime,queryWrapper);
        if (gsajObjectMap != null) {
            stringObjectMap.put("gsaj", gsajObjectMap.get("gsaj").toString());
            stringObjectMap.put("ywxaj", gsajObjectMap.get("ywxaj").toString());
        }
        //社保申请     判断条件社保申请日期
        Integer sbsqObjectMap = this.baseMapper.countSbsqBaseInfoList(index, btime, etime);
        Integer sbsqObjectMap = this.baseMapper.countSbsqBaseInfoList(index, btime, etime,queryWrapper);
        if (sbsqObjectMap != null) {
            stringObjectMap.put("sbsq", sbsqObjectMap);
        }
        //失业金领取     判断条件失业金申请日期
        Integer syjObjectMap = this.baseMapper.countSyjBaseInfoList(index, btime, etime);
        Integer syjObjectMap = this.baseMapper.countSyjBaseInfoList(index, btime, etime,queryWrapper);
        if (syjObjectMap != null) {
            stringObjectMap.put("syj", syjObjectMap);
        }
        //员工体检     判断条件体检日期
        Integer ygtjObjectMap = this.baseMapper.countYgtjBaseInfoList(index, btime, etime);
        Integer ygtjObjectMap = this.baseMapper.countYgtjBaseInfoList(index, btime, etime,queryWrapper);
        if (ygtjObjectMap != null) {
            stringObjectMap.put("ygtj", ygtjObjectMap);
        }
        //身份证到期     判断条件身份证有效时间
        Integer sfzObjectMap = this.baseMapper.countSfzBaseInfoList(index, btime, etime);
        Integer sfzObjectMap = this.baseMapper.countSfzBaseInfoList(index, btime, etime,queryWrapper);
        if (sfzObjectMap != null) {
            stringObjectMap.put("sfz", sfzObjectMap);
        }
        //员工调岗     判断条件身份证有效时间
        Integer ygtgObjectMap = this.baseMapper.countYgtgBaseInfoList(index, btime, etime);
        Integer ygtgObjectMap = this.baseMapper.countYgtgBaseInfoList(index, btime, etime,queryWrapper);
        if (ygtgObjectMap != null) {
            stringObjectMap.put("ygtg", ygtgObjectMap);
        }
        //不良记录     判断条件身份证有效时间
        Integer bljlObjectMap = this.baseMapper.countBljlBaseInfoList(index, btime, etime);
        Integer bljlObjectMap = this.baseMapper.countBljlBaseInfoList(index, btime, etime,queryWrapper);
        if (bljlObjectMap != null) {
            stringObjectMap.put("bljl", bljlObjectMap);
        }
@@ -1215,4 +1243,9 @@
        return this.count(queryWrapper) > 0;
    }
    @Override
    public List<EmpBaseInfo> listAll(QueryWrapper<EmpBaseInfo> wrapper) {
        return this.baseMapper.listAll(wrapper);
    }
}