南大三十年教职工疗休养

This commit is contained in:
2026-07-07 09:05:14 +08:00
parent 9fc06ba44a
commit c87aad7ead
2 changed files with 40 additions and 2 deletions
@@ -49,7 +49,7 @@ import java.util.stream.Collectors;
public class SysDataUserPullServiceImpl extends BaseServiceImpl<Sys_user_source> implements SysDataUserPullService {
private static final String TEACHER_MOBILE_CONFIG_KEY = "teacherMobile";
private static final int TEACHER_MOBILE_PAGE_SIZE = 1000;
private static final int TEACHER_MOBILE_PAGE_SIZE = 10;
private static final int TEACHER_MOBILE_DB_BATCH_SIZE = 500;
@Inject
@@ -63,6 +63,7 @@ layout("/layouts/platform.html"){
<el-card shadow="never">
<table-tool :label="pageForm.pullTime ? pageForm.pullTime + '数据' : '全部数据'">
<el-button type="primary" size="mini" :loading="pullLoading" @click="pull" icon="el-icon-download">拉取信息中心数据</el-button>
<el-button type="primary" size="mini" :loading="syncTeacherMobileLoading" @click="syncTeacherMobile" icon="el-icon-mobile-phone">同步教职工手机号</el-button>
<el-button type="danger" size="mini" @click="openDelete" icon="el-icon-delete">删除本地数据源</el-button>
</table-tool>
<el-table :key="tableKey" :data="tableData" @sort-change="pageOrder" header-align="center" v-loading="tableLoading">
@@ -120,7 +121,8 @@ layout("/layouts/platform.html"){
pullTimeOptions: false,
sourceTime: [],
pullTimeDialogVisible: false,
pullLoading: false
pullLoading: false,
syncTeacherMobileLoading: false
}
},
methods: {
@@ -148,6 +150,42 @@ layout("/layouts/platform.html"){
.catch(() => {})
},
syncTeacherMobile() {
this.$confirm("确定要同步教职工手机号吗?", "提示", {
type: "warning",
confirmButtonText: "确定",
cancelButtonText: "取消"
})
.then(() => {
this.syncTeacherMobileLoading = true
this.$axios
.post("/platform/sys/data/user/pull/syncTeacherMobile")
.then((resp) => {
if (resp.code === 0) {
const data = resp.data || {}
this.$alert(
"接口总数:" + (data.total || 0) +
"<br>总页数:" + (data.pages || 0) +
"<br>拉取数量:" + (data.pulledCount || 0) +
"<br>有效手机号数量:" + (data.validMobileCount || 0) +
"<br>匹配用户数量:" + (data.matchedUserCount || 0) +
"<br>更新用户数量:" + (data.updatedUserCount || 0),
"同步完成",
{
dangerouslyUseHTMLString: true,
confirmButtonText: "确定"
}
)
this.pageData()
}
})
.finally(() => {
this.syncTeacherMobileLoading = false
})
})
.catch(() => {})
},
getSearchOptions() {
this.$axios.post("/platform/sys/data/user/pull/searchOptions").then((resp) => {
if (resp.code === 0) {