This commit is contained in:
2026-05-20 09:08:44 +08:00
parent 480fa9d559
commit eb01d6b109
3 changed files with 31 additions and 18 deletions
@@ -126,6 +126,7 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl<Sys_user_source>
httpRequest.body(JSONUtil.toJsonStr(Map.of()));
String resBody = httpRequest.execute().body();
log.info("接口返回数据: {}", resBody);
JSONObject jsonBody = JSONUtil.parseObj(resBody);
if (jsonBody.getInt("code") != 200) {
@@ -5,6 +5,7 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
@@ -13,6 +14,7 @@ import com.budwk.app.base.model.ExcelImportRes;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.utils.CommonDownloadUtil;
import com.budwk.app.web.commons.auth.utils.AuthUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.model.MutualInsuranceProject;
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.param.MutualInsuranceRosterUserPageForm;
@@ -132,7 +134,7 @@ public class MutualInsuranceRosterController {
@At
@ApiOperation("按勾选人员删除名单")
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("mutualInsurance.roster")
@SaCheckPermission("mutualInsurance.roster.delete")
@SLog(type = "mutualInsurance", tag = "省级互助保障", msg = "按勾选人员删除名单")
public Result deleteSelected(String ids) {
String[] idArray = parseIds(ids);
@@ -146,7 +148,7 @@ public class MutualInsuranceRosterController {
@At
@Ok("void")
@ApiOperation("下载人员名单导入模板")
@SaCheckPermission("mutualInsurance.roster")
@SaCheckPermission("mutualInsurance.roster.import")
public void downloadTem(HttpServletResponse response) {
List<ExcelExportEntity> entities = new ArrayList<>();
entities.add(new ExcelExportEntity("工号", "loginName", 20));
@@ -231,7 +233,9 @@ public class MutualInsuranceRosterController {
entityList.add(new ExcelExportEntity("性别", "sex", 20));
entityList.add(new ExcelExportEntity("所属工会", "unionName", 20));
entityList.add(new ExcelExportEntity("所属单位", "unitName", 20));
entityList.add(new ExcelExportEntity("事项名称", "projectName", 30));
if (AuthUtil.hasRoleOr("SYSADMIN", "SCHOOL_UNION_ADMIN")) {
entityList.add(new ExcelExportEntity("事项名称", "projectName", 30));
}
entityList.add(new ExcelExportEntity("手机号", "mobile", 20));
entityList.add(new ExcelExportEntity("身份证号", "idCard", 25));
entityList.add(new ExcelExportEntity("是否确认", "isAuditText", 20));
@@ -30,7 +30,7 @@ layout("/layouts/platform.html"){
<search-item label="姓名/工号">
<el-input v-model="pageForm.searchKeyword" clearable placeholder="请输入姓名或工号"></el-input>
</search-item>
<search-item label="所属工会" v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">
<search-item label="所属工会" v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">
<el-select v-model="pageForm.unionId"
placeholder="请选择所属工会"
clearable
@@ -67,18 +67,26 @@ layout("/layouts/platform.html"){
<el-card shadow="never" class="mt10">
<table-tool label="人员名单">
<el-button type="primary" size="small" @click="openFeedback">问题反馈</el-button>
<el-button type="primary" size="small" @click="openFeedback"
v-if="$auth.hasRoleOr(['BRANCH_UNION_CHAIRMAN'])">问题反馈</el-button>
<el-button type="primary"
size="small"
@click="openImport"
v-if="$auth.hasPermissionOr(['mutualInsurance.roster.import'])">导入名单</el-button>
<el-button type="primary" size="small" @click="openAddUser">添加人员</el-button>
<el-button type="primary"
size="small"
@click="openAddUser"
v-if="$auth.hasPermissionOr(['mutualInsurance.roster.import'])">添加人员</el-button>
<el-button type="primary" size="small" @click="exportData">导出</el-button>
<el-button type="primary" size="small" :disabled="!pageForm.projectId" @click="doAuditByUnion(true)">按工会确认</el-button>
<el-button type="danger" size="small" :disabled="!pageForm.projectId" @click="doAuditByUnion(false)">按工会取消确认</el-button>
<el-button type="primary" size="small" :disabled="selectedIds.length === 0" @click="doAuditSelected(true)">勾选确认</el-button>
<el-button type="danger" size="small" :disabled="selectedIds.length === 0" @click="doAuditSelected(false)">勾选取消确认</el-button>
<el-button type="danger" size="small" :disabled="selectedIds.length === 0" @click="deleteSelected">批量删除</el-button>
<el-button type="danger"
size="small"
:disabled="selectedIds.length === 0"
@click="deleteSelected"
v-if="$auth.hasPermissionOr(['mutualInsurance.roster.delete'])">批量删除</el-button>
</table-tool>
<el-table :data="tableData"
@@ -97,7 +105,9 @@ layout("/layouts/platform.html"){
<el-table-column prop="sex" label="性别" align="center" header-align="center"></el-table-column>
<el-table-column prop="unionName" label="所属工会" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="unitName" label="所属单位" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="projectName" label="事项名称" min-width="180px" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="projectName" label="事项名称" min-width="180px" align="center"
v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])"
header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="mobile" label="手机号" align="center" header-align="center"></el-table-column>
<el-table-column prop="idCard" label="身份证号" min-width="170px" align="center" header-align="center"></el-table-column>
<el-table-column prop="isAudit" label="确认状态" align="center" header-align="center">
@@ -279,7 +289,7 @@ layout("/layouts/platform.html"){
<script>
const vue = new Vue({
el: "#app",
mixins: [initTableMixins],
mixins: [initTableMixins],
data() {
return {
pageForm: {
@@ -545,8 +555,8 @@ layout("/layouts/platform.html"){
"&isAudit=" + encodeURIComponent(form.isAudit || ""))
},
validateFeedbackCondition() {
if (!this.pageForm.year || !this.pageForm.projectId || !this.pageForm.unionId) {
this.notifyWarning("请先选择年度、事项、所属工会")
if (!this.pageForm.year || !this.pageForm.projectId) {
this.notifyWarning("请先选择年度、事项")
return false
}
return true
@@ -632,13 +642,11 @@ layout("/layouts/platform.html"){
})
}
},
created() {
this.$businessTool.listUnion().then((res) => {
this.unions = res
if (!this.pageForm.unionId && this.unions && this.unions.length === 1) {
this.pageForm.unionId = this.unions[0].id
}
})
async created() {
this.unions = await this.$businessTool.listUnion()
if (!this.pageForm.unionId && this.unions && this.unions.length === 1) {
this.pageForm.unionId = this.unions[0].id
}
this.flushUnits()
this.yearChange()
}