This commit is contained in:
server
2025-09-19 17:50:41 +08:00
parent f37ee94696
commit 655467676f
2 changed files with 98 additions and 24 deletions
@@ -27,7 +27,9 @@ import org.apache.poi.ss.usermodel.Workbook;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.Static;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
@@ -142,7 +144,7 @@ public class MemberSchoolUnionManageController {
@At
@Ok("void")
@SaCheckPermission("member.branchUnion.manage.list")
@SaCheckPermission("member.schoolUnion.manage.list")
public void doExport(MemberManagePageForm pageForm, HttpServletResponse response){
Sql sql = memberManageService.getSql(pageForm, "schoolUnion");
List<NutMap> list = memberManageService.listMap(sql);
@@ -171,4 +173,72 @@ public class MemberSchoolUnionManageController {
}
}
@At
@Ok("void")
@SaCheckPermission("member.schoolUnion.manage.list")
public void doExportNotEqPhone(MemberManagePageForm pageForm, HttpServletResponse response){
Sql sql = Sqls.create("""
SELECT
u.id,
u.sex,
u.loginname,
u.username,
u.mobile,
u.welfareMobile,
u.unitId,
u.unitName,
u.unionId,
u.unionName,
u.birthday,
u.manyUnit,
u.member,
u.userState,
u.preparedBy,
u.personType,
u.welfareMember,
u.isModelWorker,
u.wantJoinLoveMutualAidAssociation,
his.id hisId,
his.changeTypes,
his.changeTime
FROM
vw_user u
LEFT JOIN sys_user_history his ON his.loginname = u.loginname
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.and(new Static("u.mobile != u.welfareMobile"));
MemberManagePageForm.buildSearch(cnd, pageForm);
cnd.desc("his.changeTime");
cnd.groupBy("u.id");
cnd.asc("u.unionId");
cnd.asc("u.unitId");
cnd.asc("u.id");
sql.setCondition(cnd);
List<NutMap> list = memberManageService.listMap(sql);
List<ExcelExportEntity> exportEntities = new ArrayList<>();
exportEntities.add(new ExcelExportEntity("工号", "loginname", 20));
exportEntities.add(new ExcelExportEntity("姓名", "username", 20));
exportEntities.add(new ExcelExportEntity("性别", "sex", 20));
exportEntities.add(new ExcelExportEntity("出生年月", "birthday", 20));
exportEntities.add(new ExcelExportEntity("联系电话", "mobile", 20));
exportEntities.add(new ExcelExportEntity("福利号码", "welfareMobile", 20));
exportEntities.add(new ExcelExportEntity("在职状态", "userState", 20));
exportEntities.add(new ExcelExportEntity("聘用方式", "preparedBy", 20));
exportEntities.add(new ExcelExportEntity("人员类型", "personType", 20));
exportEntities.add(new ExcelExportEntity("所属工会", "unionName", 20));
exportEntities.add(new ExcelExportEntity("所属单位", "unitName", 30));
ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF);
try {
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
CommonDownloadUtil.download("会员福利号码不一致名单.xlsx", workbook, response);
} catch (Exception e) {
e.printStackTrace();
}
}
}
@@ -3,10 +3,16 @@ layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<member-manage-query ref="queryRef" @query-ready="onQueryReady"></member-manage-query>
<member-manage-table ref="tableRef" v-if="isQueryReady" @refresh="tableReady" @change-member="changeMember"
@view-member="viewMember" @add-member="addMember" @refresh-table="changeSuccess"></member-manage-table>
<member-manage-table
ref="tableRef"
v-if="isQueryReady"
@refresh="tableReady"
@change-member="changeMember"
@view-member="viewMember"
@add-member="addMember"
@refresh-table="changeSuccess"
></member-manage-table>
<template #view>
<member-info ref="memberInfoRef"></member-info>
@@ -23,7 +29,6 @@ layout("/layouts/platform.html"){
</div>
<script>
<!--#include("../../common/manage/memberManageQuery.js"){}#-->
<!--#include("../../common/manage/memberManageTable.js"){}#-->
<!--#include("../../common/info/memberInfo.js"){}#-->
@@ -35,9 +40,9 @@ layout("/layouts/platform.html"){
store,
mixins: [initTableMixins],
data: {
id: '',
username: '',
url:'',
id: "",
username: "",
url: "",
isQueryReady: false,
hasShownMessage: false
},
@@ -46,51 +51,50 @@ layout("/layouts/platform.html"){
"member-manage-table": MEMBER_MANAGE_TABLE,
"member-info": MEMBER_INFO,
"member-apply": MEMBER_APPLY,
"member-change": MEMBER_CHANGE,
"member-change": MEMBER_CHANGE
},
methods: {
changeMember(data){
changeMember(data) {
this.id = data.id
this.username = data.username
this.url = '/platform/member/branchUnion/manage/list/generalMemberChange'
this.url = "/platform/member/branchUnion/manage/list/generalMemberChange"
this.$refs.guava.public(() => {
this.$refs.memberChangeRef.init()
})
},
viewMember(val){
viewMember(val) {
this.$refs.guava.view(() => {
this.$refs.memberInfoRef.onOpen(val)
})
},
addMember(){
addMember() {
this.$refs.guava.edit()
},
onQueryReady(pageForm) {
this.isQueryReady = true;
this.isQueryReady = true
this.$nextTick(() => {
if (this.$refs.tableRef) {
this.$refs.tableRef.pageData();
this.$refs.tableRef.pageData()
this.$refs.tableRef.pageForm = pageForm
}
})
},
tableReady(pageForm){
tableReady(pageForm) {
this.$refs.queryRef.pageForm = pageForm
},
changeSuccess(){
changeSuccess() {
this.$refs.guava.index()
this.$nextTick(()=>{
this.$nextTick(() => {
this.$refs.tableRef.pageData()
})
if (this.hasShownMessage) return
setTimeout(() => {
this.$message.success('您已成功提交【'+ this.username +'】老师的变更,可前往分工会审核菜单查看审核记录');
}, 1000);
this.hasShownMessage = true;
// setTimeout(() => {
// this.$message.success('您已成功提交【'+ this.username +'】老师的变更,可前往分工会审核菜单查看审核记录');
// }, 1000);
this.hasShownMessage = true
}
},
created() {
}
created() {}
})
</script>
<!--#