..
This commit is contained in:
+6
-105
@@ -1,23 +1,13 @@
|
||||
package com.budwk.app.sys.services.impl;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.thread.AsyncUtil;
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.event.user.SysUserEvent;
|
||||
import com.budwk.app.base.event.user.SysUserPublisher;
|
||||
import com.budwk.app.base.utils.ConditionGroupUtil;
|
||||
import com.budwk.app.base.utils.ManyAddOrRenewUtil;
|
||||
import com.budwk.app.base.utils.PwdUtil;
|
||||
import com.budwk.app.sys.annotation.DataCenterColumn;
|
||||
import com.budwk.app.sys.models.*;
|
||||
@@ -28,33 +18,26 @@ import com.budwk.app.sys.services.SysRoleService;
|
||||
import com.budwk.app.sys.services.SysUserService;
|
||||
import com.budwk.app.zhgh.staffmanage.member.constant.MemberChangeOrigin;
|
||||
import com.budwk.app.zhgh.staffmanage.member.constant.MemberChangeType;
|
||||
import com.budwk.app.zhgh.staffmanage.member.service.MemberManageService;
|
||||
import com.budwk.app.zhgh.staffmanage.specialstaff.model.SpecialStaff;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.random.R;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.Mvcs;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -185,86 +168,6 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
// 排除掉多单位人员不更新
|
||||
cnd.andEX(Sys_user_source::getLoginname, "not in", specialManyUnitStaffUserLoginNames);
|
||||
|
||||
|
||||
List<String> bsh = new ArrayList<>();
|
||||
bsh.add("91036");
|
||||
bsh.add("91035");
|
||||
bsh.add("91030");
|
||||
bsh.add("91034");
|
||||
bsh.add("91033");
|
||||
bsh.add("91031");
|
||||
bsh.add("91032");
|
||||
bsh.add("91027");
|
||||
bsh.add("91026");
|
||||
bsh.add("91024");
|
||||
bsh.add("91025");
|
||||
bsh.add("91023");
|
||||
bsh.add("91021");
|
||||
bsh.add("91020");
|
||||
bsh.add("91022");
|
||||
bsh.add("91018");
|
||||
bsh.add("91015");
|
||||
bsh.add("91017");
|
||||
bsh.add("91014");
|
||||
bsh.add("91013");
|
||||
bsh.add("91012");
|
||||
bsh.add("91011");
|
||||
bsh.add("91008");
|
||||
bsh.add("91004");
|
||||
bsh.add("90996");
|
||||
bsh.add("90994");
|
||||
bsh.add("90992");
|
||||
bsh.add("90993");
|
||||
bsh.add("90991");
|
||||
bsh.add("90990");
|
||||
bsh.add("90979");
|
||||
bsh.add("90978");
|
||||
bsh.add("90976");
|
||||
bsh.add("90975");
|
||||
bsh.add("90974");
|
||||
bsh.add("90972");
|
||||
bsh.add("90971");
|
||||
bsh.add("90973");
|
||||
bsh.add("90969");
|
||||
bsh.add("90966");
|
||||
bsh.add("90967");
|
||||
bsh.add("90965");
|
||||
bsh.add("90964");
|
||||
bsh.add("90968");
|
||||
bsh.add("90959");
|
||||
bsh.add("90957");
|
||||
bsh.add("90958");
|
||||
bsh.add("90961");
|
||||
bsh.add("90960");
|
||||
bsh.add("90952");
|
||||
bsh.add("90950");
|
||||
bsh.add("90951");
|
||||
bsh.add("90953");
|
||||
bsh.add("90954");
|
||||
bsh.add("90948");
|
||||
bsh.add("90947");
|
||||
bsh.add("90949");
|
||||
bsh.add("90946");
|
||||
bsh.add("90942");
|
||||
bsh.add("90937");
|
||||
bsh.add("90935");
|
||||
bsh.add("90934");
|
||||
bsh.add("90933");
|
||||
bsh.add("90932");
|
||||
bsh.add("90930");
|
||||
bsh.add("90927");
|
||||
bsh.add("90926");
|
||||
bsh.add("90913");
|
||||
bsh.add("90906");
|
||||
bsh.add("90904");
|
||||
bsh.add("90903");
|
||||
bsh.add("90901");
|
||||
bsh.add("90899");
|
||||
bsh.add("90898");
|
||||
bsh.add("90895");
|
||||
bsh.add("90894");
|
||||
|
||||
// cnd.and(Sys_user_source::getLoginname, "in", bsh);
|
||||
List<Sys_user_source> sources = dao.query(Sys_user_source.class, cnd.groupBy("loginname"));
|
||||
|
||||
log.info("符合条件的数据源记录数: {}", sources.size());
|
||||
@@ -283,6 +186,9 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
|
||||
// 处理每条数据
|
||||
for (Sys_user_source source : sources) {
|
||||
if (!"在岗".equals(source.getUserState())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Sys_user user = userMap.get(source.getLoginname());
|
||||
|
||||
@@ -296,10 +202,6 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
u.setSalt(salt);
|
||||
u.setPassword(PwdUtil.getPassword(PwdUtil.generate(12), salt));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 检查是否符合会员条件
|
||||
boolean shouldBeMember = checkMembershipEligibility(
|
||||
source.getUserState(),
|
||||
@@ -313,7 +215,6 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
addMemberUserIds.add(u.getId());
|
||||
} else {
|
||||
u.setMember(false);
|
||||
continue;
|
||||
}
|
||||
|
||||
needInitUserList.add(u);
|
||||
|
||||
Reference in New Issue
Block a user