福利
This commit is contained in:
+3
@@ -219,6 +219,9 @@ public class WelfareSelectionSituationServiceImpl extends BaseServiceImpl<Welfar
|
|||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("t1.projectId", "=", pageForm.getProjectId());
|
cnd.and("t1.projectId", "=", pageForm.getProjectId());
|
||||||
cnd.groupBy("t1.id");
|
cnd.groupBy("t1.id");
|
||||||
|
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()) || AuthUtil.hasRole(RoleConstant.BRANCH_UNION_ADMIN.name())) {
|
||||||
|
cnd.and("t1.welfareUnionId", "=", SecurityUtil.getUnionId());
|
||||||
|
}
|
||||||
cnd.asc("t1.welfareUnitId");
|
cnd.asc("t1.welfareUnitId");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
List<NutMap> list = listMap(sql);
|
List<NutMap> list = listMap(sql);
|
||||||
|
|||||||
+12
-1
@@ -7,11 +7,14 @@ import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
|||||||
import cn.afterturn.easypoi.excel.export.ExcelExportService;
|
import cn.afterturn.easypoi.excel.export.ExcelExportService;
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
import com.budwk.app.base.page.Pagination;
|
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.service.impl.BaseServiceImpl;
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
import com.budwk.app.sys.models.Sys_union;
|
import com.budwk.app.sys.models.Sys_union;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.zhgh.welfare.model.WelfareProject;
|
import com.budwk.app.zhgh.welfare.model.WelfareProject;
|
||||||
import com.budwk.app.zhgh.welfare.model.WelfareProjectSubjectOption;
|
import com.budwk.app.zhgh.welfare.model.WelfareProjectSubjectOption;
|
||||||
import com.budwk.app.zhgh.welfare.service.WelfareStatisticsService;
|
import com.budwk.app.zhgh.welfare.service.WelfareStatisticsService;
|
||||||
@@ -44,9 +47,15 @@ public class WelfareStatisticsServiceImpl extends BaseServiceImpl<WelfareProject
|
|||||||
@Override
|
@Override
|
||||||
public NutMap pageData(String projectId, String unionId) {
|
public NutMap pageData(String projectId, String unionId) {
|
||||||
// 分工会数据
|
// 分工会数据
|
||||||
List<Sys_union> unions = dao().query(Sys_union.class, Cnd.NEW().andEX(Sys_union::getId, "=", unionId).asc(Sys_union::getUnionCode));
|
List<Sys_union> unions;
|
||||||
|
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()) || AuthUtil.hasRole(RoleConstant.BRANCH_UNION_ADMIN.name())) {
|
||||||
|
unions = dao().query(Sys_union.class, Cnd.NEW().andEX(Sys_union::getId, "=", SecurityUtil.getUnionId()).asc(Sys_union::getUnionCode));
|
||||||
|
}else {
|
||||||
|
unions = dao().query(Sys_union.class, Cnd.NEW().andEX(Sys_union::getId, "=", unionId).asc(Sys_union::getUnionCode));
|
||||||
|
}
|
||||||
List<NutMap> mapUnions = BeanUtil.copyToList(unions, NutMap.class);
|
List<NutMap> mapUnions = BeanUtil.copyToList(unions, NutMap.class);
|
||||||
|
|
||||||
|
|
||||||
// 表格动态列数据
|
// 表格动态列数据
|
||||||
List<NutMap> dynamicTableColumns = new ArrayList<>() {{
|
List<NutMap> dynamicTableColumns = new ArrayList<>() {{
|
||||||
add(NutMap.NEW().addv("label", "分工会").addv("prop", "name"));
|
add(NutMap.NEW().addv("label", "分工会").addv("prop", "name"));
|
||||||
@@ -468,6 +477,7 @@ public class WelfareStatisticsServiceImpl extends BaseServiceImpl<WelfareProject
|
|||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("t1.projectId", "=", projectId);
|
cnd.and("t1.projectId", "=", projectId);
|
||||||
|
cnd.groupBy("t1.userId");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
List<NutMap> welfareSelectionList = listMap(sql);
|
List<NutMap> welfareSelectionList = listMap(sql);
|
||||||
|
|
||||||
@@ -483,6 +493,7 @@ public class WelfareStatisticsServiceImpl extends BaseServiceImpl<WelfareProject
|
|||||||
""");
|
""");
|
||||||
Cnd cnd2 = Cnd.NEW();
|
Cnd cnd2 = Cnd.NEW();
|
||||||
cnd2.and("t1.welfareId", "=", projectId);
|
cnd2.and("t1.welfareId", "=", projectId);
|
||||||
|
|
||||||
sql2.setCondition(cnd2);
|
sql2.setCondition(cnd2);
|
||||||
List<NutMap> userSelections = listMap(sql2);
|
List<NutMap> userSelections = listMap(sql2);
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ layout("/layouts/platform.html"){
|
|||||||
"selected-user": selectedUser,
|
"selected-user": selectedUser,
|
||||||
"unselected-user": unSelectedUser
|
"unselected-user": unSelectedUser
|
||||||
},
|
},
|
||||||
|
store,
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageForm: {
|
pageForm: {
|
||||||
@@ -155,6 +156,7 @@ layout("/layouts/platform.html"){
|
|||||||
this.welfareOptions = data.options
|
this.welfareOptions = data.options
|
||||||
},
|
},
|
||||||
async init() {
|
async init() {
|
||||||
|
await this.getWelfareProjectList()
|
||||||
if (
|
if (
|
||||||
!this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN", "SCHOOL_UNION_WELFARE_ADMIN"]) &&
|
!this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN", "SCHOOL_UNION_WELFARE_ADMIN"]) &&
|
||||||
this.$auth.hasRoleOr(["BRANCH_UNION_CHAIRMAN"])
|
this.$auth.hasRoleOr(["BRANCH_UNION_CHAIRMAN"])
|
||||||
@@ -166,7 +168,6 @@ layout("/layouts/platform.html"){
|
|||||||
this.unionOptions = await this.$businessTool.listUnion()
|
this.unionOptions = await this.$businessTool.listUnion()
|
||||||
this.clearable = true
|
this.clearable = true
|
||||||
}
|
}
|
||||||
await this.getWelfareProjectList()
|
|
||||||
await this.pageData()
|
await this.pageData()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user