fix: 人员数据治理迁移功能优化4
This commit is contained in:
@@ -80,8 +80,8 @@ public class SysDataUserPullController {
|
|||||||
@At
|
@At
|
||||||
@SaCheckPermission("sys.data.user.pull")
|
@SaCheckPermission("sys.data.user.pull")
|
||||||
@ApiModelProperty("获取下拉框数据(单位、在职状态、教职工类别)")
|
@ApiModelProperty("获取下拉框数据(单位、在职状态、教职工类别)")
|
||||||
public Result searchOptions() {
|
public Result searchOptions(@Param("pullTime") String pullTime) {
|
||||||
return Result.success(sysUserPullService.searchOptions());
|
return Result.success(sysUserPullService.searchOptions(pullTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
|
|||||||
@@ -128,6 +128,26 @@ public class Sys_user extends BaseModel implements Serializable {
|
|||||||
// @DataCenterColumn(name = "学位", key = "zgxwmc")
|
// @DataCenterColumn(name = "学位", key = "zgxwmc")
|
||||||
private String academicDegree;
|
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
|
@Column
|
||||||
@Comment("岗位类别")
|
@Comment("岗位类别")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
@@ -176,6 +196,11 @@ public class Sys_user extends BaseModel implements Serializable {
|
|||||||
// @DataCenterColumn(name = "行政岗级", key = "xzgj")
|
// @DataCenterColumn(name = "行政岗级", key = "xzgj")
|
||||||
private String administrativePositionLevel;
|
private String administrativePositionLevel;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("来校时间")
|
||||||
|
@ColDefine(type = ColType.DATE)
|
||||||
|
private Date arrivalAtSchooDate;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("来校时间")
|
@Comment("来校时间")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
@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")
|
@DataCenterColumn(name = "在岗情况码", key = "ZGQKM", dict = "USER_DUTY_SITUATION")
|
||||||
private String dutySituation;
|
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
|
@Column
|
||||||
@Comment("教职工类别码")
|
@Comment("教职工类别码")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
@@ -325,6 +365,17 @@ public class Sys_user extends BaseModel implements Serializable {
|
|||||||
@ColDefine(type = ColType.VARCHAR, customType = "text")
|
@ColDefine(type = ColType.VARCHAR, customType = "text")
|
||||||
private String personalData;
|
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
|
@Column
|
||||||
@Comment("特长及获奖情况")
|
@Comment("特长及获奖情况")
|
||||||
@ColDefine(type = ColType.VARCHAR, customType = "text")
|
@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
|
@Override
|
||||||
public NutMap searchOptions() {
|
public NutMap searchOptions(String pullTime) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
unitName,
|
unitName,
|
||||||
@@ -279,12 +279,16 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl<Sys_user_source>
|
|||||||
personType
|
personType
|
||||||
FROM
|
FROM
|
||||||
sys_user_source
|
sys_user_source
|
||||||
|
$condition
|
||||||
GROUP BY
|
GROUP BY
|
||||||
unitName,
|
unitName,
|
||||||
userState,
|
userState,
|
||||||
preparedBy,
|
preparedBy,
|
||||||
personType
|
personType
|
||||||
""");
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX(Sys_user_source::getPullTime, "=", pullTime);
|
||||||
|
sql.setCondition(cnd);
|
||||||
List<NutMap> list = listMap(sql);
|
List<NutMap> list = listMap(sql);
|
||||||
List<String> unitNames = list.stream().map(user -> user.getString("unitName")).distinct().toList();
|
List<String> unitNames = list.stream().map(user -> user.getString("unitName")).distinct().toList();
|
||||||
List<String> userStates = list.stream().map(user -> user.getString("userState")).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>
|
<div id="app" v-cloak>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<search @search="doSearch">
|
<search :is-search-button="false">
|
||||||
<search-item label="拉取时间">
|
<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-option v-for="item in pullTimeOptions" :label="item.pullTime" :value="item.pullTime"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
@@ -57,6 +57,11 @@ layout("/layouts/platform.html"){
|
|||||||
<el-option v-for="item in personTypeOptions" :label="item" :value="item"></el-option>
|
<el-option v-for="item in personTypeOptions" :label="item" :value="item"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</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>
|
</search>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
@@ -116,6 +121,8 @@ layout("/layouts/platform.html"){
|
|||||||
userStateOptions: [],
|
userStateOptions: [],
|
||||||
preparedByOptions: [],
|
preparedByOptions: [],
|
||||||
personTypeOptions: [],
|
personTypeOptions: [],
|
||||||
|
filterOptionsByPullTime: false,
|
||||||
|
searchOptionsRequest: 0,
|
||||||
pullTimeOptions: false,
|
pullTimeOptions: false,
|
||||||
sourceTime: [],
|
sourceTime: [],
|
||||||
pullTimeDialogVisible: false,
|
pullTimeDialogVisible: false,
|
||||||
@@ -137,7 +144,6 @@ layout("/layouts/platform.html"){
|
|||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$message.success(resp.msg)
|
this.$message.success(resp.msg)
|
||||||
this.getPullTimeOptions()
|
this.getPullTimeOptions()
|
||||||
this.doSearch()
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
@@ -147,27 +153,50 @@ layout("/layouts/platform.html"){
|
|||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
|
|
||||||
getSearchOptions() {
|
handlePullTimeChange() {
|
||||||
this.$axios.post("/platform/sys/data/user/pull/searchOptions").then((resp) => {
|
if (this.filterOptionsByPullTime) {
|
||||||
if (resp.code === 0) {
|
this.getSearchOptions()
|
||||||
this.unitNameOptions = resp.data.unitNames
|
} else {
|
||||||
this.userStateOptions = resp.data.userStates
|
this.doSearch()
|
||||||
this.personTypeOptions = resp.data.personTypes
|
}
|
||||||
this.preparedByOptions = resp.data.preparedBys
|
},
|
||||||
|
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() {
|
getPullTimeOptions() {
|
||||||
this.$axios.post("/platform/sys/data/user/pull/pullTimeOptions").then((resp) => {
|
this.$axios.post("/platform/sys/data/user/pull/pullTimeOptions").then((resp) => {
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.pullTimeOptions = resp.data
|
this.pullTimeOptions = resp.data
|
||||||
if (this.pullTimeOptions.length > 0) {
|
this.$set(this.pageForm, 'pullTime', this.pullTimeOptions.length > 0 ? this.pullTimeOptions[0].pullTime : '')
|
||||||
this.pageForm.pullTime = this.pullTimeOptions[0].pullTime
|
if (!this.pullTimeOptions.length) {
|
||||||
this.pageData()
|
|
||||||
} else {
|
|
||||||
this.tableData = []
|
this.tableData = []
|
||||||
this.pageForm.totalCount = 0
|
this.pageForm.totalCount = 0
|
||||||
}
|
}
|
||||||
|
this.getSearchOptions()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -191,7 +220,7 @@ layout("/layouts/platform.html"){
|
|||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$message.success(resp.msg)
|
this.$message.success(resp.msg)
|
||||||
this.pullTimeDialogVisible = false
|
this.pullTimeDialogVisible = false
|
||||||
this.doSearch()
|
this.getPullTimeOptions()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -199,7 +228,6 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.pageData()
|
// this.pageData()
|
||||||
this.getSearchOptions()
|
|
||||||
this.getPullTimeOptions()
|
this.getPullTimeOptions()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user