xx
孔祥富
2021-03-14 1d73bcf0d8f48031d258c55d5843c42eee6271a0
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/service/impl/EmpBaseInfoServiceImpl.java
@@ -203,6 +203,12 @@
        empBaseInfo.setDelFlag(dbData.getDelFlag());
        empBaseInfo.setModifyTime(new Date());
        empBaseInfo.setModifier(operatorId);
        if(StringUtils.isBlank(empBaseInfo.getImagePath())){
            empBaseInfo.setImagePath(dbData.getImagePath());
        }
        if(StringUtils.isBlank(empBaseInfo.getAllDeptName())){
            empBaseInfo.setAllDeptName(dbData.getAllDeptName());
        }
        this.saveOrUpdate(empBaseInfo);
    }
@@ -268,10 +274,7 @@
            queryWrapper.lambda().ne(EmpBaseInfo::getEmpId, empBaseInfo.getEmpId());
        }
        if (this.count(queryWrapper) <= 0) {
            return false;
        }
        return true;
        return this.count(queryWrapper) > 0;
    }
    @Override
@@ -1200,4 +1203,16 @@
        boolean result = PoiExportExcel.exportCommonExcelMultiSheet(response, "在职员工列表", allList, sheetNames);
    }
    @Override
    public boolean verifyCertificateNumb(EmpBaseInfo empBaseInfo) {
        QueryWrapper<EmpBaseInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(EmpBaseInfo::getCertificateNumb, empBaseInfo.getCertificateNumb())
                .ne(EmpBaseInfo::getDelFlag, 1);;
        if (empBaseInfo.getEmpId()!=null) {
            queryWrapper.lambda().ne(EmpBaseInfo::getEmpId, empBaseInfo.getEmpId());
        }
        return this.count(queryWrapper) > 0;
    }
}