# Conflicts:
#	src/main/resources/views/platform/zhgh/democratic/executiveCommittee/delegationOnePush/index.html
#	src/main/resources/views/platform/zhgh/democratic/executiveCommittee/delegationTwoPush/index.html
#	src/main/resources/views/platform/zhgh/democratic/executiveCommittee/executiveCommitteeMember/index.html
#	src/main/resources/views/platform/zhgh/democratic/executiveCommittee/preparatoryGroupPush/index.html
This commit is contained in:
=
2025-10-16 18:28:28 +08:00
202 changed files with 4116 additions and 923 deletions
@@ -45,6 +45,8 @@ RoleConstant {
BRANCH_UNION_SHENGGHUO_WY("分工会生活委员"),
BRANCH_UNION_TIAOJIE_WY("分工会调解委员"),
UNIT_PARTY_SECRETARY("单位党委书记"),
TEACHER_CONGRESS_DELEGATE_FORMAL("教代会正式代表"),
TEACHER_CONGRESS_DELEGATE_ATTENDANCE("教代会列席代表"),
TEACHER_CONGRESS_DELEGATE_SPECIALLY_INVITE("教代会特邀代表"),
@@ -58,7 +60,6 @@ RoleConstant {
PROPOSAL_UNIT_LEADER("提案承办单位领导"),
PROPOSAL_UNIT_PROXY("提案承办单位代理答复人"),
WORKER_CONGRESS_DELEGATE_FORMAL("工代会正式代表"),
WORKER_CONGRESS_DELEGATE_ATTENDANCE("工代会列席代表"),
WORKER_CONGRESS_DELEGATE_SPECIALLY_INVITE("工代会特邀代表"),
@@ -4,6 +4,7 @@ import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.lang.ClassScanner;
import cn.hutool.core.util.ReflectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
@@ -21,6 +22,7 @@ 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.SqlExpressionGroup;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
@@ -220,9 +222,16 @@ public class FlowDesignController {
@At
@SaCheckLogin
@ApiOperation("获取流程设计任务参与者分页数据")
public Result assigneePage(Integer pageNumber, Integer pageSize, String keyword, @Param("userIds") String[] userIds) {
public Result assigneePage(Integer pageNumber, Integer pageSize, String searchKeyword, @Param("userIds") String[] userIds) {
Sql sql = Sqls.create("select id,loginname,username,unitName from vw_user $condition");
Cnd cnd = Cnd.NEW();
if(StrUtil.isNotBlank(searchKeyword)) {
SqlExpressionGroup group = new SqlExpressionGroup();
group.orLike("username", searchKeyword);
group.orLike("loginname", searchKeyword);
cnd.and(group);
}
sql.setCondition(cnd);
// cnd.andEX("id", "in", userIds);
Pagination pagination = sysUserService.listPageMap(pageNumber, pageSize, sql);
return Result.success(pagination);
@@ -0,0 +1,55 @@
package com.budwk.app.flow.handler;
import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.flow.engine.AssignmentHandler;
import com.budwk.app.flow.engine.core.Execution;
import com.budwk.app.flow.engine.core.ServiceContext;
import com.budwk.app.flow.engine.model.TaskModel;
import com.budwk.app.sys.models.Sys_role;
import com.budwk.app.sys.models.Sys_user_role;
import com.budwk.app.sys.services.SysRoleService;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.lang.Lang;
import java.util.List;
/**
* @ClassName FlowUnitPartySecretaryHandler
* @Author JyuHsin
* @Date 2025/10/15 10:55
* @Version 1.0
* @Description TODO
*/
public class FlowUnitPartySecretaryHandler implements AssignmentHandler {
@Override
public List<String> assign(TaskModel model, Execution execution) {
String unitId = SecurityUtil.getUnitId();
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
Sys_role role = sysRoleService.getByCode(RoleConstant.UNIT_PARTY_SECRETARY);
List<Sys_user_role> roles = ServiceContext.find(Dao.class).query(
Sys_user_role.class,
Cnd.where(Sys_user_role::getRoleId, "=", role.getId())
.and(Sys_user_role::getUnitId, "=", unitId)
);
if (Lang.isEmpty(roles)) {
throw new RuntimeException("当前登录用户所在单位未设置单位党委书记,请联系校工会进行设置。");
}
return roles.stream().map(Sys_user_role::getUserId).toList();
}
@Override
public String getMessage() {
return "获取当前登录用户所在单位党委书记";
}
@Override
public int getOrder() {
return AssignmentHandler.super.getOrder();
}
}
@@ -150,7 +150,8 @@ public class SysHomeController {
);
List<Sys_menu> menus = sysUserService.getMenus(SecurityUtil.getUserId());
List<String> allMenuIds = menus.stream().map(Sys_menu::getId).toList();
List<Sys_menu> sysMenus = list.stream().filter(m -> allMenuIds.contains(m.getId())).sorted(Comparator.comparingInt(Sys_menu::getLocation)).toList();
//List<Sys_menu> sysMenus = list.stream().filter(m -> allMenuIds.contains(m.getId())).sorted(Comparator.comparingInt(Sys_menu::getLocation)).toList();
List<Sys_menu> sysMenus = list.stream().sorted(Comparator.comparingInt(Sys_menu::getLocation)).toList();
return Result.success(sysMenus);
}
@@ -166,7 +167,8 @@ public class SysHomeController {
);
List<Sys_menu> menus = sysUserService.getMenus(SecurityUtil.getUserId());
List<String> allMenuIds = menus.stream().map(Sys_menu::getId).toList();
List<Sys_menu> sysMenus = list.stream().filter(m -> allMenuIds.contains(m.getId())).sorted(Comparator.comparingInt(Sys_menu::getLocation)).toList();
//List<Sys_menu> sysMenus = list.stream().filter(m -> allMenuIds.contains(m.getId())).sorted(Comparator.comparingInt(Sys_menu::getLocation)).toList();
List<Sys_menu> sysMenus = list.stream().sorted(Comparator.comparingInt(Sys_menu::getLocation)).toList();
return Result.success(sysMenus);
}
@@ -206,6 +208,10 @@ public class SysHomeController {
// if (!DateUtil.isIn(today, startDate, endDate)) {
// continue;
// }
// 只过滤结束的
if (DateUtil.compare(today, endDate) > 0) {
continue;
}
Integer allowUserGroupId = activity.getAllowUserGroupId();
String allowUserSql = activity.getAllowUserSql();
activity.setAllowUserSql(null);
@@ -207,4 +207,7 @@ public class View_user {
@Column
private String clubIds;
@Column
private Boolean aidFundMember;
}
@@ -1,83 +0,0 @@
package com.budwk.app.zhgh.dayofficework.fund.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
import io.swagger.annotations.Api;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import javax.servlet.http.HttpServletResponse;
@IocBean
@At("/platform/fundMember/query")
@Ok("json:full")
@Api(tags = "基金会员-查询")
public class FundMemberQueryController {
@Inject
private FundMemberService fundMemberService;
@At("")
@Ok("beetl:/platform/zhgh/dayofficework/fundMember/query/index.html")
@SaCheckPermission("fundMember.query")
public void index() {
}
@At
@SaCheckPermission("fundMember.query")
public Result pageData(PageForm pageForm, Integer year) {
Sql sql = Sqls.create("""
SELECT
info.*,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
ins.variable instanceVariable,
ins.processDefineId instanceProcessDefineId,
t.id taskId,
t.taskName AS taskKey,
t.displayName taskName,
t.taskType,
t.performType taskPerformType,
t.taskState,
t.finishTime,
t.taskParentId
FROM
fund_member info
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
$condition
""");
Cnd cnd = Cnd.NEW();
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("info.userName", pageForm.getSearchKeyword());
seg.orLike("info.loginName", pageForm.getSearchKeyword());
cnd.and(seg);
}
cnd.andEX("YEAR(info.submitTime)", "=", year);
sql.setCondition(cnd);
Pagination pagination = fundMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
@At
@SaCheckPermission("fundMember.query")
@Ok("void")
public void exportExcel(Integer year, HttpServletResponse response) {
}
}
@@ -0,0 +1,164 @@
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.model.ExcelImportRes;
import com.budwk.app.base.page.Pagination;
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.sys.models.Sys_user;
import com.budwk.app.zhgh.dayofficework.fund.member.mode.FundMemberImportExcelMode;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.poi.ss.usermodel.Workbook;
import org.nutz.dao.Chain;
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.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.AdaptBy;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import org.nutz.mvc.upload.TempFile;
import org.nutz.mvc.upload.UploadAdaptor;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
@IocBean
@At("/platform/fundMember/batchJoin")
@Ok("json:full")
@Api("基金会员-批量加入")
public class FundMemberBatchJoinController {
@Inject
private Dao dao;
@Inject
private FundMemberService fundMemberService;
@Inject
private FundMemberChangeRecordService fundMemberChangeRecordService;
@At("")
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/batchJoin/index.html")
@SaCheckPermission("fundMember.batchJoin")
public void index() {
}
@At
@SaCheckPermission("fundMember.batchJoin")
public Result pageData(PageForm pageForm, String unionId, String unitId, String userState) {
Sql sql = Sqls.create("""
SELECT
id,
username,
loginname,
sex,
userState,
unitName,
unionName
FROM
vw_user
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.and("aidFundMember", "!=", 1);
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("username", pageForm.getSearchKeyword());
seg.orLike("loginname", pageForm.getSearchKeyword());
cnd.and(seg);
}
cnd.andEX("unionId", "=", unionId);
cnd.andEX("unitId", "=", unitId);
cnd.andEX("userState", "=", userState);
cnd.asc("unionName").asc("unitName").asc("id");
sql.setCondition(cnd);
Pagination pagination = fundMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
@At
@SaCheckPermission("fundMember.batchJoin")
@ApiOperation("批量加入")
@SLog(tag = "基金会员-批量加入", msg = "批量加入")
public Result confirm(@Param("loginNames") String[] loginNames) {
dao.update(Sys_user.class, Chain.make("aidFundMember", 1), Cnd.where("id", "in", loginNames));
for (String loginName : loginNames) {
fundMemberChangeRecordService.insertRecord(loginName, true, "批量加入");
}
return Result.success();
}
@At
@SaCheckPermission("fundMember.batchJoin")
@ApiOperation("批量导入")
@SLog(tag = "基金会员-批量导入", msg = "批量导入")
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
public Result batchImport(@Param("file") TempFile file) {
// 读取
List<FundMemberImportExcelMode> importMembers = ExcelImportUtil.importExcel(file.getFile(), FundMemberImportExcelMode.class, new ImportParams());
// 创建结果集
ExcelImportRes<FundMemberImportExcelMode> excelImportRes = new ExcelImportRes<>();
excelImportRes.setTotalRecords(importMembers.size());
for (int i = 0; i < importMembers.size(); i++) {
FundMemberImportExcelMode member = importMembers.get(i);
if (StrUtil.isBlank(member.getLoginName())) {
member.setErrInfo("工号为空", i);
continue;
}
int count = dao.count(Sys_user.class, Cnd.where(Sys_user::getLoginname, "=", member.getLoginName()));
if (count == 0) {
member.setErrInfo("系统中查询不到该用户", i);
continue;
}
dao.update(Sys_user.class, Chain.make("aidFundMember", 1), Cnd.where(Sys_user::getLoginname, "=", member.getLoginName()));
fundMemberChangeRecordService.insertRecord(member.getLoginName(), true, "批量导入");
}
// 添加错误记录
excelImportRes.setErrorDetails(importMembers.stream().filter(s -> StrUtil.isNotBlank(s.getErrMsg())).collect(Collectors.toList()));
excelImportRes.setFailedCount(excelImportRes.getErrorDetails().size());
excelImportRes.setSuccessCount(Math.max(importMembers.size() - excelImportRes.getFailedCount(), 0));
return Result.success(excelImportRes);
}
@At
@SaCheckPermission("fundMember.batchJoin")
@Ok("void")
public void downLoadTemplate(HttpServletResponse response) {
List<ExcelExportEntity> entities = new ArrayList<>();
entities.add(new ExcelExportEntity("工号", "loginName", 20));
entities.add(new ExcelExportEntity("姓名", "userName", 20));
ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, Collections.emptyList());
CommonDownloadUtil.download("基金会员导入模板.xlsx", workbook, response);
}
}
@@ -1,4 +1,4 @@
package com.budwk.app.zhgh.dayofficework.fund.controller;
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil;
@@ -6,12 +6,10 @@ import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.utils.PageUtil;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.web.commons.auth.utils.AuthUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
import io.swagger.annotations.Api;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
@@ -34,7 +32,7 @@ public class FundMemberBranchUnionApprovalController {
private FundMemberService fundMemberService;
@At("")
@Ok("beetl:/platform/zhgh/dayofficework/fundMember/branchUnionApproval/index.html")
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/branchUnionApproval/index.html")
@SaCheckPermission("fundMember.branchUnionApproval")
public void index() {
@@ -65,15 +63,15 @@ public class FundMemberBranchUnionApprovalController {
FROM
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN fund_member info ON info.id = ins.businessNo
LEFT JOIN fund_member_apply info ON info.id = ins.businessNo
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.and("t.taskName", "=", "fgh");
if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())){
cnd.and("t.taskName", "in", List.of("fgh", "ltx"));
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
}
@@ -0,0 +1,58 @@
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.utils.PageUtil;
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberChangeRecord;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
import io.swagger.annotations.Api;
import org.nutz.dao.Cnd;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
@IocBean
@At("/platform/fundMember/changeRecord")
@Ok("json:full")
@Api(tags = "基金会员变更记录")
public class FundMemberChangeRecordController {
@Inject
private FundMemberChangeRecordService fundMemberChangeRecordService;
@At("")
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/changeRecord/index.html")
@SaCheckPermission("fundMember.changeRecord")
public void index() {
}
@At
@SaCheckPermission("fundMember.changeRecord")
public Result pageData(PageForm pageForm, Integer year, String unionId, String unitId, String userState, Boolean isJoin) {
Cnd cnd = Cnd.NEW();
cnd.andEX("YEAR(changeTime)", "=", year);
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("loginName", pageForm.getSearchKeyword());
seg.orLike("userName", pageForm.getSearchKeyword());
cnd.and(seg);
}
cnd.andEX(FundMemberChangeRecord::getUnionId, "=", unionId);
cnd.andEX(FundMemberChangeRecord::getUserState, "=", userState);
cnd.andEX(FundMemberChangeRecord::getIsJoin, "=", isJoin);
if (StrUtil.isAllNotBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
} else {
cnd.desc(FundMemberChangeRecord::getChangeTime);
}
Pagination pagination = fundMemberChangeRecordService.listPage(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
return Result.success(pagination);
}
}
@@ -1,4 +1,4 @@
package com.budwk.app.zhgh.dayofficework.fund.controller;
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.bean.BeanUtil;
@@ -10,8 +10,8 @@ import com.budwk.app.flow.engine.FlowEngine;
import com.budwk.app.flow.entity.ProcessInstance;
import com.budwk.app.flow.entity.ProcessTask;
import com.budwk.app.flow.vo.ProcessTaskVO;
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
import com.deepoove.poi.XWPFTemplate;
import com.deepoove.poi.config.Configure;
import io.swagger.annotations.Api;
@@ -51,7 +51,7 @@ public class FundMemberCommonController {
@At
@SaCheckPermission("fundMember")
public Result info(@Valid String id) {
FundMember fundMember = fundMemberService.fetch(id);
FundMemberApply fundMember = fundMemberService.fetch(id);
return Result.success(fundMember);
}
@@ -60,7 +60,7 @@ public class FundMemberCommonController {
@Ok("void")
@ApiOperation("导出申请表")
public void exportDocx(@Valid String id, HttpServletResponse response) {
FundMember fundMember = dao.fetch(FundMember.class, id);
FundMemberApply fundMember = dao.fetch(FundMemberApply.class, id);
Map<String, Object> docData = BeanUtil.beanToMap(fundMember);
docData.put("birthday", DateUtil.format(fundMember.getBirthday(), "yyyy年MM月dd日"));
@@ -0,0 +1,61 @@
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
import io.swagger.annotations.Api;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
@IocBean
@At("/platform/fundMember/his")
@Ok("json:full")
@Api(tags = "基金会员-历史")
public class FundMemberHisController {
@Inject
private FundMemberService fundMemberService;
@At("")
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/his/index.html")
@SaCheckPermission("fundMember.his")
public void index() {
}
@At
@SaCheckPermission("fundMember.his")
public Result pageData(PageForm pageForm, Integer year, String unionId) {
Sql sql = Sqls.create("""
SELECT
his.*,
(SELECT changeTime FROM fund_member_change_record WHERE loginName = his.loginName AND isJoin = 1 ORDER BY changeTime DESC) joinTime
FROM
fund_member_his his
$condition
""");
Cnd cnd = Cnd.NEW();
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("username", pageForm.getSearchKeyword());
seg.orLike("loginname", pageForm.getSearchKeyword());
cnd.and(seg);
}
cnd.andEX("year", "=", year);
cnd.andEX("unionId", "=", unionId);
sql.setCondition(cnd);
Pagination pagination = fundMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
}
@@ -1,14 +1,13 @@
package com.budwk.app.zhgh.dayofficework.fund.controller;
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.result.Result;
import com.budwk.app.flow.engine.FlowEngine;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.nutz.aop.interceptor.ioc.TransAop;
@@ -39,7 +38,7 @@ public class FundMemberMineController {
@At("")
@Ok("beetl:/platform/zhgh/dayofficework/fundMember/mine/index.html")
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/mine/index.html")
@SaCheckPermission("fundMember.mine")
public void index() {
@@ -68,7 +67,7 @@ public class FundMemberMineController {
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask' AND taskState in (10,20)) AS startTaskId
FROM
fund_member info
fund_member_apply info
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
@@ -87,7 +86,7 @@ public class FundMemberMineController {
@ApiOperation("删除")
@SLog(tag = "基金会员-我的申请", msg = "删除")
public Result delete(@Param("id") String id) {
dao.delete(FundMember.class, id);
dao.delete(FundMemberApply.class, id);
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
return Result.success();
}
@@ -0,0 +1,235 @@
package com.budwk.app.zhgh.dayofficework.fund.member.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.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.page.Pagination;
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.sys.models.Sys_user;
import com.budwk.app.sys.views.View_user;
import com.budwk.app.web.commons.base.Globals;
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberHis;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.poi.ss.usermodel.Workbook;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Chain;
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.SqlExpressionGroup;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;
@IocBean
@At("/platform/fundMember/query")
@Ok("json:full")
@Api(tags = "基金会员-查询")
public class FundMemberQueryController {
@Inject
private Dao dao;
@Inject
private FundMemberService fundMemberService;
@Inject
private FundMemberChangeRecordService fundMemberChangeRecordService;
@At("")
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/query/index.html")
@SaCheckPermission("fundMember.query")
public void index() {
}
@At
@SaCheckPermission("fundMember.query")
public Result pageData(PageForm pageForm, Integer year, String unionId) {
Sql sql = Sqls.create("""
SELECT
u.id,
u.username AS userName,
u.loginname AS loginName,
u.sex,
u.birthday,
u.userState,
u.unitName,
u.unionName,
(SELECT changeTime FROM fund_member_change_record WHERE loginName = u.loginName AND isJoin = 1 ORDER BY changeTime DESC) joinTime
FROM
vw_user u
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.and("u.aidFundMember", "=", 1);
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("u.username", pageForm.getSearchKeyword());
seg.orLike("u.loginname", pageForm.getSearchKeyword());
cnd.and(seg);
}
cnd.andEX("u.unionId", "=", unionId);
sql.setCondition(cnd);
Pagination pagination = fundMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
@At
@SaCheckPermission("fundMember.query")
@Ok("void")
@ApiOperation("导出登记汇总Excel")
public void exportExcel(Integer year, String unionId, HttpServletResponse response) {
Cnd cnd = Cnd.NEW();
cnd.and("YEAR(submitTime)", "=", year);
cnd.andEX("unionId", "=", unionId);
cnd.andEX(FundMemberApply::getIsJoin, "=", 1);
cnd.asc("unionId");
List<FundMemberApply> list = fundMemberService.query(cnd);
for (int i = 0; i < list.size(); i++) {
list.get(i).setIndex(i + 1);
}
List<ExcelExportEntity> exportEntities = new ArrayList<>();
exportEntities.add(new ExcelExportEntity("序号", "index", 10));
exportEntities.add(new ExcelExportEntity("工号", "loginName", 20));
exportEntities.add(new ExcelExportEntity("姓名", "userName", 20));
exportEntities.add(new ExcelExportEntity("分工会", "unionName", 20));
exportEntities.add(new ExcelExportEntity("性别", "sex", 10));
ExcelExportEntity birthEntity = new ExcelExportEntity("出生年月", "birthday", 20);
birthEntity.setFormat("yyyy-MM-dd");
exportEntities.add(birthEntity);
ExcelExportEntity joinWorkEntity = new ExcelExportEntity("入校工作时间", "joinWorkTime", 20);
joinWorkEntity.setFormat("yyyy-MM-dd");
exportEntities.add(joinWorkEntity);
ExcelExportEntity retireEntity = new ExcelExportEntity("退休时间", "retireTime", 20);
retireEntity.setFormat("yyyy-MM-dd");
exportEntities.add(retireEntity);
exportEntities.add(new ExcelExportEntity("身份证号码", "idCard", 20));
exportEntities.add(new ExcelExportEntity("家庭住址", "address", 30));
exportEntities.add(new ExcelExportEntity("联系电话", "mobile", 20));
String title = Globals.AppName + "教职工医疗互助“爱心”基金入会登记表";
ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF);
exportParams.setTitle(title);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
CommonDownloadUtil.download(title + ".xlsx", workbook, response);
}
@At
@SaCheckPermission("fundMember.query")
@Ok("void")
@ApiOperation("导出新会员Excel")
public void exportNewMemberExcel(HttpServletResponse response) {
Sql sql = Sqls.create("""
SELECT
r.*
FROM
fund_member_change_record r
LEFT JOIN sys_user u ON u.loginname = r.loginName
WHERE
r.isJoin = 1
AND YEAR(r.changeTime) = @year
AND u.aidFundMember = 1
""");
sql.setParam("year", DateUtil.thisYear());
List<NutMap> list = fundMemberService.listMap(sql);
for (int i = 0; i < list.size(); i++) {
list.get(i).put("index", i + 1);
}
List<ExcelExportEntity> exportEntities = new ArrayList<>();
exportEntities.add(new ExcelExportEntity("序号", "index", 10));
exportEntities.add(new ExcelExportEntity("工号", "loginName", 20));
exportEntities.add(new ExcelExportEntity("姓名", "userName", 20));
exportEntities.add(new ExcelExportEntity("分工会", "unionName", 20));
exportEntities.add(new ExcelExportEntity("性别", "sex", 10));
ExcelExportEntity birthEntity = new ExcelExportEntity("出生年月", "birthday", 20);
birthEntity.setFormat("yyyy-MM-dd");
exportEntities.add(birthEntity);
ExcelExportEntity joinWorkEntity = new ExcelExportEntity("入校工作时间", "joinWorkTime", 20);
joinWorkEntity.setFormat("yyyy-MM-dd");
exportEntities.add(joinWorkEntity);
ExcelExportEntity retireEntity = new ExcelExportEntity("退休时间", "retireTime", 20);
retireEntity.setFormat("yyyy-MM-dd");
exportEntities.add(retireEntity);
exportEntities.add(new ExcelExportEntity("身份证号码", "idCard", 20));
exportEntities.add(new ExcelExportEntity("家庭住址", "address", 30));
exportEntities.add(new ExcelExportEntity("联系电话", "mobile", 20));
String title = Globals.AppName + "医疗互助“爱心”基金" + DateUtil.thisYear() + "年新入会教职工";
ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF);
exportParams.setTitle(title);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
CommonDownloadUtil.download(title + ".xlsx", workbook, response);
}
@At
@SaCheckPermission("fundMember.query")
@ApiOperation("退出基金")
@Aop(TransAop.READ_COMMITTED)
public Result quit(@Valid String loginName) {
// 修改user表
dao.update(Sys_user.class, Chain.make("aidFundMember", 0), Cnd.where(Sys_user::getLoginname, "=", loginName));
// 添加变更记录
fundMemberChangeRecordService.insertRecord(loginName, false, "台账管理-退会");
return Result.success();
}
@At
@SaCheckPermission("fundMember.query")
@ApiOperation("备份")
@Aop(TransAop.READ_COMMITTED)
@SLog(tag = "基金会员-备份", msg = "备份")
public Result backup(Integer year) {
dao.clear(FundMemberHis.class, Cnd.where(FundMemberHis::getYear, "=", year));
List<View_user> list = dao.query(View_user.class, Cnd.where(View_user::getAidFundMember, "=", 1));
List<FundMemberHis> fundMemberHisList = list.stream().map(user -> {
FundMemberHis his = new FundMemberHis();
his.setYear(year);
his.setLoginName(user.getLoginname());
his.setUserName(user.getUsername());
his.setSex(user.getSex());
his.setBirthday(user.getBirthday());
his.setIdCard(user.getIdCard());
his.setMobile(user.getMobile());
his.setUnionId(user.getUnionId());
his.setUnionName(user.getUnionName());
his.setUserState(user.getUserState());
return his;
}).toList();
dao.insert(fundMemberHisList);
return Result.success();
}
}
@@ -1,4 +1,4 @@
package com.budwk.app.zhgh.dayofficework.fund.controller;
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil;
@@ -9,7 +9,7 @@ import com.budwk.app.base.result.Result;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.web.commons.auth.utils.AuthUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
import io.swagger.annotations.Api;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
@@ -32,7 +32,7 @@ public class FundMemberSchoolUnionApprovalController {
private FundMemberService fundMemberService;
@At("")
@Ok("beetl:/platform/zhgh/dayofficework/fundMember/schoolUnionApproval/index.html")
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/schoolUnionApproval/index.html")
@SaCheckPermission("fundMember.schoolUnionApproval")
public void index() {
@@ -63,7 +63,7 @@ public class FundMemberSchoolUnionApprovalController {
FROM
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN fund_member info ON info.id = ins.businessNo
LEFT JOIN fund_member_apply info ON info.id = ins.businessNo
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
@@ -1,7 +1,6 @@
package com.budwk.app.zhgh.dayofficework.fund.controller;
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaMode;
import cn.hutool.core.lang.Dict;
import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.result.Result;
@@ -12,8 +11,7 @@ import com.budwk.app.flow.entity.ProcessTask;
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
import com.budwk.app.flow.service.FlowCommonService;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
import com.budwk.app.zhgh.democratic.suggestionBox.models.SuggestionBox;
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.nutz.aop.interceptor.ioc.TransAop;
@@ -42,7 +40,7 @@ public class FundMemberWriteController {
private FlowCommonService flowCommonService;
@At("")
@Ok("beetl:/platform/zhgh/dayofficework/fundMember/write/index.html")
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/write/index.html")
@SaCheckPermission("fundMember.write")
public void index() {
@@ -52,7 +50,7 @@ public class FundMemberWriteController {
@SaCheckPermission("fundMember.write")
@ApiOperation("保存申请")
@SLog(tag = "建言献策-填写申请", msg = "保存申请")
public Result save(@Param("data") FundMember fundMember) {
public Result save(@Param("data") FundMemberApply fundMember) {
dao.insertOrUpdate(fundMember);
return Result.success();
}
@@ -63,8 +61,9 @@ public class FundMemberWriteController {
@ApiOperation("提交申请")
@Aop(TransAop.READ_COMMITTED)
@SLog(tag = "基金会员-填写申请", msg = "提交申请")
public Result submit(@Param("data") FundMember fundMember) {
public Result submit(@Param("data") FundMemberApply fundMember) {
fundMember.setSubmitTime(new Date());
fundMember.setIsJoin(true);
dao.insertOrUpdate(fundMember);
// 开启流程实例
Dict args = Dict.create();
@@ -85,7 +84,7 @@ public class FundMemberWriteController {
@ApiOperation("重新提交申请")
@Aop(TransAop.READ_COMMITTED)
@SLog(tag = "基金会员-填写申请", msg = "重新提交申请")
public Result submitAgain(@Param("data") FundMember fundMember, @Param("taskId") Long taskId) {
public Result submitAgain(@Param("data") FundMemberApply fundMember, @Param("taskId") Long taskId) {
dao.insertOrUpdate(fundMember);
Dict dict = Dict.create();
@@ -99,7 +98,7 @@ public class FundMemberWriteController {
@SaCheckPermission("fundMember.write")
@ApiOperation("获取申请信息")
public Result info(@Param("id") String id) {
FundMember box = dao.fetch(FundMember.class, id);
FundMemberApply box = dao.fetch(FundMemberApply.class, id);
return Result.success(box);
}
@@ -0,0 +1,37 @@
package com.budwk.app.zhgh.dayofficework.fund.member.interceptor;
import cn.hutool.core.bean.BeanUtil;
import com.budwk.app.flow.engine.FlowInterceptor;
import com.budwk.app.flow.engine.core.Execution;
import com.budwk.app.flow.engine.core.ServiceContext;
import com.budwk.app.sys.models.Sys_user;
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberChangeRecord;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.aop.Aop;
import org.nutz.json.Json;
import java.util.Date;
/**
* 基金会员审核通过拦截器
*/
public class FundMemberPassInterceptor implements FlowInterceptor {
@Override
@Aop(TransAop.READ_COMMITTED)
public void intercept(Execution execution) {
Dao dao = ServiceContext.find(Dao.class);
FundMemberApply fundMemberApply = Json.fromJson(FundMemberApply.class, execution.getArgs().getStr("f_data"));
// 修改基金会员状态
dao.update(Sys_user.class, Chain.make("aidFundMember", 1), Cnd.where(Sys_user::getLoginname, "=", fundMemberApply.getLoginName()));
// 添加到变更记录
FundMemberChangeRecord record = BeanUtil.copyProperties(fundMemberApply, FundMemberChangeRecord.class, "id");
record.setId(null);
record.setChangeOrigin("流程申请");
record.setChangeTime(new Date());
dao.insert(record);
}
}
@@ -0,0 +1,18 @@
package com.budwk.app.zhgh.dayofficework.fund.member.mode;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.budwk.app.base.model.ExcelImportError;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class FundMemberImportExcelMode extends ExcelImportError {
@Excel(name = "工号")
private String loginName;
@Excel(name = "姓名")
private String userName;
}
@@ -1,5 +1,6 @@
package com.budwk.app.zhgh.dayofficework.fund.models;
package com.budwk.app.zhgh.dayofficework.fund.member.models;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.budwk.app.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -9,11 +10,11 @@ import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.util.Date;
@Data
@Table("fund_member")
@Table("fund_member_apply")
@EqualsAndHashCode(callSuper = true)
@TableMeta("{'mysql-charset':'utf8mb4'}")
@Comment("基金会员")
public class FundMember extends BaseModel {
public class FundMemberApply extends BaseModel {
@Name
@Comment("ID")
@@ -21,16 +22,16 @@ public class FundMember extends BaseModel {
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("工号")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String loginName;
@Column
@Comment("姓名")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String userName;
@Column
@Comment("工资号")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String loginName;
@Column
@Comment("性别")
@ColDefine(type = ColType.VARCHAR, width = 10)
@@ -76,6 +77,21 @@ public class FundMember extends BaseModel {
@ColDefine(type = ColType.VARCHAR, width = 100)
private String avatar;
@Column
@Comment("分工会ID")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String unionId;
@Column
@Comment("分工会名称")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String unionName;
@Column
@Comment("用户状态")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String userState;
@Column
@Comment("加入、退出")
@ColDefine(type = ColType.BOOLEAN)
@@ -87,4 +103,7 @@ public class FundMember extends BaseModel {
@ColDefine(type = ColType.DATETIME)
private Date submitTime;
@Excel(name = "序号")
private Integer index;
}
@@ -0,0 +1,110 @@
package com.budwk.app.zhgh.dayofficework.fund.member.models;
import com.budwk.app.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.util.Date;
@Data
@Table("fund_member_change_record")
@EqualsAndHashCode(callSuper = true)
@TableMeta("{'mysql-charset':'utf8mb4'}")
@Comment("基金会员变更记录")
public class FundMemberChangeRecord extends BaseModel {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("工号")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String loginName;
@Column
@Comment("姓名")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String userName;
@Column
@Comment("性别")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String sex;
@Column
@Comment("出生日期")
@ColDefine(type = ColType.DATE)
private Date birthday;
@Column
@Comment("身份证号")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String idCard;
@Column
@Comment("参加工作时间")
@ColDefine(type = ColType.DATE)
private Date joinWorkTime;
@Column
@Comment("退休时间")
@ColDefine(type = ColType.DATE)
private Date retireTime;
@Column
@Comment("家庭住址")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String address;
@Column
@Comment("手机号码")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String mobile;
@Column
@Comment("住宅号码")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String homePhone;
@Column
@Comment("照片")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String avatar;
@Column
@Comment("分工会ID")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String unionId;
@Column
@Comment("分工会名称")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String unionName;
@Column
@Comment("用户状态")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String userState;
@Column
@Comment("加入、退出")
@ColDefine(type = ColType.BOOLEAN)
@Default("1")
private Boolean isJoin;
@Column
@Comment("变更来源")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String changeOrigin;
@Column
@Comment("变更时间")
@ColDefine(type = ColType.DATETIME)
private Date changeTime;
}
@@ -0,0 +1,103 @@
package com.budwk.app.zhgh.dayofficework.fund.member.models;
import com.budwk.app.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.util.Date;
@Data
@Table("fund_member_his")
@EqualsAndHashCode(callSuper = true)
@TableMeta("{'mysql-charset':'utf8mb4'}")
@Comment("基金会员历史台账")
@TableIndexes(value = {
@Index(name = "IDX_FUND_MEMBER_HIS_YEAR", fields = {"year"}, unique = false),
@Index(name = "IDX_FUND_MEMBER_HIS_LOGIN_NAME", fields = {"loginName"}, unique = false)
})
public class FundMemberHis extends BaseModel {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("年度")
@ColDefine(type = ColType.INT)
private Integer year;
@Column
@Comment("工号")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String loginName;
@Column
@Comment("姓名")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String userName;
@Column
@Comment("性别")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String sex;
@Column
@Comment("出生日期")
@ColDefine(type = ColType.DATE)
private Date birthday;
@Column
@Comment("身份证号")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String idCard;
@Column
@Comment("参加工作时间")
@ColDefine(type = ColType.DATE)
private Date joinWorkTime;
@Column
@Comment("退休时间")
@ColDefine(type = ColType.DATE)
private Date retireTime;
@Column
@Comment("家庭住址")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String address;
@Column
@Comment("手机号码")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String mobile;
@Column
@Comment("住宅号码")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String homePhone;
@Column
@Comment("照片")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String avatar;
@Column
@Comment("分工会ID")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String unionId;
@Column
@Comment("分工会名称")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String unionName;
@Column
@Comment("用户状态")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String userState;
}
@@ -0,0 +1,16 @@
package com.budwk.app.zhgh.dayofficework.fund.member.service;
import com.budwk.app.base.service.BaseService;
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberChangeRecord;
public interface FundMemberChangeRecordService extends BaseService<FundMemberChangeRecord> {
/**
* 插入一条记录
* @param loginName 工号
* @param isJoin 加入\退出
* @param changeOrigin 来源
*/
void insertRecord(String loginName, boolean isJoin, String changeOrigin);
}
@@ -0,0 +1,7 @@
package com.budwk.app.zhgh.dayofficework.fund.member.service;
import com.budwk.app.base.service.BaseService;
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
public interface FundMemberService extends BaseService<FundMemberApply> {
}
@@ -0,0 +1,40 @@
package com.budwk.app.zhgh.dayofficework.fund.member.service.impl;
import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.sys.views.View_user;
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberChangeRecord;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.IocBean;
import java.util.Date;
@IocBean(args = {"refer:dao"})
public class FundMemberChangeRecordServiceImpl extends BaseServiceImpl<FundMemberChangeRecord> implements FundMemberChangeRecordService {
public FundMemberChangeRecordServiceImpl(Dao dao) {
super(dao);
}
@Override
public void insertRecord(String loginName, boolean isJoin, String changeOrigin) {
View_user user = dao().fetch(View_user.class, Cnd.where(View_user::getLoginname, "=", loginName));
FundMemberChangeRecord record = new FundMemberChangeRecord();
record.setLoginName(user.getLoginname());
record.setUserName(user.getUsername());
record.setSex(user.getSex());
record.setBirthday(user.getBirthday());
record.setIdCard(user.getIdCard());
// record.setJoinWorkTime(user.getArrivalAtSchoolDate());
// record.setRetireTime(user.getRetireTime());
record.setUnionId(user.getUnionId());
record.setUnionName(user.getUnionName());
record.setUserState(user.getUserState());
record.setIsJoin(isJoin);
record.setChangeOrigin(changeOrigin);
record.setChangeTime(new Date());
insert(record);
}
}
@@ -1,13 +1,13 @@
package com.budwk.app.zhgh.dayofficework.fund.service.impl;
package com.budwk.app.zhgh.dayofficework.fund.member.service.impl;
import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.IocBean;
@IocBean(args = {"refer:dao"})
public class FundMemberServiceImpl extends BaseServiceImpl<FundMember> implements FundMemberService {
public class FundMemberServiceImpl extends BaseServiceImpl<FundMemberApply> implements FundMemberService {
public FundMemberServiceImpl(Dao dao) {
super(dao);
}
@@ -1,7 +0,0 @@
package com.budwk.app.zhgh.dayofficework.fund.service;
import com.budwk.app.base.service.BaseService;
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
public interface FundMemberService extends BaseService<FundMember> {
}
@@ -0,0 +1,22 @@
package com.budwk.app.zhgh.dayofficework.fund.subsidy.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import io.swagger.annotations.Api;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
@IocBean
@At("/platform/fundSubsidy/analysis")
@Ok("json:full")
@Api(tags = "基金会员补助-分析")
public class FundSubsidyAnalysisController {
@At("")
@Ok("beetl:/platform/zhgh/dayofficework/fund/subsidy/analysis/index.html")
@SaCheckPermission("fundSubsidy.analysis")
public void index() {
}
}
@@ -0,0 +1,240 @@
package com.budwk.app.zhgh.dayofficework.fund.subsidy.controller;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.annotation.SLog;
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.base.utils.SysOfficeTemplateUtil;
import com.budwk.app.sys.models.Sys_user;
import com.budwk.app.sys.views.View_user;
import com.budwk.app.zhgh.dayofficework.fund.subsidy.mode.FundSubsidyBasicExcelMode;
import com.budwk.app.zhgh.dayofficework.fund.subsidy.mode.FundSubsidyExcelMode;
import com.budwk.app.zhgh.dayofficework.fund.subsidy.models.FundSubsidy;
import com.budwk.app.zhgh.dayofficework.fund.subsidy.service.FundSubsidyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Workbook;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.AdaptBy;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import org.nutz.mvc.upload.TempFile;
import org.nutz.mvc.upload.UploadAdaptor;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;
@IocBean
@At("/platform/fundSubsidy/query")
@Ok("json:full")
@Api(tags = "基金会员补助-查询")
@Slf4j
public class FundSubsidyQueryController {
@Inject
private Dao dao;
@Inject
private FundSubsidyService fundSubsidyService;
@Inject
private SysOfficeTemplateUtil sysOfficeTemplateUtil;
@At("")
@Ok("beetl:/platform/zhgh/dayofficework/fund/subsidy/query/index.html")
@SaCheckPermission("fundSubsidy.query")
public void index() {
}
@At
@SaCheckPermission("fundSubsidy.query")
public Result pageData(PageForm pageForm, Integer year, String unionId, String unitId) {
Cnd cnd = Cnd.NEW();
cnd.andEX(FundSubsidy::getYear, "=", year);
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("loginName", pageForm.getSearchKeyword());
seg.orLike("userName", pageForm.getSearchKeyword());
cnd.and(seg);
}
cnd.andEX(FundSubsidy::getUnionId, "=", unionId);
List<FundSubsidy> list = fundSubsidyService.query(cnd);
return Result.success(list);
}
@At
@SaCheckPermission("fundSubsidy.query")
@Ok("void")
public void exportExcel(Integer year, HttpServletResponse response) {
Cnd cnd = Cnd.NEW();
cnd.andEX(FundSubsidy::getYear, "=", year);
List<FundSubsidy> list = fundSubsidyService.query(cnd);
List<ExcelExportEntity> exportEntities = new ArrayList<>();
exportEntities.add(new ExcelExportEntity("序号", "index", 10));
exportEntities.add(new ExcelExportEntity("单位", "unitName", 20));
exportEntities.add(new ExcelExportEntity("工号", "loginName", 20));
exportEntities.add(new ExcelExportEntity("姓名", "userName", 20));
exportEntities.add(new ExcelExportEntity("门诊费用", "outpatientCost", 20));
exportEntities.add(new ExcelExportEntity("住院费用", "hospitalCost", 20));
exportEntities.add(new ExcelExportEntity("合计", "totalCost", 20));
exportEntities.add(new ExcelExportEntity("不予补助金额", "noSubsidyCost", 20));
exportEntities.add(new ExcelExportEntity("门诊医保已报金额", "outpatientMedicalInsuranceReportedCost", 20));
exportEntities.add(new ExcelExportEntity("住院医保已报金额", "hospitalMedicalInsuranceReportedCost", 20));
exportEntities.add(new ExcelExportEntity("自费金额", "selfCost", 20));
exportEntities.add(new ExcelExportEntity("补助金额", "subsidyCost", 20));
HashMap<String, Object> excelData = new HashMap<>();
excelData.put("list", list);
// 合计补助金额
list.stream().map(FundSubsidy::getSubsidyCost).reduce(BigDecimal::add).ifPresent(total -> {
excelData.put("totalSubsidyCost", total);
});
try {
InputStream is = sysOfficeTemplateUtil.getTemplate("fundSubsidy");
TemplateExportParams exportParams = new TemplateExportParams(is, null);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, excelData);
CommonDownloadUtil.download(year + "医疗互助“爱心”基金补助申请公示表.xlsx", workbook, response);
} catch (Exception e) {
e.printStackTrace();
log.error("导出基金会员补助失败,{}", e.getMessage());
}
}
@At
@SaCheckPermission("fundSubsidy.query")
@ApiOperation("导入")
@SLog(tag = "爱心补助-导入", msg = "导入")
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
public Result importExcel(@Param("file") TempFile file) {
// 读取
List<FundSubsidyExcelMode> importMembers = ExcelImportUtil.importExcel(file.getFile(), FundSubsidyExcelMode.class, new ImportParams());
// 创建结果集
ExcelImportRes<FundSubsidyExcelMode> excelImportRes = new ExcelImportRes<>();
excelImportRes.setTotalRecords(importMembers.size());
for (int i = 0; i < importMembers.size(); i++) {
FundSubsidyExcelMode subsidy = importMembers.get(i);
if (subsidy.getYear() == null) {
subsidy.setErrInfo("请填写年度", i);
continue;
}
if (StrUtil.isBlank(subsidy.getLoginName())) {
subsidy.setErrInfo("工号为空", i);
continue;
}
if (StrUtil.isBlank(subsidy.getUserName())) {
subsidy.setErrInfo("姓名为空", i);
continue;
}
if (StrUtil.isBlank(subsidy.getUnitName())) {
subsidy.setErrInfo("单位为空", i);
continue;
}
if (subsidy.getOutpatientCost() == null) {
subsidy.setErrInfo("门诊费用为空", i);
continue;
}
if (subsidy.getHospitalCost() == null) {
subsidy.setErrInfo("住院费用为空", i);
continue;
}
if (subsidy.getTotalCost() == null) {
subsidy.setErrInfo("合计为空", i);
continue;
}
if (subsidy.getNoSubsidyCost() == null) {
subsidy.setErrInfo("不予补助金额为空", i);
continue;
}
if (subsidy.getOutpatientMedicalInsuranceReportedCost() == null) {
subsidy.setErrInfo("门诊医保已报金额为空", i);
continue;
}
if (subsidy.getHospitalMedicalInsuranceReportedCost() == null) {
subsidy.setErrInfo("住院医保已报金额为空", i);
continue;
}
if (subsidy.getSelfCost() == null) {
subsidy.setErrInfo("自费金额为空", i);
continue;
}
if (subsidy.getSubsidyCost() == null) {
subsidy.setErrInfo("补助金额为空", i);
continue;
}
View_user user = dao.fetch(View_user.class, Cnd.where(Sys_user::getLoginname, "=", subsidy.getLoginName()));
if (user == null) {
subsidy.setErrInfo("系统中查询不到该用户", i);
continue;
}
FundSubsidy fundSubsidy = BeanUtil.copyProperties(subsidy, FundSubsidy.class);
fundSubsidy.setUnitId(user.getUnitId());
fundSubsidy.setUnionId(user.getUnionId());
fundSubsidy.setUnitName(user.getUnitName());
fundSubsidy.setUnionName(user.getUnionName());
dao.insert(fundSubsidy);
}
// 添加错误记录
excelImportRes.setErrorDetails(importMembers.stream().filter(s -> StrUtil.isNotBlank(s.getErrMsg())).collect(Collectors.toList()));
excelImportRes.setFailedCount(excelImportRes.getErrorDetails().size());
excelImportRes.setSuccessCount(Math.max(importMembers.size() - excelImportRes.getFailedCount(), 0));
return Result.success(excelImportRes);
}
@At
@SaCheckPermission("fundSubsidy.query")
@Ok("void")
public void downloadTemplate(HttpServletResponse response) {
ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF);
List<FundSubsidyBasicExcelMode> list = new ArrayList<>();
list.add(new FundSubsidyBasicExcelMode());
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, FundSubsidyBasicExcelMode.class, list);
CommonDownloadUtil.download("医疗互助“爱心”基金补助导入模板.xlsx", workbook, response);
}
}
@@ -0,0 +1,47 @@
package com.budwk.app.zhgh.dayofficework.fund.subsidy.mode;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class FundSubsidyBasicExcelMode {
@Excel(name = "年度", orderNum = "1", width = 20)
private Integer year;
@Excel(name = "工号", orderNum = "2", width = 20)
private String loginName;
@Excel(name = "姓名", orderNum = "3", width = 20)
private String userName;
@Excel(name = "单位", orderNum = "4", width = 20)
private String unitName;
@Excel(name = "门诊费用", orderNum = "5", numFormat = "0.00", width = 20)
private BigDecimal outpatientCost;
@Excel(name = "住院费用", orderNum = "6", numFormat = "0.00", width = 20)
private BigDecimal hospitalCost;
@Excel(name = "合计", orderNum = "7", numFormat = "0.00", width = 20)
private BigDecimal totalCost;
@Excel(name = "不予补助金额", orderNum = "8", numFormat = "0.00", width = 20)
private BigDecimal noSubsidyCost;
@Excel(name = "门诊医保已报金额", orderNum = "9", numFormat = "0.00", width = 20)
private BigDecimal outpatientMedicalInsuranceReportedCost;
@Excel(name = "住院医保已报金额", orderNum = "10", numFormat = "0.00", width = 20)
private BigDecimal hospitalMedicalInsuranceReportedCost;
@Excel(name = "自费金额", orderNum = "11", numFormat = "0.00", width = 20)
private BigDecimal selfCost;
@Excel(name = "补助金额", orderNum = "12", numFormat = "0.00", width = 20)
private BigDecimal subsidyCost;
}
@@ -0,0 +1,49 @@
package com.budwk.app.zhgh.dayofficework.fund.subsidy.mode;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.budwk.app.base.model.ExcelImportError;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
@EqualsAndHashCode(callSuper = true)
@Data
public class FundSubsidyExcelMode extends ExcelImportError {
@Excel(name = "年度", orderNum = "1")
private Integer year;
@Excel(name = "工号", orderNum = "2")
private String loginName;
@Excel(name = "姓名", orderNum = "3")
private String userName;
@Excel(name = "单位", orderNum = "4")
private String unitName;
@Excel(name = "门诊费用", orderNum = "5",numFormat = "0.00")
private BigDecimal outpatientCost;
@Excel(name = "住院费用", orderNum = "6",numFormat = "0.00")
private BigDecimal hospitalCost;
@Excel(name = "合计", orderNum = "7",numFormat = "0.00")
private BigDecimal totalCost;
@Excel(name = "不予补助金额", orderNum = "8",numFormat = "0.00")
private BigDecimal noSubsidyCost;
@Excel(name = "门诊医保已报金额", orderNum = "9",numFormat = "0.00")
private BigDecimal outpatientMedicalInsuranceReportedCost;
@Excel(name = "住院医保已报金额", orderNum = "10",numFormat = "0.00")
private BigDecimal hospitalMedicalInsuranceReportedCost;
@Excel(name = "自费金额", orderNum = "11",numFormat = "0.00")
private BigDecimal selfCost;
@Excel(name = "补助金额", orderNum = "12",numFormat = "0.00")
private BigDecimal subsidyCost;
}
@@ -0,0 +1,99 @@
package com.budwk.app.zhgh.dayofficework.fund.subsidy.models;
import com.budwk.app.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.math.BigDecimal;
@Data
@EqualsAndHashCode(callSuper = true)
@TableMeta("{'mysql-charset':'utf8mb4'}")
@Table("fund_subsidy")
@Comment("基金会员补助")
public class FundSubsidy extends BaseModel {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("年度")
@ColDefine(type = ColType.INT)
private Integer year;
@Column
@Comment("工号")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String loginName;
@Column
@Comment("姓名")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String userName;
@Column
@Comment("单位ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unitId;
@Column
@Comment("单位")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String unitName;
@Column
@Comment("分工会ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unionId;
@Column
@Comment("分工会")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String unionName;
@Column
@Comment("门诊费用")
@ColDefine(customType = "decimal(10,2)")
private BigDecimal outpatientCost;
@Column
@Comment("住院费用")
@ColDefine(customType = "decimal(10,2)")
private BigDecimal hospitalCost;
@Column
@Comment("门诊+住院费用")
@ColDefine(customType = "decimal(10,2)")
private BigDecimal totalCost;
@Column
@Comment("不予补助金额")
@ColDefine(customType = "decimal(10,2)")
private BigDecimal noSubsidyCost;
@Column
@Comment("门诊医保已报金额")
@ColDefine(customType = "decimal(10,2)")
private BigDecimal outpatientMedicalInsuranceReportedCost;
@Column
@Comment("住院医保已报金额")
@ColDefine(customType = "decimal(10,2)")
private BigDecimal hospitalMedicalInsuranceReportedCost;
@Column
@Comment("自费金额")
@ColDefine(customType = "decimal(10,2)")
private BigDecimal selfCost;
@Column
@Comment("补助金额")
@ColDefine(customType = "decimal(10,2)")
private BigDecimal subsidyCost;
}
@@ -0,0 +1,7 @@
package com.budwk.app.zhgh.dayofficework.fund.subsidy.service;
import com.budwk.app.base.service.BaseService;
import com.budwk.app.zhgh.dayofficework.fund.subsidy.models.FundSubsidy;
public interface FundSubsidyService extends BaseService<FundSubsidy> {
}
@@ -0,0 +1,14 @@
package com.budwk.app.zhgh.dayofficework.fund.subsidy.service.impl;
import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.zhgh.dayofficework.fund.subsidy.models.FundSubsidy;
import com.budwk.app.zhgh.dayofficework.fund.subsidy.service.FundSubsidyService;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.IocBean;
@IocBean(args = {"refer:dao"})
public class FundSubsidyServiceImpl extends BaseServiceImpl<FundSubsidy> implements FundSubsidyService {
public FundSubsidyServiceImpl(Dao dao) {
super(dao);
}
}
@@ -175,7 +175,7 @@ public class HealthCheckupListController {
@ApiOperation("体检名单管理员编辑选择记录")
@SLog(type = "healthCheckup", tag = "体检管理", msg = "管理员编辑了一条选择记录")
@SaCheckPermission("healthCheckup.list.mange")
public Result doEditHealthCheckupData(String subjectId, String campus, String projectId, String userId) {
public Result doEditHealthCheckupData(String subjectId, String campus, String projectId, String userId, String bz) {
//查询用户有没有选择过套餐
HealthCheckupUserSelection userSelection = healthCheckupProjectService.dao().fetch(HealthCheckupUserSelection.class,
@@ -184,6 +184,7 @@ public class HealthCheckupListController {
if (Lang.isNotEmpty(userSelection)) {
userSelection.setSubjectId(subjectId);
userSelection.setCampus(campus);
userSelection.setBz(bz);
healthCheckupProjectService.update(userSelection);
} else {
//如果没有选择过套餐添加一条记录
@@ -193,6 +194,7 @@ public class HealthCheckupListController {
checkupUserSelection.setSubjectId(subjectId);
checkupUserSelection.setCampus(campus);
checkupUserSelection.setSelectTime(new Date());
checkupUserSelection.setBz(bz);
healthCheckupProjectService.insert(checkupUserSelection);
}
return Result.success();
@@ -19,6 +19,7 @@ import org.nutz.dao.util.Daos;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Lang;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
@@ -88,7 +89,9 @@ public class HealthCheckupProjectMangeController {
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("healthCheckup.projectMange")
@SLog(type = "healthCheckup", tag = "体检管理", msg = "提交体检项目")
public Result doAdd(HealthCheckupProject healthCheckupProject, @Param(value = "deleteRowIds") String[] deleteRowIds) {
public Result doAdd(HealthCheckupProject healthCheckupProject,
@Param(value = "deleteRowIds") String[] deleteRowIds,
@Param(value = "deleteSubjectIds") String[] deleteSubjectIds) {
String projectId;
@@ -96,12 +99,37 @@ public class HealthCheckupProjectMangeController {
if (StrUtil.isBlank(healthCheckupProject.getId())) {
healthCheckupProject.setYear(DateUtil.thisYear());
HealthCheckupProject checkupProject = healthCheckupProjectService.insertWith(healthCheckupProject, "healthCheckupProjectSubjects");
healthCheckupProject.getHealthCheckupProjectSubjects().forEach(v -> {
v.getSubjectMoneys().forEach(m -> {
m.setProjectId(checkupProject.getId());
m.setSubjectId(v.getId());
});
if (Lang.isNotEmpty(v.getSubjectMoneys())) {
healthCheckupProjectService.insert(v.getSubjectMoneys());
}
});
projectId = checkupProject.getId();
} else {
projectId = healthCheckupProject.getId();
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubject.class, Cnd.where("id", "in", deleteRowIds));
//如果删除了医院
if (Lang.isNotEmpty(deleteSubjectIds)) {
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubject.class, Cnd.where("id", "in", deleteSubjectIds));
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubjectMoney.class, Cnd.where("subjectId", "in", deleteSubjectIds));
}
//如果删除了项目
if (Lang.isNotEmpty(deleteRowIds)) {
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubjectMoney.class, Cnd.where("id", "in", deleteRowIds));
}
healthCheckupProjectService.dao().insertOrUpdate(healthCheckupProject.getHealthCheckupProjectSubjects());
healthCheckupProject.getHealthCheckupProjectSubjects().forEach(v -> {
v.setProjectId(healthCheckupProject.getId());
v.setProjectId(projectId);
v.getSubjectMoneys().forEach(m -> {
m.setProjectId(projectId);
m.setSubjectId(v.getId());
});
if (Lang.isNotEmpty(v.getSubjectMoneys())) {
healthCheckupProjectService.insertOrUpdate(v.getSubjectMoneys());
}
});
healthCheckupProjectService.dao().insertOrUpdate(healthCheckupProject.getHealthCheckupProjectSubjects());
healthCheckupProjectService.update(healthCheckupProject);
@@ -136,6 +164,7 @@ public class HealthCheckupProjectMangeController {
public Result doDelete(String id) {
healthCheckupProjectService.delete(id);
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubject.class, Cnd.where("projectId", "=", id));
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubjectMoney.class, Cnd.where("projectId", "=", id));
return Result.success();
}
@@ -5,14 +5,18 @@ 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.hutool.core.date.DateUtil;
import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.page.Pagination;
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.base.utils.ConditionGroupUtil;
import com.budwk.app.base.utils.ManyAddOrRenewUtil;
import com.budwk.app.sys.views.View_user;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProject;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProjectSubject;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProjectSubjectMoney;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserSelection;
import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupSingleService;
import io.swagger.annotations.Api;
@@ -30,6 +34,7 @@ import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
@@ -113,14 +118,14 @@ public class HealthCheckupSingleController {
add(new ExcelExportEntity("职工号", "loginName", 20));
add(new ExcelExportEntity("姓名", "userName", 20));
add(new ExcelExportEntity("性别", "sex", 20));
add(new ExcelExportEntity("出生年月", "birthday", 20));
// add(new ExcelExportEntity("出生年月", "birthday", 20));
add(new ExcelExportEntity("年龄", "age", 20));
add(new ExcelExportEntity("婚姻状况", "marriage", 20));
add(new ExcelExportEntity("", "idCard", 20));
add(new ExcelExportEntity("身份证号", "idCard", 20));
add(new ExcelExportEntity("部门", "unitName", 20));
add(new ExcelExportEntity("部门编码", "unitCode", 20));
add(new ExcelExportEntity("自选项目", "subjectName", 20));
add(new ExcelExportEntity("自选院区", "campusName", 50));
// add(new ExcelExportEntity("部门编码", "unitCode", 20));
add(new ExcelExportEntity("医院", "subjectName", 20));
// add(new ExcelExportEntity("自选院区", "campusName", 50));
}};
List<NutMap> list;
@@ -234,7 +239,6 @@ public class HealthCheckupSingleController {
public Result doSelectByAdmin(String projectId, String optionId, String campus) {
Dao dao = healthCheckupSingleService.dao();
HealthCheckupProject project = dao.fetch(HealthCheckupProject.class, projectId);
HealthCheckupProjectSubject subject = dao.fetch(HealthCheckupProjectSubject.class, optionId);
Cnd cnd = Cnd.NEW();
Sql sql = Sqls.create("""
@@ -271,7 +275,92 @@ public class HealthCheckupSingleController {
selection.setSelectTime(new Date());
return selection;
}).collect(Collectors.toList());
manyAddOrRenewUtil.asyncExecuteFastInsert(selections,null);
manyAddOrRenewUtil.asyncExecuteFastInsert(selections, null);
return Result.success();
}
@At
@ApiOperation("管理员一键选择去年数据")
@Ok("json:full")
@SaCheckPermission("healthCheckup.statisticsSingle")
@SLog(type = "healthCheckup", tag = "体检管理", msg = "管理员给没选的人统一选择去年的数据")
public Result selectOptionByLastYear(String projectId) {
Dao dao = healthCheckupSingleService.dao();
//获取去年项目
HealthCheckupProject lastYearProject = dao.fetch(HealthCheckupProject.class, Cnd.where("YEAR(year)", "=", DateUtil.thisYear() - 1));
if (lastYearProject == null) {
return Result.error("请先创建去年的体检项目");
}
Cnd cnd = Cnd.NEW();
Sql sql = Sqls.create("""
SELECT
u.id
FROM
health_checkup_user hcu
LEFT JOIN `vw_user` u ON u.id = hcu.userId
$projectCnd $condition
""");
cnd.and("hcu.projectId", "=", projectId);
sql.setVar("projectCnd", "AND u.id NOT IN ( SELECT selectUserId FROM `health_checkup_user_selection` WHERE projectId = '" + projectId + "' AND selectUserId IS NOT NULL )");
cnd.groupBy("u.loginname");
sql.setCondition(cnd);
List<NutMap> mapList = healthCheckupSingleService.listMap(sql);
List<String> userIds = mapList.stream().map(v -> v.getString("id")).toList();
//去年项目的人
List<HealthCheckupUserSelection> lastYearSelectionList = dao.query(HealthCheckupUserSelection.class, Cnd.where(HealthCheckupUserSelection::getProjectId, "=", lastYearProject.getId())
.and(HealthCheckupUserSelection::getSelectUserId, "in", userIds));
//去年项目下的医院
List<HealthCheckupProjectSubject> lastYearSubjectList = dao.query(HealthCheckupProjectSubject.class,
Cnd.where(HealthCheckupProjectSubject::getProjectId, "=", lastYearProject.getId()));
//今年项目下的医院
List<HealthCheckupProjectSubject> thisYearSubjectList = dao.query(HealthCheckupProjectSubject.class,
Cnd.where(HealthCheckupProjectSubject::getProjectId, "=", projectId));
List<HealthCheckupUserSelection> selections = new ArrayList<>();
userIds.forEach(v -> {
//获取去年这个人选择的记录
HealthCheckupUserSelection userSelection = lastYearSelectionList.stream().filter(item -> item.getSelectUserId().equals(v)).findFirst().orElse(null);
//去年这个人选择的选项是什么
HealthCheckupProjectSubject lastYearSubject = lastYearSubjectList.stream().filter(last -> last.getId().equals(userSelection.getSubjectId())).findFirst().orElse(null);
//今年项目下的选项
HealthCheckupProjectSubject thisYearSubject = thisYearSubjectList.stream().filter(thisYear -> thisYear.getOptionName().equals(lastYearSubject.getOptionName())).findFirst().orElse(null);
if (userSelection != null && thisYearSubject != null) {
//获取今年这个选项的收费
List<HealthCheckupProjectSubjectMoney> list = dao.query(HealthCheckupProjectSubjectMoney.class,
Cnd.where(HealthCheckupProjectSubjectMoney::getSubjectId, "=", thisYearSubject.getId()));
BigDecimal money = BigDecimal.valueOf(0.00);
String subjectMoneyId = null;
for (HealthCheckupProjectSubjectMoney subject : list) {
//找出这个人符合哪个项目
Cnd cndUser = Cnd.where("id", "=", v);
ConditionGroupUtil.applyConditionGroup(cndUser, subject.getMatchCnd());
int count = dao.count(View_user.class, cndUser);
if (count > 0) {
money = subject.getMoney();
subjectMoneyId = subject.getId();
break;
}
}
//如果有符合的就添加
if (subjectMoneyId != null){
HealthCheckupUserSelection selection = new HealthCheckupUserSelection();
selection.setProjectId(projectId);
selection.setSelectUserId(v);
selection.setSubjectId(thisYearSubject.getId());
selection.setSubjectMoneyId(subjectMoneyId);
selection.setMoney(money);
selection.setSelectTime(new Date());
selections.add(selection);
}
}
});
return Result.success();
}
}
@@ -8,16 +8,21 @@ import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.service.BaseService;
import com.budwk.app.base.utils.ConditionGroupUtil;
import com.budwk.app.sys.views.View_user;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupCampus;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProject;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProjectSubjectMoney;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserSelection;
import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupProjectService;
import io.swagger.annotations.ApiOperation;
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;
@@ -26,9 +31,11 @@ import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import org.nutz.trans.Trans;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @author : hongqiwei
@@ -41,6 +48,8 @@ import java.util.Date;
@At("/platform/healthCheckup/h5")
public class H5HealthCheckupController {
@Inject
private Dao dao;
@Inject
private BaseService baseService;
@@ -84,6 +93,8 @@ public class H5HealthCheckupController {
// 已结束的项目:结束时间小于当前时间
cnd.and("p.choiceTimeEnd", "<", DateUtil.now());
}
cnd.and(new Static("(select count(*) from health_checkup_user where projectId=p.id and userId='%s')>0".formatted(SecurityUtil.getUserId())));
// 只有当name参数不为空时才添加名称查询条件
if (StrUtil.isNotBlank(name)) {
@@ -173,6 +184,7 @@ public class H5HealthCheckupController {
} else {
nutMap.put("isFamily", "");
}
return Result.success(nutMap);
}
return Result.success();
@@ -191,5 +203,27 @@ public class H5HealthCheckupController {
// }
@At
@SaCheckPermission(value = {"h5.healthCheckup.list", "h5.healthCheckup.mine"}, mode = SaMode.OR)
public Result getSubjectMoney(String id, String marriage) {
List<HealthCheckupProjectSubjectMoney> list = healthCheckupProjectService.dao().query(HealthCheckupProjectSubjectMoney.class, Cnd.where(HealthCheckupProjectSubjectMoney::getSubjectId, "=", id));
BigDecimal money = BigDecimal.valueOf(0.00);
String subjectMoneyId = null;
for (HealthCheckupProjectSubjectMoney subject : list) {
// 是否满足条件
Cnd cnd = Cnd.where("id", "=", SecurityUtil.getUserId());
ConditionGroupUtil.applyConditionGroup(cnd, subject.getMatchCnd());
int count = dao.count(View_user.class, cnd);
if (count > 0) {
money = subject.getMoney();
subjectMoneyId = subject.getId();
break;
}
}
return Result.success().addData(Map.of("money", money,"subjectMoneyId",subjectMoneyId));
}
}
@@ -7,6 +7,7 @@ import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.io.Serializable;
import java.util.List;
/**
* @ClassName HealthCheckupProjectSubject
@@ -51,4 +52,8 @@ public class HealthCheckupProjectSubject extends BaseModel implements Serializab
@Comment("说明描述")
@ColDefine(type = ColType.TEXT)
private String description;
@Many(field = "subjectId")
private List<HealthCheckupProjectSubjectMoney> subjectMoneys;
}
@@ -0,0 +1,60 @@
package com.budwk.app.zhgh.dayofficework.healthCheckup.model;
import com.budwk.app.base.model.BaseModel;
import com.budwk.app.base.param.ConditionGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @author zhf
* @date 2025/10/14 17:12
* @description 套餐金额表
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Table("health_checkup_project_subject_money")
@TableMeta("{'mysql-charset':'utf8mb4'}")
@Comment("体检套餐金额表")
public class HealthCheckupProjectSubjectMoney extends BaseModel implements Serializable {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("所属项目")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String projectId;
@Column
@Comment("所属项目")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String subjectId;
@Column
@Comment("金额")
@ColDefine(customType = "decimal(10,2)")
private BigDecimal money;
@Column
@Comment("名称")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String subjectMoneyName;
@Column
@Comment("条件")
@ColDefine(type = ColType.MYSQL_JSON)
private ConditionGroup matchCnd;
@Column
@Comment("选项排序")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String sort;
}
@@ -73,4 +73,9 @@ public class HealthCheckupUser extends BaseModel implements Serializable {
@ColDefine(type = ColType.VARCHAR, width = 50)
private String unitId;
@Column
@Comment("在职状态")
@ColDefine(type = ColType.VARCHAR, width = 30)
private String userState;
}
@@ -7,6 +7,7 @@ import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@@ -39,6 +40,16 @@ public class HealthCheckupUserSelection extends BaseModel implements Serializabl
@ColDefine(type = ColType.VARCHAR, width = 32)
private String subjectId;
@Column
@Comment("所属选项")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String subjectMoneyId;
@Column
@Comment("金额")
@ColDefine(customType = "decimal(10,2)")
private BigDecimal money;
@Column
@Comment("选择用户")
@ColDefine(type = ColType.VARCHAR, width = 32)
@@ -54,6 +65,11 @@ public class HealthCheckupUserSelection extends BaseModel implements Serializabl
@ColDefine(type = ColType.DATETIME)
private Date selectTime;
@Column
@Comment("备注")
@ColDefine(type = ColType.VARCHAR,width = 100)
private String bz;
@Many(field = "userSelectionId")
private List<HealthCheckupUserCompanion> companionList;
}
@@ -4,10 +4,7 @@ import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.base.utils.ManyAddOrRenewUtil;
import com.budwk.app.sys.views.View_user;
import com.budwk.app.zhgh.activity.basic.models.ActivityUserScope;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProject;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUser;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserCompanion;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserSelection;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.*;
import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupProjectService;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd;
@@ -49,6 +46,9 @@ public class HealthCheckupProjectServiceImpl extends BaseServiceImpl<HealthCheck
return null;
}
HealthCheckupProject project = fetchLinks(fetch(id), "healthCheckupProjectSubjects", Cnd.NEW().asc("optionSort"));
project.getHealthCheckupProjectSubjects().forEach(v -> {
v.setSubjectMoneys(dao().query(HealthCheckupProjectSubjectMoney.class, Cnd.where("subjectId", "=", v.getId())));
});
return project;
}
@@ -107,7 +107,7 @@ public class MeetingDelegationApproval {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.or("mi.name", "like", "%" + pageForm.getSearchKeyword() + "%");
seg.or("mi.address", "like", "%" + pageForm.getSearchKeyword() + "%");
seg.or("info.periodName", "like", "%" + pageForm.getSearchKeyword() + "%");
seg.or("mtp.periodName", "like", "%" + pageForm.getSearchKeyword() + "%");
cnd.and(seg);
}
if(year != null) {
@@ -116,7 +116,7 @@ public class MeetingDelegationApproval {
cnd.and("ins.createdAt", ">=", startTime);
cnd.and("ins.createdAt", "<=", endTime);
}
cnd.andEX("mi.type", "=", type);
cnd.andEX("mi.typeId", "=", type);
cnd.and("t.taskName", "=", "e0ef2404-7468-480a-97b6-b918e0a9232f");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
@@ -111,12 +111,12 @@ public class MeetingLeaveController {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.or("mi.name", "like", "%" + pageForm.getSearchKeyword() + "%");
seg.or("mi.address", "like", "%" + pageForm.getSearchKeyword() + "%");
seg.or("info.periodName", "like", "%" + pageForm.getSearchKeyword() + "%");
seg.or("mtp.periodName", "like", "%" + pageForm.getSearchKeyword() + "%");
cnd.and(seg);
}
cnd.and("info.userId", "=", SecurityUtil.getUserId());
cnd.and("ins.id", "is not", null);
cnd.andEX("mi.type", "=", type);
cnd.andEX("mi.typeId", "=", type);
if(year != null) {
long startTime = DateUtil.parse(year + "-01-01").getTime();
long endTime = DateUtil.parse(year + "-12-31").getTime();
@@ -38,7 +38,7 @@ import java.util.List;
@Slf4j
@IocBean
@Ok("json:full")
@Api(tags = "会议请假团长审核")
@Api(tags = "会议请假校工会审核")
@At("/platform/meeting/schoolUnionApproval")
public class MeetingSchoolUnionApproval {
@@ -106,7 +106,7 @@ public class MeetingSchoolUnionApproval {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.or("mi.name", "like", "%" + pageForm.getSearchKeyword() + "%");
seg.or("mi.address", "like", "%" + pageForm.getSearchKeyword() + "%");
seg.or("info.periodName", "like", "%" + pageForm.getSearchKeyword() + "%");
seg.or("mtp.periodName", "like", "%" + pageForm.getSearchKeyword() + "%");
cnd.and(seg);
}
if(year != null) {
@@ -115,7 +115,7 @@ public class MeetingSchoolUnionApproval {
cnd.and("ins.createdAt", ">=", startTime);
cnd.and("ins.createdAt", "<=", endTime);
}
cnd.andEX("mi.type", "=", type);
cnd.andEX("mi.typeId", "=", type);
cnd.and("t.taskName", "=", "e28e9ab0-5546-4d97-9939-47df088f38ab");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
@@ -119,6 +119,8 @@ public class MeetingInfoServiceImpl extends BaseServiceImpl<MeetingInfo> impleme
if (!newRelations.isEmpty()) {
dao().insert(newRelations);
}
dao().updateIgnoreNull(info);
}
private MeetingTimePeriodUser buildRelation(String meetingId, String periodId, MeetingTimePeriodUser user) {
@@ -43,6 +43,13 @@ public class ProposalCommissionerController {
public void index() {
}
@At("/h5")
@Ok("beetl:/platform/zhghh5/democratic/proposal/transact/commissioner/index.html")
@SaCheckPermission("proposal.commissioner")
public void h5Index() {
}
@At
@SaCheckPermission("proposal.commissioner")
public Result pageData(@Valid ProposalSearchParam pageForm, boolean approval) {
@@ -1,5 +1,6 @@
package com.budwk.app.zhgh.staffbenefit.contribution.controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.annotation.SLog;
@@ -88,7 +89,7 @@ public class ContributionTypeController {
@At
@ApiOperation("查询慈善捐助专题")
@SaCheckPermission("contribution")
@SaCheckLogin
public Result queryContributionType() {
List<ContributionType> list = typeService.query(Cnd.NEW().desc(ContributionType::getTypeCode));
return Result.success(list);
@@ -96,7 +97,7 @@ public class ContributionTypeController {
@At
@ApiOperation("查询单个慈善捐助专题")
@SaCheckPermission("contribution")
@SaCheckLogin
public Result fetchOne(String id) {
ContributionType type = typeService.fetch(id);
List<ContributionProject> list = dao.query(ContributionProject.class, Cnd.where(ContributionProject::getContributionTypeCode, "=", type.getTypeCode()).and(ContributionProject::getIsContributionEnable, "=", true));
@@ -1,5 +1,6 @@
package com.budwk.app.zhgh.staffbenefit.contribution.h5Controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
@@ -95,7 +96,7 @@ public class H5ContributionListController {
@At
@ApiOperation("查询单个慈善捐助专题")
@SaCheckPermission("contribution")
@SaCheckLogin
public Result fetchOne(String id) {
Sql sql = Sqls.create("""
SELECT
+1 -1
View File
@@ -48,7 +48,7 @@
<logger name="java" additivity="false" />
<logger name="org.eclipse.jetty" level="INFO"/>
<logger name="org.quartz" level="INFO"/>
<logger name="org.nutz" level="INFO"/>
<logger name="org.nutz" level="DEBUG"/>
<!-- 日志级别和appender的关联 -->
<root level="DEBUG">
@@ -64,6 +64,9 @@
color: var(--color-text-primary);
}
.el-table th.el-table__cell{
background: #FAFAFA;
}
.el-card {
border: none;
@@ -205,6 +205,8 @@ module.exports = {
}
if (fileAccept) {
tips = tips + `只能上传<span style="color: red">${fileAccept}</span>文件;`
} else {
tips = tips + '不限格式;'
}
if (fileSize) {
tips = tips + `单个文件大小不能超过<span style="color: red">${fileSize / 1024 / 1024}</span>M`
@@ -141,10 +141,10 @@ const act = {
padding: 40px 0;
}
.section-act .section-act-title span:hover {
/*.section-act .section-act-title span:hover {
color: var(--color-primary);
cursor: pointer;
}
}*/
/deep/ .section-act .section-act-title span::before {
content: '';
@@ -2,7 +2,7 @@ const entry = {
template: /*language=HTML*/ `
<div class="entry-wrapper">
<div class="entry-title">
常用入口
<span>常用入口</span>
</div>
<div class="entry-container">
@@ -144,6 +144,27 @@ const entry = {
padding: 40px 0;
}
/deep/ .entry-title span::before {
content: '';
width: 24px;
height: 11px;
background: url(https://www.ncu.edu.cn/images/titl.svg) no-repeat center;
background-size: 24px 11px;
display: inline-block;
margin-right: 0;
vertical-align: middle;
}
/deep/ .entry-title span::after {
content: '';
width: 24px;
height: 11px;
background: url(https://www.ncu.edu.cn/images/titr.svg) no-repeat center;
background-size: 24px 11px;
display: inline-block;
margin-left: 0;
vertical-align: middle;
}
.entry-container {
width: 80%;
@@ -3,11 +3,11 @@ const jcdt = {
<div class="jcdt-wrapper">
<div class="jcdt-container">
<div class="jcdt-title">
基层动态
<span>基层动态</span>
</div>
<div class="jcdt-content">
<div class="jcdt-list">
<div class="jcdt-item" v-for="item in list" :key="item.title">
<div class="jcdt-item" v-for="item in list" :key="item.title" @click="onLink(item)">
<div class="date">{{item.date}}</div>
<div class="title">{{item.title}}</div>
<div class="image">
@@ -29,7 +29,12 @@ const jcdt = {
default: []
}
},
methods: {},
methods: {
onLink(item) {
if(!item.url) return
window.open(item.url)
},
},
style: /*language=CSS*/ `
.jcdt-wrapper {
width: 100%;
@@ -54,6 +59,28 @@ const jcdt = {
text-align: center;
padding: 40px 0;
}
/deep/ .jcdt-container .jcdt-title span::before {
content: '';
width: 24px;
height: 11px;
background: url(https://www.ncu.edu.cn/images/titl.svg) no-repeat center;
background-size: 24px 11px;
display: inline-block;
margin-right: 0;
vertical-align: middle;
}
/deep/ .jcdt-container .jcdt-title span::after {
content: '';
width: 24px;
height: 11px;
background: url(https://www.ncu.edu.cn/images/titr.svg) no-repeat center;
background-size: 24px 11px;
display: inline-block;
margin-left: 0;
vertical-align: middle;
}
.jcdt-list {
display: grid;
@@ -48,12 +48,12 @@ var assigneeForm = {
</div>
<!-- 用户选择弹窗 -->
<el-dialog title="选择参与者" :visible.sync="dialogVisible" width="80%" append-to-body>
<el-dialog title="选择参与者" :visible.sync="dialogVisible" width="80%" append-to-body top="20px">
<div style="display: flex;">
<!-- 左侧表格 -->
<div style="flex: 3; margin-right: 10px; overflow: auto;">
<div style="margin-bottom: 10px;">
<el-input v-model="pageForm.searchKeyword" placeholder="请输入关键字搜索" style="width: 200px; margin-right: 10px;"></el-input>
<el-input v-model="pageForm.searchKeyword" placeholder="请输入姓名或工号搜索" style="width: 200px; margin-right: 10px;"></el-input>
<el-button type="primary" @click="searchUsers">搜索</el-button>
</div>
<el-table
@@ -38,7 +38,7 @@ layout("/layouts/platform.html"){
<el-input placeholder="请输入内容" clearable v-model="pageForm.loginName" style="width: 100%"></el-input>
</search-item>
<search-item label="所属单位">
<el-select v-model="pageForm.unitName" clearable filterable>
<el-select placeholder="请选择所属单位" v-model="pageForm.unitName" clearable filterable>
<el-option v-for="item in unitNameOptions" :key="item" :label="item" :value="item"></el-option>
</el-select>
</search-item>
@@ -7,11 +7,11 @@ layout("/layouts/platform.html"){
width: 100%;
margin-bottom: 10px;
}
.pullTimeRadioGroup .el-radio.is-bordered + .el-radio.is-bordered {
margin-left: 0;
}
.condition-builder {
border: 1px solid #dcdfe6;
border-radius: 4px;
@@ -32,7 +32,7 @@ layout("/layouts/platform.html"){
<el-input placeholder="请输入内容" clearable v-model="pageForm.loginName" style="width: 100%"></el-input>
</search-item>
<search-item label="所属单位">
<el-select v-model="pageForm.unitId" clearable style="width: 100%">
<el-select placeholder="请选择所属单位" v-model="pageForm.unitId" clearable style="width: 100%">
<el-option v-for="i in unitOptions" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</search-item>
@@ -47,7 +47,7 @@ layout("/layouts/platform.html"){
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool label="系统当前用户数据">
<el-button type="primary" size="mini" @click="updateDataDict" icon="el-icon-refresh">更新【码表】数据</el-button>
@@ -87,11 +87,11 @@ layout("/layouts/platform.html"){
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<member-all-change-info ref="memberAllChangeInfoRef"></member-all-change-info>
</template>
</guava>
<el-dialog title="选择数据源" :visible.sync="updateDialog" width="70%">
<el-timeline>
@@ -105,7 +105,7 @@ layout("/layouts/platform.html"){
</el-radio>
</el-radio-group>
</el-timeline-item>
<el-timeline-item timestamp="更新方式" placement="top">
<el-radio-group class="checkGroup" style="width: 100%" v-model="updateFromData.updateMode" size="small">
<el-row>
@@ -114,10 +114,10 @@ layout("/layouts/platform.html"){
</el-row>
</el-radio-group>
</el-timeline-item>
<el-timeline-item timestamp="高级条件筛选" placement="top">
<el-switch v-model="enableAdvancedConditions" active-text="启用高级条件"></el-switch>
<div v-if="enableAdvancedConditions" class="condition-builder">
<!-- 条件构建器组件 -->
<condition-group :group="updateFromData.conditionGroup" :field_options="fieldOptions" @remove="removeRootGroup"></condition-group>
@@ -133,7 +133,7 @@ layout("/layouts/platform.html"){
<script>
<!--#include("../../../zhgh/staffmanage/member/change/common/memberAllChangeInfo.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
@@ -193,7 +193,7 @@ layout("/layouts/platform.html"){
}
})
})
},
// 更新码表数据
updateDataDict() {
@@ -262,12 +262,12 @@ layout("/layouts/platform.html"){
this.$message.warning("请选择更新方式")
return
}
// 如果未启用高级条件,则移除条件组
if (!this.enableAdvancedConditions) {
this.updateFromData.conditionGroup = null
}
this.$confirm("确定要更新数据吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@@ -4,8 +4,8 @@ layout("/layouts/platform.html"){
<div id="app" v-cloak>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="单位">
<el-select clearable filterable placeholder="请选择" style="width: 100%" v-model="pageForm.searchUnit" @change="doSearch">
<search-item label="所属单位">
<el-select clearable filterable placeholder="请选择所属单位" style="width: 100%" v-model="pageForm.searchUnit" @change="doSearch">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in units"></el-option>
</el-select>
<!-- <el-cascader :props="props" v-model="parentUnitSearch" placeholder="请选择单位" clearable filterable></el-cascader>-->
@@ -298,7 +298,7 @@ layout("/layouts/platform.html"){
})
}
},
units: []
}
},
@@ -171,7 +171,7 @@ layout("/layouts/platform.html"){
<el-row type="flex" justify="end" class="mt20">
<el-button type="primary" plain @click="onSave">保存</el-button>
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提交1</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
</el-row>
</el-card>
</div>
@@ -14,25 +14,25 @@ layout("/layouts/platform.html"){
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="申请人">
<el-input placeholder="请输入申请人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')">
<search-item label="所属工会">
<el-select @change="flushUnits" @clear="flushUnits" clearable
filterable
placeholder="所属工会"
placeholder="请选择所属工会"
style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.name" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select clearable filterable placeholder="所属单位"
<el-select clearable filterable placeholder="请选择所属单位"
style="width: 100%;" v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
@@ -41,7 +41,7 @@ layout("/layouts/platform.html"){
</template>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool :app="this" label="审批列表">
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
@@ -49,12 +49,12 @@ layout("/layouts/platform.html"){
<el-radio-button label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
@@ -88,7 +88,7 @@ layout("/layouts/platform.html"){
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<info ref="infoRef">
<div v-if="showApprovalForm">
@@ -117,7 +117,7 @@ layout("/layouts/platform.html"){
<script>
<!--#include("../common/info.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
@@ -142,7 +142,7 @@ layout("/layouts/platform.html"){
unions: [],
units: [],
clubs: [],
// 审核相关
formData: {},
showApprovalForm: false
@@ -168,7 +168,7 @@ layout("/layouts/platform.html"){
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
@@ -189,7 +189,7 @@ layout("/layouts/platform.html"){
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
@@ -23,7 +23,7 @@ layout("/layouts/platform.html"){
<search-item label="所属工会">
<el-select @change="flushUnits" @clear="flushUnits" clearable
filterable
placeholder="所属工会"
placeholder="请选择所属工会"
style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.name" :value="item.id"
@@ -32,7 +32,7 @@ layout("/layouts/platform.html"){
</search-item>
<search-item label="所属单位">
<el-select clearable filterable placeholder="所属单位"
<el-select clearable filterable placeholder="请选择所属单位"
style="width: 100%;" v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
@@ -14,25 +14,25 @@ layout("/layouts/platform.html"){
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="申请人">
<el-input placeholder="请输入申请人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')">
<search-item label="所属工会">
<el-select @change="flushUnits" @clear="flushUnits" clearable
filterable
placeholder="所属工会"
placeholder="请选择所属工会"
style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.name" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select clearable filterable placeholder="所属单位"
<el-select clearable filterable placeholder="请选择所属单位"
style="width: 100%;" v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
@@ -41,7 +41,7 @@ layout("/layouts/platform.html"){
</template>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool :app="this" label="审批列表">
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
@@ -49,12 +49,12 @@ layout("/layouts/platform.html"){
<el-radio-button label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
@@ -88,7 +88,7 @@ layout("/layouts/platform.html"){
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<info ref="infoRef">
<div v-if="showApprovalForm">
@@ -117,7 +117,7 @@ layout("/layouts/platform.html"){
<script>
<!--#include("../common/info.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
@@ -142,7 +142,7 @@ layout("/layouts/platform.html"){
unions: [],
units: [],
clubs: [],
// 审核相关
formData: {},
showApprovalForm: false
@@ -168,7 +168,7 @@ layout("/layouts/platform.html"){
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
@@ -189,7 +189,7 @@ layout("/layouts/platform.html"){
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
@@ -14,25 +14,25 @@ layout("/layouts/platform.html"){
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="申请人">
<el-input placeholder="请输入申请人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')">
<search-item label="所属工会">
<el-select @change="flushUnits" @clear="flushUnits" clearable
filterable
placeholder="所属工会"
placeholder="请选择所属工会"
style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.name" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select clearable filterable placeholder="所属单位"
<el-select clearable filterable placeholder="请选择所属单位"
style="width: 100%;" v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
@@ -41,7 +41,7 @@ layout("/layouts/platform.html"){
</template>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool :app="this" label="审批列表">
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
@@ -49,12 +49,12 @@ layout("/layouts/platform.html"){
<el-radio-button label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
@@ -88,7 +88,7 @@ layout("/layouts/platform.html"){
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<info ref="infoRef">
<div v-if="showApprovalForm">
@@ -117,7 +117,7 @@ layout("/layouts/platform.html"){
<script>
<!--#include("../common/info.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
@@ -142,7 +142,7 @@ layout("/layouts/platform.html"){
unions: [],
units: [],
clubs: [],
// 审核相关
formData: {},
showApprovalForm: false
@@ -168,7 +168,7 @@ layout("/layouts/platform.html"){
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
@@ -189,7 +189,7 @@ layout("/layouts/platform.html"){
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
@@ -197,7 +197,7 @@ layout("/layouts/platform.html"){
<el-row type="flex" justify="end" class="mt20">
<el-button type="primary" plain @click="onSave">保存</el-button>
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提交1</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
</el-row>
</el-card>
@@ -14,25 +14,25 @@ layout("/layouts/platform.html"){
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="申请人">
<el-input placeholder="请输入申请人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')">
<search-item label="所属工会">
<el-select @change="flushUnits" @clear="flushUnits" clearable
filterable
placeholder="所属工会"
placeholder="请选择所属工会"
style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.name" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select clearable filterable placeholder="所属单位"
<el-select clearable filterable placeholder="请选择所属单位"
style="width: 100%;" v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
@@ -41,7 +41,7 @@ layout("/layouts/platform.html"){
</template>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool :app="this" label="审批列表">
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
@@ -49,12 +49,12 @@ layout("/layouts/platform.html"){
<el-radio-button label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
@@ -88,7 +88,7 @@ layout("/layouts/platform.html"){
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<info ref="infoRef">
<div v-if="showApprovalForm">
@@ -117,7 +117,7 @@ layout("/layouts/platform.html"){
<script>
<!--#include("../common/info.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
@@ -142,7 +142,7 @@ layout("/layouts/platform.html"){
unions: [],
units: [],
clubs: [],
// 审核相关
formData: {},
showApprovalForm: false
@@ -168,7 +168,7 @@ layout("/layouts/platform.html"){
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
@@ -189,7 +189,7 @@ layout("/layouts/platform.html"){
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
@@ -23,7 +23,7 @@ layout("/layouts/platform.html"){
<search-item label="所属工会">
<el-select @change="flushUnits" @clear="flushUnits" clearable
filterable
placeholder="所属工会"
placeholder="请选择所属工会"
style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.name" :value="item.id"
@@ -32,7 +32,7 @@ layout("/layouts/platform.html"){
</search-item>
<search-item label="所属单位">
<el-select clearable filterable placeholder="所属单位"
<el-select clearable filterable placeholder="请选择所属单位"
style="width: 100%;" v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
@@ -14,25 +14,25 @@ layout("/layouts/platform.html"){
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="申请人">
<el-input placeholder="请输入申请人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')">
<search-item label="所属工会">
<el-select @change="flushUnits" @clear="flushUnits" clearable
filterable
placeholder="所属工会"
placeholder="请选择所属工会"
style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.name" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select clearable filterable placeholder="所属单位"
<el-select clearable filterable placeholder="请选择所属单位"
style="width: 100%;" v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
@@ -41,7 +41,7 @@ layout("/layouts/platform.html"){
</template>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool :app="this" label="审批列表">
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
@@ -49,12 +49,12 @@ layout("/layouts/platform.html"){
<el-radio-button label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
@@ -88,7 +88,7 @@ layout("/layouts/platform.html"){
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<info ref="infoRef">
<div v-if="showApprovalForm">
@@ -117,7 +117,7 @@ layout("/layouts/platform.html"){
<script>
<!--#include("../common/info.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
@@ -142,7 +142,7 @@ layout("/layouts/platform.html"){
unions: [],
units: [],
clubs: [],
// 审核相关
formData: {},
showApprovalForm: false
@@ -168,7 +168,7 @@ layout("/layouts/platform.html"){
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
@@ -189,7 +189,7 @@ layout("/layouts/platform.html"){
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
@@ -14,25 +14,25 @@ layout("/layouts/platform.html"){
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="申请人">
<el-input placeholder="请输入申请人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')">
<search-item label="所属工会">
<el-select @change="flushUnits" @clear="flushUnits" clearable
filterable
placeholder="所属工会"
placeholder="请选择所属工会"
style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.name" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select clearable filterable placeholder="所属单位"
<el-select clearable filterable placeholder="请选择所属单位"
style="width: 100%;" v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
@@ -41,7 +41,7 @@ layout("/layouts/platform.html"){
</template>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool :app="this" label="审批列表">
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
@@ -49,12 +49,12 @@ layout("/layouts/platform.html"){
<el-radio-button label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
@@ -88,7 +88,7 @@ layout("/layouts/platform.html"){
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<info ref="infoRef">
<div v-if="showApprovalForm">
@@ -117,7 +117,7 @@ layout("/layouts/platform.html"){
<script>
<!--#include("../common/info.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
@@ -142,7 +142,7 @@ layout("/layouts/platform.html"){
unions: [],
units: [],
clubs: [],
// 审核相关
formData: {},
showApprovalForm: false
@@ -168,7 +168,7 @@ layout("/layouts/platform.html"){
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
@@ -189,7 +189,7 @@ layout("/layouts/platform.html"){
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
@@ -19,7 +19,7 @@ const signForm = {
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="所单位" prop="unitName">
<el-form-item label="所单位" prop="unitName">
<el-input readonly v-model="formData.unitName"></el-input>
</el-form-item>
</el-col>
@@ -7,13 +7,13 @@ layout("/layouts/platform.html"){
<div id="app" v-cloak>
<guava>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="姓名工号">
<el-input placeholder="请输入关键字查询" v-model="pageForm.keyWord"></el-input>
</search-item>
<search-item label="所属工会">
<el-select v-model="pageForm.unionId" clearable filterable placeholder="请选择院级工会"
<el-select v-model="pageForm.unionId" clearable filterable placeholder="请选择所属工会"
style="width: 100%">
<el-option
v-for="item in unionList"
@@ -251,7 +251,7 @@ layout("/layouts/platform.html"){
},
async created() {
this.pageData();
const hasAdminRole = this.$auth.hasRoleOr("SYSADMIN, SCHOOL_UNION_ADMIN")
if (hasAdminRole) {
this.unionList = await this.$businessTool.listUnion()
@@ -322,9 +322,9 @@ var ACTIVITY_SPORTS_APPLY_USER = {
<el-input maxlength="30" placeholder="请填写身份证号" type="text"
v-model="formData.idcard"></el-input>
</el-form-item>
<el-form-item label="所单位" prop="unitId"
:rules="{required: true, message: '请选择所单位', trigger: 'blur'}">
<el-select clearable filterable placeholder="请选择所单位" style="width: 100%"
<el-form-item label="所单位" prop="unitId"
:rules="{required: true, message: '请选择所单位', trigger: 'blur'}">
<el-select clearable filterable placeholder="请选择所单位" style="width: 100%"
v-model="formData.unitId">
<el-option
:key="item.id"
@@ -279,8 +279,8 @@ layout("/layouts/platform.html"){
v-model="leaderData.userId"
></user-select>
</el-form-item>
<el-form-item label="所单位" prop="unitId">
<el-select clearable filterable placeholder="请选择所单位" style="width: 100%"
<el-form-item label="所单位" prop="unitId">
<el-select clearable filterable placeholder="请选择所单位" style="width: 100%"
v-model="leaderData.unitId">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in unitOptions"></el-option>
@@ -304,8 +304,8 @@ layout("/layouts/platform.html"){
v-model="coachData.userId"
></user-select>
</el-form-item>
<el-form-item label="所单位" prop="unitId">
<el-select clearable filterable placeholder="请选择所单位" style="width: 100%"
<el-form-item label="所单位" prop="unitId">
<el-select clearable filterable placeholder="请选择所单位" style="width: 100%"
v-model="coachData.unitId">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in unitOptions"></el-option>
@@ -17,7 +17,7 @@ const applyForm = {
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="所单位" prop="unitName">
<el-form-item label="所单位" prop="unitName">
<el-input readonly v-model="formData.unitName"></el-input>
</el-form-item>
</el-col>
@@ -34,12 +34,12 @@ layout("/layouts/platform.html"){
<el-input v-model="pageForm.searchKeyword" clearable placeholder="请输入内容"></el-input>
</search-item>
<search-item label="所属工会">
<el-select clearable filterable placeholder="工会" v-model="pageForm.unionId" @change="pageForm.unitId=null;listUnit();">
<el-select clearable filterable placeholder="请选择所属工会" v-model="pageForm.unionId" @change="pageForm.unitId=null;listUnit();">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unionOptions"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select clearable filterable placeholder="提案单位" v-model="pageForm.unitId">
<el-select clearable filterable placeholder="请选择所属单位" v-model="pageForm.unitId">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitOptions"></el-option>
</el-select>
</search-item>
@@ -41,13 +41,13 @@ layout("/layouts/platform.html"){
</search-item>
<search-item label="所属工会">
<el-select clearable filterable placeholder="请选择工会" style="width: 100%" v-model="pageForm.unionId">
<el-select clearable filterable placeholder="请选择所属工会" style="width: 100%" v-model="pageForm.unionId">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unionList"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select clearable filterable multiple placeholder="请选择单位" style="width: 100%" v-model="pageForm.unitIds">
<el-select clearable filterable multiple placeholder="请选择所属单位" style="width: 100%" v-model="pageForm.unitIds">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitList"></el-option>
</el-select>
</search-item>
@@ -48,13 +48,13 @@ layout("/layouts/platform.html"){
</search-item>
<search-item label="所属工会">
<el-select clearable filterable placeholder="请选择工会" style="width: 100%" v-model="pageForm.unionId">
<el-select clearable filterable placeholder="请选择所属工会" style="width: 100%" v-model="pageForm.unionId">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unionList"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select clearable filterable multiple placeholder="请选择单位" style="width: 100%" v-model="pageForm.unitIds">
<el-select clearable filterable multiple placeholder="请选择所属单位" style="width: 100%" v-model="pageForm.unitIds">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitList"></el-option>
</el-select>
</search-item>
@@ -34,9 +34,9 @@ layout("/layouts/platform.html"){
<el-option label="女" value="女"></el-option>
</el-select>
</search-item>
<search-item label="工会">
<search-item label="所属工会">
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
placeholder="请选择工会" clearable>
placeholder="请选择所属工会" clearable>
<el-option v-for="item in unionOptions"
:value="item.id"
:key="item.id"
@@ -44,9 +44,9 @@ layout("/layouts/platform.html"){
></el-option>
</el-select>
</search-item>
<search-item label="单位">
<search-item label="所属单位">
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
placeholder="请选择单位" clearable>
placeholder="请选择所属单位" clearable>
<el-option v-for="item in unitOptions"
:value="item.id"
:key="item.id"
@@ -33,9 +33,9 @@ layout("/layouts/platform.html"){
<el-option label="女" value="女"></el-option>
</el-select>
</search-item>
<search-item label="工会">
<search-item label="所属工会">
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
placeholder="请选择工会" clearable>
placeholder="请选择所属工会" clearable>
<el-option v-for="item in unionOptions"
:value="item.id"
:key="item.id"
@@ -43,9 +43,9 @@ layout("/layouts/platform.html"){
></el-option>
</el-select>
</search-item>
<search-item label="单位">
<search-item label="所属单位">
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
placeholder="请选择单位" clearable>
placeholder="请选择所属单位" clearable>
<el-option v-for="item in unitOptions"
:value="item.id"
:key="item.id"
@@ -241,7 +241,10 @@ const contentForm = {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message.success('删除成功');
this.$axios.post('/platform/edu/chapters/delete', {id}).then(res => {
this.$message.success('删除成功')
this.listChapter()
})
});
},
@@ -38,14 +38,14 @@ layout("/layouts/platform.html"){
</el-select>
</search-item>
<search-item label="所属工会">
<el-select v-model="pageForm.unionId" placeholder="请选择工会" clearable style="width: 100%"
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" clearable style="width: 100%"
@change="flushUnits" @clear="flushUnits">
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select placeholder="所属单位" style="width: 100%" v-model="pageForm.unitId" clearable
<el-select placeholder="请选择所属单位" style="width: 100%" v-model="pageForm.unitId" clearable
filterable>
<el-option v-for="item in unitOptions" :label="item.name" :value="item.id"></el-option>
</el-select>
@@ -38,14 +38,14 @@ layout("/layouts/platform.html"){
</el-select>
</search-item>
<search-item label="所属工会">
<el-select v-model="pageForm.unionId" placeholder="请选择工会" clearable style="width: 100%"
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" clearable style="width: 100%"
@change="flushUnits" @clear="flushUnits">
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select placeholder="所属单位" style="width: 100%" v-model="pageForm.unitId" clearable
<el-select placeholder="请选择所属单位" style="width: 100%" v-model="pageForm.unitId" clearable
filterable>
<el-option v-for="item in unitOptions" :label="item.name" :value="item.id"></el-option>
</el-select>
@@ -18,9 +18,9 @@ layout("/layouts/platform.html"){
<el-option label="女" value="女"></el-option>
</el-select>
</search-item>
<search-item label="工会">
<search-item label="所属工会">
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
placeholder="请选择工会" clearable>
placeholder="请选择所属工会" clearable>
<el-option v-for="item in unionOptions"
:value="item.id"
:key="item.id"
@@ -28,9 +28,9 @@ layout("/layouts/platform.html"){
></el-option>
</el-select>
</search-item>
<search-item label="单位">
<search-item label="所属单位">
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
placeholder="请选择单位" clearable>
placeholder="请选择所属单位" clearable>
<el-option v-for="item in unitOptions"
:value="item.id"
:key="item.id"
@@ -0,0 +1,128 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="工号/姓名">
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询"
clearable></el-input>
</search-item>
<search-item label="分工会">
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
placeholder="请选择分工会" clearable>
<el-option v-for="item in unionOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool>
<el-button size="small" type="primary" @click="batchJoin">批量设置</el-button>
<el-button size="small" type="primary" @click="showImportDialog = true">批量导入</el-button>
</table-tool>
<el-table :data="tableData" ref="tableRef" row-key="id" @sort-change="pageOrder" style="width: 100%">
<el-table-column type="selection" fixed="left"></el-table-column>
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
fixed="left"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</guava>
<excel-import
ref="excelImportRef"
url="/platform/fundMember/batchJoin/batchImport"
template_url="/platform/fundMember/batchJoin/downloadTemplate"
:visible.sync="showImportDialog"
title="导入基金会员数据"
width="700px"
@import-success="doSearch"
:extra_params="{}"
></excel-import>
</div>
<script>
<!--#include('../info.js'){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
components: {
"fund-member-info": fundMemberInfo
},
data() {
return {
tableColumns: [
{label: "工号", prop: "loginname"},
{label: "姓名", prop: "username"},
{label: "性别", prop: "sex"},
{label: "出生年月", prop: "birthday"},
{label: "在职状态", prop: "userState"},
{label: "所属单位", prop: "unitName"},
{label: "所属工会", prop: "unionName"},
],
unionOptions: [],
pageForm: {
approval: false
},
formData: {},
showImportDialog: false
}
},
methods: {
batchJoin() {
const selection = this.$refs.tableRef.selection
if (selection.length === 0) {
this.$message.error("请选择要批量加入的人员")
return
}
this.$confirm("您确定要将勾选的用户批量加入基金会员吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post('/platform/fundMember/batchJoin/confirm', {
loginNames: JSON.stringify(selection.map(item => item.loginname))
}).then(res => {
if (res.code === 0) {
this.$message.success("批量加入成功")
this.doSearch()
}
})
})
}
},
created() {
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -9,8 +9,8 @@ layout("/layouts/platform.html"){
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
style="width: 100%"></el-date-picker>
</search-item>
<search-item label="标题">
<el-input v-model="pageForm.searchKeyword" placeholder="标题" clearable></el-input>
<search-item label="工号/姓名">
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询" clearable></el-input>
</search-item>
</search>
</el-card>
@@ -25,6 +25,13 @@ layout("/layouts/platform.html"){
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
<el-table-column prop="loginName" label="工号"></el-table-column>
<el-table-column prop="userName" label="姓名"></el-table-column>
<el-table-column prop="isJoin" label="申请类型">
<template slot-scope="{row}">
<el-tag v-if="row.isJoin" size="small">加入</el-tag>
<el-tag v-else size="small" type="danger">退出</el-tag>
</template>
</el-table-column>
<el-table-column prop="submitTime" label="申请时间"></el-table-column>
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
<el-table-column prop="instanceState" label="流程状态">
<template slot-scope="{row}">
@@ -0,0 +1,122 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
style="width: 100%"></el-date-picker>
</search-item>
<search-item label="工号/姓名">
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询"
clearable></el-input>
</search-item>
<search-item label="分工会">
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
placeholder="请选择分工会" clearable>
<el-option v-for="item in unionOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
<search-item label="变更类型">
<el-select v-model="pageForm.isJoin" style="width: 100%">
<el-option label="全部" :value="null"></el-option>
<el-option label="加入" :value="true"></el-option>
<el-option label="退出" :value="false"></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool :columns.sync="tableColumns">
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
fixed="left"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'isJoin'" scope="{row}">
<el-tag v-if="row.isJoin" size="small">加入</el-tag>
<el-tag v-else size="small" type="danger">退出</el-tag>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</guava>
</div>
<script>
<!--#include('../info.js'){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
components: {
"fund-member-info": fundMemberInfo
},
data() {
return {
tableColumns: [
{label: "工号", prop: "loginName"},
{label: "姓名", prop: "userName"},
{label: "性别", prop: "sex"},
{label: "出生年月", prop: "birthday"},
{label: "参加工作日期", prop: "joinWorkTime"},
{label: "退休日期", prop: "retireTime"},
{label: "所属工会", prop: "unionName"},
{label: "变更类型", prop: "isJoin"},
{label: "变更来源", prop: "changeOrigin"},
{label: "变更时间", prop: "changeTime"}
],
unionOptions: [],
pageForm: {
approval: false,
isJoin: null
},
formData: {},
showApprovalForm: false
}
},
methods: {
openView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.fundMemberInfoRef.onOpen(row)
})
},
exportExcel() {
if (!this.pageForm.year) {
this.$message.error('请选择年度再导出')
return
}
this.$downLoad('/platform/fundMember/query/exportExcel', {
year: this.pageForm.year,
unionId: this.pageForm.unionId
})
}
},
created() {
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,110 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
style="width: 100%"></el-date-picker>
</search-item>
<search-item label="工号/姓名">
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询"
clearable></el-input>
</search-item>
<search-item label="分工会">
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
placeholder="请选择分工会" clearable>
<el-option v-for="item in unionOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
fixed="left"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
</template>
</guava>
</div>
<script>
<!--#include('../info.js'){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
components: {
"fund-member-info": fundMemberInfo
},
data() {
return {
tableColumns: [
{label: "年度", prop: "year"},
{label: "工号", prop: "loginName"},
{label: "姓名", prop: "userName"},
{label: "性别", prop: "sex"},
{label: "出生年月", prop: "birthday"},
{label: "在职状态", prop: "userState"},
{label: "所属工会", prop: "unionName"},
{label: "加入时间", prop: "joinTime"},
],
unionOptions: [],
pageForm: {
approval: false
},
formData: {},
}
},
methods: {
openView(row) {
this.$refs.guava.edit(() => {
this.$refs.fundMemberInfoRef.onOpen(row)
})
},
exportExcel() {
if (!this.pageForm.year) {
this.$message.error('请选择年度再导出')
return
}
this.$downLoad('/platform/fundMember/query/exportExcel', {
year: this.pageForm.year,
unionId: this.pageForm.unionId
})
}
},
created() {
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -20,6 +20,13 @@ layout("/layouts/platform.html"){
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
<el-table-column prop="loginName" label="工号"></el-table-column>
<el-table-column prop="userName" label="姓名"></el-table-column>
<el-table-column prop="isJoin" label="申请类型">
<template slot-scope="{row}">
<el-tag v-if="row.isJoin" size="small">加入</el-tag>
<el-tag v-else size="small" type="danger">退出</el-tag>
</template>
</el-table-column>
<el-table-column prop="submitTime" label="申请时间"></el-table-column>
<el-table-column prop="taskName" label="当前节点"></el-table-column>
<el-table-column prop="instanceState" label="流程状态">
<template slot-scope="{row}">
@@ -37,7 +44,8 @@ layout("/layouts/platform.html"){
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
<el-button @click="onDelete(row.id)" v-if="row.taskKey === 'startTask' || !row.instanceId"
<!-- v-if="row.taskKey === 'startTask' || !row.instanceId"-->
<el-button @click="onDelete(row.id)"
size="mini" type="danger">删除
</el-button>
</template>
@@ -0,0 +1,171 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
style="width: 100%"></el-date-picker>
</search-item>
<search-item label="工号/姓名">
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询"
clearable></el-input>
</search-item>
<search-item label="分工会">
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
placeholder="请选择分工会" clearable>
<el-option v-for="item in unionOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool>
<el-button size="small" type="primary" @click="backup">备份会员名单</el-button>
<el-button size="small" type="primary" @click="exportExcel">导出登记汇总表</el-button>
<el-button size="small" type="primary" @click="exportNewMemberExcel">导出本年新会员名单</el-button>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
fixed="left"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
<template v-else-if="column.prop === 'isJoin'" scope="{row}">
<el-tag v-if="row.isJoin" size="small">加入</el-tag>
<el-tag v-else size="small" type="danger">退出</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="onQuit(row)" size="mini" type="danger">退会</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
</template>
</guava>
</div>
<script>
<!--#include('../info.js'){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
components: {
"fund-member-info": fundMemberInfo
},
data() {
return {
tableColumns: [
{label: "工号", prop: "loginName"},
{label: "姓名", prop: "userName"},
{label: "性别", prop: "sex"},
{label: "出生年月", prop: "birthday"},
{label: "在职状态", prop: "userState"},
{label: "所属工会", prop: "unionName"},
{label: "加入时间", prop: "joinTime"},
],
unionOptions: [],
pageForm: {
approval: false
},
formData: {},
}
},
methods: {
openView(row) {
this.$refs.guava.edit(() => {
this.$refs.fundMemberInfoRef.onOpen(row)
})
},
// 退会
onQuit(row) {
this.$confirm('您确定要将' + row.userName + '退会吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$axios.post('/platform/fundMember/query/quit', {
loginName: row.loginName
}).then((res) => {
if (res.code === 0) {
this.$message.success('退会成功')
this.pageData()
}
})
})
},
// 备份会员
backup() {
// 此处需要选择年份
this.$prompt('请输入备份会员至哪个年度', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /^[0-9]{4}$/,
inputErrorMessage: '请输入4位数的年份'
}).then(({value}) => {
this.$axios.post('/platform/fundMember/query/backup', {
year: value
}).then((res) => {
if (res.code === 0) {
this.$message.success('备份成功')
}
})
})
},
// 导出登记汇总表
exportExcel() {
if (!this.pageForm.year) {
this.$message.error('请选择年度再导出')
return
}
this.$downLoad('/platform/fundMember/query/exportExcel', {
year: this.pageForm.year,
unionId: this.pageForm.unionId
})
},
// 导出本年新会员名单
exportNewMemberExcel(){
this.$downLoad('/platform/fundMember/query/exportNewMemberExcel')
}
},
created() {
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -25,6 +25,14 @@ layout("/layouts/platform.html"){
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
<el-table-column prop="loginName" label="工号"></el-table-column>
<el-table-column prop="userName" label="姓名"></el-table-column>
<el-table-column prop="unionName" label="所属工会"></el-table-column>
<el-table-column prop="isJoin" label="申请类型">
<template slot-scope="{row}">
<el-tag v-if="row.isJoin" size="small">加入</el-tag>
<el-tag v-else size="small" type="danger">退出</el-tag>
</template>
</el-table-column>
<el-table-column prop="submitTime" label="申请时间"></el-table-column>
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
<el-table-column prop="instanceState" label="流程状态">
<template slot-scope="{row}">
@@ -152,12 +152,13 @@ layout("/layouts/platform.html"){
message: '请输入正确的手机号码',
trigger: 'blur'
}],
homePhone: [{required: true, message: '请输入住宅号码', trigger: 'blur'},
homePhone: [
/*{required: true, message: '请输入住宅号码', trigger: 'blur'},
{
pattern: /^(0\d{2,3}-?)?\d{7,8}$/,
message: '请输入正确的住宅号码',
trigger: 'blur'
}
}*/
],
avatar: [{required: false, message: '请上传照片', trigger: 'blur'}]
},
@@ -234,13 +235,15 @@ layout("/layouts/platform.html"){
}
})
} else {
const {username, loginname, sex, birthday, mobile} = this.$store.state.user
const {username, loginname, sex, birthday, mobile, union} = this.$store.state.user
this.formData = {
userName: username,
loginName: loginname,
sex: sex,
birthday: birthday,
mobile: mobile
mobile: mobile,
unionId: union?.id,
unionName: union?.name
}
}
}
@@ -0,0 +1,166 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
style="width: 100%"></el-date-picker>
</search-item>
<search-item label="工号/姓名">
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询"
clearable></el-input>
</search-item>
<search-item label="分工会">
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
placeholder="请选择分工会" clearable>
<el-option v-for="item in unionOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool>
<el-button size="small" type="primary" @click="showImportDialog = true">导入补助数据</el-button>
<el-button size="small" type="primary" @click="exportExcel">导出补助公示表</el-button>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%" show-summary
:summary-method="getSummaries">
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
fixed="left"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<!-- <el-table-column label="操作" fixed="right" width="200px">-->
<!-- <template slot-scope="{row}">-->
<!-- <el-button @click="openView(row)" size="mini" type="primary">查看</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</el-card>
<template #view>
</template>
</guava>
<excel-import
ref="excelImportRef"
url="/platform/fundSubsidy/query/importExcel"
template_url="/platform/fundSubsidy/query/downloadTemplate"
:visible.sync="showImportDialog"
title="导入数据"
width="700px"
@import-success="doSearch"
:extra_params="{}"
></excel-import>
</div>
<script>
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
components: {},
data() {
return {
tableColumns: [
{label: "工号", prop: "loginName"},
{label: "姓名", prop: "userName"},
{label: "门诊费用", prop: "outpatientCost"},
{label: "住院费用", prop: "hospitalCost"},
{label: "合计", prop: "totalCost"},
{label: "不予补助金额", prop: "noSubsidyCost"},
{label: "门诊医保已报金额", prop: "outpatientMedicalInsuranceReportedCost"},
{label: "住院医保已报金额", prop: "hospitalMedicalInsuranceReportedCost"},
{label: "自费金额", prop: "selfCost"},
{label: "补助金额", prop: "subsidyCost"},
],
unionOptions: [],
pageForm: {},
showImportDialog: false
}
},
methods: {
pageData() {
this.tableLoading = true
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
this.tableLoading = false
if (res.code === 0) {
this.tableData = res.data
}
})
},
getSummaries(param) {
const {columns, data} = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
}else if (index === 1) {
sums[index] = '';
}else if(index === columns.length - 1){
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums[index] += ' 元';
} else {
sums[index] = 'N/A';
}
}
});
return sums;
},
openView(row) {
this.$refs.guava.edit(() => {
})
},
exportExcel() {
if (!this.pageForm.year) {
this.$message.error('请选择年度再导出')
return
}
this.$downLoad('/platform/fundSubsidy/query/exportExcel', {
year: this.pageForm.year,
unionId: this.pageForm.unionId
})
}
},
created() {
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -1,166 +0,0 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
style="width: 100%"></el-date-picker>
</search-item>
<search-item label="工号/姓名">
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询" clearable></el-input>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool></table-tool>
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
fixed="left"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<fund-member-info ref="fundMemberInfoRef">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
</el-row>
</div>
</fund-member-info>
</template>
</guava>
</div>
<script>
<!--#include('../info.js'){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
components: {
"fund-member-info": fundMemberInfo
},
data() {
return {
tableColumns: [
{label: "工号", prop: "loginName"},
{label: "姓名", prop: "userName"},
{label: "性别", prop: "sex"},
{label: "出生年月", prop: "birthday"},
{label: "当前节点", prop: "taskName"},
{label: "流程状态", prop: "instanceState"}
],
pageForm: {
approval: false
},
formData: {},
showApprovalForm: false
}
},
methods: {
openView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.fundMemberInfoRef.onOpen(row)
})
},
openAudit(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.fundMemberInfoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$refs.formRef.validate(valid => {
if (!valid) return
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
})
})
},
},
created() {
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,158 @@
const CONDITION_STRUCTURE_DIALOG = {
template: /*language=HTML*/ `
<el-dialog
:close-on-click-modal="false"
:visible.sync="dialogVisible"
title="高级查询构造器"
width="50%"
>
<div class="process-title">过滤条件匹配</div>
<el-row :gutter="20">
<el-col :span="20">
<el-select v-model="formData.method" placeholder="请选择匹配方式" style="width: 100%">
<el-option label="AND(所有条件都要求匹配)" value="AND"></el-option>
<el-option label="OR(条件中的任意一个匹配)" value="OR"></el-option>
</el-select>
</el-col>
<el-col :span="4">
<el-button type="primary" icon="el-icon-plus" @click="formData.conditions.push({})">添加条件
</el-button>
</el-col>
</el-row>
<el-row :gutter="20" v-for="(cnd,idx) in formData.conditions" :key="idx" style="margin-top: 20px">
<el-col :span="2">
<el-tag>条件{{idx+1}}</el-tag>
</el-col>
<el-col :span="8">
<el-select v-model="cnd.field" placeholder="请选择字段" style="width: 100%"
@change="(v)=>fieldChange(v,cnd)">
<el-option
v-for="item in fields"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-col>
<el-col :span="4">
<el-select v-model="cnd.operational" placeholder="请选择" style="width: 100%">
<el-option
v-for="item in operationalOption"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-col>
<el-col :span="8">
<el-date-picker
v-if="cnd.fieldObj&&cnd.fieldObj.type=='date'"
v-model="cnd.value"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择日期" style="width: 100%">
</el-date-picker>
<el-select v-else-if="cnd.fieldObj&&cnd.fieldObj.type=='select'" v-model="cnd.value"
placeholder="请选择值"
filterable
style="width: 100%"
clearable>
<el-option
v-for="item in cnd.fieldObj.options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-input v-else v-model="cnd.value" clearable placeholder="请输入值"
style="width: 100%"></el-input>
</el-col>
<el-col :span="2">
<el-button type="danger" icon="el-icon-minus" @click="formData.conditions.splice(idx, 1)">
</el-button>
</el-col>
</el-row>
<span slot="footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="doSubmit"> </el-button>
</span>
</el-dialog>
`,
data() {
return {
dialogVisible: false,
formData: {
method: "",
conditions: []
},
fields: [
{
"label": "性别",
"value": "sex",
"type": "select",
"options": [{"value": "男", "label": "男"}, {"value": "女", "label": "女"}]
},
{
"label": "出生日期",
"value": "birthday",
"type": "date",
},
{
"label": "婚姻状况",
"value": "marriage",
"type": "select",
"options": [{"value": "未婚", "label": "未婚"}, {"value": "已婚", "label": "已婚"}]
}
],
operationalOption: [
{"label": "等于(=)", "value": "="},
{"label": "不等于(!=)", "value": "!="},
{"label": "小于(<)", "value": "<"},
{"label": "小于等于(<=)", "value": "<="},
{"label": "大于(>)", "value": ">"},
{"label": "大于等于(>=)", "value": ">="},
]
}
},
methods: {
async onOpen(formData) {
console.log(formData)
if (formData) {
this.formData = formData
}else{
this.formData = {
method: "",
conditions: []
}
}
this.dialogVisible = true
this.$forceUpdate()
},
fieldChange(val, cnd) {
this.$set(cnd, "fieldObj", this.fields.find(v => v.value === val))
this.$set(cnd, "value", null)
this.$forceUpdate()
},
doSubmit() {
if (!this.formData.method) {
this.$message.error("请选择匹配方式")
return
}
if (this.formData.conditions.length === 0) {
this.$message.error("请添加条件")
return
}
if (this.formData.conditions.some(v => !v.field || !v.operational || !v.value)) {
this.$message.error("请填写完整条件")
return
}
this.$emit("confirm", this.formData)
this.dialogVisible = false
}
}
}
@@ -51,7 +51,7 @@ layout("/layouts/platform.html"){
</el-select>
</search-item>
<search-item label="所属单位">
<el-select placeholder="所属单位" v-model="pageForm.unitId"
<el-select placeholder="请选择所属单位" v-model="pageForm.unitId"
style="width: 100%;"
clearable
filterable>
@@ -146,14 +146,19 @@ layout("/layouts/platform.html"){
:label="item.optionName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="院区"
prop="campus"
:rules="[{required:true,message:'请选择',trigger:['change','blur']}]">
<el-select v-model="editHealthCheckupData.campus" style="width: 100%">
<el-option v-for="item in campusOptions" :key="item.id" :value="item.id"
:label="item.campusName"></el-option>
</el-select>
<el-form-item label="备注"
prop="bz">
<el-input v-model="editHealthCheckupData.bz" type="textarea" rows="5"
placeholder="请输入备注"></el-input>
</el-form-item>
<!-- <el-form-item label="院区"
prop="campus"
:rules="[{required:true,message:'请选择',trigger:['change','blur']}]">
<el-select v-model="editHealthCheckupData.campus" style="width: 100%">
<el-option v-for="item in campusOptions" :key="item.id" :value="item.id"
:label="item.campusName"></el-option>
</el-select>
</el-form-item>-->
</el-form>
<el-row type="flex" justify="end">
<el-button @click="exportHealthCheckupDialog=false" type="primary" plain>取消</el-button>
@@ -197,10 +202,10 @@ layout("/layouts/platform.html"){
{prop: 'unionName', label: '所属工会', sortable: true},
{prop: 'unitName', label: '所属单位', sortable: true},
{prop: 'optionName', label: '所选套餐'},
{prop: 'campusName', label: '所选院区'},
{prop: 'selectTime', label: '选择时间', width: "160px"},
{prop: 'isAudit', label: '是否确认'},
{prop: 'auditTime', label: '确认时间'},
{prop: 'bz', label: '备注',width: "200px"},
],
exportHealthCheckupDialog: false,
editHealthCheckupData: {},
@@ -225,7 +230,7 @@ layout("/layouts/platform.html"){
this.notifyWarning("当前分工会没有名单,暂不需要提交")
return
}
const confirm = await this.$confirm(flag?'您确定名单都已核实,准确无误?':'您确定取消确认?', '提示', {
const confirm = await this.$confirm(flag ? '您确定名单都已核实,准确无误?' : '您确定取消确认?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -131,26 +131,7 @@ layout("/layouts/platform.html"){
</el-col>
<el-col :span="12">
<el-form-item prop="activityGroupId" label="可报名人员范围">
<div style="display: flex; justify-content: space-between">
<div style="width: 99%">
<el-select prop="activityGroupId" placeholder="参加人员范围"
v-model="formData.activityGroupId"
style="width: 99%;"
clearable
filterable>
<el-option v-for="item in activityGroupList"
:label="item.groupName"
:value="item.groupId"
:key="item.groupId"></el-option>
</el-select>
</div>
<div>
<el-button
@click="$refs.drawerUserScope.userScopeDialog = true"
type="primary">设置
</el-button>
</div>
</div>
<permission-group :value.sync="formData.activityGroupId"></permission-group>
</el-form-item>
</el-col>
<el-col :span="24">
@@ -163,79 +144,98 @@ layout("/layouts/platform.html"){
</el-col>
<el-col :span="24">
<el-form-item label="体检套餐" prop="healthCheckupProjectSubjects">
<el-card shadow="hover">
<el-card shadow="hover" v-for="(item,index) in formData.healthCheckupProjectSubjects"
:key="index">
<el-row :gutter="20">
<el-col :span="4">
医院名称:
<el-input v-model="item.optionName"></el-input>
</el-col>
<el-col :span="4">
排序:
<el-input v-model="item.optionSort"></el-input>
</el-col>
<!--<el-col :span="4">
封面图<file-upload :upload_number="1" :value.sync="item.imgUrl"
accept=".jpg,.jpeg,.png"
class="imgUrl"
upload_result_type="url"
complete_result upload_mode="file"></file-upload>
</el-col>-->
<el-col :span="4">
编辑说明:
<div>
<el-button type="primary" size="small"
@click="openDescRichText(item.description,index)">编辑说明
</el-button>
</div>
</el-col>
<el-col :span="2">
操作:
<div>
<el-button type="danger" size="small"
:disabled="formData.healthCheckupProjectSubjects.length===1"
@click="deleteSubject(item,index)">删除
</el-button>
</div>
</el-col>
</el-row>
<div class="s-options-list" style="margin-top: 10px;">
<el-table :data="formData.healthCheckupProjectSubjects" border>
<el-table-column
align="center"
header-align="center"
label="套餐名称">
<el-table :data="item.subjectMoneys" border size="small">
<el-table-column label="名称">
<template slot-scope="{row}">
<el-input v-model="row.optionName" autosize
<el-input v-model="row.subjectMoneyName" autosize
class="text-input"
data-type="option"
></el-input>
</template>
</el-table-column>
<el-table-column
align="center"
header-align="center"
label="排序">
<el-table-column label="金额">
<template slot-scope="{row}">
<el-input v-model="row.optionSort" autosize
<el-input v-model="row.money" autosize
class="text-input"
data-type="option"
></el-input>
</template>
</el-table-column>
<el-table-column
align="center"
header-align="center"
label="图片" width="130px">
<template slot-scope="{row,$index}">
<file-upload :upload_number="1" :value.sync="row.imgUrl"
accept=".jpg,.jpeg,.png"
class="imgUrl"
upload_result_type="url"
complete_result upload_mode="file"></file-upload>
</template>
</el-table-column>
<el-table-column align="center"
header-align="center"
label="说明">
<template slot-scope="{row,$index}">
<el-link type="primary"
@click="openDescRichText(row.description,$index)">
编辑说明
</el-link>
</template>
</el-table-column>
<el-table-column
align="center"
header-align="center"
label="操作"
width="100px">
<el-table-column label="操作" width="200px">
<template slot-scope="{row,$index}" slot="header">
<el-button size="mini" type="primary"
@click="item.subjectMoneys.push({
money:'',
subjectMoneyName:'',
marriage:'',
})">添加
</el-button>
</template>
<template slot-scope="{row,$index}">
<div class="option-delete">
<el-button circle
icon="el-icon-delete"
size="mini" type="danger"
@click="deleteRow(row,$index)"></el-button>
<el-button size="mini" type="primary"
@click="openCnd(row,$index,index)">设置可选条件
</el-button>
<el-button size="mini" type="danger"
@click="deleteRow(row,$index,index)">删除
</el-button>
</div>
</template>
</el-table-column>
</el-table>
<div class="s-operation">
<el-button size="small" type="primary"
@click="formData.healthCheckupProjectSubjects.push({optionNameId:'',optionName:'套餐'+(formData.healthCheckupProjectSubjects.length+1),optionSort:formData.healthCheckupProjectSubjects.length+1,imgUrl:null})">
添加项目
</el-button>
</div>
</div>
</el-card>
<div class="s-operation">
<el-button size="small" type="primary"
@click="formData.healthCheckupProjectSubjects.push({optionNameId:'',
optionName:'套餐'+(formData.healthCheckupProjectSubjects.length+1),
optionSort:formData.healthCheckupProjectSubjects.length+1,
imgUrl:null,
subjectMoneys:[]})">
添加医院
</el-button>
</div>
</el-form-item>
<el-form-item label="项目封面" prop="cover">
@@ -303,7 +303,7 @@ layout("/layouts/platform.html"){
:close-on-click-modal="false"
width="30%">
<div style=" display: flex;justify-content: center;">
<qrcode :options="{ width: 400 }" :value="activityUrl" ></qrcode>
<qrcode :options="{ width: 400 }" :value="activityUrl"></qrcode>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="codeDialogVisible = false" type="primary">关 闭</el-button>
@@ -330,9 +330,32 @@ layout("/layouts/platform.html"){
</template>
</span>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
:visible.sync="subjectMoneyDialog"
title="套餐"
width="50%"
>
</el-dialog>
<condition-structure-dialog ref="conditionStructureDialog" @confirm="addCondition"></condition-structure-dialog>
<el-dialog :visible.sync="conditionStructureDialogVisible" title="条件构造器">
<condition-group :group="conditionGroup" :field_options="fieldOptions"
@remove="removeRootGroup"></condition-group>
<div slot="footer">
<el-button @click="conditionStructureDialogVisible = false">取消</el-button>
<el-button type="primary" @click="confirmCnd">确定</el-button>
</div>
</el-dialog>
</div>
<script>
<!--#include("../common/ConditionStructure.js"){}#-->
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
@@ -374,10 +397,37 @@ layout("/layouts/platform.html"){
description: "",
codeDialogVisible: false,
activityUrl: '',
rowData: {},
subjectRowData: {},
subjectMoneyDialog: false,
subjectMoneyIndex: null,
hospitalIndex: null,
deleteSubjectIds: {},
// 条件构造器相关
conditionStructureDialogVisible: false,
// 可选字段列表
fieldOptions: [
{label: "姓名", value: "username"},
{label: "工号", value: "loginname"},
{label: "性别", value: "sex"},
{label: "年龄", value: "age"},
{label: "婚姻状况", value: "marriage"},
{label: "在职状态", value: "userState"},
{label: "编制类别", value: "preparedBy"},
{label: "教职工类别", value: "personType"},
],
conditionGroup: {
logic: "AND",
conditions: [],
groups: []
}
}
},
components: {
"drawer-user-scope": httpVueLoader("/components/module/activity/DrawerUserScope.vue"),
"condition-structure-dialog": CONDITION_STRUCTURE_DIALOG
},
methods: {
dropdownCommand(command) {
@@ -398,6 +448,31 @@ layout("/layouts/platform.html"){
this.openCode(data.id)
}
},
openAddSubjectMoney(row, index) {
row.index = index
this.subjectRowData = row
this.subjectMoneyDialog = true
},
addCondition(val) {
this.$set(this.formData.healthCheckupProjectSubjects[this.subjectMoneyIndex].subjectMoneys[this.rowData.index], 'matchCnd', val)
},
openCnd(row, subjectIndex, hospitalIndex) {
this.rowData = row
this.subjectMoneyIndex = subjectIndex
this.hospitalIndex = hospitalIndex
this.conditionStructureDialogVisible = true
if(row.matchCnd){
this.conditionGroup = row.matchCnd
}
// this.$refs.conditionStructureDialog.onOpen(row.matchCnd ? row.matchCnd : null)
},
// 条件构造器确认
confirmCnd(){
this.conditionStructureDialogVisible = false
this.$set(this.formData.healthCheckupProjectSubjects[this.hospitalIndex].subjectMoneys[this.subjectMoneyIndex], 'matchCnd', this.conditionGroup)
},
async createUserList(row) {
const msg = '您确定要生成【' + row.name + '】体检名单吗?(该名单生成是按照创建时选择的可报名人员范围来生成)'
const confirm = await this.$confirm(msg, '提示', {
@@ -475,8 +550,13 @@ layout("/layouts/platform.html"){
this.codeDialogVisible = true
},
deleteRow(row, index) {
deleteSubject(row, index) {
this.formData.healthCheckupProjectSubjects.splice(index, 1)
if (row.id) this.deleteSubjectIds.push(row.id)
},
deleteRow(row, index, subjectMoneyIndex) {
this.formData.healthCheckupProjectSubjects[subjectMoneyIndex].subjectMoneys.splice(index, 1)
if (row.id) this.deleteRowIds.push(row.id)
},
async doDelete(id) {
@@ -523,19 +603,20 @@ layout("/layouts/platform.html"){
formData.healthCheckupProjectSubjects = JSON.stringify(this.formData.healthCheckupProjectSubjects)
formData.activityGroupName = this.activityGroupList.find(v => v.groupId === this.formData.activityGroupId).groupName
formData.deleteRowIds = JSON.stringify(this.deleteRowIds)
formData.deleteSubjectIds = JSON.stringify(this.deleteSubjectIds)
const resp = await $.post(loc() + "/doAdd", formData)
loading.close()
if (resp.code === 0) {
this.pageData()
this.$refs.guava.index()
this.deleteRowIds = []
this.deleteSubjectIds = []
} else {
this.notifyWarning(resp.msg)
}
}
},
openAdd() {
this.formData = {
name: null,
activityGroupId: null,
@@ -545,7 +626,8 @@ layout("/layouts/platform.html"){
optionName: '套餐1',
optionNameId: '',
optionSort: '1',
imgUrl: ''
imgUrl: '',
subjectMoneys: []
}
]
}
@@ -19,7 +19,7 @@ layout("/layouts/platform.html"){
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="年度">
<search-item label="体检项目">
<el-select @change="getHealthCheckupSubject();"
style="width: 100%;"
v-model="pageForm.projectId">
@@ -38,7 +38,7 @@ layout("/layouts/platform.html"){
</el-select>
</search-item>
<search-item label="所属单位">
<el-select placeholder="所属单位" v-model="pageForm.unitId"
<el-select placeholder="请选择所属单位" v-model="pageForm.unitId"
style="width: 100%;"
clearable
filterable>
@@ -68,11 +68,17 @@ layout("/layouts/platform.html"){
type="primary"
v-if="projectInfo.healthCheckupType==='jzg'">导出教职工未选名单
</el-button>
<el-button @click="selectOptionByAdmin"
<!-- <el-button @click="selectOptionByAdmin"
icon="el-icon-printer"
size="small"
type="primary"
v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">管理员代选择
</el-button>-->
<el-button @click="selectOptionByLastYear"
icon="el-icon-printer"
size="small"
type="primary"
v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">管理员代选择
v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">一键选择去年数据
</el-button>
</template>
@@ -260,7 +266,7 @@ layout("/layouts/platform.html"){
}
const {optionName} = this.projectSubjectOptions.find(v => v.id === this.noSelectOptionId)
const confirm = await this.$confirm('请确定是否把【' + optionName + '】福利赋给未选择的教职工?', '提示', {
const confirm = await this.$confirm('请确定是否把【' + optionName + '】套餐赋给未选择的教职工?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -273,18 +279,40 @@ layout("/layouts/platform.html"){
projectId: this.pageForm.projectId
})
if (resp.code === 0) {
setTimeout(()=>{
this.doSearch()
this.loading = false
this.selectByAdminDialogVisible = false
this.notifySuccess(resp.msg)
},2000)
setTimeout(() => {
this.doSearch()
this.loading = false
this.selectByAdminDialogVisible = false
this.notifySuccess(resp.msg)
}, 2000)
} else {
this.notifyWarning(resp.msg)
}
}
},
async selectOptionByLastYear() {
const confirm = await this.$confirm('请确定是否把没有选择的教职工统一选择去年的数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === "confirm") {
this.loading = true
const resp = await $.get(loc() + '/selectOptionByLastYear', {
projectId: this.pageForm.projectId
})
if (resp.code === 0) {
setTimeout(() => {
this.doSearch()
this.loading = false
this.notifySuccess(resp.msg)
}, 2000)
} else {
this.notifyWarning(resp.msg)
}
}
},
selectOptionByAdmin() {
this.noSelectOptionId = null
this.selectByAdminDialogVisible = true
@@ -17,7 +17,7 @@ layout("/layouts/platform.html"){
</el-date-picker>
</search-item>
<search-item label="所属工会">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
<el-select placeholder="请选择所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable
filterable @change="honorLevelData">
<el-option v-for="item in unions" :label="item.name" :value="item.id"></el-option>
@@ -17,7 +17,7 @@ layout("/layouts/platform.html"){
</el-date-picker>
</search-item>
<search-item label="所属工会">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
<el-select placeholder="请选择所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable filterable @change="pageData">
<el-option v-for="item in unions" :label="item.name" :value="item.id"></el-option>
</el-select>
@@ -35,7 +35,7 @@ layout("/layouts/platform.html"){
@clear="flushUnits"
clearable
filterable
placeholder="所属工会"
placeholder="请选择所属工会"
style="width: 100%"
v-model="pageForm.unionId"
>
@@ -44,7 +44,7 @@ layout("/layouts/platform.html"){
</el-select>
</search-item>
<search-item label="所属单位">
<el-select clearable filterable placeholder="请选择" style="width: 100%"
<el-select clearable filterable placeholder="请选择所属单位" style="width: 100%"
v-model="pageForm.unitId">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in unitList"></el-option>

Some files were not shown because too many files have changed in this diff Show More