commit
This commit is contained in:
-1
@@ -9,7 +9,6 @@ import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
|||||||
import com.budwk.app.zhgh.activity.planSummary.model.YearSummary;
|
import com.budwk.app.zhgh.activity.planSummary.model.YearSummary;
|
||||||
import com.budwk.app.zhgh.activity.planSummary.service.YearSummaryService;
|
import com.budwk.app.zhgh.activity.planSummary.service.YearSummaryService;
|
||||||
import com.budwk.app.zhgh.club.model.SysClub;
|
import com.budwk.app.zhgh.club.model.SysClub;
|
||||||
import com.budwk.app.zhgh.club.model.SysClubUser;
|
|
||||||
import com.budwk.app.zhgh.club.service.SysClubService;
|
import com.budwk.app.zhgh.club.service.SysClubService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import com.budwk.app.zhgh.club.service.SysClubUserService;
|
|||||||
import com.budwk.app.zhgh.club.vo.ClubRegisterVo;
|
import com.budwk.app.zhgh.club.vo.ClubRegisterVo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
|
||||||
import org.nutz.dao.util.cri.Static;
|
import org.nutz.dao.util.cri.Static;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
@@ -41,8 +40,6 @@ public class ClubUserClubListController {
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysClubService sysClubService;
|
private SysClubService sysClubService;
|
||||||
@Inject
|
|
||||||
private SysClubUserService sysClubUserService;
|
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/club/join/list/index.html")
|
@Ok("beetl:/platform/zhgh/club/join/list/index.html")
|
||||||
|
|||||||
+33
-1
@@ -1,6 +1,7 @@
|
|||||||
package com.budwk.app.zhgh.club.controller.apply;
|
package com.budwk.app.zhgh.club.controller.apply;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.lang.Dict;
|
import cn.hutool.core.lang.Dict;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
@@ -17,6 +18,7 @@ import com.budwk.app.flow.entity.ProcessInstance;
|
|||||||
import com.budwk.app.flow.entity.ProcessTask;
|
import com.budwk.app.flow.entity.ProcessTask;
|
||||||
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
||||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||||
|
import com.budwk.app.flow.service.FlowCommonService;
|
||||||
import com.budwk.app.sys.models.Sys_user;
|
import com.budwk.app.sys.models.Sys_user;
|
||||||
import com.budwk.app.sys.models.Sys_user_role;
|
import com.budwk.app.sys.models.Sys_user_role;
|
||||||
import com.budwk.app.sys.services.SysMsgService;
|
import com.budwk.app.sys.services.SysMsgService;
|
||||||
@@ -24,6 +26,7 @@ import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
|||||||
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||||
import com.budwk.app.zhgh.club.model.ClubUser;
|
import com.budwk.app.zhgh.club.model.ClubUser;
|
||||||
import com.budwk.app.zhgh.club.model.ClubUserApply;
|
import com.budwk.app.zhgh.club.model.ClubUserApply;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
@@ -36,6 +39,7 @@ import org.nutz.ioc.loader.annotation.Inject;
|
|||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -56,6 +60,8 @@ public class ClubUserJoinApplyController {
|
|||||||
private SysMsgService sysMsgService;
|
private SysMsgService sysMsgService;
|
||||||
@Inject
|
@Inject
|
||||||
private FlowEngine flowEngine;
|
private FlowEngine flowEngine;
|
||||||
|
@Inject
|
||||||
|
private FlowCommonService flowCommonService;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@SaCheckPermission("club.join.apply")
|
@SaCheckPermission("club.join.apply")
|
||||||
@@ -87,11 +93,23 @@ public class ClubUserJoinApplyController {
|
|||||||
return Result.success(sql.getResult());
|
return Result.success(sql.getResult());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("保存申请")
|
||||||
|
@SaCheckPermission("condolence.apply")
|
||||||
|
@SLog(type = "clubUser", tag = "保存协会入会", msg = "保存协会入会")
|
||||||
|
public Result save(@Param("data") ClubUserApply clubUserApply) {
|
||||||
|
clubUserApply.setRoleCode(RoleConstant.CLUB_MEMBER.name());
|
||||||
|
clubUserApply.setMode(true);
|
||||||
|
clubUserApply.setApplyDate(new Date());
|
||||||
|
dao.insertOrUpdate(clubUserApply);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ApiOperation("提交")
|
@ApiOperation("提交")
|
||||||
@SaCheckPermission("club.join.apply")
|
@SaCheckPermission("club.join.apply")
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SLog(type = "clubUser", tag = "申请协会", msg = "申请协会")
|
@SLog(type = "clubUser", tag = "申请协会入会", msg = "申请协会入会")
|
||||||
public Result submit(ClubUserApply clubUserApply) {
|
public Result submit(ClubUserApply clubUserApply) {
|
||||||
ClubUserApply userApply = dao.fetch(ClubUserApply.class, Cnd.where("userId", "=", clubUserApply.getUserId()).and("clubId", "=", clubUserApply.getClubId()).and("mode", "=", 1).desc(ClubUserApply::getApplyDate));
|
ClubUserApply userApply = dao.fetch(ClubUserApply.class, Cnd.where("userId", "=", clubUserApply.getUserId()).and("clubId", "=", clubUserApply.getClubId()).and("mode", "=", 1).desc(ClubUserApply::getApplyDate));
|
||||||
if (ObjectUtil.isNotEmpty(userApply) && StrUtil.isBlank(userApply.getId())) {
|
if (ObjectUtil.isNotEmpty(userApply) && StrUtil.isBlank(userApply.getId())) {
|
||||||
@@ -120,6 +138,20 @@ public class ClubUserJoinApplyController {
|
|||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("重新提交申请")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("club.join.apply")
|
||||||
|
public Result submitAgain(@Param("data") ClubUserApply clubUserApply, @Param("taskId") Long taskId) {
|
||||||
|
dao.insertOrUpdate(clubUserApply);
|
||||||
|
|
||||||
|
Dict dict = Dict.create();
|
||||||
|
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||||
|
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||||
|
flowCommonService.executeTask(dict);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ApiOperation("校验是否申请过协会")
|
@ApiOperation("校验是否申请过协会")
|
||||||
@SaCheckPermission("club.join.apply")
|
@SaCheckPermission("club.join.apply")
|
||||||
|
|||||||
+1
-1
@@ -106,7 +106,7 @@ public class ClubUserJoinApprovalController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (approval) {
|
if (approval) {
|
||||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
} else {
|
} else {
|
||||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,9 +82,7 @@ public class ClubUserJoinMineController {
|
|||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
|
||||||
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||||
}
|
|
||||||
cnd.groupBy("info.id");
|
cnd.groupBy("info.id");
|
||||||
cnd.desc("info.applyDate");
|
cnd.desc("info.applyDate");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
|
|||||||
+1
-1
@@ -112,7 +112,7 @@ public class ClubUserJoinSchoolApprovalController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (approval) {
|
if (approval) {
|
||||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
} else {
|
} else {
|
||||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-27
@@ -4,11 +4,10 @@ import cn.dev33.satoken.annotation.SaCheckPermission;
|
|||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.base.service.BaseService;
|
import com.budwk.app.base.service.BaseService;
|
||||||
import com.budwk.app.bpm.service.BpmService;
|
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.zhgh.club.model.ClubUser;
|
import com.budwk.app.zhgh.club.model.ClubUser;
|
||||||
import com.budwk.app.zhgh.club.model.SysClubUser;
|
|
||||||
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
||||||
|
import com.budwk.app.zhgh.club.service.SysClubUserService;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
@@ -16,6 +15,7 @@ import org.nutz.dao.sql.Sql;
|
|||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.lang.Lang;
|
import org.nutz.lang.Lang;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|
||||||
@@ -31,6 +31,8 @@ public class ClubUserMineClubController {
|
|||||||
private Dao dao;
|
private Dao dao;
|
||||||
@Inject
|
@Inject
|
||||||
private BaseService baseService;
|
private BaseService baseService;
|
||||||
|
@Inject
|
||||||
|
private SysClubUserService clubUserService;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@SaCheckPermission("club.join.mine.club")
|
@SaCheckPermission("club.join.mine.club")
|
||||||
@@ -54,9 +56,9 @@ public class ClubUserMineClubController {
|
|||||||
FROM
|
FROM
|
||||||
sys_club club
|
sys_club club
|
||||||
LEFT JOIN club_user uc ON club.id = uc.clubId
|
LEFT JOIN club_user uc ON club.id = uc.clubId
|
||||||
LEFT JOIN club_user presidentCu ON presidentCu.clubId = club.id AND presidentCu.roleCode = 'CLUB_PRESIDENT'
|
LEFT JOIN club_user presidentCu ON presidentCu.clubId = club.id AND JSON_CONTAINS(presidentCu.roleCode, '"CLUB_PRESIDENT"')
|
||||||
LEFT JOIN sys_user presidentUser ON presidentUser.id = presidentCu.userId
|
LEFT JOIN sys_user presidentUser ON presidentUser.id = presidentCu.userId
|
||||||
LEFT JOIN club_user secretaryCu ON secretaryCu.clubId = club.id AND secretaryCu.roleCode = 'CLUB_SECRETARY'
|
LEFT JOIN club_user secretaryCu ON secretaryCu.clubId = club.id AND JSON_CONTAINS(secretaryCu.roleCode, '"CLUB_SECRETARY"')
|
||||||
LEFT JOIN sys_user secretaryUser ON secretaryUser.id = secretaryCu.userId
|
LEFT JOIN sys_user secretaryUser ON secretaryUser.id = secretaryCu.userId
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
@@ -73,28 +75,7 @@ public class ClubUserMineClubController {
|
|||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.join.mine.club")
|
@SaCheckPermission("club.join.mine.club")
|
||||||
public Result getClubUsers(@Valid String clubId) {
|
public Result getClubUsers(@Valid String clubId) {
|
||||||
Sql sql = Sqls.create("""
|
List<NutMap> clubUser = clubUserService.getClubUser(clubId);
|
||||||
SELECT
|
return Result.success(clubUser);
|
||||||
scu.*,
|
|
||||||
role.`name` AS roleName,
|
|
||||||
u.username AS userName,
|
|
||||||
u.loginname AS loginName,
|
|
||||||
u.sex,
|
|
||||||
u.personType AS personType,
|
|
||||||
u.userState,
|
|
||||||
u.unitid AS unitId,
|
|
||||||
u.mobile,
|
|
||||||
club.clubName,
|
|
||||||
u.unitname AS unitName
|
|
||||||
FROM
|
|
||||||
club_user scu
|
|
||||||
LEFT JOIN sys_club club ON scu.clubId = club.id
|
|
||||||
LEFT JOIN `vw_user` u ON scu.userId = u.id
|
|
||||||
LEFT JOIN sys_role role ON role.`code` = scu.rolecode
|
|
||||||
WHERE
|
|
||||||
scu.clubId = @clubId
|
|
||||||
ORDER BY FIELD( scu.roleCode, 'CLUB_PRESIDENT', 'CLUB_VICE_PRESIDENT', 'CLUB_SECRETARY', 'CLUB_VICE_SECRETARY','CLUB_OPERATOR', 'CLUB_MEMBER' )
|
|
||||||
""").setParam("clubId", clubId);
|
|
||||||
return Result.success(baseService.listMap(sql));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-2
@@ -1,7 +1,9 @@
|
|||||||
package com.budwk.app.zhgh.club.controller.evaluate;
|
package com.budwk.app.zhgh.club.controller.evaluate;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.lang.Dict;
|
import cn.hutool.core.lang.Dict;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.db.Db;
|
import cn.hutool.db.Db;
|
||||||
import cn.hutool.db.ds.DSFactory;
|
import cn.hutool.db.ds.DSFactory;
|
||||||
import com.budwk.app.base.annotation.SLog;
|
import com.budwk.app.base.annotation.SLog;
|
||||||
@@ -13,6 +15,7 @@ import com.budwk.app.flow.engine.FlowEngine;
|
|||||||
import com.budwk.app.flow.entity.ProcessInstance;
|
import com.budwk.app.flow.entity.ProcessInstance;
|
||||||
import com.budwk.app.flow.entity.ProcessTask;
|
import com.budwk.app.flow.entity.ProcessTask;
|
||||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||||
|
import com.budwk.app.flow.service.FlowCommonService;
|
||||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.zhgh.club.model.ClubUser;
|
import com.budwk.app.zhgh.club.model.ClubUser;
|
||||||
@@ -21,6 +24,8 @@ import com.budwk.app.zhgh.club.model.SysClubEvaluate;
|
|||||||
import com.budwk.app.zhgh.club.service.SysClubEvaluateService;
|
import com.budwk.app.zhgh.club.service.SysClubEvaluateService;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubService;
|
import com.budwk.app.zhgh.club.service.SysClubService;
|
||||||
import com.budwk.app.zhgh.club.vo.ClubEvaluateVo;
|
import com.budwk.app.zhgh.club.vo.ClubEvaluateVo;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
@@ -52,6 +57,8 @@ public class ClubEvaluateApplyController {
|
|||||||
private SysClubEvaluateService evaluateService;
|
private SysClubEvaluateService evaluateService;
|
||||||
@Inject
|
@Inject
|
||||||
private FlowEngine flowEngine;
|
private FlowEngine flowEngine;
|
||||||
|
@Inject
|
||||||
|
private FlowCommonService flowCommonService;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/club/evaluate/apply/index.html")
|
@Ok("beetl:/platform/zhgh/club/evaluate/apply/index.html")
|
||||||
@@ -62,7 +69,7 @@ public class ClubEvaluateApplyController {
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("club.evaluate.apply")
|
@SaCheckPermission("club.evaluate.apply")
|
||||||
@SLog(type = "evaluateApply", tag = "保存协会评优申请", msg = "保存协会评优申请")
|
@SLog(type = "evaluateApply", tag = "保存协会评优申请", msg = "保存协会评优申请")
|
||||||
public Result doSave(@Param("evaluate") SysClubEvaluate evaluate) {
|
public Result save(@Param("data") SysClubEvaluate evaluate) {
|
||||||
evaluateService.dao().insertOrUpdate(evaluate);
|
evaluateService.dao().insertOrUpdate(evaluate);
|
||||||
return Result.success(evaluate);
|
return Result.success(evaluate);
|
||||||
}
|
}
|
||||||
@@ -71,7 +78,7 @@ public class ClubEvaluateApplyController {
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("club.evaluate.apply")
|
@SaCheckPermission("club.evaluate.apply")
|
||||||
@SLog(type = "evaluateApply", tag = "提交协会评优", msg = "提交协会评优")
|
@SLog(type = "evaluateApply", tag = "提交协会评优", msg = "提交协会评优")
|
||||||
public Result doSubmit(@Valid @Param("evaluate") SysClubEvaluate evaluate) {
|
public Result submit(@Valid @Param("data") SysClubEvaluate evaluate) {
|
||||||
evaluateService.dao().insertOrUpdate(evaluate);
|
evaluateService.dao().insertOrUpdate(evaluate);
|
||||||
|
|
||||||
// 开启流程实例
|
// 开启流程实例
|
||||||
@@ -88,6 +95,20 @@ public class ClubEvaluateApplyController {
|
|||||||
return Result.success(evaluate);
|
return Result.success(evaluate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("重新提交申请")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("club.evaluate.apply")
|
||||||
|
public Result submitAgain(@Param("data") SysClubEvaluate clubEvaluate, @Param("taskId") Long taskId) {
|
||||||
|
evaluateService.dao().insertOrUpdate(clubEvaluate);
|
||||||
|
|
||||||
|
Dict dict = Dict.create();
|
||||||
|
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||||
|
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||||
|
flowCommonService.executeTask(dict);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.evaluate")
|
@SaCheckPermission("club.evaluate")
|
||||||
public Result info(@Valid String id) {
|
public Result info(@Valid String id) {
|
||||||
|
|||||||
+34
-8
@@ -13,12 +13,14 @@ import com.budwk.app.flow.entity.ProcessInstance;
|
|||||||
import com.budwk.app.flow.entity.ProcessTask;
|
import com.budwk.app.flow.entity.ProcessTask;
|
||||||
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
||||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
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.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.club.model.ClubUser;
|
||||||
import com.budwk.app.zhgh.club.model.SysClub;
|
import com.budwk.app.zhgh.club.model.SysClub;
|
||||||
import com.budwk.app.zhgh.club.model.SysClubExamineRegister;
|
import com.budwk.app.zhgh.club.model.SysClubExamineRegister;
|
||||||
import com.budwk.app.zhgh.club.model.SysClubUser;
|
|
||||||
import com.budwk.app.zhgh.club.service.SysClubExamineService;
|
import com.budwk.app.zhgh.club.service.SysClubExamineService;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubService;
|
import com.budwk.app.zhgh.club.service.SysClubService;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
@@ -53,15 +55,18 @@ public class ClubExamineApplyController {
|
|||||||
private SysClubExamineService sysClubExamineService;
|
private SysClubExamineService sysClubExamineService;
|
||||||
@Inject
|
@Inject
|
||||||
private FlowEngine flowEngine;
|
private FlowEngine flowEngine;
|
||||||
|
@Inject
|
||||||
|
private FlowCommonService flowCommonService;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/club/examine/apply/index.html")
|
@Ok("beetl:/platform/zhgh/club/examine/apply/index.html")
|
||||||
@SaCheckPermission("club.examine.apply")
|
@SaCheckPermission("club.examine.apply")
|
||||||
public void index() {}
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club")
|
@SaCheckPermission("club")
|
||||||
public Result getCount(@Valid String id,@Valid Integer year) {
|
public Result getCount(@Valid String id, @Valid Integer year) {
|
||||||
List<SysClubExamineRegister> list = dao.query(SysClubExamineRegister.class, Cnd.where("clubId", "=", id).and("year(registerDate)", "=", year));
|
List<SysClubExamineRegister> list = dao.query(SysClubExamineRegister.class, Cnd.where("clubId", "=", id).and("year(registerDate)", "=", year));
|
||||||
List<ProcessInstance> instanceList = dao.query(
|
List<ProcessInstance> instanceList = dao.query(
|
||||||
ProcessInstance.class,
|
ProcessInstance.class,
|
||||||
@@ -95,7 +100,7 @@ public class ClubExamineApplyController {
|
|||||||
@At
|
@At
|
||||||
@SaCheckPermission("club")
|
@SaCheckPermission("club")
|
||||||
public Result getClubMemberMoney(@Valid String clubId) {
|
public Result getClubMemberMoney(@Valid String clubId) {
|
||||||
int count = dao.count(SysClubUser.class, Cnd.where("clubId", "=", clubId).and("status", "=", 5).and("isNormal", "=", true));
|
int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId));
|
||||||
SysClub club = dao.fetch(SysClub.class, clubId);
|
SysClub club = dao.fetch(SysClub.class, clubId);
|
||||||
int money = count * (club.getDue() != null ? Integer.parseInt(club.getDue()) : 0);
|
int money = count * (club.getDue() != null ? Integer.parseInt(club.getDue()) : 0);
|
||||||
return Result.success(money);
|
return Result.success(money);
|
||||||
@@ -134,10 +139,10 @@ public class ClubExamineApplyController {
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("club.examine.apply")
|
@SaCheckPermission("club.examine.apply")
|
||||||
@SLog(type = "examineApply", tag = "保存协会年审", msg = "保存协会年审")
|
@SLog(type = "examineApply", tag = "保存协会年审", msg = "保存协会年审")
|
||||||
public Result doSave(@Param("data") SysClubExamineRegister examineRegister,
|
public Result save(@Param("data") SysClubExamineRegister examineRegister,
|
||||||
@Param("incomeDetailed") String incomeDetailed,
|
@Param("incomeDetailed") String incomeDetailed,
|
||||||
@Param("incomeCensus") String incomeCensus) {
|
@Param("incomeCensus") String incomeCensus) {
|
||||||
if(StrUtil.isBlank(examineRegister.getId())) {
|
if (StrUtil.isBlank(examineRegister.getId())) {
|
||||||
sysClubExamineService.doAdd(examineRegister, incomeDetailed, incomeCensus);
|
sysClubExamineService.doAdd(examineRegister, incomeDetailed, incomeCensus);
|
||||||
} else {
|
} else {
|
||||||
sysClubExamineService.doEdit(examineRegister, incomeDetailed, incomeCensus);
|
sysClubExamineService.doEdit(examineRegister, incomeDetailed, incomeCensus);
|
||||||
@@ -149,11 +154,11 @@ public class ClubExamineApplyController {
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("club.examine.apply")
|
@SaCheckPermission("club.examine.apply")
|
||||||
@SLog(type = "examineApply", tag = "提交协会年审", msg = "提交协会年审")
|
@SLog(type = "examineApply", tag = "提交协会年审", msg = "提交协会年审")
|
||||||
public Result doSubmit(@Param("data") SysClubExamineRegister examineRegister,
|
public Result submit(@Param("data") SysClubExamineRegister examineRegister,
|
||||||
@Param("incomeDetailed") String incomeDetailed,
|
@Param("incomeDetailed") String incomeDetailed,
|
||||||
@Param("incomeCensus") String incomeCensus) {
|
@Param("incomeCensus") String incomeCensus) {
|
||||||
SysClubExamineRegister reg;
|
SysClubExamineRegister reg;
|
||||||
if(StrUtil.isBlank(examineRegister.getId())) {
|
if (StrUtil.isBlank(examineRegister.getId())) {
|
||||||
reg = sysClubExamineService.doAdd(examineRegister, incomeDetailed, incomeCensus);
|
reg = sysClubExamineService.doAdd(examineRegister, incomeDetailed, incomeCensus);
|
||||||
} else {
|
} else {
|
||||||
reg = sysClubExamineService.doEdit(examineRegister, incomeDetailed, incomeCensus);
|
reg = sysClubExamineService.doEdit(examineRegister, incomeDetailed, incomeCensus);
|
||||||
@@ -173,4 +178,25 @@ public class ClubExamineApplyController {
|
|||||||
|
|
||||||
return Result.success(reg);
|
return Result.success(reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("重新提交申请")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("club.examine.apply")
|
||||||
|
public Result submitAgain(@Param("data") SysClubExamineRegister examineRegister,
|
||||||
|
@Param("incomeDetailed") String incomeDetailed,
|
||||||
|
@Param("incomeCensus") String incomeCensus,
|
||||||
|
@Param("taskId") Long taskId) {
|
||||||
|
if (StrUtil.isBlank(examineRegister.getId())) {
|
||||||
|
sysClubExamineService.doAdd(examineRegister, incomeDetailed, incomeCensus);
|
||||||
|
} else {
|
||||||
|
sysClubExamineService.doEdit(examineRegister, incomeDetailed, incomeCensus);
|
||||||
|
}
|
||||||
|
|
||||||
|
Dict dict = Dict.create();
|
||||||
|
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||||
|
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||||
|
flowCommonService.executeTask(dict);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+124
@@ -0,0 +1,124 @@
|
|||||||
|
package com.budwk.app.zhgh.club.controller.infoManage;
|
||||||
|
|
||||||
|
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.base.utils.PageUtil;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
|
import com.budwk.app.sys.services.SysRoleService;
|
||||||
|
import com.budwk.app.sys.services.SysUserService;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||||
|
import com.budwk.app.zhgh.club.model.SysClub;
|
||||||
|
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
||||||
|
import com.budwk.app.zhgh.club.service.SysClubInfoManageService;
|
||||||
|
import com.budwk.app.zhgh.club.service.SysClubService;
|
||||||
|
import com.budwk.app.zhgh.club.service.SysClubUserService;
|
||||||
|
import com.budwk.app.zhgh.club.service.impl.SysClubUserServiceImpl;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.json.Json;
|
||||||
|
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 javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: JyuHsin
|
||||||
|
* @Date: 2024/8/8 11:19
|
||||||
|
* @Version: v1.0.0
|
||||||
|
* @Description: TODO
|
||||||
|
**/
|
||||||
|
@IocBean
|
||||||
|
@Ok("json")
|
||||||
|
@At("/platform/club/infoManage/auditManager")
|
||||||
|
public class ClubAuditManagerController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private SysClubInfoManageService infoManageService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/club/infoManage/auditManager/index.html")
|
||||||
|
@SaCheckPermission("club.infoManage.auditManager")
|
||||||
|
public void index() {}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("club.infoManage.auditManager")
|
||||||
|
public Result pageData(@Valid ClubUserPageForm pageForm,
|
||||||
|
@Param(value = "approval") Boolean approval) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*,
|
||||||
|
club.clubName,
|
||||||
|
ins.id AS instanceId,
|
||||||
|
ins.businessNo,
|
||||||
|
ins.state instanceState,
|
||||||
|
ins.variable instanceVariale,
|
||||||
|
ins.processDefineId instanceProcessDefineId,
|
||||||
|
t.id taskId,
|
||||||
|
t.taskName AS taskKey,
|
||||||
|
t.displayName taskName,
|
||||||
|
t.taskType,
|
||||||
|
t.performType taskPerformType,
|
||||||
|
t.taskState,
|
||||||
|
t.finishTime,
|
||||||
|
t.taskParentId,
|
||||||
|
t.variable taskVariable,
|
||||||
|
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||||
|
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||||
|
FROM
|
||||||
|
wf_process_task t
|
||||||
|
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||||
|
LEFT JOIN sys_club_manager info ON info.id = ins.businessNo
|
||||||
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
|
LEFT JOIN sys_club club ON info.clubId = club.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("info.userId", "=", SecurityUtil.getUserId());
|
||||||
|
cnd.andEX("year(info.creatTime)", "=", pageForm.getYear());
|
||||||
|
|
||||||
|
cnd.and("t.taskName", "=", "ef81777f-22fb-4fe4-9800-909e6c681210");
|
||||||
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
|
if (approval) {
|
||||||
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
|
} else {
|
||||||
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getClubName())) {
|
||||||
|
cnd.and("club.clubName", "LIKE", "%" + pageForm.getClubName() + "%");
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("info.creatTime");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
|
||||||
|
cnd.groupBy("t.id");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
|
||||||
|
Pagination pagination = infoManageService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
List<NutMap> listMap = pagination.getList(NutMap.class);
|
||||||
|
for (NutMap nutMap : listMap) {
|
||||||
|
List<String> oldCodeList = Json.fromJsonAsList(String.class, nutMap.getString("oldRoleCode"));
|
||||||
|
nutMap.put("oldRoleName", SysClubUserServiceImpl.convertRoleName(oldCodeList));
|
||||||
|
List<String> nowCodeList = Json.fromJsonAsList(String.class, nutMap.getString("nowRoleCode"));
|
||||||
|
nutMap.put("nowRoleName", SysClubUserServiceImpl.convertRoleName(nowCodeList));
|
||||||
|
}
|
||||||
|
pagination.setList(listMap);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
}
|
||||||
+193
@@ -0,0 +1,193 @@
|
|||||||
|
package com.budwk.app.zhgh.club.controller.infoManage;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.lang.Dict;
|
||||||
|
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.base.utils.PageUtil;
|
||||||
|
import com.budwk.app.flow.constant.FlowConst;
|
||||||
|
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.enums.ProcessSubmitTypeEnum;
|
||||||
|
import com.budwk.app.flow.service.FlowCommonService;
|
||||||
|
import com.budwk.app.sys.models.Sys_user;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.club.model.ClubUser;
|
||||||
|
import com.budwk.app.zhgh.club.model.SysClub;
|
||||||
|
import com.budwk.app.zhgh.club.model.SysClubManager;
|
||||||
|
import com.budwk.app.zhgh.club.model.SysClubRule;
|
||||||
|
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
||||||
|
import com.budwk.app.zhgh.club.service.SysClubInfoManageService;
|
||||||
|
import com.budwk.app.zhgh.club.service.impl.SysClubUserServiceImpl;
|
||||||
|
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.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.json.Json;
|
||||||
|
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 javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName ClubChangeManagerController
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/26 19:03
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@Ok("json")
|
||||||
|
@At("/platform/club/infoManage/change")
|
||||||
|
public class ClubChangeManagerController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private FlowEngine flowEngine;
|
||||||
|
@Inject
|
||||||
|
private FlowCommonService flowCommonService;
|
||||||
|
@Inject
|
||||||
|
private SysClubInfoManageService infoManageService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/club/infoManage/change/index.html")
|
||||||
|
@SaCheckPermission("club.infoManage.change")
|
||||||
|
public void index() {}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("club.infoManage.change")
|
||||||
|
public Result pageData(@Valid ClubUserPageForm pageForm) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*,
|
||||||
|
club.clubName,
|
||||||
|
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,
|
||||||
|
t.variable taskVariable,
|
||||||
|
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') AS startTaskId
|
||||||
|
FROM
|
||||||
|
sys_club_manager info
|
||||||
|
LEFT JOIN sys_club club ON club.id = info.clubId
|
||||||
|
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();
|
||||||
|
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||||
|
cnd.andEX("year(info.creatTime)", "=", pageForm.getYear());
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getClubName())) {
|
||||||
|
cnd.and("club.clubName", "LIKE", "%" + pageForm.getClubName() + "%");
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("info.creatTime");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = infoManageService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
List<NutMap> listMap = pagination.getList(NutMap.class);
|
||||||
|
for (NutMap nutMap : listMap) {
|
||||||
|
List<String> oldCodeList = Json.fromJsonAsList(String.class, nutMap.getString("oldRoleCode"));
|
||||||
|
nutMap.put("oldRoleName", SysClubUserServiceImpl.convertRoleName(oldCodeList));
|
||||||
|
List<String> nowCodeList = Json.fromJsonAsList(String.class, nutMap.getString("nowRoleCode"));
|
||||||
|
nutMap.put("nowRoleName", SysClubUserServiceImpl.convertRoleName(nowCodeList));
|
||||||
|
}
|
||||||
|
pagination.setList(listMap);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("club.infoManage.change")
|
||||||
|
@SLog(type = "changManager", tag = "提交变更理事机构", msg = "提交变更理事机构")
|
||||||
|
public Object submit(@Param("data") SysClubManager clubManager) {
|
||||||
|
|
||||||
|
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where(ClubUser::getClubId, "=", clubManager.getClubId()).and(ClubUser::getUserId, "=", clubManager.getUserId()));
|
||||||
|
clubManager.setUserId(SecurityUtil.getUserId());
|
||||||
|
clubManager.setUserName(SecurityUtil.getUserUsername());
|
||||||
|
clubManager.setOldRoleCode(clubUser.getRoleCode());
|
||||||
|
if(StrUtil.isBlank(clubManager.getId())) clubManager.setCreatTime(DateUtil.now());
|
||||||
|
dao.insertOrUpdate(clubManager);
|
||||||
|
|
||||||
|
// 开启流程实例
|
||||||
|
Dict args = Dict.create();
|
||||||
|
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||||
|
args.set(FlowConst.FORM_DATA, clubManager);
|
||||||
|
ProcessInstance instance = flowEngine.startProcessInstanceByKey("XHBGLS", clubManager.getId(), SecurityUtil.getUserId(), args);
|
||||||
|
|
||||||
|
// 自动完成第一个申请任务
|
||||||
|
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||||
|
for (ProcessTask task : doingTaskList) {
|
||||||
|
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||||
|
}
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("重新提交申请")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("club.infoManage.change")
|
||||||
|
public Result submitAgain(@Param("data") SysClubManager clubManager, @Param("taskId") Long taskId) {
|
||||||
|
dao.insertOrUpdate(clubManager);
|
||||||
|
|
||||||
|
Dict dict = Dict.create();
|
||||||
|
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||||
|
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||||
|
flowCommonService.executeTask(dict);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("club.infoManage.change")
|
||||||
|
@SLog(type = "ruleUpdate", tag = "删除变更理事机构", msg = "删除变更理事机构")
|
||||||
|
public Result delete(@Param("id") String id) {
|
||||||
|
dao.delete(SysClubManager.class, id);
|
||||||
|
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("club.infoManage.change")
|
||||||
|
public Object queryClubUsers(@Param("clubId") String clubId) {
|
||||||
|
List<ClubUser> listMap = dao.query(ClubUser.class, Cnd.where(ClubUser::getClubId, "=", clubId));
|
||||||
|
List<String> list = listMap.stream().map(ClubUser::getUserId).toList();
|
||||||
|
|
||||||
|
List<Sys_user> userList = dao.query(Sys_user.class, Cnd.where(Sys_user::getId, "in", list));
|
||||||
|
Map<String, String> userMap = userList.stream().collect(Collectors.toMap(Sys_user::getId, Sys_user::getUsername));
|
||||||
|
|
||||||
|
for (ClubUser clubUser : listMap) {
|
||||||
|
clubUser.setUserName(userMap.get(clubUser.getUserId()));
|
||||||
|
}
|
||||||
|
return Result.success(listMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
+70
-70
@@ -1,7 +1,6 @@
|
|||||||
package com.budwk.app.zhgh.club.controller.infoManage;
|
package com.budwk.app.zhgh.club.controller.infoManage;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.alibaba.excel.EasyExcel;
|
import com.alibaba.excel.EasyExcel;
|
||||||
@@ -12,6 +11,7 @@ import com.budwk.app.base.result.Result;
|
|||||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
import com.budwk.app.base.utils.EasyExcelUtil;
|
import com.budwk.app.base.utils.EasyExcelUtil;
|
||||||
import com.budwk.app.sys.models.Sys_role;
|
import com.budwk.app.sys.models.Sys_role;
|
||||||
|
import com.budwk.app.sys.models.Sys_user;
|
||||||
import com.budwk.app.sys.models.Sys_user_role;
|
import com.budwk.app.sys.models.Sys_user_role;
|
||||||
import com.budwk.app.sys.services.SysRoleService;
|
import com.budwk.app.sys.services.SysRoleService;
|
||||||
import com.budwk.app.sys.services.SysUserService;
|
import com.budwk.app.sys.services.SysUserService;
|
||||||
@@ -20,10 +20,8 @@ import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
|||||||
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||||
import com.budwk.app.zhgh.club.model.ClubUser;
|
import com.budwk.app.zhgh.club.model.ClubUser;
|
||||||
import com.budwk.app.zhgh.club.model.SysClub;
|
import com.budwk.app.zhgh.club.model.SysClub;
|
||||||
import com.budwk.app.zhgh.club.model.SysClubUser;
|
|
||||||
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubInfoManageService;
|
import com.budwk.app.zhgh.club.service.SysClubInfoManageService;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubUserService;
|
|
||||||
import com.budwk.app.zhgh.club.vo.ClubCommonPageVo;
|
import com.budwk.app.zhgh.club.vo.ClubCommonPageVo;
|
||||||
import com.budwk.app.zhgh.club.vo.ClubUserImportVo;
|
import com.budwk.app.zhgh.club.vo.ClubUserImportVo;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -51,9 +49,7 @@ import org.nutz.mvc.upload.UploadAdaptor;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@IocBean
|
@IocBean
|
||||||
@@ -64,8 +60,6 @@ public class ClubInfoManageController {
|
|||||||
@Inject
|
@Inject
|
||||||
private SysClubInfoManageService clubInfoManageService;
|
private SysClubInfoManageService clubInfoManageService;
|
||||||
@Inject
|
@Inject
|
||||||
private SysClubUserService sysClubUserService;
|
|
||||||
@Inject
|
|
||||||
private Dao dao;
|
private Dao dao;
|
||||||
@Inject
|
@Inject
|
||||||
private CommonService commonService;
|
private CommonService commonService;
|
||||||
@@ -115,7 +109,7 @@ public class ClubInfoManageController {
|
|||||||
@SaCheckPermission("club.infoManage.manage")
|
@SaCheckPermission("club.infoManage.manage")
|
||||||
@SLog(type = "infoManage", tag = "修改缴费状态", msg = "修改缴费状态", param = true)
|
@SLog(type = "infoManage", tag = "修改缴费状态", msg = "修改缴费状态", param = true)
|
||||||
public Result updatePayed(@Valid Boolean payed, @Valid String id) {
|
public Result updatePayed(@Valid Boolean payed, @Valid String id) {
|
||||||
clubInfoManageService.dao().update(SysClubUser.class, Chain.make("payed", payed), Cnd.where("id", "=", id));
|
clubInfoManageService.dao().update(ClubUser.class, Chain.make("payed", payed), Cnd.where("id", "=", id));
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,7 +118,7 @@ public class ClubInfoManageController {
|
|||||||
@SaCheckPermission("club.infoManage.manage")
|
@SaCheckPermission("club.infoManage.manage")
|
||||||
@SLog(type = "infoManage", tag = "修改拨付状态", msg = "修改拨付状态", param = true)
|
@SLog(type = "infoManage", tag = "修改拨付状态", msg = "修改拨付状态", param = true)
|
||||||
public Result updateGive(@Valid Boolean giveMoney, @Valid String id) {
|
public Result updateGive(@Valid Boolean giveMoney, @Valid String id) {
|
||||||
clubInfoManageService.dao().update(SysClubUser.class, Chain.make("giveMoney", giveMoney), Cnd.where("id", "=", id));
|
clubInfoManageService.dao().update(ClubUser.class, Chain.make("giveMoney", giveMoney), Cnd.where("id", "=", id));
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,12 +128,16 @@ public class ClubInfoManageController {
|
|||||||
@SLog(type = "infoManage", tag = "退会", msg = "退会", param = true)
|
@SLog(type = "infoManage", tag = "退会", msg = "退会", param = true)
|
||||||
public Result exitClub(@Valid String id) {
|
public Result exitClub(@Valid String id) {
|
||||||
ClubUser clubUser = dao.fetch(ClubUser.class, id);
|
ClubUser clubUser = dao.fetch(ClubUser.class, id);
|
||||||
Sys_role sysRole = sysRoleService.getByCode(clubUser.getRoleCode());
|
dao.delete(ClubUser.class,id);
|
||||||
dao.update(ClubUser.class, Chain.make("isNormal", false).add("changeTime", DateUtil.now())
|
List<String> roleCodes = clubUser.getRoleCode();
|
||||||
, Cnd.where("id", "=", id));
|
for (String roleCode : roleCodes) {
|
||||||
dao.clear(Sys_user_role.class, Cnd.where("userId", "=", clubUser.getUserId())
|
Sys_role sysRole = sysRoleService.getByCode(roleCode);
|
||||||
|
if (ObjectUtil.isNotEmpty(sysRole)) {
|
||||||
|
dao.clear(Sys_user_role.class, Cnd.NEW().and("userId", "=", clubUser.getUserId())
|
||||||
.and("roleId", "=", sysRole.getId())
|
.and("roleId", "=", sysRole.getId())
|
||||||
.and("clubId", "=", clubUser.getClubId()));
|
.and("clubId", "=", clubUser.getClubId()));
|
||||||
|
}
|
||||||
|
}
|
||||||
sysUserService.clearCache();
|
sysUserService.clearCache();
|
||||||
sysRoleService.clearCache();
|
sysRoleService.clearCache();
|
||||||
return Result.success();
|
return Result.success();
|
||||||
@@ -152,12 +150,15 @@ public class ClubInfoManageController {
|
|||||||
public Result userDelete(@Valid String id) {
|
public Result userDelete(@Valid String id) {
|
||||||
ClubUser clubUser = dao.fetch(ClubUser.class, id);
|
ClubUser clubUser = dao.fetch(ClubUser.class, id);
|
||||||
dao.delete(ClubUser.class,id);
|
dao.delete(ClubUser.class,id);
|
||||||
Sys_role sysRole = sysRoleService.getByCode(clubUser.getRoleCode());
|
List<String> roleCodes = clubUser.getRoleCode();
|
||||||
if(ObjectUtil.isNotEmpty(sysRole)){
|
for (String roleCode : roleCodes) {
|
||||||
|
Sys_role sysRole = sysRoleService.getByCode(roleCode);
|
||||||
|
if (ObjectUtil.isNotEmpty(sysRole)) {
|
||||||
dao.clear(Sys_user_role.class, Cnd.NEW().and("userId", "=", clubUser.getUserId())
|
dao.clear(Sys_user_role.class, Cnd.NEW().and("userId", "=", clubUser.getUserId())
|
||||||
.and("roleId", "=", sysRole.getId())
|
.and("roleId", "=", sysRole.getId())
|
||||||
.and("clubId", "=", clubUser.getClubId()));
|
.and("clubId", "=", clubUser.getClubId()));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
sysUserService.clearCache();
|
sysUserService.clearCache();
|
||||||
sysRoleService.clearCache();
|
sysRoleService.clearCache();
|
||||||
return Result.success();
|
return Result.success();
|
||||||
@@ -166,45 +167,43 @@ public class ClubInfoManageController {
|
|||||||
@At
|
@At
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("club.infoManage.manage")
|
@SaCheckPermission("club.infoManage.manage")
|
||||||
@SLog(type = "infoManage", tag = "修改身份", msg = "修改身份", param = true)
|
@SLog(type = "infoManage", tag = "修改身份", msg = "修改身份")
|
||||||
public Result updateRoleCode(@Valid String id, @Valid String roleCode, @Valid String clubId) {
|
public Result updateRoleCode(@Param("id") String id, @Valid String[] roleCodes, @Valid String clubId) {
|
||||||
|
List<String> roleCodeList = Arrays.asList(roleCodes);
|
||||||
//查询社团是否存在会长或者秘书长
|
//查询社团是否存在会长或者秘书长
|
||||||
if (List.of(RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name()).contains(roleCode)) {
|
if(Arrays.asList(roleCodes).contains(RoleConstant.CLUB_PRESIDENT.name())) {
|
||||||
int count = clubInfoManageService.dao().count(ClubUser.class, Cnd.where("clubId", "=", clubId)
|
int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId)
|
||||||
.and("roleCode", "=", roleCode));
|
.and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(RoleConstant.CLUB_PRESIDENT.name()))));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return Result.error((Objects.equals(roleCode, RoleConstant.CLUB_PRESIDENT.name()) ? "会长" : "秘书长") + "只能有一位");
|
return Result.error("会长只能有一位");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(Arrays.asList(roleCodes).contains(RoleConstant.CLUB_SECRETARY.name())) {
|
||||||
|
int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId)
|
||||||
|
.and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(RoleConstant.CLUB_SECRETARY.name()))));
|
||||||
|
if (count > 0) {
|
||||||
|
return Result.error("秘书长只能有一位");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ClubUser clubUser = clubInfoManageService.dao().fetch(ClubUser.class, id);
|
ClubUser clubUser = clubInfoManageService.dao().fetch(ClubUser.class, id);
|
||||||
List<String> roleList = commonService.findUserRoleByRoleCode(List.of(
|
|
||||||
RoleConstant.CLUB_PRESIDENT.name(),
|
|
||||||
RoleConstant.CLUB_VICE_PRESIDENT.name(),
|
|
||||||
RoleConstant.CLUB_SECRETARY.name(),
|
|
||||||
RoleConstant.CLUB_VICE_SECRETARY.name()
|
|
||||||
));
|
|
||||||
|
|
||||||
//如果变更为会员,则直接变更
|
// 先清除所有的角色
|
||||||
if (Objects.equals(roleCode, RoleConstant.CLUB_MEMBER.name())) {
|
dao.clear(Sys_user_role.class, Cnd.where("userId", "=", clubUser.getUserId()).and("clubId", "=", clubUser.getClubId()));
|
||||||
sysClubUserService.dao().update(ClubUser.class,Chain.make("roleCode", roleCode), Cnd.where("id", "=", id));
|
// 再根据传过来的赋值
|
||||||
//变更为会员则需要清除社团负责人角色
|
clubUser.setRoleCode(roleCodeList);
|
||||||
dao.clear(Sys_user_role.class, Cnd.where("clubId", "=", clubId).and("userId", "=", clubUser.getUserId())
|
|
||||||
.and("roleId", "in", roleList));
|
|
||||||
} else {
|
|
||||||
//先清除原始身份的角色
|
|
||||||
dao.clear(Sys_user_role.class, Cnd.where("clubId", "=", clubId).and("userId", "=", clubUser.getUserId())
|
|
||||||
.and("roleId", "in", roleList));
|
|
||||||
//插入新的身份角色
|
|
||||||
Sys_user_role sysUserRole = new Sys_user_role();
|
|
||||||
sysUserRole.setUserId(clubUser.getUserId());
|
|
||||||
Sys_role sysRole = sysRoleService.getByCode(roleCode);
|
|
||||||
sysUserRole.setRoleId(sysRole.getId());
|
|
||||||
sysUserRole.setClubId(clubId);
|
|
||||||
dao.insert(sysUserRole);
|
|
||||||
|
|
||||||
clubUser.setRoleCode(roleCode);
|
|
||||||
dao.update(clubUser);
|
dao.update(clubUser);
|
||||||
|
// 设置角色
|
||||||
|
List<Sys_user_role> roles = new ArrayList<>();
|
||||||
|
for (String s : roleCodeList) {
|
||||||
|
Sys_user_role ur = new Sys_user_role();
|
||||||
|
ur.setUserId(clubUser.getUserId());
|
||||||
|
ur.setClubId(clubUser.getClubId());
|
||||||
|
Sys_role sRole = sysRoleService.getByCode(s);
|
||||||
|
ur.setRoleId(sRole.getId());
|
||||||
|
roles.add(ur);
|
||||||
}
|
}
|
||||||
|
dao.insert(roles);
|
||||||
sysUserService.clearCache();
|
sysUserService.clearCache();
|
||||||
sysRoleService.clearCache();
|
sysRoleService.clearCache();
|
||||||
return Result.success();
|
return Result.success();
|
||||||
@@ -233,7 +232,7 @@ public class ClubInfoManageController {
|
|||||||
group.orLike("t1.username", keyWord).orLike("t1.loginname", keyWord);
|
group.orLike("t1.username", keyWord).orLike("t1.loginname", keyWord);
|
||||||
cnd.and(group);
|
cnd.and(group);
|
||||||
if (addMember != null && !addMember) {
|
if (addMember != null && !addMember) {
|
||||||
cnd.and(new Static("t1.id in (SELECT userId from club_user WHERE clubId = '%s' and roleCode = '%s')".formatted(clubId, RoleConstant.CLUB_MEMBER.name())));
|
cnd.and(new Static("t1.id in (SELECT userId from club_user WHERE clubId = '%s' AND JSON_LENGTH(roleCode) = 1 AND JSON_CONTAINS(roleCode, '\"CLUB_MEMBER\"'))".formatted(clubId)));
|
||||||
} else {
|
} else {
|
||||||
cnd.and(new Static("t1.id not in (SELECT userId from club_user WHERE clubId = '%s')".formatted(clubId)));
|
cnd.and(new Static("t1.id not in (SELECT userId from club_user WHERE clubId = '%s')".formatted(clubId)));
|
||||||
}
|
}
|
||||||
@@ -250,7 +249,7 @@ public class ClubInfoManageController {
|
|||||||
//查询社团是否存在会长或者秘书长
|
//查询社团是否存在会长或者秘书长
|
||||||
if (List.of(RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name()).contains(roleCode)) {
|
if (List.of(RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name()).contains(roleCode)) {
|
||||||
int count = clubInfoManageService.dao().count(ClubUser.class, Cnd.where("clubId", "=", clubId)
|
int count = clubInfoManageService.dao().count(ClubUser.class, Cnd.where("clubId", "=", clubId)
|
||||||
.and("roleCode", "=", roleCode));
|
.and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(roleCode))));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return Result.error((Objects.equals(roleCode, RoleConstant.CLUB_PRESIDENT.name()) ? "会长" : "秘书长") + "只能有一位");
|
return Result.error((Objects.equals(roleCode, RoleConstant.CLUB_PRESIDENT.name()) ? "会长" : "秘书长") + "只能有一位");
|
||||||
}
|
}
|
||||||
@@ -266,16 +265,22 @@ public class ClubInfoManageController {
|
|||||||
sysUserService.clearCache();
|
sysUserService.clearCache();
|
||||||
sysRoleService.clearCache();
|
sysRoleService.clearCache();
|
||||||
}
|
}
|
||||||
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where("clubId", "=", clubId)
|
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where("clubId", "=", clubId).and("userId", "=", user));
|
||||||
.and("userId", "=", user).and("roleCode", "=", RoleConstant.CLUB_MEMBER.name()));
|
if(clubUser != null) {
|
||||||
ClubUser cUser = new ClubUser();
|
List<String> roleCodeList = clubUser.getRoleCode();
|
||||||
if (clubUser != null) {
|
if (List.of(RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_VICE_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name(), RoleConstant.CLUB_VICE_SECRETARY.name()).contains(roleCode)) {
|
||||||
cUser = clubUser;
|
roleCodeList.remove(RoleConstant.CLUB_MEMBER.name());
|
||||||
}
|
}
|
||||||
cUser.setClubId(clubId);
|
if(!roleCodeList.contains(roleCode)) {
|
||||||
cUser.setUserId(user);
|
roleCodeList.add(roleCode);
|
||||||
cUser.setRoleCode(roleCode);
|
}
|
||||||
sysClubUserService.insertOrUpdate(cUser);
|
} else {
|
||||||
|
clubUser = new ClubUser();
|
||||||
|
clubUser.setClubId(clubId);
|
||||||
|
clubUser.setUserId(user);
|
||||||
|
clubUser.setRoleCode(List.of(roleCode));
|
||||||
|
}
|
||||||
|
dao.insertOrUpdate(clubUser);
|
||||||
}
|
}
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
@@ -295,13 +300,12 @@ public class ClubInfoManageController {
|
|||||||
EasyExcel.write(byteArrayOutputStream, ClubUserImportVo.class)
|
EasyExcel.write(byteArrayOutputStream, ClubUserImportVo.class)
|
||||||
.sheet("协会会员导入模版")
|
.sheet("协会会员导入模版")
|
||||||
.doWrite(ArrayList::new);
|
.doWrite(ArrayList::new);
|
||||||
CommonDownloadUtil.download("协会会员导入模版.xlsx",byteArrayOutputStream.toByteArray() ,response);
|
CommonDownloadUtil.download("协会会员导入模版.xlsx", byteArrayOutputStream.toByteArray() ,response);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("club.infoManage.manage")
|
@SaCheckPermission("club.infoManage.manage")
|
||||||
@@ -310,14 +314,12 @@ public class ClubInfoManageController {
|
|||||||
List<T> ts = EasyExcelUtil.syncReadModel(file.getFile(), ClubUserImportVo.class, 0, 1);
|
List<T> ts = EasyExcelUtil.syncReadModel(file.getFile(), ClubUserImportVo.class, 0, 1);
|
||||||
List<ClubUserImportVo> mdList = JSONUtil.parseArray(JSONUtil.toJsonStr(ts)).toList(ClubUserImportVo.class);
|
List<ClubUserImportVo> mdList = JSONUtil.parseArray(JSONUtil.toJsonStr(ts)).toList(ClubUserImportVo.class);
|
||||||
List<String> loginNames = mdList.stream().map(ClubUserImportVo::getLoginname).collect(Collectors.toList());
|
List<String> loginNames = mdList.stream().map(ClubUserImportVo::getLoginname).collect(Collectors.toList());
|
||||||
List<View_user> sysUsers = sysClubUserService.dao().query(View_user.class, Cnd.where("loginname", "in", loginNames));
|
List<View_user> sysUsers = dao.query(View_user.class, Cnd.where("loginname", "in", loginNames));
|
||||||
List<ClubUser> clubUsers = sysClubUserService.dao().query(ClubUser.class,Cnd.where("clubId", "=", businessId));
|
List<ClubUser> clubUsers = dao.query(ClubUser.class,Cnd.where("clubId", "=", businessId));
|
||||||
|
|
||||||
|
|
||||||
List<ClubUser> clubUserList = new ArrayList<>();
|
List<ClubUser> clubUserList = new ArrayList<>();
|
||||||
|
|
||||||
if (isFlag) {
|
if (isFlag) {
|
||||||
sysClubUserService.clear(Cnd.where("clubId", "=", businessId));
|
dao.clear(ClubUser.class, Cnd.where("clubId", "=", businessId));
|
||||||
}
|
}
|
||||||
//返回错误记录
|
//返回错误记录
|
||||||
List<ClubUserImportVo> errorInfos = new ArrayList<>();
|
List<ClubUserImportVo> errorInfos = new ArrayList<>();
|
||||||
@@ -334,13 +336,12 @@ public class ClubInfoManageController {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ClubUser cUser = new ClubUser();
|
ClubUser cUser = new ClubUser();
|
||||||
cUser.setClubPosition(v.getClubPosition());
|
|
||||||
cUser.setUserId(user.getId());
|
cUser.setUserId(user.getId());
|
||||||
cUser.setClubId(businessId);
|
cUser.setClubId(businessId);
|
||||||
cUser.setRoleCode(RoleConstant.CLUB_MEMBER.name());
|
cUser.setRoleCode(List.of(RoleConstant.CLUB_MEMBER.name()));
|
||||||
clubUserList.add(cUser);
|
clubUserList.add(cUser);
|
||||||
}
|
}
|
||||||
sysClubUserService.insert(clubUserList);
|
dao.insert(clubUserList);
|
||||||
|
|
||||||
List<Sys_user_role> sysUserRoleList = new ArrayList<>();
|
List<Sys_user_role> sysUserRoleList = new ArrayList<>();
|
||||||
clubUserList.forEach(cUser -> {
|
clubUserList.forEach(cUser -> {
|
||||||
@@ -350,7 +351,7 @@ public class ClubInfoManageController {
|
|||||||
role.setClubId(cUser.getClubId());
|
role.setClubId(cUser.getClubId());
|
||||||
sysUserRoleList.add(role);
|
sysUserRoleList.add(role);
|
||||||
});
|
});
|
||||||
sysClubUserService.insert(sysUserRoleList);
|
dao.insert(sysUserRoleList);
|
||||||
|
|
||||||
//如果有错误数据就返回给前端
|
//如果有错误数据就返回给前端
|
||||||
if (Lang.isNotEmpty(errorInfos)) {
|
if (Lang.isNotEmpty(errorInfos)) {
|
||||||
@@ -365,5 +366,4 @@ public class ClubInfoManageController {
|
|||||||
}
|
}
|
||||||
return Result.success("导入成功");
|
return Result.success("导入成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
-132
@@ -1,132 +0,0 @@
|
|||||||
package com.budwk.app.zhgh.club.controller.infoManage;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import com.budwk.app.base.annotation.SLog;
|
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
|
||||||
import com.budwk.app.base.page.Pagination;
|
|
||||||
import com.budwk.app.base.result.Result;
|
|
||||||
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.sys.services.SysUserService;
|
|
||||||
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
|
||||||
import com.budwk.app.zhgh.club.model.SysClub;
|
|
||||||
import com.budwk.app.zhgh.club.model.SysClubUser;
|
|
||||||
import com.budwk.app.zhgh.club.model.SysClubUserBackHistory;
|
|
||||||
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
|
||||||
import com.budwk.app.zhgh.club.service.SysClubInfoManageService;
|
|
||||||
import com.budwk.app.zhgh.club.service.SysClubService;
|
|
||||||
import com.budwk.app.zhgh.club.service.SysClubUserService;
|
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
|
||||||
import org.nutz.dao.Cnd;
|
|
||||||
import org.nutz.ioc.aop.Aop;
|
|
||||||
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.validation.Valid;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: JyuHsin
|
|
||||||
* @Date: 2024/8/8 11:19
|
|
||||||
* @Version: v1.0.0
|
|
||||||
* @Description: TODO
|
|
||||||
**/
|
|
||||||
@IocBean
|
|
||||||
@Ok("json")
|
|
||||||
@At("/platform/club/infoManage/clubManagePersonAudit")
|
|
||||||
public class ClubManagePersonAuditController {
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysClubInfoManageService clubInfoManageService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysClubService sysClubService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysClubUserService sysClubUserService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysUserService sysUserService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysRoleService sysRoleService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private CommonService commonService;
|
|
||||||
|
|
||||||
@At("")
|
|
||||||
@Ok("beetl:/platform/zhgh/club/infoManage/clubManagePersonAudit/index.html")
|
|
||||||
@SaCheckPermission("club.infoManage.clubManagePersonAudit")
|
|
||||||
public void index() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.infoManage.clubManagePersonAudit")
|
|
||||||
public Result pageData(@Valid ClubUserPageForm pageForm) {
|
|
||||||
Pagination pagination = clubInfoManageService.clubManagePersonAuditPageData(pageForm);
|
|
||||||
return Result.success(pagination);
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.infoManage.clubManagePersonAudit")
|
|
||||||
public Result getAllClub() {
|
|
||||||
//List<SysClub> list = sysClubService.query(Cnd.where("state", "=", ClubRegistAuditState.SCHOOL_PASS).asc("clubCode"));
|
|
||||||
List<SysClub> list = sysClubService.query(Cnd.NEW().asc("clubCode"));
|
|
||||||
return Result.success(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
@SaCheckPermission("club.infoManage.clubManagePersonAudit")
|
|
||||||
@SLog(type = "clubManagePersonAudit", tag = "校工会审核理事机构", msg = "校工会审核理事机构")
|
|
||||||
public Result doAudit(@Valid String[] ids, @Valid Boolean isPass) {
|
|
||||||
List<SysClubUser> clubUsers = sysClubUserService.query(Cnd.where("id", "in", ids));
|
|
||||||
List<SysClubUserBackHistory> list = new ArrayList<>();
|
|
||||||
clubUsers.forEach(item -> {
|
|
||||||
if (item.getStatus() == 5) {
|
|
||||||
item.setState(isPass ? 3 : 2);
|
|
||||||
if (isPass) {
|
|
||||||
item.setRoleCode(item.getChangeRoleCode());
|
|
||||||
}
|
|
||||||
item.setChangeRoleCode(null);
|
|
||||||
item.setRoleCodeChangeTime(null);
|
|
||||||
} else {
|
|
||||||
item.setStatus(isPass ? 5 : 4);
|
|
||||||
}
|
|
||||||
if (isPass) {
|
|
||||||
|
|
||||||
List<String> roleList = commonService.findUserRoleByRoleCode(List.of(
|
|
||||||
RoleConstant.CLUB_PRESIDENT.name(),
|
|
||||||
RoleConstant.CLUB_VICE_PRESIDENT.name(),
|
|
||||||
RoleConstant.CLUB_SECRETARY.name(),
|
|
||||||
RoleConstant.CLUB_VICE_SECRETARY.name()
|
|
||||||
));
|
|
||||||
|
|
||||||
sysClubService.dao().clear(Sys_user_role.class, Cnd.where("clubId", "=", item.getClubId()).and("userId", "=", item.getUserId())
|
|
||||||
.and("roleId", "in", roleList));
|
|
||||||
Sys_user_role sys_user_role = new Sys_user_role();
|
|
||||||
sys_user_role.setUserId(item.getUserId());
|
|
||||||
Sys_role sysRole = sysRoleService.getByCode(item.getRoleCode());
|
|
||||||
sys_user_role.setRoleId(sysRole.getId());
|
|
||||||
sys_user_role.setClubId(item.getClubId());
|
|
||||||
sysClubService.dao().insert(sys_user_role);
|
|
||||||
|
|
||||||
SysClubUserBackHistory backHistory = new SysClubUserBackHistory();
|
|
||||||
backHistory.setUserId(item.getUserId());
|
|
||||||
backHistory.setClubId(item.getClubId());
|
|
||||||
backHistory.setBTime(cn.hutool.core.date.DateUtil.now());
|
|
||||||
backHistory.setRoleCode(item.getRoleCode());
|
|
||||||
list.add(backHistory);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
sysClubService.dao().update(clubUsers);
|
|
||||||
sysClubService.dao().insert(list);
|
|
||||||
sysUserService.clearCache();
|
|
||||||
sysRoleService.clearCache();
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+118
-7
@@ -1,23 +1,43 @@
|
|||||||
package com.budwk.app.zhgh.club.controller.infoManage;
|
package com.budwk.app.zhgh.club.controller.infoManage;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.lang.Dict;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.annotation.SLog;
|
import com.budwk.app.base.annotation.SLog;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
|
import com.budwk.app.flow.constant.FlowConst;
|
||||||
|
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.enums.ProcessInstanceStateEnum;
|
||||||
|
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.club.model.SysClub;
|
import com.budwk.app.zhgh.club.model.SysClub;
|
||||||
|
import com.budwk.app.zhgh.club.model.SysClubRefresh;
|
||||||
|
import com.budwk.app.zhgh.club.model.SysClubRule;
|
||||||
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubInfoManageService;
|
import com.budwk.app.zhgh.club.service.SysClubInfoManageService;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubService;
|
import com.budwk.app.zhgh.club.service.SysClubService;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Chain;
|
import org.nutz.dao.Chain;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: JyuHsin
|
* @Author: JyuHsin
|
||||||
@@ -32,20 +52,62 @@ public class ClubRefreshReportController {
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysClubInfoManageService clubInfoManageService;
|
private SysClubInfoManageService clubInfoManageService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysClubService sysClubService;
|
private FlowEngine flowEngine;
|
||||||
|
@Inject
|
||||||
|
private FlowCommonService flowCommonService;
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/club/infoManage/refreshReport/index.html")
|
@Ok("beetl:/platform/zhgh/club/infoManage/refreshReport/index.html")
|
||||||
@SaCheckPermission("club.infoManage.refreshReport")
|
@SaCheckPermission("club.infoManage.refreshReport")
|
||||||
public void index() {
|
public void index() {}
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.infoManage.refreshReport")
|
@SaCheckPermission("club.infoManage.refreshReport")
|
||||||
public Result pageData(@Valid ClubUserPageForm pageForm) {
|
public Result pageData(@Valid ClubUserPageForm pageForm) {
|
||||||
Pagination pagination = clubInfoManageService.reportPageData(pageForm);
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*,
|
||||||
|
club.clubName,
|
||||||
|
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,
|
||||||
|
t.variable taskVariable,
|
||||||
|
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') AS startTaskId
|
||||||
|
FROM
|
||||||
|
sys_club_refresh info
|
||||||
|
LEFT JOIN sys_club club ON club.id = info.clubId
|
||||||
|
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();
|
||||||
|
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||||
|
cnd.andEX("year(info.creatTime)", "=", pageForm.getYear());
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getClubName())) {
|
||||||
|
cnd.and("club.clubName", "LIKE", "%" + pageForm.getClubName() + "%");
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("info.creatTime");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = clubInfoManageService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
return Result.success(pagination);
|
return Result.success(pagination);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,9 +115,58 @@ public class ClubRefreshReportController {
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("club.infoManage.refreshReport")
|
@SaCheckPermission("club.infoManage.refreshReport")
|
||||||
@SLog(type = "refreshReport", tag = "提交换届报告", msg = "提交换届报告")
|
@SLog(type = "refreshReport", tag = "提交换届报告", msg = "提交换届报告")
|
||||||
public Object refreshDo(SysClub club) {
|
public Object submit(@Param("data") SysClubRefresh clubRefresh) {
|
||||||
|
|
||||||
sysClubService.update(Chain.make("replaceReport", club.getReplaceReport()).add("reportState", 1), Cnd.where("id", "=", club.getId()));
|
List<SysClubRefresh> list = dao.query(SysClubRefresh.class, Cnd.NEW());
|
||||||
|
List<String> idList = list.stream().map(SysClubRefresh::getId).toList();
|
||||||
|
int count = dao.count(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "in", idList).and(ProcessInstance::getState, "!=", ProcessInstanceStateEnum.FINISHED.getCode()));
|
||||||
|
if (count > 0) {
|
||||||
|
return Result.error("您有该协会的申请记录尚未完成,请核对!");
|
||||||
|
}
|
||||||
|
|
||||||
|
SysClub club = clubInfoManageService.dao().fetch(SysClub.class, clubRefresh.getClubId());
|
||||||
|
clubRefresh.setUserId(SecurityUtil.getUserId());
|
||||||
|
clubRefresh.setUserName(SecurityUtil.getUserUsername());
|
||||||
|
clubRefresh.setLastFiles(club.getReplaceReport());
|
||||||
|
if(StrUtil.isBlank(clubRefresh.getId())) clubRefresh.setCreatTime(DateUtil.now());
|
||||||
|
clubInfoManageService.dao().insertOrUpdate(clubRefresh);
|
||||||
|
|
||||||
|
// 开启流程实例
|
||||||
|
Dict args = Dict.create();
|
||||||
|
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||||
|
args.set(FlowConst.FORM_DATA, clubRefresh);
|
||||||
|
ProcessInstance instance = flowEngine.startProcessInstanceByKey("XHHJBG", clubRefresh.getId(), SecurityUtil.getUserId(), args);
|
||||||
|
|
||||||
|
// 自动完成第一个申请任务
|
||||||
|
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||||
|
for (ProcessTask task : doingTaskList) {
|
||||||
|
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||||
|
}
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("重新提交申请")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("club.infoManage.refreshReport")
|
||||||
|
public Result submitAgain(@Param("data") SysClubRefresh clubRefresh, @Param("taskId") Long taskId) {
|
||||||
|
clubInfoManageService.dao().insertOrUpdate(clubRefresh);
|
||||||
|
|
||||||
|
Dict dict = Dict.create();
|
||||||
|
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||||
|
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||||
|
flowCommonService.executeTask(dict);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("club.infoManage.refreshReport")
|
||||||
|
@SLog(type = "refreshReport", tag = "删除换届报告", msg = "删除换届报告")
|
||||||
|
public Result delete(@Param("id") String id) {
|
||||||
|
clubInfoManageService.dao().delete(SysClubRefresh.class, id);
|
||||||
|
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+119
-8
@@ -1,23 +1,44 @@
|
|||||||
package com.budwk.app.zhgh.club.controller.infoManage;
|
package com.budwk.app.zhgh.club.controller.infoManage;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.lang.Dict;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.annotation.SLog;
|
import com.budwk.app.base.annotation.SLog;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
|
import com.budwk.app.flow.constant.FlowConst;
|
||||||
|
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.enums.ProcessInstanceStateEnum;
|
||||||
|
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.club.model.SysClub;
|
import com.budwk.app.zhgh.club.model.SysClub;
|
||||||
|
import com.budwk.app.zhgh.club.model.SysClubRefresh;
|
||||||
|
import com.budwk.app.zhgh.club.model.SysClubRule;
|
||||||
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubInfoManageService;
|
import com.budwk.app.zhgh.club.service.SysClubInfoManageService;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubService;
|
import com.budwk.app.zhgh.club.service.SysClubService;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Chain;
|
import org.nutz.dao.Chain;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: JyuHsin
|
* @Author: JyuHsin
|
||||||
@@ -32,20 +53,62 @@ public class ClubRuleUpdateController {
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysClubInfoManageService clubInfoManageService;
|
private SysClubInfoManageService clubInfoManageService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysClubService sysClubService;
|
private FlowEngine flowEngine;
|
||||||
|
@Inject
|
||||||
|
private FlowCommonService flowCommonService;
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/club/infoManage/ruleUpdate/index.html")
|
@Ok("beetl:/platform/zhgh/club/infoManage/ruleUpdate/index.html")
|
||||||
@SaCheckPermission("club.infoManage.ruleUpdate")
|
@SaCheckPermission("club.infoManage.ruleUpdate")
|
||||||
public void index() {
|
public void index() {}
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.infoManage.ruleUpdate")
|
@SaCheckPermission("club.infoManage.ruleUpdate")
|
||||||
public Result pageData(@Valid ClubUserPageForm pageForm) {
|
public Result pageData(@Valid ClubUserPageForm pageForm) {
|
||||||
Pagination pagination = clubInfoManageService.reportPageData(pageForm);
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*,
|
||||||
|
club.clubName,
|
||||||
|
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,
|
||||||
|
t.variable taskVariable,
|
||||||
|
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') AS startTaskId
|
||||||
|
FROM
|
||||||
|
sys_club_rule info
|
||||||
|
LEFT JOIN sys_club club ON club.id = info.clubId
|
||||||
|
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();
|
||||||
|
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||||
|
cnd.andEX("year(info.creatTime)", "=", pageForm.getYear());
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getClubName())) {
|
||||||
|
cnd.and("club.clubName", "LIKE", "%" + pageForm.getClubName() + "%");
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("info.creatTime");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = clubInfoManageService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
return Result.success(pagination);
|
return Result.success(pagination);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,10 +116,58 @@ public class ClubRuleUpdateController {
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("club.infoManage.ruleUpdate")
|
@SaCheckPermission("club.infoManage.ruleUpdate")
|
||||||
@SLog(type = "ruleUpdate", tag = "提交章程备案", msg = "提交章程备案")
|
@SLog(type = "ruleUpdate", tag = "提交章程备案", msg = "提交章程备案")
|
||||||
public Object ruleDo(SysClub club) {
|
public Object submit(@Param("data")SysClubRule clubRule) {
|
||||||
|
|
||||||
sysClubService.update(Chain.make("afterRulesFile", club.getAfterRulesFile())
|
List<SysClubRule> list = dao.query(SysClubRule.class, Cnd.NEW());
|
||||||
.add("ruleState", 1), Cnd.where("id", "=", club.getId()));
|
List<String> idList = list.stream().map(SysClubRule::getId).toList();
|
||||||
|
int count = dao.count(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "in", idList).and(ProcessInstance::getState, "!=", ProcessInstanceStateEnum.FINISHED.getCode()));
|
||||||
|
if (count > 0) {
|
||||||
|
return Result.error("您有该协会的申请记录尚未完成,请核对!");
|
||||||
|
}
|
||||||
|
|
||||||
|
SysClub club = clubInfoManageService.dao().fetch(SysClub.class, clubRule.getClubId());
|
||||||
|
clubRule.setUserId(SecurityUtil.getUserId());
|
||||||
|
clubRule.setUserName(SecurityUtil.getUserUsername());
|
||||||
|
clubRule.setLastFiles(club.getRulesFile());
|
||||||
|
if(StrUtil.isBlank(clubRule.getId())) clubRule.setCreatTime(DateUtil.now());
|
||||||
|
clubInfoManageService.dao().insertOrUpdate(clubRule);
|
||||||
|
|
||||||
|
// 开启流程实例
|
||||||
|
Dict args = Dict.create();
|
||||||
|
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||||
|
args.set(FlowConst.FORM_DATA, clubRule);
|
||||||
|
ProcessInstance instance = flowEngine.startProcessInstanceByKey("XHZCXD", clubRule.getId(), SecurityUtil.getUserId(), args);
|
||||||
|
|
||||||
|
// 自动完成第一个申请任务
|
||||||
|
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||||
|
for (ProcessTask task : doingTaskList) {
|
||||||
|
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||||
|
}
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("重新提交申请")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("club.infoManage.ruleUpdate")
|
||||||
|
public Result submitAgain(@Param("data") SysClubRule clubRule, @Param("taskId") Long taskId) {
|
||||||
|
clubInfoManageService.dao().insertOrUpdate(clubRule);
|
||||||
|
|
||||||
|
Dict dict = Dict.create();
|
||||||
|
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||||
|
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||||
|
flowCommonService.executeTask(dict);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("club.infoManage.ruleUpdate")
|
||||||
|
@SLog(type = "ruleUpdate", tag = "删除章程备案", msg = "删除章程备案")
|
||||||
|
public Result delete(@Param("id") String id) {
|
||||||
|
clubInfoManageService.dao().delete(SysClubRule.class, id);
|
||||||
|
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+65
-39
@@ -1,25 +1,25 @@
|
|||||||
package com.budwk.app.zhgh.club.controller.infoManage;
|
package com.budwk.app.zhgh.club.controller.infoManage;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import com.budwk.app.base.annotation.SLog;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.result.Result;
|
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.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.zhgh.club.model.SysClub;
|
|
||||||
import com.budwk.app.zhgh.club.model.SysClubFiles;
|
|
||||||
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubInfoManageService;
|
import com.budwk.app.zhgh.club.service.SysClubInfoManageService;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubService;
|
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
|
||||||
import org.nutz.dao.Chain;
|
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: JyuHsin
|
* @Author: JyuHsin
|
||||||
@@ -35,44 +35,70 @@ public class ClubSchoolAuditReportController {
|
|||||||
@Inject
|
@Inject
|
||||||
private SysClubInfoManageService clubInfoManageService;
|
private SysClubInfoManageService clubInfoManageService;
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysClubService sysClubService;
|
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/club/infoManage/schoolAuditReport/index.html")
|
@Ok("beetl:/platform/zhgh/club/infoManage/schoolAuditReport/index.html")
|
||||||
@SaCheckPermission("club.infoManage.schoolAuditReport")
|
@SaCheckPermission("club.infoManage.schoolAuditReport")
|
||||||
public void index() {
|
public void index() {}
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.infoManage.schoolAuditReport")
|
@SaCheckPermission("club.infoManage.schoolAuditReport")
|
||||||
public Result pageData(@Valid ClubUserPageForm pageForm) {
|
public Result pageData(@Valid ClubUserPageForm pageForm,
|
||||||
Pagination pagination = clubInfoManageService.schoolAuditReportPageData(pageForm);
|
@Param(value = "approval") Boolean approval) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*,
|
||||||
|
club.clubName,
|
||||||
|
ins.id AS instanceId,
|
||||||
|
ins.businessNo,
|
||||||
|
ins.state instanceState,
|
||||||
|
ins.variable instanceVariale,
|
||||||
|
ins.processDefineId instanceProcessDefineId,
|
||||||
|
t.id taskId,
|
||||||
|
t.taskName AS taskKey,
|
||||||
|
t.displayName taskName,
|
||||||
|
t.taskType,
|
||||||
|
t.performType taskPerformType,
|
||||||
|
t.taskState,
|
||||||
|
t.finishTime,
|
||||||
|
t.taskParentId,
|
||||||
|
t.variable taskVariable,
|
||||||
|
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||||
|
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||||
|
FROM
|
||||||
|
wf_process_task t
|
||||||
|
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||||
|
LEFT JOIN sys_club_refresh info ON info.id = ins.businessNo
|
||||||
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
|
LEFT JOIN sys_club club ON info.clubId = club.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("info.userId", "=", SecurityUtil.getUserId());
|
||||||
|
cnd.andEX("year(info.creatTime)", "=", pageForm.getYear());
|
||||||
|
|
||||||
|
cnd.and("t.taskName", "=", "d4323546-8d09-419e-88d4-7b15862ca29d");
|
||||||
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
|
if (approval) {
|
||||||
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
|
} else {
|
||||||
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getClubName())) {
|
||||||
|
cnd.and("club.clubName", "LIKE", "%" + pageForm.getClubName() + "%");
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("info.creatTime");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
|
||||||
|
cnd.groupBy("t.id");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
|
||||||
|
Pagination pagination = clubInfoManageService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
return Result.success(pagination);
|
return Result.success(pagination);
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
@SaCheckPermission("club.infoManage.schoolAuditReport")
|
|
||||||
@SLog(type = "schoolAuditRule", tag = "校工会审核换届报告", msg = "校工会审核换届报告")
|
|
||||||
public Object auditDo(@Valid String id, @Valid Boolean pass) {
|
|
||||||
|
|
||||||
SysClub sysClub = sysClubService.fetch(id);
|
|
||||||
if (pass) {
|
|
||||||
sysClubService.update(Chain.make("replaceReport", sysClub.getReplaceReport())
|
|
||||||
.add("reportState", 3), Cnd.where("id", "=", id));
|
|
||||||
//文件留痕
|
|
||||||
SysClubFiles clubFiles = new SysClubFiles();
|
|
||||||
clubFiles.setUserId(SecurityUtil.getUserId());
|
|
||||||
clubFiles.setUserName(SecurityUtil.getUserUsername());
|
|
||||||
clubFiles.setClubId(sysClub.getId());
|
|
||||||
clubFiles.setBTime(cn.hutool.core.date.DateUtil.now());
|
|
||||||
clubFiles.setFileType(2);
|
|
||||||
clubFiles.setFiles(sysClub.getReplaceReport());
|
|
||||||
sysClubService.dao().insert(clubFiles);
|
|
||||||
} else {
|
|
||||||
sysClubService.update(Chain.make("reportState", 2), Cnd.where("id", "=", id));
|
|
||||||
}
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+65
-39
@@ -1,25 +1,25 @@
|
|||||||
package com.budwk.app.zhgh.club.controller.infoManage;
|
package com.budwk.app.zhgh.club.controller.infoManage;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import com.budwk.app.base.annotation.SLog;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.result.Result;
|
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.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.zhgh.club.model.SysClub;
|
|
||||||
import com.budwk.app.zhgh.club.model.SysClubFiles;
|
|
||||||
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubInfoManageService;
|
import com.budwk.app.zhgh.club.service.SysClubInfoManageService;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubService;
|
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
|
||||||
import org.nutz.dao.Chain;
|
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: JyuHsin
|
* @Author: JyuHsin
|
||||||
@@ -35,44 +35,70 @@ public class ClubSchoolAuditRuleController {
|
|||||||
@Inject
|
@Inject
|
||||||
private SysClubInfoManageService clubInfoManageService;
|
private SysClubInfoManageService clubInfoManageService;
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysClubService sysClubService;
|
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/club/infoManage/schoolAuditRule/index.html")
|
@Ok("beetl:/platform/zhgh/club/infoManage/schoolAuditRule/index.html")
|
||||||
@SaCheckPermission("club.infoManage.schoolAuditRule")
|
@SaCheckPermission("club.infoManage.schoolAuditRule")
|
||||||
public void index() {
|
public void index() {}
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.infoManage.schoolAuditRule")
|
@SaCheckPermission("club.infoManage.schoolAuditRule")
|
||||||
public Result pageData(@Valid ClubUserPageForm pageForm) {
|
public Result pageData(@Valid ClubUserPageForm pageForm,
|
||||||
Pagination pagination = clubInfoManageService.schoolAuditRulePageData(pageForm);
|
@Param(value = "approval") Boolean approval) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*,
|
||||||
|
club.clubName,
|
||||||
|
ins.id AS instanceId,
|
||||||
|
ins.businessNo,
|
||||||
|
ins.state instanceState,
|
||||||
|
ins.variable instanceVariale,
|
||||||
|
ins.processDefineId instanceProcessDefineId,
|
||||||
|
t.id taskId,
|
||||||
|
t.taskName AS taskKey,
|
||||||
|
t.displayName taskName,
|
||||||
|
t.taskType,
|
||||||
|
t.performType taskPerformType,
|
||||||
|
t.taskState,
|
||||||
|
t.finishTime,
|
||||||
|
t.taskParentId,
|
||||||
|
t.variable taskVariable,
|
||||||
|
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||||
|
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||||
|
FROM
|
||||||
|
wf_process_task t
|
||||||
|
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||||
|
LEFT JOIN sys_club_rule info ON info.id = ins.businessNo
|
||||||
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
|
LEFT JOIN sys_club club ON info.clubId = club.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("info.userId", "=", SecurityUtil.getUserId());
|
||||||
|
cnd.andEX("year(info.creatTime)", "=", pageForm.getYear());
|
||||||
|
|
||||||
|
cnd.and("t.taskName", "=", "4a1f0656-7390-45d1-8018-ea0aff38450b");
|
||||||
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
|
if (approval) {
|
||||||
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
|
} else {
|
||||||
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getClubName())) {
|
||||||
|
cnd.and("club.clubName", "LIKE", "%" + pageForm.getClubName() + "%");
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("info.creatTime");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
|
||||||
|
cnd.groupBy("t.id");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
|
||||||
|
Pagination pagination = clubInfoManageService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
return Result.success(pagination);
|
return Result.success(pagination);
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
@SaCheckPermission("club.infoManage.schoolAuditRule")
|
|
||||||
@SLog(type = "schoolAuditRule", tag = "校工会审核章程备案", msg = "校工会审核章程备案")
|
|
||||||
public Object auditDo(@Valid String id, @Valid Boolean pass) {
|
|
||||||
|
|
||||||
SysClub sysClub = sysClubService.fetch(id);
|
|
||||||
if (pass) {
|
|
||||||
sysClubService.update(Chain.make("rulesFile", sysClub.getAfterRulesFile())
|
|
||||||
.add("ruleState", 3), Cnd.where("id", "=", id));
|
|
||||||
//文件留痕
|
|
||||||
SysClubFiles clubFiles = new SysClubFiles();
|
|
||||||
clubFiles.setUserId(SecurityUtil.getUserId());
|
|
||||||
clubFiles.setUserName(SecurityUtil.getUserUsername());
|
|
||||||
clubFiles.setClubId(sysClub.getId());
|
|
||||||
clubFiles.setBTime(cn.hutool.core.date.DateUtil.now());
|
|
||||||
clubFiles.setFileType(1);
|
|
||||||
clubFiles.setFiles(sysClub.getAfterRulesFile());
|
|
||||||
sysClubService.dao().insert(clubFiles);
|
|
||||||
} else {
|
|
||||||
sysClubService.update(Chain.make("ruleState", 2), Cnd.where("id", "=", id));
|
|
||||||
}
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+29
-3
@@ -12,12 +12,15 @@ import com.budwk.app.flow.engine.FlowEngine;
|
|||||||
import com.budwk.app.flow.entity.ProcessInstance;
|
import com.budwk.app.flow.entity.ProcessInstance;
|
||||||
import com.budwk.app.flow.entity.ProcessTask;
|
import com.budwk.app.flow.entity.ProcessTask;
|
||||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||||
|
import com.budwk.app.flow.service.FlowCommonService;
|
||||||
import com.budwk.app.sys.services.SysUserService;
|
import com.budwk.app.sys.services.SysUserService;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||||
import com.budwk.app.zhgh.club.model.SysClub;
|
import com.budwk.app.zhgh.club.model.SysClub;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubService;
|
import com.budwk.app.zhgh.club.service.SysClubService;
|
||||||
import com.budwk.app.zhgh.club.vo.ClubRegisterVo;
|
import com.budwk.app.zhgh.club.vo.ClubRegisterVo;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
@@ -50,6 +53,8 @@ public class ClubRegistApplyController {
|
|||||||
private SysClubService sysClubService;
|
private SysClubService sysClubService;
|
||||||
@Inject
|
@Inject
|
||||||
private FlowEngine flowEngine;
|
private FlowEngine flowEngine;
|
||||||
|
@Inject
|
||||||
|
private FlowCommonService flowCommonService;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/club/register/apply/index.html")
|
@Ok("beetl:/platform/zhgh/club/register/apply/index.html")
|
||||||
@@ -61,7 +66,7 @@ public class ClubRegistApplyController {
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("club.register.apply")
|
@SaCheckPermission("club.register.apply")
|
||||||
@SLog(type = "registerApply", tag = "保存注册协会", msg = "保存注册协会")
|
@SLog(type = "registerApply", tag = "保存注册协会", msg = "保存注册协会")
|
||||||
public Result doSave(@Param("club") SysClub club,
|
public Result save(@Param("club") SysClub club,
|
||||||
@Param("::deleteIds") List<String> deleteIds,
|
@Param("::deleteIds") List<String> deleteIds,
|
||||||
@Param("::managePerson") List<NutMap> managePerson) {
|
@Param("::managePerson") List<NutMap> managePerson) {
|
||||||
// 如果用户是保存,则只操作业务表
|
// 如果用户是保存,则只操作业务表
|
||||||
@@ -77,7 +82,7 @@ public class ClubRegistApplyController {
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("club.register.apply")
|
@SaCheckPermission("club.register.apply")
|
||||||
@SLog(type = "registerApply", tag = "提交注册协会", msg = "提交注册协会")
|
@SLog(type = "registerApply", tag = "提交注册协会", msg = "提交注册协会")
|
||||||
public Result doSubmit(@Param("club") SysClub club,
|
public Result submit(@Param("club") SysClub club,
|
||||||
@Param("::deleteIds") List<String> deleteIds,
|
@Param("::deleteIds") List<String> deleteIds,
|
||||||
@Param("::managePerson") List<NutMap> managePerson) {
|
@Param("::managePerson") List<NutMap> managePerson) {
|
||||||
SysClub sysClub;
|
SysClub sysClub;
|
||||||
@@ -101,6 +106,27 @@ public class ClubRegistApplyController {
|
|||||||
return Result.success(sysClub);
|
return Result.success(sysClub);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("重新提交申请")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("club.register.apply")
|
||||||
|
public Result submitAgain(@Param("club") SysClub club,
|
||||||
|
@Param("::deleteIds") List<String> deleteIds,
|
||||||
|
@Param("::managePerson") List<NutMap> managePerson,
|
||||||
|
@Param("taskId") Long taskId) {
|
||||||
|
if (StrUtil.isBlank(club.getId())) {
|
||||||
|
sysClubService.doAdd(club, managePerson);
|
||||||
|
} else {
|
||||||
|
sysClubService.doEdit(club, deleteIds, managePerson);
|
||||||
|
}
|
||||||
|
|
||||||
|
Dict dict = Dict.create();
|
||||||
|
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||||
|
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||||
|
flowCommonService.executeTask(dict);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.register.apply")
|
@SaCheckPermission("club.register.apply")
|
||||||
public Result getUserByKeyWord(@Valid String keyWord) {
|
public Result getUserByKeyWord(@Valid String keyWord) {
|
||||||
@@ -156,7 +182,7 @@ public class ClubRegistApplyController {
|
|||||||
@At
|
@At
|
||||||
@SaCheckPermission("club")
|
@SaCheckPermission("club")
|
||||||
public Result createCode() {
|
public Result createCode() {
|
||||||
int count = sysClubService.count(Cnd.where("createTime", "=", DateUtil.thisYear()));
|
int count = sysClubService.count(Cnd.where("year(createTime)", "=", DateUtil.thisYear()));
|
||||||
String s = String.format("%02d", count + 1);
|
String s = String.format("%02d", count + 1);
|
||||||
return Result.success().addData(Convert.toStr(DateUtil.thisYear()) + s);
|
return Result.success().addData(Convert.toStr(DateUtil.thisYear()) + s);
|
||||||
}
|
}
|
||||||
|
|||||||
+36
-12
@@ -28,6 +28,7 @@ import com.budwk.app.zhgh.club.model.SysClub;
|
|||||||
import com.budwk.app.zhgh.club.model.SysClubEvaluate;
|
import com.budwk.app.zhgh.club.model.SysClubEvaluate;
|
||||||
import com.budwk.app.zhgh.club.model.SysClubExamineRegister;
|
import com.budwk.app.zhgh.club.model.SysClubExamineRegister;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubService;
|
import com.budwk.app.zhgh.club.service.SysClubService;
|
||||||
|
import com.budwk.app.zhgh.club.service.impl.SysClubUserServiceImpl;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
@@ -36,6 +37,7 @@ import org.nutz.dao.sql.Sql;
|
|||||||
import org.nutz.http.Http;
|
import org.nutz.http.Http;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.json.Json;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
@@ -116,24 +118,35 @@ public class ClubStatisticsController {
|
|||||||
u.mobile,
|
u.mobile,
|
||||||
u.unitname as unitName,
|
u.unitname as unitName,
|
||||||
u.userState,
|
u.userState,
|
||||||
c.roleCode,
|
c.*
|
||||||
r.name AS roleName
|
|
||||||
FROM
|
FROM
|
||||||
club_user c
|
club_user c
|
||||||
LEFT JOIN `vw_user` u ON u.id = c.userId
|
LEFT JOIN `vw_user` u ON u.id = c.userId
|
||||||
LEFT JOIN sys_role r on r.code = c.roleCode
|
|
||||||
$condition
|
$condition
|
||||||
ORDER BY FIELD( c.roleCode, 'CLUB_PRESIDENT', 'CLUB_VICE_PRESIDENT', 'CLUB_SECRETARY', 'CLUB_VICE_SECRETARY', 'CLUB_OPERATOR', 'CLUB_MEMBER' )
|
ORDER BY
|
||||||
|
CASE
|
||||||
|
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_PRESIDENT"') THEN 1
|
||||||
|
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
|
||||||
|
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_SECRETARY"') THEN 3
|
||||||
|
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||||
|
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_MEMBER"') THEN 5
|
||||||
|
ELSE 99
|
||||||
|
END
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("c.clubId", "=", clubId);
|
cnd.and("c.clubId", "=", clubId);
|
||||||
cnd.andEX("u.userState", "=", userState);
|
cnd.andEX("u.userState", "=", userState);
|
||||||
cnd.andEX("u.sex", "=", sex);
|
cnd.andEX("u.sex", "=", sex);
|
||||||
// cnd.andEX("c.giveMoney", "=", giveMoney);
|
|
||||||
// cnd.andEX("c.isNormal", "=", true);
|
|
||||||
// cnd.andEX("c.status", "=", 5);
|
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
Pagination pagination = sysClubService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
Pagination pagination = sysClubService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
List<NutMap> listMap = pagination.getList(NutMap.class);
|
||||||
|
for (NutMap nutMap : listMap) {
|
||||||
|
List<String> list = Json.fromJsonAsList(String.class, nutMap.getString("roleCode"));
|
||||||
|
String roleName = SysClubUserServiceImpl.convertRoleName(list);
|
||||||
|
nutMap.put("roleName", roleName);
|
||||||
|
nutMap.put("roleCode", list);
|
||||||
|
}
|
||||||
|
pagination.setList(listMap);
|
||||||
return Result.success(pagination);
|
return Result.success(pagination);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,14 +168,20 @@ public class ClubStatisticsController {
|
|||||||
u.mobile,
|
u.mobile,
|
||||||
u.unitname as unitName,
|
u.unitname as unitName,
|
||||||
u.userstate as userState,
|
u.userstate as userState,
|
||||||
r.name AS roleName,
|
c.*
|
||||||
c.clubId
|
|
||||||
FROM
|
FROM
|
||||||
club_user c
|
club_user c
|
||||||
LEFT JOIN `vw_user` u ON u.id = c.userId
|
LEFT JOIN `vw_user` u ON u.id = c.userId
|
||||||
LEFT JOIN sys_role r on r.code = c.roleCode
|
|
||||||
$condition
|
$condition
|
||||||
ORDER BY FIELD( c.roleCode, 'CLUB_PRESIDENT', 'CLUB_VICE_PRESIDENT', 'CLUB_SECRETARY', 'CLUB_VICE_SECRETARY', 'CLUB_OPERATOR', 'CLUB_MEMBER' )
|
ORDER BY
|
||||||
|
CASE
|
||||||
|
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_PRESIDENT"') THEN 1
|
||||||
|
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
|
||||||
|
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_SECRETARY"') THEN 3
|
||||||
|
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||||
|
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_MEMBER"') THEN 5
|
||||||
|
ELSE 99
|
||||||
|
END
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
|
||||||
@@ -176,6 +195,12 @@ public class ClubStatisticsController {
|
|||||||
cnd.andEX("u.sex", "=", sex);
|
cnd.andEX("u.sex", "=", sex);
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
List<NutMap> listMap = sysClubService.listMap(sql);
|
List<NutMap> listMap = sysClubService.listMap(sql);
|
||||||
|
for (NutMap nutMap : listMap) {
|
||||||
|
List<String> list = Json.fromJsonAsList(String.class, nutMap.getString("roleCode"));
|
||||||
|
String roleName = SysClubUserServiceImpl.convertRoleName(list);
|
||||||
|
nutMap.put("roleName", roleName);
|
||||||
|
nutMap.put("roleCode", list);
|
||||||
|
}
|
||||||
//获取所有社团
|
//获取所有社团
|
||||||
Cnd stCnd = Cnd.NEW();
|
Cnd stCnd = Cnd.NEW();
|
||||||
stCnd.andEX("id", "=", clubId);
|
stCnd.andEX("id", "=", clubId);
|
||||||
@@ -254,7 +279,6 @@ public class ClubStatisticsController {
|
|||||||
file.addAll(Optional.ofNullable(item.getRulesFile()).orElseGet(ArrayList::new));
|
file.addAll(Optional.ofNullable(item.getRulesFile()).orElseGet(ArrayList::new));
|
||||||
file.addAll(Optional.ofNullable(item.getManageFile()).orElseGet(ArrayList::new));
|
file.addAll(Optional.ofNullable(item.getManageFile()).orElseGet(ArrayList::new));
|
||||||
file.addAll(Optional.ofNullable(item.getYearPlanFile()).orElseGet(ArrayList::new));
|
file.addAll(Optional.ofNullable(item.getYearPlanFile()).orElseGet(ArrayList::new));
|
||||||
file.addAll(Optional.ofNullable(item.getSchoolReplyFile()).orElseGet(ArrayList::new));
|
|
||||||
file.addAll(Optional.ofNullable(item.getReplaceReport()).orElseGet(ArrayList::new));
|
file.addAll(Optional.ofNullable(item.getReplaceReport()).orElseGet(ArrayList::new));
|
||||||
file.addAll(Optional.ofNullable(item.getRulesFile()).orElseGet(ArrayList::new));
|
file.addAll(Optional.ofNullable(item.getRulesFile()).orElseGet(ArrayList::new));
|
||||||
fileList.put(item.getId(), file);
|
fileList.put(item.getId(), file);
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.budwk.app.zhgh.club.interceptor;
|
||||||
|
|
||||||
|
import com.budwk.app.flow.constant.FlowConst;
|
||||||
|
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_role;
|
||||||
|
import com.budwk.app.sys.models.Sys_user_role;
|
||||||
|
import com.budwk.app.sys.services.SysRoleService;
|
||||||
|
import com.budwk.app.sys.services.SysUserService;
|
||||||
|
import com.budwk.app.zhgh.club.model.ClubUser;
|
||||||
|
import com.budwk.app.zhgh.club.model.SysClubManager;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.json.Json;
|
||||||
|
import org.nutz.trans.Trans;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName ClubChangeManagerInterceptor
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/26 19:15
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public class ClubChangeManagerInterceptor implements FlowInterceptor {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void intercept(Execution execution) {
|
||||||
|
String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA);
|
||||||
|
SysClubManager clubManager = Json.fromJson(SysClubManager.class, formDataStr);
|
||||||
|
|
||||||
|
Dao dao = ServiceContext.find(Dao.class);
|
||||||
|
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
|
||||||
|
SysUserService sysUserService = ServiceContext.find(SysUserService.class);
|
||||||
|
// 审核通过,变更理事机构和角色
|
||||||
|
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where(ClubUser::getClubId, "=", clubManager.getClubId()).and(ClubUser::getUserId, "=", clubManager.getChangeUserId()));
|
||||||
|
clubUser.setRoleCode(clubManager.getNowRoleCode());
|
||||||
|
// 先清除所有的角色
|
||||||
|
dao.clear(Sys_user_role.class, Cnd.where("userId", "=", clubUser.getUserId()).and("clubId", "=", clubUser.getClubId()));
|
||||||
|
// 设置角色
|
||||||
|
List<Sys_user_role> roles = new ArrayList<>();
|
||||||
|
for (String s : clubManager.getNowRoleCode()) {
|
||||||
|
Sys_user_role ur = new Sys_user_role();
|
||||||
|
ur.setUserId(clubUser.getUserId());
|
||||||
|
ur.setClubId(clubUser.getClubId());
|
||||||
|
Sys_role sRole = sysRoleService.getByCode(s);
|
||||||
|
ur.setRoleId(sRole.getId());
|
||||||
|
roles.add(ur);
|
||||||
|
}
|
||||||
|
|
||||||
|
dao.update(clubUser);
|
||||||
|
dao.insert(roles);
|
||||||
|
|
||||||
|
sysUserService.clearCache();
|
||||||
|
sysRoleService.clearCache();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.budwk.app.zhgh.club.interceptor;
|
||||||
|
|
||||||
|
import com.budwk.app.flow.constant.FlowConst;
|
||||||
|
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.zhgh.club.model.SysClub;
|
||||||
|
import com.budwk.app.zhgh.club.model.SysClubRefresh;
|
||||||
|
import com.budwk.app.zhgh.club.model.SysClubRule;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.json.Json;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName ClubRuleUpdateInterceptor
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/26 11:11
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public class ClubRefreshUpdateInterceptor implements FlowInterceptor {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void intercept(Execution execution) {
|
||||||
|
String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA);
|
||||||
|
SysClubRefresh clubRefresh = Json.fromJson(SysClubRefresh.class, formDataStr);
|
||||||
|
|
||||||
|
Dao dao = ServiceContext.find(Dao.class);
|
||||||
|
// 审核通过,将新的附件更新到协会表
|
||||||
|
SysClub club = dao.fetch(SysClub.class, clubRefresh.getClubId());
|
||||||
|
club.setReplaceReport(clubRefresh.getFiles());
|
||||||
|
dao.update(club);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,6 +15,7 @@ import org.nutz.dao.Cnd;
|
|||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.json.Json;
|
import org.nutz.json.Json;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,17 +40,19 @@ public class ClubRegisterInterceptor implements FlowInterceptor {
|
|||||||
// 审核通过,就给角色,找理事机构
|
// 审核通过,就给角色,找理事机构
|
||||||
List<ClubUser> clubUsers = dao.query(
|
List<ClubUser> clubUsers = dao.query(
|
||||||
ClubUser.class,
|
ClubUser.class,
|
||||||
Cnd.where("roleCode", "!=", RoleConstant.CLUB_MEMBER.name())
|
Cnd.where("clubId", "=", club.getId())
|
||||||
.and("clubId", "=", club.getId())
|
|
||||||
);
|
);
|
||||||
List<Sys_user_role> list = clubUsers.stream().map(o -> {
|
List<Sys_user_role> list = new ArrayList<>();
|
||||||
|
for (ClubUser clubUser : clubUsers) {
|
||||||
|
for (String role : clubUser.getRoleCode()) {
|
||||||
Sys_user_role userRole = new Sys_user_role();
|
Sys_user_role userRole = new Sys_user_role();
|
||||||
Sys_role sysRole = sysRoleService.getByCode(o.getRoleCode());
|
Sys_role sysRole = sysRoleService.getByCode(role);
|
||||||
userRole.setRoleId(sysRole.getId());
|
userRole.setRoleId(sysRole.getId());
|
||||||
userRole.setUserId(o.getUserId());
|
userRole.setUserId(clubUser.getUserId());
|
||||||
userRole.setClubId(club.getId());
|
userRole.setClubId(club.getId());
|
||||||
return userRole;
|
list.add(userRole);
|
||||||
}).toList();
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dao.insert(list);
|
dao.insert(list);
|
||||||
sysUserService.clearCache();
|
sysUserService.clearCache();
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.budwk.app.zhgh.club.interceptor;
|
||||||
|
|
||||||
|
import com.budwk.app.flow.constant.FlowConst;
|
||||||
|
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.zhgh.club.model.SysClub;
|
||||||
|
import com.budwk.app.zhgh.club.model.SysClubRule;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.json.Json;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName ClubRuleUpdateInterceptor
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/26 11:11
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public class ClubRuleUpdateInterceptor implements FlowInterceptor {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void intercept(Execution execution) {
|
||||||
|
String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA);
|
||||||
|
SysClubRule clubRule = Json.fromJson(SysClubRule.class, formDataStr);
|
||||||
|
|
||||||
|
Dao dao = ServiceContext.find(Dao.class);
|
||||||
|
// 审核通过,将新的附件更新到协会表
|
||||||
|
SysClub club = dao.fetch(SysClub.class, clubRule.getClubId());
|
||||||
|
club.setRulesFile(clubRule.getFiles());
|
||||||
|
dao.update(club);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,9 @@ import lombok.EqualsAndHashCode;
|
|||||||
import org.nutz.dao.entity.annotation.*;
|
import org.nutz.dao.entity.annotation.*;
|
||||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Table("club_user")
|
@Table("club_user")
|
||||||
@@ -32,7 +35,7 @@ public class ClubUser extends BaseModel {
|
|||||||
@Column
|
@Column
|
||||||
@Comment("身份")
|
@Comment("身份")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
private String roleCode;
|
private List<String> roleCode = new ArrayList<>();
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("协会职务")
|
@Comment("协会职务")
|
||||||
@@ -59,4 +62,5 @@ public class ClubUser extends BaseModel {
|
|||||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||||
private String awardsExperience;
|
private String awardsExperience;
|
||||||
|
|
||||||
|
private String userName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,11 +109,6 @@ public class SysClub extends BaseModel {
|
|||||||
@ColDefine(type = ColType.MYSQL_JSON)
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
private List<JSONObject> rulesFile;
|
private List<JSONObject> rulesFile;
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("后面修订的章程")
|
|
||||||
@ColDefine(type = ColType.MYSQL_JSON)
|
|
||||||
private List<JSONObject> afterRulesFile;
|
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("经费来源及管理办法")
|
@Comment("经费来源及管理办法")
|
||||||
@ColDefine(type = ColType.MYSQL_JSON)
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
@@ -124,16 +119,6 @@ public class SysClub extends BaseModel {
|
|||||||
@ColDefine(type = ColType.MYSQL_JSON)
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
private List<JSONObject> yearPlanFile;
|
private List<JSONObject> yearPlanFile;
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("校工会批复文件")
|
|
||||||
@ColDefine(type = ColType.MYSQL_JSON)
|
|
||||||
private List<JSONObject> schoolReplyFile;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("状态")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
|
||||||
private Integer state;
|
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("申请人")
|
@Comment("申请人")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
@@ -156,14 +141,4 @@ public class SysClub extends BaseModel {
|
|||||||
@Comment("换届报告")
|
@Comment("换届报告")
|
||||||
@ColDefine(type = ColType.MYSQL_JSON)
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
private List<JSONObject> replaceReport;
|
private List<JSONObject> replaceReport;
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("修改章程状态(1.待校工会审核 2.校工会审核拒绝 3.审核通过)")
|
|
||||||
@ColDefine(type = ColType.INT, width = 10)
|
|
||||||
private Integer ruleState;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("换届报告状态(1.待校工会审核 2.校工会审核拒绝 3.审核通过)")
|
|
||||||
@ColDefine(type = ColType.INT, width = 10)
|
|
||||||
private Integer reportState;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,61 +0,0 @@
|
|||||||
package com.budwk.app.zhgh.club.model;
|
|
||||||
|
|
||||||
import cn.hutool.json.JSONObject;
|
|
||||||
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.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: JyuHsin
|
|
||||||
* @Date: 2024/8/8 10:54
|
|
||||||
* @Version: v1.0.0
|
|
||||||
* @Description: TODO
|
|
||||||
**/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Table("sys_club_files")
|
|
||||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
|
||||||
@Comment("协会相关文件")
|
|
||||||
public class SysClubFiles extends BaseModel {
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@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 userId;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("用户姓名")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
private String userName;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("社团id")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
private String clubId;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("备份时间")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
private String bTime;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("文件类型,1是换届报告,2是章程")
|
|
||||||
@ColDefine(type = ColType.INT)
|
|
||||||
private Integer fileType;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("文件")
|
|
||||||
@ColDefine(type = ColType.MYSQL_JSON)
|
|
||||||
private List<JSONObject> files;
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.budwk.app.zhgh.club.model;
|
||||||
|
|
||||||
|
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.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SysClubManager
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/26 19:09
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("sys_club_manager")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("协会理事机构")
|
||||||
|
public class SysClubManager extends BaseModel {
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@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 userId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("用户姓名")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("变更人id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String changeUserId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("变更人姓名")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String changeUserName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("社团id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String clubId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("提交时间")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String creatTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("旧身份")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<String> oldRoleCode;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("变更的身份")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<String> nowRoleCode;
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.budwk.app.zhgh.club.model;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
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.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SysClubRefresh
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/26 14:36
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("sys_club_refresh")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("协会换届报告")
|
||||||
|
public class SysClubRefresh extends BaseModel {
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@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 userId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("用户姓名")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("社团id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String clubId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("提交时间")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String creatTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("上一次的文件")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<JSONObject> lastFiles;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("文件")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<JSONObject> files;
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.budwk.app.zhgh.club.model;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
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.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SysClubRule
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/26 10:35
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("sys_club_rule")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("协会章程修订")
|
||||||
|
public class SysClubRule extends BaseModel {
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@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 userId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("用户姓名")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("社团id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String clubId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("提交时间")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String creatTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("上一次的文件")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<JSONObject> lastFiles;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("文件")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<JSONObject> files;
|
||||||
|
}
|
||||||
@@ -1,139 +0,0 @@
|
|||||||
package com.budwk.app.zhgh.club.model;
|
|
||||||
|
|
||||||
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 org.nutz.lang.util.NutMap;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: JyuHsin
|
|
||||||
* @Date: 2024/8/7 10:17
|
|
||||||
* @Version: v1.0.0
|
|
||||||
* @Description: TODO
|
|
||||||
**/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Table("sys_club_user")
|
|
||||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
|
||||||
@Comment("协会成员")
|
|
||||||
public class SysClubUser extends BaseModel {
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Name
|
|
||||||
@Comment("id")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
@PrevInsert(uu32 = true)
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("协会id")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
@NotEmpty(message = "协会不能为空")
|
|
||||||
private String clubId;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("用户id")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
@NotEmpty(message = "用户不能为空")
|
|
||||||
private String userId;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("入社时间")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
|
||||||
private String joinTime;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("身份")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
|
||||||
private String roleCode;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("是否缴费")
|
|
||||||
@ColDefine(type = ColType.BOOLEAN)
|
|
||||||
private Boolean payed;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("是否拨付")
|
|
||||||
@ColDefine(type = ColType.BOOLEAN)
|
|
||||||
private Boolean giveMoney;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("状态(1 待协会审核 2 协会审核不通过 3 待校工会审核 4 校工会审核不通过 5 通过)")
|
|
||||||
@ColDefine(type = ColType.INT, width = 4)
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("退会状态(1 待协会审核 2 协会审核不通过 3 待校工会审核 4 校工会审核不通过 5 通过)")
|
|
||||||
@ColDefine(type = ColType.INT, width = 4)
|
|
||||||
private Integer exitStatus;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("理事机构成员变更时的审核状态(1 待校工会审核 2 校工会审核拒绝 3 审核成功)")
|
|
||||||
@ColDefine(type = ColType.INT, width = 4)
|
|
||||||
private Integer state;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("变更之后的身份")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
|
||||||
private String changeRoleCode;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("变更时间")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
|
||||||
private String roleCodeChangeTime;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@ColDefine(type = ColType.MYSQL_JSON)
|
|
||||||
@Comment("审核记录")
|
|
||||||
private List<NutMap> auditList;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@ColDefine(type = ColType.MYSQL_JSON)
|
|
||||||
@Comment("退出审核记录")
|
|
||||||
private List<NutMap> exitAuditList;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("是否正常,此字段相当于一个标识,删除或者退休,设置为false,不会真正的从数据库删除,目的是为了后面统计年度成员情况")
|
|
||||||
@ColDefine(type = ColType.BOOLEAN)
|
|
||||||
private Boolean isNormal;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("isNormal变化的时间")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
|
||||||
private String changeTime;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("职务")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
|
||||||
private String position;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("加入、退出")
|
|
||||||
@ColDefine(type = ColType.BOOLEAN)
|
|
||||||
private Boolean mode;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("邮箱")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
|
||||||
private String email;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("头像")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
|
||||||
private String avatar;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("同时参加其他协会情况")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
|
||||||
private String sameTimeJoinOtherClubSituation;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("文化、体育方面的活动经历、获奖情况")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
|
||||||
private String awardsExperience;
|
|
||||||
}
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
package com.budwk.app.zhgh.club.model;
|
|
||||||
|
|
||||||
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 javax.validation.constraints.NotEmpty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: JyuHsin
|
|
||||||
* @Date: 2024/7/5 16:52
|
|
||||||
* @Version: v1.0.0
|
|
||||||
* @Description: TODO
|
|
||||||
**/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Table("sys_club_user_back_history")
|
|
||||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
|
||||||
@Comment("协会成员备份表")
|
|
||||||
public class SysClubUserBackHistory extends BaseModel {
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Name
|
|
||||||
@Comment("id")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
@PrevInsert(uu32 = true)
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("用户")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
@NotEmpty(message = "用户不能为空")
|
|
||||||
private String userId;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("协会id")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
@NotEmpty(message = "协会不能为空")
|
|
||||||
private String clubId;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("备份时间")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
private String bTime;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("身份")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 60)
|
|
||||||
@NotEmpty(message = "身份不能为空")
|
|
||||||
private String roleCode;
|
|
||||||
}
|
|
||||||
@@ -23,12 +23,6 @@ public interface SysClubInfoManageService extends BaseService<ClubCommonPageVo>
|
|||||||
|
|
||||||
Pagination<ClubUserCommonPageVo> infoManageUserPageData(@Valid ClubUserPageForm pageForm);
|
Pagination<ClubUserCommonPageVo> infoManageUserPageData(@Valid ClubUserPageForm pageForm);
|
||||||
|
|
||||||
Pagination<ClubCommonPageVo> reportPageData(@Valid ClubUserPageForm pageForm);
|
|
||||||
|
|
||||||
Pagination<ClubCommonPageVo> schoolAuditRulePageData(@Valid ClubUserPageForm pageForm);
|
|
||||||
|
|
||||||
Pagination<ClubCommonPageVo> schoolAuditReportPageData(@Valid ClubUserPageForm pageForm);
|
|
||||||
|
|
||||||
Pagination<ClubUserCommonPageVo> clubManagePersonAuditPageData(@Valid ClubUserPageForm pageForm);
|
Pagination<ClubUserCommonPageVo> clubManagePersonAuditPageData(@Valid ClubUserPageForm pageForm);
|
||||||
|
|
||||||
List<NutMap> getClubTreeData();
|
List<NutMap> getClubTreeData();
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
package com.budwk.app.zhgh.club.service;
|
package com.budwk.app.zhgh.club.service;
|
||||||
|
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.param.PageForm;
|
|
||||||
import com.budwk.app.base.service.BaseService;
|
import com.budwk.app.base.service.BaseService;
|
||||||
import com.budwk.app.zhgh.club.model.SysClubUser;
|
import com.budwk.app.zhgh.club.model.ClubUser;
|
||||||
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
||||||
import org.nutz.dao.Cnd;
|
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@@ -17,26 +15,11 @@ import java.util.List;
|
|||||||
* @Version: v1.0.0
|
* @Version: v1.0.0
|
||||||
* @Description: TODO
|
* @Description: TODO
|
||||||
**/
|
**/
|
||||||
public interface SysClubUserService extends BaseService<SysClubUser> {
|
public interface SysClubUserService extends BaseService<ClubUser> {
|
||||||
|
|
||||||
List<NutMap> getClubUser(@Valid String clubId);
|
List<NutMap> getClubUser(@Valid String clubId);
|
||||||
|
|
||||||
Pagination pageDataByApplyJoinClubAudit(@Valid ClubUserPageForm pageForm);
|
Pagination pageDataByApplyJoinClubAudit(@Valid ClubUserPageForm pageForm);
|
||||||
|
|
||||||
/**
|
|
||||||
* 入会申请审核
|
|
||||||
* @param ids clubUser表中主键id
|
|
||||||
* @param auditResult 审核结果,true or false
|
|
||||||
* @param auditType 审核类型,协会还是校工会,值为1 or 2
|
|
||||||
* @param applyType 申请类型,入会还是退会,值为1 or 2
|
|
||||||
* @param payed 是否缴费,true or false
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
void doAudit(@Valid String[] ids,
|
|
||||||
@Valid Boolean auditResult,
|
|
||||||
@Valid Integer auditType,
|
|
||||||
@Valid Integer applyType,
|
|
||||||
@Valid Boolean payed);
|
|
||||||
|
|
||||||
String getClubLeader(@Valid String clubId);
|
String getClubLeader(@Valid String clubId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,10 +72,8 @@ public class SysClubEvaluateServiceImpl extends BaseServiceImpl<SysClubEvaluate>
|
|||||||
|
|
||||||
cnd.andEX("info.clubId", "=", pageForm.getClubId());
|
cnd.andEX("info.clubId", "=", pageForm.getClubId());
|
||||||
cnd.andEX("year(info.applyTime)", "=", pageForm.getYear());
|
cnd.andEX("year(info.applyTime)", "=", pageForm.getYear());
|
||||||
|
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
|
|
||||||
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||||
}
|
|
||||||
cnd.groupBy("info.id");
|
cnd.groupBy("info.id");
|
||||||
cnd.desc("applyTime");
|
cnd.desc("applyTime");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
@@ -142,7 +140,7 @@ public class SysClubEvaluateServiceImpl extends BaseServiceImpl<SysClubEvaluate>
|
|||||||
cnd.andEX("year(ce.applyTime)", "=", pageForm.getYear());
|
cnd.andEX("year(ce.applyTime)", "=", pageForm.getYear());
|
||||||
|
|
||||||
if (pageForm.getAudit()) {
|
if (pageForm.getAudit()) {
|
||||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
} else {
|
} else {
|
||||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,17 +99,31 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
|
|||||||
u.username as userName,
|
u.username as userName,
|
||||||
u.loginname as loginName,
|
u.loginname as loginName,
|
||||||
u.unitname as unitName,
|
u.unitname as unitName,
|
||||||
u.mobile,
|
u.mobile
|
||||||
r.`name` AS roleName
|
|
||||||
FROM
|
FROM
|
||||||
club_user cl
|
club_user cl
|
||||||
LEFT JOIN `vw_user` u ON cl.userId = u.id
|
LEFT JOIN `vw_user` u ON cl.userId = u.id
|
||||||
LEFT JOIN sys_role r ON r.code = cl.roleCode
|
|
||||||
WHERE
|
WHERE
|
||||||
cl.clubId = @clubId
|
cl.clubId = @clubId
|
||||||
ORDER BY FIELD( cl.roleCode, 'CLUB_PRESIDENT', 'CLUB_VICE_PRESIDENT', 'CLUB_SECRETARY', 'CLUB_VICE_SECRETARY','CLUB_OPERATOR', 'CLUB_MEMBER' )
|
AND NOT JSON_CONTAINS(cl.roleCode, '"CLUB_MEMBER"')
|
||||||
""").setParam("clubId", clubId).setParam("roleCode", RoleConstant.CLUB_MEMBER.name());
|
ORDER BY
|
||||||
return listMap(sql);
|
CASE
|
||||||
|
WHEN JSON_CONTAINS(cl.roleCode, '"CLUB_PRESIDENT"') THEN 1
|
||||||
|
WHEN JSON_CONTAINS(cl.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
|
||||||
|
WHEN JSON_CONTAINS(cl.roleCode, '"CLUB_SECRETARY"') THEN 3
|
||||||
|
WHEN JSON_CONTAINS(cl.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||||
|
WHEN JSON_CONTAINS(cl.roleCode, '"CLUB_MEMBER"') THEN 5
|
||||||
|
ELSE 99
|
||||||
|
END
|
||||||
|
""").setParam("clubId", clubId);
|
||||||
|
List<NutMap> listMap = listMap(sql);
|
||||||
|
for (NutMap nutMap : listMap) {
|
||||||
|
List<String> list = Json.fromJsonAsList(String.class, nutMap.getString("roleCode"));
|
||||||
|
String roleName = SysClubUserServiceImpl.convertRoleName(list);
|
||||||
|
nutMap.put("roleName", roleName);
|
||||||
|
nutMap.put("roleCode", list);
|
||||||
|
}
|
||||||
|
return listMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -181,10 +195,8 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
|
|||||||
""");
|
""");
|
||||||
cnd.andEX("YEAR(info.registerDate)", "=", pageForm.getYear());
|
cnd.andEX("YEAR(info.registerDate)", "=", pageForm.getYear());
|
||||||
cnd.andEX("sc.id", "=", pageForm.getClubId());
|
cnd.andEX("sc.id", "=", pageForm.getClubId());
|
||||||
|
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
|
|
||||||
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||||
}
|
|
||||||
cnd.groupBy("info.id");
|
cnd.groupBy("info.id");
|
||||||
cnd.desc("registerDate");
|
cnd.desc("registerDate");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
@@ -270,7 +282,7 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
|
|||||||
cnd.andEX("YEAR(info.registerDate)", "=", pageForm.getYear());
|
cnd.andEX("YEAR(info.registerDate)", "=", pageForm.getYear());
|
||||||
|
|
||||||
if (pageForm.getAudit()) {
|
if (pageForm.getAudit()) {
|
||||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
} else {
|
} else {
|
||||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
}
|
}
|
||||||
|
|||||||
+53
-117
@@ -26,8 +26,10 @@ import org.nutz.dao.Cnd;
|
|||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.Static;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.json.Json;
|
||||||
import org.nutz.lang.Strings;
|
import org.nutz.lang.Strings;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
@@ -37,6 +39,7 @@ import java.io.IOException;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -80,9 +83,9 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
|||||||
secretaryUser.username AS clubSecretary
|
secretaryUser.username AS clubSecretary
|
||||||
FROM
|
FROM
|
||||||
sys_club c
|
sys_club c
|
||||||
LEFT JOIN club_user presidentCu on presidentCu.clubId = c.id AND presidentCu.roleCode = 'CLUB_PRESIDENT'
|
LEFT JOIN club_user presidentCu on presidentCu.clubId = c.id AND JSON_CONTAINS(presidentCu.roleCode, '"CLUB_PRESIDENT"')
|
||||||
LEFT JOIN sys_user presidentUser on presidentUser.id = presidentCu.userId
|
LEFT JOIN sys_user presidentUser on presidentUser.id = presidentCu.userId
|
||||||
LEFT JOIN club_user secretaryCu on secretaryCu.clubId = c.id AND secretaryCu.roleCode = 'CLUB_SECRETARY'
|
LEFT JOIN club_user secretaryCu on secretaryCu.clubId = c.id AND JSON_CONTAINS(secretaryCu.roleCode, '"CLUB_SECRETARY"')
|
||||||
LEFT JOIN sys_user secretaryUser on secretaryUser.id = secretaryCu.userId
|
LEFT JOIN sys_user secretaryUser on secretaryUser.id = secretaryCu.userId
|
||||||
LEFT JOIN sys_dict d ON d.CODE = c.clubType
|
LEFT JOIN sys_dict d ON d.CODE = c.clubType
|
||||||
LEFT JOIN wf_process_instance ins ON ins.businessNo = c.id
|
LEFT JOIN wf_process_instance ins ON ins.businessNo = c.id
|
||||||
@@ -120,14 +123,21 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
|||||||
u.unitid as unitId,
|
u.unitid as unitId,
|
||||||
u.mobile,
|
u.mobile,
|
||||||
club.clubName,
|
club.clubName,
|
||||||
u.unitname as unitName,
|
u.unitname as unitName
|
||||||
r.name as roleName
|
|
||||||
FROM
|
FROM
|
||||||
club_user scu
|
club_user scu
|
||||||
LEFT JOIN sys_club club ON scu.clubId = club.id
|
LEFT JOIN sys_club club ON scu.clubId = club.id
|
||||||
LEFT JOIN sys_role r on r.code = scu.roleCode
|
|
||||||
RIGHT JOIN `vw_user` u ON scu.userId = u.id
|
RIGHT JOIN `vw_user` u ON scu.userId = u.id
|
||||||
$condition
|
$condition
|
||||||
|
ORDER BY
|
||||||
|
CASE
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_PRESIDENT"') THEN 1
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MEMBER"') THEN 5
|
||||||
|
ELSE 99
|
||||||
|
END
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
|
|
||||||
@@ -148,89 +158,31 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
|||||||
|
|
||||||
//查询理事机构
|
//查询理事机构
|
||||||
if (pageForm.getRadioType() != null && 1 == pageForm.getRadioType()) {
|
if (pageForm.getRadioType() != null && 1 == pageForm.getRadioType()) {
|
||||||
cnd.and("scu.roleCode", "!=", RoleConstant.CLUB_MEMBER);
|
cnd.and(new Static("NOT JSON_CONTAINS(scu.roleCode, '\"CLUB_MEMBER\"')"));
|
||||||
}
|
}
|
||||||
//查询社团成员
|
//查询社团成员
|
||||||
if (pageForm.getRadioType() != null && 2 == pageForm.getRadioType()) {
|
if (pageForm.getRadioType() != null && 2 == pageForm.getRadioType()) {
|
||||||
cnd.and("scu.roleCode", "=", RoleConstant.CLUB_MEMBER);
|
cnd.and(new Static("JSON_CONTAINS(scu.roleCode, '\"CLUB_MEMBER\"')"));
|
||||||
|
cnd.and(new Static("JSON_LENGTH(scu.roleCode) = 1"));
|
||||||
}
|
}
|
||||||
cnd.asc("field( scu.roleCode, 'CLUB_PRESIDENT', 'CLUB_VICE_PRESIDENT', 'CLUB_SECRETARY', 'CLUB_VICE_SECRETARY','CLUB_OPERATOR', 'CLUB_MEMBER' )");
|
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
Pagination<ClubUserCommonPageVo> vo = sysClubService.listPageVO(pageForm, sql, ClubUserCommonPageVo.class);
|
Pagination<ClubUserCommonPageVo> listPageVO = sysClubService.listPageVO(pageForm, sql, ClubUserCommonPageVo.class);
|
||||||
return vo;
|
List<ClubUserCommonPageVo> listMap = listPageVO.getList(ClubUserCommonPageVo.class);
|
||||||
|
for (ClubUserCommonPageVo vo : listMap) {
|
||||||
|
List<String> list = vo.getRoleCode();
|
||||||
|
List<String> cleanedCodes = list.stream()
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.map(String::strip)
|
||||||
|
.map(code -> code.startsWith("\"") && code.endsWith("\"")
|
||||||
|
? code.substring(1, code.length() - 1)
|
||||||
|
: code)
|
||||||
|
.toList();
|
||||||
|
String roleName = SysClubUserServiceImpl.convertRoleName(cleanedCodes);
|
||||||
|
vo.setRoleName(roleName);
|
||||||
|
vo.setRoleCode(cleanedCodes);
|
||||||
}
|
}
|
||||||
|
listPageVO.setList(listMap);
|
||||||
@Override
|
return listPageVO;
|
||||||
public Pagination<ClubCommonPageVo> reportPageData(ClubUserPageForm pageForm) {
|
|
||||||
Cnd cnd = Cnd.NEW();
|
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
|
|
||||||
|
|
||||||
List<String> roleList = commonService.findUserRoleByRoleCode(List.of(
|
|
||||||
RoleConstant.CLUB_PRESIDENT.name(),
|
|
||||||
RoleConstant.CLUB_VICE_PRESIDENT.name(),
|
|
||||||
RoleConstant.CLUB_SECRETARY.name(),
|
|
||||||
RoleConstant.CLUB_VICE_SECRETARY.name()
|
|
||||||
));
|
|
||||||
|
|
||||||
List<Sys_user_role> userRoles = dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId())
|
|
||||||
.and("roleId", "in", roleList));
|
|
||||||
List<String> clubIdList = userRoles.stream().map(Sys_user_role::getClubId).collect(Collectors.toList());
|
|
||||||
cnd.and("c.id", "in", clubIdList);
|
|
||||||
}
|
|
||||||
Sql sql = generateSql(pageForm, cnd);
|
|
||||||
return listPageVO(pageForm, sql, ClubCommonPageVo.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Pagination<ClubCommonPageVo> schoolAuditRulePageData(ClubUserPageForm pageForm) {
|
|
||||||
|
|
||||||
Cnd cnd = Cnd.NEW();
|
|
||||||
cnd.and("ruleState", "=", 1);
|
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
|
|
||||||
cnd.and("c.userId", "=", SecurityUtil.getUserId());
|
|
||||||
}
|
|
||||||
Sql sql = generateSql(pageForm, cnd);
|
|
||||||
return listPageVO(pageForm, sql, ClubCommonPageVo.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Pagination<ClubCommonPageVo> schoolAuditReportPageData(ClubUserPageForm pageForm) {
|
|
||||||
Cnd cnd = Cnd.NEW();
|
|
||||||
cnd.and("reportState", "=", 1);
|
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
|
|
||||||
cnd.and("c.userId", "=", SecurityUtil.getUserId());
|
|
||||||
}
|
|
||||||
Sql sql = Sqls.create("""
|
|
||||||
SELECT
|
|
||||||
c.*,
|
|
||||||
d.NAME AS typeName,
|
|
||||||
(
|
|
||||||
SELECT count( DISTINCT scu.userId )
|
|
||||||
FROM club_user scu
|
|
||||||
WHERE
|
|
||||||
scu.clubId = c.id
|
|
||||||
) currentNum,
|
|
||||||
presidentUser.username AS clubLeader,
|
|
||||||
secretaryUser.username AS clubSecretary
|
|
||||||
FROM
|
|
||||||
sys_club c
|
|
||||||
LEFT JOIN club_user presidentCu on presidentCu.clubId = c.id AND presidentCu.roleCode = 'CLUB_PRESIDENT'
|
|
||||||
LEFT JOIN sys_user presidentUser on presidentUser.id = presidentCu.userId
|
|
||||||
LEFT JOIN club_user secretaryCu on secretaryCu.clubId = c.id AND secretaryCu.roleCode = 'CLUB_SECRETARY'
|
|
||||||
LEFT JOIN sys_user secretaryUser on secretaryUser.id = secretaryCu.userId
|
|
||||||
LEFT JOIN sys_dict d ON d.CODE = c.clubType
|
|
||||||
LEFT JOIN bpm_process_instance ins ON ins.processInstanceBusinessId = c.id
|
|
||||||
$condition
|
|
||||||
""");
|
|
||||||
if (StrUtil.isNotBlank(pageForm.getClubName())) {
|
|
||||||
cnd.and("c.clubName", "LIKE", "%" + pageForm.getClubName() + "%");
|
|
||||||
}
|
|
||||||
cnd.andEX("year(c.createTime)", "=", pageForm.getYear());
|
|
||||||
cnd.and("c.dismiss", "=", false);
|
|
||||||
cnd.and("ins.processInstanceStatus", "=", BpmProcessInstanceStatusEnum.COMPLETED);
|
|
||||||
cnd.asc("c.state").desc("createTime");
|
|
||||||
sql.setCondition(cnd);
|
|
||||||
return listPageVO(pageForm, sql, ClubCommonPageVo.class);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -271,42 +223,13 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Sql generateSql(ClubUserPageForm pageForm, Cnd cnd) {
|
|
||||||
Sql sql = Sqls.create("""
|
|
||||||
SELECT
|
|
||||||
c.*,
|
|
||||||
d.NAME AS typeName,
|
|
||||||
u.username as userName,
|
|
||||||
u1.username AS concatPersonName,
|
|
||||||
(select GROUP_CONCAT(DISTINCT username) from `vw_user` where id in (select sponsorId from sys_club_sponsor where clubId = c.id)) as sponsorName,
|
|
||||||
( SELECT count( DISTINCT scu.userId ) FROM club_user scu WHERE scu.clubId = c.id ) currentNum
|
|
||||||
FROM
|
|
||||||
sys_club c
|
|
||||||
LEFT JOIN sys_dict d ON d.CODE = c.clubType
|
|
||||||
LEFT JOIN `vw_user` u ON u.id = c.userId
|
|
||||||
LEFT JOIN `vw_user` u1 ON u1.id = c.concatPerson
|
|
||||||
LEFT JOIN `vw_user` hzu ON hzu.id = c.userId
|
|
||||||
LEFT JOIN wf_process_instance ins ON ins.businessNo = c.id
|
|
||||||
$condition
|
|
||||||
""");
|
|
||||||
if (StrUtil.isNotBlank(pageForm.getClubName())) {
|
|
||||||
cnd.and("c.clubName", "LIKE", "%" + pageForm.getClubName() + "%");
|
|
||||||
}
|
|
||||||
cnd.andEX("year(c.createTime)", "=", pageForm.getYear());
|
|
||||||
cnd.and("c.dismiss", "=", false);
|
|
||||||
cnd.and("ins.state", "=", ProcessInstanceStateEnum.FINISHED.getCode());
|
|
||||||
|
|
||||||
cnd.asc("c.state").desc("createTime");
|
|
||||||
sql.setCondition(cnd);
|
|
||||||
return sql;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exportRegistrationDoc(String clubId, HttpServletResponse response) {
|
public void exportRegistrationDoc(String clubId, HttpServletResponse response) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
c.clubName,
|
c.clubName,
|
||||||
u.userName,
|
u.username,
|
||||||
|
u.username as userName,
|
||||||
u.sex,
|
u.sex,
|
||||||
DATE_FORMAT(u.birthday,'%Y-%m-%d') AS birthday,
|
DATE_FORMAT(u.birthday,'%Y-%m-%d') AS birthday,
|
||||||
u.unitName,
|
u.unitName,
|
||||||
@@ -316,7 +239,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
|||||||
FROM
|
FROM
|
||||||
sys_club c
|
sys_club c
|
||||||
LEFT JOIN club_user scu ON scu.clubId = c.id
|
LEFT JOIN club_user scu ON scu.clubId = c.id
|
||||||
AND scu.roleCode = 'CLUB_PRESIDENT'
|
AND JSON_CONTAINS(scu.roleCode, '"CLUB_PRESIDENT"')
|
||||||
LEFT JOIN vw_user u ON u.id = scu.userId
|
LEFT JOIN vw_user u ON u.id = scu.userId
|
||||||
WHERE
|
WHERE
|
||||||
c.id = @clubId
|
c.id = @clubId
|
||||||
@@ -336,16 +259,29 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
|||||||
u.technicalTitle,
|
u.technicalTitle,
|
||||||
u.mobile,
|
u.mobile,
|
||||||
u.email,
|
u.email,
|
||||||
IF(scu.roleCode='CLUB_MEMBER',null,r.`name`) AS roleName
|
scu.*
|
||||||
FROM
|
FROM
|
||||||
club_user scu
|
club_user scu
|
||||||
LEFT JOIN vw_user u ON u.id = scu.userId
|
LEFT JOIN vw_user u ON u.id = scu.userId
|
||||||
LEFT JOIN sys_role r ON r.`code` = scu.roleCode
|
|
||||||
WHERE scu.clubId = @clubId
|
WHERE scu.clubId = @clubId
|
||||||
ORDER BY FIELD(scu.roleCode,'CLUB_PRESIDENT','CLUB_VICE_PRESIDENT','CLUB_SECRETARY','CLUB_VICE_SECRETARY','CLUB_MEMBER')
|
ORDER BY
|
||||||
|
CASE
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_PRESIDENT"') THEN 1
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MEMBER"') THEN 5
|
||||||
|
ELSE 99
|
||||||
|
END
|
||||||
""");
|
""");
|
||||||
memberSql.setParam("clubId", clubId);
|
memberSql.setParam("clubId", clubId);
|
||||||
List<NutMap> memberList = listMap(memberSql);
|
List<NutMap> memberList = listMap(memberSql);
|
||||||
|
for (NutMap nutMap : memberList) {
|
||||||
|
List<String> list = Json.fromJsonAsList(String.class, nutMap.getString("roleCode"));
|
||||||
|
String roleName = SysClubUserServiceImpl.convertRoleName(list);
|
||||||
|
nutMap.put("roleName", roleName);
|
||||||
|
nutMap.put("roleCode", list);
|
||||||
|
}
|
||||||
|
|
||||||
HashMap<String, Object> docData = new HashMap<>(clubInfo);
|
HashMap<String, Object> docData = new HashMap<>(clubInfo);
|
||||||
docData.put("cys", memberList);
|
docData.put("cys", memberList);
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import com.budwk.app.bpm.service.BpmService;
|
|||||||
import com.budwk.app.flow.entity.ProcessInstance;
|
import com.budwk.app.flow.entity.ProcessInstance;
|
||||||
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
||||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
|
import com.budwk.app.sys.models.Sys_user;
|
||||||
import com.budwk.app.sys.models.Sys_user_role;
|
import com.budwk.app.sys.models.Sys_user_role;
|
||||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
@@ -38,6 +39,8 @@ import org.nutz.ioc.loader.annotation.IocBean;
|
|||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: JyuHsin
|
* @Author: JyuHsin
|
||||||
@@ -54,10 +57,8 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysClubUserService sysClubUserService;
|
private SysClubUserService sysClubUserService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private CommonService commonService;
|
private CommonService commonService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private BpmService bpmService;
|
private BpmService bpmService;
|
||||||
|
|
||||||
@@ -67,8 +68,8 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
SELECT
|
SELECT
|
||||||
club.*,
|
club.*,
|
||||||
u.username as concatPersonName,
|
u.username as concatPersonName,
|
||||||
(select GROUP_CONCAT(username) from sys_user where id in (select userId from club_user u where u.clubId=club.id and u.roleCode='CLUB_PRESIDENT')) as clubLeader,
|
(select GROUP_CONCAT(username) from sys_user where id in (select userId from club_user u where u.clubId=club.id and JSON_CONTAINS(u.roleCode, '"CLUB_PRESIDENT"'))) as clubLeader,
|
||||||
(select GROUP_CONCAT(username) from sys_user where id in (select userId from club_user u where u.clubId=club.id and u.roleCode='CLUB_SECRETARY')) as clubSecretary,
|
(select GROUP_CONCAT(username) from sys_user where id in (select userId from club_user u where u.clubId=club.id and JSON_CONTAINS(u.roleCode, '"CLUB_SECRETARY"'))) as clubSecretary,
|
||||||
(SELECT count( DISTINCT scu.userId ) FROM club_user scu WHERE scu.clubId = club.id ) currentPeopleNum
|
(SELECT count( DISTINCT scu.userId ) FROM club_user scu WHERE scu.clubId = club.id ) currentPeopleNum
|
||||||
FROM
|
FROM
|
||||||
sys_club club
|
sys_club club
|
||||||
@@ -170,7 +171,7 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
List<ClubUser> clubUsers = managePerson.stream().map(person -> {
|
List<ClubUser> clubUsers = managePerson.stream().map(person -> {
|
||||||
ClubUser clubUser = new ClubUser();
|
ClubUser clubUser = new ClubUser();
|
||||||
clubUser.setClubId(club.getId());
|
clubUser.setClubId(club.getId());
|
||||||
clubUser.setRoleCode(person.getString("roleCode"));
|
clubUser.setRoleCode(List.of(person.getString("roleCode")));
|
||||||
clubUser.setUserId(person.getString("userId"));
|
clubUser.setUserId(person.getString("userId"));
|
||||||
return clubUser;
|
return clubUser;
|
||||||
}).toList();
|
}).toList();
|
||||||
@@ -195,7 +196,7 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
List<ClubUser> clubUsers = managePerson.stream().map(person -> {
|
List<ClubUser> clubUsers = managePerson.stream().map(person -> {
|
||||||
ClubUser clubUser = new ClubUser();
|
ClubUser clubUser = new ClubUser();
|
||||||
clubUser.setClubId(club.getId());
|
clubUser.setClubId(club.getId());
|
||||||
clubUser.setRoleCode(person.getString("roleCode"));
|
clubUser.setRoleCode(List.of(person.getString("roleCode")));
|
||||||
clubUser.setUserId(person.getString("userId"));
|
clubUser.setUserId(person.getString("userId"));
|
||||||
return clubUser;
|
return clubUser;
|
||||||
}).toList();
|
}).toList();
|
||||||
@@ -242,9 +243,7 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
cnd.andEX("info.clubName", "like", "%" + pageForm.getClubName() + "%");
|
cnd.andEX("info.clubName", "like", "%" + pageForm.getClubName() + "%");
|
||||||
}
|
}
|
||||||
cnd.andEX("year(info.createTime)", "=", pageForm.getYear());
|
cnd.andEX("year(info.createTime)", "=", pageForm.getYear());
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
|
|
||||||
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||||
}
|
|
||||||
cnd.desc("createTime");
|
cnd.desc("createTime");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return listPageVO(pageForm, sql, ClubRegisterPageVo.class);
|
return listPageVO(pageForm, sql, ClubRegisterPageVo.class);
|
||||||
@@ -314,7 +313,7 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
cnd.andEX("club.clubName", "like", "%" + pageForm.getClubName() + "%");
|
cnd.andEX("club.clubName", "like", "%" + pageForm.getClubName() + "%");
|
||||||
}
|
}
|
||||||
if (pageForm.getAudit()) {
|
if (pageForm.getAudit()) {
|
||||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
} else {
|
} else {
|
||||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ import com.budwk.app.sys.models.Sys_user;
|
|||||||
import com.budwk.app.sys.services.SysRoleService;
|
import com.budwk.app.sys.services.SysRoleService;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||||
import com.budwk.app.zhgh.club.model.SysClubUser;
|
import com.budwk.app.zhgh.club.model.ClubUser;
|
||||||
import com.budwk.app.zhgh.club.model.SysClubUserBackHistory;
|
|
||||||
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubService;
|
import com.budwk.app.zhgh.club.service.SysClubService;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubUserService;
|
import com.budwk.app.zhgh.club.service.SysClubUserService;
|
||||||
@@ -23,11 +22,11 @@ import org.nutz.dao.sql.Sql;
|
|||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.json.Json;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,7 +36,7 @@ import java.util.stream.Collectors;
|
|||||||
* @Description: TODO
|
* @Description: TODO
|
||||||
**/
|
**/
|
||||||
@IocBean(args = {"refer:dao"})
|
@IocBean(args = {"refer:dao"})
|
||||||
public class SysClubUserServiceImpl extends BaseServiceImpl<SysClubUser> implements SysClubUserService {
|
public class SysClubUserServiceImpl extends BaseServiceImpl<ClubUser> implements SysClubUserService {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysClubService sysClubService;
|
private SysClubService sysClubService;
|
||||||
@@ -68,9 +67,23 @@ public class SysClubUserServiceImpl extends BaseServiceImpl<SysClubUser> impleme
|
|||||||
LEFT JOIN sys_user u ON scu.userId = u.id
|
LEFT JOIN sys_user u ON scu.userId = u.id
|
||||||
LEFT JOIN sys_unit unit ON u.unitid = unit.id
|
LEFT JOIN sys_unit unit ON u.unitid = unit.id
|
||||||
WHERE scu.clubId = @clubId
|
WHERE scu.clubId = @clubId
|
||||||
ORDER BY FIELD( scu.roleCode, 'CLUB_PRESIDENT', 'CLUB_VICE_PRESIDENT', 'CLUB_SECRETARY', 'CLUB_VICE_SECRETARY', 'CLUB_MEMBER' )
|
ORDER BY
|
||||||
|
CASE
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_PRESIDENT"') THEN 1
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MEMBER"') THEN 5
|
||||||
|
ELSE 99
|
||||||
|
END
|
||||||
""").setParam("clubId", clubId);
|
""").setParam("clubId", clubId);
|
||||||
return listMap(sql);
|
List<NutMap> listMap = listMap(sql);
|
||||||
|
for (NutMap nutMap : listMap) {
|
||||||
|
List<String> list = Json.fromJsonAsList(String.class, nutMap.getString("roleCode"));
|
||||||
|
String roleName = convertRoleName(list);
|
||||||
|
nutMap.put("roleName", roleName);
|
||||||
|
}
|
||||||
|
return listMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -103,88 +116,29 @@ public class SysClubUserServiceImpl extends BaseServiceImpl<SysClubUser> impleme
|
|||||||
cnd.andEX("u.personType", "=", pageForm.getPersonType());
|
cnd.andEX("u.personType", "=", pageForm.getPersonType());
|
||||||
cnd.andEX("u.userState", "=", pageForm.getUserState());
|
cnd.andEX("u.userState", "=", pageForm.getUserState());
|
||||||
cnd.andEX("u.unitId", "=", pageForm.getUnitId());
|
cnd.andEX("u.unitId", "=", pageForm.getUnitId());
|
||||||
int status = pageForm.getSource() == 1 ? 1 : 3;
|
|
||||||
// if (pageForm.getAuditType() == 1) {
|
|
||||||
// if (AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
|
||||||
// cnd.and(pageForm.getApplyType() == 1 ? "scu.status" : "scu.exitStatus", ">=", status);
|
|
||||||
// } else {
|
|
||||||
// cnd.and(pageForm.getApplyType() == 1 ? "scu.status" : "scu.exitStatus", ">", status).and(new Static("JSON_CONTAINS(%s, JSON_OBJECT('auditUser', '%s'))"
|
|
||||||
// .formatted((pageForm.getApplyType() == 1 ? "auditList" : "exitAuditList"), SecurityUtil.getUserId())));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (pageForm.getAuditType() == 2) {
|
|
||||||
// if (AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
|
||||||
// cnd.and(pageForm.getApplyType() == 1 ? "scu.status" : "scu.exitStatus", ">", status);
|
|
||||||
// } else {
|
|
||||||
// cnd.and(pageForm.getApplyType() == 1 ? "scu.status" : "scu.exitStatus", ">", status).and(new Static("JSON_CONTAINS(%s, JSON_OBJECT('auditUser', '%s'))"
|
|
||||||
// .formatted((pageForm.getApplyType() == 1 ? "auditList" : "exitAuditList"), SecurityUtil.getUserId())));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (pageForm.getAuditType() == 3) {
|
|
||||||
// cnd.and(pageForm.getApplyType() == 1 ? "scu.status" : "scu.exitStatus", "=", status);
|
|
||||||
// }
|
|
||||||
// if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
|
|
||||||
// List<SysClub> myManageClub = sysClubService.getMyManageClub();
|
|
||||||
// List<String> clubIdList = myManageClub.stream().map(SysClub::getId).toList();
|
|
||||||
// cnd.and("scu.clubId", "in", clubIdList);
|
|
||||||
// }
|
|
||||||
// if (Strings.isNotBlank(pageForm.getSearchKeyword())) {
|
|
||||||
// cnd.and(Cnd.exps("loginname", "like", "%" + pageForm.getSearchKeyword() + "%").or("username", "like", "%" + pageForm.getSearchKeyword() + "%"));
|
|
||||||
// }
|
|
||||||
// if (Strings.isNotBlank(pageForm.getPageOrderName()) && Strings.isNotBlank(pageForm.getPageOrderBy())) {
|
|
||||||
// cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
|
||||||
// } else {
|
|
||||||
// cnd.asc("club.clubCode");
|
|
||||||
// }
|
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return listPageVO(pageForm, sql, ClubUserCommonPageVo.class);
|
return listPageVO(pageForm, sql, ClubUserCommonPageVo.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
public void doAudit(@Valid String[] ids,
|
|
||||||
@Valid Boolean auditResult,
|
|
||||||
@Valid Integer auditType,
|
|
||||||
@Valid Integer applyType,
|
|
||||||
@Valid Boolean payed) {
|
|
||||||
Cnd cnd = Cnd.NEW();
|
|
||||||
cnd.where().andInStrArray("id", ids);
|
|
||||||
int status = 0;
|
|
||||||
if (auditType == 1) {
|
|
||||||
status = auditResult ? 5 : 2;
|
|
||||||
} else if (auditType == 2) {
|
|
||||||
status = auditResult ? 5 : 4;
|
|
||||||
}
|
|
||||||
List<NutMap> auditList = new ArrayList<>();
|
|
||||||
auditList.add(NutMap.NEW().addv("auditUser", SecurityUtil.getUserId()).addv("auditState", auditResult)
|
|
||||||
.addv("auditTime", DateUtil.now()).addv("auditType", auditType == 1 ? "club" : "school"));
|
|
||||||
if(applyType == 1) {
|
|
||||||
update(Chain.make("status", status).add("payed", payed).add("auditList", auditList), cnd);
|
|
||||||
//备份会员
|
|
||||||
List<SysClubUserBackHistory> list = new ArrayList<>();
|
|
||||||
for (String id : ids) {
|
|
||||||
SysClubUser sysClubUser = fetch(id);
|
|
||||||
SysClubUserBackHistory backHistory = new SysClubUserBackHistory();
|
|
||||||
backHistory.setUserId(sysClubUser.getUserId());
|
|
||||||
backHistory.setClubId(sysClubUser.getClubId());
|
|
||||||
backHistory.setBTime(cn.hutool.core.date.DateUtil.now());
|
|
||||||
backHistory.setRoleCode(sysClubUser.getRoleCode());
|
|
||||||
list.add(backHistory);
|
|
||||||
}
|
|
||||||
dao().insert(list);
|
|
||||||
} else {
|
|
||||||
Chain exitStatus = Chain.make("exitStatus", status).add("exitAuditList", auditList);
|
|
||||||
if(status == 5) {
|
|
||||||
exitStatus.add("isNormal", false);
|
|
||||||
}
|
|
||||||
update(exitStatus, cnd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getClubLeader(String clubId) {
|
public String getClubLeader(String clubId) {
|
||||||
|
|
||||||
List<Sys_user> userList = commonService.findUserInfoByRoleCode("clubId", clubId, RoleConstant.CLUB_PRESIDENT.name());
|
List<Sys_user> userList = commonService.findUserInfoByRoleCode("clubId", clubId, RoleConstant.CLUB_PRESIDENT.name());
|
||||||
return userList.stream().map(Sys_user::getLoginname).collect(Collectors.joining(","));
|
return userList.stream().map(Sys_user::getLoginname).collect(Collectors.joining(","));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String convertRoleName(List<String> roleCodes) {
|
||||||
|
if (roleCodes == null || roleCodes.isEmpty()) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
Map<String, String> codeToName = Arrays.stream(RoleConstant.values())
|
||||||
|
.collect(Collectors.toMap(
|
||||||
|
Enum::name,
|
||||||
|
role -> role.roleName
|
||||||
|
));
|
||||||
|
return roleCodes.stream()
|
||||||
|
.map(codeToName::get)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.collect(Collectors.joining(","));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,6 @@ import java.util.List;
|
|||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class ClubRegisterVo extends SysClub {
|
public class ClubRegisterVo extends SysClub {
|
||||||
|
|
||||||
@ApiModelProperty("节点审批记录")
|
|
||||||
private List<BpmTaskApprovalRecordVo> nodeTasks;
|
|
||||||
|
|
||||||
private List<NutMap> clubUser;
|
private List<NutMap> clubUser;
|
||||||
private String typeName;
|
private String typeName;
|
||||||
private String concatPersonName;
|
private String concatPersonName;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.budwk.app.zhgh.club.vo;
|
|||||||
|
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.budwk.app.zhgh.club.model.ClubUser;
|
import com.budwk.app.zhgh.club.model.ClubUser;
|
||||||
import com.budwk.app.zhgh.club.model.SysClubUser;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,4 @@ public class ClubUserImportVo {
|
|||||||
|
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private String errorInfo;
|
private String errorInfo;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+89
@@ -0,0 +1,89 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.site.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.site.model.SiteInfo;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.model.SiteType;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.service.SiteApplyService;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.service.SiteInfoService;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.service.SiteTypeService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
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.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SiteApplyController
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/27 11:00
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean
|
||||||
|
@Ok("json:full")
|
||||||
|
@Api(tags = "场地预约")
|
||||||
|
@At("/platform/site/apply")
|
||||||
|
public class SiteApplyController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private SiteApplyService applyService;
|
||||||
|
@Inject
|
||||||
|
private SiteInfoService infoService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@SaCheckPermission("site.apply")
|
||||||
|
@Ok("beetl:/platform/zhgh/dayofficework/site/apply/index.html")
|
||||||
|
public void index() {}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("site.type")
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
@Param("year") Integer year,
|
||||||
|
@Param("type") String type) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and(SiteInfo::getState, "=", true);
|
||||||
|
cnd.andEX("year(createTime)", "=", year);
|
||||||
|
cnd.andEX(SiteInfo::getTypeId, "=", type);
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.or(SiteInfo::getName, "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
|
seg.or(SiteInfo::getAddress, "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
|
cnd.and(seg);
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.asc("sortNum * 1");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
Pagination pagination = infoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
|
||||||
|
List<NutMap> listMap = pagination.getList(NutMap.class);
|
||||||
|
|
||||||
|
List<SiteType> typeList = dao.query(SiteType.class, Cnd.NEW());
|
||||||
|
Map<String, String> typeMap = typeList.stream().collect(Collectors.toMap(SiteType::getId, SiteType::getName));
|
||||||
|
|
||||||
|
for (NutMap map : listMap) {
|
||||||
|
map.put("typeName", typeMap.get(map.getString("typeId")));
|
||||||
|
}
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
}
|
||||||
+114
@@ -0,0 +1,114 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.site.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;
|
||||||
|
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.site.model.SiteInfo;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.model.SiteType;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.service.SiteInfoService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
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.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SiteInfoController
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/27 9:36
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean
|
||||||
|
@Ok("json:full")
|
||||||
|
@Api(tags = "场地管理")
|
||||||
|
@At("/platform/site/manage")
|
||||||
|
public class SiteInfoController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private SiteInfoService infoService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@SaCheckPermission("site.manage")
|
||||||
|
@Ok("beetl:/platform/zhgh/dayofficework/site/manage/index.html")
|
||||||
|
public void index() {}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("site.manage")
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
@Param("year") Integer year,
|
||||||
|
@Param("type") String type) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("year(createTime)", "=", year);
|
||||||
|
cnd.andEX(SiteInfo::getTypeId, "=", type);
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.or(SiteInfo::getName, "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
|
seg.or(SiteInfo::getAddress, "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
|
cnd.and(seg);
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.asc("sortNum * 1");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
Pagination pagination = infoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
|
||||||
|
List<NutMap> listMap = pagination.getList(NutMap.class);
|
||||||
|
|
||||||
|
List<SiteType> typeList = dao.query(SiteType.class, Cnd.NEW());
|
||||||
|
Map<String, String> typeMap = typeList.stream().collect(Collectors.toMap(SiteType::getId, SiteType::getName));
|
||||||
|
|
||||||
|
for (NutMap map : listMap) {
|
||||||
|
map.put("typeName", typeMap.get(map.getString("typeId")));
|
||||||
|
}
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("新增/修改场地")
|
||||||
|
@SaCheckPermission("site.manage")
|
||||||
|
@SLog(type = "site", tag = "新增/修改场地", msg = "新增/修改场地")
|
||||||
|
public Object submit(@Param("data") SiteInfo info) {
|
||||||
|
infoService.insertOrUpdate(info);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除场地")
|
||||||
|
@SaCheckPermission("site.manage")
|
||||||
|
@SLog(type = "site", tag = "删除场地", msg = "删除场地")
|
||||||
|
public Object delete(String id) {
|
||||||
|
infoService.delete(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查询场地")
|
||||||
|
@SaCheckLogin
|
||||||
|
public Result querySites() {
|
||||||
|
List<SiteInfo> list = infoService.query(Cnd.where(SiteInfo::getState, "=", true).desc(SiteInfo::getSortNum));
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
+97
@@ -0,0 +1,97 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.site.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;
|
||||||
|
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.PageUtil;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.model.SiteType;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.service.SiteTypeService;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.condolence.model.CondolenceType;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
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.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SiteTypeController
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/27 8:53
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean
|
||||||
|
@Ok("json:full")
|
||||||
|
@Api(tags = "场地类型")
|
||||||
|
@At("/platform/site/type")
|
||||||
|
public class SiteTypeController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private SiteTypeService typeService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@SaCheckPermission("site.type")
|
||||||
|
@Ok("beetl:/platform/zhgh/dayofficework/site/type/index.html")
|
||||||
|
public void index() {}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("site.type")
|
||||||
|
public Result pageData(PageForm pageForm) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.or(SiteType::getName, "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
|
seg.or(SiteType::getCode, "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
|
cnd.and(seg);
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.asc("code");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
Pagination pagination = typeService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("新增/修改场地类型")
|
||||||
|
@SaCheckPermission("site.type")
|
||||||
|
@SLog(type = "site", tag = "新增/修改场地类型", msg = "新增/修改场地类型")
|
||||||
|
public Object submit(SiteType type) {
|
||||||
|
typeService.insertOrUpdate(type);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除场地类型")
|
||||||
|
@SaCheckPermission("site.type")
|
||||||
|
@SLog(type = "site", tag = "删除场地类型", msg = "删除场地类型")
|
||||||
|
public Object delete(String id) {
|
||||||
|
typeService.delete(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查询场地类型")
|
||||||
|
@SaCheckLogin
|
||||||
|
public Result querySiteType() {
|
||||||
|
List<SiteType> list = typeService.query(Cnd.where(SiteType::getEnable, "=", true).asc(SiteType::getCode));
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.site.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SiteApply
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/27 10:59
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Comment("场地预约")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Table("site_apply")
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class SiteApply extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("场地id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String siteId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("预约人")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String applyUserId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("预约人姓名")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
|
private String applyUserName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("预约人工号")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
|
private String applyLoginName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("预约人单位")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 60)
|
||||||
|
private String applyUnitName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("预约人工会")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 60)
|
||||||
|
private String applyUnionName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("预约人联系方式")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
private String applyMobile;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("预约事由")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 1000)
|
||||||
|
private String applyCause;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("预约日期(天)")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
private String applyDay;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("预约开始时间")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("预约结束时间")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("预约人数")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer joinCount;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("反馈意见")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||||
|
private String backOption;
|
||||||
|
}
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.site.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName Site
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/27 9:30
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Comment("场地信息")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Table("site_info")
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class SiteInfo extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
@Comment("场地名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
@Comment("场地地址")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("联系人")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String contactName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("联系电话")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
|
private String contactPhone;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("开启状态")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
private Boolean state;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("开放时段")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<NutMap> openHours;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("创建人")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String createUserId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("创建人")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
private String createUserName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("创建时间")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("活动类型")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String typeId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("限制男女,0表示不限制,1表示限制男,2表示限制女")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer sexLimit;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("场地的禁用时间")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<NutMap> notApplyTimeList;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("场地介绍")
|
||||||
|
@ColDefine(type = ColType.TEXT)
|
||||||
|
private String introduce;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("可容纳人数")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer maxNum;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("面向预约对象(1.面向分工会,2.面向个人,3.面向集体)")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer reserveTarget;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("排序编号")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer sortNum;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("排除节假日")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Default(value = "0")
|
||||||
|
private Boolean filterHolidays;
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.site.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SiteType
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/27 8:57
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Comment("场地类型")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Table("site_type")
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class SiteType extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
|
@Comment("类型编码")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
@Comment("类型名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Comment("是否启用")
|
||||||
|
@Default("1")
|
||||||
|
private Boolean enable;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("排序编号")
|
||||||
|
private Integer sortNum;
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.site.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.model.SiteApply;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SiteApplyService
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/27 11:01
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public interface SiteApplyService extends BaseService<SiteApply> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.site.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.model.SiteInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SiteInfoService
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/27 9:37
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public interface SiteInfoService extends BaseService<SiteInfo> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.site.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.model.SiteType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SiteTypeService
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/27 9:04
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public interface SiteTypeService extends BaseService<SiteType> {
|
||||||
|
}
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.site.service.impl;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.model.SiteApply;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.service.SiteApplyService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SiteApplyServiceImpl
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/27 11:01
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class SiteApplyServiceImpl extends BaseServiceImpl<SiteApply> implements SiteApplyService {
|
||||||
|
|
||||||
|
public SiteApplyServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
}
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.site.service.impl;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.model.SiteInfo;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.service.SiteInfoService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SiteInfoServiceImpl
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/27 9:37
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class SiteInfoServiceImpl extends BaseServiceImpl<SiteInfo> implements SiteInfoService {
|
||||||
|
|
||||||
|
public SiteInfoServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
}
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.site.service.impl;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.model.SiteType;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.site.service.SiteTypeService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SiteTypeServiceImpl
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/27 9:04
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class SiteTypeServiceImpl extends BaseServiceImpl<SiteType> implements SiteTypeService {
|
||||||
|
|
||||||
|
public SiteTypeServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
}
|
||||||
+20
@@ -14,18 +14,22 @@ import com.budwk.app.flow.engine.FlowEngine;
|
|||||||
import com.budwk.app.flow.entity.ProcessInstance;
|
import com.budwk.app.flow.entity.ProcessInstance;
|
||||||
import com.budwk.app.flow.entity.ProcessTask;
|
import com.budwk.app.flow.entity.ProcessTask;
|
||||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||||
|
import com.budwk.app.flow.service.FlowCommonService;
|
||||||
import com.budwk.app.sys.views.View_user;
|
import com.budwk.app.sys.views.View_user;
|
||||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.democratic.suggestionBox.models.SuggestionBox;
|
||||||
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
|
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
|
||||||
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceService;
|
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
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.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
@@ -53,6 +57,8 @@ public class CondolenceApplyController {
|
|||||||
private FlowEngine flowEngine;
|
private FlowEngine flowEngine;
|
||||||
@Inject
|
@Inject
|
||||||
private CondolenceService condolenceService;
|
private CondolenceService condolenceService;
|
||||||
|
@Inject
|
||||||
|
private FlowCommonService flowCommonService;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/apply/index.html")
|
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/apply/index.html")
|
||||||
@@ -90,6 +96,20 @@ public class CondolenceApplyController {
|
|||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("重新提交申请")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("condolence.apply")
|
||||||
|
public Result submitAgain(@Param("data") Condolence condolence, @Param("taskId") Long taskId) {
|
||||||
|
dao.insertOrUpdate(condolence);
|
||||||
|
|
||||||
|
Dict dict = Dict.create();
|
||||||
|
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||||
|
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||||
|
flowCommonService.executeTask(dict);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ApiOperation("查询用户")
|
@ApiOperation("查询用户")
|
||||||
@SaCheckPermission("condolence.apply")
|
@SaCheckPermission("condolence.apply")
|
||||||
|
|||||||
+1
-1
@@ -90,7 +90,7 @@ public class CondolenceBranchUnionApprovalController {
|
|||||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
|
|
||||||
if (approval) {
|
if (approval) {
|
||||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
} else {
|
} else {
|
||||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -107,7 +107,7 @@ public class CondolenceMineController {
|
|||||||
@At
|
@At
|
||||||
@ApiOperation("删除")
|
@ApiOperation("删除")
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("condolence.mine")
|
@SaCheckPermission("condolence")
|
||||||
@SLog(type = "condolence", tag = "删除职工慰问", msg = "删除职工慰问")
|
@SLog(type = "condolence", tag = "删除职工慰问", msg = "删除职工慰问")
|
||||||
public Result delete(@Param("id") String id) {
|
public Result delete(@Param("id") String id) {
|
||||||
condolenceService.delete(id);
|
condolenceService.delete(id);
|
||||||
|
|||||||
+1
-1
@@ -94,7 +94,7 @@ public class CondolenceSchoolUnionApprovalController {
|
|||||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
|
|
||||||
if (approval) {
|
if (approval) {
|
||||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
} else {
|
} else {
|
||||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,9 +9,17 @@ function autoEnhanceForm(formVm) {
|
|||||||
if (formVm[MARK]) return
|
if (formVm[MARK]) return
|
||||||
formVm[MARK] = true
|
formVm[MARK] = true
|
||||||
|
|
||||||
const vnode = formVm.$vnode
|
const attrs = formVm.$attrs;
|
||||||
|
if (attrs && attrs['no-auto-enhance'] !== undefined) {
|
||||||
|
return; // 有 no-auto-enhance 属性,跳过增强
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果 $attrs 没有,也可以尝试从 $vnode 回退(兼容旧版)
|
||||||
|
if (!attrs) {
|
||||||
|
const vnode = formVm.$vnode;
|
||||||
if (vnode && vnode.data && vnode.data.attrs && vnode.data.attrs['no-auto-enhance'] !== undefined) {
|
if (vnode && vnode.data && vnode.data.attrs && vnode.data.attrs['no-auto-enhance'] !== undefined) {
|
||||||
return
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const originalValidate = formVm.validate
|
const originalValidate = formVm.validate
|
||||||
|
|||||||
@@ -57,6 +57,10 @@ const REGISTER_INFO_COMPONENT = {
|
|||||||
<template slot="label">其他附件</template>
|
<template slot="label">其他附件</template>
|
||||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item :span="2">
|
||||||
|
<template slot="label">换届报告</template>
|
||||||
|
<file-preview :files="viewData.replaceReport" complete_result></file-preview>
|
||||||
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||||
@@ -65,11 +69,7 @@ const REGISTER_INFO_COMPONENT = {
|
|||||||
<div class="process-title">成员信息</div>
|
<div class="process-title">成员信息</div>
|
||||||
<el-table :data="viewData.clubUser" size="small" border
|
<el-table :data="viewData.clubUser" size="small" border
|
||||||
:header-cell-style="{background:'#F5F5F5',color:'#606266'}">
|
:header-cell-style="{background:'#F5F5F5',color:'#606266'}">
|
||||||
<el-table-column label="人员身份" width="150px" prop="roleCode">
|
<el-table-column label="人员身份" width="150px" prop="roleName"></el-table-column>
|
||||||
<template v-slot="scope">
|
|
||||||
<span>{{ getRoleName(scope.row.roleCode) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="工号" width="150px" prop="loginName"></el-table-column>
|
<el-table-column label="工号" width="150px" prop="loginName"></el-table-column>
|
||||||
<el-table-column label="姓名" width="150px" prop="userName"></el-table-column>
|
<el-table-column label="姓名" width="150px" prop="userName"></el-table-column>
|
||||||
<el-table-column label="性别" width="150px" prop="sex"></el-table-column>
|
<el-table-column label="性别" width="150px" prop="sex"></el-table-column>
|
||||||
@@ -126,9 +126,6 @@ const REGISTER_INFO_COMPONENT = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getRoleName(roleCode) {
|
|
||||||
return CLUB_ROLE_CONSTANT.getRoleName(roleCode)
|
|
||||||
},
|
|
||||||
onOpen(row) {
|
onOpen(row) {
|
||||||
this.row = row
|
this.row = row
|
||||||
this.$axios.post("/platform/club/register/clubRegisterApply/info", { id: this.row.id }).then((res) => {
|
this.$axios.post("/platform/club/register/clubRegisterApply/info", { id: this.row.id }).then((res) => {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ const CLUB_ROLE_CONSTANT = {
|
|||||||
case this.CLUB_VICE_SECRETARY:
|
case this.CLUB_VICE_SECRETARY:
|
||||||
return "副秘书长"
|
return "副秘书长"
|
||||||
case this.CLUB_MEMBER:
|
case this.CLUB_MEMBER:
|
||||||
return "会员"
|
return "协会会员"
|
||||||
default:
|
default:
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,9 +86,9 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row class="mt20" justify="end" type="flex">
|
<el-row class="mt20" justify="end" type="flex">
|
||||||
<el-button v-if="id !== ''" @click="doBack">返回</el-button>
|
<el-button :disabled="isCanApply === false" type="primary" plain @click="onSave">保存</el-button>
|
||||||
<el-button :disabled="isCanApply === false" type="primary" @click="doSave">保存</el-button>
|
<el-button :disabled="isCanApply === false" type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||||
<el-button :disabled="isCanApply === false" type="primary" @click="doSubmit">提交</el-button>
|
<el-button :disabled="isCanApply === false" type="primary" @click="onFinishTask" v-else>提交</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
@@ -105,7 +105,8 @@ layout("/layouts/platform.html"){
|
|||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: GetQueryString("id"),
|
id: GetQueryString("bizId"),
|
||||||
|
taskId: GetQueryString("taskId"),
|
||||||
formRules: {
|
formRules: {
|
||||||
files: [{ required: true, message: "必填", trigger: ["change", "blur"] }]
|
files: [{ required: true, message: "必填", trigger: ["change", "blur"] }]
|
||||||
},
|
},
|
||||||
@@ -122,20 +123,15 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
components: {},
|
components: {},
|
||||||
methods: {
|
methods: {
|
||||||
doBack() {
|
onSave() {
|
||||||
if (GetQueryString("id") !== "") {
|
this.$axios.post("/platform/club/evaluate/apply/save", { data: JSON.stringify(this.formData) }).then((res) => {
|
||||||
location.href = '/platform/club/evaluate/mine'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
doSave() {
|
|
||||||
this.$axios.post("/platform/club/evaluate/apply/doSave", { evaluate: JSON.stringify(this.formData) }).then((res) => {
|
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
location.href = '/platform/club/evaluate/mine'
|
location.href = '/platform/club/evaluate/mine'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async doSubmit() {
|
async onSubmit() {
|
||||||
const valid = await this.$refs["form"].validate()
|
const valid = await this.$refs["form"].validate()
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const confirm = await this.$confirm("确定要提交此申请吗?", "提示", {
|
const confirm = await this.$confirm("确定要提交此申请吗?", "提示", {
|
||||||
@@ -148,8 +144,8 @@ layout("/layouts/platform.html"){
|
|||||||
if (data.files) {
|
if (data.files) {
|
||||||
data.files = JSON.stringify(data.files)
|
data.files = JSON.stringify(data.files)
|
||||||
}
|
}
|
||||||
const resp = await this.$axios.post("/platform/club/evaluate/apply/doSubmit", {
|
const resp = await this.$axios.post("/platform/club/evaluate/apply/submit", {
|
||||||
evaluate: JSON.stringify(data)
|
data: JSON.stringify(data)
|
||||||
})
|
})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$message.success(resp.msg)
|
this.$message.success(resp.msg)
|
||||||
@@ -160,6 +156,23 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onFinishTask() {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/club/evaluate/apply/submitAgain', {
|
||||||
|
data: JSON.stringify(this.formData),
|
||||||
|
taskId: GetQueryString("taskId")
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
window.location.href = '/platform/club/evaluate/mine'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
async initData() {
|
async initData() {
|
||||||
this.$set(this.formData, "applyStartYear", new Date().getFullYear() - 1 + "")
|
this.$set(this.formData, "applyStartYear", new Date().getFullYear() - 1 + "")
|
||||||
this.$set(this.formData, "applyEndYear", new Date().getFullYear() + "")
|
this.$set(this.formData, "applyEndYear", new Date().getFullYear() + "")
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
onEdit(row) {
|
onEdit(row) {
|
||||||
location.href = '/platform/club/evaluate/apply?id=' + row.id
|
window.location.href = '/platform/club/evaluate/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
|
||||||
},
|
},
|
||||||
async onDelete(id) {
|
async onDelete(id) {
|
||||||
const confirm = await this.$confirm("此操作将永久删除, 是否继续?", "提示", {
|
const confirm = await this.$confirm("此操作将永久删除, 是否继续?", "提示", {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-form v-show="registerTypeName === 0" :model="formData" ref="addForm1" :rules="formRules"
|
<el-form v-show="registerTypeName === 0" :model="formData" ref="addForm1" :rules="formRules"
|
||||||
label-width="150px"
|
label-width="150px"
|
||||||
style="margin-top: 50px">
|
no-auto-enhance style="margin-top: 50px">
|
||||||
<el-row :gutter="20" type="flex">
|
<el-row :gutter="20" type="flex">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item prop="year" label="填报年度"
|
<el-form-item prop="year" label="填报年度"
|
||||||
@@ -120,7 +120,7 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="80">
|
<el-table-column label="操作" width="80">
|
||||||
<template slot="header" v-slot="scope">
|
<template slot="header" slot-scope="scope">
|
||||||
<el-button size="mini" type="primary" icon="el-icon-plus"
|
<el-button size="mini" type="primary" icon="el-icon-plus"
|
||||||
@click="formData.yearActivityList.push({})"></el-button>
|
@click="formData.yearActivityList.push({})"></el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -184,7 +184,7 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="80">
|
<el-table-column label="操作" width="80">
|
||||||
<template slot="header" v-slot="scope">
|
<template slot="header" slot-scope="scope">
|
||||||
<el-button size="mini" type="primary" icon="el-icon-plus"
|
<el-button size="mini" type="primary" icon="el-icon-plus"
|
||||||
@click="formData.plans.push({})"></el-button>
|
@click="formData.plans.push({})"></el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -217,8 +217,7 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-form v-show="registerTypeName===1" :model="cwsz" ref="addForm2" :rules="rules"
|
<el-form v-show="registerTypeName===1" :model="cwsz" ref="addForm2" :rules="rules"
|
||||||
label-width="120px"
|
no-auto-enhance label-width="120px" style="margin: 50px 0 0 0">
|
||||||
style="margin: 50px 0 0 0">
|
|
||||||
<div>
|
<div>
|
||||||
<el-table :data="cwsz.incomeDetailed" max-height="600">
|
<el-table :data="cwsz.incomeDetailed" max-height="600">
|
||||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||||
@@ -229,7 +228,7 @@ layout("/layouts/platform.html"){
|
|||||||
label-width="0">
|
label-width="0">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="选择日期"
|
placeholder="请选择日期"
|
||||||
type="date"
|
type="date"
|
||||||
v-model="row.date"
|
v-model="row.date"
|
||||||
value-format="yyyy-MM-dd">
|
value-format="yyyy-MM-dd">
|
||||||
@@ -302,15 +301,10 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-form v-show="registerTypeName===2" ref="addForm3" :rules="rules"
|
<el-form v-show="registerTypeName===2" ref="addForm3" :rules="rules"
|
||||||
label-width="120px"
|
label-width="120px"
|
||||||
style="margin: 50px 0px 0px 0px">
|
no-auto-enhance style="margin: 50px 0px 0px 0px">
|
||||||
<el-table :data="jgUser" max-height="300">
|
<el-table :data="jgUser" max-height="300">
|
||||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||||
<el-table-column label="职务" prop="roleName">
|
<el-table-column label="职务" prop="roleName"></el-table-column>
|
||||||
<template slot-scope="scope">
|
|
||||||
<span v-if="scope.row.roleName">{{scope.row.roleName.replace('协会', '')}}</span>
|
|
||||||
<span v-else></span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||||
<el-table-column label="所属部门" prop="unitName"></el-table-column>
|
<el-table-column label="所属部门" prop="unitName"></el-table-column>
|
||||||
@@ -320,9 +314,7 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row v-if="isRegister === false" class="mt10" justify="end" type="flex">
|
<el-row v-if="isRegister === false" class="mt10" justify="end" type="flex">
|
||||||
<el-button @click="doSave" type="primary">
|
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||||
保存
|
|
||||||
</el-button>
|
|
||||||
<el-button type="primary"
|
<el-button type="primary"
|
||||||
@click="registerTypeName=registerTypeName-1"
|
@click="registerTypeName=registerTypeName-1"
|
||||||
v-show="registerTypeName!==0">上一步
|
v-show="registerTypeName!==0">上一步
|
||||||
@@ -330,9 +322,10 @@ layout("/layouts/platform.html"){
|
|||||||
<el-button type="primary" @click="next"
|
<el-button type="primary" @click="next"
|
||||||
v-show="registerTypeName!=2">下一步
|
v-show="registerTypeName!=2">下一步
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="doSubmit" type="primary"
|
<template v-show="registerTypeName===2">
|
||||||
v-show="registerTypeName===2">提交
|
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||||
</el-button>
|
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
|
||||||
|
</template>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -346,7 +339,8 @@ layout("/layouts/platform.html"){
|
|||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: GetQueryString("id"),
|
id: GetQueryString("bizId"),
|
||||||
|
taskId: GetQueryString("taskId"),
|
||||||
jcClubId: "",
|
jcClubId: "",
|
||||||
isRegister: false,
|
isRegister: false,
|
||||||
allocate: 0,
|
allocate: 0,
|
||||||
@@ -374,11 +368,8 @@ layout("/layouts/platform.html"){
|
|||||||
const resp = await this.$axios.post("/platform/club/examine/apply/getClubsByRole")
|
const resp = await this.$axios.post("/platform/club/examine/apply/getClubsByRole")
|
||||||
return resp.data
|
return resp.data
|
||||||
},
|
},
|
||||||
doBack() {
|
async onSave() {
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/examine/mine")
|
this.$axios.post("/platform/club/examine/apply/save", {
|
||||||
},
|
|
||||||
async doSave() {
|
|
||||||
this.$axios.post("/platform/club/examine/apply/doSave", {
|
|
||||||
data: JSON.stringify(this.formData),
|
data: JSON.stringify(this.formData),
|
||||||
incomeDetailed: JSON.stringify(this.cwsz.incomeDetailed),
|
incomeDetailed: JSON.stringify(this.cwsz.incomeDetailed),
|
||||||
incomeCensus: JSON.stringify(this.cwsz.incomeCensus)
|
incomeCensus: JSON.stringify(this.cwsz.incomeCensus)
|
||||||
@@ -389,14 +380,14 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async doSubmit() {
|
async onSubmit() {
|
||||||
const confirm = await this.$confirm("确定要提交此申请吗?", "提示", {
|
const confirm = await this.$confirm("确定要提交此申请吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "info"
|
type: "info"
|
||||||
})
|
})
|
||||||
if ("confirm" === confirm) {
|
if ("confirm" === confirm) {
|
||||||
const resp = await this.$axios.post("/platform/club/examine/apply/doSubmit", {
|
const resp = await this.$axios.post("/platform/club/examine/apply/submit", {
|
||||||
data: JSON.stringify(this.formData),
|
data: JSON.stringify(this.formData),
|
||||||
incomeDetailed: JSON.stringify(this.cwsz.incomeDetailed),
|
incomeDetailed: JSON.stringify(this.cwsz.incomeDetailed),
|
||||||
incomeCensus: JSON.stringify(this.cwsz.incomeCensus)
|
incomeCensus: JSON.stringify(this.cwsz.incomeCensus)
|
||||||
@@ -409,6 +400,25 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onFinishTask() {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/club/examine/apply/submitAgain', {
|
||||||
|
data: JSON.stringify(this.formData),
|
||||||
|
incomeDetailed: JSON.stringify(this.cwsz.incomeDetailed),
|
||||||
|
incomeCensus: JSON.stringify(this.cwsz.incomeCensus),
|
||||||
|
taskId: GetQueryString("taskId")
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
window.location.href = '/platform/club/examine/mine'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
async next() {
|
async next() {
|
||||||
let a = true
|
let a = true
|
||||||
let b = true
|
let b = true
|
||||||
@@ -437,7 +447,7 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
this.registerTypeName++
|
this.registerTypeName++
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning("请把信息填写完整")
|
//this.$message.warning("请把信息填写完整")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setIncomeDetailed() {
|
setIncomeDetailed() {
|
||||||
|
|||||||
@@ -51,20 +51,9 @@ layout("/layouts/platform.html"){
|
|||||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||||
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
|
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
|
||||||
<el-button v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
|
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-else-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
<!--<el-button
|
|
||||||
@click="doExport(row)"
|
|
||||||
v-if="row.processInstState === $processConstant.INSTANCE_STATE.FINISHED"
|
|
||||||
size="mini"
|
|
||||||
type="primary"
|
|
||||||
>
|
|
||||||
导出
|
|
||||||
</el-button>-->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -117,7 +106,7 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
onEdit(row) {
|
onEdit(row) {
|
||||||
location.href = '/platform/club/examine/apply?id=' + row.id
|
window.location.href = '/platform/club/examine/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
|
||||||
},
|
},
|
||||||
async onDelete(id) {
|
async onDelete(id) {
|
||||||
const confirm = await this.$confirm("此操作将永久删除, 是否继续?", "提示", {
|
const confirm = await this.$confirm("此操作将永久删除, 是否继续?", "提示", {
|
||||||
|
|||||||
@@ -0,0 +1,177 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
<style></style>
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度:">
|
||||||
|
<el-date-picker
|
||||||
|
placeholder="选择年度"
|
||||||
|
type="year"
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="pageForm.year"
|
||||||
|
value-format="yyyy"
|
||||||
|
></el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="协会名称:">
|
||||||
|
<el-input
|
||||||
|
@keyup.enter.native="doSearch"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入内容"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="pageForm.clubName"
|
||||||
|
></el-input>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card class="mt10" shadow="never">
|
||||||
|
<table-tool label="申请列表">
|
||||||
|
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||||
|
<el-radio-button :label="true">已审核</el-radio-button>
|
||||||
|
<el-radio-button :label="false">未审核</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData">
|
||||||
|
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||||
|
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="申请时间" prop="creatTime" sortable show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="变更用户" prop="changeUserName" sortable show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="旧身份" prop="oldRoleName" sortable show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="新身份" prop="nowRoleName" sortable show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="300px">
|
||||||
|
<template scope="{row}">
|
||||||
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
|
<el-button v-if="row.taskState === 10" @click="onAudit(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>
|
||||||
|
|
||||||
|
<template #edit>
|
||||||
|
<info ref="infoRef">
|
||||||
|
<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>
|
||||||
|
</info>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
<!--#include("../change/info.js"){}#-->
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
components: {
|
||||||
|
"info": clubManagerInfo,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageForm: {
|
||||||
|
approval: false
|
||||||
|
},
|
||||||
|
formData: {},
|
||||||
|
showApprovalForm: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onView(row) {
|
||||||
|
this.$refs.guava.edit(()=>{
|
||||||
|
this.showApprovalForm = false
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onAudit(row) {
|
||||||
|
this.$refs.guava.edit(()=>{
|
||||||
|
this.showApprovalForm = true
|
||||||
|
this.formData = {
|
||||||
|
processTaskId: row.taskId,
|
||||||
|
taskName: row.curTaskName
|
||||||
|
}
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleTaskAction(val) {
|
||||||
|
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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async pageData() {
|
||||||
|
const resp = await this.$axios.post("/platform/club/infoManage/auditManager/pageData", this.pageForm)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.tableData = resp.data.list
|
||||||
|
this.pageForm.totalCount = resp.data.totalCount
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
await this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -0,0 +1,256 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
<style></style>
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度:">
|
||||||
|
<el-date-picker
|
||||||
|
placeholder="选择年度"
|
||||||
|
type="year"
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="pageForm.year"
|
||||||
|
value-format="yyyy"
|
||||||
|
></el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="协会名称:">
|
||||||
|
<el-input
|
||||||
|
@keyup.enter.native="doSearch"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入内容"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="pageForm.clubName"
|
||||||
|
></el-input>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card class="mt10" shadow="never">
|
||||||
|
<table-tool label="申请列表">
|
||||||
|
<el-button type="primary" size="small" @click="openAdd">
|
||||||
|
<i class="ti-plus"></i>
|
||||||
|
变更成员
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData">
|
||||||
|
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||||
|
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="申请时间" prop="creatTime" sortable show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="变更用户" prop="changeUserName" sortable show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="旧身份" prop="oldRoleName" sortable show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="新身份" prop="nowRoleName" sortable show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="300">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
|
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||||
|
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
|
||||||
|
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #edit>
|
||||||
|
<el-form :model="formData" ref="formRef" size="small" label-width="80px" :rules="formRules">
|
||||||
|
<el-form-item label="协会名称" prop="clubId">
|
||||||
|
<el-select v-model="formData.clubId" @change="clubChange" placeholder="请选择协会" filterable clearable style="width: 100%">
|
||||||
|
<el-option v-for="item in clubList" :key="item.id" :label="item.clubName" :value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="协会成员" prop="userId">
|
||||||
|
<el-select v-model="formData.userId" @change="userChange" placeholder="请选择协会成员" filterable clearable style="width: 100%">
|
||||||
|
<el-option v-for="item in userList" :key="item.userId" :label="item.userName" :value="item.userId"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="身份" prop="nowRoleCode">
|
||||||
|
<el-checkbox-group v-model="formData.nowRoleCode">
|
||||||
|
<el-checkbox label="CLUB_PRESIDENT">协会会长</el-checkbox>
|
||||||
|
<el-checkbox label="CLUB_VICE_PRESIDENT">协会副会长</el-checkbox>
|
||||||
|
<el-checkbox label="CLUB_SECRETARY">协会秘书长</el-checkbox>
|
||||||
|
<el-checkbox label="CLUB_VICE_SECRETARY">协会副秘书长</el-checkbox>
|
||||||
|
<el-checkbox label="CLUB_OPERATOR">协会操作员</el-checkbox>
|
||||||
|
<el-checkbox label="CLUB_MEMBER">协会会员</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div style="float: right;margin: 20px 0">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="onSubmit" v-if="!taskId">提 交</el-button>
|
||||||
|
<el-button type="primary" @click="onFinishTask" v-else>提 交</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #view>
|
||||||
|
<info ref="infoRef"></info>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
<!--#include("info.js"){}#-->
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
components: {
|
||||||
|
"info": clubManagerInfo
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
id: '',
|
||||||
|
taskId: '',
|
||||||
|
clubList: [],
|
||||||
|
userList: [],
|
||||||
|
formData: {
|
||||||
|
nowRoleCode: [],
|
||||||
|
},
|
||||||
|
formRules: {
|
||||||
|
clubId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||||
|
userId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||||
|
nowRoleCode: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||||
|
},
|
||||||
|
viewData: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clubChange(key) {
|
||||||
|
if(!key) {
|
||||||
|
this.$set(this.formData, 'userId', '')
|
||||||
|
this.$set(this.formData, 'nowRoleCode', '')
|
||||||
|
}
|
||||||
|
this.$axios.post("/platform/club/infoManage/change/queryClubUsers", {clubId: this.formData.clubId}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.userList = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
userChange(key) {
|
||||||
|
const user = this.userList.find(o => o.userId === key)
|
||||||
|
this.$set(this.formData, 'nowRoleCode', user?.roleCode)
|
||||||
|
this.$set(this.formData, 'changeUserId', key)
|
||||||
|
this.$set(this.formData, 'changeUserName', user?.userName)
|
||||||
|
},
|
||||||
|
openAdd() {
|
||||||
|
this.id = ''
|
||||||
|
this.taskId = ''
|
||||||
|
this.$refs.guava.edit(() => {
|
||||||
|
this.formData = {nowRoleCode: []}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onRevoke(row) {
|
||||||
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onDelete(id) {
|
||||||
|
this.$confirm("您确定要删除吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/platform/club/infoManage/change/delete", { id: id }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onEdit(row) {
|
||||||
|
this.id = row.id
|
||||||
|
this.taskId = row.taskId
|
||||||
|
this.formData = clone(row)
|
||||||
|
this.$refs.guava.edit(() => {})
|
||||||
|
},
|
||||||
|
async onSubmit() {
|
||||||
|
this.$refs.formRef.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/club/infoManage/change/submit', {
|
||||||
|
data: JSON.stringify(this.formData)
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.pageData()
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.$refs.guava.index()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onFinishTask() {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/club/infoManage/change/submitAgain', {
|
||||||
|
data: JSON.stringify(this.formData),
|
||||||
|
taskId: this.taskId
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.pageData()
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.$refs.guava.index()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onView(row) {
|
||||||
|
this.$refs.guava.view(() =>{
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async getMyClub() {
|
||||||
|
const resp = await this.$axios.post("/platform/club/examine/apply/getClubsByRole")
|
||||||
|
this.clubList = resp.data
|
||||||
|
},
|
||||||
|
async pageData() {
|
||||||
|
const resp = await this.$axios.post("/platform/club/infoManage/change/pageData", this.pageForm)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.tableData = resp.data.list
|
||||||
|
this.pageForm.totalCount = resp.data.totalCount
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
await this.getMyClub()
|
||||||
|
await this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
const clubManagerInfo = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<div class="process-title">
|
||||||
|
申请信息
|
||||||
|
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||||
|
</div>
|
||||||
|
<el-descriptions :column="3" border>
|
||||||
|
<el-descriptions-item label="所属协会">{{ viewData.clubName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请人">{{ viewData.userName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请时间">{{ viewData.creatTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="变更用户">{{ viewData.changeUserName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="旧身份">{{ viewData.oldRoleName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="新身份">{{ viewData.nowRoleName }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<template v-for="task in doneTasks">
|
||||||
|
<div class="mt10">
|
||||||
|
<div class="process-title">{{ task.displayName }}</div>
|
||||||
|
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||||
|
v-if="task.ext.isFirstTaskNode">
|
||||||
|
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||||
|
}}({{task.ext.initiatorAccount}})
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="办理结果">
|
||||||
|
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||||
|
:value="task.ext.submitType"></dict-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||||
|
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||||
|
}}({{task.taskFormData.loginName}})
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="办理结果">
|
||||||
|
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||||
|
:value="task.ext.submitType"></dict-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||||
|
task.taskFormData.opinion }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<slot></slot>
|
||||||
|
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
store,
|
||||||
|
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
viewData: {},
|
||||||
|
doneTasks: [],
|
||||||
|
row: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onOpen(row) {
|
||||||
|
this.row = row
|
||||||
|
this.visible = true
|
||||||
|
this.getInfo()
|
||||||
|
this.getDoneTasks()
|
||||||
|
},
|
||||||
|
getInfo() {
|
||||||
|
this.viewData = clone(this.row)
|
||||||
|
},
|
||||||
|
// 获取已办任务审批记录
|
||||||
|
getDoneTasks() {
|
||||||
|
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.doneTasks = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查看流程图
|
||||||
|
openChart(){
|
||||||
|
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
.el-descriptions-item__label {
|
||||||
|
width: 200px;
|
||||||
|
min-width: 200px;
|
||||||
|
max-width: 200px;
|
||||||
|
}
|
||||||
|
.el-tabs__header {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
`
|
||||||
|
}
|
||||||
-149
@@ -1,149 +0,0 @@
|
|||||||
<!--#
|
|
||||||
layout("/layouts/platform.html"){
|
|
||||||
#-->
|
|
||||||
<style></style>
|
|
||||||
|
|
||||||
<div id="app" v-cloak>
|
|
||||||
<guava ref="guava">
|
|
||||||
<el-card shadow="never">
|
|
||||||
<search @search="doSearch">
|
|
||||||
<search-item label="协会名称:">
|
|
||||||
<el-select filterable placeholder="请选择协会" style="width: 100%" v-model="pageForm.clubId">
|
|
||||||
<el-option :label="item.clubName" :value="item.id" v-for="item in clubList"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
</search>
|
|
||||||
</el-card>
|
|
||||||
|
|
||||||
<el-card class="mt10" shadow="never">
|
|
||||||
<table-tool label="理事机构审核">
|
|
||||||
<el-button @click="doReview(false)" size="small" type="danger">批量不通过</el-button>
|
|
||||||
<el-button @click="doReview(true)" size="small" type="primary">批量通过</el-button>
|
|
||||||
</table-tool>
|
|
||||||
<el-table :data="tableData" @selection-change="handleSelectionChange" ref="table" :row-key="()=>{new Date().getTime()}">
|
|
||||||
<el-table-column :reserve-selection="true" type="selection" width="40"></el-table-column>
|
|
||||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
|
||||||
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
|
||||||
<el-table-column label="协会编码" prop="clubCode" sortable show-overflow-tooltip></el-table-column>
|
|
||||||
<el-table-column label="协会类型" prop="typeName" sortable show-overflow-tooltip></el-table-column>
|
|
||||||
<el-table-column label="成员" prop="userName" sortable show-overflow-tooltip></el-table-column>
|
|
||||||
<el-table-column label="职务" prop="roleCode" sortable show-overflow-tooltip>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{getRoleName(scope.row.roleCode)}}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="职务变更" prop="changeRoleCode" sortable show-overflow-tooltip>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div v-if="scope.row.changeRoleCode">
|
|
||||||
<span>{{getRoleName(scope.row.changeRoleCode)}}</span>
|
|
||||||
</div>
|
|
||||||
<span v-else>暂无变更</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="变更时间" prop="roleCodeChangeTime" sortable show-overflow-tooltip>
|
|
||||||
<template slot-scope="{row}">
|
|
||||||
<span v-if="row.changeRoleCode !== undefined">{{ $moment(row.roleCodeChangeTime).format('YYYY-MM-DD') }}</span>
|
|
||||||
<span v-else>暂无变更</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="状态" prop="state" sortable show-overflow-tooltip>
|
|
||||||
<template v-if="row.state === 1 || row.status === 3" slot-scope="{row}">
|
|
||||||
<span>待校工会审核</span>
|
|
||||||
</template>
|
|
||||||
<template v-else slot-scope="scope">暂无状态</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<!--#include("/layouts/pagination.html"){}#-->
|
|
||||||
</el-card>
|
|
||||||
</guava>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
<!--#include("../../common/clubRoleConstant.js"){}#-->
|
|
||||||
new Vue({
|
|
||||||
el: "#app",
|
|
||||||
mixins: [initTableMixins],
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
clubList: [],
|
|
||||||
multipleSelection: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getRoleName(roleCode) {
|
|
||||||
return CLUB_ROLE_CONSTANT.getRoleName(roleCode)
|
|
||||||
},
|
|
||||||
showFiles(row) {
|
|
||||||
if (row.replaceReport && row.replaceReport.length > 0) {
|
|
||||||
let res = row.replaceReport[0]
|
|
||||||
let fileId = res?.response?.data.substring(res?.response?.data.lastIndexOf("=") + 1)
|
|
||||||
let fileName = res?.name
|
|
||||||
window.open(
|
|
||||||
"/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent("/platform/sys/file/convertPDF?id=" + fileId),
|
|
||||||
fileName
|
|
||||||
)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getFileName(row) {
|
|
||||||
if (row.replaceReport && row.replaceReport.length > 0) {
|
|
||||||
return row.replaceReport[0].name
|
|
||||||
} else {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async doReview(flag) {
|
|
||||||
if (this.multipleSelection.length === 0) {
|
|
||||||
this.$message.warning("请先在多选框中选择")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const str = flag ? "通过" : "不通过"
|
|
||||||
const confirm = await this.$confirm("您确定要批量审核" + str + "吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
})
|
|
||||||
if (confirm === "confirm") {
|
|
||||||
const array = this.multipleSelection.map((o) => o.id)
|
|
||||||
const resp = await this.$axios.post("/platform/club/infoManage/clubManagePersonAudit/doAudit", {
|
|
||||||
ids: JSON.stringify(array),
|
|
||||||
isPass: flag
|
|
||||||
})
|
|
||||||
if (resp.code === 0) {
|
|
||||||
this.$message.success(resp.msg)
|
|
||||||
this.$refs.table.clearSelection()
|
|
||||||
await this.pageData()
|
|
||||||
} else {
|
|
||||||
this.$message.warning(resp.msg)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleSelectionChange(val) {
|
|
||||||
this.multipleSelection = val
|
|
||||||
},
|
|
||||||
async pageData() {
|
|
||||||
const resp = await this.$axios.post("/platform/club/infoManage/clubManagePersonAudit/pageData", this.pageForm)
|
|
||||||
if (resp.code === 0) {
|
|
||||||
this.tableData = resp.data.list
|
|
||||||
this.pageForm.totalCount = resp.data.totalCount
|
|
||||||
} else {
|
|
||||||
this.$message.warning(resp.msg)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async getAllClub() {
|
|
||||||
const resp = await this.$axios.post("/platform/club/infoManage/clubManagePersonAudit/getAllClub")
|
|
||||||
if (resp.code === 0) {
|
|
||||||
this.clubList = resp.data
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async created() {
|
|
||||||
await this.getAllClub()
|
|
||||||
await this.pageData()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!--#
|
|
||||||
}
|
|
||||||
#-->
|
|
||||||
@@ -17,10 +17,12 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
|
|||||||
|
|
||||||
<el-card shadow="never" class="mt10">
|
<el-card shadow="never" class="mt10">
|
||||||
<table-tool label="会员信息">
|
<table-tool label="会员信息">
|
||||||
|
<template v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">
|
||||||
<el-button size="small" type="primary" icon="el-icon-download" @click="exportRegistrationDoc">导出登记表</el-button>
|
<el-button size="small" type="primary" icon="el-icon-download" @click="exportRegistrationDoc">导出登记表</el-button>
|
||||||
<el-button @click="openImport" size="small" type="primary">导入成员</el-button>
|
<el-button @click="openImport" size="small" type="primary">导入成员</el-button>
|
||||||
<el-button size="small" type="primary" @click="openUserAdd(true)">录入成员</el-button>
|
<el-button size="small" type="primary" @click="openUserAdd(true)">录入成员</el-button>
|
||||||
<el-button size="small" type="primary" @click="openUserAdd(false)">设置理事机构</el-button>
|
<el-button size="small" type="primary" @click="openUserAdd(false)">设置理事机构</el-button>
|
||||||
|
</template>
|
||||||
<el-radio-group @change="doSearch" style="margin-left: 10px" v-model="pageForm.radioType" size="small">
|
<el-radio-group @change="doSearch" style="margin-left: 10px" v-model="pageForm.radioType" size="small">
|
||||||
<el-radio-button label="3">全部</el-radio-button>
|
<el-radio-button label="3">全部</el-radio-button>
|
||||||
<el-radio-button label="2">协会成员</el-radio-button>
|
<el-radio-button label="2">协会成员</el-radio-button>
|
||||||
@@ -43,26 +45,9 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
|
|||||||
<span class="ti-angle-down"></span>
|
<span class="ti-angle-down"></span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<template>
|
<el-dropdown-item @click.native="updateRoleCode(row)" class="text-primary">
|
||||||
<el-dropdown-item v-if="row.roleCode !== 'CLUB_PRESIDENT'" @click.native="updateRoleCode(row, 'CLUB_PRESIDENT', '会长')" class="text-primary">
|
设置身份
|
||||||
设置会长
|
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item v-if="row.roleCode !== 'CLUB_VICE_PRESIDENT'" @click.native="updateRoleCode(row, 'CLUB_VICE_PRESIDENT', '副会长')" class="text-primary">
|
|
||||||
设置副会长
|
|
||||||
</el-dropdown-item>
|
|
||||||
<el-dropdown-item v-if="row.roleCode !== 'CLUB_SECRETARY'" @click.native="updateRoleCode(row, 'CLUB_SECRETARY', '秘书长')" class="text-primary">
|
|
||||||
设置秘书长
|
|
||||||
</el-dropdown-item>
|
|
||||||
<el-dropdown-item v-if="row.roleCode !== 'CLUB_VICE_SECRETARY'" @click.native="updateRoleCode(row, 'CLUB_VICE_SECRETARY', '副秘书长')" class="text-primary">
|
|
||||||
设置副秘书长
|
|
||||||
</el-dropdown-item>
|
|
||||||
<el-dropdown-item v-if="row.roleCode !== 'CLUB_OPERATOR'" @click.native="updateRoleCode(row, 'CLUB_OPERATOR', '操作员')" class="text-primary">
|
|
||||||
设置操作员
|
|
||||||
</el-dropdown-item>
|
|
||||||
<el-dropdown-item v-if="row.roleCode !== 'CLUB_MEMBER'" @click.native="updateRoleCode(row, 'CLUB_MEMBER', '会员')" class="text-primary">
|
|
||||||
设置会员
|
|
||||||
</el-dropdown-item>
|
|
||||||
</template>
|
|
||||||
<!--<el-dropdown-item @click.native="viewInfo(row)">查看注册信息</el-dropdown-item>
|
<!--<el-dropdown-item @click.native="viewInfo(row)">查看注册信息</el-dropdown-item>
|
||||||
<el-dropdown-item @click.native="exportInfo(row)">导出登记表</el-dropdown-item>-->
|
<el-dropdown-item @click.native="exportInfo(row)">导出登记表</el-dropdown-item>-->
|
||||||
<el-dropdown-item @click.native="userDelete(row)">删除</el-dropdown-item>
|
<el-dropdown-item @click.native="userDelete(row)">删除</el-dropdown-item>
|
||||||
@@ -90,6 +75,7 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
|
|||||||
<el-form :model="formData" ref="userForm" :rules="userFormRules" label-width="80px">
|
<el-form :model="formData" ref="userForm" :rules="userFormRules" label-width="80px">
|
||||||
<el-form-item label="成员" prop="users">
|
<el-form-item label="成员" prop="users">
|
||||||
<el-select v-model="formData.users" style="width: 100%" multiple filterable
|
<el-select v-model="formData.users" style="width: 100%" multiple filterable
|
||||||
|
placeholder="请根据姓名或工号选择"
|
||||||
remote reserve-keyword :remote-method="selectUser">
|
remote reserve-keyword :remote-method="selectUser">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in userOptions"
|
v-for="item in userOptions"
|
||||||
@@ -130,6 +116,31 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
|
|||||||
@flush="successImport" :business_id="parentNode.currentTreeData.id"
|
@flush="successImport" :business_id="parentNode.currentTreeData.id"
|
||||||
></file-import>
|
></file-import>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog title="设置身份" :visible.sync="roleCodeDialogVisible" :close-on-click-modal="false" width="46%">
|
||||||
|
<el-form :model="roleCodeFormData" ref="roleCodeForm" :rules="roleCodeFormRules" label-width="60px">
|
||||||
|
<el-form-item prop="userName" label="姓名">
|
||||||
|
<el-input disabled placeholder="请输入姓名" v-model="roleCodeFormData.userName"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="loginName" label="工号">
|
||||||
|
<el-input disabled placeholder="请输入工号" v-model="roleCodeFormData.loginName"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="roleCode" label="身份">
|
||||||
|
<el-checkbox-group v-model="roleCodeFormData.roleCode">
|
||||||
|
<el-checkbox label="CLUB_PRESIDENT">协会会长</el-checkbox>
|
||||||
|
<el-checkbox label="CLUB_VICE_PRESIDENT">协会副会长</el-checkbox>
|
||||||
|
<el-checkbox label="CLUB_SECRETARY">协会秘书长</el-checkbox>
|
||||||
|
<el-checkbox label="CLUB_VICE_SECRETARY">协会副秘书长</el-checkbox>
|
||||||
|
<el-checkbox label="CLUB_OPERATOR">协会操作员</el-checkbox>
|
||||||
|
<el-checkbox label="CLUB_MEMBER">协会会员</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="roleCodeDialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="onRoleCode">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
@@ -141,13 +152,20 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
roleCodeFormData: {},
|
||||||
|
roleCodeFormRules: {
|
||||||
|
userName: [{ required: true, message: "必填", trigger: ["blur"] }],
|
||||||
|
loginName: [{ required: true, message: "必填", trigger: ["blur"] }],
|
||||||
|
roleCode: [{ required: true, message: "必填", trigger: ["blur"] }],
|
||||||
|
},
|
||||||
|
roleCodeDialogVisible: false,
|
||||||
userOptions: [],
|
userOptions: [],
|
||||||
addMember: false,
|
addMember: false,
|
||||||
addDialogVisible: false,
|
addDialogVisible: false,
|
||||||
userFormRules: {
|
userFormRules: {
|
||||||
users: [{ required: true, message: "必选", trigger: ["blur"] }],
|
users: [{ required: true, message: "必填", trigger: ["blur"] }],
|
||||||
payed: [{ required: true, message: "必选", trigger: ["blur", "change"] }],
|
payed: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
||||||
roleCode: [{ required: true, message: "必选", trigger: ["blur", "change"] }]
|
roleCode: [{ required: true, message: "必填", trigger: ["blur", "change"] }]
|
||||||
},
|
},
|
||||||
formData: {
|
formData: {
|
||||||
users: []
|
users: []
|
||||||
@@ -245,25 +263,34 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async updateRoleCode(row, roleCode, roleName) {
|
updateRoleCode(row) {
|
||||||
const confirm = await this.$confirm("确定要设置为" + roleName + "吗?", "提示", {
|
this.roleCodeFormData = clone(row)
|
||||||
|
this.roleCodeDialogVisible = true
|
||||||
|
},
|
||||||
|
onRoleCode() {
|
||||||
|
this.$refs.roleCodeForm.validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const confirm = await this.$confirm("您确定要提交吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
})
|
})
|
||||||
if (confirm === "confirm") {
|
if (confirm === "confirm") {
|
||||||
const resp = await this.$axios.post("/platform/club/infoManage/manage/updateRoleCode", {
|
const resp = await this.$axios.post("/platform/club/infoManage/manage/updateRoleCode", {
|
||||||
id: row.id,
|
id: this.roleCodeFormData.id,
|
||||||
clubId: row.clubId,
|
roleCodes: JSON.stringify(this.roleCodeFormData.roleCode),
|
||||||
roleCode: roleCode
|
clubId: this.roleCodeFormData.clubId
|
||||||
})
|
})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$message.success(resp.msg)
|
this.$message.success(resp.msg)
|
||||||
await this.pageData()
|
await this.pageData()
|
||||||
|
this.roleCodeDialogVisible = false
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(resp.msg)
|
this.$message.warning(resp.msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
async userDelete(row) {
|
async userDelete(row) {
|
||||||
const confirm = await this.$confirm("删除后年度统计时将不会纳入年度减少人数,确定要将" + row.userName + "删除吗?", "提示", {
|
const confirm = await this.$confirm("删除后年度统计时将不会纳入年度减少人数,确定要将" + row.userName + "删除吗?", "提示", {
|
||||||
|
|||||||
@@ -31,41 +31,31 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="mt10" shadow="never">
|
<el-card class="mt10" shadow="never">
|
||||||
|
<table-tool label="申请列表">
|
||||||
|
<el-button type="primary" size="small" @click="openAdd">
|
||||||
|
<i class="ti-plus"></i>
|
||||||
|
上传报告
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
<el-table :data="tableData">
|
<el-table :data="tableData">
|
||||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||||
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="协会类型" prop="typeName" sortable show-overflow-tooltip></el-table-column>
|
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="申请时间" prop="createTime" sortable show-overflow-tooltip>
|
<el-table-column label="申请时间" prop="creatTime" sortable show-overflow-tooltip></el-table-column>
|
||||||
<template slot-scope="{row}">
|
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
|
||||||
<span>{{ $moment(row.createTime).format('YYYY-MM-DD') }}</span>
|
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="成立时间" prop="foundTime" sortable show-overflow-tooltip>
|
<el-table-column label="操作" width="300">
|
||||||
<template slot-scope="{row}">
|
<template v-slot="{row}">
|
||||||
<span>{{ $moment(row.foundTime).format('YYYY-MM-DD') }}</span>
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
</template>
|
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||||
</el-table-column>
|
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
|
||||||
<el-table-column label="联系人" prop="concatPersonName" sortable show-overflow-tooltip></el-table-column>
|
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
|
||||||
<el-table-column label="发起人" prop="sponsorName" sortable show-overflow-tooltip></el-table-column>
|
删除
|
||||||
<el-table-column label="换届报告" prop="replaceReport" sortable show-overflow-tooltip>
|
</el-button>
|
||||||
<template scope="scope">
|
|
||||||
<span style="color: #0e78c5; text-decoration: underline; cursor: pointer" @click="showFiles(scope.row)">
|
|
||||||
{{getFileName(scope.row)}}
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="审核状态" prop="reportState" sortable show-overflow-tooltip>
|
|
||||||
<template scope="scope">
|
|
||||||
<span v-if="scope.row.reportState === 1">待校工会审核</span>
|
|
||||||
<span v-if="scope.row.reportState === 2">校工会审核不通过</span>
|
|
||||||
<span v-if="scope.row.reportState === 3">审核通过</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="操作" width="300px">
|
|
||||||
<template scope="{row}">
|
|
||||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
|
||||||
<el-button @click="uploadRefreshReport(row)" size="mini" type="primary">上传换届报告</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -73,91 +63,148 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #view>
|
<template #edit>
|
||||||
<club-info ref="info"></club-info>
|
<el-form :model="formData" ref="formRef" size="small" label-width="80px" :rules="formRules">
|
||||||
</template>
|
<el-form-item label="协会名称" prop="clubId">
|
||||||
</guava>
|
<el-select v-model="formData.clubId" placeholder="请选择协会" filterable clearable style="width: 100%">
|
||||||
|
<el-option v-for="item in clubList" :key="item.id" :label="item.clubName" :value="item.id"></el-option>
|
||||||
<el-dialog width="40%" :visible.sync="refreshDialogVisible" title="上传换届报告">
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="换届报告" prop="files">
|
||||||
<file-upload
|
<file-upload
|
||||||
:value.sync="replaceReport"
|
:value.sync="formData.files"
|
||||||
:upload_number="1"
|
:upload_number="1"
|
||||||
upload_result_category="array"
|
upload_result_category="array"
|
||||||
complete_result
|
complete_result
|
||||||
upload_mode="drag"
|
upload_mode="drag"
|
||||||
accept=".doc,.docx,.pdf"
|
accept=".doc,.docx,.pdf"
|
||||||
></file-upload>
|
></file-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div style="float: right;margin: 20px 0">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="onSubmit" v-if="!taskId">提 交</el-button>
|
||||||
|
<el-button type="primary" @click="onFinishTask" v-else>提 交</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<span slot="footer" class="dialog-footer">
|
<template #view>
|
||||||
<el-button @click="refreshDialogVisible = false">取消</el-button>
|
<info ref="infoRef"></info>
|
||||||
<el-button type="primary" @click="refreshDo">确定</el-button>
|
</template>
|
||||||
</span>
|
</guava>
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
<!--#include("../../common/clubInfoComponent.js"){}#-->
|
<!--#include("info.js"){}#-->
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
components: {
|
components: {
|
||||||
"club-info": REGISTER_INFO_COMPONENT
|
"info": clubRefreshInfo,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
refreshDialogVisible: false,
|
id: '',
|
||||||
replaceReport: [],
|
taskId: '',
|
||||||
clickRow: {}
|
clubList: [],
|
||||||
|
formData: {},
|
||||||
|
formRules: {
|
||||||
|
clubId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||||
|
files: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||||
|
},
|
||||||
|
viewData: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showFiles(row) {
|
openAdd() {
|
||||||
if (row.replaceReport && row.replaceReport.length > 0) {
|
this.id = ''
|
||||||
let res = row.replaceReport[0]
|
this.taskId = ''
|
||||||
let fileId = res?.response?.data.substring(res?.response?.data.lastIndexOf("=") + 1)
|
this.$refs.guava.edit(() => {
|
||||||
let fileName = res?.name
|
this.formData = {}
|
||||||
window.open(
|
})
|
||||||
"/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent("/platform/sys/file/convertPDF?id=" + fileId),
|
|
||||||
fileName
|
|
||||||
)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getFileName(row) {
|
onRevoke(row) {
|
||||||
if (row.replaceReport && row.replaceReport.length > 0) {
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
return row.replaceReport[0].name
|
|
||||||
} else {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async refreshDo() {
|
|
||||||
const confirm = await this.$confirm("您确定要上传换届报告吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
})
|
}).then(() => {
|
||||||
if (confirm === "confirm") {
|
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
|
||||||
const resp = await this.$axios.post("/platform/club/infoManage/refreshReport/refreshDo", {
|
if (res.code === 0) {
|
||||||
id: this.clickRow.id,
|
this.$message.success(res.msg)
|
||||||
replaceReport: JSON.stringify(this.replaceReport)
|
this.pageData()
|
||||||
})
|
|
||||||
if (resp.code === 0) {
|
|
||||||
this.$message.success(resp.msg)
|
|
||||||
this.refreshDialogVisible = false
|
|
||||||
this.doSearch()
|
|
||||||
} else {
|
|
||||||
this.$message.warning(resp.msg)
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
uploadRefreshReport(row) {
|
|
||||||
this.clickRow = row
|
|
||||||
this.replaceReport = []
|
|
||||||
this.refreshDialogVisible = true
|
|
||||||
},
|
|
||||||
openView(row) {
|
|
||||||
this.$refs.guava.view(() => {
|
|
||||||
this.$refs.info.onOpen(row.id)
|
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onDelete(id) {
|
||||||
|
this.$confirm("您确定要删除吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/platform/club/infoManage/refreshReport/delete", { id: id }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onEdit(row) {
|
||||||
|
this.id = row.id
|
||||||
|
this.taskId = row.taskId
|
||||||
|
this.formData = clone(row)
|
||||||
|
this.formData.files = JSON.parse(this.formData.files)
|
||||||
|
this.$refs.guava.edit(() => {})
|
||||||
|
},
|
||||||
|
async onSubmit() {
|
||||||
|
this.$refs.formRef.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/club/infoManage/refreshReport/submit', {
|
||||||
|
data: JSON.stringify(this.formData)
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.pageData()
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.$refs.guava.index()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onFinishTask() {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/club/infoManage/refreshReport/submitAgain', {
|
||||||
|
data: JSON.stringify(this.formData),
|
||||||
|
taskId: this.taskId
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.pageData()
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.$refs.guava.index()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onView(row) {
|
||||||
|
this.$refs.guava.view(() =>{
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async getMyClub() {
|
||||||
|
const resp = await this.$axios.post("/platform/club/examine/apply/getClubsByRole")
|
||||||
|
this.clubList = resp.data
|
||||||
},
|
},
|
||||||
async pageData() {
|
async pageData() {
|
||||||
const resp = await this.$axios.post("/platform/club/infoManage/refreshReport/pageData", this.pageForm)
|
const resp = await this.$axios.post("/platform/club/infoManage/refreshReport/pageData", this.pageForm)
|
||||||
@@ -170,6 +217,7 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
|
await this.getMyClub()
|
||||||
await this.pageData()
|
await this.pageData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,103 @@
|
|||||||
|
const clubRefreshInfo = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<div class="process-title">
|
||||||
|
申请信息
|
||||||
|
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||||
|
</div>
|
||||||
|
<el-descriptions :column="3" border>
|
||||||
|
<el-descriptions-item label="所属协会">{{ viewData.clubName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请人">{{ viewData.userName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请时间">{{ viewData.creatTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="上一次换届报告" :span="3">
|
||||||
|
<file-preview v-if="viewData.lastFiles && viewData.lastFiles.length > 0" :files="viewData.lastFiles" complete_result></file-preview>
|
||||||
|
<span v-else>暂无附件</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="换届报告" :span="3">
|
||||||
|
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files" complete_result></file-preview>
|
||||||
|
<span v-else>暂无附件</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<template v-for="task in doneTasks">
|
||||||
|
<div class="mt10">
|
||||||
|
<div class="process-title">{{ task.displayName }}</div>
|
||||||
|
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||||
|
v-if="task.ext.isFirstTaskNode">
|
||||||
|
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||||
|
}}({{task.ext.initiatorAccount}})
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="办理结果">
|
||||||
|
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||||
|
:value="task.ext.submitType"></dict-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||||
|
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||||
|
}}({{task.taskFormData.loginName}})
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="办理结果">
|
||||||
|
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||||
|
:value="task.ext.submitType"></dict-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||||
|
task.taskFormData.opinion }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<slot></slot>
|
||||||
|
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
store,
|
||||||
|
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
viewData: {},
|
||||||
|
doneTasks: [],
|
||||||
|
row: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onOpen(row) {
|
||||||
|
this.row = row
|
||||||
|
this.visible = true
|
||||||
|
this.getInfo()
|
||||||
|
this.getDoneTasks()
|
||||||
|
},
|
||||||
|
getInfo() {
|
||||||
|
this.viewData = clone(this.row)
|
||||||
|
this.viewData.files = JSON.parse(this.viewData.files)
|
||||||
|
if(this.viewData.lastFiles) {
|
||||||
|
this.viewData.lastFiles = JSON.parse(this.viewData.lastFiles)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取已办任务审批记录
|
||||||
|
getDoneTasks() {
|
||||||
|
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.doneTasks = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查看流程图
|
||||||
|
openChart(){
|
||||||
|
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
.el-descriptions-item__label {
|
||||||
|
width: 200px;
|
||||||
|
min-width: 200px;
|
||||||
|
max-width: 200px;
|
||||||
|
}
|
||||||
|
.el-tabs__header {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
`
|
||||||
|
}
|
||||||
@@ -31,42 +31,31 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="mt10" shadow="never">
|
<el-card class="mt10" shadow="never">
|
||||||
|
<table-tool label="申请列表">
|
||||||
|
<el-button type="primary" size="small" @click="openAdd">
|
||||||
|
<i class="ti-plus"></i>
|
||||||
|
章程修订
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
<el-table :data="tableData">
|
<el-table :data="tableData">
|
||||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||||
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="协会类型" prop="typeName" sortable show-overflow-tooltip></el-table-column>
|
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="申请时间" prop="createTime" sortable show-overflow-tooltip>
|
<el-table-column label="申请时间" prop="creatTime" sortable show-overflow-tooltip></el-table-column>
|
||||||
<template slot-scope="{row}">
|
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
|
||||||
<span>{{ $moment(row.createTime).format('YYYY-MM-DD') }}</span>
|
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="成立时间" prop="foundTime" sortable show-overflow-tooltip>
|
<el-table-column label="操作" width="300">
|
||||||
<template slot-scope="{row}">
|
<template v-slot="{row}">
|
||||||
<span>{{ $moment(row.foundTime).format('YYYY-MM-DD') }}</span>
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
</template>
|
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||||
</el-table-column>
|
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
|
||||||
<el-table-column label="联系人" prop="concatPersonName" sortable show-overflow-tooltip></el-table-column>
|
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
|
||||||
<el-table-column label="发起人" prop="sponsorName" sortable show-overflow-tooltip></el-table-column>
|
删除
|
||||||
<el-table-column label="协会章程" prop="afterRulesFile" sortable show-overflow-tooltip>
|
</el-button>
|
||||||
<template scope="scope">
|
|
||||||
<span style="color: #0e78c5; text-decoration: underline; cursor: pointer" @click="showFiles(scope.row)">
|
|
||||||
{{getFileName(scope.row)}}
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="审核状态" prop="ruleState" sortable show-overflow-tooltip>
|
|
||||||
<template scope="scope">
|
|
||||||
<span v-if="scope.row.ruleState === 1">待校工会审核</span>
|
|
||||||
<span v-if="scope.row.ruleState === 2">校工会审核不通过</span>
|
|
||||||
<span v-if="scope.row.ruleState === 3">审核通过</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="操作" width="200px">
|
|
||||||
<template scope="{row}">
|
|
||||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
|
||||||
<el-button @click="uploadRule(row)" size="mini" type="primary">章程修订</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -74,95 +63,148 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #view>
|
<template #edit>
|
||||||
<club-info ref="info"></club-info>
|
<el-form :model="formData" ref="formRef" size="small" label-width="80px" :rules="formRules">
|
||||||
</template>
|
<el-form-item label="协会名称" prop="clubId">
|
||||||
</guava>
|
<el-select v-model="formData.clubId" placeholder="请选择协会" filterable clearable style="width: 100%">
|
||||||
|
<el-option v-for="item in clubList" :key="item.id" :label="item.clubName" :value="item.id"></el-option>
|
||||||
<el-dialog width="40%" :visible.sync="ruleDialogVisible" title="章程修订">
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="协会章程" prop="files">
|
||||||
<file-upload
|
<file-upload
|
||||||
:value.sync="ruleReport"
|
:value.sync="formData.files"
|
||||||
:upload_number="1"
|
:upload_number="1"
|
||||||
upload_result_category="array"
|
upload_result_category="array"
|
||||||
complete_result
|
complete_result
|
||||||
upload_mode="drag"
|
upload_mode="drag"
|
||||||
accept=".doc,.docx,.pdf"
|
accept=".doc,.docx,.pdf"
|
||||||
></file-upload>
|
></file-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div style="float: right;margin: 20px 0">
|
||||||
|
<el-button @click="ruleDialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="onSubmit" v-if="!taskId">提 交</el-button>
|
||||||
|
<el-button type="primary" @click="onFinishTask" v-else>提 交</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<span slot="footer" class="dialog-footer">
|
<template #view>
|
||||||
<el-button @click="ruleDialogVisible = false">取消</el-button>
|
<info ref="infoRef"></info>
|
||||||
<el-button type="primary" @click="ruleDo">确定</el-button>
|
</template>
|
||||||
</span>
|
</guava>
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
<!--#include("../../common/clubInfoComponent.js"){}#-->
|
<!--#include("info.js"){}#-->
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
components: {
|
components: {
|
||||||
"club-info": REGISTER_INFO_COMPONENT
|
"info": clubRuleInfo,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ruleDialogVisible: false,
|
id: '',
|
||||||
ruleReport: [],
|
taskId: '',
|
||||||
clickRow: {}
|
clubList: [],
|
||||||
|
formData: {},
|
||||||
|
formRules: {
|
||||||
|
clubId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||||
|
files: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||||
|
},
|
||||||
|
viewData: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showFiles(row) {
|
openAdd() {
|
||||||
if (row.afterRulesFile && row.afterRulesFile.length > 0) {
|
this.id = ''
|
||||||
let res = row.afterRulesFile[0]
|
this.taskId = ''
|
||||||
let fileId = res?.response?.data.substring(res?.response?.data.lastIndexOf("=") + 1)
|
this.$refs.guava.edit(() => {
|
||||||
let fileName = res?.name
|
this.formData = {}
|
||||||
window.open(
|
})
|
||||||
"/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent("/platform/sys/file/convertPDF?id=" + fileId),
|
|
||||||
fileName
|
|
||||||
)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getFileName(row) {
|
onRevoke(row) {
|
||||||
if (row.afterRulesFile && row.afterRulesFile.length > 0) {
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
return row.afterRulesFile[0].name
|
|
||||||
} else {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async ruleDo() {
|
|
||||||
const confirm = await this.$confirm("您确定要修订章程吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
})
|
}).then(() => {
|
||||||
if (confirm === "confirm") {
|
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
|
||||||
const resp = await this.$axios.post("/platform/club/infoManage/ruleUpdate/ruleDo", {
|
if (res.code === 0) {
|
||||||
id: this.clickRow.id,
|
this.$message.success(res.msg)
|
||||||
afterRulesFile: JSON.stringify(this.ruleReport)
|
this.pageData()
|
||||||
})
|
|
||||||
if (resp.code === 0) {
|
|
||||||
this.$message.success(resp.msg)
|
|
||||||
this.ruleDialogVisible = false
|
|
||||||
this.doSearch()
|
|
||||||
} else {
|
|
||||||
this.$message.warning(resp.msg)
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
uploadRule(row) {
|
|
||||||
/*if(row.afterRulesFile && row.ruleState === 1) {
|
|
||||||
this.$message.warning('您已上传新的协会章程,待校工会审核')
|
|
||||||
return
|
|
||||||
}*/
|
|
||||||
this.clickRow = row
|
|
||||||
this.ruleReport = []
|
|
||||||
this.ruleDialogVisible = true
|
|
||||||
},
|
|
||||||
openView(row) {
|
|
||||||
this.$refs.guava.view(() => {
|
|
||||||
this.$refs.info.onOpen(row.id)
|
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onDelete(id) {
|
||||||
|
this.$confirm("您确定要删除吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/platform/club/infoManage/ruleUpdate/delete", { id: id }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onEdit(row) {
|
||||||
|
this.id = row.id
|
||||||
|
this.taskId = row.taskId
|
||||||
|
this.formData = clone(row)
|
||||||
|
this.formData.files = JSON.parse(this.formData.files)
|
||||||
|
this.$refs.guava.edit(() => {})
|
||||||
|
},
|
||||||
|
async onSubmit() {
|
||||||
|
this.$refs.formRef.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/club/infoManage/ruleUpdate/submit', {
|
||||||
|
data: JSON.stringify(this.formData)
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.pageData()
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.$refs.guava.index()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onFinishTask() {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/club/infoManage/ruleUpdate/submitAgain', {
|
||||||
|
data: JSON.stringify(this.formData),
|
||||||
|
taskId: this.taskId
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.pageData()
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.$refs.guava.index()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onView(row) {
|
||||||
|
this.$refs.guava.view(() =>{
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async getMyClub() {
|
||||||
|
const resp = await this.$axios.post("/platform/club/examine/apply/getClubsByRole")
|
||||||
|
this.clubList = resp.data
|
||||||
},
|
},
|
||||||
async pageData() {
|
async pageData() {
|
||||||
const resp = await this.$axios.post("/platform/club/infoManage/ruleUpdate/pageData", this.pageForm)
|
const resp = await this.$axios.post("/platform/club/infoManage/ruleUpdate/pageData", this.pageForm)
|
||||||
@@ -175,6 +217,7 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
|
await this.getMyClub()
|
||||||
await this.pageData()
|
await this.pageData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,103 @@
|
|||||||
|
const clubRuleInfo = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<div class="process-title">
|
||||||
|
申请信息
|
||||||
|
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||||
|
</div>
|
||||||
|
<el-descriptions :column="3" border>
|
||||||
|
<el-descriptions-item label="所属协会">{{ viewData.clubName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请人">{{ viewData.userName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请时间">{{ viewData.creatTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="上一次协会章程" :span="3">
|
||||||
|
<file-preview v-if="viewData.lastFiles && viewData.lastFiles.length > 0" :files="viewData.lastFiles" complete_result></file-preview>
|
||||||
|
<span v-else>暂无附件</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="协会章程" :span="3">
|
||||||
|
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files" complete_result></file-preview>
|
||||||
|
<span v-else>暂无附件</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<template v-for="task in doneTasks">
|
||||||
|
<div class="mt10">
|
||||||
|
<div class="process-title">{{ task.displayName }}</div>
|
||||||
|
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||||
|
v-if="task.ext.isFirstTaskNode">
|
||||||
|
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||||
|
}}({{task.ext.initiatorAccount}})
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="办理结果">
|
||||||
|
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||||
|
:value="task.ext.submitType"></dict-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||||
|
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||||
|
}}({{task.taskFormData.loginName}})
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="办理结果">
|
||||||
|
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||||
|
:value="task.ext.submitType"></dict-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||||
|
task.taskFormData.opinion }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<slot></slot>
|
||||||
|
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
store,
|
||||||
|
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
viewData: {},
|
||||||
|
doneTasks: [],
|
||||||
|
row: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onOpen(row) {
|
||||||
|
this.row = row
|
||||||
|
this.visible = true
|
||||||
|
this.getInfo()
|
||||||
|
this.getDoneTasks()
|
||||||
|
},
|
||||||
|
getInfo() {
|
||||||
|
this.viewData = clone(this.row)
|
||||||
|
this.viewData.files = JSON.parse(this.viewData.files)
|
||||||
|
if(this.viewData.lastFiles) {
|
||||||
|
this.viewData.lastFiles = JSON.parse(this.viewData.lastFiles)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取已办任务审批记录
|
||||||
|
getDoneTasks() {
|
||||||
|
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.doneTasks = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查看流程图
|
||||||
|
openChart(){
|
||||||
|
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
.el-descriptions-item__label {
|
||||||
|
width: 200px;
|
||||||
|
min-width: 200px;
|
||||||
|
max-width: 200px;
|
||||||
|
}
|
||||||
|
.el-tabs__header {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
`
|
||||||
|
}
|
||||||
+82
-85
@@ -31,40 +31,28 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="mt10" shadow="never">
|
<el-card class="mt10" shadow="never">
|
||||||
|
<table-tool label="申请列表">
|
||||||
|
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||||
|
<el-radio-button :label="true">已审核</el-radio-button>
|
||||||
|
<el-radio-button :label="false">未审核</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</table-tool>
|
||||||
<el-table :data="tableData">
|
<el-table :data="tableData">
|
||||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||||
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="协会类型" prop="typeName" sortable show-overflow-tooltip></el-table-column>
|
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="申请时间" prop="createTime" sortable show-overflow-tooltip>
|
<el-table-column label="申请时间" prop="creatTime" sortable show-overflow-tooltip></el-table-column>
|
||||||
<template slot-scope="{row}">
|
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
|
||||||
<span>{{ $moment(row.createTime).format('YYYY-MM-DD') }}</span>
|
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="成立时间" prop="foundTime" sortable show-overflow-tooltip>
|
<el-table-column label="操作" width="300px">
|
||||||
<template slot-scope="{row}">
|
|
||||||
<span>{{ $moment(row.foundTime).format('YYYY-MM-DD') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="联系人" prop="concatPersonName" sortable show-overflow-tooltip></el-table-column>
|
|
||||||
<el-table-column label="发起人" prop="sponsorName" sortable show-overflow-tooltip></el-table-column>
|
|
||||||
<el-table-column label="换届报告" prop="replaceReport" sortable show-overflow-tooltip>
|
|
||||||
<template scope="scope">
|
|
||||||
<span style="color: #0e78c5; text-decoration: underline; cursor: pointer" @click="showFiles(scope.row)">
|
|
||||||
{{getFileName(scope.row)}}
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="审核状态" prop="ruleState" sortable show-overflow-tooltip>
|
|
||||||
<template scope="scope">
|
|
||||||
<span v-if="scope.row.reportState === 1">待校工会审核</span>
|
|
||||||
<span v-if="scope.row.reportState === 2">校工会审核不通过</span>
|
|
||||||
<span v-if="scope.row.reportState === 3">审核通过</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" width="200px">
|
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
<el-button @click="audit(row)" size="mini" type="primary">审核</el-button>
|
<el-button v-if="row.taskState === 10" @click="onAudit(row)" size="mini" type="primary">审核</el-button>
|
||||||
|
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -72,88 +60,97 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #view>
|
<template #edit>
|
||||||
<club-info ref="info"></club-info>
|
<info ref="infoRef">
|
||||||
|
<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>
|
||||||
|
</info>
|
||||||
</template>
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
|
|
||||||
<el-dialog width="40%" :visible.sync="dialogVisible" title="校工会审核">
|
|
||||||
<el-descriptions :column="2" border class="table_fixed">
|
|
||||||
<el-descriptions-item label="换届报告">
|
|
||||||
<file-preview :files="clickRow.replaceReport" complete_result></file-preview>
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
|
|
||||||
<span slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
|
||||||
<el-button @click="auditDo(false)" type="primary">不通过</el-button>
|
|
||||||
<el-button type="primary" @click="auditDo(true)">通过</el-button>
|
|
||||||
</span>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
<!--#include("../../common/clubInfoComponent.js"){}#-->
|
<!--#include("../refreshReport/info.js"){}#-->
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
components: {
|
components: {
|
||||||
"club-info": REGISTER_INFO_COMPONENT
|
"info": clubRefreshInfo,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
pageForm: {
|
||||||
clickRow: {},
|
approval: false
|
||||||
clubId: ""
|
},
|
||||||
|
formData: {},
|
||||||
|
showApprovalForm: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showFiles(row) {
|
onView(row) {
|
||||||
if (row.replaceReport && row.replaceReport.length > 0) {
|
this.$refs.guava.edit(()=>{
|
||||||
let res = row.replaceReport[0]
|
this.showApprovalForm = false
|
||||||
let fileId = res?.response?.data.substring(res?.response?.data.lastIndexOf("=") + 1)
|
this.$refs.infoRef.onOpen(row)
|
||||||
let fileName = res?.name
|
})
|
||||||
window.open(
|
|
||||||
"/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent("/platform/sys/file/convertPDF?id=" + fileId),
|
|
||||||
fileName
|
|
||||||
)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getFileName(row) {
|
onAudit(row) {
|
||||||
if (row.replaceReport && row.replaceReport.length > 0) {
|
this.$refs.guava.edit(()=>{
|
||||||
return row.replaceReport[0].name
|
this.showApprovalForm = true
|
||||||
} else {
|
this.formData = {
|
||||||
return ""
|
processTaskId: row.taskId,
|
||||||
|
taskName: row.curTaskName
|
||||||
}
|
}
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
async auditDo(pass) {
|
handleTaskAction(val) {
|
||||||
const str = pass ? "通过" : "不通过"
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
const confirm = await this.$confirm("您确定要审核" + str + "吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
|
data: JSON.stringify({
|
||||||
|
...this.formData,
|
||||||
|
submitType: val
|
||||||
})
|
})
|
||||||
if (confirm === "confirm") {
|
}).then((res) => {
|
||||||
const resp = await this.$axios.post("/platform/club/infoManage/schoolAuditReport/auditDo", {
|
if (res.code === 0) {
|
||||||
id: this.clickRow.id,
|
this.$refs.guava.index()
|
||||||
pass: pass
|
this.$message.success(res.msg)
|
||||||
})
|
|
||||||
if (resp.code === 0) {
|
|
||||||
this.$message.success(resp.msg)
|
|
||||||
this.dialogVisible = false
|
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
} else {
|
|
||||||
this.$message.warning(resp.msg)
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
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()
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
audit(row) {
|
|
||||||
this.clickRow = clone(row)
|
|
||||||
this.dialogVisible = true
|
|
||||||
},
|
|
||||||
openView(row) {
|
|
||||||
this.$refs.guava.view(() => {
|
|
||||||
this.$refs.info.onOpen(row.id)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async pageData() {
|
async pageData() {
|
||||||
|
|||||||
@@ -31,40 +31,28 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="mt10" shadow="never">
|
<el-card class="mt10" shadow="never">
|
||||||
|
<table-tool label="申请列表">
|
||||||
|
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||||
|
<el-radio-button :label="true">已审核</el-radio-button>
|
||||||
|
<el-radio-button :label="false">未审核</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</table-tool>
|
||||||
<el-table :data="tableData">
|
<el-table :data="tableData">
|
||||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||||
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="协会类型" prop="typeName" sortable show-overflow-tooltip></el-table-column>
|
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="申请时间" prop="createTime" sortable show-overflow-tooltip>
|
<el-table-column label="申请时间" prop="creatTime" sortable show-overflow-tooltip></el-table-column>
|
||||||
<template slot-scope="{row}">
|
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
|
||||||
<span>{{ $moment(row.createTime).format('YYYY-MM-DD') }}</span>
|
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="成立时间" prop="foundTime" sortable show-overflow-tooltip>
|
<el-table-column label="操作" width="300px">
|
||||||
<template slot-scope="{row}">
|
|
||||||
<span>{{ $moment(row.foundTime).format('YYYY-MM-DD') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="联系人" prop="concatPersonName" sortable show-overflow-tooltip></el-table-column>
|
|
||||||
<el-table-column label="发起人" prop="sponsorName" sortable show-overflow-tooltip></el-table-column>
|
|
||||||
<el-table-column label="协会章程" prop="afterRulesFile" sortable show-overflow-tooltip>
|
|
||||||
<template scope="scope">
|
|
||||||
<span style="color: #0e78c5; text-decoration: underline; cursor: pointer" @click="showFiles(scope.row)">
|
|
||||||
{{getFileName(scope.row)}}
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="审核状态" prop="ruleState" sortable show-overflow-tooltip>
|
|
||||||
<template scope="scope">
|
|
||||||
<span v-if="scope.row.ruleState === 1">待校工会审核</span>
|
|
||||||
<span v-if="scope.row.ruleState === 2">校工会审核不通过</span>
|
|
||||||
<span v-if="scope.row.ruleState === 3">审核通过</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" width="200px">
|
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
<el-button @click="audit(row)" size="mini" type="primary">审核</el-button>
|
<el-button v-if="row.taskState === 10" @click="onAudit(row)" size="mini" type="primary">审核</el-button>
|
||||||
|
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -72,91 +60,97 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #view>
|
<template #edit>
|
||||||
<club-info ref="info"></club-info>
|
<info ref="infoRef">
|
||||||
|
<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>
|
||||||
|
</info>
|
||||||
</template>
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
|
|
||||||
<el-dialog width="40%" :visible.sync="dialogVisible" title="校工会审核">
|
|
||||||
<el-descriptions :column="2" border class="table_fixed">
|
|
||||||
<el-descriptions-item :span="2" label="旧协会章程">
|
|
||||||
<file-preview :files="clickRow.rulesFile" complete_result></file-preview>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="新协会章程">
|
|
||||||
<file-preview :files="clickRow.afterRulesFile" complete_result></file-preview>
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
|
|
||||||
<span slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
|
||||||
<el-button @click="auditDo(false)" type="primary">不通过</el-button>
|
|
||||||
<el-button type="primary" @click="auditDo(true)">通过</el-button>
|
|
||||||
</span>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
<!--#include("../../common/clubInfoComponent.js"){}#-->
|
<!--#include("../ruleUpdate/info.js"){}#-->
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
components: {
|
components: {
|
||||||
"club-info": REGISTER_INFO_COMPONENT
|
"info": clubRuleInfo,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
pageForm: {
|
||||||
clickRow: {},
|
approval: false
|
||||||
clubId: ""
|
},
|
||||||
|
formData: {},
|
||||||
|
showApprovalForm: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showFiles(row) {
|
onView(row) {
|
||||||
if (row.afterRulesFile && row.afterRulesFile.length > 0) {
|
this.$refs.guava.edit(()=>{
|
||||||
let res = row.afterRulesFile[0]
|
this.showApprovalForm = false
|
||||||
let fileId = res?.response?.data.substring(res?.response?.data.lastIndexOf("=") + 1)
|
this.$refs.infoRef.onOpen(row)
|
||||||
let fileName = res?.name
|
})
|
||||||
window.open(
|
|
||||||
"/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent("/platform/sys/file/convertPDF?id=" + fileId),
|
|
||||||
fileName
|
|
||||||
)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getFileName(row) {
|
onAudit(row) {
|
||||||
if (row.afterRulesFile && row.afterRulesFile.length > 0) {
|
this.$refs.guava.edit(()=>{
|
||||||
return row.afterRulesFile[0].name
|
this.showApprovalForm = true
|
||||||
} else {
|
this.formData = {
|
||||||
return ""
|
processTaskId: row.taskId,
|
||||||
|
taskName: row.curTaskName
|
||||||
}
|
}
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
async auditDo(pass) {
|
handleTaskAction(val) {
|
||||||
const str = pass ? "通过" : "不通过"
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
const confirm = await this.$confirm("您确定要审核" + str + "吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
|
data: JSON.stringify({
|
||||||
|
...this.formData,
|
||||||
|
submitType: val
|
||||||
})
|
})
|
||||||
if (confirm === "confirm") {
|
}).then((res) => {
|
||||||
const resp = await this.$axios.post("/platform/club/infoManage/schoolAuditRule/auditDo", {
|
if (res.code === 0) {
|
||||||
id: this.clickRow.id,
|
this.$refs.guava.index()
|
||||||
pass: pass
|
this.$message.success(res.msg)
|
||||||
})
|
|
||||||
if (resp.code === 0) {
|
|
||||||
this.$message.success(resp.msg)
|
|
||||||
this.dialogVisible = false
|
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
} else {
|
|
||||||
this.$message.warning(resp.msg)
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
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()
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
audit(row) {
|
|
||||||
this.clickRow = clone(row)
|
|
||||||
this.dialogVisible = true
|
|
||||||
},
|
|
||||||
openView(row) {
|
|
||||||
this.$refs.guava.view(() => {
|
|
||||||
this.$refs.info.onOpen(row.id)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async pageData() {
|
async pageData() {
|
||||||
|
|||||||
@@ -119,8 +119,9 @@ layout("/layouts/platform.html"){
|
|||||||
<el-checkbox v-model="isAgree">注:本人已仔细阅读并愿意遵守所参加本校教职工文体协会的章程和规定,自愿加入所报名协会。</el-checkbox>
|
<el-checkbox v-model="isAgree">注:本人已仔细阅读并愿意遵守所参加本校教职工文体协会的章程和规定,自愿加入所报名协会。</el-checkbox>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row type="flex" justify="end" class="mt10">
|
<el-row type="flex" justify="end" class="mt10">
|
||||||
<!-- <el-button type="primary" plain @click="doSave">保存草稿</el-button>-->
|
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||||
<el-button type="primary" @click="doSubmit">提交申请</el-button>
|
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||||
|
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
@@ -131,6 +132,8 @@ layout("/layouts/platform.html"){
|
|||||||
store,
|
store,
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
id: GetQueryString("bizId"),
|
||||||
|
taskId: GetQueryString("taskId"),
|
||||||
formData: {},
|
formData: {},
|
||||||
formRules: {
|
formRules: {
|
||||||
clubId: [{ required: true, message: "请选择", trigger: ["blur", "change"] }],
|
clubId: [{ required: true, message: "请选择", trigger: ["blur", "change"] }],
|
||||||
@@ -153,7 +156,21 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doSubmit() {
|
onSave() {
|
||||||
|
this.$confirm("您确定保存吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/club/join/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
location.href = '/platform/club/join/mine'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
this.$refs.formRef.validate((valid) => {
|
this.$refs.formRef.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (!this.isAgree) {
|
if (!this.isAgree) {
|
||||||
@@ -171,6 +188,27 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onFinishTask() {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
if (!this.isAgree) {
|
||||||
|
this.$message.warning("请先阅读并同意协议")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$axios.post('/platform/club/join/apply/submit/submitAgain', {
|
||||||
|
data: JSON.stringify(this.formData),
|
||||||
|
taskId: GetQueryString("taskId")
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
location.href = '/platform/club/join/mine'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
checkApplyClub(val) {
|
checkApplyClub(val) {
|
||||||
this.$axios.post("/platform/club/join/apply/checkApplyClub", { clubId: val }).then((res) => {
|
this.$axios.post("/platform/club/join/apply/checkApplyClub", { clubId: val }).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
|
|||||||
@@ -172,12 +172,12 @@ const CLUB_FORM_TEMPLATE = {
|
|||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
concatPersonChange(id) {
|
/*concatPersonChange(id) {
|
||||||
const user = this.$refs.userSelectRef.options.find((user) => user.id === id)
|
const user = this.$refs.userSelectRef.options.find((user) => user.id === id)
|
||||||
this.$set(this.formData, "concatPersonUnitName", user.unitName)
|
this.$set(this.formData, "concatPersonUnitName", user.unitName)
|
||||||
this.$set(this.formData, "concatPersonMobile", user.mobile)
|
this.$set(this.formData, "concatPersonMobile", user.mobile)
|
||||||
this.$set(this.formData, "concatPersonEmail", user.email)
|
this.$set(this.formData, "concatPersonEmail", user.email)
|
||||||
}
|
}*/
|
||||||
},
|
},
|
||||||
created() {}
|
created() {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,15 +4,15 @@ const CLUB_MANAGER_TEMPLATE = {
|
|||||||
<el-table-column label="是否必填" prop="roleCode" width="130px">
|
<el-table-column label="是否必填" prop="roleCode" width="130px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span class="text-danger"
|
<span class="text-danger"
|
||||||
v-if="scope.row.roleCode === 'CLUB_PRESIDENT'
|
v-if="scope.row.roleCode.includes('CLUB_PRESIDENT')
|
||||||
|| scope.row.roleCode === 'CLUB_SECRETARY'">必填</span>
|
|| scope.row.roleCode.includes('CLUB_SECRETARY')">必填</span>
|
||||||
<span v-else>非必填</span>
|
<span v-else>非必填</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="职务" prop="roleCode">
|
<el-table-column label="职务" prop="roleCode">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-select @change="(val) => {roleCodeChange(val, scope.row, scope.$index)}"
|
<el-select @change="(val) => {roleCodeChange(val, scope.row, scope.$index)}"
|
||||||
placeholder="请选择职务" v-model="scope.row.roleCode">
|
placeholder="请选择职务" v-model="scope.row.roleCode" multiple>
|
||||||
<el-option v-for="item in roleList"
|
<el-option v-for="item in roleList"
|
||||||
:key="item.id" :label="item.name" :value="item.id"></el-option>
|
:key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|||||||
@@ -28,13 +28,14 @@ layout("/layouts/platform.html"){
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-row class="mt20" justify="end" type="flex">
|
<el-row class="mt20" justify="end" type="flex">
|
||||||
<el-button v-if="id !== '' || from !== ''" @click="doBack">返回</el-button>
|
|
||||||
<el-button v-if="activeName === 1" type="primary" @click="activeName = 0">上一步</el-button>
|
<el-button v-if="activeName === 1" type="primary" @click="activeName = 0">上一步</el-button>
|
||||||
<el-button v-if="activeName === 2" type="primary" @click="activeName = 1">上一步</el-button>
|
<el-button v-if="activeName === 2" type="primary" @click="activeName = 1">上一步</el-button>
|
||||||
<el-button v-if="activeName === 0" type="primary" @click="nextStep">下一步</el-button>
|
<el-button v-if="activeName === 0" type="primary" @click="nextStep">下一步</el-button>
|
||||||
<el-button v-if="activeName === 1" type="primary" @click="activeName = 2">下一步</el-button>
|
<el-button v-if="activeName === 1" type="primary" @click="activeName = 2">下一步</el-button>
|
||||||
<el-button type="primary" @click="doSave">保存</el-button>
|
|
||||||
<el-button type="primary" @click="doSubmit">提交</el-button>
|
<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>提交</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
@@ -56,19 +57,12 @@ layout("/layouts/platform.html"){
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeName: 0,
|
activeName: 0,
|
||||||
id: GetQueryString("id"),
|
id: GetQueryString("bizId"),
|
||||||
|
taskId: GetQueryString("taskId"),
|
||||||
from: GetQueryString("from")
|
from: GetQueryString("from")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doBack() {
|
|
||||||
if (this.id !== "" && this.from === "") {
|
|
||||||
location.href = '/platform/club/clubMyApply'
|
|
||||||
}
|
|
||||||
if (this.from !== "") {
|
|
||||||
location.href = '/platform/sys/club/clubInfoManage'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
nextStep() {
|
nextStep() {
|
||||||
let valid = true
|
let valid = true
|
||||||
this.$refs.clubFormRef.$refs.form.validateField(
|
this.$refs.clubFormRef.$refs.form.validateField(
|
||||||
@@ -82,7 +76,7 @@ layout("/layouts/platform.html"){
|
|||||||
if (valid) return
|
if (valid) return
|
||||||
this.activeName = 1
|
this.activeName = 1
|
||||||
},
|
},
|
||||||
async doSave() {
|
async onSave() {
|
||||||
let valid = true
|
let valid = true
|
||||||
this.$refs.clubFormRef.$refs.form.validateField("clubName", (errMsg) => {
|
this.$refs.clubFormRef.$refs.form.validateField("clubName", (errMsg) => {
|
||||||
if (errMsg) {
|
if (errMsg) {
|
||||||
@@ -90,11 +84,18 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
await this.doHandle("doSave")
|
await this.doHandle("onSave")
|
||||||
},
|
},
|
||||||
async doSubmit() {
|
onSubmit() {
|
||||||
this.$refs.clubFormRef.$refs.form.validate().then(() => {
|
this.$refs.clubFormRef.$refs.form.validate().then(() => {
|
||||||
this.doHandle("doSubmit")
|
this.doHandle("onSubmit")
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.warning({ title: "警告", message: "存在必填项未填写!" })
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onFinishTask() {
|
||||||
|
this.$refs.clubFormRef.$refs.form.validate().then(() => {
|
||||||
|
this.doHandle("onFinishTask")
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$message.warning({ title: "警告", message: "存在必填项未填写!" })
|
this.$message.warning({ title: "警告", message: "存在必填项未填写!" })
|
||||||
})
|
})
|
||||||
@@ -115,7 +116,7 @@ layout("/layouts/platform.html"){
|
|||||||
formData.sponsor = this.$refs.clubSponsorRef.sponsorData
|
formData.sponsor = this.$refs.clubSponsorRef.sponsorData
|
||||||
.filter((o) => o.userId !== "" && o.userId !== undefined)
|
.filter((o) => o.userId !== "" && o.userId !== undefined)
|
||||||
.map((o) => o.userId)
|
.map((o) => o.userId)
|
||||||
if (type === "doSubmit" && formData.sponsor && formData.sponsor.length < 3) {
|
if (['onFinishTask', 'onSubmit'].includes(type) && formData.sponsor && formData.sponsor.length < 3) {
|
||||||
this.$message.warning({ title: "警告", message: "发起人要求不少于3人" })
|
this.$message.warning({ title: "警告", message: "发起人要求不少于3人" })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -126,7 +127,7 @@ layout("/layouts/platform.html"){
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (type === "doSubmit" && (this.$refs.clubManagerRef.managePerson.length === 0 || manageValid)) {
|
if (['onFinishTask', 'onSubmit'].includes(type) && (this.$refs.clubManagerRef.managePerson.length === 0 || manageValid)) {
|
||||||
this.$message.warning({ title: "警告", message: "请填写理事机构信息" })
|
this.$message.warning({ title: "警告", message: "请填写理事机构信息" })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -140,12 +141,19 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
cloneData.sponsors = array
|
cloneData.sponsors = array
|
||||||
const url =
|
let url = '';
|
||||||
type === "doSave" ? "/platform/club/register/clubRegisterApply/doSave" : "/platform/club/register/clubRegisterApply/doSubmit"
|
if(type === 'onSave') {
|
||||||
|
url = '/platform/club/register/clubRegisterApply/save'
|
||||||
|
} else if(type === 'onSubmit') {
|
||||||
|
url = '/platform/club/register/clubRegisterApply/submit'
|
||||||
|
} else if(type === 'onFinishTask') {
|
||||||
|
url = '/platform/club/register/clubRegisterApply/submitAgain'
|
||||||
|
}
|
||||||
const resp = await this.$axios.post(url, {
|
const resp = await this.$axios.post(url, {
|
||||||
club: JSON.stringify(cloneData),
|
club: JSON.stringify(cloneData),
|
||||||
managePerson: this.$refs.clubManagerRef.managePerson,
|
managePerson: this.$refs.clubManagerRef.managePerson,
|
||||||
deleteIds: JSON.stringify(this.deleteIds)
|
deleteIds: JSON.stringify(this.deleteIds),
|
||||||
|
taskId: GetQueryString("taskId")
|
||||||
})
|
})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$message.success(resp.msg)
|
this.$message.success(resp.msg)
|
||||||
@@ -198,13 +206,13 @@ layout("/layouts/platform.html"){
|
|||||||
this.$refs.clubSponsorRef.sponsorData.push(row)
|
this.$refs.clubSponsorRef.sponsorData.push(row)
|
||||||
})
|
})
|
||||||
this.$refs.clubFormRef.formData = formData
|
this.$refs.clubFormRef.formData = formData
|
||||||
await this.$refs.clubFormRef.concatPersonChange(resp.data.concatPerson)
|
//await this.$refs.clubFormRef.concatPersonChange(resp.data.concatPerson)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$axios.post("/platform/club/register/clubRegisterApply/createCode").then((res) => {
|
this.$axios.post("/platform/club/register/clubRegisterApply/createCode").then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
if (this.$refs.clubFormRef) {
|
if (this.$refs.clubFormRef) {
|
||||||
this.$refs.clubFormRef.formData.clubCode = res.data
|
this.$set(this.$refs.clubFormRef.formData, 'clubCode', res.data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
<!--#include("../../common/clubInfoComponent.js"){}#-->
|
<!--#include("../../common/clubInfoComponent.js"){}#-->
|
||||||
<!--#include("../../common/clubRoleConstant.js"){}#-->
|
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
store,
|
store,
|
||||||
@@ -114,7 +113,7 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
onEdit(row) {
|
onEdit(row) {
|
||||||
location.href = '/platform/club/register/clubRegisterApply?id=' + row.id
|
window.location.href = '/platform/club/register/clubRegisterApply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
|
||||||
},
|
},
|
||||||
async onDelete(id) {
|
async onDelete(id) {
|
||||||
const confirm = await this.$confirm("此操作将永久删除, 是否继续?", "提示", {
|
const confirm = await this.$confirm("此操作将永久删除, 是否继续?", "提示", {
|
||||||
|
|||||||
@@ -0,0 +1,92 @@
|
|||||||
|
const apply = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12" :offset="6" style="text-align: center">
|
||||||
|
<div style="font-size: large;color: #303133">
|
||||||
|
您正在预约【<span style="color: #409EFF">{{ row.name }}</span>】活动场地
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-calendar v-model="applyTime">
|
||||||
|
<template slot="dateCell" slot-scope="{date, data}">
|
||||||
|
<div :class="getDayClass(data)" @click="pushDay(data)">
|
||||||
|
<p :style="selectDayList.includes(data.day) ? 'color: #246fb4' : ''">
|
||||||
|
{{ data.day.split('-').slice(1).join('-') }} {{ selectDayList.includes(data.day) ? '✔️' : ''}}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-calendar>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<el-button @click="openAdd" type="primary">下一步</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
row: {},
|
||||||
|
applyTime: '',
|
||||||
|
allowDayList: [],
|
||||||
|
selectDayList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onOpen(row) {
|
||||||
|
this.row = row
|
||||||
|
},
|
||||||
|
openAdd() {},
|
||||||
|
async pushDay(data) {
|
||||||
|
this.$nextTick(async () => {
|
||||||
|
await this.queryAllowTime(this.$moment(data.day).year(), this.$moment(data.day).month() + 1)
|
||||||
|
})
|
||||||
|
if (this.allowDayList.length > 0 && !this.allowDayList.includes(data.day)) {
|
||||||
|
this.$message.warning(data.day + "不能预约")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (data.day < this.$moment(new Date()).format('YYYY-MM-DD')) {
|
||||||
|
this.$message.warning('你选择的日期已过')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.selectDayList.includes(data.day)) {
|
||||||
|
this.selectDayList.splice(this.selectDayList.indexOf(data.day), 1)
|
||||||
|
} else {
|
||||||
|
this.selectDayList = []
|
||||||
|
this.selectDayList.push(data.day)
|
||||||
|
this.selectDayList.sort()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 查询哪些天是开放的
|
||||||
|
async queryAllowTime(year = null, month = null) {
|
||||||
|
const titleText = $('.el-calendar__title').text().trim().replaceAll(' ', '')
|
||||||
|
const m = this.$moment(titleText, "YYYY年M月")
|
||||||
|
const {data} = await this.$axios.post("/platform/site/apply/queryAllowTime", {
|
||||||
|
siteId: this.row.id,
|
||||||
|
year: year != null ? year : m.year(),
|
||||||
|
month: month != null ? month : m.month() + 1,
|
||||||
|
})
|
||||||
|
this.allowDayList = data
|
||||||
|
},
|
||||||
|
getDayClass(data) {
|
||||||
|
let classStr = 'div-Calendar'
|
||||||
|
if(this.allowDayList.length > 0 && !this.allowDayList.includes(data.day)) {
|
||||||
|
classStr += ' not-allow-day';
|
||||||
|
}
|
||||||
|
if(this.$moment(data.day).isBefore(this.$moment().startOf('day'))) {
|
||||||
|
classStr += ' not-allow-day';
|
||||||
|
}
|
||||||
|
return classStr
|
||||||
|
},
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
.div-Calendar {
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.div-Calendar p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.el-calendar-day:has(.not-allow-day) {
|
||||||
|
background-color: #F5F5F5;
|
||||||
|
}
|
||||||
|
`
|
||||||
|
}
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker placeholder="按年度查询" type="year" v-model="pageForm.year"
|
||||||
|
@change="doSearch" value-format="yyyy">
|
||||||
|
</el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="名称/地址:">
|
||||||
|
<el-input placeholder="请输入名称或地址查询" clearable v-model="pageForm.searchKeyword"
|
||||||
|
@keyup.enter.native="doSearch">
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="场地类型">
|
||||||
|
<el-select v-model="pageForm.type" clearable filterable placeholder="请选择场地类型" @change="doSearch">
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeOptions"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
:key="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card shadow="never" class="mt20">
|
||||||
|
<table-tool label="场地列表"></table-tool>
|
||||||
|
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||||
|
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:label="column.label"
|
||||||
|
:prop="column.prop"
|
||||||
|
:key="column.prop"
|
||||||
|
:width="column.width"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
v-for="column in tableColumns"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="180">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
|
<el-button @click="onApply(row)" size="mini" type="primary">预约</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #edit>
|
||||||
|
<site-apply ref="applyRef"></site-apply>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #view>
|
||||||
|
<info ref="infoRef"></info>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
<!--#include('../manage/info.js'){}#-->
|
||||||
|
<!--#include('apply.js'){}#-->
|
||||||
|
const vue = new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
components: {
|
||||||
|
"info": siteInfo,
|
||||||
|
"site-apply": apply,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
typeOptions: [],
|
||||||
|
tableColumns: [
|
||||||
|
{prop: 'name', label: '场地名称'},
|
||||||
|
{prop: 'sortNum', label: '排序编号'},
|
||||||
|
{prop: 'address', label: '场地地址'},
|
||||||
|
{prop: 'contactName', label: '联系人'},
|
||||||
|
{prop: 'contactPhone', label: '联系方式'},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
refresh() {
|
||||||
|
this.doSearch()
|
||||||
|
this.$refs.guava.index()
|
||||||
|
},
|
||||||
|
onApply(row) {
|
||||||
|
this.$refs.guava.edit(() => {
|
||||||
|
this.$refs.applyRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onView(row) {
|
||||||
|
this.$refs.guava.view(() => {
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
querySiteType() {
|
||||||
|
this.$axios.post("/platform/site/type/querySiteType").then((res) => {
|
||||||
|
this.typeOptions = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
pageData() {
|
||||||
|
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.tableData = res.data.list
|
||||||
|
this.pageForm.totalCount = res.data.totalCount
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.querySiteType()
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -0,0 +1,405 @@
|
|||||||
|
const basicForm = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="110px" label-position="left">
|
||||||
|
<el-row :gutter="20" type="flex">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="创建人" prop="createUserName">
|
||||||
|
<el-input disabled type="text" v-model="formData.createUserName" maxlength="20" placeholder="请输入创建人"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="创建时间" prop="createTime">
|
||||||
|
<el-input disabled type="text" v-model="formData.createTime" maxlength="20" placeholder="请输入创建时间"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="20" type="flex">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="场地名称" prop="name">
|
||||||
|
<el-input type="text" v-model="formData.name" maxlength="50" placeholder="请输入场地名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="场地地址" prop="address">
|
||||||
|
<el-input type="text" v-model="formData.address" maxlength="100" placeholder="请输入场地地址"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="20" type="flex">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="联系人" prop="contactName">
|
||||||
|
<el-input type="text" v-model="formData.contactName" maxlength="20" placeholder="请输入联系人"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="联系电话" prop="contactPhone">
|
||||||
|
<el-input type="text" v-model="formData.contactPhone" maxlength="20" placeholder="请输入联系电话"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="20" type="flex">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item prop="sortNum" label="排序编号">
|
||||||
|
<el-input v-model="formData.sortNum" placeholder="请输入排序编号" type="number"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="容纳人数" prop="maxNum">
|
||||||
|
<el-input v-model="formData.maxNum" placeholder="请输入容纳人数" type="number"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="20" type="flex">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="场地类型" prop="typeId">
|
||||||
|
<el-select v-model="formData.typeId" clearable filterable placeholder="请选择场地类型" style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeList"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
:key="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item prop="reserveTarget" label="面向对象">
|
||||||
|
<el-radio-group v-model="formData.reserveTarget" size="medium">
|
||||||
|
<el-radio-button :label="1">面向分工会</el-radio-button>
|
||||||
|
<el-radio-button :label="2">面向个人</el-radio-button>
|
||||||
|
<el-radio-button :label="3">面向集体</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="20" type="flex">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item prop="sexLimit" label="性别限制">
|
||||||
|
<el-radio-group v-model="formData.sexLimit" size="medium">
|
||||||
|
<el-radio-button :label="0">不限制</el-radio-button>
|
||||||
|
<el-radio-button :label="1">男</el-radio-button>
|
||||||
|
<el-radio-button :label="2">女</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item prop="state" label="开启状态">
|
||||||
|
<el-radio-group v-model="formData.state" size="medium">
|
||||||
|
<el-radio-button :label="true">开启</el-radio-button>
|
||||||
|
<el-radio-button :label="false">禁用</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="20" type="flex">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item prop="filterHolidays" label="排除节假日">
|
||||||
|
<el-radio-group v-model="formData.filterHolidays" size="medium">
|
||||||
|
<el-radio-button :label="true">是</el-radio-button>
|
||||||
|
<el-radio-button :label="false">否</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="禁用时间">
|
||||||
|
<el-button type="primary" @click="openSetUpTime" size="small">点击设置禁用时间</el-button>
|
||||||
|
<span style="color: #c64120">您已设置{{ formData.notApplyTimeList ? formData.notApplyTimeList.length : 0 }}个禁用时间</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-form-item label="场地介绍">
|
||||||
|
<text-editor v-model="formData.introduce"></text-editor>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<div class="left-span-label">添加场次(温馨提醒:如果设置了预约时间单位,那么系统会在开始时间至结束时间范围内,按照设置的单位来拆分成多个时间段,如果未设置或者为0,则表示开始时间至结束时间是一个时间段)</div>
|
||||||
|
<el-table :data="formData.openHours" border size="mini">
|
||||||
|
<el-table-column prop="weekNum" label="星期" align="center" header-align="center">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-select style="width: 100%" v-model="row.weekNum" filterable placeholder="请选择星期">
|
||||||
|
<el-option label="周一" :value="1"></el-option>
|
||||||
|
<el-option label="周二" :value="2"></el-option>
|
||||||
|
<el-option label="周三" :value="3"></el-option>
|
||||||
|
<el-option label="周四" :value="4"></el-option>
|
||||||
|
<el-option label="周五" :value="5"></el-option>
|
||||||
|
<el-option label="周六" :value="6"></el-option>
|
||||||
|
<el-option label="周日" :value="0"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="startTime" label="开始时间" align="center" header-align="center">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-time-select
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="开始时间"
|
||||||
|
v-model="row.startTime"
|
||||||
|
:picker-options="{ start: '00:00',step: '00:30',end: '24:00'}">
|
||||||
|
</el-time-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="endTime" label="结束时间" align="center" header-align="center">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-time-select
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="结束时间"
|
||||||
|
v-model="row.endTime"
|
||||||
|
:picker-options="{start: '00:00',step: '00:30',end: '24:00',minTime: row.start_time }">
|
||||||
|
</el-time-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="timeUnit" label="预约时间单位(小时)" align="center" header-align="center">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-input-number style="width: 100%" v-model="row.timeUnit" placeholder="请输入预约时间单位" :step="0.5"></el-input-number>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" header-align="center" width="100px">
|
||||||
|
<template slot="header">
|
||||||
|
<el-button size="mini" type="primary" icon="el-icon-plus"
|
||||||
|
@click="formData.openHours.push({})"></el-button>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button type="danger" icon="el-icon-delete"
|
||||||
|
:disabled="formData.openHours.length==0" size="mini"
|
||||||
|
@click="formData.openHours.splice(scope.$index, 1)"></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<el-row class="mt10" justify="end" type="flex">
|
||||||
|
<el-button @click="$emit('refresh')">取消</el-button>
|
||||||
|
<el-button @click="onSubmit" type="primary">提交</el-button>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-dialog append-to-body :close-on-click-modal="false" :visible.sync="setUpTimeDialog" title="设置时间">
|
||||||
|
<div class="left-span-label">选择日期</div>
|
||||||
|
<el-date-picker
|
||||||
|
@change="setUpDateChange"
|
||||||
|
placeholder="请选择一个或多个日期"
|
||||||
|
style="width: 100%"
|
||||||
|
type="dates"
|
||||||
|
v-model="formData.setUpDate"
|
||||||
|
value-format="yyyy-MM-dd">
|
||||||
|
</el-date-picker>
|
||||||
|
<div class="left-span-label mt20">设置禁用时间</div>
|
||||||
|
<el-row>
|
||||||
|
<el-time-select
|
||||||
|
:picker-options="{
|
||||||
|
start: '08:30',
|
||||||
|
step: '00:05',
|
||||||
|
end: '23:30'
|
||||||
|
}"
|
||||||
|
placeholder="开始时间"
|
||||||
|
v-model="timeOneKeySet.startTime">
|
||||||
|
</el-time-select>
|
||||||
|
<el-time-select
|
||||||
|
:picker-options="{
|
||||||
|
start: '08:30',
|
||||||
|
step: '00:05',
|
||||||
|
end: '23:30'
|
||||||
|
}"
|
||||||
|
placeholder="结束时间"
|
||||||
|
v-model="timeOneKeySet.endTime">
|
||||||
|
</el-time-select>
|
||||||
|
<el-button @click="oneKeySetStartEndTime" type="primary">一键设置开始/结束时间</el-button>
|
||||||
|
</el-row>
|
||||||
|
<el-table :data="formData.notApplyTimeList" class="mt10" max-height="520px" size="mini" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55"></el-table-column>
|
||||||
|
<el-table-column label="日期" width="200">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<i class="el-icon-time"></i>
|
||||||
|
{{$moment(row.date).format('YYYY-MM-DD')}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="开始时间">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<el-time-select
|
||||||
|
size="mini"
|
||||||
|
:picker-options="{
|
||||||
|
start: '08:30',
|
||||||
|
step: '00:05',
|
||||||
|
end: '23:30'
|
||||||
|
}"
|
||||||
|
v-model="row.startTime">
|
||||||
|
</el-time-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="结束时间">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<el-time-select
|
||||||
|
size="mini"
|
||||||
|
:picker-options="{
|
||||||
|
start: '08:30',
|
||||||
|
step: '00:05',
|
||||||
|
end: '23:30'
|
||||||
|
}"
|
||||||
|
v-model="row.endTime">
|
||||||
|
</el-time-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="200">
|
||||||
|
<template v-slot="{row, $index}">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
@click="formData.notApplyTimeList.splice($index,0,{date:row.date,startTime:'',endTime:''})"
|
||||||
|
type="primary">
|
||||||
|
新增同天时段
|
||||||
|
</el-button>
|
||||||
|
<el-button size="mini" @click="removeSetUpTableRow(row,$index)" type="danger">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-row class="mt20" justify="end" type="flex">
|
||||||
|
<el-button @click="setUpTimeDialog = false">取消</el-button>
|
||||||
|
<el-button @click="doConfirmSetUpCourse" type="primary">确定</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
props: {
|
||||||
|
typeList: {
|
||||||
|
type: Array,
|
||||||
|
required: false,
|
||||||
|
default: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
store,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formData: {
|
||||||
|
state: true,
|
||||||
|
notApplyTimeList: [],
|
||||||
|
reserveTarget: 2,
|
||||||
|
sexLimit: 0,
|
||||||
|
filterHolidays: false,
|
||||||
|
createUserName: this.$store.state.user.username,
|
||||||
|
createUserId: this.$store.state.user.id,
|
||||||
|
createTime: this.$moment().format('YYYY-MM-DD'),
|
||||||
|
openHours: [],
|
||||||
|
},
|
||||||
|
formRules: {
|
||||||
|
createUserName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
creatTime: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
address: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
contactName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
contactPhone: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
sortNum: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
maxNum: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
typeId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
reserveTarget: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
sexLimit: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
state: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
filterHolidays: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
},
|
||||||
|
setUpTimeDialog: false,
|
||||||
|
timeOneKeySet: {
|
||||||
|
startTime: "",
|
||||||
|
endTime: ""
|
||||||
|
},
|
||||||
|
multipleSelection: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doConfirmSetUpCourse() {
|
||||||
|
const courseTableData = this.formData.notApplyTimeList
|
||||||
|
if (courseTableData && courseTableData.length > 0) {
|
||||||
|
const valid = courseTableData.every(v => v.startTime && v.endTime && (v.startTime < v.endTime))
|
||||||
|
if (!valid) {
|
||||||
|
this.$message.warning("时间不完整或者有误")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.setUpTimeDialog = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
removeSetUpTableRow(row, index) {
|
||||||
|
this.formData.notApplyTimeList.splice(index, 1)
|
||||||
|
const courseDateArray = this.formData.notApplyTimeList.map(v => this.$moment(v.date).format("YYYY-MM-DD"))
|
||||||
|
const scdList = this.formData.setUpDate
|
||||||
|
this.formData.setUpDate = scdList.filter(v => {
|
||||||
|
return courseDateArray.includes(this.$moment(v).format("YYYY-MM-DD"))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.multipleSelection = val
|
||||||
|
},
|
||||||
|
oneKeySetStartEndTime() {
|
||||||
|
if(this.multipleSelection.length === 0) {
|
||||||
|
this.$message.warning('请选择需要一键设置的时间')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const { startTime, endTime } = this.timeOneKeySet
|
||||||
|
this.formData.notApplyTimeList.forEach(v => {
|
||||||
|
const o = this.multipleSelection.find(o => o.date === v.date && o.startTime === v.startTime && o.endTime === v.endTime)
|
||||||
|
if(o) {
|
||||||
|
this.$set(v, "startTime", startTime)
|
||||||
|
this.$set(v, "endTime", endTime)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
setUpDateChange(val) {
|
||||||
|
if (!val) {
|
||||||
|
this.formData.notApplyTimeList = []
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.formData.notApplyTimeList === undefined) {
|
||||||
|
this.$set(this.formData, "notApplyTimeList", [])
|
||||||
|
}
|
||||||
|
const ctList = new Set(this.formData.notApplyTimeList.map(v => this.$moment(v.date).format("YYYY-MM-DD")))
|
||||||
|
val.forEach(v => {
|
||||||
|
if (!ctList.has(v)) {
|
||||||
|
this.formData.notApplyTimeList.push({
|
||||||
|
date: v, time: null
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.formData.notApplyTimeList = this.formData.notApplyTimeList.filter(v => {
|
||||||
|
return val.includes(this.$moment(v.date).format("YYYY-MM-DD"))
|
||||||
|
})
|
||||||
|
this.formData.notApplyTimeList.sort((a, b) => {
|
||||||
|
return Date.parse(a["date"]) - Date.parse(b["date"])
|
||||||
|
})
|
||||||
|
},
|
||||||
|
openSetUpTime() {
|
||||||
|
if(this.formData.notApplyTimeList) {
|
||||||
|
this.$set(this.formData, 'setUpDate', this.formData.notApplyTimeList.map(o => o.date))
|
||||||
|
}
|
||||||
|
this.setUpTimeDialog = true
|
||||||
|
},
|
||||||
|
onOpen(row) {
|
||||||
|
if(row && row.id) {
|
||||||
|
this.formData = clone(row)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
this.$refs.formRef.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(async () => {
|
||||||
|
const resp = await this.$axios.post("/platform/site/manage/submit", {data: JSON.stringify(this.formData)})
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.$emit('refresh')
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
|
||||||
|
`
|
||||||
|
}
|
||||||
@@ -0,0 +1,175 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker placeholder="按年度查询" type="year" v-model="pageForm.year"
|
||||||
|
@change="doSearch" value-format="yyyy">
|
||||||
|
</el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="名称/地址:">
|
||||||
|
<el-input placeholder="请输入名称或地址查询" clearable v-model="pageForm.searchKeyword"
|
||||||
|
@keyup.enter.native="doSearch">
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="场地类型">
|
||||||
|
<el-select v-model="pageForm.type" clearable filterable placeholder="请选择场地类型" @change="doSearch">
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeOptions"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
:key="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card shadow="never" class="mt20">
|
||||||
|
<table-tool label="场地列表">
|
||||||
|
<el-button type="primary" size="small" @click="onAdd">
|
||||||
|
<i class="ti-plus"></i>
|
||||||
|
新增场地
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||||
|
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:label="column.label"
|
||||||
|
:prop="column.prop"
|
||||||
|
:key="column.prop"
|
||||||
|
:width="column.width"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
v-for="column in tableColumns"
|
||||||
|
>
|
||||||
|
<template v-slot="{ row }" v-if="column.prop === 'state'">
|
||||||
|
<el-switch
|
||||||
|
@change="switchChange(row)"
|
||||||
|
v-model="row.state"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949">
|
||||||
|
</el-switch>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="230">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
|
<el-button @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||||
|
<el-button @click="onDelete(row)" size="mini" type="danger">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #edit>
|
||||||
|
<basic-form :type-list="typeOptions" ref="basicFormRef" @refresh="refresh"></basic-form>
|
||||||
|
</template>
|
||||||
|
<template #view>
|
||||||
|
<info ref="infoRef"></info>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
<!--#include('basicForm.js'){}#-->
|
||||||
|
<!--#include('info.js'){}#-->
|
||||||
|
const vue = new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
components: {
|
||||||
|
"basic-form": basicForm,
|
||||||
|
"info": siteInfo,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
typeOptions: [],
|
||||||
|
tableColumns: [
|
||||||
|
{prop: 'name', label: '场地名称'},
|
||||||
|
{prop: 'sortNum', label: '排序编号'},
|
||||||
|
{prop: 'address', label: '场地地址'},
|
||||||
|
{prop: 'contactName', label: '联系人'},
|
||||||
|
{prop: 'contactPhone', label: '联系方式'},
|
||||||
|
{prop: 'state', label: '开启状态'},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
refresh() {
|
||||||
|
this.doSearch()
|
||||||
|
this.$refs.guava.index()
|
||||||
|
},
|
||||||
|
onAdd() {
|
||||||
|
this.$refs.guava.edit(() => {
|
||||||
|
this.$refs.basicFormRef.onOpen()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onEdit(row) {
|
||||||
|
this.$refs.guava.edit(() => {
|
||||||
|
this.$refs.basicFormRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onView(row) {
|
||||||
|
this.$refs.guava.view(() => {
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onDelete(row) {
|
||||||
|
this.$confirm("您确定要删除吗, 是否继续?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$axios.post("/platform/site/manage/delete", { id: row.id }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
switchChange(row) {
|
||||||
|
this.$axios.post("/platform/site/manage/submit", row).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
querySiteType() {
|
||||||
|
this.$axios.post("/platform/site/type/querySiteType").then((res) => {
|
||||||
|
this.typeOptions = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
pageData() {
|
||||||
|
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.tableData = res.data.list
|
||||||
|
this.pageForm.totalCount = res.data.totalCount
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.querySiteType()
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
const siteInfo = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<el-descriptions :column="2" border>
|
||||||
|
<el-descriptions-item label="创建人">{{ viewData.createUserName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="创建时间">{{ viewData.createTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="场地名称">{{ viewData.name }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="场地地址">{{ viewData.address }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="联系人">{{ viewData.contactName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="联系电话">{{ viewData.contactPhone }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="排序编号">{{ viewData.sortNum }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="容纳人数">{{ viewData.maxNum }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="场地类型">{{ viewData.typeName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="面向对象">
|
||||||
|
<span v-if="viewData.reserveTarget === 1">面向分工会</span>
|
||||||
|
<span v-if="viewData.reserveTarget === 2">面向个人</span>
|
||||||
|
<span v-if="viewData.reserveTarget === 3">面向集体</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="性别限制">
|
||||||
|
<span v-if="viewData.sexLimit === 0">不限制</span>
|
||||||
|
<span v-if="viewData.sexLimit === 1">男</span>
|
||||||
|
<span v-if="viewData.sexLimit === 2">女</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="开启状态">
|
||||||
|
<span v-if="viewData.state">开启</span>
|
||||||
|
<span v-else>禁用</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="排除节假日" :span="2">
|
||||||
|
<span v-if="viewData.state">是</span>
|
||||||
|
<span v-else>否</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="场地介绍" :span="2">
|
||||||
|
<div v-if="viewData.introduce" v-html="viewData.introduce"></div>
|
||||||
|
<div v-else>暂无场地介绍</div>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="禁用时间" :span="2">
|
||||||
|
<el-table v-if="viewData.notApplyTimeList && viewData.notApplyTimeList.length > 0"
|
||||||
|
:data="viewData.notApplyTimeList" max-height="300" size="mini">
|
||||||
|
<el-table-column prop="date" label="日期"></el-table-column>
|
||||||
|
<el-table-column prop="startTime" label="开始时间"></el-table-column>
|
||||||
|
<el-table-column prop="endTime" label="结束时间"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<span v-else>暂无禁用时间</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="场次" :span="2">
|
||||||
|
<el-table v-if="viewData.openHours && viewData.openHours.length > 0"
|
||||||
|
:data="viewData.openHours" max-height="300" size="mini">
|
||||||
|
<el-table-column prop="weekNum" label="星期">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<span v-if="row.weekNum === 1">周一</span>
|
||||||
|
<span v-if="row.weekNum === 2">周二</span>
|
||||||
|
<span v-if="row.weekNum === 3">周三</span>
|
||||||
|
<span v-if="row.weekNum === 4">周四</span>
|
||||||
|
<span v-if="row.weekNum === 5">周五</span>
|
||||||
|
<span v-if="row.weekNum === 6">周六</span>
|
||||||
|
<span v-if="row.weekNum === 0">周日</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="startTime" label="开始时间"></el-table-column>
|
||||||
|
<el-table-column prop="endTime" label="结束时间"></el-table-column>
|
||||||
|
<el-table-column prop="timeUnit" label="预约时间单位(小时)"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<span v-else>暂无场次</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
viewData: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onOpen(row) {
|
||||||
|
this.viewData = row
|
||||||
|
},
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
.el-descriptions-item__label {
|
||||||
|
width: 200px;
|
||||||
|
min-width: 200px;
|
||||||
|
max-width: 200px;
|
||||||
|
}
|
||||||
|
.el-tabs__header {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
`
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
const basicForm = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="110px" label-position="left">
|
||||||
|
<el-form-item label="类型编码" prop="code">
|
||||||
|
<el-input type="text" v-model="formData.code" maxlength="50"
|
||||||
|
placeholder="请输入类型编码"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="类型名称" prop="name">
|
||||||
|
<el-input type="text" v-model="formData.name" maxlength="50"
|
||||||
|
placeholder="请输入类型名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否启用" prop="enable">
|
||||||
|
<el-switch
|
||||||
|
v-model="formData.enable"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949">
|
||||||
|
</el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row class="mt10" justify="end" type="flex">
|
||||||
|
<el-button @click="$emit('refresh')">取消</el-button>
|
||||||
|
<el-button @click="onSubmit" type="primary">提交</el-button>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formData: {
|
||||||
|
enable: true
|
||||||
|
},
|
||||||
|
formRules: {
|
||||||
|
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
code: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
enable: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onOpen(row) {
|
||||||
|
if(row && row.id) {
|
||||||
|
this.formData = clone(row)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
this.$refs.formRef.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(async () => {
|
||||||
|
const resp = await this.$axios.post("/platform/site/type/submit", this.formData)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.$emit('refresh')
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
|
||||||
|
`
|
||||||
|
}
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="名称/编码:">
|
||||||
|
<el-input placeholder="请输入名称或编码查询" clearable v-model="pageForm.searchKeyword"
|
||||||
|
@keyup.enter.native="doSearch">
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card shadow="never" class="mt20">
|
||||||
|
<table-tool label="类型列表">
|
||||||
|
<el-button type="primary" size="small" @click="onAdd">
|
||||||
|
<i class="ti-plus"></i>
|
||||||
|
新增类型
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||||
|
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:label="column.label"
|
||||||
|
:prop="column.prop"
|
||||||
|
:key="column.prop"
|
||||||
|
:width="column.width"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
v-for="column in tableColumns"
|
||||||
|
>
|
||||||
|
<template v-slot="{ row }" v-if="column.prop === 'enable'">
|
||||||
|
<el-switch
|
||||||
|
@change="switchChange(row)"
|
||||||
|
v-model="row.enable"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949">
|
||||||
|
</el-switch>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="230">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||||
|
<el-button @click="onDelete(row)" size="mini" type="danger">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #edit>
|
||||||
|
<basic-form ref="basicFormRef" @refresh="refresh"></basic-form>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
<!--#include('basicForm.js'){}#-->
|
||||||
|
const vue = new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
components: {
|
||||||
|
"basic-form": basicForm,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableColumns: [
|
||||||
|
{prop: 'code', label: '类型编码'},
|
||||||
|
{prop: 'name', label: '类型名称'},
|
||||||
|
{prop: 'enable', label: '是否启用'},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
refresh() {
|
||||||
|
this.doSearch()
|
||||||
|
this.$refs.guava.index()
|
||||||
|
},
|
||||||
|
onAdd() {
|
||||||
|
this.$refs.guava.edit(() => {
|
||||||
|
this.$refs.basicFormRef.onOpen()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onEdit(row) {
|
||||||
|
this.$refs.guava.edit(() => {
|
||||||
|
this.$refs.basicFormRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onDelete(row) {
|
||||||
|
this.$confirm("您确定要删除吗, 是否继续?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$axios.post("/platform/site/type/delete", { id: row.id }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
switchChange(row) {
|
||||||
|
this.$axios.post("/platform/site/type/submit", row).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
pageData() {
|
||||||
|
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.tableData = res.data.list
|
||||||
|
this.pageForm.totalCount = res.data.totalCount
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -188,7 +188,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-row type="flex" justify="end" class="mt20">
|
<el-row type="flex" justify="end" class="mt20">
|
||||||
<el-button type="primary" plain @click="onSave">保存</el-button>
|
<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="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-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
@@ -289,8 +289,7 @@ layout("/layouts/platform.html"){
|
|||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$axios.post('/platform/condolence/apply/submit', {
|
this.$axios.post('/platform/condolence/apply/submit', {
|
||||||
data: JSON.stringify(this.formData),
|
data: JSON.stringify(this.formData)
|
||||||
taskId: GetQueryString("taskId")
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
@@ -307,11 +306,9 @@ layout("/layouts/platform.html"){
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$axios.post('/flow/common/executeTask', {
|
this.$axios.post('/platform/condolence/apply/submitAgain', {
|
||||||
data: JSON.stringify({
|
data: JSON.stringify(this.formData),
|
||||||
processTaskId: GetQueryString("taskId"),
|
taskId: GetQueryString("taskId")
|
||||||
submitType: 5
|
|
||||||
})
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
|
|||||||
@@ -62,10 +62,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||||
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
|
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
|
||||||
<el-button v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
|
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
<el-button v-else-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -74,9 +74,12 @@ layout("/layouts/platform.html"){
|
|||||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" width="100">
|
<el-table-column label="操作" fixed="right" width="180">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
|
<el-button v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -116,6 +119,20 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onDelete(id) {
|
||||||
|
this.$confirm("您确定要删除吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/platform/condolence/mine/delete", { id }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
onExport() {
|
onExport() {
|
||||||
this.$downLoad(loc() + '/onExport', this.pageForm)
|
this.$downLoad(loc() + '/onExport', this.pageForm)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user