..
This commit is contained in:
+71
-1
@@ -27,7 +27,9 @@ import org.apache.poi.ss.usermodel.Workbook;
|
|||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.Static;
|
||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
@@ -142,7 +144,7 @@ public class MemberSchoolUnionManageController {
|
|||||||
|
|
||||||
@At
|
@At
|
||||||
@Ok("void")
|
@Ok("void")
|
||||||
@SaCheckPermission("member.branchUnion.manage.list")
|
@SaCheckPermission("member.schoolUnion.manage.list")
|
||||||
public void doExport(MemberManagePageForm pageForm, HttpServletResponse response){
|
public void doExport(MemberManagePageForm pageForm, HttpServletResponse response){
|
||||||
Sql sql = memberManageService.getSql(pageForm, "schoolUnion");
|
Sql sql = memberManageService.getSql(pageForm, "schoolUnion");
|
||||||
List<NutMap> list = memberManageService.listMap(sql);
|
List<NutMap> list = memberManageService.listMap(sql);
|
||||||
@@ -170,4 +172,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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+8
@@ -35,6 +35,10 @@ const MEMBER_MANAGE_TABLE = {
|
|||||||
|
|
||||||
<el-button type="primary" size="small" icon="el-icon-printer" @click="exportExcel">导出会员名单
|
<el-button type="primary" size="small" icon="el-icon-printer" @click="exportExcel">导出会员名单
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
|
<el-button type="primary" size="small" icon="el-icon-printer" @click="exportNotEqPhoneExcel">导出会员福利号码不一致名单
|
||||||
|
</el-button>
|
||||||
|
|
||||||
</table-tool>
|
</table-tool>
|
||||||
|
|
||||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id"
|
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id"
|
||||||
@@ -320,6 +324,10 @@ const MEMBER_MANAGE_TABLE = {
|
|||||||
exportExcel() {
|
exportExcel() {
|
||||||
const pageForm = clone(this.pageForm)
|
const pageForm = clone(this.pageForm)
|
||||||
this.$downLoad(loc() + "/doExport", pageForm)
|
this.$downLoad(loc() + "/doExport", pageForm)
|
||||||
|
},
|
||||||
|
exportNotEqPhoneExcel(){
|
||||||
|
const pageForm = clone(this.pageForm)
|
||||||
|
this.$downLoad(loc() + "/doExportNotEqPhone", pageForm)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|||||||
Reference in New Issue
Block a user