This commit is contained in:
Paidax
2025-04-28 08:40:55 +08:00
parent 9b9e53056f
commit d046c3be5d
144 changed files with 2559 additions and 1222 deletions
@@ -144,7 +144,7 @@ public class HMCFieldCode {
put("15", "因公出国");
put("16", "停薪留职");
put("17", "待岗");
put("99", "其他");
put("99", "其他减员");
}};
/**
* 校区码
@@ -54,7 +54,7 @@ public interface SourceData {
put("MZMC", new String[]{"nation"});// 民族码
put("SJ", new String[]{"mobile"}); // 手机号
put("ZZMMM", new String[]{"political"}); // 政治面貌码
put("DQZTM", new String[]{"userState"}); // 在职状态码
put("DQZTM", new String[]{"userState", "personalStatus"}); // 在职状态码
put("RYFLMC", new String[]{"personType"}); // 人员类型码
put("ZGXLM", new String[]{"education"}); // 最高学历码
put("ZGXWM", new String[]{"academicDegree"}); // 最高学位码
@@ -66,14 +66,14 @@ public interface SourceData {
put("ZYJSZWDJ", new String[]{"professionalTechnicalLevel"}); // 专业技术等级
put("JZGLBM", new String[]{"userCategory"}); // 教职工类别
put("GWLBM", new String[]{"jobCategory"}); // 岗位类别
put("LXRQ", new String[]{"schoolTime"}); // 岗位类别
put("LXRQ", new String[]{"schoolTime", "memberJoinTime"}); // 来校日期
put("LTQSRQ", new String[]{"retireDate"}); // 离退起始日期
}};
/**
* 字段插件
*/
Map<String, Exp4> USER_FIELD_PLUGIN = new HashMap<String, Exp4>() {{
// put("ZZZTMC", v -> Strings.sBlank(USER_STATE_CODE.get(v), ""));
put("XBM", v -> Strings.sBlank(HMCFieldCode.SEX_CODE.get(v), ""));
put("ZZMMM", v -> Strings.sBlank(HMCFieldCode.POLITICAL_CODE.get(v), ""));
put("DQZTM", v -> Strings.sBlank(HMCFieldCode.USER_STATE_CODE.get(v), ""));
@@ -154,8 +154,6 @@ public interface SourceData {
int page = 1;
String body = HttpUtil.createPost(DATA_URL).body(JSON.toJSONString(new NutMap().addv("address", "rsxt_dwjbsj").addv("params", new NutMap())
.addv("token", "3318a5a9-c2f2-4c8b-a8ea-e99dd68c165c").addv("pageIndex", page).addv("pageSize", 100))).execute().body();
// String body = HttpUtil.get(DATA_URL, new NutMap().addv("address", "rsxt_dwjbsj").addv("params", new NutMap())
// .addv("token", "3318a5a9-c2f2-4c8b-a8ea-e99dd68c165c").addv("pageIndex", page).addv("pageSize", 1000));
NutMap map = Json.fromJson(NutMap.class, body);
// checkSuccess(map);
List<NutMap> data = map.getAsList("data", NutMap.class);
@@ -72,9 +72,9 @@ public class SourceUserController {
CndPlus cnd = CndPlus.create();
cnd.and(pageForm);
cnd.andEx("unitid", "=", unitId);
cnd.andEx("personType", "=", personType);
cnd.andEx("userState", "=", userState);
cnd.andEX("unitid", "=", unitId);
cnd.andEX("personType", "=", personType);
cnd.andEX("userState", "=", userState);
if(!StringUtils.isEmpty(importDate)){
cnd.and("DATE(u.pullTime)", "=", importDate);
@@ -3,6 +3,7 @@ package io.v.nutz.zhgh.data.controller;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.hutool.core.util.StrUtil;
import io.v.nutz.base.annontation.ViReturn;
import io.v.nutz.base.dao.CndPlus;
import io.v.nutz.base.utils.ViResource;
@@ -77,12 +78,14 @@ public class UpdateUserController {
CndPlus cnd = CndPlus.create();
cnd.and(pageForm);
cnd.andEx("u.unitid", "=", unitId);
cnd.andEx("u.personType", "=", personType);
cnd.andEx("u.userState", "=", userState);
cnd.andEX("u.unitid", "=", unitId);
cnd.andEX("u.personType", "=", personType);
cnd.andEX("u.userState", "=", userState);
cnd.andEx("Date(his.changeTime)", "=", changeDate);
cnd.andEx("his.changeType", "=", changeType);
if (StrUtil.isNotBlank(changeDate)) {
cnd.and("DATE(his.changeTime)", "=", changeDate);
}
cnd.andEX("his.changeType", "=", changeType);
sql.setCondition(cnd);
@@ -195,6 +195,7 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
continue;
}
// 这里是杭医的不进系统人员的判断,其他学校用不到的话删掉
boolean isNotEnterUser = NOT_ENTERING_PERSON_TYPE.contains(source.getPersonType())
|| NOT_ENTERING_USER_LOGIN_NAME.contains(source.getLoginname())
|| NOT_ENTERING_USER_STATE.contains(source.getUserState());
@@ -243,7 +244,7 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
if (user != null) {
histories.add(history);
}
if (!isNotEnterUser && history.getChangeTypes().contains(MemberChangeType.NEW.getType())) {
if (!isNotEnterUser && Lang.isNotEmpty(history.getChangeTypes()) && history.getChangeTypes().contains(MemberChangeType.NEW.getType())) {
needInitUserList.add(u);
histories.add(history);
}
@@ -255,7 +256,7 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
if (user != null) {
middleTables.add(table);
}
if (!isNotEnterUser && table.getChangeTypes().contains(MemberChangeType.NEW.getType())) {
if (!isNotEnterUser && Lang.isNotEmpty(table.getChangeTypes()) && table.getChangeTypes().contains(MemberChangeType.NEW.getType())) {
needInitUserList.add(u);
middleTables.add(table);
}
@@ -287,7 +288,7 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
// 加入进行中的福利项目,暂时没写
// 历史记录表插入数据
// 历史记录表插入数据 artificial
if ("automatic".equals(changeConfig.getSourceChangeType())) {
// 自动更新,修改数据表,存储历史记录
if ("part".equals(sourceType)) {
@@ -528,6 +529,9 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
// 变更记录
List<NutMap> changeList = new ArrayList<>();
for (String fieldName : allowChangeFieldNames) {
if (allowChangeFieldNames.contains("retireDate") || allowChangeFieldNames.contains("welfareStopDate")) {
continue;
}
memberCommonService.extractChange(newMap, sourceMap, fieldName, dictMap, changeList);
}
if (Lang.isEmpty(changeList)) {
@@ -573,6 +577,9 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
NutMap sourceMap = Lang.obj2nutmap(user);
List<NutMap> changeList = new ArrayList<>();
for (String fieldName : allowChangeFieldNames) {
if (allowChangeFieldNames.contains("retireDate") || allowChangeFieldNames.contains("welfareStopDate")) {
continue;
}
memberCommonService.extractChange(newMap, sourceMap, fieldName, dictMap, changeList);
}
if (Lang.isEmpty(changeList)) {