Compare commits
2 Commits
525e2a55a8
...
21fccf991c
| Author | SHA1 | Date | |
|---|---|---|---|
| 21fccf991c | |||
| 7d09bd59e3 |
@@ -236,6 +236,13 @@ public class SysLoginController
|
||||
Integer pendCount = jobApplyService.selectPendCount(user.getIdCard());
|
||||
user.setPendCount(pendCount == null ? 0 : pendCount);
|
||||
}
|
||||
//获取求职者是否是监管端
|
||||
boolean flagQzz = user.getRoles().stream().anyMatch(it -> StringUtil.QZZ_ADMIN_ROLE_KEY.equals(it.getRoleId()));
|
||||
if(flagQzz){
|
||||
boolean hasLiveAccess=loginService.getIsJbdUser(user.getIdCard());
|
||||
user.setHasLiveAccess(hasLiveAccess?1:0);
|
||||
}
|
||||
|
||||
ajax.put("user", user);
|
||||
ajax.put("roles", roles);
|
||||
ajax.put("permissions", permissions);
|
||||
|
||||
@@ -56,4 +56,6 @@ public interface AppUserMapper extends BaseMapper<AppUser>
|
||||
void batchAddUser(List<AppUser> list);
|
||||
|
||||
AppUser getAppUserBase(@Param("idCard") String idCard);
|
||||
|
||||
Integer getIsJbdUser(@Param("idCard") String idCard);
|
||||
}
|
||||
|
||||
@@ -99,4 +99,6 @@ public interface IAppUserService
|
||||
public void updateAppUserWgyEncrypt();
|
||||
|
||||
public AppUser getAppUserBase(String idCard);
|
||||
|
||||
Integer getIsJbdUser(String idCard);
|
||||
}
|
||||
|
||||
@@ -1129,4 +1129,9 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
|
||||
public AppUser getAppUserBase(String idCard){
|
||||
return appUserMapper.getAppUserBase(idCard);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getIsJbdUser(String idCard) {
|
||||
return appUserMapper.getIsJbdUser(idCard);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -887,7 +887,7 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
}
|
||||
}
|
||||
//插入岗位表
|
||||
// importData();
|
||||
importData();
|
||||
logger.info("数据导入完成,总共插入 {} 条数据", totalInserted);
|
||||
} catch (Exception e) {
|
||||
logger.error("导入数据过程中发生异常: " + e.getMessage(), e);
|
||||
@@ -949,6 +949,8 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
String formattedDate = now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
Job jobOne = null;
|
||||
int repeatJobCount = 0;
|
||||
List<String> repeatJobInfoList = new ArrayList<>();
|
||||
for (RowWork rowWork : rowWorks) {
|
||||
try {
|
||||
Job job = new Job();
|
||||
@@ -959,6 +961,15 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
jobOne = jobMapper.selectOne(Wrappers.lambdaQuery(Job.class).eq(Job::getJobTitle, rowWork.getAca112()).eq(Job::getMinSalary, Long.valueOf(rowWork.getSalaryLow())).eq(Job::getMaxSalary, rowWork.getSalaryHight())
|
||||
.eq(Job::getCompanyName, rowWork.getAAB004()).eq(Job::getJobLocation, rowWork.getAAE006()).orderByDesc(Job::getCreateTime).last("LIMIT 1"));
|
||||
if (jobOne != null) {
|
||||
//统计重复
|
||||
repeatJobCount++;
|
||||
String repeatInfo = String.format("岗位名称:%s,公司:%s,地点:%s,薪资区间:%s-%s",
|
||||
rowWork.getAca112(),
|
||||
rowWork.getAAB004(),
|
||||
rowWork.getAAE006(),
|
||||
rowWork.getSalaryLow(),
|
||||
rowWork.getSalaryHight());
|
||||
repeatJobInfoList.add(repeatInfo);
|
||||
continue;
|
||||
}
|
||||
job.setJobTitle(rowWork.getAca112());
|
||||
@@ -1014,6 +1025,10 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
job.setCreateTime(formattedDate);
|
||||
job.setRowId(Long.valueOf(rowWork.getId()));
|
||||
job.setJobStatus(StringUtil.HIRE_LY);//上架
|
||||
job.setDownTime(DateUtils.getMonthThree(DateUtils.YYYY_MM_DD_HH_MM_SS));//下架时间当前时间+3个月
|
||||
if(StringUtils.isBlank(job.getJobLocationAreaCode())){
|
||||
job.setRegionCode(StringUtil.getAreaToRegionCode(job.getJobLocationAreaCode()));//行政区划
|
||||
}
|
||||
|
||||
jobBatch.add(job);
|
||||
|
||||
@@ -1043,6 +1058,17 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
} else {
|
||||
logger.info("不存在新插入的数据:");
|
||||
}
|
||||
System.out.println("====================岗位重复统计结果====================");
|
||||
System.out.println("本次导入重复岗位总数量:" + repeatJobCount);
|
||||
if (repeatJobCount > 0) {
|
||||
System.out.println("重复岗位明细列表:");
|
||||
for (String info : repeatJobInfoList) {
|
||||
System.out.println(info);
|
||||
}
|
||||
} else {
|
||||
System.out.println("本次导入无重复岗位");
|
||||
}
|
||||
System.out.println("========================================================");
|
||||
} catch (Exception e) {
|
||||
logger.error("导入数据过程中发生异常: {}", e.getMessage(), e);
|
||||
throw new RuntimeException(e);
|
||||
|
||||
@@ -15,6 +15,8 @@ public class StringUtil {
|
||||
/*1101(求职者)、1102(招聘者)、1103(网格员)、1104(内部工作者)*/
|
||||
public static final Long COMPANY_ADMIN_ROLE_KEY = 1102L;
|
||||
|
||||
public static final Long QZZ_ADMIN_ROLE_KEY = 1101L;
|
||||
|
||||
/************************移动端角色开始***************************/
|
||||
/**
|
||||
* 移动端-企业用户
|
||||
|
||||
@@ -332,4 +332,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where aac147=#{idCard} limit 1
|
||||
</select>
|
||||
|
||||
<select id="getIsJbdUser" resultType="java.lang.Integer">
|
||||
select count(dw_userid) from dwd_system_user where id_card=#{idCard}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -117,6 +117,9 @@ public class SysUser extends BaseEntity
|
||||
/**未处理求职者条数*/
|
||||
public Integer pendCount;
|
||||
|
||||
/**处理直播配置显示 0 隐藏 1 显示*/
|
||||
private Integer hasLiveAccess;
|
||||
|
||||
public SysUser()
|
||||
{
|
||||
|
||||
@@ -385,6 +388,14 @@ public class SysUser extends BaseEntity
|
||||
this.pendCount = pendCount;
|
||||
}
|
||||
|
||||
public Integer getHasLiveAccess() {
|
||||
return hasLiveAccess;
|
||||
}
|
||||
|
||||
public void setHasLiveAccess(Integer hasLiveAccess) {
|
||||
this.hasLiveAccess = hasLiveAccess;
|
||||
}
|
||||
|
||||
public void setRoleIdsStr(String roleIdsStr) {
|
||||
this.roleIdsStr = roleIdsStr;
|
||||
if (!StringUtils.isBlank(roleIdsStr)) {
|
||||
@@ -424,6 +435,7 @@ public class SysUser extends BaseEntity
|
||||
.append("phonenumberEncrypt", getPhonenumberEncrypt())
|
||||
.append("idCardEncrypt", getIdCardEncrypt())
|
||||
.append("pendCount", getPendCount())
|
||||
.append("hasLiveAccess", getHasLiveAccess())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1055,4 +1055,17 @@ public class SysLoginService
|
||||
}
|
||||
return AjaxResult.success("验证成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据身份证查询当前用户是否时监管端账号
|
||||
* @param idCard
|
||||
* @return
|
||||
*/
|
||||
public boolean getIsJbdUser(String idCard){
|
||||
if (idCard == null || idCard.trim().length() == 0) {
|
||||
return false;
|
||||
}
|
||||
Integer count=appUserService.getIsJbdUser(idCard);
|
||||
return count != null && count > 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user