diff --git a/src/main/java/com/budwk/app/sys/controller/SysDataUserPullController.java b/src/main/java/com/budwk/app/sys/controller/SysDataUserPullController.java index 1bb61fd..a946b7c 100644 --- a/src/main/java/com/budwk/app/sys/controller/SysDataUserPullController.java +++ b/src/main/java/com/budwk/app/sys/controller/SysDataUserPullController.java @@ -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 diff --git a/src/main/java/com/budwk/app/sys/models/Sys_user.java b/src/main/java/com/budwk/app/sys/models/Sys_user.java index fd4847b..b71e23d 100644 --- a/src/main/java/com/budwk/app/sys/models/Sys_user.java +++ b/src/main/java/com/budwk/app/sys/models/Sys_user.java @@ -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 modelWorkerFiles; + @Column @Comment("特长及获奖情况") @ColDefine(type = ColType.VARCHAR, customType = "text") diff --git a/src/main/java/com/budwk/app/sys/services/SysDataUserPullService.java b/src/main/java/com/budwk/app/sys/services/SysDataUserPullService.java index d12dec1..0d42a5c 100644 --- a/src/main/java/com/budwk/app/sys/services/SysDataUserPullService.java +++ b/src/main/java/com/budwk/app/sys/services/SysDataUserPullService.java @@ -23,7 +23,7 @@ public interface SysDataUserPullService extends BaseService { /** * 获取下拉框数据(单位、在职状态、编制类别、教职工类别) */ - NutMap searchOptions(); + NutMap searchOptions(String pullTime); /** * 获取数据源拉取时间列表 diff --git a/src/main/java/com/budwk/app/sys/services/impl/SysDataUserPullServiceImpl.java b/src/main/java/com/budwk/app/sys/services/impl/SysDataUserPullServiceImpl.java index 46a3b7e..c5fc1c8 100644 --- a/src/main/java/com/budwk/app/sys/services/impl/SysDataUserPullServiceImpl.java +++ b/src/main/java/com/budwk/app/sys/services/impl/SysDataUserPullServiceImpl.java @@ -270,7 +270,7 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl } @Override - public NutMap searchOptions() { + public NutMap searchOptions(String pullTime) { Sql sql = Sqls.create(""" SELECT unitName, @@ -279,12 +279,16 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl 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 list = listMap(sql); List unitNames = list.stream().map(user -> user.getString("unitName")).distinct().toList(); List userStates = list.stream().map(user -> user.getString("userState")).distinct().toList(); diff --git a/src/main/resources/views/platform/sys/data/user/pull.html b/src/main/resources/views/platform/sys/data/user/pull.html index 12780ca..14be046 100644 --- a/src/main/resources/views/platform/sys/data/user/pull.html +++ b/src/main/resources/views/platform/sys/data/user/pull.html @@ -25,9 +25,9 @@ layout("/layouts/platform.html"){
- + - + @@ -57,6 +57,11 @@ layout("/layouts/platform.html"){ +
+ 搜索 + +
@@ -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() } })