fix: 人员数据治理迁移功能优化4

This commit is contained in:
2026-11-12 17:47:02 +08:00
parent 9beef68e62
commit b7194ecf7b
5 changed files with 104 additions and 21 deletions
@@ -80,8 +80,8 @@ public class SysDataUserPullController {
@At
@SaCheckPermission("sys.data.user.pull")
@ApiModelProperty("获取下拉框数据(单位、在职状态、教职工类别)")
public Result searchOptions() {
return Result.success(sysUserPullService.searchOptions());
public Result searchOptions(@Param("pullTime") String pullTime) {
return Result.success(sysUserPullService.searchOptions(pullTime));
}
@At
@@ -128,6 +128,26 @@ public class Sys_user extends BaseModel implements Serializable {
// @DataCenterColumn(name = "学位", key = "zgxwmc")
private String academicDegree;
@Column
@Comment("技术职称")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String technicalTitle;
@Column
@Comment("技术职称级别")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String technicalTitleLevel;
@Column
@Comment("职务")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String position;
@Column
@Comment("职员级别")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String employeeLevel;
@Column
@Comment("岗位类别")
@ColDefine(type = ColType.VARCHAR, width = 50)
@@ -176,6 +196,11 @@ public class Sys_user extends BaseModel implements Serializable {
// @DataCenterColumn(name = "行政岗级", key = "xzgj")
private String administrativePositionLevel;
@Column
@Comment("来校时间")
@ColDefine(type = ColType.DATE)
private Date arrivalAtSchooDate;
@Column
@Comment("来校时间")
@ColDefine(type = ColType.VARCHAR, width = 10)
@@ -210,6 +235,21 @@ public class Sys_user extends BaseModel implements Serializable {
@DataCenterColumn(name = "在岗情况码", key = "ZGQKM", dict = "USER_DUTY_SITUATION")
private String dutySituation;
@Column
@Comment("教职工类别")
@ColDefine(type = ColType.VARCHAR, width = 30)
private String staffCategory;
@Column
@Comment("教职工类别")
@ColDefine(type = ColType.VARCHAR, width = 30)
private String staffType;
@Column
@Comment("聘用方式")
@ColDefine(type = ColType.VARCHAR, width = 30)
private String employmentType;
@Column
@Comment("教职工类别码")
@ColDefine(type = ColType.VARCHAR, width = 30)
@@ -325,6 +365,17 @@ public class Sys_user extends BaseModel implements Serializable {
@ColDefine(type = ColType.VARCHAR, customType = "text")
private String personalData;
@Column
@Comment("是否是劳模")
@ColDefine(type = ColType.BOOLEAN)
@Default(value = "0")
private Boolean isModelWorker;
@Column
@Comment("劳模资料")
@ColDefine(type = ColType.MYSQL_JSON)
private List<JSONObject> modelWorkerFiles;
@Column
@Comment("特长及获奖情况")
@ColDefine(type = ColType.VARCHAR, customType = "text")
@@ -23,7 +23,7 @@ public interface SysDataUserPullService extends BaseService<Sys_user_source> {
/**
* 获取下拉框数据(单位、在职状态、编制类别、教职工类别)
*/
NutMap searchOptions();
NutMap searchOptions(String pullTime);
/**
* 获取数据源拉取时间列表
@@ -270,7 +270,7 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl<Sys_user_source>
}
@Override
public NutMap searchOptions() {
public NutMap searchOptions(String pullTime) {
Sql sql = Sqls.create("""
SELECT
unitName,
@@ -279,12 +279,16 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl<Sys_user_source>
personType
FROM
sys_user_source
$condition
GROUP BY
unitName,
userState,
preparedBy,
personType
""");
Cnd cnd = Cnd.NEW();
cnd.andEX(Sys_user_source::getPullTime, "=", pullTime);
sql.setCondition(cnd);
List<NutMap> list = listMap(sql);
List<String> unitNames = list.stream().map(user -> user.getString("unitName")).distinct().toList();
List<String> userStates = list.stream().map(user -> user.getString("userState")).distinct().toList();
@@ -25,9 +25,9 @@ layout("/layouts/platform.html"){
<div id="app" v-cloak>
<el-card shadow="never">
<search @search="doSearch">
<search :is-search-button="false">
<search-item label="拉取时间">
<el-select clearable v-model="pageForm.pullTime" placeholder="请选择拉取时间" :clearable="false" @change="doSearch">
<el-select clearable v-model="pageForm.pullTime" placeholder="请选择拉取时间" :clearable="false" @change="handlePullTimeChange">
<el-option v-for="item in pullTimeOptions" :label="item.pullTime" :value="item.pullTime"></el-option>
</el-select>
</search-item>
@@ -57,6 +57,11 @@ layout("/layouts/platform.html"){
<el-option v-for="item in personTypeOptions" :label="item" :value="item"></el-option>
</el-select>
</search-item>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
<el-switch v-model="filterOptionsByPullTime" active-text="按拉取时间筛选"
style="margin-left: 12px" @change="getSearchOptions"></el-switch>
</div>
</search>
</el-card>
@@ -116,6 +121,8 @@ layout("/layouts/platform.html"){
userStateOptions: [],
preparedByOptions: [],
personTypeOptions: [],
filterOptionsByPullTime: false,
searchOptionsRequest: 0,
pullTimeOptions: false,
sourceTime: [],
pullTimeDialogVisible: false,
@@ -137,7 +144,6 @@ layout("/layouts/platform.html"){
if (resp.code === 0) {
this.$message.success(resp.msg)
this.getPullTimeOptions()
this.doSearch()
}
})
.finally(() => {
@@ -147,27 +153,50 @@ layout("/layouts/platform.html"){
.catch(() => {})
},
getSearchOptions() {
this.$axios.post("/platform/sys/data/user/pull/searchOptions").then((resp) => {
if (resp.code === 0) {
this.unitNameOptions = resp.data.unitNames
this.userStateOptions = resp.data.userStates
this.personTypeOptions = resp.data.personTypes
this.preparedByOptions = resp.data.preparedBys
handlePullTimeChange() {
if (this.filterOptionsByPullTime) {
this.getSearchOptions()
} else {
this.doSearch()
}
},
async getSearchOptions() {
const request = ++this.searchOptionsRequest
const pullTime = this.filterOptionsByPullTime ? this.pageForm.pullTime : ''
let options = {}
if (!this.filterOptionsByPullTime || pullTime) {
try {
const resp = await this.$axios.post("/platform/sys/data/user/pull/searchOptions", pullTime ? { pullTime } : {})
options = resp.code === 0 ? resp.data : null
} catch (error) {
if (request === this.searchOptionsRequest) this.notifyWarning('筛选选项加载失败')
options = null
}
})
}
if (request !== this.searchOptionsRequest) return
if (options) {
const fields = {
unitName: 'unitNames', userState: 'userStates', preparedBy: 'preparedBys', personType: 'personTypes'
}
Object.entries(fields).forEach(([field, key]) => {
this[field + 'Options'] = options[key] || []
if (this.pageForm[field] && !this[field + 'Options'].includes(this.pageForm[field])) {
this.$set(this.pageForm, field, '')
}
})
}
if (this.pageForm.pullTime) this.doSearch()
},
getPullTimeOptions() {
this.$axios.post("/platform/sys/data/user/pull/pullTimeOptions").then((resp) => {
if (resp.code === 0) {
this.pullTimeOptions = resp.data
if (this.pullTimeOptions.length > 0) {
this.pageForm.pullTime = this.pullTimeOptions[0].pullTime
this.pageData()
} else {
this.$set(this.pageForm, 'pullTime', this.pullTimeOptions.length > 0 ? this.pullTimeOptions[0].pullTime : '')
if (!this.pullTimeOptions.length) {
this.tableData = []
this.pageForm.totalCount = 0
}
this.getSearchOptions()
}
})
},
@@ -191,7 +220,7 @@ layout("/layouts/platform.html"){
if (resp.code === 0) {
this.$message.success(resp.msg)
this.pullTimeDialogVisible = false
this.doSearch()
this.getPullTimeOptions()
}
})
})
@@ -199,7 +228,6 @@ layout("/layouts/platform.html"){
},
created() {
// this.pageData()
this.getSearchOptions()
this.getPullTimeOptions()
}
})