..
This commit is contained in:
@@ -161,12 +161,11 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
|||||||
|
|
||||||
// 特别人员
|
// 特别人员
|
||||||
List<SpecialStaff> specialStaffs = dao.query(SpecialStaff.class, Cnd.NEW());
|
List<SpecialStaff> specialStaffs = dao.query(SpecialStaff.class, Cnd.NEW());
|
||||||
List<SpecialStaff> specialManyUnitStaffs = specialStaffs.stream().filter(SpecialStaff::getIsManyUnit).toList();
|
List<String> specialStaffUserIds = specialStaffs.stream().map(SpecialStaff::getUserId).toList();
|
||||||
List<String> specialManyUnitStaffUserIds = specialManyUnitStaffs.stream().map(SpecialStaff::getUserId).toList();
|
List<String> specialStaffUserLoginNames = dao.query(Sys_user.class, Cnd.where(Sys_user::getId, "in", specialStaffUserIds)).stream().map(Sys_user::getLoginname).toList();
|
||||||
List<String> specialManyUnitStaffUserLoginNames = dao.query(Sys_user.class, Cnd.where(Sys_user::getId, "in", specialManyUnitStaffUserIds)).stream().map(Sys_user::getLoginname).toList();
|
|
||||||
|
|
||||||
// 排除掉多单位人员不更新
|
// 排除掉其他人员不更新
|
||||||
cnd.andEX(Sys_user_source::getLoginname, "not in", specialManyUnitStaffUserLoginNames);
|
cnd.andEX(Sys_user_source::getLoginname, "not in", specialStaffUserLoginNames);
|
||||||
|
|
||||||
List<Sys_user_source> sources = dao.query(Sys_user_source.class, cnd.groupBy("loginname"));
|
List<Sys_user_source> sources = dao.query(Sys_user_source.class, cnd.groupBy("loginname"));
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -353,7 +353,7 @@ public class ActivityBasicScopeController {
|
|||||||
|
|
||||||
cnd.andEX("u.unionid", EQ_OR_NEQ_OP, activityUserScopePageParam.getUnionId());
|
cnd.andEX("u.unionid", EQ_OR_NEQ_OP, activityUserScopePageParam.getUnionId());
|
||||||
cnd.andEX("u.unitid", EQ_OR_NEQ_OP, activityUserScopePageParam.getUnitId());
|
cnd.andEX("u.unitid", EQ_OR_NEQ_OP, activityUserScopePageParam.getUnitId());
|
||||||
cnd.andEX("u.personType", IN_OR_NIN_OP, activityUserScopePageParam.getPersonTypes());
|
cnd.andEX("u.preparedBy", IN_OR_NIN_OP, activityUserScopePageParam.getPersonTypes());
|
||||||
cnd.andEX("u.userState", IN_OR_NIN_OP, activityUserScopePageParam.getUserStates());
|
cnd.andEX("u.userState", IN_OR_NIN_OP, activityUserScopePageParam.getUserStates());
|
||||||
cnd.andEX("u.sex", IN_OR_NIN_OP, activityUserScopePageParam.getSexTypes());
|
cnd.andEX("u.sex", IN_OR_NIN_OP, activityUserScopePageParam.getSexTypes());
|
||||||
cnd.andEX("sur.roleid", IN_OR_NIN_OP, activityUserScopePageParam.getRoleIds());
|
cnd.andEX("sur.roleid", IN_OR_NIN_OP, activityUserScopePageParam.getRoleIds());
|
||||||
|
|||||||
+60
-22
@@ -1,5 +1,9 @@
|
|||||||
package com.budwk.app.zhgh.activity.basic.controller;
|
package com.budwk.app.zhgh.activity.basic.controller;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
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.annotation.SaCheckPermission;
|
||||||
import cn.dev33.satoken.stp.StpUtil;
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
@@ -9,8 +13,10 @@ import com.budwk.app.base.page.Pagination;
|
|||||||
import com.budwk.app.base.param.PageForm;
|
import com.budwk.app.base.param.PageForm;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.base.service.BaseService;
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.zhgh.activity.basic.models.ActivityUserScope;
|
import com.budwk.app.zhgh.activity.basic.models.ActivityUserScope;
|
||||||
|
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.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
@@ -23,6 +29,10 @@ import org.nutz.mvc.annotation.At;
|
|||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
import org.nutz.mvc.annotation.Param;
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName ActivityBasicScopeUserDataController
|
* @ClassName ActivityBasicScopeUserDataController
|
||||||
* @Description TODO
|
* @Description TODO
|
||||||
@@ -52,28 +62,6 @@ public class ActivityBasicScopeUserDataController {
|
|||||||
@Param(value = "personType") String personType,
|
@Param(value = "personType") String personType,
|
||||||
@Param(value = "userState") String userState,
|
@Param(value = "userState") String userState,
|
||||||
@Param(value = "groupId") Integer groupId) {
|
@Param(value = "groupId") Integer groupId) {
|
||||||
/* Sql sql = Sqls.create("""
|
|
||||||
SELECT
|
|
||||||
aus.id,
|
|
||||||
u.username AS userName,
|
|
||||||
u.loginname AS loginName,
|
|
||||||
u.sex,
|
|
||||||
u.birthday,
|
|
||||||
u.mobile,
|
|
||||||
u.personType,
|
|
||||||
u.userState,
|
|
||||||
u.unitname AS unitName,
|
|
||||||
u.unionname AS unionName,
|
|
||||||
aus.groupId,
|
|
||||||
aus.groupName,
|
|
||||||
actun.unionname AS activityUnionName
|
|
||||||
FROM
|
|
||||||
activity_user_scope aus
|
|
||||||
LEFT JOIN `vw_user` u ON u.id = aus.userId
|
|
||||||
LEFT JOIN activity_basic_unit actit ON actit.id=u.unitid
|
|
||||||
LEFT JOIN activity_basic_union actun ON actit.unionid=actun.id
|
|
||||||
$condition
|
|
||||||
""");*/
|
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
aus.id,
|
aus.id,
|
||||||
@@ -83,6 +71,7 @@ public class ActivityBasicScopeUserDataController {
|
|||||||
u.birthday,
|
u.birthday,
|
||||||
u.mobile,
|
u.mobile,
|
||||||
u.personType,
|
u.personType,
|
||||||
|
u.preparedBy,
|
||||||
u.userState,
|
u.userState,
|
||||||
u.unitname AS unitName,
|
u.unitname AS unitName,
|
||||||
u.unionname AS unionName,
|
u.unionname AS unionName,
|
||||||
@@ -164,4 +153,53 @@ public class ActivityBasicScopeUserDataController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("activity.basic.user")
|
||||||
|
@Ok("void")
|
||||||
|
public void doExportUser(Integer groupId, HttpServletResponse response){
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
aus.id,
|
||||||
|
u.username AS userName,
|
||||||
|
u.loginname AS loginName,
|
||||||
|
u.sex,
|
||||||
|
u.birthday,
|
||||||
|
u.mobile,
|
||||||
|
u.personType,
|
||||||
|
u.preparedBy,
|
||||||
|
u.userState,
|
||||||
|
u.unitname AS unitName,
|
||||||
|
u.unionname AS unionName,
|
||||||
|
aus.groupId,
|
||||||
|
aus.groupName
|
||||||
|
FROM
|
||||||
|
activity_user_scope aus
|
||||||
|
LEFT JOIN `vw_user` u ON u.id = aus.userId
|
||||||
|
WHERE aus.groupId = @groupId
|
||||||
|
ORDER BY u.unionId,unitId
|
||||||
|
""");
|
||||||
|
sql.setParam("groupId",groupId);
|
||||||
|
List list = baseService.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("在职状态","userState",20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("聘用方式","preparedBy",20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("人员类型","personType",20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("所属单位","unitName",20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("所属工会","unionName",20));
|
||||||
|
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
|
||||||
|
CommonDownloadUtil.download("名单.xlsx", workbook, response);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -349,6 +349,10 @@ public class FamilyActivityApplyController {
|
|||||||
public Result doSignUp(FamilyUser familyUser) {
|
public Result doSignUp(FamilyUser familyUser) {
|
||||||
try {
|
try {
|
||||||
lock.lock();
|
lock.lock();
|
||||||
|
FamilyActivity activity = dao.fetch(FamilyActivity.class, familyUser.getActivityId());
|
||||||
|
if(Lang.isEmpty(familyUser.getMobileColumnsValue())) {
|
||||||
|
return Result.error(99,"请填写" + activity.getKeyWord() + "信息");
|
||||||
|
}
|
||||||
boolean courseByUser = familyActivityService.isSignCourseByUser(familyUser.getCourseId(), SecurityUtil.getUserId());
|
boolean courseByUser = familyActivityService.isSignCourseByUser(familyUser.getCourseId(), SecurityUtil.getUserId());
|
||||||
if(courseByUser) {
|
if(courseByUser) {
|
||||||
return Result.error(99,"您已报过该活动");
|
return Result.error(99,"您已报过该活动");
|
||||||
|
|||||||
@@ -63,7 +63,8 @@
|
|||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<div class="search-item-label">所属单位:</div>
|
<div class="search-item-label">所属单位:</div>
|
||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%" clearable @change="doSearch" filterable>
|
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%" clearable @change="doSearch"
|
||||||
|
filterable>
|
||||||
<el-option v-for="item in units" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
<el-option v-for="item in units" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
@@ -101,7 +102,8 @@
|
|||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<div class="search-item-label">人员类型:</div>
|
<div class="search-item-label">人员类型:</div>
|
||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<dict-select v-model="pageForm.personType" code="PERSON_TYPE" @change="doSearch" style="width: 100%"></dict-select>
|
<dict-select v-model="pageForm.personType" code="USER_PERSON_TYPE" @change="doSearch"
|
||||||
|
style="width: 100%"></dict-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -119,6 +121,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="search-item">
|
||||||
|
<div class="search-item-label">聘用方式:</div>
|
||||||
|
<dict-select
|
||||||
|
clearable
|
||||||
|
code="USER_PREPARED_BY_TYPE"
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
placeholder="请选择聘用方式"
|
||||||
|
v-model="pageForm.preparedBys"
|
||||||
|
></dict-select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="search-query">
|
<div class="search-query">
|
||||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -127,7 +142,8 @@
|
|||||||
|
|
||||||
<el-card shadow="never" class="mt10">
|
<el-card shadow="never" class="mt10">
|
||||||
<table-tool :label="currentGroupName">
|
<table-tool :label="currentGroupName">
|
||||||
<el-button @click="doExportUser" icon="el-icon-printer" size="small" type="primary" :disabled="!pageForm.groupId">
|
<el-button @click="doExportUser" icon="el-icon-printer" size="small" type="primary"
|
||||||
|
:disabled="!pageForm.groupId">
|
||||||
导出活动分组人员xlsx
|
导出活动分组人员xlsx
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="doDelete(null)" type="danger" size="small" :disabled="tableData.length === 0">
|
<el-button @click="doDelete(null)" type="danger" size="small" :disabled="tableData.length === 0">
|
||||||
@@ -224,8 +240,9 @@ module.exports = {
|
|||||||
{prop: "sex", label: "性别", sortable: true},
|
{prop: "sex", label: "性别", sortable: true},
|
||||||
{prop: "birthday", label: "出生年月"},
|
{prop: "birthday", label: "出生年月"},
|
||||||
{prop: "mobile", label: "联系电话"},
|
{prop: "mobile", label: "联系电话"},
|
||||||
{ prop: "personType", label: "人员类型", sortable: true },
|
|
||||||
{prop: "userState", label: "在职状态", sortable: true},
|
{prop: "userState", label: "在职状态", sortable: true},
|
||||||
|
{prop: "preparedBy", label: "聘用方式", sortable: true},
|
||||||
|
{prop: "personType", label: "人员类型", sortable: true},
|
||||||
{prop: "unitName", label: "所属单位", sortable: true},
|
{prop: "unitName", label: "所属单位", sortable: true},
|
||||||
{prop: "unionName", label: "所属工会", sortable: true},
|
{prop: "unionName", label: "所属工会", sortable: true},
|
||||||
{prop: "groupName", label: "所属分组", sortable: true}
|
{prop: "groupName", label: "所属分组", sortable: true}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row class="query-row" v-if="is_A06 === true || is_sysadmin === true || is_H04 === true">
|
<el-row class="query-row" v-if="is_A06 === true || is_sysadmin === true || is_H04 === true">
|
||||||
<el-col class="query-title">人员类型:</el-col>
|
<el-col class="query-title">编制类型:</el-col>
|
||||||
<el-col class="query-content">
|
<el-col class="query-content">
|
||||||
<el-tag
|
<el-tag
|
||||||
:effect="pageForm.personTypes.includes(item.name) ? 'dark' : 'plain'"
|
:effect="pageForm.personTypes.includes(item.name) ? 'dark' : 'plain'"
|
||||||
@@ -610,7 +610,7 @@ module.exports = {
|
|||||||
|
|
||||||
await this.flushUnits()
|
await this.flushUnits()
|
||||||
await this.getActivityGroup()
|
await this.getActivityGroup()
|
||||||
this.personTypeOptions = await this.$businessTool.getDictOptions("PERSON_TYPE")
|
this.personTypeOptions = await this.$businessTool.getDictOptions("USER_PREPARED_BY_TYPE")
|
||||||
this.userStateOptions = await this.$businessTool.getDictOptions("USER_STATE")
|
this.userStateOptions = await this.$businessTool.getDictOptions("USER_STATE")
|
||||||
await this.getRoleListByMenuId()
|
await this.getRoleListByMenuId()
|
||||||
await this.pageData()
|
await this.pageData()
|
||||||
|
|||||||
Reference in New Issue
Block a user