commit
This commit is contained in:
@@ -916,8 +916,14 @@ public class BaseServiceImpl<T> extends EntityService<T> implements BaseService<
|
|||||||
List<Map> list = sql.getList(Map.class);
|
List<Map> list = sql.getList(Map.class);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
C c = clazz.getDeclaredConstructor().newInstance();
|
List<C> voList = list.stream().map(map -> {
|
||||||
List<C> voList = list.stream().map(map -> BeanUtil.fillBeanWithMapIgnoreCase(map, c, true)).toList();
|
try {
|
||||||
|
C instance = clazz.getDeclaredConstructor().newInstance();
|
||||||
|
return BeanUtil.fillBeanWithMapIgnoreCase(map, instance, true);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("Failed to instantiate or fill bean", e);
|
||||||
|
}
|
||||||
|
}).toList();
|
||||||
return new Pagination(pageNumber, pageSize, pager.getRecordCount(), voList);
|
return new Pagination(pageNumber, pageSize, pager.getRecordCount(), voList);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ public class SysUserController {
|
|||||||
if (StrUtil.isBlank(pathname)) {
|
if (StrUtil.isBlank(pathname)) {
|
||||||
|
|
||||||
}
|
}
|
||||||
Sys_menu menu = sysMenuService.fetch(Cnd.where(Sys_menu::getHref, "=", pathname));
|
Sys_menu menu = sysMenuService.fetch(Cnd.where(Sys_menu::getHref, "like", pathname + "%"));
|
||||||
if (menu == null) {
|
if (menu == null) {
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-14
@@ -187,9 +187,7 @@ public class YearPlanController {
|
|||||||
|
|
||||||
try (ZipOutputStream zos = new ZipOutputStream(response.getOutputStream())) {
|
try (ZipOutputStream zos = new ZipOutputStream(response.getOutputStream())) {
|
||||||
for (String url : urlList) {
|
for (String url : urlList) {
|
||||||
String fileId = extractFileId(url);
|
Sys_file file = dao.fetch(Sys_file.class, Cnd.where(Sys_file::getDownloadPath, "=", url));
|
||||||
if(StrUtil.isNotBlank(fileId)) {
|
|
||||||
Sys_file file = dao.fetch(Sys_file.class, fileId);
|
|
||||||
byte[] bytes = SysFileMinIoUtil.getFileBytes(file.getBucket(), file.getStoragePath());
|
byte[] bytes = SysFileMinIoUtil.getFileBytes(file.getBucket(), file.getStoragePath());
|
||||||
if(bytes == null || bytes.length == 0){
|
if(bytes == null || bytes.length == 0){
|
||||||
continue;
|
continue;
|
||||||
@@ -200,20 +198,9 @@ public class YearPlanController {
|
|||||||
zos.write(bytes);
|
zos.write(bytes);
|
||||||
zos.closeEntry();
|
zos.closeEntry();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "生成ZIP文件失败");
|
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "生成ZIP文件失败");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String extractFileId(String url) {
|
|
||||||
if (url == null) return null;
|
|
||||||
Pattern pattern = Pattern.compile("[?&]id=([^&]*)");
|
|
||||||
Matcher matcher = pattern.matcher(url);
|
|
||||||
if (matcher.find()) {
|
|
||||||
return matcher.group(1);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-14
@@ -168,9 +168,7 @@ public class YearSummaryController {
|
|||||||
|
|
||||||
try (ZipOutputStream zos = new ZipOutputStream(response.getOutputStream())) {
|
try (ZipOutputStream zos = new ZipOutputStream(response.getOutputStream())) {
|
||||||
for (String url : urlList) {
|
for (String url : urlList) {
|
||||||
String fileId = extractFileId(url);
|
Sys_file file = dao.fetch(Sys_file.class, Cnd.where(Sys_file::getDownloadPath, "=", url));
|
||||||
if(StrUtil.isNotBlank(fileId)) {
|
|
||||||
Sys_file file = dao.fetch(Sys_file.class, fileId);
|
|
||||||
byte[] bytes = SysFileMinIoUtil.getFileBytes(file.getBucket(), file.getStoragePath());
|
byte[] bytes = SysFileMinIoUtil.getFileBytes(file.getBucket(), file.getStoragePath());
|
||||||
if(bytes == null || bytes.length == 0){
|
if(bytes == null || bytes.length == 0){
|
||||||
continue;
|
continue;
|
||||||
@@ -181,20 +179,9 @@ public class YearSummaryController {
|
|||||||
zos.write(bytes);
|
zos.write(bytes);
|
||||||
zos.closeEntry();
|
zos.closeEntry();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "生成ZIP文件失败");
|
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "生成ZIP文件失败");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String extractFileId(String url) {
|
|
||||||
if (url == null) return null;
|
|
||||||
Pattern pattern = Pattern.compile("[?&]id=([^&]*)");
|
|
||||||
Matcher matcher = pattern.matcher(url);
|
|
||||||
if (matcher.find()) {
|
|
||||||
return matcher.group(1);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+107
@@ -0,0 +1,107 @@
|
|||||||
|
package com.budwk.app.zhgh.club.controller.apply;
|
||||||
|
|
||||||
|
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.flow.entity.ProcessInstance;
|
||||||
|
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.club.model.SysClub;
|
||||||
|
import com.budwk.app.zhgh.club.service.SysClubService;
|
||||||
|
import com.budwk.app.zhgh.club.service.SysClubUserService;
|
||||||
|
import com.budwk.app.zhgh.club.vo.ClubRegisterVo;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.util.cri.Static;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Strings;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: JyuHsin
|
||||||
|
* @Date: 2024/8/7 10:14
|
||||||
|
* @Version: v1.0.0
|
||||||
|
* @Description: TODO
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean
|
||||||
|
@Ok("json")
|
||||||
|
@At("/platform/club/join/list")
|
||||||
|
public class ClubUserClubListController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private SysClubService sysClubService;
|
||||||
|
@Inject
|
||||||
|
private SysClubUserService sysClubUserService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/club/join/list/index.html")
|
||||||
|
@SaCheckPermission("club.join.list")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("club.join.list")
|
||||||
|
public Result pageData(@Valid PageForm pageForm, Boolean hasJoin, String clubName, String clubType) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("dismiss", "=", false);
|
||||||
|
cnd.andEX("clubType", "=", clubType);
|
||||||
|
if (StrUtil.isNotBlank(clubName)) {
|
||||||
|
cnd.and("clubName", "like", "%" + clubName + "%");
|
||||||
|
}
|
||||||
|
if (hasJoin) {
|
||||||
|
cnd.and(new Static("club.id in (SELECT clubId from club_user WHERE userId = '%s')".formatted(SecurityUtil.getUserId())));
|
||||||
|
} else {
|
||||||
|
cnd.and(new Static("club.id not in (SELECT clubId from club_user WHERE userId = '%s')".formatted(SecurityUtil.getUserId())));
|
||||||
|
}
|
||||||
|
if (Strings.isNotBlank(pageForm.getPageOrderName()) && Strings.isNotBlank(pageForm.getPageOrderBy())) {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
} else {
|
||||||
|
cnd.asc("club.clubCode");
|
||||||
|
}
|
||||||
|
Pagination allClubWithPage = sysClubService.getAllClubWithPage(pageForm, cnd);
|
||||||
|
return Result.success(allClubWithPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("club.join.list")
|
||||||
|
public Result getCount() {
|
||||||
|
// 获取所有协会
|
||||||
|
List<SysClub> list = sysClubService.query();
|
||||||
|
// 获取审核通过的
|
||||||
|
List<ProcessInstance> instanceList = sysClubService.dao().query(
|
||||||
|
ProcessInstance.class,
|
||||||
|
Cnd.where(ProcessInstance::getBusinessNo, "in", list.stream().map(SysClub::getId).toList())
|
||||||
|
.and(ProcessInstance::getState, "=", ProcessInstanceStateEnum.FINISHED.getCode())
|
||||||
|
);
|
||||||
|
// 获取id
|
||||||
|
List<String> passList = instanceList.stream().map(ProcessInstance::getBusinessNo).toList();
|
||||||
|
|
||||||
|
int hasJoinCount = sysClubService.count(Cnd.NEW().and("dismiss", "=", false)
|
||||||
|
.and("id", "in", passList)
|
||||||
|
.and(new Static("id in (SELECT clubId from club_user WHERE userId = '%s')".formatted(SecurityUtil.getUserId()))));
|
||||||
|
|
||||||
|
int noJoinCount = sysClubService.count(Cnd.NEW().and("dismiss", "=", false)
|
||||||
|
.and("id", "in", passList)
|
||||||
|
.and(new Static("id not in (SELECT clubId from club_user WHERE userid = '%s')".formatted(SecurityUtil.getUserId()))));
|
||||||
|
NutMap nutMap = new NutMap().setv("hasJoinCount", hasJoinCount).setv("noJoinCount", noJoinCount);
|
||||||
|
return Result.success(nutMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("club.join.list")
|
||||||
|
public Result findOne(@Valid String id) {
|
||||||
|
ClubRegisterVo clubRegisterVo = sysClubService.findOne(id);
|
||||||
|
return Result.success(clubRegisterVo);
|
||||||
|
}
|
||||||
|
}
|
||||||
+25
-29
@@ -1,14 +1,22 @@
|
|||||||
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.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;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
import com.budwk.app.base.constant.BpmProcessConstant;
|
import com.budwk.app.base.constant.BpmProcessConstant;
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.budwk.app.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.budwk.app.bpm.models.BpmProcessInstance;
|
import com.budwk.app.bpm.models.BpmProcessInstance;
|
||||||
import com.budwk.app.bpm.service.BpmService;
|
import com.budwk.app.bpm.service.BpmService;
|
||||||
|
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.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;
|
||||||
@@ -45,16 +53,14 @@ public class ClubUserJoinApplyController {
|
|||||||
@Inject
|
@Inject
|
||||||
private CommonService commonService;
|
private CommonService commonService;
|
||||||
@Inject
|
@Inject
|
||||||
private BpmService bpmService;
|
|
||||||
@Inject
|
|
||||||
private SysMsgService sysMsgService;
|
private SysMsgService sysMsgService;
|
||||||
|
@Inject
|
||||||
|
private FlowEngine flowEngine;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@SaCheckPermission("club.join.apply")
|
@SaCheckPermission("club.join.apply")
|
||||||
@Ok("beetl:/platform/zhgh/club/join/apply/index.html")
|
@Ok("beetl:/platform/zhgh/club/join/apply/index.html")
|
||||||
public void index() {
|
public void index() {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ApiOperation("详情")
|
@ApiOperation("详情")
|
||||||
@@ -78,7 +84,6 @@ public class ClubUserJoinApplyController {
|
|||||||
""").setParam("id", id);
|
""").setParam("id", id);
|
||||||
sql.setCallback(Sqls.callback.map());
|
sql.setCallback(Sqls.callback.map());
|
||||||
dao.execute(sql);
|
dao.execute(sql);
|
||||||
// ClubUserApply clubUser = dao.fetch(ClubUserApply.class, id);
|
|
||||||
return Result.success(sql.getResult());
|
return Result.success(sql.getResult());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,37 +91,31 @@ public class ClubUserJoinApplyController {
|
|||||||
@ApiOperation("提交")
|
@ApiOperation("提交")
|
||||||
@SaCheckPermission("club.join.apply")
|
@SaCheckPermission("club.join.apply")
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@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())) {
|
||||||
BpmProcessInstance processInstance = dao.fetch(BpmProcessInstance.class, Cnd.where(BpmProcessInstance::getProcessInstanceBusinessId, "=", userApply.getId()));
|
ProcessInstance processInstance = dao.fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", userApply.getId()));
|
||||||
if (!processInstance.getProcessInstanceStatus().equals(BpmProcessInstanceStatusEnum.COMPLETED.name())) {
|
if (!processInstance.getState().equals(ProcessInstanceStateEnum.FINISHED.getCode())) {
|
||||||
return Result.error("您有该协会的申请记录尚未完成,请到我的申请里查看!");
|
return Result.error("您有该协会的申请记录尚未完成,请到我的申请里查看!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询协会操作员
|
|
||||||
String operatorLoginName = commonService.findUserLoginNameByRoleCode(RoleConstant.CLUB_OPERATOR, Cnd.where(Sys_user_role::getClubId, "=", clubUserApply.getClubId()));
|
|
||||||
String presidentLoginName = commonService.findUserLoginNameByRoleCode(RoleConstant.CLUB_PRESIDENT, Cnd.where(Sys_user_role::getClubId, "=", clubUserApply.getClubId()));
|
|
||||||
if (StrUtil.isAllBlank(operatorLoginName, presidentLoginName)) {
|
|
||||||
return Result.error("该协会未配置审批人,请联系校工会!");
|
|
||||||
}
|
|
||||||
|
|
||||||
clubUserApply.setRoleCode(RoleConstant.CLUB_MEMBER.name());
|
clubUserApply.setRoleCode(RoleConstant.CLUB_MEMBER.name());
|
||||||
clubUserApply.setMode(true);
|
clubUserApply.setMode(true);
|
||||||
clubUserApply.setApplyDate(new Date());
|
clubUserApply.setApplyDate(new Date());
|
||||||
dao.insertOrUpdate(clubUserApply);
|
dao.insertOrUpdate(clubUserApply);
|
||||||
|
|
||||||
Sys_user applyUser = dao.fetch(Sys_user.class, clubUserApply.getUserId());
|
// 开启流程实例
|
||||||
|
Dict args = Dict.create();
|
||||||
|
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||||
|
args.set(FlowConst.FORM_DATA, clubUserApply);
|
||||||
|
ProcessInstance instance = flowEngine.startProcessInstanceByKey("XHRH", clubUserApply.getId(), SecurityUtil.getUserId(), args);
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(operatorLoginName)) {
|
// 自动完成第一个申请任务
|
||||||
bpmService.startSubmitProcessInstance(BpmProcessConstant.CLUB_JOIN.name(), applyUser.getUsername() + "的申请", clubUserApply.getId(), List.of(operatorLoginName), null);
|
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||||
// 发送消息
|
for (ProcessTask task : doingTaskList) {
|
||||||
sysMsgService.sendMsg(operatorLoginName, "协会入会审核", "您有一条新的协会入会申请待处理,请登录暖心工会进行审批。", SecurityUtil.getUserId());
|
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||||
}else{
|
|
||||||
bpmService.startSubmitProcessInstance(BpmProcessConstant.CLUB_JOIN.name(), applyUser.getUsername() + "的申请", clubUserApply.getId(), List.of(presidentLoginName), null);
|
|
||||||
// 发送消息
|
|
||||||
sysMsgService.sendMsg(presidentLoginName, "协会入会审核", "您有一条新的协会入会申请待处理,请登录暖心工会进行审批。", SecurityUtil.getUserId());
|
|
||||||
}
|
}
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
@@ -132,16 +131,13 @@ public class ClubUserJoinApplyController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ObjectUtil.isNotEmpty(clubUser)) {
|
if (ObjectUtil.isNotEmpty(clubUser)) {
|
||||||
{
|
|
||||||
return Result.error("请勿重复申请!");
|
return Result.error("请勿重复申请!");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
BpmProcessInstance processInstance = dao.fetch(BpmProcessInstance.class, Cnd.where(BpmProcessInstance::getProcessInstanceBusinessId, "=", userApply.getId()));
|
ProcessInstance processInstance = dao.fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", userApply.getId()));
|
||||||
if (!processInstance.getProcessInstanceStatus().equals(BpmProcessInstanceStatusEnum.COMPLETED.name())) {
|
if (!processInstance.getState().equals(ProcessInstanceStateEnum.FINISHED.getCode())) {
|
||||||
return Result.error("您有该协会的申请记录尚未完成,请到我的申请里查看!");
|
return Result.error("您有该协会的申请记录尚未完成,请到我的申请里查看!");
|
||||||
}
|
}
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+45
-55
@@ -2,13 +2,16 @@ package com.budwk.app.zhgh.club.controller.apply;
|
|||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum;
|
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum;
|
||||||
import com.budwk.app.bpm.enums.BpmTaskApprovalTypeEnum;
|
import com.budwk.app.bpm.enums.BpmTaskApprovalTypeEnum;
|
||||||
import com.budwk.app.bpm.param.BpmTaskApprovalParam;
|
import com.budwk.app.bpm.param.BpmTaskApprovalParam;
|
||||||
import com.budwk.app.bpm.service.BpmService;
|
import com.budwk.app.bpm.service.BpmService;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
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.web.controllers.open.commons.service.CommonService;
|
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||||
@@ -41,16 +44,12 @@ public class ClubUserJoinApprovalController {
|
|||||||
@Inject
|
@Inject
|
||||||
private CommonService commonService;
|
private CommonService commonService;
|
||||||
@Inject
|
@Inject
|
||||||
private BpmService bpmService;
|
|
||||||
@Inject
|
|
||||||
private ClubUserJoinService clubUserJoinService;
|
private ClubUserJoinService clubUserJoinService;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@SaCheckPermission("club.join.clubApproval")
|
@SaCheckPermission("club.join.clubApproval")
|
||||||
@Ok("beetl:/platform/zhgh/club/join/clubApproval/index.html")
|
@Ok("beetl:/platform/zhgh/club/join/clubApproval/index.html")
|
||||||
public void index() {
|
public void index() {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.join.clubApproval")
|
@SaCheckPermission("club.join.clubApproval")
|
||||||
@@ -64,71 +63,62 @@ public class ClubUserJoinApprovalController {
|
|||||||
u.unitName,
|
u.unitName,
|
||||||
u.unionName,
|
u.unionName,
|
||||||
club.clubName,
|
club.clubName,
|
||||||
inst.id processInstanceId,
|
ins.id AS instanceId,
|
||||||
inst.processInstanceNodeId,
|
ins.businessNo,
|
||||||
inst.processInstanceNodeName,
|
ins.state instanceState,
|
||||||
inst.processInstanceTaskIds,
|
ins.variable instanceVariable,
|
||||||
inst.processInstanceStatus,
|
ins.processDefineId instanceProcessDefineId,
|
||||||
task.id processInstanceTaskId,
|
t.id taskId,
|
||||||
task.taskStatus processInstanceTaskStatus,
|
t.taskName AS taskKey,
|
||||||
COUNT( nt.id ) OVER ( PARTITION BY task.id ) > 0 AS nextTaskIsComplete
|
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
|
FROM
|
||||||
bpm_process_task task
|
wf_process_task t
|
||||||
INNER JOIN bpm_process_node_define nd ON nd.id = task.processTaskNodeId
|
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||||
INNER JOIN bpm_process_instance inst ON inst.id = task.processInstanceId
|
LEFT JOIN club_user_apply info ON info.id = ins.businessNo
|
||||||
INNER JOIN club_user_apply info ON info.id = inst.processInstanceBusinessId
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
|
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||||
|
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||||
LEFT JOIN sys_club club ON club.id = info.clubId
|
LEFT JOIN sys_club club ON club.id = info.clubId
|
||||||
LEFT JOIN vw_user u on u.id = info.userId
|
LEFT JOIN vw_user u on u.id = info.userId
|
||||||
LEFT JOIN bpm_process_task nt ON nt.prevTaskId = task.id
|
|
||||||
AND nt.taskStatus = 'COMPLETE'
|
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())){
|
|
||||||
cnd.and(new Static("JSON_CONTAINS( task.assignments, '\"%s\"' )".formatted(SecurityUtil.getUserLoginname())));
|
|
||||||
}
|
|
||||||
|
|
||||||
cnd.and("nd.nodeCode","=",20);
|
cnd.and("t.taskName", "=", "1625a683-3890-4788-95b7-cab8240f6731");
|
||||||
if(approval){
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
cnd.and("task.taskStatus","=", BpmProcessTaskStatusEnum.COMPLETE);
|
|
||||||
}else{
|
|
||||||
cnd.and("task.taskStatus","=",BpmProcessTaskStatusEnum.ACTIVE);
|
|
||||||
}
|
|
||||||
|
|
||||||
cnd.andEX("YEAR(info.applyDate)","=",pageForm.getYear());
|
cnd.andEX("YEAR(info.applyDate)","=",pageForm.getYear());
|
||||||
cnd.and(Cnd.likeEX("info.userName", pageForm.getUserName()));
|
cnd.and(Cnd.likeEX("info.userName", pageForm.getUserName()));
|
||||||
cnd.and(Cnd.likeEX("info.loginName", pageForm.getLoginName()));
|
cnd.and(Cnd.likeEX("info.loginName", pageForm.getLoginName()));
|
||||||
cnd.andEX("info.unionId","=",pageForm.getUnionId());
|
cnd.andEX("info.unionId","=",pageForm.getUnionId());
|
||||||
cnd.andEX("info.unitId","=",pageForm.getUnitId());
|
cnd.andEX("info.unitId","=",pageForm.getUnitId());
|
||||||
sql.setCondition(cnd);
|
|
||||||
|
|
||||||
|
if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())){
|
||||||
|
cnd.and(new Static("JSON_CONTAINS( task.assignments, '\"%s\"' )".formatted(SecurityUtil.getUserLoginname())));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (approval) {
|
||||||
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
|
} else {
|
||||||
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("info.applyDate");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
cnd.groupBy("t.id");
|
||||||
|
|
||||||
|
sql.setCondition(cnd);
|
||||||
Pagination<ClubUserJoinPageVo> pageVO = clubUserJoinService.listPageVO(pageForm, sql, ClubUserJoinPageVo.class);
|
Pagination<ClubUserJoinPageVo> pageVO = clubUserJoinService.listPageVO(pageForm, sql, ClubUserJoinPageVo.class);
|
||||||
return Result.success(pageVO);
|
return Result.success(pageVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.join.clubApproval")
|
|
||||||
@ApiOperation("审核")
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam){
|
|
||||||
approvalParam.getBpmTaskApprovalTypeEnum();
|
|
||||||
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
|
|
||||||
List<String> assignments = new ArrayList<>();
|
|
||||||
if(approvalParam.getBpmTaskApprovalTypeEnum().equals(BpmTaskApprovalTypeEnum.PASS)){
|
|
||||||
String approvalLoginName = commonService.findUserLoginNameByRoleCode(RoleConstant.SCHOOL_UNION_CLUB_ADMIN);
|
|
||||||
assignments.add(approvalLoginName);
|
|
||||||
}
|
|
||||||
bpmService.completeTask(approvalParam.getProcessInstanceTaskId(), approvalParam.getBpmTaskApprovalTypeEnum(), variables, assignments);
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.join.clubApproval")
|
|
||||||
@ApiOperation("撤回")
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
public Result revoke(@Valid String taskId){
|
|
||||||
bpmService.revokeTask(taskId);
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
-56
@@ -1,56 +0,0 @@
|
|||||||
package com.budwk.app.zhgh.club.controller.apply;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import com.budwk.app.base.constant.BpmProcessConstant;
|
|
||||||
import com.budwk.app.base.result.Result;
|
|
||||||
import com.budwk.app.bpm.service.BpmService;
|
|
||||||
import com.budwk.app.zhgh.club.service.ClubUserJoinService;
|
|
||||||
import com.budwk.app.zhgh.club.vo.ClubUserJoinVo;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import org.nutz.dao.Sqls;
|
|
||||||
import org.nutz.dao.sql.Sql;
|
|
||||||
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;
|
|
||||||
|
|
||||||
@IocBean
|
|
||||||
@At("/platform/club/join/common")
|
|
||||||
@Ok("json:full")
|
|
||||||
public class ClubUserJoinCommonController {
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ClubUserJoinService clubUserJoinService;
|
|
||||||
@Inject
|
|
||||||
private BpmService bpmService;
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ApiOperation("申请详情")
|
|
||||||
@SaCheckPermission("club")
|
|
||||||
public Result info(@Valid String id) {
|
|
||||||
Sql sql = Sqls.create("""
|
|
||||||
SELECT
|
|
||||||
cua.*,
|
|
||||||
u.loginname AS loginName,
|
|
||||||
u.username AS userName,
|
|
||||||
u.sex,
|
|
||||||
u.mobile,
|
|
||||||
u.unitName,
|
|
||||||
u.unionName,
|
|
||||||
u.technicalTitle,
|
|
||||||
u.education,
|
|
||||||
u.academicDegree
|
|
||||||
FROM
|
|
||||||
club_user_apply cua
|
|
||||||
LEFT JOIN vw_user u ON u.id = cua.userId
|
|
||||||
WHERE cua.id = @id
|
|
||||||
""");
|
|
||||||
sql.setParam("id",id);
|
|
||||||
ClubUserJoinVo clubUserJoinVo = clubUserJoinService.fetchVO(sql, ClubUserJoinVo.class);
|
|
||||||
clubUserJoinVo.setNodeTasks(bpmService.getNodeTasks(BpmProcessConstant.CLUB_JOIN, id));
|
|
||||||
return Result.success(clubUserJoinVo);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
+55
-32
@@ -1,16 +1,21 @@
|
|||||||
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 com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.constant.BpmProcessConstant;
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.param.PageForm;
|
import com.budwk.app.base.param.PageForm;
|
||||||
import com.budwk.app.base.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.bpm.service.BpmService;
|
||||||
|
import com.budwk.app.flow.engine.FlowEngine;
|
||||||
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;
|
||||||
import com.budwk.app.zhgh.club.model.ClubUserApply;
|
import com.budwk.app.zhgh.club.model.ClubUserApply;
|
||||||
|
import com.budwk.app.zhgh.club.service.ClubUserJoinService;
|
||||||
|
import com.budwk.app.zhgh.club.vo.ClubUserJoinVo;
|
||||||
import io.swagger.annotations.ApiOperation;
|
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;
|
||||||
@@ -33,16 +38,14 @@ public class ClubUserJoinMineController {
|
|||||||
@Inject
|
@Inject
|
||||||
private Dao dao;
|
private Dao dao;
|
||||||
@Inject
|
@Inject
|
||||||
private BaseService baseService;
|
private FlowEngine flowEngine;
|
||||||
@Inject
|
@Inject
|
||||||
private BpmService bpmService;
|
private ClubUserJoinService clubUserJoinService;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@SaCheckPermission("club.join.mine")
|
@SaCheckPermission("club.join.mine")
|
||||||
@Ok("beetl:/platform/zhgh/club/join/mine/index.html")
|
@Ok("beetl:/platform/zhgh/club/join/mine/index.html")
|
||||||
public void index() {
|
public void index() {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.join.mine")
|
@SaCheckPermission("club.join.mine")
|
||||||
@@ -53,34 +56,39 @@ public class ClubUserJoinMineController {
|
|||||||
club.clubName,
|
club.clubName,
|
||||||
u.loginname as loginName,
|
u.loginname as loginName,
|
||||||
u.username as userName,
|
u.username as userName,
|
||||||
inst.processInstanceNodeId,
|
ins.id AS instanceId,
|
||||||
inst.processInstanceNodeCode,
|
ins.businessNo,
|
||||||
inst.processInstanceNodeName,
|
ins.state instanceState,
|
||||||
inst.processInstanceTaskIds,
|
ins.variable instanceVariable,
|
||||||
inst.processInstanceStatus,
|
ins.processDefineId instanceProcessDefineId,
|
||||||
(
|
t.id taskId,
|
||||||
SELECT
|
t.taskName AS taskKey,
|
||||||
count( 1 ) > 0
|
t.displayName taskName,
|
||||||
FROM
|
t.taskType,
|
||||||
bpm_process_task
|
t.performType taskPerformType,
|
||||||
WHERE
|
t.taskState,
|
||||||
prevTaskId = ( SELECT id FROM bpm_process_task WHERE processInstanceId = inst.id AND processTaskNodeCode IN ( 10, 40,70 ) ORDER BY createdAt DESC LIMIT 1 )
|
t.finishTime,
|
||||||
AND taskStatus = 'COMPELTE'
|
t.taskParentId,
|
||||||
) AS nextTaskIsComplete
|
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
|
FROM
|
||||||
club_user_apply info
|
club_user_apply info
|
||||||
LEFT JOIN sys_user u on u.id = info.userId
|
LEFT JOIN sys_user u on u.id = info.userId
|
||||||
LEFT JOIN sys_club club ON club.id = info.clubId
|
LEFT JOIN sys_club club ON club.id = info.clubId
|
||||||
LEFT JOIN bpm_process_instance inst ON inst.processInstanceBusinessId = info.id
|
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
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
||||||
cnd.and("inst.processInstanceInitiatorLoginName", "=", SecurityUtil.getUserLoginname());
|
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||||
}
|
}
|
||||||
cnd.groupBy("info.id");
|
cnd.groupBy("info.id");
|
||||||
|
cnd.desc("info.applyDate");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
Pagination pagination = clubUserJoinService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
return Result.success(pagination);
|
return Result.success(pagination);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,22 +96,37 @@ public class ClubUserJoinMineController {
|
|||||||
@SaCheckPermission("club.join.apply")
|
@SaCheckPermission("club.join.apply")
|
||||||
@ApiOperation("删除")
|
@ApiOperation("删除")
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SLog(type = "clubUser", tag = "删除协会入会", msg = "删除协会入会")
|
||||||
public Result delete(@Valid String id) {
|
public Result delete(@Valid String id) {
|
||||||
dao.delete(ClubUserApply.class, id);
|
dao.delete(ClubUserApply.class, id);
|
||||||
dao.delete(ClubUser.class, id);
|
dao.delete(ClubUser.class, id);
|
||||||
bpmService.deleteInstance(id);
|
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.join.apply")
|
@ApiOperation("申请详情")
|
||||||
@ApiOperation("撤销")
|
@SaCheckPermission("club")
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
public Result info(@Valid String id) {
|
||||||
public Result revokeApply(@Valid String id) {
|
Sql sql = Sqls.create("""
|
||||||
bpmService.revokeApply(id);
|
SELECT
|
||||||
return Result.success();
|
cua.*,
|
||||||
|
u.loginname AS loginName,
|
||||||
|
u.username AS userName,
|
||||||
|
u.sex,
|
||||||
|
u.mobile,
|
||||||
|
u.unitName,
|
||||||
|
u.unionName,
|
||||||
|
u.technicalTitle,
|
||||||
|
u.education,
|
||||||
|
u.academicDegree
|
||||||
|
FROM
|
||||||
|
club_user_apply cua
|
||||||
|
LEFT JOIN vw_user u ON u.id = cua.userId
|
||||||
|
WHERE cua.id = @id
|
||||||
|
""");
|
||||||
|
sql.setParam("id",id);
|
||||||
|
ClubUserJoinVo clubUserJoinVo = clubUserJoinService.fetchVO(sql, ClubUserJoinVo.class);
|
||||||
|
return Result.success(clubUserJoinVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+48
-67
@@ -2,15 +2,18 @@ package com.budwk.app.zhgh.club.controller.apply;
|
|||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum;
|
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum;
|
||||||
import com.budwk.app.bpm.enums.BpmTaskApprovalTypeEnum;
|
import com.budwk.app.bpm.enums.BpmTaskApprovalTypeEnum;
|
||||||
import com.budwk.app.bpm.models.BpmProcessInstance;
|
import com.budwk.app.bpm.models.BpmProcessInstance;
|
||||||
import com.budwk.app.bpm.models.BpmProcessTask;
|
import com.budwk.app.bpm.models.BpmProcessTask;
|
||||||
import com.budwk.app.bpm.param.BpmTaskApprovalParam;
|
import com.budwk.app.bpm.param.BpmTaskApprovalParam;
|
||||||
import com.budwk.app.bpm.service.BpmService;
|
import com.budwk.app.bpm.service.BpmService;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
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.web.controllers.open.commons.service.CommonService;
|
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||||
@@ -34,6 +37,7 @@ import org.nutz.mvc.annotation.Ok;
|
|||||||
import org.nutz.mvc.annotation.Param;
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@IocBean
|
@IocBean
|
||||||
@@ -44,8 +48,6 @@ public class ClubUserJoinSchoolApprovalController {
|
|||||||
@Inject
|
@Inject
|
||||||
private CommonService commonService;
|
private CommonService commonService;
|
||||||
@Inject
|
@Inject
|
||||||
private BpmService bpmService;
|
|
||||||
@Inject
|
|
||||||
private ClubUserJoinService clubUserJoinService;
|
private ClubUserJoinService clubUserJoinService;
|
||||||
@Inject
|
@Inject
|
||||||
private Dao dao;
|
private Dao dao;
|
||||||
@@ -53,9 +55,7 @@ public class ClubUserJoinSchoolApprovalController {
|
|||||||
@At("")
|
@At("")
|
||||||
@SaCheckPermission("club.join.schoolUnionApproval")
|
@SaCheckPermission("club.join.schoolUnionApproval")
|
||||||
@Ok("beetl:/platform/zhgh/club/join/schoolUnionApproval/index.html")
|
@Ok("beetl:/platform/zhgh/club/join/schoolUnionApproval/index.html")
|
||||||
public void index() {
|
public void index() {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.join.schoolUnionApproval")
|
@SaCheckPermission("club.join.schoolUnionApproval")
|
||||||
@@ -69,81 +69,62 @@ public class ClubUserJoinSchoolApprovalController {
|
|||||||
u.unitName,
|
u.unitName,
|
||||||
u.unionName,
|
u.unionName,
|
||||||
club.clubName,
|
club.clubName,
|
||||||
inst.id processInstanceId,
|
ins.id AS instanceId,
|
||||||
inst.processInstanceNodeId,
|
ins.businessNo,
|
||||||
inst.processInstanceNodeName,
|
ins.state instanceState,
|
||||||
inst.processInstanceTaskIds,
|
ins.variable instanceVariable,
|
||||||
inst.processInstanceStatus,
|
ins.processDefineId instanceProcessDefineId,
|
||||||
task.id processInstanceTaskId,
|
t.id taskId,
|
||||||
task.taskStatus processInstanceTaskStatus,
|
t.taskName AS taskKey,
|
||||||
COUNT( nt.id ) OVER ( PARTITION BY task.id ) > 0 AS nextTaskIsComplete
|
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
|
FROM
|
||||||
bpm_process_task task
|
wf_process_task t
|
||||||
INNER JOIN bpm_process_node_define nd ON nd.id = task.processTaskNodeId
|
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||||
INNER JOIN bpm_process_instance inst ON inst.id = task.processInstanceId
|
LEFT JOIN club_user_apply info ON info.id = ins.businessNo
|
||||||
INNER JOIN club_user_apply info ON info.id = inst.processInstanceBusinessId
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
|
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||||
|
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||||
LEFT JOIN sys_club club ON club.id = info.clubId
|
LEFT JOIN sys_club club ON club.id = info.clubId
|
||||||
LEFT JOIN vw_user u on u.id = info.userId
|
LEFT JOIN vw_user u on u.id = info.userId
|
||||||
LEFT JOIN bpm_process_task nt ON nt.prevTaskId = task.id
|
|
||||||
AND nt.taskStatus = 'COMPLETE'
|
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
|
||||||
cnd.and(new Static("JSON_CONTAINS( task.assignments, '\"%s\"' )".formatted(SecurityUtil.getUserLoginname())));
|
cnd.and("t.taskName", "=", "6af3b155-60db-47f4-a418-c72e8333f5b4");
|
||||||
}
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
cnd.and("nd.nodeCode", "=", 50);
|
|
||||||
if (approval) {
|
|
||||||
cnd.and("task.taskStatus", "=", BpmProcessTaskStatusEnum.COMPLETE);
|
|
||||||
} else {
|
|
||||||
cnd.and("task.taskStatus", "=", BpmProcessTaskStatusEnum.ACTIVE);
|
|
||||||
}
|
|
||||||
cnd.andEX("YEAR(info.applyDate)", "=", pageForm.getYear());
|
cnd.andEX("YEAR(info.applyDate)", "=", pageForm.getYear());
|
||||||
cnd.and(Cnd.likeEX("info.userName", pageForm.getUserName()));
|
cnd.and(Cnd.likeEX("info.userName", pageForm.getUserName()));
|
||||||
cnd.and(Cnd.likeEX("info.loginName", pageForm.getLoginName()));
|
cnd.and(Cnd.likeEX("info.loginName", pageForm.getLoginName()));
|
||||||
cnd.andEX("info.unionId", "=", pageForm.getUnionId());
|
cnd.andEX("info.unionId", "=", pageForm.getUnionId());
|
||||||
cnd.andEX("info.unitId", "=", pageForm.getUnitId());
|
cnd.andEX("info.unitId", "=", pageForm.getUnitId());
|
||||||
sql.setCondition(cnd);
|
|
||||||
|
|
||||||
|
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
||||||
|
cnd.and(new Static("JSON_CONTAINS( task.assignments, '\"%s\"' )".formatted(SecurityUtil.getUserLoginname())));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (approval) {
|
||||||
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
|
} else {
|
||||||
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("info.applyDate");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
cnd.groupBy("t.id");
|
||||||
|
|
||||||
|
sql.setCondition(cnd);
|
||||||
Pagination<ClubUserJoinPageVo> pageVO = clubUserJoinService.listPageVO(pageForm, sql, ClubUserJoinPageVo.class);
|
Pagination<ClubUserJoinPageVo> pageVO = clubUserJoinService.listPageVO(pageForm, sql, ClubUserJoinPageVo.class);
|
||||||
return Result.success(pageVO);
|
return Result.success(pageVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.join.schoolUnionApproval")
|
|
||||||
@ApiOperation("审核")
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) {
|
|
||||||
approvalParam.getBpmTaskApprovalTypeEnum();
|
|
||||||
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
|
|
||||||
bpmService.completeTask(approvalParam.getProcessInstanceTaskId(), approvalParam.getBpmTaskApprovalTypeEnum(), variables, null);
|
|
||||||
|
|
||||||
if (approvalParam.getBpmTaskApprovalTypeEnum() == BpmTaskApprovalTypeEnum.PASS) {
|
|
||||||
String processInstanceBusinessId = approvalParam.getProcessInstanceBusinessId();
|
|
||||||
ClubUserApply clubUserApply = dao.fetch(ClubUserApply.class, processInstanceBusinessId);
|
|
||||||
ClubUser clubUser = BeanUtil.copyProperties(clubUserApply, ClubUser.class);
|
|
||||||
dao.insert(clubUser);
|
|
||||||
}
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.join.schoolUnionApproval")
|
|
||||||
@ApiOperation("撤回")
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
public Result revoke(@Valid String taskId) {
|
|
||||||
bpmService.revokeTask(taskId);
|
|
||||||
|
|
||||||
BpmProcessTask task = dao.fetch(BpmProcessTask.class, taskId);
|
|
||||||
String processInstanceId = task.getProcessInstanceId();
|
|
||||||
BpmProcessInstance processInstance = dao.fetch(BpmProcessInstance.class, processInstanceId);
|
|
||||||
String businessId = processInstance.getProcessInstanceBusinessId();
|
|
||||||
|
|
||||||
ClubUserApply clubUserApply = dao.fetch(ClubUserApply.class, businessId);
|
|
||||||
dao.clear(ClubUser.class, Cnd.where(ClubUser::getUserId, "=", clubUserApply.getUserId())
|
|
||||||
.and(ClubUser::getClubId, "=", clubUserApply.getClubId()));
|
|
||||||
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-10
@@ -6,6 +6,7 @@ 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.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.SysClubUser;
|
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 org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
@@ -30,8 +31,6 @@ public class ClubUserMineClubController {
|
|||||||
private Dao dao;
|
private Dao dao;
|
||||||
@Inject
|
@Inject
|
||||||
private BaseService baseService;
|
private BaseService baseService;
|
||||||
@Inject
|
|
||||||
private BpmService bpmService;
|
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@SaCheckPermission("club.join.mine.club")
|
@SaCheckPermission("club.join.mine.club")
|
||||||
@@ -41,11 +40,11 @@ public class ClubUserMineClubController {
|
|||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.join.mine.club")
|
@SaCheckPermission("club.join.mine.club")
|
||||||
public Result pageData(@Valid ClubUserPageForm pageForm) {
|
public Result pageData(@Valid ClubUserPageForm pageForm) {
|
||||||
List<SysClubUser> query = dao.query(SysClubUser.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).groupBy("clubId"));
|
List<ClubUser> query = dao.query(ClubUser.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).groupBy("clubId"));
|
||||||
if (Lang.isEmpty(query)) {
|
if (Lang.isEmpty(query)) {
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
List<String> clubIds = query.stream().map(SysClubUser::getClubId).toList();
|
List<String> clubIds = query.stream().map(ClubUser::getClubId).toList();
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
club.*,
|
club.*,
|
||||||
@@ -55,11 +54,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
|
LEFT JOIN club_user presidentCu ON presidentCu.clubId = club.id AND presidentCu.roleCode = 'CLUB_PRESIDENT'
|
||||||
AND 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 sys_club_user secretaryCu ON secretaryCu.clubId = club.id
|
LEFT JOIN club_user secretaryCu ON secretaryCu.clubId = club.id AND secretaryCu.roleCode = 'CLUB_SECRETARY'
|
||||||
AND 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,8 +70,6 @@ public class ClubUserMineClubController {
|
|||||||
return Result.success(pagination);
|
return Result.success(pagination);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.join.mine.club")
|
@SaCheckPermission("club.join.mine.club")
|
||||||
public Result getClubUsers(@Valid String clubId) {
|
public Result getClubUsers(@Valid String clubId) {
|
||||||
@@ -98,6 +93,7 @@ public class ClubUserMineClubController {
|
|||||||
LEFT JOIN sys_role role ON role.`code` = scu.rolecode
|
LEFT JOIN sys_role role ON role.`code` = scu.rolecode
|
||||||
WHERE
|
WHERE
|
||||||
scu.clubId = @clubId
|
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);
|
""").setParam("clubId", clubId);
|
||||||
return Result.success(baseService.listMap(sql));
|
return Result.success(baseService.listMap(sql));
|
||||||
}
|
}
|
||||||
|
|||||||
-174
@@ -1,174 +0,0 @@
|
|||||||
package com.budwk.app.zhgh.club.controller.applyJoin;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.budwk.app.base.annotation.SLog;
|
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
|
||||||
import com.budwk.app.base.page.Pagination;
|
|
||||||
import com.budwk.app.base.param.PageForm;
|
|
||||||
import com.budwk.app.base.result.Result;
|
|
||||||
import com.budwk.app.base.utils.PageUtil;
|
|
||||||
import com.budwk.app.sys.models.Sys_user;
|
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
|
||||||
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.SysClubUserService;
|
|
||||||
import com.budwk.app.zhgh.club.vo.ClubRegisterVo;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
|
||||||
import org.nutz.dao.Chain;
|
|
||||||
import org.nutz.dao.Cnd;
|
|
||||||
import org.nutz.dao.Sqls;
|
|
||||||
import org.nutz.dao.sql.Sql;
|
|
||||||
import org.nutz.dao.util.cri.Static;
|
|
||||||
import org.nutz.ioc.aop.Aop;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
import org.nutz.lang.Strings;
|
|
||||||
import org.nutz.lang.util.NutMap;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
|
||||||
import org.nutz.mvc.annotation.Ok;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: JyuHsin
|
|
||||||
* @Date: 2024/8/7 10:14
|
|
||||||
* @Version: v1.0.0
|
|
||||||
* @Description: TODO
|
|
||||||
**/
|
|
||||||
@Slf4j
|
|
||||||
@IocBean
|
|
||||||
@Ok("json")
|
|
||||||
@At("/platform/club/applyJoin/apply")
|
|
||||||
public class ClubUserApplyController {
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysClubService sysClubService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysClubUserService sysClubUserService;
|
|
||||||
|
|
||||||
@At("")
|
|
||||||
@Ok("beetl:/platform/zhgh/club/applyJoin/apply/index.html")
|
|
||||||
@SaCheckPermission("club.applyJoin.apply")
|
|
||||||
public void index() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.applyJoin.apply")
|
|
||||||
public Result pageData(@Valid PageForm pageForm, Boolean hasJoin, String clubName, String clubType) {
|
|
||||||
Cnd cnd = Cnd.NEW();
|
|
||||||
cnd.and("dismiss", "=", false);
|
|
||||||
cnd.andEX("clubType", "=", clubType);
|
|
||||||
if (StrUtil.isNotBlank(clubName)) {
|
|
||||||
cnd.and("clubName", "like", "%" + clubName + "%");
|
|
||||||
}
|
|
||||||
if (hasJoin) {
|
|
||||||
cnd.and(new Static("club.id in (SELECT clubId from club_user WHERE userId = '%s')".formatted(SecurityUtil.getUserId())));
|
|
||||||
} else {
|
|
||||||
cnd.and(new Static("club.id not in (SELECT clubId from club_user WHERE userId = '%s')".formatted(SecurityUtil.getUserId())));
|
|
||||||
}
|
|
||||||
if (Strings.isNotBlank(pageForm.getPageOrderName()) && Strings.isNotBlank(pageForm.getPageOrderBy())) {
|
|
||||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
|
||||||
} else {
|
|
||||||
cnd.asc("club.clubCode");
|
|
||||||
}
|
|
||||||
Pagination allClubWithPage = sysClubService.getAllClubWithPage(pageForm, cnd);
|
|
||||||
return Result.success(allClubWithPage);
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.applyJoin.apply")
|
|
||||||
public Result getCount() {
|
|
||||||
int hasJoinCount = sysClubService.dao().count(SysClub.class, Cnd.NEW().and("dismiss", "=", false)
|
|
||||||
//.and("state", "=", ClubRegistAuditState.SCHOOL_PASS)
|
|
||||||
.and(new Static("id in (SELECT clubId from club_user WHERE userId = '%s')".formatted(SecurityUtil.getUserId()))));
|
|
||||||
int noJoinCount = sysClubService.dao().count(SysClub.class, Cnd.NEW().and("dismiss", "=", false)
|
|
||||||
//.and("state", "=", ClubRegistAuditState.SCHOOL_PASS)
|
|
||||||
.and(new Static("id not in (SELECT clubId from club_user WHERE userid = '%s')".formatted(SecurityUtil.getUserId()))));
|
|
||||||
NutMap nutMap = new NutMap().setv("hasJoinCount", hasJoinCount).setv("noJoinCount", noJoinCount);
|
|
||||||
return Result.success(nutMap);
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.applyJoin.apply")
|
|
||||||
public Result getInClubByCurUser() {
|
|
||||||
String id = Objects.requireNonNull(SecurityUtil.getUserId());
|
|
||||||
Sys_user sysUser = sysClubService.dao().fetch(Sys_user.class, id);
|
|
||||||
if (sysUser.getUserState() != null && !List.of("在职", "在岗").contains(sysUser.getUserState())) {
|
|
||||||
return Result.error("只支持在职教职工申请加入协会");
|
|
||||||
}
|
|
||||||
Sql sql = Sqls.create("""
|
|
||||||
select
|
|
||||||
club.*
|
|
||||||
from sys_club club
|
|
||||||
left join club_user cu on club.id=cu.clubId
|
|
||||||
where
|
|
||||||
cu.userId=@userId
|
|
||||||
group by cu.clubId
|
|
||||||
""").setParam("userId", id);
|
|
||||||
List<NutMap> list = sysClubService.listMap(sql);
|
|
||||||
return Result.success(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
@SaCheckPermission("club.applyJoin.apply")
|
|
||||||
@SLog(type = "clubApplyJoin", tag = "提交入会申请", msg = "提交入会申请")
|
|
||||||
public Result submit(@Valid String id) {
|
|
||||||
|
|
||||||
sysClubService.dao().clear(SysClubUser.class, Cnd.where("clubId", "=", id).and("userId", "=", SecurityUtil.getUserId()));
|
|
||||||
|
|
||||||
SysClubUser sysClubUser = new SysClubUser();
|
|
||||||
sysClubUser.setClubId(id);
|
|
||||||
sysClubUser.setUserId(SecurityUtil.getUserId());
|
|
||||||
sysClubUser.setJoinTime(DateUtil.now());
|
|
||||||
sysClubUser.setRoleCode(RoleConstant.CLUB_MEMBER.name());
|
|
||||||
sysClubUser.setStatus(1);
|
|
||||||
sysClubUser.setPayed(false);
|
|
||||||
sysClubUser.setIsNormal(true);
|
|
||||||
sysClubUser.setGiveMoney(false);
|
|
||||||
sysClubService.dao().insert(sysClubUser);
|
|
||||||
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
@SaCheckPermission("club.applyJoin.apply")
|
|
||||||
@SLog(type = "clubApplyJoin", tag = "撤销入会申请", msg = "撤销入会申请")
|
|
||||||
public Result revocation(@Valid String id) {
|
|
||||||
sysClubService.dao().clear(SysClubUser.class, Cnd.where("clubId", "=", id).and("userId", "=", SecurityUtil.getUserId()));
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.applyJoin.apply")
|
|
||||||
public Result findOne(@Valid String id) {
|
|
||||||
ClubRegisterVo clubRegisterVo = sysClubService.findOne(id);
|
|
||||||
return Result.success(clubRegisterVo);
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.applyJoin.apply")
|
|
||||||
@SLog(type = "clubApplyJoin", tag = "提交退会申请", msg = "提交退会申请")
|
|
||||||
public Result exitClub(@Valid String id) {
|
|
||||||
sysClubUserService.update(Chain.make("exitStatus", 1)
|
|
||||||
, Cnd.where("clubId", "=", id).and("userId", "=", SecurityUtil.getUserId()));
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.applyJoin.apply")
|
|
||||||
@SLog(type = "clubApplyJoin", tag = "撤销退会申请", msg = "撤销退会申请")
|
|
||||||
public Result cancelExitClub(@Valid String id) {
|
|
||||||
sysClubUserService.update(Chain.make("exitStatus", null)
|
|
||||||
, Cnd.where("clubId", "=", id).and("userId", "=", SecurityUtil.getUserId()));
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-67
@@ -1,67 +0,0 @@
|
|||||||
package com.budwk.app.zhgh.club.controller.applyJoin;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
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.zhgh.club.model.SysClub;
|
|
||||||
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
|
||||||
import com.budwk.app.zhgh.club.service.SysClubService;
|
|
||||||
import com.budwk.app.zhgh.club.service.SysClubUserService;
|
|
||||||
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.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: JyuHsin
|
|
||||||
* @Date: 2024/8/7 10:14
|
|
||||||
* @Version: v1.0.0
|
|
||||||
* @Description: TODO
|
|
||||||
**/
|
|
||||||
@IocBean
|
|
||||||
@Ok("json")
|
|
||||||
@At("/platform/club/applyJoin/clubAudit")
|
|
||||||
public class ClubUserClubAuditController {
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysClubService sysClubService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysClubUserService sysClubUserService;
|
|
||||||
|
|
||||||
@At("")
|
|
||||||
@Ok("beetl:/platform/zhgh/club/applyJoin/clubAudit/index.html")
|
|
||||||
@SaCheckPermission("club.applyJoin.clubAudit")
|
|
||||||
public void index() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.applyJoin.clubAudit")
|
|
||||||
public Result pageData(@Valid ClubUserPageForm pageForm) {
|
|
||||||
Pagination pagination = sysClubUserService.pageDataByApplyJoinClubAudit(pageForm);
|
|
||||||
return Result.success(pagination);
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.applyJoin.clubAudit")
|
|
||||||
public Result getMyMangeClub() {
|
|
||||||
List<SysClub> myManageClub = sysClubService.getMyManageClub();
|
|
||||||
return Result.success(myManageClub);
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.applyJoin.clubAudit")
|
|
||||||
@SLog(type = "clubApplyAudit", tag = "协会审核入会申请", msg = "协会审核入会申请")
|
|
||||||
public Result doAudit(@Valid String[] ids,
|
|
||||||
@Valid Boolean auditResult,
|
|
||||||
@Valid Integer auditType,
|
|
||||||
@Valid Integer applyType,
|
|
||||||
@Valid Boolean payed) {
|
|
||||||
sysClubUserService.doAudit(ids, auditResult, auditType, applyType, payed);
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,6 +3,9 @@ package com.budwk.app.zhgh.club.controller.common;
|
|||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
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.enums.BpmProcessInstanceStatusEnum;
|
||||||
|
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum;
|
||||||
|
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
||||||
import com.budwk.app.zhgh.club.model.SysClub;
|
import com.budwk.app.zhgh.club.model.SysClub;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
@@ -32,11 +35,10 @@ public class ClubCommonController {
|
|||||||
c.*
|
c.*
|
||||||
FROM
|
FROM
|
||||||
`sys_club` c
|
`sys_club` c
|
||||||
LEFT JOIN bpm_process_instance inst ON inst.processInstanceBusinessId = c.id
|
LEFT JOIN wf_process_instance inst ON inst.businessNo = c.id
|
||||||
WHERE
|
WHERE
|
||||||
inst.processInstanceStatus = 'COMPLETED'
|
inst.state = @state
|
||||||
AND inst.processInstanceNodeCode = 80
|
""").setParam("state", ProcessInstanceStateEnum.FINISHED.getCode());
|
||||||
""");
|
|
||||||
List list = baseService.listVO(sql, SysClub.class);
|
List list = baseService.listVO(sql, SysClub.class);
|
||||||
return Result.success(list);
|
return Result.success(list);
|
||||||
}
|
}
|
||||||
|
|||||||
+48
-26
@@ -1,20 +1,26 @@
|
|||||||
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.util.StrUtil;
|
import cn.hutool.core.lang.Dict;
|
||||||
|
import cn.hutool.db.Db;
|
||||||
|
import cn.hutool.db.ds.DSFactory;
|
||||||
import com.budwk.app.base.annotation.SLog;
|
import com.budwk.app.base.annotation.SLog;
|
||||||
import com.budwk.app.base.constant.BpmProcessConstant;
|
import com.budwk.app.base.constant.BpmProcessConstant;
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.bpm.service.BpmService;
|
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.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.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.SysClubEvaluate;
|
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 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;
|
||||||
@@ -45,15 +51,12 @@ public class ClubEvaluateApplyController {
|
|||||||
@Inject
|
@Inject
|
||||||
private SysClubEvaluateService evaluateService;
|
private SysClubEvaluateService evaluateService;
|
||||||
@Inject
|
@Inject
|
||||||
private BpmService bpmService;
|
private FlowEngine flowEngine;
|
||||||
@Inject
|
|
||||||
private CommonService commonService;
|
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/club/evaluate/apply/index.html")
|
@Ok("beetl:/platform/zhgh/club/evaluate/apply/index.html")
|
||||||
@SaCheckPermission("club.evaluate.apply")
|
@SaCheckPermission("club.evaluate.apply")
|
||||||
public void index() {
|
public void index() {}
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@@ -61,15 +64,6 @@ public class ClubEvaluateApplyController {
|
|||||||
@SLog(type = "evaluateApply", tag = "保存协会评优申请", msg = "保存协会评优申请")
|
@SLog(type = "evaluateApply", tag = "保存协会评优申请", msg = "保存协会评优申请")
|
||||||
public Result doSave(@Param("evaluate") SysClubEvaluate evaluate) {
|
public Result doSave(@Param("evaluate") SysClubEvaluate evaluate) {
|
||||||
evaluateService.dao().insertOrUpdate(evaluate);
|
evaluateService.dao().insertOrUpdate(evaluate);
|
||||||
SysClub club = sysClubService.fetch(evaluate.getClubId());
|
|
||||||
bpmService.startSaveProcessInstance(BpmProcessConstant.CLUB_EVALUATE.name(), club.getClubName() + "的协会评优申请", evaluate.getId(), null);
|
|
||||||
return Result.success(evaluate);
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.evaluate")
|
|
||||||
public Result info(@Valid String id) {
|
|
||||||
SysClubEvaluate evaluate = evaluateService.fetch(id);
|
|
||||||
return Result.success(evaluate);
|
return Result.success(evaluate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,16 +73,45 @@ public class ClubEvaluateApplyController {
|
|||||||
@SLog(type = "evaluateApply", tag = "提交协会评优", msg = "提交协会评优")
|
@SLog(type = "evaluateApply", tag = "提交协会评优", msg = "提交协会评优")
|
||||||
public Result doSubmit(@Valid @Param("evaluate") SysClubEvaluate evaluate) {
|
public Result doSubmit(@Valid @Param("evaluate") SysClubEvaluate evaluate) {
|
||||||
evaluateService.dao().insertOrUpdate(evaluate);
|
evaluateService.dao().insertOrUpdate(evaluate);
|
||||||
SysClub club = sysClubService.fetch(evaluate.getClubId());
|
|
||||||
//查询校协会管理员审批人工号
|
// 开启流程实例
|
||||||
String clubPresidentLoginName = commonService.findUserLoginNameByRoleCode(RoleConstant.SCHOOL_UNION_CLUB_ADMIN, Cnd.NEW());
|
Dict args = Dict.create();
|
||||||
if (StrUtil.isBlank(clubPresidentLoginName)) {
|
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||||
return Result.error("校协会管理员未配置审批人,请联系校工会!");
|
args.set(FlowConst.FORM_DATA, evaluate);
|
||||||
|
ProcessInstance instance = flowEngine.startProcessInstanceByKey("XHPY", evaluate.getId(), SecurityUtil.getUserId(), args);
|
||||||
|
|
||||||
|
// 自动完成第一个申请任务
|
||||||
|
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||||
|
for (ProcessTask task : doingTaskList) {
|
||||||
|
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||||
}
|
}
|
||||||
bpmService.startSubmitProcessInstance(BpmProcessConstant.CLUB_EVALUATE.name(), club.getClubName() + "的协会评优申请", evaluate.getId(), List.of(clubPresidentLoginName), null);
|
|
||||||
return Result.success(evaluate);
|
return Result.success(evaluate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("club.evaluate")
|
||||||
|
public Result info(@Valid String id) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
ce.*,
|
||||||
|
c.clubName,
|
||||||
|
c.clubCode,
|
||||||
|
c.createTime,
|
||||||
|
d.NAME AS typeName,
|
||||||
|
c.foundTime
|
||||||
|
FROM
|
||||||
|
sys_club_evaluate ce
|
||||||
|
left join sys_club c on ce.clubId = c.id
|
||||||
|
LEFT JOIN sys_dict d ON d.CODE = c.clubType
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
cnd.andEX("ce.id", "=", id);
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
ClubEvaluateVo clubEvaluateVo = evaluateService.fetchVO(sql, ClubEvaluateVo.class);
|
||||||
|
return Result.success(clubEvaluateVo);
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club")
|
@SaCheckPermission("club")
|
||||||
public Result getMyClubAndYearAuditPass(Integer year) {
|
public Result getMyClubAndYearAuditPass(Integer year) {
|
||||||
@@ -99,10 +122,9 @@ public class ClubEvaluateApplyController {
|
|||||||
c.id
|
c.id
|
||||||
FROM
|
FROM
|
||||||
`sys_club` c
|
`sys_club` c
|
||||||
LEFT JOIN bpm_process_instance inst ON inst.processInstanceBusinessId = c.id
|
LEFT JOIN wf_process_instance inst ON inst.businessNo = c.id
|
||||||
WHERE
|
WHERE
|
||||||
inst.processInstanceStatus = 'COMPLETED'
|
inst.state = 20
|
||||||
AND inst.processInstanceNodeCode = 80
|
|
||||||
""");
|
""");
|
||||||
sql.setCallback(Sqls.callback.strList());
|
sql.setCallback(Sqls.callback.strList());
|
||||||
sysClubService.execute(sql);
|
sysClubService.execute(sql);
|
||||||
|
|||||||
-55
@@ -1,55 +0,0 @@
|
|||||||
package com.budwk.app.zhgh.club.controller.evaluate;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import com.budwk.app.base.constant.BpmProcessConstant;
|
|
||||||
import com.budwk.app.base.result.Result;
|
|
||||||
import com.budwk.app.bpm.service.BpmService;
|
|
||||||
import com.budwk.app.zhgh.club.service.SysClubEvaluateService;
|
|
||||||
import com.budwk.app.zhgh.club.vo.ClubEvaluateVo;
|
|
||||||
import org.nutz.dao.Cnd;
|
|
||||||
import org.nutz.dao.Sqls;
|
|
||||||
import org.nutz.dao.sql.Sql;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
import org.nutz.lang.util.NutMap;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
|
||||||
import org.nutz.mvc.annotation.Ok;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
@IocBean
|
|
||||||
@Ok("json")
|
|
||||||
@At("/platform/club/evaluate/common")
|
|
||||||
public class ClubEvaluateCommonController {
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysClubEvaluateService sysClubEvaluateService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private BpmService bpmService;
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.evaluate")
|
|
||||||
public Result findOne(@Valid String id) {
|
|
||||||
Cnd cnd = Cnd.NEW();
|
|
||||||
Sql sql = Sqls.create("""
|
|
||||||
SELECT
|
|
||||||
ce.*,
|
|
||||||
c.clubName,
|
|
||||||
c.clubCode,
|
|
||||||
c.createTime,
|
|
||||||
d.NAME AS typeName,
|
|
||||||
c.foundTime
|
|
||||||
FROM
|
|
||||||
sys_club_evaluate ce
|
|
||||||
left join sys_club c on ce.clubId = c.id
|
|
||||||
LEFT JOIN sys_dict d ON d.CODE = c.clubType
|
|
||||||
$condition
|
|
||||||
""");
|
|
||||||
cnd.andEX("ce.id", "=", id);
|
|
||||||
sql.setCondition(cnd);
|
|
||||||
ClubEvaluateVo clubEvaluateVo = sysClubEvaluateService.fetchVO(sql, ClubEvaluateVo.class);
|
|
||||||
clubEvaluateVo.setNodeTasks(bpmService.getNodeTasks(BpmProcessConstant.CLUB_EVALUATE, id));
|
|
||||||
return Result.success(clubEvaluateVo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+4
-15
@@ -5,6 +5,7 @@ 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.bpm.service.BpmService;
|
import com.budwk.app.bpm.service.BpmService;
|
||||||
|
import com.budwk.app.flow.engine.FlowEngine;
|
||||||
import com.budwk.app.zhgh.club.model.SysClubEvaluate;
|
import com.budwk.app.zhgh.club.model.SysClubEvaluate;
|
||||||
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubEvaluateService;
|
import com.budwk.app.zhgh.club.service.SysClubEvaluateService;
|
||||||
@@ -32,15 +33,13 @@ public class ClubEvaluateMineController {
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysClubEvaluateService sysClubEvaluateService;
|
private SysClubEvaluateService sysClubEvaluateService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private BpmService bpmService;
|
private FlowEngine flowEngine;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/club/evaluate/mine/index.html")
|
@Ok("beetl:/platform/zhgh/club/evaluate/mine/index.html")
|
||||||
@SaCheckPermission("club.evaluate.mine")
|
@SaCheckPermission("club.evaluate.mine")
|
||||||
public void index() {
|
public void index() {}
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.evaluate.mine")
|
@SaCheckPermission("club.evaluate.mine")
|
||||||
@@ -55,17 +54,7 @@ public class ClubEvaluateMineController {
|
|||||||
@SLog(type = "evaluateApply", tag = "删除协会评优", msg = "删除协会评优")
|
@SLog(type = "evaluateApply", tag = "删除协会评优", msg = "删除协会评优")
|
||||||
public Result doDelete(@Valid String id) {
|
public Result doDelete(@Valid String id) {
|
||||||
sysClubEvaluateService.dao().delete(SysClubEvaluate.class, id);
|
sysClubEvaluateService.dao().delete(SysClubEvaluate.class, id);
|
||||||
bpmService.deleteInstance(id);
|
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.evaluate.mine")
|
|
||||||
@ApiOperation("撤回")
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
@SLog(tag = "协会评优", msg = "撤回申请")
|
|
||||||
public Result revokeApply(@Valid String id) {
|
|
||||||
bpmService.revokeApply(id);
|
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-25
@@ -35,14 +35,10 @@ public class ClubEvaluateSchoolAuditController {
|
|||||||
@Inject
|
@Inject
|
||||||
private SysClubEvaluateService sysClubEvaluateService;
|
private SysClubEvaluateService sysClubEvaluateService;
|
||||||
|
|
||||||
@Inject
|
|
||||||
private BpmService bpmService;
|
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/club/evaluate/schoolAudit/index.html")
|
@Ok("beetl:/platform/zhgh/club/evaluate/schoolAudit/index.html")
|
||||||
@SaCheckPermission("club.evaluate.schoolAudit")
|
@SaCheckPermission("club.evaluate.schoolAudit")
|
||||||
public void index() {
|
public void index() {}
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.evaluate.schoolAudit")
|
@SaCheckPermission("club.evaluate.schoolAudit")
|
||||||
@@ -50,24 +46,4 @@ public class ClubEvaluateSchoolAuditController {
|
|||||||
Pagination<ClubEvaluatePageVo> pagination = sysClubEvaluateService.schoolAuditPageData(pageForm);
|
Pagination<ClubEvaluatePageVo> pagination = sysClubEvaluateService.schoolAuditPageData(pageForm);
|
||||||
return Result.success(pagination);
|
return Result.success(pagination);
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
@SaCheckPermission("club.evaluate.schoolAudit")
|
|
||||||
@SLog(type = "clubEvaluate", tag = "校工会审核评优申请", msg = "校工会审核评优申请", param = true)
|
|
||||||
public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) {
|
|
||||||
approvalParam.getBpmTaskApprovalTypeEnum();
|
|
||||||
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
|
|
||||||
bpmService.completeTask(approvalParam.getProcessInstanceTaskId(), approvalParam.getBpmTaskApprovalTypeEnum(), variables, null);
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
@SaCheckPermission("club.evaluate.schoolAudit")
|
|
||||||
@SLog(type = "clubEvaluate", tag = "校工会撤回评优申请", msg = "校工会撤回评优申请", param = true)
|
|
||||||
public Result revoke(@Valid String taskId) {
|
|
||||||
bpmService.revokeTask(taskId);
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+35
-26
@@ -1,20 +1,24 @@
|
|||||||
package com.budwk.app.zhgh.club.controller.examine;
|
package com.budwk.app.zhgh.club.controller.examine;
|
||||||
|
|
||||||
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 cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.budwk.app.base.annotation.SLog;
|
import com.budwk.app.base.annotation.SLog;
|
||||||
import com.budwk.app.base.constant.BpmProcessConstant;
|
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.bpm.service.BpmService;
|
import com.budwk.app.flow.constant.FlowConst;
|
||||||
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
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.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.SysClubExamineRegister;
|
import com.budwk.app.zhgh.club.model.SysClubExamineRegister;
|
||||||
import com.budwk.app.zhgh.club.model.SysClubUser;
|
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 com.budwk.app.zhgh.club.service.SysClubUserService;
|
|
||||||
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;
|
||||||
@@ -44,27 +48,27 @@ public class ClubExamineApplyController {
|
|||||||
@Inject
|
@Inject
|
||||||
private SysClubService sysClubService;
|
private SysClubService sysClubService;
|
||||||
@Inject
|
@Inject
|
||||||
private SysClubUserService sysClubUserService;
|
|
||||||
@Inject
|
|
||||||
private Dao dao;
|
private Dao dao;
|
||||||
@Inject
|
@Inject
|
||||||
private SysClubExamineService sysClubExamineService;
|
private SysClubExamineService sysClubExamineService;
|
||||||
@Inject
|
@Inject
|
||||||
private BpmService bpmService;
|
private FlowEngine flowEngine;
|
||||||
@Inject
|
|
||||||
private CommonService commonService;
|
|
||||||
|
|
||||||
@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) {
|
||||||
int count = dao.count(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));
|
||||||
return Result.success(count);
|
List<ProcessInstance> instanceList = dao.query(
|
||||||
|
ProcessInstance.class,
|
||||||
|
Cnd.where(ProcessInstance::getBusinessNo, "in", list.stream().map(SysClubExamineRegister::getId).toList())
|
||||||
|
.and(ProcessInstance::getState, "in", List.of(ProcessInstanceStateEnum.DOING.getCode(), ProcessInstanceStateEnum.FINISHED.getCode()))
|
||||||
|
);
|
||||||
|
return Result.success(instanceList.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@@ -109,10 +113,10 @@ public class ClubExamineApplyController {
|
|||||||
@SaCheckPermission("club")
|
@SaCheckPermission("club")
|
||||||
public Result getLasYearSurplus(@Valid String clubId) {
|
public Result getLasYearSurplus(@Valid String clubId) {
|
||||||
SysClubExamineRegister register = dao.fetch(SysClubExamineRegister.class, Cnd.where("clubId", "=", clubId)
|
SysClubExamineRegister register = dao.fetch(SysClubExamineRegister.class, Cnd.where("clubId", "=", clubId)
|
||||||
.and("YEAR(registerDate)", "=", cn.hutool.core.date.DateUtil.thisYear() - 1));
|
.and("YEAR(registerDate)", "=", DateUtil.thisYear() - 1));
|
||||||
if (Lang.isNotEmpty(register)) {
|
if (Lang.isNotEmpty(register)) {
|
||||||
List<JSONObject> incomeCensuss = register.getIncomeCensus();
|
List<JSONObject> list = register.getIncomeCensus();
|
||||||
float surplus = incomeCensuss.get(0).getFloat("surplus");
|
float surplus = list.get(0).getFloat("surplus");
|
||||||
return Result.success(surplus);
|
return Result.success(surplus);
|
||||||
}
|
}
|
||||||
return Result.success(0);
|
return Result.success(0);
|
||||||
@@ -133,13 +137,11 @@ public class ClubExamineApplyController {
|
|||||||
public Result doSave(@Param("data") SysClubExamineRegister examineRegister,
|
public Result doSave(@Param("data") SysClubExamineRegister examineRegister,
|
||||||
@Param("incomeDetailed") String incomeDetailed,
|
@Param("incomeDetailed") String incomeDetailed,
|
||||||
@Param("incomeCensus") String incomeCensus) {
|
@Param("incomeCensus") String incomeCensus) {
|
||||||
SysClubExamineRegister register;
|
|
||||||
if(StrUtil.isBlank(examineRegister.getId())) {
|
if(StrUtil.isBlank(examineRegister.getId())) {
|
||||||
register = sysClubExamineService.doAdd(examineRegister, incomeDetailed, incomeCensus);
|
sysClubExamineService.doAdd(examineRegister, incomeDetailed, incomeCensus);
|
||||||
} else {
|
} else {
|
||||||
register = sysClubExamineService.doEdit(examineRegister, incomeDetailed, incomeCensus);
|
sysClubExamineService.doEdit(examineRegister, incomeDetailed, incomeCensus);
|
||||||
}
|
}
|
||||||
bpmService.startSaveProcessInstance(BpmProcessConstant.CLUB_EXAMINE.name(), register.getClubName()+"的协会考核申请", register.getId(), null);
|
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,12 +158,19 @@ public class ClubExamineApplyController {
|
|||||||
} else {
|
} else {
|
||||||
reg = sysClubExamineService.doEdit(examineRegister, incomeDetailed, incomeCensus);
|
reg = sysClubExamineService.doEdit(examineRegister, incomeDetailed, incomeCensus);
|
||||||
}
|
}
|
||||||
//查询校协会管理员审批人工号
|
|
||||||
String clubPresidentLoginName = commonService.findUserLoginNameByRoleCode(RoleConstant.SCHOOL_UNION_CLUB_ADMIN, Cnd.NEW());
|
// 开启流程实例
|
||||||
if(StrUtil.isBlank(clubPresidentLoginName)){
|
Dict args = Dict.create();
|
||||||
return Result.error("校协会管理员未配置审批人,请联系校工会!");
|
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||||
|
args.set(FlowConst.FORM_DATA, reg);
|
||||||
|
ProcessInstance instance = flowEngine.startProcessInstanceByKey("XHPY", reg.getId(), SecurityUtil.getUserId(), args);
|
||||||
|
|
||||||
|
// 自动完成第一个申请任务
|
||||||
|
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||||
|
for (ProcessTask task : doingTaskList) {
|
||||||
|
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||||
}
|
}
|
||||||
bpmService.startSubmitProcessInstance(BpmProcessConstant.CLUB_EXAMINE.name(), examineRegister.getClubName()+"的协会考核申请", examineRegister.getId(), List.of(clubPresidentLoginName),null);
|
|
||||||
return Result.success(reg);
|
return Result.success(reg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-16
@@ -5,6 +5,7 @@ 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.bpm.service.BpmService;
|
import com.budwk.app.bpm.service.BpmService;
|
||||||
|
import com.budwk.app.flow.engine.FlowEngine;
|
||||||
import com.budwk.app.zhgh.club.model.SysClubExamineRegisterDetailed;
|
import com.budwk.app.zhgh.club.model.SysClubExamineRegisterDetailed;
|
||||||
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubExamineService;
|
import com.budwk.app.zhgh.club.service.SysClubExamineService;
|
||||||
@@ -29,15 +30,13 @@ public class ClubExamineMineController {
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysClubExamineService sysClubExamineService;
|
private SysClubExamineService sysClubExamineService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private BpmService bpmService;
|
private FlowEngine flowEngine;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/club/examine/mine/index.html")
|
@Ok("beetl:/platform/zhgh/club/examine/mine/index.html")
|
||||||
@SaCheckPermission("club.examine.mine")
|
@SaCheckPermission("club.examine.mine")
|
||||||
public void index() {
|
public void index() {}
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.examine.mine")
|
@SaCheckPermission("club.examine.mine")
|
||||||
@@ -53,17 +52,7 @@ public class ClubExamineMineController {
|
|||||||
public Result doDelete(@Valid String id) {
|
public Result doDelete(@Valid String id) {
|
||||||
sysClubExamineService.delete(id);
|
sysClubExamineService.delete(id);
|
||||||
sysClubExamineService.dao().clear(SysClubExamineRegisterDetailed.class, Cnd.where("registerId", "=", id));
|
sysClubExamineService.dao().clear(SysClubExamineRegisterDetailed.class, Cnd.where("registerId", "=", id));
|
||||||
bpmService.deleteInstance(id);
|
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.examine.mine")
|
|
||||||
@ApiOperation("撤回")
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
@SLog(tag = "协会年审", msg = "撤回申请")
|
|
||||||
public Result revokeApply(@Valid String id) {
|
|
||||||
bpmService.revokeApply(id);
|
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,5 +115,4 @@ public class ClubExamineMineController {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-28
@@ -30,17 +30,10 @@ public class ClubExamineSchoolAuditController {
|
|||||||
@Inject
|
@Inject
|
||||||
private SysClubExamineService sysClubExamineService;
|
private SysClubExamineService sysClubExamineService;
|
||||||
|
|
||||||
@Inject
|
|
||||||
private BpmService bpmService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private CommonService commonService;
|
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/club/examine/schoolAudit/index.html")
|
@Ok("beetl:/platform/zhgh/club/examine/schoolAudit/index.html")
|
||||||
@SaCheckPermission("club.examine.schoolAudit")
|
@SaCheckPermission("club.examine.schoolAudit")
|
||||||
public void index() {
|
public void index() {}
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.examine.schoolAudit")
|
@SaCheckPermission("club.examine.schoolAudit")
|
||||||
@@ -48,24 +41,4 @@ public class ClubExamineSchoolAuditController {
|
|||||||
Pagination<ClubExaminePageVo> pagination = sysClubExamineService.schoolAuditPageData(pageForm);
|
Pagination<ClubExaminePageVo> pagination = sysClubExamineService.schoolAuditPageData(pageForm);
|
||||||
return Result.success(pagination);
|
return Result.success(pagination);
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
@SaCheckPermission("club.examine.schoolAudit")
|
|
||||||
@SLog(type = "clubExamine", tag = "校工会审核年度考核", msg = "校工会审核年度考核", param = true)
|
|
||||||
public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) {
|
|
||||||
approvalParam.getBpmTaskApprovalTypeEnum();
|
|
||||||
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
|
|
||||||
bpmService.completeTask(approvalParam.getProcessInstanceTaskId(), approvalParam.getBpmTaskApprovalTypeEnum(), variables, null);
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
@SaCheckPermission("club.examine.schoolAudit")
|
|
||||||
@SLog(type = "clubExamine", tag = "校工会撤回年度考核", msg = "校工会撤回年度考核", param = true)
|
|
||||||
public Result revoke(@Valid String taskId) {
|
|
||||||
bpmService.revokeTask(taskId);
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-49
@@ -63,19 +63,14 @@ public class ClubInfoManageController {
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysClubInfoManageService clubInfoManageService;
|
private SysClubInfoManageService clubInfoManageService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysClubUserService sysClubUserService;
|
private SysClubUserService sysClubUserService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Dao dao;
|
private Dao dao;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private CommonService commonService;
|
private CommonService commonService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysRoleService sysRoleService;
|
private SysRoleService sysRoleService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysUserService sysUserService;
|
private SysUserService sysUserService;
|
||||||
|
|
||||||
@@ -133,24 +128,14 @@ public class ClubInfoManageController {
|
|||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
@SaCheckPermission("club.infoManage.manage")
|
|
||||||
@SLog(type = "infoManage", tag = "撤回变更身份", msg = "撤回变更身份", param = true)
|
|
||||||
public Result rollbackChange(@Valid String id) {
|
|
||||||
dao.update(SysClubUser.class, Chain.make("state", null).add("changeRoleCode", null)
|
|
||||||
.add("roleCodeChangeTime", null), Cnd.where("id", "=", id));
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@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 = "退会", param = true)
|
||||||
public Result exitClub(@Valid String id) {
|
public Result exitClub(@Valid String id) {
|
||||||
SysClubUser clubUser = dao.fetch(SysClubUser.class, id);
|
ClubUser clubUser = dao.fetch(ClubUser.class, id);
|
||||||
Sys_role sysRole = sysRoleService.getByCode(clubUser.getRoleCode());
|
Sys_role sysRole = sysRoleService.getByCode(clubUser.getRoleCode());
|
||||||
dao.update(SysClubUser.class, Chain.make("isNormal", false).add("changeTime", DateUtil.now())
|
dao.update(ClubUser.class, Chain.make("isNormal", false).add("changeTime", DateUtil.now())
|
||||||
, Cnd.where("id", "=", id));
|
, Cnd.where("id", "=", id));
|
||||||
dao.clear(Sys_user_role.class, Cnd.where("userId", "=", clubUser.getUserId())
|
dao.clear(Sys_user_role.class, Cnd.where("userId", "=", clubUser.getUserId())
|
||||||
.and("roleId", "=", sysRole.getId())
|
.and("roleId", "=", sysRole.getId())
|
||||||
@@ -167,7 +152,6 @@ 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);
|
||||||
// sysClubUserService.clear(Cnd.where("id", "=", id));
|
|
||||||
Sys_role sysRole = sysRoleService.getByCode(clubUser.getRoleCode());
|
Sys_role sysRole = sysRoleService.getByCode(clubUser.getRoleCode());
|
||||||
if(ObjectUtil.isNotEmpty(sysRole)){
|
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())
|
||||||
@@ -220,26 +204,6 @@ public class ClubInfoManageController {
|
|||||||
|
|
||||||
clubUser.setRoleCode(roleCode);
|
clubUser.setRoleCode(roleCode);
|
||||||
dao.update(clubUser);
|
dao.update(clubUser);
|
||||||
/* //变更社团负责人,如果是管理员直接变更完成
|
|
||||||
if (AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_CLUB_MANAGER.name())) {
|
|
||||||
//先清除原始身份的角色
|
|
||||||
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);
|
|
||||||
} else {
|
|
||||||
//社团负责人变更的,则需要校工会审核
|
|
||||||
sysClubUserService.update(Chain.make("changeRoleCode", roleCode).add("state", 1).add("roleCodeChangeTime", DateUtil.now())
|
|
||||||
, Cnd.where("id", "=", id));
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
sysUserService.clearCache();
|
sysUserService.clearCache();
|
||||||
sysRoleService.clearCache();
|
sysRoleService.clearCache();
|
||||||
@@ -291,20 +255,14 @@ public class ClubInfoManageController {
|
|||||||
return Result.error((Objects.equals(roleCode, RoleConstant.CLUB_PRESIDENT.name()) ? "会长" : "秘书长") + "只能有一位");
|
return Result.error((Objects.equals(roleCode, RoleConstant.CLUB_PRESIDENT.name()) ? "会长" : "秘书长") + "只能有一位");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int status = 0;
|
|
||||||
if (AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name()) || Objects.equals(RoleConstant.CLUB_MEMBER.name(), roleCode)) {
|
|
||||||
status = 5;
|
|
||||||
} else {
|
|
||||||
status = 3;
|
|
||||||
}
|
|
||||||
Sys_role sysRole = sysRoleService.getByCode(roleCode);
|
Sys_role sysRole = sysRoleService.getByCode(roleCode);
|
||||||
for (String user : users) {
|
for (String user : users) {
|
||||||
if (AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name()) || !Objects.equals(RoleConstant.CLUB_MEMBER.name(), roleCode)) {
|
if (AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name()) || !Objects.equals(RoleConstant.CLUB_MEMBER.name(), roleCode)) {
|
||||||
Sys_user_role sys_user_role = new Sys_user_role();
|
Sys_user_role sysUserRole = new Sys_user_role();
|
||||||
sys_user_role.setUserId(user);
|
sysUserRole.setUserId(user);
|
||||||
sys_user_role.setRoleId(sysRole.getId());
|
sysUserRole.setRoleId(sysRole.getId());
|
||||||
sys_user_role.setClubId(clubId);
|
sysUserRole.setClubId(clubId);
|
||||||
dao.insert(sys_user_role);
|
dao.insert(sysUserRole);
|
||||||
sysUserService.clearCache();
|
sysUserService.clearCache();
|
||||||
sysRoleService.clearCache();
|
sysRoleService.clearCache();
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-19
@@ -5,13 +5,13 @@ 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.bpm.service.BpmService;
|
import com.budwk.app.bpm.service.BpmService;
|
||||||
|
import com.budwk.app.flow.engine.FlowEngine;
|
||||||
import com.budwk.app.sys.models.Sys_user_role;
|
import com.budwk.app.sys.models.Sys_user_role;
|
||||||
import com.budwk.app.zhgh.club.model.ClubUser;
|
import com.budwk.app.zhgh.club.model.*;
|
||||||
import com.budwk.app.zhgh.club.model.ClubUserApply;
|
|
||||||
import com.budwk.app.zhgh.club.model.SysClubSponsor;
|
|
||||||
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.vo.ClubRegisterPageVo;
|
import com.budwk.app.zhgh.club.vo.ClubRegisterPageVo;
|
||||||
|
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;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
@@ -31,22 +31,22 @@ import javax.validation.Valid;
|
|||||||
**/
|
**/
|
||||||
@IocBean
|
@IocBean
|
||||||
@Ok("json")
|
@Ok("json")
|
||||||
|
@Api("协会-我的注册")
|
||||||
@At("/platform/club/register/clubMyApply")
|
@At("/platform/club/register/clubMyApply")
|
||||||
public class ClubMyApplyController {
|
public class ClubMyApplyController {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysClubService sysClubService;
|
private SysClubService sysClubService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private BpmService bpmService;
|
private FlowEngine flowEngine;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/club/register/mine/index.html")
|
@Ok("beetl:/platform/zhgh/club/register/mine/index.html")
|
||||||
@SaCheckPermission("club.register.myApply")
|
@SaCheckPermission("club.register.myApply")
|
||||||
public void index() {
|
public void index() {}
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
@SaCheckPermission("club.register.myApply")
|
@SaCheckPermission("club.register.myApply")
|
||||||
public Result pageData(@Valid ClubUserPageForm pageForm) {
|
public Result pageData(@Valid ClubUserPageForm pageForm) {
|
||||||
Pagination<ClubRegisterPageVo> pagination = sysClubService.minePageData(pageForm);
|
Pagination<ClubRegisterPageVo> pagination = sysClubService.minePageData(pageForm);
|
||||||
@@ -54,27 +54,20 @@ public class ClubMyApplyController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
|
@ApiOperation("删除协会")
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("club.register.myApply")
|
@SaCheckPermission("club.register.myApply")
|
||||||
|
@SLog(type = "clubRegister", tag = "删除协会", msg = "删除协会")
|
||||||
public Result doDelete(@Valid String id) {
|
public Result doDelete(@Valid String id) {
|
||||||
sysClubService.delete(id);
|
sysClubService.delete(id);
|
||||||
sysClubService.dao().clear(SysClubSponsor.class, Cnd.where("clubId", "=", id));
|
sysClubService.dao().clear(SysClubSponsor.class, Cnd.where("clubId", "=", id));
|
||||||
// sysClubService.dao().clear(SysClubUser.class, Cnd.where("clubId", "=", id));
|
|
||||||
sysClubService.dao().clear(ClubUser.class, Cnd.where("clubId", "=", id));
|
sysClubService.dao().clear(ClubUser.class, Cnd.where("clubId", "=", id));
|
||||||
sysClubService.dao().clear(ClubUserApply.class, Cnd.where("clubId", "=", id));
|
sysClubService.dao().clear(ClubUserApply.class, Cnd.where("clubId", "=", id));
|
||||||
sysClubService.dao().clear(Sys_user_role.class, Cnd.where("clubId", "=", id));
|
sysClubService.dao().clear(Sys_user_role.class, Cnd.where("clubId", "=", id));
|
||||||
|
sysClubService.dao().clear(SysClubEvaluate.class, Cnd.where("clubId", "=", id));
|
||||||
|
sysClubService.dao().clear(SysClubExamineRegister.class, Cnd.where("clubId", "=", id));
|
||||||
|
|
||||||
bpmService.deleteInstance(id);
|
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.register.myApply")
|
|
||||||
@ApiOperation("撤回")
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
@SLog(tag = "协会注册", msg = "撤回申请")
|
|
||||||
public Result revokeApply(@Valid String id) {
|
|
||||||
bpmService.revokeApply(id);
|
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+21
-16
@@ -3,13 +3,17 @@ package com.budwk.app.zhgh.club.controller.register;
|
|||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.lang.Dict;
|
||||||
import cn.hutool.core.util.StrUtil;
|
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.constant.BpmProcessConstant;
|
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.bpm.service.BpmService;
|
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.sys.services.SysUserService;
|
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.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;
|
||||||
@@ -45,9 +49,7 @@ public class ClubRegistApplyController {
|
|||||||
@Inject
|
@Inject
|
||||||
private SysClubService sysClubService;
|
private SysClubService sysClubService;
|
||||||
@Inject
|
@Inject
|
||||||
private BpmService bpmService;
|
private FlowEngine flowEngine;
|
||||||
@Inject
|
|
||||||
private CommonService commonService;
|
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/club/register/apply/index.html")
|
@Ok("beetl:/platform/zhgh/club/register/apply/index.html")
|
||||||
@@ -62,13 +64,12 @@ public class ClubRegistApplyController {
|
|||||||
public Result doSave(@Param("club") SysClub club,
|
public Result doSave(@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;
|
// 如果用户是保存,则只操作业务表
|
||||||
if (StrUtil.isBlank(club.getId())) {
|
if (StrUtil.isBlank(club.getId())) {
|
||||||
sysClub = sysClubService.doAdd(club, managePerson);
|
sysClubService.doAdd(club, managePerson);
|
||||||
} else {
|
} else {
|
||||||
sysClub = sysClubService.doEdit(club, deleteIds, managePerson);
|
sysClubService.doEdit(club, deleteIds, managePerson);
|
||||||
}
|
}
|
||||||
bpmService.startSaveProcessInstance(BpmProcessConstant.CLUB_REGISTER.name(), sysClub.getClubName() + "的注册申请", sysClub.getId(), null);
|
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,12 +87,17 @@ public class ClubRegistApplyController {
|
|||||||
sysClub = sysClubService.doEdit(club, deleteIds, managePerson);
|
sysClub = sysClubService.doEdit(club, deleteIds, managePerson);
|
||||||
}
|
}
|
||||||
|
|
||||||
//校工会协会管理员
|
// 开启流程实例
|
||||||
String loginName = commonService.findUserLoginNameByRoleCode(RoleConstant.SCHOOL_UNION_CLUB_ADMIN);
|
Dict args = Dict.create();
|
||||||
if (StrUtil.isBlank(loginName)) {
|
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||||
return Result.error("未查询到相关审批人,请联系校工会!");
|
args.set(FlowConst.FORM_DATA, sysClub);
|
||||||
|
ProcessInstance instance = flowEngine.startProcessInstanceByKey("XHZC", sysClub.getId(), SecurityUtil.getUserId(), args);
|
||||||
|
|
||||||
|
// 自动完成第一个申请任务
|
||||||
|
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||||
|
for (ProcessTask task : doingTaskList) {
|
||||||
|
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||||
}
|
}
|
||||||
bpmService.startSubmitProcessInstance(BpmProcessConstant.CLUB_REGISTER.name(), sysClub.getClubName() + "的注册申请", sysClub.getId(), List.of(loginName), null);
|
|
||||||
return Result.success(sysClub);
|
return Result.success(sysClub);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,5 +160,4 @@ public class ClubRegistApplyController {
|
|||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
-29
@@ -1,29 +0,0 @@
|
|||||||
package com.budwk.app.zhgh.club.controller.register;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import com.budwk.app.base.result.Result;
|
|
||||||
import com.budwk.app.zhgh.club.service.SysClubService;
|
|
||||||
import com.budwk.app.zhgh.club.vo.ClubExamineVo;
|
|
||||||
import com.budwk.app.zhgh.club.vo.ClubRegisterVo;
|
|
||||||
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;
|
|
||||||
|
|
||||||
@IocBean
|
|
||||||
@Ok("json")
|
|
||||||
@At("/platform/club/register/common")
|
|
||||||
public class ClubRegisterCommonController {
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysClubService sysClubService;
|
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("club.register")
|
|
||||||
public Result findOne(@Valid String id) {
|
|
||||||
ClubRegisterVo clubRegisterVo = sysClubService.findOne(id);
|
|
||||||
return Result.success(clubRegisterVo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+1
-97
@@ -1,43 +1,17 @@
|
|||||||
package com.budwk.app.zhgh.club.controller.register;
|
package com.budwk.app.zhgh.club.controller.register;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import cn.hutool.core.lang.Dict;
|
|
||||||
import cn.hutool.json.JSON;
|
|
||||||
import cn.hutool.json.JSONObject;
|
|
||||||
import cn.hutool.json.JSONUtil;
|
|
||||||
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.page.Pagination;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.bpm.enums.BpmTaskApprovalTypeEnum;
|
|
||||||
import com.budwk.app.bpm.models.BpmProcessInstance;
|
|
||||||
import com.budwk.app.bpm.models.BpmProcessTask;
|
|
||||||
import com.budwk.app.bpm.param.BpmTaskApprovalParam;
|
|
||||||
import com.budwk.app.bpm.service.BpmService;
|
|
||||||
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.SysClubUser;
|
|
||||||
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.vo.ClubRegisterPageVo;
|
import com.budwk.app.zhgh.club.vo.ClubRegisterPageVo;
|
||||||
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.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.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: JyuHsin
|
* @Author: JyuHsin
|
||||||
@@ -53,23 +27,10 @@ public class ClubSchoolReplyController {
|
|||||||
@Inject
|
@Inject
|
||||||
private SysClubService sysClubService;
|
private SysClubService sysClubService;
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysRoleService sysRoleService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysUserService sysUserService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private BpmService bpmService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private CommonService commonService;
|
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/club/register/schoolReply/index.html")
|
@Ok("beetl:/platform/zhgh/club/register/schoolReply/index.html")
|
||||||
@SaCheckPermission("club.register.schoolReply")
|
@SaCheckPermission("club.register.schoolReply")
|
||||||
public void index() {
|
public void index() {}
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.register.schoolReply")
|
@SaCheckPermission("club.register.schoolReply")
|
||||||
@@ -77,61 +38,4 @@ public class ClubSchoolReplyController {
|
|||||||
Pagination<ClubRegisterPageVo> pagination = sysClubService.schoolReplyPageData(pageForm);
|
Pagination<ClubRegisterPageVo> pagination = sysClubService.schoolReplyPageData(pageForm);
|
||||||
return Result.success(pagination);
|
return Result.success(pagination);
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
@SaCheckPermission("club.register.schoolReply")
|
|
||||||
@SLog(type = "schoolReply", tag = "校领导批复注册协会", msg = "校领导批复注册协会", param = true)
|
|
||||||
public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) {
|
|
||||||
|
|
||||||
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
|
|
||||||
bpmService.completeTask(approvalParam.getProcessInstanceTaskId(), approvalParam.getBpmTaskApprovalTypeEnum(), variables, null);
|
|
||||||
|
|
||||||
//如果审核通过,就给角色
|
|
||||||
//找理事机构
|
|
||||||
List<SysClubUser> clubUsers = sysClubService.dao().query(SysClubUser.class, Cnd.where("clubId", "=", approvalParam.getProcessInstanceBusinessId())
|
|
||||||
.and("roleCode", "!=", RoleConstant.CLUB_MEMBER.name())
|
|
||||||
.and("isNormal", "=", true)
|
|
||||||
.and("status", "=", 5));
|
|
||||||
//找会长
|
|
||||||
List<SysClubUser> clubPresidents = clubUsers.stream().filter(o -> o.getRoleCode().equals(RoleConstant.CLUB_PRESIDENT.name())).toList();
|
|
||||||
if(Objects.equals(approvalParam.getBpmTaskApprovalType(), BpmTaskApprovalTypeEnum.PASS.name())) {
|
|
||||||
List<Sys_user_role> userRoles = new ArrayList<>();
|
|
||||||
clubUsers.forEach(cu -> {
|
|
||||||
Sys_user_role uRole = new Sys_user_role();
|
|
||||||
Sys_role sysRole = sysRoleService.getByCode(cu.getRoleCode());
|
|
||||||
uRole.setRoleId(sysRole.getId());
|
|
||||||
uRole.setUserId(cu.getUserId());
|
|
||||||
uRole.setClubId(approvalParam.getProcessInstanceBusinessId());
|
|
||||||
userRoles.add(uRole);
|
|
||||||
});
|
|
||||||
sysClubService.dao().insert(userRoles);
|
|
||||||
sysUserService.clearCache();
|
|
||||||
sysRoleService.clearCache();
|
|
||||||
}
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
@SaCheckPermission("club.register.schoolReply")
|
|
||||||
@SLog(type = "schoolReply", tag = "校领导撤回注册协会", msg = "校领导撤回注册协会", param = true)
|
|
||||||
public Result revoke(@Valid String taskId) {
|
|
||||||
//撤回需要删除相关角色
|
|
||||||
BpmProcessTask processTask = sysClubService.dao().fetch(BpmProcessTask.class, taskId);
|
|
||||||
BpmProcessInstance instance = sysClubService.dao().fetch(BpmProcessInstance.class, processTask.getProcessInstanceId());
|
|
||||||
String clubId = instance.getProcessInstanceBusinessId();
|
|
||||||
|
|
||||||
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", "=", clubId)
|
|
||||||
.and("roleId", "in", roleList));
|
|
||||||
|
|
||||||
bpmService.revokeTask(taskId);
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-19
@@ -15,9 +15,13 @@ 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.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.budwk.app.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.budwk.app.bpm.models.BpmProcessInstance;
|
import com.budwk.app.bpm.models.BpmProcessInstance;
|
||||||
|
import com.budwk.app.flow.entity.ProcessInstance;
|
||||||
|
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
||||||
|
import com.budwk.app.sys.models.Sys_file;
|
||||||
import com.budwk.app.sys.models.Sys_role;
|
import com.budwk.app.sys.models.Sys_role;
|
||||||
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.utils.SysFileMinIoUtil;
|
||||||
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.SysClub;
|
import com.budwk.app.zhgh.club.model.SysClub;
|
||||||
@@ -57,9 +61,9 @@ import java.util.zip.ZipOutputStream;
|
|||||||
public class ClubStatisticsController {
|
public class ClubStatisticsController {
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(ClubStatisticsController.class);
|
private static final Logger log = LoggerFactory.getLogger(ClubStatisticsController.class);
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysClubService sysClubService;
|
private SysClubService sysClubService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysRoleService sysRoleService;
|
private SysRoleService sysRoleService;
|
||||||
|
|
||||||
@@ -85,8 +89,8 @@ public class ClubStatisticsController {
|
|||||||
List<SysClubExamineRegister> examineRegisters = sysClubService.dao().query(SysClubExamineRegister.class, Cnd.where("year(registerDate)", "=", DateUtil.thisYear()));
|
List<SysClubExamineRegister> examineRegisters = sysClubService.dao().query(SysClubExamineRegister.class, Cnd.where("year(registerDate)", "=", DateUtil.thisYear()));
|
||||||
List<String> list = examineRegisters.stream().map(SysClubExamineRegister::getId).toList();
|
List<String> list = examineRegisters.stream().map(SysClubExamineRegister::getId).toList();
|
||||||
|
|
||||||
List<BpmProcessInstance> instanceList = sysClubService.dao().query(BpmProcessInstance.class, Cnd.where("processInstanceStatus", "=", BpmProcessInstanceStatusEnum.COMPLETED).and("processInstanceBusinessId", "in", list));
|
List<ProcessInstance> instanceList = sysClubService.dao().query(ProcessInstance.class, Cnd.where(ProcessInstance::getState, "=", ProcessInstanceStateEnum.FINISHED.getCode()).and(ProcessInstance::getBusinessNo, "in", list));
|
||||||
List<String> businessNoList = instanceList.stream().map(BpmProcessInstance::getProcessInstanceBusinessId).toList();
|
List<String> businessNoList = instanceList.stream().map(ProcessInstance::getBusinessNo).toList();
|
||||||
|
|
||||||
List<SysClubExamineRegister> registers = examineRegisters.stream().filter(o -> businessNoList.contains(o.getId())).toList();
|
List<SysClubExamineRegister> registers = examineRegisters.stream().filter(o -> businessNoList.contains(o.getId())).toList();
|
||||||
cnd.and("id", auditState ? "in" : "not in", registers.stream().map(SysClubExamineRegister::getClubId).toList());
|
cnd.and("id", auditState ? "in" : "not in", registers.stream().map(SysClubExamineRegister::getClubId).toList());
|
||||||
@@ -170,9 +174,6 @@ public class ClubStatisticsController {
|
|||||||
cnd.andEX("c.clubId", "=", clubId);
|
cnd.andEX("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);
|
||||||
List<NutMap> listMap = sysClubService.listMap(sql);
|
List<NutMap> listMap = sysClubService.listMap(sql);
|
||||||
//获取所有社团
|
//获取所有社团
|
||||||
@@ -187,8 +188,6 @@ public class ClubStatisticsController {
|
|||||||
exportEntities.add(new ExcelExportEntity("联系方式", "mobile", 20));
|
exportEntities.add(new ExcelExportEntity("联系方式", "mobile", 20));
|
||||||
exportEntities.add(new ExcelExportEntity("所在单位", "unitName", 20));
|
exportEntities.add(new ExcelExportEntity("所在单位", "unitName", 20));
|
||||||
exportEntities.add(new ExcelExportEntity("在职状态", "userState", 20));
|
exportEntities.add(new ExcelExportEntity("在职状态", "userState", 20));
|
||||||
// exportEntities.add(new ExcelExportEntity("是否拨付", "giveMoney", 20));
|
|
||||||
// exportEntities.add(new ExcelExportEntity("是否缴费", "payed", 20));
|
|
||||||
exportEntities.add(new ExcelExportEntity("职务", "roleName", 20));
|
exportEntities.add(new ExcelExportEntity("职务", "roleName", 20));
|
||||||
ZipOutputStream zipOutputStream = new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()));
|
ZipOutputStream zipOutputStream = new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()));
|
||||||
clubList.forEach(item -> {
|
clubList.forEach(item -> {
|
||||||
@@ -229,6 +228,7 @@ public class ClubStatisticsController {
|
|||||||
exportEntities.add(new ExcelExportEntity("退休人数", "retire", 20));
|
exportEntities.add(new ExcelExportEntity("退休人数", "retire", 20));
|
||||||
exportEntities.add(new ExcelExportEntity("男", "man", 20));
|
exportEntities.add(new ExcelExportEntity("男", "man", 20));
|
||||||
exportEntities.add(new ExcelExportEntity("女", "woman", 20));
|
exportEntities.add(new ExcelExportEntity("女", "woman", 20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("理事机构人数", "governing_body", 20));
|
||||||
|
|
||||||
ExportParams exportParams = new ExportParams();
|
ExportParams exportParams = new ExportParams();
|
||||||
exportParams.setType(ExcelType.XSSF);
|
exportParams.setType(ExcelType.XSSF);
|
||||||
@@ -286,17 +286,14 @@ public class ClubStatisticsController {
|
|||||||
List<JSONObject> sysFiles = fileList.get(item.getId());
|
List<JSONObject> sysFiles = fileList.get(item.getId());
|
||||||
sysFiles.forEach(f -> {
|
sysFiles.forEach(f -> {
|
||||||
try {
|
try {
|
||||||
System.out.println(1);
|
|
||||||
String fileName = f.getStr("name");
|
String fileName = f.getStr("name");
|
||||||
|
String filepath = f.getStr("url");
|
||||||
|
|
||||||
JSONObject entries = f.getJSONObject("response");
|
Sys_file file = sysClubService.dao().fetch(Sys_file.class, Cnd.where(Sys_file::getDownloadPath, "=", filepath));
|
||||||
String filepath = entries.getStr("data");
|
byte[] bytes = SysFileMinIoUtil.getFileBytes(file.getBucket(), file.getStoragePath());
|
||||||
|
|
||||||
zipOutputStream.putNextEntry(new ZipEntry(item.getClubName() + "/" + System.currentTimeMillis() + fileName));
|
zipOutputStream.putNextEntry(new ZipEntry(item.getClubName() + "/" + System.currentTimeMillis() + fileName));
|
||||||
|
zipOutputStream.write(bytes);
|
||||||
InputStream inputStream = Http.get(filepath).getStream();
|
|
||||||
IOUtils.copy(inputStream, zipOutputStream);
|
|
||||||
inputStream.close();
|
|
||||||
zipOutputStream.closeEntry();
|
zipOutputStream.closeEntry();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage());
|
log.error(e.getMessage());
|
||||||
@@ -314,7 +311,7 @@ public class ClubStatisticsController {
|
|||||||
club.clubCode,
|
club.clubCode,
|
||||||
club.clubName,
|
club.clubName,
|
||||||
sum( CASE WHEN cu.userId is not null $myCondition THEN 1 ELSE 0 END ) AS total,
|
sum( CASE WHEN cu.userId is not null $myCondition THEN 1 ELSE 0 END ) AS total,
|
||||||
sum( CASE WHEN su.userState = '在职' $myCondition THEN 1 ELSE 0 END ) AS `work`,
|
sum( CASE WHEN su.userState in ('在职', '在岗') $myCondition THEN 1 ELSE 0 END ) AS `work`,
|
||||||
sum( CASE WHEN su.userState in ('退休') $myCondition THEN 1 ELSE 0 END ) AS retire,
|
sum( CASE WHEN su.userState in ('退休') $myCondition THEN 1 ELSE 0 END ) AS retire,
|
||||||
sum( CASE WHEN su.sex = '男' $myCondition THEN 1 ELSE 0 END ) AS man,
|
sum( CASE WHEN su.sex = '男' $myCondition THEN 1 ELSE 0 END ) AS man,
|
||||||
sum( CASE WHEN su.sex = '女' $myCondition THEN 1 ELSE 0 END ) AS woman,
|
sum( CASE WHEN su.sex = '女' $myCondition THEN 1 ELSE 0 END ) AS woman,
|
||||||
@@ -323,7 +320,7 @@ public class ClubStatisticsController {
|
|||||||
sys_club club
|
sys_club club
|
||||||
LEFT JOIN club_user cu ON cu.clubId = club.id
|
LEFT JOIN club_user cu ON cu.clubId = club.id
|
||||||
LEFT JOIN sys_user su ON cu.userId = su.id
|
LEFT JOIN sys_user su ON cu.userId = su.id
|
||||||
LEFT JOIN bpm_process_instance ins ON ins.processInstanceBusinessId = club.id
|
LEFT JOIN wf_process_instance ins ON ins.businessNo = club.id
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
@@ -341,7 +338,7 @@ public class ClubStatisticsController {
|
|||||||
List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
|
List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
|
||||||
cnd.and("club.id", "in", myClubId);
|
cnd.and("club.id", "in", myClubId);
|
||||||
}
|
}
|
||||||
cnd.and("ins.processInstanceStatus", "=", BpmProcessInstanceStatusEnum.COMPLETED);
|
cnd.and("ins.state", "=", ProcessInstanceStateEnum.FINISHED.getCode());
|
||||||
cnd.andEX("club.id", "=", clubId);
|
cnd.andEX("club.id", "=", clubId);
|
||||||
cnd.and("club.dismiss", "=", false);
|
cnd.and("club.dismiss", "=", false);
|
||||||
cnd.groupBy("club.id");
|
cnd.groupBy("club.id");
|
||||||
@@ -356,7 +353,6 @@ public class ClubStatisticsController {
|
|||||||
if (!myCnd.where().isEmpty()) {
|
if (!myCnd.where().isEmpty()) {
|
||||||
sql.vars().set("myCondition", "AND " + myCnd.toSql(null));
|
sql.vars().set("myCondition", "AND " + myCnd.toSql(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package com.budwk.app.zhgh.club.interceptor;
|
||||||
|
|
||||||
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
|
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.SysClub;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.json.Json;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName ClubRegisterInterceptor
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/21 15:44
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public class ClubRegisterInterceptor implements FlowInterceptor {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void intercept(Execution execution) {
|
||||||
|
|
||||||
|
String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA);
|
||||||
|
SysClub club = Json.fromJson(SysClub.class, formDataStr);
|
||||||
|
|
||||||
|
Dao dao = ServiceContext.find(Dao.class);
|
||||||
|
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
|
||||||
|
SysUserService sysUserService = ServiceContext.find(SysUserService.class);
|
||||||
|
|
||||||
|
// 审核通过,就给角色,找理事机构
|
||||||
|
List<ClubUser> clubUsers = dao.query(
|
||||||
|
ClubUser.class,
|
||||||
|
Cnd.where("roleCode", "!=", RoleConstant.CLUB_MEMBER.name())
|
||||||
|
.and("clubId", "=", club.getId())
|
||||||
|
);
|
||||||
|
List<Sys_user_role> list = clubUsers.stream().map(o -> {
|
||||||
|
Sys_user_role userRole = new Sys_user_role();
|
||||||
|
Sys_role sysRole = sysRoleService.getByCode(o.getRoleCode());
|
||||||
|
userRole.setRoleId(sysRole.getId());
|
||||||
|
userRole.setUserId(o.getUserId());
|
||||||
|
userRole.setClubId(club.getId());
|
||||||
|
return userRole;
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
dao.insert(list);
|
||||||
|
sysUserService.clearCache();
|
||||||
|
sysRoleService.clearCache();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.budwk.app.zhgh.club.interceptor;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
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.ClubUser;
|
||||||
|
import com.budwk.app.zhgh.club.model.ClubUserApply;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.json.Json;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName ClubUserJoinInterceptor
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/8/22 16:07
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public class ClubUserJoinInterceptor implements FlowInterceptor {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void intercept(Execution execution) {
|
||||||
|
|
||||||
|
String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA);
|
||||||
|
ClubUserApply clubUserApply = Json.fromJson(ClubUserApply.class, formDataStr);
|
||||||
|
|
||||||
|
Dao dao = ServiceContext.find(Dao.class);
|
||||||
|
|
||||||
|
ClubUser clubUser = BeanUtil.copyProperties(clubUserApply, ClubUser.class);
|
||||||
|
dao.insert(clubUser);
|
||||||
|
}
|
||||||
|
}
|
||||||
+65
-44
@@ -1,9 +1,12 @@
|
|||||||
package com.budwk.app.zhgh.club.service.impl;
|
package com.budwk.app.zhgh.club.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum;
|
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
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.SysClubEvaluate;
|
import com.budwk.app.zhgh.club.model.SysClubEvaluate;
|
||||||
@@ -16,6 +19,8 @@ import org.nutz.dao.Sqls;
|
|||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: JyuHsin
|
* @Author: JyuHsin
|
||||||
* @Date: 2024/8/9 17:17
|
* @Date: 2024/8/9 17:17
|
||||||
@@ -33,43 +38,45 @@ public class SysClubEvaluateServiceImpl extends BaseServiceImpl<SysClubEvaluate>
|
|||||||
public Pagination<ClubEvaluatePageVo> minePageData(ClubUserPageForm pageForm) {
|
public Pagination<ClubEvaluatePageVo> minePageData(ClubUserPageForm pageForm) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
ce.*,
|
info.*,
|
||||||
club.foundTime,
|
club.foundTime,
|
||||||
club.clubName,
|
club.clubName,
|
||||||
club.clubCode,
|
club.clubCode,
|
||||||
dict.name as typeName,
|
dict.name as typeName,
|
||||||
inst.processInstanceNodeId,
|
ins.id AS instanceId,
|
||||||
inst.processInstanceNodeCode,
|
ins.businessNo,
|
||||||
inst.processInstanceNodeName,
|
ins.state instanceState,
|
||||||
inst.processInstanceTaskIds,
|
ins.variable instanceVariable,
|
||||||
inst.processInstanceStatus,
|
ins.processDefineId instanceProcessDefineId,
|
||||||
nd.nodeType AS processInstanceTaskNodeType,
|
t.id taskId,
|
||||||
(
|
t.taskName AS taskKey,
|
||||||
SELECT
|
t.displayName taskName,
|
||||||
count( 1 ) > 0
|
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
|
FROM
|
||||||
bpm_process_task
|
sys_club_evaluate info
|
||||||
WHERE
|
LEFT JOIN sys_club club on club.id = info.clubId
|
||||||
prevTaskId = ( SELECT id FROM bpm_process_task WHERE processInstanceId = inst.id AND processTaskNodeCode IN ( 10, 40, 70 ) ORDER BY createdAt DESC LIMIT 1 )
|
|
||||||
AND taskStatus = 'COMPELTE'
|
|
||||||
) AS nextTaskIsComplete
|
|
||||||
FROM
|
|
||||||
sys_club_evaluate ce
|
|
||||||
LEFT JOIN sys_club club on club.id = ce.clubId
|
|
||||||
LEFT JOIN sys_dict dict ON dict.CODE = club.clubType
|
LEFT JOIN sys_dict dict ON dict.CODE = club.clubType
|
||||||
LEFT JOIN bpm_process_instance inst ON inst.processInstanceBusinessId = ce.id
|
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||||
LEFT JOIN bpm_process_node_define nd ON nd.id = inst.processInstanceNodeId
|
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
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
|
|
||||||
cnd.andEX("ce.clubId", "=", pageForm.getClubId());
|
cnd.andEX("info.clubId", "=", pageForm.getClubId());
|
||||||
cnd.andEX("year(ce.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())) {
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
|
||||||
cnd.and("ce.userId", "=", SecurityUtil.getUserId());
|
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||||
}
|
}
|
||||||
cnd.groupBy("ce.id");
|
cnd.groupBy("info.id");
|
||||||
cnd.desc("applyTime");
|
cnd.desc("applyTime");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return listPageVO(pageForm, sql, ClubEvaluatePageVo.class);
|
return listPageVO(pageForm, sql, ClubEvaluatePageVo.class);
|
||||||
@@ -89,7 +96,8 @@ public class SysClubEvaluateServiceImpl extends BaseServiceImpl<SysClubEvaluate>
|
|||||||
@Override
|
@Override
|
||||||
public Pagination<ClubEvaluatePageVo> schoolAuditPageData(ClubUserPageForm pageForm) {
|
public Pagination<ClubEvaluatePageVo> schoolAuditPageData(ClubUserPageForm pageForm) {
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("nd.nodeCode","=",20);
|
cnd.and("t.taskName", "=", "ec81591d-da91-412a-90c9-df853dcef478");
|
||||||
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
Sql sql = generateSql(pageForm, cnd);
|
Sql sql = generateSql(pageForm, cnd);
|
||||||
return listPageVO(pageForm, sql, ClubEvaluatePageVo.class);
|
return listPageVO(pageForm, sql, ClubEvaluatePageVo.class);
|
||||||
}
|
}
|
||||||
@@ -102,20 +110,29 @@ public class SysClubEvaluateServiceImpl extends BaseServiceImpl<SysClubEvaluate>
|
|||||||
club.clubName,
|
club.clubName,
|
||||||
club.clubCode,
|
club.clubCode,
|
||||||
dict.name as typeName,
|
dict.name as typeName,
|
||||||
inst.id processInstanceId,
|
ins.id AS instanceId,
|
||||||
inst.processInstanceNodeId,
|
ins.businessNo,
|
||||||
inst.processInstanceNodeName,
|
ins.state instanceState,
|
||||||
inst.processInstanceTaskIds,
|
ins.variable instanceVariable,
|
||||||
inst.processInstanceStatus,
|
ins.processDefineId instanceProcessDefineId,
|
||||||
task.id processInstanceTaskId,
|
t.id taskId,
|
||||||
task.taskStatus processInstanceTaskStatus,
|
t.taskName AS taskKey,
|
||||||
COUNT(nt.id) OVER (PARTITION BY task.id) > 0 AS nextTaskIsComplete
|
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
|
FROM
|
||||||
bpm_process_task task
|
wf_process_task t
|
||||||
INNER JOIN bpm_process_node_define nd ON nd.id = task.processTaskNodeId
|
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||||
INNER JOIN bpm_process_instance inst ON inst.id = task.processInstanceId
|
LEFT JOIN sys_club_evaluate ce ON ce.id = ins.businessNo
|
||||||
INNER JOIN sys_club_evaluate ce ON ce.id = inst.processInstanceBusinessId
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
LEFT JOIN bpm_process_task nt ON nt.prevTaskId = task.id AND nt.taskStatus = 'COMPLETE'
|
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
|
||||||
LEFT JOIN sys_club club on club.id = ce.clubId
|
LEFT JOIN sys_club club on club.id = ce.clubId
|
||||||
LEFT JOIN sys_dict dict ON dict.CODE = club.clubType
|
LEFT JOIN sys_dict dict ON dict.CODE = club.clubType
|
||||||
$condition
|
$condition
|
||||||
@@ -124,14 +141,18 @@ public class SysClubEvaluateServiceImpl extends BaseServiceImpl<SysClubEvaluate>
|
|||||||
cnd.andEX("ce.clubId", "=", pageForm.getClubId());
|
cnd.andEX("ce.clubId", "=", pageForm.getClubId());
|
||||||
cnd.andEX("year(ce.applyTime)", "=", pageForm.getYear());
|
cnd.andEX("year(ce.applyTime)", "=", pageForm.getYear());
|
||||||
|
|
||||||
if(pageForm.getAudit()){
|
if (pageForm.getAudit()) {
|
||||||
cnd.and("task.taskStatus","=", BpmProcessTaskStatusEnum.COMPLETE);
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
}else{
|
} else {
|
||||||
cnd.and("task.taskStatus","=",BpmProcessTaskStatusEnum.ACTIVE);
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("applyTime");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
}
|
}
|
||||||
|
|
||||||
cnd.groupBy("ce.id");
|
cnd.groupBy("t.id");
|
||||||
cnd.desc("applyTime");
|
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
package com.budwk.app.zhgh.club.service.impl;
|
package com.budwk.app.zhgh.club.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.budwk.app.base.constant.BpmProcessConstant;
|
import com.budwk.app.base.constant.BpmProcessConstant;
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum;
|
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum;
|
||||||
import com.budwk.app.bpm.service.BpmService;
|
import com.budwk.app.bpm.service.BpmService;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
import com.budwk.app.sys.services.SysDictService;
|
import com.budwk.app.sys.services.SysDictService;
|
||||||
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;
|
||||||
@@ -144,43 +147,45 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
|
|||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
||||||
List<SysClub> myManageClub = sysClubService.getMyManageClub();
|
List<SysClub> myManageClub = sysClubService.getMyManageClub();
|
||||||
cnd.and("scer.clubId", "in", myManageClub.stream().map(SysClub::getId).toList());
|
cnd.and("info.clubId", "in", myManageClub.stream().map(SysClub::getId).toList());
|
||||||
}
|
}
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
scer.*,
|
info.*,
|
||||||
u.username as concatPersonName,
|
u.username as concatPersonName,
|
||||||
sc.concatPersonMobile,
|
sc.concatPersonMobile,
|
||||||
inst.processInstanceNodeId,
|
ins.id AS instanceId,
|
||||||
inst.processInstanceNodeCode,
|
ins.businessNo,
|
||||||
inst.processInstanceNodeName,
|
ins.state instanceState,
|
||||||
inst.processInstanceTaskIds,
|
ins.variable instanceVariable,
|
||||||
inst.processInstanceStatus,
|
ins.processDefineId instanceProcessDefineId,
|
||||||
nd.nodeType AS processInstanceTaskNodeType,
|
t.id taskId,
|
||||||
(
|
t.taskName AS taskKey,
|
||||||
SELECT
|
t.displayName taskName,
|
||||||
count( 1 ) > 0
|
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
|
FROM
|
||||||
bpm_process_task
|
`sys_club_examine_register` info
|
||||||
WHERE
|
LEFT JOIN sys_club sc ON sc.id = info.clubId
|
||||||
prevTaskId = ( SELECT id FROM bpm_process_task WHERE processInstanceId = inst.id AND processTaskNodeCode IN ( 10, 40, 70 ) ORDER BY createdAt DESC LIMIT 1 )
|
|
||||||
AND taskStatus = 'COMPELTE'
|
|
||||||
) AS nextTaskIsComplete
|
|
||||||
FROM
|
|
||||||
`sys_club_examine_register` scer
|
|
||||||
LEFT JOIN sys_club sc ON sc.id = scer.clubId
|
|
||||||
LEFT JOIN `vw_user` u ON u.id = sc.concatPerson
|
LEFT JOIN `vw_user` u ON u.id = sc.concatPerson
|
||||||
LEFT JOIN bpm_process_instance inst ON inst.processInstanceBusinessId = scer.id
|
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||||
LEFT JOIN bpm_process_node_define nd ON nd.id = inst.processInstanceNodeId
|
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
|
$condition
|
||||||
""");
|
""");
|
||||||
cnd.andEX("YEAR(scer.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())) {
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
|
||||||
// cnd.and("scer.userId", "=", SecurityUtil.getUserId());
|
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||||
}
|
}
|
||||||
cnd.groupBy("scer.id");
|
cnd.groupBy("info.id");
|
||||||
cnd.desc("registerDate");
|
cnd.desc("registerDate");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return listPageVO(pageForm, sql, ClubExaminePageVo.class);
|
return listPageVO(pageForm, sql, ClubExaminePageVo.class);
|
||||||
@@ -200,14 +205,14 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
|
|||||||
@Override
|
@Override
|
||||||
public Pagination<ClubExaminePageVo> schoolAuditPageData(ClubUserPageForm pageForm) {
|
public Pagination<ClubExaminePageVo> schoolAuditPageData(ClubUserPageForm pageForm) {
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("nd.nodeCode","=",50);
|
cnd.and("t.taskName", "=", "ed4f6e9f-f0ea-4a73-ad57-bfcd8dd4d4bd");
|
||||||
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
Sql sql = generateSql(pageForm, cnd);
|
Sql sql = generateSql(pageForm, cnd);
|
||||||
return listPageVO(pageForm, sql, ClubExaminePageVo.class);
|
return listPageVO(pageForm, sql, ClubExaminePageVo.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ClubExamineVo findOne(String id) {
|
public ClubExamineVo findOne(String id) {
|
||||||
|
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
scer.*,
|
scer.*,
|
||||||
@@ -220,8 +225,6 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
|
|||||||
WHERE scer.id = @id
|
WHERE scer.id = @id
|
||||||
""").setParam("id", id);
|
""").setParam("id", id);
|
||||||
ClubExamineVo clubExamineVo = fetchVO(sql, ClubExamineVo.class);
|
ClubExamineVo clubExamineVo = fetchVO(sql, ClubExamineVo.class);
|
||||||
clubExamineVo.setNodeTasks(bpmService.getNodeTasks(BpmProcessConstant.CLUB_EXAMINE, id));
|
|
||||||
|
|
||||||
List<SysClubExamineRegisterDetailed> detailedList = dao().query(SysClubExamineRegisterDetailed.class, Cnd.where("registerId", "=", id).asc("location"));
|
List<SysClubExamineRegisterDetailed> detailedList = dao().query(SysClubExamineRegisterDetailed.class, Cnd.where("registerId", "=", id).asc("location"));
|
||||||
clubExamineVo.setDetailedList(detailedList);
|
clubExamineVo.setDetailedList(detailedList);
|
||||||
return clubExamineVo;
|
return clubExamineVo;
|
||||||
@@ -230,39 +233,54 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
|
|||||||
private Sql generateSql(ClubUserPageForm pageForm, Cnd cnd) {
|
private Sql generateSql(ClubUserPageForm pageForm, Cnd cnd) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
scer.*,
|
info.*,
|
||||||
u.username as concatPersonName,
|
u.username as concatPersonName,
|
||||||
club.concatPersonMobile,
|
club.concatPersonMobile,
|
||||||
dict.name as typeName,
|
dict.name as typeName,
|
||||||
inst.id processInstanceId,
|
ins.id AS instanceId,
|
||||||
inst.processInstanceNodeId,
|
ins.businessNo,
|
||||||
inst.processInstanceNodeName,
|
ins.state instanceState,
|
||||||
inst.processInstanceTaskIds,
|
ins.variable instanceVariable,
|
||||||
inst.processInstanceStatus,
|
ins.processDefineId instanceProcessDefineId,
|
||||||
task.id processInstanceTaskId,
|
t.id taskId,
|
||||||
task.taskStatus processInstanceTaskStatus,
|
t.taskName AS taskKey,
|
||||||
COUNT(nt.id) OVER (PARTITION BY task.id) > 0 AS nextTaskIsComplete
|
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
|
FROM
|
||||||
bpm_process_task task
|
wf_process_task t
|
||||||
INNER JOIN bpm_process_node_define nd ON nd.id = task.processTaskNodeId
|
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||||
INNER JOIN bpm_process_instance inst ON inst.id = task.processInstanceId
|
LEFT JOIN sys_club_examine_register info ON info.id = ins.businessNo
|
||||||
INNER JOIN sys_club_examine_register scer ON scer.id = inst.processInstanceBusinessId
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
LEFT JOIN bpm_process_task nt ON nt.prevTaskId = task.id AND nt.taskStatus = 'COMPLETE'
|
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||||
LEFT JOIN sys_club club on club.id = scer.clubId
|
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||||
|
LEFT JOIN sys_club club on club.id = info.clubId
|
||||||
LEFT JOIN sys_dict dict ON dict.CODE = club.clubType
|
LEFT JOIN sys_dict dict ON dict.CODE = club.clubType
|
||||||
LEFT JOIN `vw_user` u ON u.id = club.concatPerson
|
LEFT JOIN `vw_user` u ON u.id = club.concatPerson
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
|
|
||||||
cnd.andEX("scer.clubId", "=", pageForm.getClubId());
|
cnd.andEX("info.clubId", "=", pageForm.getClubId());
|
||||||
cnd.andEX("YEAR(scer.registerDate)", "=", pageForm.getYear());
|
cnd.andEX("YEAR(info.registerDate)", "=", pageForm.getYear());
|
||||||
if(pageForm.getAudit()){
|
|
||||||
cnd.and("task.taskStatus","=", BpmProcessTaskStatusEnum.COMPLETE);
|
if (pageForm.getAudit()) {
|
||||||
}else{
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
cnd.and("task.taskStatus","=",BpmProcessTaskStatusEnum.ACTIVE);
|
} else {
|
||||||
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
}
|
}
|
||||||
cnd.groupBy("scer.id,task.id");
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
cnd.desc("registerDate");
|
cnd.desc("registerDate");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
|
||||||
|
cnd.groupBy("t.id");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-20
@@ -7,6 +7,7 @@ import com.budwk.app.base.service.impl.BaseServiceImpl;
|
|||||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
||||||
import com.budwk.app.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.budwk.app.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
|
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
||||||
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;
|
||||||
@@ -63,7 +64,6 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
|||||||
@Override
|
@Override
|
||||||
public Pagination<ClubCommonPageVo> infoManagePageData(ClubUserPageForm pageForm) {
|
public Pagination<ClubCommonPageVo> infoManagePageData(ClubUserPageForm pageForm) {
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
// Sql sql = generateSql(pageForm, cnd);
|
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
c.*,
|
c.*,
|
||||||
@@ -85,7 +85,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
|||||||
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 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 bpm_process_instance ins ON ins.processInstanceBusinessId = c.id
|
LEFT JOIN wf_process_instance ins ON ins.businessNo = c.id
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
if (StrUtil.isNotBlank(pageForm.getClubName())) {
|
if (StrUtil.isNotBlank(pageForm.getClubName())) {
|
||||||
@@ -94,17 +94,14 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
|||||||
|
|
||||||
cnd.andEX("year(c.createTime)", "=", pageForm.getYear());
|
cnd.andEX("year(c.createTime)", "=", pageForm.getYear());
|
||||||
cnd.and("c.dismiss", "=", false);
|
cnd.and("c.dismiss", "=", false);
|
||||||
cnd.and("ins.processInstanceStatus", "=", BpmProcessInstanceStatusEnum.COMPLETED);
|
cnd.and("ins.state", "=", ProcessInstanceStateEnum.FINISHED.getCode());
|
||||||
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())) {
|
||||||
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(), RoleConstant.CLUB_OPERATOR.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(), RoleConstant.CLUB_OPERATOR.name()));
|
||||||
|
|
||||||
List<Sys_user_role> clubList = dao().query(Sys_user_role.class, Cnd.where("roleId", "in", roleList).and("userId", "=", SecurityUtil.getUserId()).and("clubId", "is not", null));
|
List<Sys_user_role> clubList = dao().query(Sys_user_role.class, Cnd.where("roleId", "in", roleList).and("userId", "=", SecurityUtil.getUserId()).and("clubId", "is not", null));
|
||||||
|
|
||||||
List<String> clubIdList = clubList.stream().map(Sys_user_role::getClubId).toList();
|
List<String> clubIdList = clubList.stream().map(Sys_user_role::getClubId).toList();
|
||||||
|
|
||||||
cnd.and("c.id", "in", clubIdList);
|
cnd.and("c.id", "in", clubIdList);
|
||||||
}
|
}
|
||||||
// cnd.asc("c.state").desc("createTime");
|
|
||||||
cnd.asc("c.clubCode");
|
cnd.asc("c.clubCode");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return listPageVO(pageForm, sql, ClubCommonPageVo.class);
|
return listPageVO(pageForm, sql, ClubCommonPageVo.class);
|
||||||
@@ -135,27 +132,20 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
|||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
|
|
||||||
cnd.and("scu.clubId", "=", pageForm.getClubId());
|
cnd.and("scu.clubId", "=", pageForm.getClubId());
|
||||||
// cnd.and("scu.isNormal", "=", true);
|
|
||||||
// cnd.and("scu.status", "in", Lang.array(1, 3, 5));
|
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(pageForm.getPersonType())) {
|
if (StrUtil.isNotBlank(pageForm.getPersonType())) {
|
||||||
cnd.and("u.personType", "=", pageForm.getPersonType());
|
cnd.and("u.personType", "=", pageForm.getPersonType());
|
||||||
}
|
}
|
||||||
if (StrUtil.isNotBlank(pageForm.getUserState())) {
|
if (StrUtil.isNotBlank(pageForm.getUserState())) {
|
||||||
cnd.and("u.userState", "=", pageForm.getUserState());
|
cnd.and("u.userState", "=", pageForm.getUserState());
|
||||||
}
|
}
|
||||||
// if (pageForm.getGiveMoney() != null) {
|
|
||||||
// cnd.and("scu.giveMoney", "=", pageForm.getGiveMoney());
|
|
||||||
// }
|
|
||||||
if (Strings.isNotBlank(pageForm.getSearchKeyword())) {
|
if (Strings.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
cnd.and(Cnd.exps("loginname", "like", "%" + pageForm.getSearchKeyword() + "%").or("username", "like", "%" + pageForm.getSearchKeyword() + "%"));
|
cnd.and(Cnd.exps("loginname", "like", "%" + pageForm.getSearchKeyword() + "%").or("username", "like", "%" + pageForm.getSearchKeyword() + "%"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isAllNotBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
if (StrUtil.isAllNotBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
cnd.orderBy(pageForm.getPageOrderName(), pageForm.getPageOrderBy().equals("descending") ? "desc" : "asc");
|
cnd.orderBy(pageForm.getPageOrderName(), "descending".equals(pageForm.getPageOrderBy()) ? "desc" : "asc");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//查询理事机构
|
//查询理事机构
|
||||||
if (pageForm.getRadioType() != null && 1 == pageForm.getRadioType()) {
|
if (pageForm.getRadioType() != null && 1 == pageForm.getRadioType()) {
|
||||||
cnd.and("scu.roleCode", "!=", RoleConstant.CLUB_MEMBER);
|
cnd.and("scu.roleCode", "!=", RoleConstant.CLUB_MEMBER);
|
||||||
@@ -166,7 +156,8 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
|||||||
}
|
}
|
||||||
cnd.asc("field( scu.roleCode, 'CLUB_PRESIDENT', 'CLUB_VICE_PRESIDENT', 'CLUB_SECRETARY', 'CLUB_VICE_SECRETARY','CLUB_OPERATOR', 'CLUB_MEMBER' )");
|
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);
|
||||||
return sysClubService.listPageVO(pageForm, sql, ClubUserCommonPageVo.class);
|
Pagination<ClubUserCommonPageVo> vo = sysClubService.listPageVO(pageForm, sql, ClubUserCommonPageVo.class);
|
||||||
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -295,7 +286,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
|||||||
LEFT JOIN `vw_user` u ON u.id = c.userId
|
LEFT JOIN `vw_user` u ON u.id = c.userId
|
||||||
LEFT JOIN `vw_user` u1 ON u1.id = c.concatPerson
|
LEFT JOIN `vw_user` u1 ON u1.id = c.concatPerson
|
||||||
LEFT JOIN `vw_user` hzu ON hzu.id = c.userId
|
LEFT JOIN `vw_user` hzu ON hzu.id = c.userId
|
||||||
LEFT JOIN bpm_process_instance ins ON ins.processInstanceBusinessId = c.id
|
LEFT JOIN wf_process_instance ins ON ins.businessNo = c.id
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
if (StrUtil.isNotBlank(pageForm.getClubName())) {
|
if (StrUtil.isNotBlank(pageForm.getClubName())) {
|
||||||
@@ -303,7 +294,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
|||||||
}
|
}
|
||||||
cnd.andEX("year(c.createTime)", "=", pageForm.getYear());
|
cnd.andEX("year(c.createTime)", "=", pageForm.getYear());
|
||||||
cnd.and("c.dismiss", "=", false);
|
cnd.and("c.dismiss", "=", false);
|
||||||
cnd.and("ins.processInstanceStatus", "=", BpmProcessInstanceStatusEnum.COMPLETED);
|
cnd.and("ins.state", "=", ProcessInstanceStateEnum.FINISHED.getCode());
|
||||||
|
|
||||||
cnd.asc("c.state").desc("createTime");
|
cnd.asc("c.state").desc("createTime");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
@@ -367,11 +358,9 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
|||||||
|
|
||||||
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
|
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
|
||||||
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("clubRegis"), config).render(docData).writeAndClose(byteArrayOutputStream);
|
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("clubRegis"), config).render(docData).writeAndClose(byteArrayOutputStream);
|
||||||
CommonDownloadUtil.download("南京邮电大学教职工文体协会登记表(" + clubInfo.getString("clubName") + ").docx", byteArrayOutputStream.toByteArray(), response);
|
CommonDownloadUtil.download("教职工文体协会登记表(" + clubInfo.getString("clubName") + ").docx", byteArrayOutputStream.toByteArray(), response);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("协会登记表导出失败,id:{},错误信息:{}", clubId, e.getMessage());
|
log.error("协会登记表导出失败,id:{},错误信息:{}", clubId, e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,10 +8,14 @@ import com.budwk.app.base.constant.RoleConstant;
|
|||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.param.PageForm;
|
import com.budwk.app.base.param.PageForm;
|
||||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
import com.budwk.app.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.budwk.app.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum;
|
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum;
|
||||||
import com.budwk.app.bpm.models.BpmProcessInstance;
|
import com.budwk.app.bpm.models.BpmProcessInstance;
|
||||||
import com.budwk.app.bpm.service.BpmService;
|
import com.budwk.app.bpm.service.BpmService;
|
||||||
|
import com.budwk.app.flow.entity.ProcessInstance;
|
||||||
|
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
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;
|
||||||
@@ -59,8 +63,6 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Pagination<ClubCommonPageVo> getAllClubWithPage(PageForm pageForm, Cnd cnd) {
|
public Pagination<ClubCommonPageVo> getAllClubWithPage(PageForm pageForm, Cnd cnd) {
|
||||||
// (select count(*) from sys_user where userState in ('在职', '在岗') and id in (select userId from sys_club_user where clubId = club.id and `status` = 5 and isNormal = true)) as workNum,
|
|
||||||
// (select count(*) from sys_user where userState in ('退休') and id in (select userId from sys_club_user where clubId = club.id and `status` = 5 and isNormal = true)) as retireNum,
|
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
club.*,
|
club.*,
|
||||||
@@ -71,10 +73,10 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
FROM
|
FROM
|
||||||
sys_club club
|
sys_club club
|
||||||
LEFT JOIN sys_user u on club.concatPerson = u.id
|
LEFT JOIN sys_user u on club.concatPerson = u.id
|
||||||
LEFT JOIN bpm_process_instance ins ON ins.processInstanceBusinessId = club.id
|
LEFT JOIN wf_process_instance ins ON ins.businessNo = club.id
|
||||||
$condition
|
$condition
|
||||||
""").setParam("userId", SecurityUtil.getUserId());
|
""").setParam("userId", SecurityUtil.getUserId());
|
||||||
cnd.and("ins.processInstanceStatus", "=", BpmProcessInstanceStatusEnum.COMPLETED);
|
cnd.and("ins.state", "=", ProcessInstanceStateEnum.FINISHED.getCode());
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return listPageVO(pageForm, sql, ClubCommonPageVo.class);
|
return listPageVO(pageForm, sql, ClubCommonPageVo.class);
|
||||||
}
|
}
|
||||||
@@ -100,8 +102,6 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
""");
|
""");
|
||||||
sql.setParam("id", clubId);
|
sql.setParam("id", clubId);
|
||||||
ClubRegisterVo clubRegisterVo = fetchVO(sql, ClubRegisterVo.class);
|
ClubRegisterVo clubRegisterVo = fetchVO(sql, ClubRegisterVo.class);
|
||||||
|
|
||||||
clubRegisterVo.setNodeTasks(bpmService.getNodeTasks(BpmProcessConstant.CLUB_REGISTER, clubId));
|
|
||||||
List<NutMap> clubUser = sysClubUserService.getClubUser(clubId);
|
List<NutMap> clubUser = sysClubUserService.getClubUser(clubId);
|
||||||
clubRegisterVo.setClubUser(clubUser);
|
clubRegisterVo.setClubUser(clubUser);
|
||||||
return clubRegisterVo;
|
return clubRegisterVo;
|
||||||
@@ -115,9 +115,7 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
|
|
||||||
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())) {
|
||||||
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(),RoleConstant.CLUB_OPERATOR.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(),RoleConstant.CLUB_OPERATOR.name()));
|
||||||
|
|
||||||
List<Sys_user_role> clubList = dao().query(Sys_user_role.class, Cnd.where("roleId", "in", roleList).and("userId", "=", SecurityUtil.getUserId()).and("clubId", "is not", null));
|
List<Sys_user_role> clubList = dao().query(Sys_user_role.class, Cnd.where("roleId", "in", roleList).and("userId", "=", SecurityUtil.getUserId()).and("clubId", "is not", null));
|
||||||
|
|
||||||
List<String> clubIdList = clubList.stream().map(Sys_user_role::getClubId).toList();
|
List<String> clubIdList = clubList.stream().map(Sys_user_role::getClubId).toList();
|
||||||
|
|
||||||
cnd.and("id", "in", clubIdList);
|
cnd.and("id", "in", clubIdList);
|
||||||
@@ -126,8 +124,8 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
List<SysClub> clubList = query(cnd);
|
List<SysClub> clubList = query(cnd);
|
||||||
List<String> list = clubList.stream().map(SysClub::getId).toList();
|
List<String> list = clubList.stream().map(SysClub::getId).toList();
|
||||||
|
|
||||||
List<BpmProcessInstance> instanceList = dao().query(BpmProcessInstance.class, Cnd.where("processInstanceBusinessId", "in", list).and("processInstanceStatus", "=", BpmProcessInstanceStatusEnum.COMPLETED));
|
List<ProcessInstance> instanceList = dao().query(ProcessInstance.class, Cnd.where("businessNo", "in", list).and("state", "=", ProcessInstanceStateEnum.FINISHED.getCode()));
|
||||||
List<String> businessNoList = instanceList.stream().map(BpmProcessInstance::getProcessInstanceBusinessId).toList();
|
List<String> businessNoList = instanceList.stream().map(ProcessInstance::getBusinessNo).toList();
|
||||||
|
|
||||||
return clubList.stream().filter(o -> businessNoList.contains(o.getId())).toList();
|
return clubList.stream().filter(o -> businessNoList.contains(o.getId())).toList();
|
||||||
}
|
}
|
||||||
@@ -141,13 +139,13 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
sys_club club
|
sys_club club
|
||||||
LEFT JOIN sys_club_examine_register ex ON club.id = ex.clubId
|
LEFT JOIN sys_club_examine_register ex ON club.id = ex.clubId
|
||||||
LEFT JOIN sys_user_role ur ON club.id = ur.clubId
|
LEFT JOIN sys_user_role ur ON club.id = ur.clubId
|
||||||
LEFT JOIN bpm_process_instance bpi ON bpi.processInstanceBusinessId = club.id
|
LEFT JOIN wf_process_instance bpi ON bpi.businessNo = club.id
|
||||||
LEFT JOIN bpm_process_instance instance ON instance.processInstanceBusinessId = ex.id
|
LEFT JOIN wf_process_instance instance ON instance.businessNo = ex.id
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("bpi.processInstanceStatus", "=", BpmProcessInstanceStatusEnum.COMPLETED);
|
cnd.and("bpi.state", "=", ProcessInstanceStateEnum.FINISHED.getCode());
|
||||||
cnd.and("instance.processInstanceStatus", "=", BpmProcessInstanceStatusEnum.COMPLETED);
|
cnd.and("instance.state", "=", ProcessInstanceStateEnum.FINISHED.getCode());
|
||||||
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())) {
|
||||||
cnd.and("ur.userId", "=", SecurityUtil.getUserId());
|
cnd.and("ur.userId", "=", SecurityUtil.getUserId());
|
||||||
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(), RoleConstant.CLUB_OPERATOR.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(), RoleConstant.CLUB_OPERATOR.name()));
|
||||||
@@ -183,18 +181,13 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SysClub doEdit(SysClub club, List<String> deleteIds, List<NutMap> managePerson) {
|
public SysClub doEdit(SysClub club, List<String> deleteIds, List<NutMap> managePerson) {
|
||||||
|
// 修改协会表
|
||||||
dao().update(club);
|
dao().update(club);
|
||||||
|
// 修改发起人表
|
||||||
dao().clear(SysClubSponsor.class, Cnd.where("clubId", "=", club.getId()));
|
dao().clear(SysClubSponsor.class, Cnd.where("clubId", "=", club.getId()));
|
||||||
|
// 重新插入发起人
|
||||||
dao().insertLinks(club, "sponsors");
|
dao().insertLinks(club, "sponsors");
|
||||||
|
|
||||||
//if (!Objects.equals(club.getState(), ClubRegistAuditState.SCHOOL_PASS)) {
|
|
||||||
//插入新建社团时填入的理事机构
|
|
||||||
// List<SysClubUser> users = dao().query(SysClubUser.class, Cnd.NEW().andEX("id", "in", deleteIds));
|
|
||||||
// List<String> idList = users.stream().map(SysClubUser::getUserId).collect(Collectors.toList());
|
|
||||||
// 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 (Lang.isNotEmpty(deleteIds)) {
|
|
||||||
// dao().clear(SysClubUser.class, Cnd.where("id", "in", deleteIds));
|
|
||||||
// }
|
|
||||||
dao().clear(Sys_user_role.class, Cnd.where("clubId", "=", club.getId()));
|
dao().clear(Sys_user_role.class, Cnd.where("clubId", "=", club.getId()));
|
||||||
dao().clear(ClubUser.class, Cnd.where(ClubUser::getClubId, "=", club.getId()));
|
dao().clear(ClubUser.class, Cnd.where(ClubUser::getClubId, "=", club.getId()));
|
||||||
|
|
||||||
@@ -208,28 +201,6 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
}).toList();
|
}).toList();
|
||||||
dao().insert(clubUsers);
|
dao().insert(clubUsers);
|
||||||
}
|
}
|
||||||
|
|
||||||
// List<SysClubUser> clubUsers = new ArrayList<>();
|
|
||||||
// managePerson.forEach(item -> {
|
|
||||||
// SysClubUser cUser = new SysClubUser();
|
|
||||||
// SysClubUser fetch = dao().fetch(SysClubUser.class, Cnd.where("clubId", "=", club.getId()).and("userId", "=", item.getString("userId")));
|
|
||||||
// if (fetch != null) {
|
|
||||||
// cUser = fetch;
|
|
||||||
// cUser.setUserId(item.getString("userId"));
|
|
||||||
// cUser.setRoleCode(item.getString("roleCode"));
|
|
||||||
// } else {
|
|
||||||
// cUser.setClubId(club.getId());
|
|
||||||
// cUser.setUserId(item.getString("userId"));
|
|
||||||
// cUser.setJoinTime(DateUtil.now());
|
|
||||||
// cUser.setRoleCode(item.getString("roleCode"));
|
|
||||||
// cUser.setPayed(true);
|
|
||||||
// cUser.setStatus(5);
|
|
||||||
// cUser.setGiveMoney(true);
|
|
||||||
// cUser.setIsNormal(true);
|
|
||||||
// }
|
|
||||||
// clubUsers.add(cUser);
|
|
||||||
// dao().insertOrUpdate(cUser);
|
|
||||||
// });
|
|
||||||
return club;
|
return club;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,44 +208,43 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
public Pagination<ClubRegisterPageVo> minePageData(ClubUserPageForm pageForm) {
|
public Pagination<ClubRegisterPageVo> minePageData(ClubUserPageForm pageForm) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
club.*,
|
info.*,
|
||||||
u.username AS concatPersonName,
|
u.username AS concatPersonName,
|
||||||
dict.name as typeName,
|
dict.name as typeName,
|
||||||
( select GROUP_CONCAT(username) from `vw_user` where id in (select sponsorId from sys_club_sponsor where clubId = club.id) ) as sponsorName,
|
( select GROUP_CONCAT(username) from `vw_user` where id in (select sponsorId from sys_club_sponsor where clubId = info.id) ) as sponsorName,
|
||||||
inst.processInstanceNodeId,
|
ins.id AS instanceId,
|
||||||
inst.processInstanceNodeCode,
|
ins.businessNo,
|
||||||
inst.processInstanceNodeName,
|
ins.state instanceState,
|
||||||
inst.processInstanceTaskIds,
|
ins.variable instanceVariable,
|
||||||
inst.processInstanceStatus,
|
ins.processDefineId instanceProcessDefineId,
|
||||||
nd.nodeType AS processInstanceTaskNodeType,
|
t.id taskId,
|
||||||
(
|
t.taskName AS taskKey,
|
||||||
SELECT
|
t.displayName taskName,
|
||||||
count( 1 ) > 0
|
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
|
FROM
|
||||||
bpm_process_task
|
sys_club info
|
||||||
WHERE
|
LEFT JOIN sys_dict dict ON dict.CODE = info.clubType
|
||||||
prevTaskId = ( SELECT id FROM bpm_process_task WHERE processInstanceId = inst.id AND processTaskNodeCode IN ( 10, 40, 70 ) ORDER BY createdAt DESC LIMIT 1 )
|
LEFT JOIN sys_user u ON u.id = info.concatPerson
|
||||||
AND taskStatus = 'COMPELTE'
|
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||||
) AS nextTaskIsComplete
|
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||||
FROM
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
sys_club club
|
|
||||||
LEFT JOIN sys_dict dict ON dict.CODE = club.clubType
|
|
||||||
LEFT JOIN sys_user u ON u.id = club.concatPerson
|
|
||||||
LEFT JOIN bpm_process_instance inst ON inst.processInstanceBusinessId = club.id
|
|
||||||
LEFT JOIN bpm_process_node_define nd ON nd.id = inst.processInstanceNodeId
|
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(pageForm.getClubName())) {
|
if (StrUtil.isNotBlank(pageForm.getClubName())) {
|
||||||
cnd.andEX("club.clubName", "like", "%" + pageForm.getClubName() + "%");
|
cnd.andEX("info.clubName", "like", "%" + pageForm.getClubName() + "%");
|
||||||
}
|
}
|
||||||
cnd.andEX("year(club.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())) {
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
|
||||||
cnd.and("club.userId", "=", SecurityUtil.getUserId());
|
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||||
}
|
}
|
||||||
cnd.groupBy("club.id");
|
|
||||||
cnd.desc("createTime");
|
cnd.desc("createTime");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return listPageVO(pageForm, sql, ClubRegisterPageVo.class);
|
return listPageVO(pageForm, sql, ClubRegisterPageVo.class);
|
||||||
@@ -291,7 +261,8 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
@Override
|
@Override
|
||||||
public Pagination<ClubRegisterPageVo> schoolReplyPageData(ClubUserPageForm pageForm) {
|
public Pagination<ClubRegisterPageVo> schoolReplyPageData(ClubUserPageForm pageForm) {
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("nd.nodeCode", "=", 50);
|
cnd.and("t.taskName", "=", "58ac932c-c304-4fbe-b379-dd85e9575001");
|
||||||
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
Sql sql = generateSql(pageForm, cnd);
|
Sql sql = generateSql(pageForm, cnd);
|
||||||
return listPageVO(pageForm, sql, ClubRegisterPageVo.class);
|
return listPageVO(pageForm, sql, ClubRegisterPageVo.class);
|
||||||
}
|
}
|
||||||
@@ -311,42 +282,48 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
|||||||
u.username AS concatPersonName,
|
u.username AS concatPersonName,
|
||||||
dict.name as typeName,
|
dict.name as typeName,
|
||||||
( select GROUP_CONCAT(username) from `vw_user` where id in (select sponsorId from sys_club_sponsor where clubId = club.id) ) as sponsorName,
|
( select GROUP_CONCAT(username) from `vw_user` where id in (select sponsorId from sys_club_sponsor where clubId = club.id) ) as sponsorName,
|
||||||
inst.id processInstanceId,
|
ins.id AS instanceId,
|
||||||
inst.processInstanceNodeId,
|
ins.businessNo,
|
||||||
inst.processInstanceNodeName,
|
ins.state instanceState,
|
||||||
inst.processInstanceTaskIds,
|
ins.variable instanceVariable,
|
||||||
inst.processInstanceStatus,
|
ins.processDefineId instanceProcessDefineId,
|
||||||
task.id processInstanceTaskId,
|
t.id taskId,
|
||||||
task.taskStatus processInstanceTaskStatus,
|
t.taskName AS taskKey,
|
||||||
COUNT(nt.id) OVER (PARTITION BY task.id) > 0 AS nextTaskIsComplete
|
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
|
FROM
|
||||||
bpm_process_task task
|
wf_process_task t
|
||||||
INNER JOIN bpm_process_node_define nd ON nd.id = task.processTaskNodeId
|
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||||
INNER JOIN bpm_process_instance inst ON inst.id = task.processInstanceId
|
LEFT JOIN sys_club club ON club.id = ins.businessNo
|
||||||
INNER JOIN sys_club club ON club.id = inst.processInstanceBusinessId
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
LEFT JOIN bpm_process_task nt ON nt.prevTaskId = task.id AND nt.taskStatus = 'COMPLETE'
|
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
|
||||||
LEFT JOIN sys_dict dict ON dict.CODE = club.clubType
|
LEFT JOIN sys_dict dict ON dict.CODE = club.clubType
|
||||||
LEFT JOIN sys_user u ON u.id = club.concatPerson
|
LEFT JOIN sys_user u ON u.id = club.concatPerson
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
|
cnd.andEX("year(club.createTime)", "=", pageForm.getYear());
|
||||||
if (StrUtil.isNotBlank(pageForm.getClubName())) {
|
if (StrUtil.isNotBlank(pageForm.getClubName())) {
|
||||||
cnd.andEX("club.clubName", "like", "%" + pageForm.getClubName() + "%");
|
cnd.andEX("club.clubName", "like", "%" + pageForm.getClubName() + "%");
|
||||||
}
|
}
|
||||||
cnd.andEX("year(club.createTime)", "=", pageForm.getYear());
|
|
||||||
|
|
||||||
/*if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
|
||||||
cnd.and("club.userId", "=", SecurityUtil.getUserId());
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if (pageForm.getAudit()) {
|
if (pageForm.getAudit()) {
|
||||||
cnd.and("task.taskStatus", "=", BpmProcessTaskStatusEnum.COMPLETE);
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
} else {
|
} else {
|
||||||
cnd.and("task.taskStatus", "=", BpmProcessTaskStatusEnum.ACTIVE);
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
}
|
}
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
cnd.groupBy("club.id");
|
|
||||||
cnd.desc("createTime");
|
cnd.desc("createTime");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
cnd.groupBy("t.id");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
public class ClubEvaluatePageVo {
|
||||||
public class ClubEvaluatePageVo extends BpmTaskApprovalVo {
|
|
||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
private String year;
|
private String year;
|
||||||
@@ -18,4 +17,22 @@ public class ClubEvaluatePageVo extends BpmTaskApprovalVo {
|
|||||||
private String foundTime;
|
private String foundTime;
|
||||||
private String typeName;
|
private String typeName;
|
||||||
private Date applyTime;
|
private Date applyTime;
|
||||||
|
|
||||||
|
private String instanceId;
|
||||||
|
private String businessNo;
|
||||||
|
private Integer instanceState;
|
||||||
|
private String instanceVariable;
|
||||||
|
private String instanceProcessDefineId;
|
||||||
|
private String taskId;
|
||||||
|
private String taskKey;
|
||||||
|
private String taskName;
|
||||||
|
private Integer taskType;
|
||||||
|
private Integer taskPerformType;
|
||||||
|
private Integer taskState;
|
||||||
|
private Date finishTime;
|
||||||
|
private String taskParentId;
|
||||||
|
private String taskVariable;
|
||||||
|
private String curTaskName;
|
||||||
|
private Boolean canRevoke;
|
||||||
|
private String startTaskId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ import java.util.List;
|
|||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class ClubEvaluateVo extends SysClubEvaluate {
|
public class ClubEvaluateVo extends SysClubEvaluate {
|
||||||
|
|
||||||
@ApiModelProperty("节点审批记录")
|
|
||||||
private List<BpmTaskApprovalRecordVo> nodeTasks;
|
|
||||||
private String clubName;
|
private String clubName;
|
||||||
private String clubCode;
|
private String clubCode;
|
||||||
private String createTime;
|
private String createTime;
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import com.budwk.app.bpm.vo.BpmTaskApprovalVo;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
public class ClubExaminePageVo{
|
||||||
public class ClubExaminePageVo extends BpmTaskApprovalVo {
|
|
||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
private String year;
|
private String year;
|
||||||
@@ -19,4 +19,21 @@ public class ClubExaminePageVo extends BpmTaskApprovalVo {
|
|||||||
private String registerDate;
|
private String registerDate;
|
||||||
private String typeName;
|
private String typeName;
|
||||||
|
|
||||||
|
private String instanceId;
|
||||||
|
private String businessNo;
|
||||||
|
private Integer instanceState;
|
||||||
|
private String instanceVariable;
|
||||||
|
private String instanceProcessDefineId;
|
||||||
|
private String taskId;
|
||||||
|
private String taskKey;
|
||||||
|
private String taskName;
|
||||||
|
private Integer taskType;
|
||||||
|
private Integer taskPerformType;
|
||||||
|
private Integer taskState;
|
||||||
|
private Date finishTime;
|
||||||
|
private String taskParentId;
|
||||||
|
private String taskVariable;
|
||||||
|
private String curTaskName;
|
||||||
|
private Boolean canRevoke;
|
||||||
|
private String startTaskId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
package com.budwk.app.zhgh.club.vo;
|
package com.budwk.app.zhgh.club.vo;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
import com.budwk.app.bpm.vo.BpmTaskApprovalVo;
|
import com.budwk.app.bpm.vo.BpmTaskApprovalVo;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
public class ClubRegisterPageVo {
|
||||||
public class ClubRegisterPageVo extends BpmTaskApprovalVo {
|
|
||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
private String clubCode;
|
private String clubCode;
|
||||||
@@ -24,4 +26,22 @@ public class ClubRegisterPageVo extends BpmTaskApprovalVo {
|
|||||||
private String typeName;
|
private String typeName;
|
||||||
private String userId;
|
private String userId;
|
||||||
private String sponsor;
|
private String sponsor;
|
||||||
|
|
||||||
|
private String instanceId;
|
||||||
|
private String businessNo;
|
||||||
|
private Integer instanceState;
|
||||||
|
private String instanceVariable;
|
||||||
|
private String instanceProcessDefineId;
|
||||||
|
private String taskId;
|
||||||
|
private String taskKey;
|
||||||
|
private String taskName;
|
||||||
|
private Integer taskType;
|
||||||
|
private Integer taskPerformType;
|
||||||
|
private Integer taskState;
|
||||||
|
private Date finishTime;
|
||||||
|
private String taskParentId;
|
||||||
|
private String taskVariable;
|
||||||
|
private String curTaskName;
|
||||||
|
private Boolean canRevoke;
|
||||||
|
private String startTaskId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.budwk.app.zhgh.club.vo;
|
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.SysClubUser;
|
import com.budwk.app.zhgh.club.model.SysClubUser;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
@@ -9,7 +10,7 @@ import java.util.List;
|
|||||||
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class ClubUserCommonPageVo extends SysClubUser {
|
public class ClubUserCommonPageVo extends ClubUser {
|
||||||
|
|
||||||
private String clubName;
|
private String clubName;
|
||||||
private String clubCode;
|
private String clubCode;
|
||||||
|
|||||||
@@ -6,41 +6,42 @@ import lombok.EqualsAndHashCode;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Data
|
@Data
|
||||||
public class ClubUserJoinPageVo extends BpmTaskApprovalVo {
|
public class ClubUserJoinPageVo{
|
||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
private String clubId;
|
private String clubId;
|
||||||
|
|
||||||
private String userId;
|
private String userId;
|
||||||
|
|
||||||
private String roleCode;
|
private String roleCode;
|
||||||
|
|
||||||
private Boolean mode;
|
private Boolean mode;
|
||||||
|
|
||||||
private String clubPosition;
|
private String clubPosition;
|
||||||
|
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
private String avatar;
|
private String avatar;
|
||||||
|
|
||||||
private String sameTimeJoinOtherClubSituation;
|
private String sameTimeJoinOtherClubSituation;
|
||||||
|
|
||||||
private String awardsExperience;
|
private String awardsExperience;
|
||||||
|
|
||||||
private Date applyDate;
|
private Date applyDate;
|
||||||
|
|
||||||
private String clubName;
|
private String clubName;
|
||||||
|
|
||||||
private String loginName;
|
private String loginName;
|
||||||
|
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
private String unitName;
|
private String unitName;
|
||||||
|
|
||||||
private String unionName;
|
private String unionName;
|
||||||
|
|
||||||
private String sex;
|
private String sex;
|
||||||
|
|
||||||
|
private String instanceId;
|
||||||
|
private String businessNo;
|
||||||
|
private Integer instanceState;
|
||||||
|
private String instanceVariable;
|
||||||
|
private String instanceProcessDefineId;
|
||||||
|
private String taskId;
|
||||||
|
private String taskKey;
|
||||||
|
private String taskName;
|
||||||
|
private Integer taskType;
|
||||||
|
private Integer taskPerformType;
|
||||||
|
private Integer taskState;
|
||||||
|
private Date finishTime;
|
||||||
|
private String taskParentId;
|
||||||
|
private String taskVariable;
|
||||||
|
private String curTaskName;
|
||||||
|
private Boolean canRevoke;
|
||||||
|
private String startTaskId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,23 +8,14 @@ import lombok.EqualsAndHashCode;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Data
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class ClubUserJoinVo extends ClubUserApply {
|
public class ClubUserJoinVo extends ClubUserApply {
|
||||||
|
|
||||||
private String loginName;
|
private String loginName;
|
||||||
|
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
private String unitName;
|
private String unitName;
|
||||||
|
|
||||||
private String unionName;
|
private String unionName;
|
||||||
|
|
||||||
private String sex;
|
private String sex;
|
||||||
|
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
@ApiModelProperty("节点审批记录")
|
|
||||||
private List<BpmTaskApprovalRecordVo> nodeTasks;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-2
@@ -37,6 +37,7 @@ import org.nutz.mvc.annotation.At;
|
|||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
import org.nutz.mvc.annotation.Param;
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -59,10 +60,18 @@ public class RecuperationLineSelectController {
|
|||||||
@Inject
|
@Inject
|
||||||
private RecuperationLineSelectService lineSelectService;
|
private RecuperationLineSelectService lineSelectService;
|
||||||
|
|
||||||
@At("")
|
@At("/branchUnion")
|
||||||
@Ok("beetl:/platform/zhgh/staffbenefit/recuperation/lineSelect/index.html")
|
@Ok("beetl:/platform/zhgh/staffbenefit/recuperation/lineSelect/index.html")
|
||||||
@SaCheckLogin
|
@SaCheckLogin
|
||||||
public void index() {
|
public void branchUnion(HttpServletRequest request) {
|
||||||
|
request.setAttribute("mode", 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At("/schoolUnion")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/recuperation/lineSelect/index.html")
|
||||||
|
@SaCheckLogin
|
||||||
|
public void schoolUnion(HttpServletRequest request) {
|
||||||
|
request.setAttribute("mode", 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
|
|||||||
@@ -1,302 +0,0 @@
|
|||||||
<!--#
|
|
||||||
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
|
|
||||||
@keyup.enter.native="doSearch"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入协会名称"
|
|
||||||
clearable
|
|
||||||
style="width: 100%"
|
|
||||||
v-model="pageForm.clubName"
|
|
||||||
></el-input>
|
|
||||||
</search-item>
|
|
||||||
</search>
|
|
||||||
</el-card>
|
|
||||||
|
|
||||||
<el-card shadow="never">
|
|
||||||
<table-tool label="协会列表">
|
|
||||||
<el-radio-group v-model="hasJoin" @change="joinChange" size="small">
|
|
||||||
<el-radio-button :label="false">{{'可加入协会' + noJoinCount + '(入会)'}}</el-radio-button>
|
|
||||||
<el-radio-button :label="true">{{'已加入协会' + hasJoinCount + '(退会)'}}</el-radio-button>
|
|
||||||
</el-radio-group>
|
|
||||||
</table-tool>
|
|
||||||
<el-table :data="tableData" row-key="id" style="width: 100%">
|
|
||||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
|
||||||
<el-table-column label="协会编码" sortable prop="clubCode"></el-table-column>
|
|
||||||
<el-table-column label="协会名称" prop="clubName" show-overflow-tooltip width="200px"></el-table-column>
|
|
||||||
<el-table-column label="成立时间" prop="foundTime"></el-table-column>
|
|
||||||
<el-table-column label="会长" prop="clubLeader" show-overflow-tooltip></el-table-column>
|
|
||||||
<el-table-column label="秘书长" prop="clubSecretary" show-overflow-tooltip></el-table-column>
|
|
||||||
<!-- <el-table-column sortable label="联系人" show-overflow-tooltip prop="concatPersonName"></el-table-column>-->
|
|
||||||
<!-- <el-table-column label="联系人电话" show-overflow-tooltip prop="concatPersonMobile"></el-table-column>-->
|
|
||||||
<el-table-column sortable label="当前人数" show-overflow-tooltip prop="currentPeopleNum"></el-table-column>
|
|
||||||
<!-- <el-table-column label="在职人数" show-overflow-tooltip prop="workNum"></el-table-column>-->
|
|
||||||
<!-- <el-table-column label="退休人数" show-overflow-tooltip prop="retireNum"></el-table-column>-->
|
|
||||||
<!-- <el-table-column v-if="hasJoin === true" label="入会状态" sortable>-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <el-tag size="mini" v-if="scope.row.status==1" type="primary">待协会审核</el-tag>-->
|
|
||||||
<!-- <el-tag size="mini" type="danger" v-if="scope.row.status==2">协会不通过</el-tag>-->
|
|
||||||
<!-- <el-tag size="mini" v-if="scope.row.status==3" type="primary">待校工会审核</el-tag>-->
|
|
||||||
<!-- <el-tag size="mini" type="danger" v-if="scope.row.status==4">校工会不通过</el-tag>-->
|
|
||||||
<!-- <el-tag size="mini" v-if="scope.row.status==5" type="success">审核通过</el-tag>-->
|
|
||||||
<!-- <el-tag size="mini" type="info" v-if="!scope.row.status">暂无</el-tag>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
|
|
||||||
<!-- <el-table-column v-if="hasJoin === true" label="退会状态" sortable>-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <el-tag size="mini" type="primary" v-if="scope.row.exitStatus==1">待协会审核</el-tag>-->
|
|
||||||
<!-- <el-tag size="mini" type="danger" v-if="scope.row.exitStatus==2">协会不通过</el-tag>-->
|
|
||||||
<!-- <el-tag size="mini" type="primary" v-if="scope.row.exitStatus==3">待校工会审核</el-tag>-->
|
|
||||||
<!-- <el-tag size="mini" type="danger" v-if="scope.row.exitStatus==4">校工会不通过</el-tag>-->
|
|
||||||
<!-- <el-tag size="mini" type="success" v-if="scope.row.exitStatus==5">审核通过</el-tag>-->
|
|
||||||
<!-- <el-tag size="mini" type="info" v-if="!scope.row.exitStatus">暂无</el-tag>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
|
|
||||||
<el-table-column label="操作" width="250px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button size="mini" type="primary" @click="openDetail(scope.row)">查看</el-button>
|
|
||||||
<el-button size="mini" v-if="hasJoin === false" type="primary" @click="doSubmit(scope.row)">申请加入</el-button>
|
|
||||||
|
|
||||||
<!-- <el-button size="mini" v-if="hasJoin === true && scope.row.status == 1" type="danger" @click="doRevocation(scope.row.id)">-->
|
|
||||||
<!-- 撤销加入申请-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- v-if="hasJoin === true && scope.row.status==5 && !scope.row.exitStatus"-->
|
|
||||||
<!-- type="primary"-->
|
|
||||||
<!-- @click="exitClub(scope.row)"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- 申请退会-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- v-if="hasJoin === true && scope.row.status!=1 && scope.row.exitStatus==1"-->
|
|
||||||
<!-- type="danger"-->
|
|
||||||
<!-- @click="cancelExitClub(scope.row.id)"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- 撤销退会申请-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<!--#include("/layouts/pagination.html"){}#-->
|
|
||||||
</el-card>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #view>
|
|
||||||
<el-descriptions class="margin-top" title="" :column="3" border>
|
|
||||||
<el-descriptions-item span="2">
|
|
||||||
<template slot="label">协会名称</template>
|
|
||||||
<div v-html="viewData.clubName"></div>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="成立时间">{{viewData.foundTime}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="协会编码">{{viewData.clubCode}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="协会类型">{{viewData.typeName}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="发起人">{{viewData.sponsorName}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item>
|
|
||||||
<template slot="label">报名联系人</template>
|
|
||||||
{{viewData.concatPersonName}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item>
|
|
||||||
<template slot="label">联系人电话</template>
|
|
||||||
{{viewData.concatPersonMobile}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item>
|
|
||||||
<template slot="label">联系人邮箱</template>
|
|
||||||
{{viewData.concatPersonEmail}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item>
|
|
||||||
<template slot="label">会费标准</template>
|
|
||||||
{{viewData.due}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item :span="2">
|
|
||||||
<template slot="label">当前人数</template>
|
|
||||||
{{viewData.currentPeopleNum}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item span="3">
|
|
||||||
<template slot="label">协会介绍</template>
|
|
||||||
<div class="text-left" v-html="viewData.introduce"></div>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item span="3">
|
|
||||||
<template slot="label">协会宗旨</template>
|
|
||||||
<div class="text-left" v-html="viewData.purpose"></div>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<!--<el-descriptions-item span="1.5">
|
|
||||||
<template slot="label">QQ群二维码</template>
|
|
||||||
<file-upload
|
|
||||||
v-if="viewData.QQGroupCode && viewData.QQGroupCode.length > 0"
|
|
||||||
:files="JSON.parse(viewData.QQGroupCode)"
|
|
||||||
:view="true"
|
|
||||||
></file-upload>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item span="2">
|
|
||||||
<template slot="label">微信群二维码</template>
|
|
||||||
<file-upload
|
|
||||||
v-if="viewData.wechatGroupCode && viewData.wechatGroupCode.length > 0"
|
|
||||||
:files="JSON.parse(viewData.wechatGroupCode)"
|
|
||||||
:view="true"
|
|
||||||
></file-upload>
|
|
||||||
</el-descriptions-item>-->
|
|
||||||
<el-descriptions-item span="1.5">
|
|
||||||
<template slot="label">协会章程</template>
|
|
||||||
<file-preview :files="viewData.rulesFile" complete_result></file-preview>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item span="2">
|
|
||||||
<template slot="label">年度活动计划</template>
|
|
||||||
<file-preview :files="viewData.yearPlanFile" complete_result></file-preview>
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
</template>
|
|
||||||
</guava>
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
new Vue({
|
|
||||||
el: "#app",
|
|
||||||
store,
|
|
||||||
mixins: [initTableMixins],
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
viewData: {},
|
|
||||||
hasJoin: false,
|
|
||||||
hasJoinCount: 0,
|
|
||||||
noJoinCount: 0,
|
|
||||||
clickRow: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async doSubmit(row) {
|
|
||||||
this.$axios.post("/platform/club/join/apply/checkApplyClub", { clubId: row.id }).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/join/apply?clubId=" + row.id)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// const { code, data, msg } = await this.$axios.post("/platform/club/applyJoin/apply/getInClubByCurUser")
|
|
||||||
// if (code !== 0) {
|
|
||||||
// this.$message.warning(msg)
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// let str = "您还没有参加协会"
|
|
||||||
// if (data && data.length > 0) {
|
|
||||||
// str = "您已经加入了"
|
|
||||||
// data.forEach((item) => {
|
|
||||||
// str += "【" + item.clubName + "】"
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// str += ",请确认是否申请加入【" + row.clubName + "】?"
|
|
||||||
// const confirm = await this.$confirm(str, "提示", {
|
|
||||||
// confirmButtonText: "确定",
|
|
||||||
// cancelButtonText: "取消",
|
|
||||||
// type: "warning"
|
|
||||||
// })
|
|
||||||
// if (confirm === "confirm") {
|
|
||||||
// const resp = await this.$axios.post("/platform/club/applyJoin/apply/submit", { id: row.id })
|
|
||||||
// if (resp.code === 0) {
|
|
||||||
// this.$message.success(resp.msg)
|
|
||||||
// await this.getCount()
|
|
||||||
// await this.pageData()
|
|
||||||
// } else {
|
|
||||||
// this.$message.warning(resp.msg)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
async exitClub(row) {
|
|
||||||
const confirm = await this.$confirm("您确定要申请退会吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
})
|
|
||||||
if (confirm === "confirm") {
|
|
||||||
const resp = await this.$axios.post("/platform/club/applyJoin/apply/exitClub", { id: row.id })
|
|
||||||
if (resp.code === 0) {
|
|
||||||
await this.getCount()
|
|
||||||
this.pageData()
|
|
||||||
await this.$message.success(resp.msg)
|
|
||||||
} else {
|
|
||||||
this.$message.warning(resp.msg)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async cancelExitClub(id) {
|
|
||||||
const confirm = await this.$confirm("您确定要撤销申请吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
})
|
|
||||||
if (confirm === "confirm") {
|
|
||||||
const resp = await this.$axios.post("/platform/club/applyJoin/apply/cancelExitClub", { id: id })
|
|
||||||
if (resp.code === 0) {
|
|
||||||
await this.getCount()
|
|
||||||
await this.pageData()
|
|
||||||
this.$message.success(resp.msg)
|
|
||||||
} else {
|
|
||||||
this.$message.warning(resp.msg)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async doRevocation(id) {
|
|
||||||
const confirm = await this.$confirm("您确认要撤销申请吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
})
|
|
||||||
if (confirm === "confirm") {
|
|
||||||
const resp = await this.$axios.post("/platform/club/applyJoin/apply/revocation", { id: id })
|
|
||||||
if (resp.code === 0) {
|
|
||||||
this.$message.success(resp.msg)
|
|
||||||
await this.getCount()
|
|
||||||
await this.pageData()
|
|
||||||
} else {
|
|
||||||
this.$message.warning(resp.msg)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async openDetail(row) {
|
|
||||||
const resp = await this.$axios.post("/platform/club/applyJoin/apply/findOne", { id: row.id })
|
|
||||||
if (resp.code === 0) {
|
|
||||||
this.viewData = resp.data
|
|
||||||
this.$refs.guava.view()
|
|
||||||
} else {
|
|
||||||
this.$message.warning(resp.msg)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
joinChange(val) {
|
|
||||||
this.pageForm.hasJoin = val
|
|
||||||
this.tableData = []
|
|
||||||
this.doSearch()
|
|
||||||
},
|
|
||||||
async getCount() {
|
|
||||||
const resp = await this.$axios.post("/platform/club/applyJoin/apply/getCount")
|
|
||||||
this.hasJoinCount = resp.data.hasJoinCount
|
|
||||||
this.noJoinCount = resp.data.noJoinCount
|
|
||||||
},
|
|
||||||
pageData() {
|
|
||||||
this.pageForm.hasJoin = this.hasJoin
|
|
||||||
this.$axios.post("/platform/club/applyJoin/apply/pageData", this.pageForm).then((res) => {
|
|
||||||
this.tableData = res.data.list
|
|
||||||
this.pageForm.totalCount = res.data.totalCount
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async created() {
|
|
||||||
await this.getCount()
|
|
||||||
await this.pageData()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
<!--#
|
|
||||||
}
|
|
||||||
#-->
|
|
||||||
@@ -1,213 +0,0 @@
|
|||||||
<!--#
|
|
||||||
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"></el-input>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="协会:">
|
|
||||||
<el-select clearable filterable placeholder="请选择协会" v-model="pageForm.clubId">
|
|
||||||
<el-option :label="item.clubName" :value="item.id" :key="item.id" v-for="item in clubOptions"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="人员类型:">
|
|
||||||
<dict-select code="PERSON_TYPE" placeholder="请选择人员类型" clearable v-model="pageForm.personType"></dict-select>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="人员状态:">
|
|
||||||
<dict-select clearable code="USER_STATE" placeholder="请选择人员状态" v-model="pageForm.userState"></dict-select>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="所属单位:">
|
|
||||||
<el-select clearable filterable placeholder="请选择所属单位" v-model="pageForm.unitId">
|
|
||||||
<el-option :label="item.name" :value="item.id" :key="item.id" v-for="item in unitList"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
</search>
|
|
||||||
</el-card>
|
|
||||||
|
|
||||||
<el-card class="mt10" shadow="never">
|
|
||||||
<table-tool label="申请列表">
|
|
||||||
<el-radio-group @change="(val) => doSearch()" style="margin-right: 10px" v-model="pageForm.applyType" size="small">
|
|
||||||
<el-radio-button :label="1">申请加入</el-radio-button>
|
|
||||||
<el-radio-button :label="2">申请退会</el-radio-button>
|
|
||||||
</el-radio-group>
|
|
||||||
<el-radio-group @change="(val) => doSearch()" style="margin-right: 10px" v-model="pageForm.auditType" size="small">
|
|
||||||
<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-button @click="openPayed(true)" sizi="small" type="success" size="small">通过</el-button>
|
|
||||||
<el-button @click="openPayed(false)" sizi="small" type="danger" size="small">不通过</el-button>
|
|
||||||
</table-tool>
|
|
||||||
<el-table
|
|
||||||
:data="tableData"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
@sort-change="pageOrder"
|
|
||||||
ref="multipleTable"
|
|
||||||
row-key="id"
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-table-column
|
|
||||||
:reserve-selection="true"
|
|
||||||
:selectable="(row, index) => {return row.status === 1 || row.exitStatus === 1}"
|
|
||||||
type="selection"
|
|
||||||
v-if="pageForm.auditType !== 2"
|
|
||||||
width="55"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
|
||||||
<el-table-column label="协会名称" prop="clubName" show-overflow-tooltip sortable></el-table-column>
|
|
||||||
<el-table-column label="工号" prop="loginName" sortable width="100"></el-table-column>
|
|
||||||
<el-table-column label="姓名" prop="userName" sortable width="100"></el-table-column>
|
|
||||||
<el-table-column label="性别" prop="sex" sortable width="80"></el-table-column>
|
|
||||||
<el-table-column label="年龄" prop="birthday" width="60">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{getAge(scope.row)}}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="电话" prop="mobile" width="120"></el-table-column>
|
|
||||||
<el-table-column label="是否会员" prop="status" width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span v-if="scope.row.status != 5">否</span>
|
|
||||||
<span style="color: #236eb4" v-if="scope.row.status === 5">是</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="人员类型" prop="personType" show-overflow-tooltip></el-table-column>
|
|
||||||
<el-table-column label="所属单位" prop="unitName" show-overflow-tooltip sortable></el-table-column>
|
|
||||||
<el-table-column label="申请时间" prop="joinTime" show-overflow-tooltip sortable></el-table-column>
|
|
||||||
<el-table-column v-if="pageForm.applyType === 1" label="入会状态" prop="status">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag type="primary" v-if="scope.row.status==1">待协会审核</el-tag>
|
|
||||||
<el-tag type="danger" v-if="scope.row.status==2">协会不通过</el-tag>
|
|
||||||
<el-tag type="primary" v-if="scope.row.status==3">待校工会审核</el-tag>
|
|
||||||
<el-tag type="danger" v-if="scope.row.status==4">校工会不通过</el-tag>
|
|
||||||
<el-tag type="success" v-if="scope.row.status==5">审核通过</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column v-if="pageForm.applyType === 2" label="退会状态" prop="exitStatus">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag type="primary" v-if="scope.row.exitStatus==1">待协会审核</el-tag>
|
|
||||||
<el-tag type="danger" v-if="scope.row.exitStatus==2">协会不通过</el-tag>
|
|
||||||
<el-tag type="primary" v-if="scope.row.exitStatus==3">待校工会审核</el-tag>
|
|
||||||
<el-tag type="danger" v-if="scope.row.exitStatus==4">校工会不通过</el-tag>
|
|
||||||
<el-tag type="success" v-if="scope.row.exitStatus==5">审核通过</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<!--#include("/layouts/pagination.html"){}#-->
|
|
||||||
</el-card>
|
|
||||||
</template>
|
|
||||||
</guava>
|
|
||||||
|
|
||||||
<el-dialog :append-to-body="true" :close-on-click-modal="false" :visible.sync="payDialogVisible" title="是否缴费" width="30%">
|
|
||||||
<el-form label-width="80px">
|
|
||||||
<el-form-item label="是否缴费" prop="payed">
|
|
||||||
<el-radio :label="true" border v-model="payed">已缴费</el-radio>
|
|
||||||
<el-radio :label="false" border v-model="payed">未缴费</el-radio>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<span class="dialog-footer" slot="footer">
|
|
||||||
<el-button @click="payDialogVisible = false">取 消</el-button>
|
|
||||||
<el-button @click="doAudit" type="primary">确 定</el-button>
|
|
||||||
</span>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
new Vue({
|
|
||||||
el: "#app",
|
|
||||||
store,
|
|
||||||
mixins: [initTableMixins],
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
unitList: [],
|
|
||||||
clubOptions: [],
|
|
||||||
multipleSelection: [],
|
|
||||||
pageForm: {
|
|
||||||
auditType: 3,
|
|
||||||
applyType: 1
|
|
||||||
},
|
|
||||||
auditResult: false,
|
|
||||||
payDialogVisible: false,
|
|
||||||
payed: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
openPayed(flag) {
|
|
||||||
if (!this.multipleSelection.length) {
|
|
||||||
this.$message.warning("请先勾选需要进行审核的人员")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.auditResult = flag
|
|
||||||
if (this.pageForm.applyType === 1) {
|
|
||||||
this.payDialogVisible = true
|
|
||||||
} else {
|
|
||||||
this.doAudit()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async doAudit() {
|
|
||||||
const ids = this.multipleSelection.map((v) => {
|
|
||||||
return v.id
|
|
||||||
})
|
|
||||||
const confirm = await this.$confirm("您确定要提交审核吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
})
|
|
||||||
if (confirm === "confirm") {
|
|
||||||
const resp = await this.$axios.post("/platform/club/applyJoin/clubAudit/doAudit", {
|
|
||||||
ids: JSON.stringify(ids),
|
|
||||||
auditResult: this.auditResult,
|
|
||||||
auditType: 1,
|
|
||||||
applyType: this.pageForm.applyType,
|
|
||||||
payed: this.payed
|
|
||||||
})
|
|
||||||
if (resp.code === 0) {
|
|
||||||
this.$message.success(resp.msg)
|
|
||||||
this.multipleSelection = []
|
|
||||||
this.$refs.multipleTable.clearSelection()
|
|
||||||
this.payDialogVisible = false
|
|
||||||
this.doSearch()
|
|
||||||
} else {
|
|
||||||
this.$message.warning(resp.msg)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getAge(row) {
|
|
||||||
if (row.birthday === null || row.birthday === undefined) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const birthdayTime = new Date(row.birthday).getTime()
|
|
||||||
const nowTime = new Date().getTime()
|
|
||||||
return Math.ceil((nowTime - birthdayTime) / 31536000000)
|
|
||||||
},
|
|
||||||
handleSelectionChange(val) {
|
|
||||||
this.multipleSelection = val
|
|
||||||
},
|
|
||||||
async getMyMangeClub() {
|
|
||||||
const { data } = await this.$axios.post("/platform/club/applyJoin/clubAudit/getMyMangeClub")
|
|
||||||
return data
|
|
||||||
},
|
|
||||||
pageData() {
|
|
||||||
this.pageForm.source = 1
|
|
||||||
this.$axios.post("/platform/club/applyJoin/clubAudit/pageData", this.pageForm).then((res) => {
|
|
||||||
this.tableData = res.data.list
|
|
||||||
this.pageForm.totalCount = res.data.totalCount
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async created() {
|
|
||||||
this.unitList = await this.$businessTool.listUnit()
|
|
||||||
this.clubOptions = await this.getMyMangeClub()
|
|
||||||
await this.pageData()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
<!--#
|
|
||||||
}
|
|
||||||
#-->
|
|
||||||
@@ -3,8 +3,11 @@ const REGISTER_INFO_COMPONENT = {
|
|||||||
<div>
|
<div>
|
||||||
<el-tabs tab-position="top" v-model="activeName">
|
<el-tabs tab-position="top" v-model="activeName">
|
||||||
<el-tab-pane name="1" label="基础信息">
|
<el-tab-pane name="1" label="基础信息">
|
||||||
<div class="process-title">协会信息</div>
|
<div class="process-title">
|
||||||
<el-descriptions :column="4" border class="table_fixed">
|
协会信息
|
||||||
|
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||||
|
</div>
|
||||||
|
<el-descriptions :column="3" border class="table_fixed">
|
||||||
<el-descriptions-item label="协会名称">
|
<el-descriptions-item label="协会名称">
|
||||||
{{viewData.clubName}}
|
{{viewData.clubName}}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@@ -17,65 +20,46 @@ const REGISTER_INFO_COMPONENT = {
|
|||||||
<el-descriptions-item label="发起人">
|
<el-descriptions-item label="发起人">
|
||||||
{{ viewData.sponsorName }}
|
{{ viewData.sponsorName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="协会类型" :span="4">
|
<el-descriptions-item label="协会类型">
|
||||||
{{ viewData.typeName }}
|
{{ viewData.typeName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<!-- <el-descriptions-item label="报名联系人">-->
|
|
||||||
<!-- {{ viewData.concatPersonName }}-->
|
|
||||||
<!-- </el-descriptions-item>-->
|
|
||||||
<!-- <el-descriptions-item label="联系人电话">-->
|
|
||||||
<!-- {{ viewData.concatPersonMobile }}-->
|
|
||||||
<!-- </el-descriptions-item>-->
|
|
||||||
<!-- <el-descriptions-item label="联系人邮箱">-->
|
|
||||||
<!-- {{ viewData.concatPersonEmail }}-->
|
|
||||||
<!-- </el-descriptions-item>-->
|
|
||||||
<el-descriptions-item label="申请时间">
|
<el-descriptions-item label="申请时间">
|
||||||
{{viewData.createTime}}
|
{{viewData.createTime}}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item :span="3" label="会费标准">
|
<el-descriptions-item label="会费标准" :span="4">
|
||||||
{{viewData.due}}
|
{{viewData.due}}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item span="4">
|
<el-descriptions-item :span="4">
|
||||||
<template slot="label">协会介绍</template>
|
<template slot="label">协会介绍</template>
|
||||||
<div class="text-left" v-html="viewData.introduce"></div>
|
<div class="text-left" v-html="viewData.introduce"></div>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item span="4">
|
<el-descriptions-item :span="4">
|
||||||
<template slot="label">活动形式</template>
|
<template slot="label">活动形式</template>
|
||||||
<div class="text-left" v-html="viewData.purpose"></div>
|
<div class="text-left" v-html="viewData.purpose"></div>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<!--<el-descriptions-item span="2">
|
<el-descriptions-item :span="2">
|
||||||
<template slot="label">QQ群二维码</template>
|
|
||||||
<file-preview :files="viewData.QQGroupCode" complete_result></file-preview>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item span="2">
|
|
||||||
<template slot="label">微信群二维码</template>
|
|
||||||
<file-preview :files="viewData.wechatGroupCode" complete_result></file-preview>
|
|
||||||
</el-descriptions-item>-->
|
|
||||||
<el-descriptions-item span="4">
|
|
||||||
<template slot="label">申请成立报告</template>
|
<template slot="label">申请成立报告</template>
|
||||||
<file-preview :files="viewData.establishReport" complete_result></file-preview>
|
<file-preview :files="viewData.establishReport" complete_result></file-preview>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item span="4">
|
<el-descriptions-item :span="2">
|
||||||
<template slot="label">章程草案</template>
|
<template slot="label">章程草案</template>
|
||||||
<file-preview :files="viewData.rulesFile" complete_result></file-preview>
|
<file-preview :files="viewData.rulesFile" complete_result></file-preview>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item span="4">
|
<el-descriptions-item :span="2">
|
||||||
<template slot="label">经费来源及管理办法</template>
|
<template slot="label">经费来源及管理办法</template>
|
||||||
<file-preview :files="viewData.manageFile" complete_result></file-preview>
|
<file-preview :files="viewData.manageFile" complete_result></file-preview>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item span="4">
|
<el-descriptions-item :span="2">
|
||||||
<template slot="label">年度活动计划</template>
|
<template slot="label">年度活动计划</template>
|
||||||
<file-preview :files="viewData.yearPlanFile" complete_result></file-preview>
|
<file-preview :files="viewData.yearPlanFile" complete_result></file-preview>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item span="2">
|
<el-descriptions-item :span="2">
|
||||||
<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.schoolReplyFile" complete_result></file-preview>
|
|
||||||
</el-descriptions-item>-->
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
<slot></slot>
|
||||||
|
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane name="2" label="成员信息">
|
<el-tab-pane name="2" label="成员信息">
|
||||||
<div class="process-title">成员信息</div>
|
<div class="process-title">成员信息</div>
|
||||||
@@ -83,7 +67,7 @@ const REGISTER_INFO_COMPONENT = {
|
|||||||
: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="roleCode">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<span>{{getRoleName(scope.row.roleCode)}}</span>
|
<span>{{ getRoleName(scope.row.roleCode) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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>
|
||||||
@@ -95,25 +79,34 @@ const REGISTER_INFO_COMPONENT = {
|
|||||||
</el-table>
|
</el-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane name="3" label="审核记录">
|
<el-tab-pane name="3" label="审核记录">
|
||||||
<template v-if="viewData.nodeTasks && viewData.nodeTasks.length > 0">
|
<template v-if="doneTasks.length > 0" v-for="task in doneTasks">
|
||||||
<div v-for="nodeTask in viewData.nodeTasks" :key="nodeTask.id">
|
<div class="mt10">
|
||||||
<div class="process-title">
|
<div class="process-title">{{ task.displayName }}</div>
|
||||||
{{nodeTask.nodeName}}
|
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||||
</div>
|
v-if="task.ext.isFirstTaskNode">
|
||||||
<div>
|
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||||
<el-descriptions :column="3" border v-for="task in nodeTask.tasks" :key="task.id">
|
}}({{task.ext.initiatorAccount}})
|
||||||
<el-descriptions-item label="审核人">{{ task.actualOwnerLoginName + '-' + task.actualOwnerUserName }}</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="审核时间">{{ task.endOn }}</el-descriptions-item>
|
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="审核结果">
|
<el-descriptions-item label="办理结果">
|
||||||
<div v-if="task.extVariable">
|
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||||
<el-tag type="success" size="mini" v-if="task.extVariable.bpmTaskApprovalType === 'PASS'">同意</el-tag>
|
:value="task.ext.submitType"></dict-tag>
|
||||||
<el-tag type="danger" size="mini" v-if="task.extVariable.bpmTaskApprovalType === 'BACK'">退回重新填写</el-tag>
|
</el-descriptions-item>
|
||||||
<el-tag type="danger" size="mini" v-if="task.extVariable.bpmTaskApprovalType === 'REJECT'">建议撤销</el-tag>
|
</el-descriptions>
|
||||||
</div>
|
|
||||||
|
<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-item>
|
||||||
<el-descriptions-item label="审核意见" :span="3">{{ task.extVariable.approvalOpinion}}</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
@@ -123,36 +116,50 @@ const REGISTER_INFO_COMPONENT = {
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
|
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
viewData: {},
|
viewData: {},
|
||||||
activeName: "1"
|
activeName: "1",
|
||||||
|
row: {},
|
||||||
|
doneTasks: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getRoleName(roleCode) {
|
getRoleName(roleCode) {
|
||||||
switch (roleCode) {
|
return CLUB_ROLE_CONSTANT.getRoleName(roleCode)
|
||||||
case "CLUB_PRESIDENT":
|
|
||||||
return "会长"
|
|
||||||
case "CLUB_VICE_PRESIDENT":
|
|
||||||
return "副会长"
|
|
||||||
case "CLUB_SECRETARY":
|
|
||||||
return "秘书长"
|
|
||||||
case "CLUB_VICE_SECRETARY":
|
|
||||||
return "副秘书长"
|
|
||||||
case "CLUB_MEMBER":
|
|
||||||
return "会员"
|
|
||||||
default:
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
onOpen(id) {
|
onOpen(row) {
|
||||||
this.$axios.post("/platform/club/register/common/findOne", { id: id }).then((res) => {
|
this.row = row
|
||||||
|
this.$axios.post("/platform/club/register/clubRegisterApply/info", { id: this.row.id }).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.viewData = res.data
|
this.viewData = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.getDoneTasks()
|
||||||
|
},
|
||||||
|
// 获取已办任务审批记录
|
||||||
|
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)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {}
|
created() {},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
.el-descriptions-item__label {
|
||||||
|
width: 200px;
|
||||||
|
min-width: 200px;
|
||||||
|
max-width: 200px;
|
||||||
|
}
|
||||||
|
.el-tabs__header {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,15 +7,15 @@ const CLUB_ROLE_CONSTANT = {
|
|||||||
CLUB_VICE_SECRETARY: "CLUB_VICE_SECRETARY",
|
CLUB_VICE_SECRETARY: "CLUB_VICE_SECRETARY",
|
||||||
getRoleName(roleCode) {
|
getRoleName(roleCode) {
|
||||||
switch (roleCode) {
|
switch (roleCode) {
|
||||||
case CLUB_ROLE_CONSTANT.CLUB_PRESIDENT:
|
case this.CLUB_PRESIDENT:
|
||||||
return "会长"
|
return "会长"
|
||||||
case CLUB_ROLE_CONSTANT.CLUB_VICE_PRESIDENT:
|
case this.CLUB_VICE_PRESIDENT:
|
||||||
return "副会长"
|
return "副会长"
|
||||||
case CLUB_ROLE_CONSTANT.CLUB_SECRETARY:
|
case this.CLUB_SECRETARY:
|
||||||
return "秘书长"
|
return "秘书长"
|
||||||
case CLUB_ROLE_CONSTANT.CLUB_VICE_SECRETARY:
|
case this.CLUB_VICE_SECRETARY:
|
||||||
return "副秘书长"
|
return "副秘书长"
|
||||||
case CLUB_ROLE_CONSTANT.CLUB_MEMBER:
|
case this.CLUB_MEMBER:
|
||||||
return "会员"
|
return "会员"
|
||||||
default:
|
default:
|
||||||
return ""
|
return ""
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ const clubUserJoin = {
|
|||||||
template:
|
template:
|
||||||
/*language=HTML*/
|
/*language=HTML*/
|
||||||
`
|
`
|
||||||
<div>
|
|
||||||
<div>
|
<div>
|
||||||
<div class="process-title">
|
<div class="process-title">
|
||||||
申请信息
|
申请信息
|
||||||
|
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||||
</div>
|
</div>
|
||||||
<el-descriptions border>
|
<el-descriptions border>
|
||||||
<el-descriptions-item label="姓名">
|
<el-descriptions-item label="姓名">
|
||||||
@@ -54,57 +54,80 @@ const clubUserJoin = {
|
|||||||
<img :src="viewData.avatar" alt="" style="width: 120px;height: 150px" v-if="viewData.avatar">
|
<img :src="viewData.avatar" alt="" style="width: 120px;height: 150px" v-if="viewData.avatar">
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
<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>
|
||||||
|
|
||||||
<div v-for="nodeTask in viewData.nodeTasks" :key="nodeTask.id">
|
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||||
<div class="process-title">
|
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||||
{{nodeTask.nodeName}}
|
}}({{task.taskFormData.loginName}})
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<el-descriptions :column="3" border v-for="task in nodeTask.tasks" :key="task.id">
|
|
||||||
<el-descriptions-item label="审核人">{{ task.actualOwnerLoginName + '-' +
|
|
||||||
task.actualOwnerUserName }}
|
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="审核时间">{{ task.endOn }}</el-descriptions-item>
|
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="审核结果">
|
<el-descriptions-item label="办理结果">
|
||||||
<div v-if="task.extVariable">
|
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||||
<el-tag type="success" size="mini"
|
:value="task.ext.submitType"></dict-tag>
|
||||||
v-if="task.extVariable.bpmTaskApprovalType === 'PASS'">同意
|
|
||||||
</el-tag>
|
|
||||||
<el-tag type="danger" size="mini"
|
|
||||||
v-if="task.extVariable.bpmTaskApprovalType === 'BACK'">退回重新填写
|
|
||||||
</el-tag>
|
|
||||||
<el-tag type="danger" size="mini"
|
|
||||||
v-if="task.extVariable.bpmTaskApprovalType === 'REJECT'">拒绝
|
|
||||||
</el-tag>
|
|
||||||
</div>
|
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="审核意见" :span="3">{{ task.extVariable.approvalOpinion}}
|
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||||
|
task.taskFormData.opinion }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<!-- <el-descriptions-item label="签字" :span="3">-->
|
|
||||||
<!-- <el-image :src="task.extVariable.approvalSignature"-->
|
|
||||||
<!-- v-if="task.extVariable && task.extVariable.approvalSignature"-->
|
|
||||||
<!-- class="signature-image"></el-image>-->
|
|
||||||
<!-- </el-descriptions-item>-->
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</template>
|
||||||
|
<slot></slot>
|
||||||
|
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
|
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
viewData: {},
|
viewData: {},
|
||||||
activeName: "first",
|
activeName: "first",
|
||||||
isScrollNow: "0"
|
row: {},
|
||||||
|
doneTasks: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onOpen(id) {
|
onOpen(row) {
|
||||||
this.$axios.post("/platform/club/join/common/info", { id }).then((res) => {
|
this.row = row
|
||||||
|
this.$axios.post("/platform/club/join/mine/info", { id: row.id }).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.viewData = res.data
|
this.viewData = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.getDoneTasks()
|
||||||
|
},
|
||||||
|
// 获取已办任务审批记录
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ layout("/layouts/platform.html"){
|
|||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<guava ref="guava">
|
<guava ref="guava">
|
||||||
<el-card v-if="isCanApply" shadow="never">
|
<el-card v-if="isCanApply" shadow="never">
|
||||||
<h5 style="text-align: center; color: #0e5996; margin-bottom: 20px">年度优秀协会申报</h5>
|
<div slot="header" class="clearfix">
|
||||||
|
<h3 style="color: rgb(24, 103, 176)">年度优秀协会申报</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-form :model="formData" ref="form" :rules="formRules" label-width="120px" style="padding: 0 30px">
|
<el-form :model="formData" ref="form" :rules="formRules" label-width="120px" style="padding: 0 30px">
|
||||||
<el-row :gutter="30">
|
<el-row :gutter="30">
|
||||||
@@ -102,17 +104,10 @@ layout("/layouts/platform.html"){
|
|||||||
store,
|
store,
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
data() {
|
data() {
|
||||||
let validFiles = (rule, value, callback) => {
|
|
||||||
if (!this.formData.files || this.formData.files.length === 0) {
|
|
||||||
callback(new Error("请上传附件"))
|
|
||||||
} else {
|
|
||||||
callback()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
id: GetQueryString("id"),
|
id: GetQueryString("id"),
|
||||||
formRules: {
|
formRules: {
|
||||||
files: [{ validator: validFiles, trigger: ["blur", "change"] }]
|
files: [{ required: true, message: "必填", trigger: ["change", "blur"] }]
|
||||||
},
|
},
|
||||||
clubList: [],
|
clubList: [],
|
||||||
formData: {
|
formData: {
|
||||||
@@ -129,14 +124,14 @@ layout("/layouts/platform.html"){
|
|||||||
methods: {
|
methods: {
|
||||||
doBack() {
|
doBack() {
|
||||||
if (GetQueryString("id") !== "") {
|
if (GetQueryString("id") !== "") {
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/evaluate/mine")
|
location.href = '/platform/club/evaluate/mine'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doSave() {
|
doSave() {
|
||||||
this.$axios.post("/platform/club/evaluate/apply/doSave", { evaluate: JSON.stringify(this.formData) }).then((res) => {
|
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)
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/evaluate/mine")
|
location.href = '/platform/club/evaluate/mine'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -158,7 +153,7 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$message.success(resp.msg)
|
this.$message.success(resp.msg)
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/evaluate/mine")
|
location.href = '/platform/club/evaluate/mine'
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(resp.msg)
|
this.$message.warning(resp.msg)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,31 +1,21 @@
|
|||||||
const EVALUATE_INFO_COMPONENT = {
|
const EVALUATE_INFO_COMPONENT = {
|
||||||
template: `
|
template: `
|
||||||
<div>
|
<div>
|
||||||
<el-tabs tab-position="top" v-model="activeName">
|
<div class="process-title">
|
||||||
<el-tab-pane name="1" label="基础信息">
|
申请信息
|
||||||
<div class="process-title">基础信息</div>
|
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||||
|
</div>
|
||||||
<el-descriptions :column="3" border>
|
<el-descriptions :column="3" border>
|
||||||
<el-descriptions-item label="协会名称">
|
<el-descriptions-item label="协会名称">{{viewData.clubName}}</el-descriptions-item>
|
||||||
{{viewData.clubName}}
|
<el-descriptions-item label="协会编码">{{viewData.clubCode}}</el-descriptions-item>
|
||||||
</el-descriptions-item>
|
<el-descriptions-item label="协会类型">{{viewData.typeName}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="协会编码">
|
<el-descriptions-item label="成立时间">{{viewData.foundTime}}</el-descriptions-item>
|
||||||
{{viewData.clubCode}}
|
<el-descriptions-item label="申报年份">{{$moment(viewData.applyTime).format('YYYY')}}</el-descriptions-item>
|
||||||
</el-descriptions-item>
|
<el-descriptions-item label="申报时间">{{viewData.applyTime}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="协会类型">
|
|
||||||
{{viewData.typeName}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="成立时间">
|
|
||||||
{{viewData.foundTime}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="申报年份">
|
|
||||||
{{$moment(viewData.applyTime).format('YYYY')}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="申报时间">
|
|
||||||
{{viewData.applyTime}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item span="3">
|
<el-descriptions-item span="3">
|
||||||
<template slot="label">附件</template>
|
<template slot="label">附件</template>
|
||||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
<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-item>
|
||||||
<el-descriptions-item span="3">
|
<el-descriptions-item span="3">
|
||||||
<template slot="label">两年获得的集体荣誉称号</template>
|
<template slot="label">两年获得的集体荣誉称号</template>
|
||||||
@@ -36,50 +26,82 @@ const EVALUATE_INFO_COMPONENT = {
|
|||||||
<div class="text-left" v-html="viewData.yearActivity"></div>
|
<div class="text-left" v-html="viewData.yearActivity"></div>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane name="2" label="审核记录">
|
<template v-for="task in doneTasks">
|
||||||
<template v-if="viewData.nodeTasks && viewData.nodeTasks.length > 0">
|
<div class="mt10">
|
||||||
<div v-for="nodeTask in viewData.nodeTasks" :key="nodeTask.id">
|
<div class="process-title">{{ task.displayName }}</div>
|
||||||
<div class="process-title">
|
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||||
{{nodeTask.nodeName}}
|
v-if="task.ext.isFirstTaskNode">
|
||||||
</div>
|
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||||
<div>
|
}}({{task.ext.initiatorAccount}})
|
||||||
<el-descriptions :column="3" border v-for="task in nodeTask.tasks" :key="task.id">
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="审核人">{{ task.actualOwnerLoginName + '-' + task.actualOwnerUserName }}</el-descriptions-item>
|
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="审核时间">{{ task.endOn }}</el-descriptions-item>
|
<el-descriptions-item label="办理结果">
|
||||||
<el-descriptions-item label="审核结果">
|
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||||
<div v-if="task.extVariable">
|
:value="task.ext.submitType"></dict-tag>
|
||||||
<el-tag type="success" size="mini" v-if="task.extVariable.bpmTaskApprovalType === 'PASS'">同意</el-tag>
|
</el-descriptions-item>
|
||||||
<el-tag type="danger" size="mini" v-if="task.extVariable.bpmTaskApprovalType === 'BACK'">退回重新填写</el-tag>
|
</el-descriptions>
|
||||||
<el-tag type="danger" size="mini" v-if="task.extVariable.bpmTaskApprovalType === 'REJECT'">建议撤销</el-tag>
|
|
||||||
</div>
|
<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-item>
|
||||||
<el-descriptions-item label="审核意见" :span="3">{{ task.extVariable.approvalOpinion}}</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<slot></slot>
|
||||||
<el-empty description="暂无审核记录"></el-empty>
|
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||||
</template>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
`,
|
`,
|
||||||
|
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
viewData: {},
|
viewData: {},
|
||||||
activeName: "1"
|
activeName: "1",
|
||||||
|
row: {},
|
||||||
|
doneTasks: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onOpen(id) {
|
onOpen(row) {
|
||||||
this.$axios.post("/platform/club/evaluate/common/findOne", { id: id }).then((res) => {
|
this.row = row
|
||||||
|
this.$axios.post("/platform/club/evaluate/apply/info", { id: row.id }).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.viewData = res.data
|
this.viewData = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.getDoneTasks()
|
||||||
|
},
|
||||||
|
// 获取已办任务审批记录
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-card class="mt10" shadow="never">
|
<el-card class="mt10" shadow="never">
|
||||||
<table-tool label="申请列表">
|
<table-tool label="申请列表">
|
||||||
<el-button @click="openAdd" size="small" type="primary">评优申请</el-button>
|
|
||||||
</table-tool>
|
</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>
|
||||||
@@ -45,25 +45,21 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="申请时间" prop="applyTime" sortable show-overflow-tooltip></el-table-column>
|
<el-table-column label="申请时间" prop="applyTime" sortable show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column>
|
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="操作" width="300px">
|
<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 slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<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="[10,40,70].includes(row.processInstanceNodeCode)" @click="openEdit(row)" size="mini" type="primary">
|
<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>
|
<el-button v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
|
||||||
<el-button
|
|
||||||
v-if="[20].includes(row.processInstanceNodeCode) && !row.nextTaskIsComplete"
|
|
||||||
size="mini"
|
|
||||||
type="danger"
|
|
||||||
@click="openRevoke(row)"
|
|
||||||
>
|
|
||||||
撤销
|
|
||||||
</el-button>
|
|
||||||
<el-button v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])" @click="deleteDo(row)" size="mini" type="danger">
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-else-if="[10].includes(row.processInstanceNodeCode)" @click="deleteDo(row)" size="mini" type="danger">
|
<el-button v-else-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -98,37 +94,36 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openRevoke(row) {
|
onRevoke(row) {
|
||||||
this.$confirm("您确定要撤回吗?", "提示", {
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$axios.post("/platform/club/evaluate/mine/revokeApply", { id: row.id }).then((resp) => {
|
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
|
||||||
this.$message.success(resp.msg)
|
if (res.code === 0) {
|
||||||
this.doSearch()
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openAdd() {
|
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/evaluate/apply")
|
|
||||||
},
|
|
||||||
openView(row) {
|
openView(row) {
|
||||||
this.$refs.guava.view(() => {
|
this.$refs.guava.view(() => {
|
||||||
this.$refs.evaluateInfoRef.onOpen(row.id)
|
this.$refs.evaluateInfoRef.onOpen(row)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openEdit(row) {
|
onEdit(row) {
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/evaluate/apply?id=" + row.id)
|
location.href = '/platform/club/evaluate/apply?id=' + row.id
|
||||||
},
|
},
|
||||||
async deleteDo(row) {
|
async onDelete(id) {
|
||||||
const confirm = await this.$confirm("此操作将永久删除, 是否继续?", "提示", {
|
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/evaluate/mine/doDelete", { id: row.id })
|
const resp = await this.$axios.post("/platform/club/evaluate/mine/doDelete", { id: id })
|
||||||
this.$message.success(resp.msg)
|
this.$message.success(resp.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,21 +47,17 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="申请时间" prop="applyTime" sortable show-overflow-tooltip></el-table-column>
|
<el-table-column label="申请时间" prop="applyTime" sortable show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column>
|
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="操作" width="300px">
|
<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 slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<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.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" size="mini" type="primary">
|
<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>
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"
|
|
||||||
@click="openRevoke(row.processInstanceTaskId)"
|
|
||||||
size="mini"
|
|
||||||
type="danger"
|
|
||||||
>
|
|
||||||
撤回
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -69,21 +65,26 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<template #public>
|
<template #public>
|
||||||
<evaluate-info ref="examineInfoRef"></evaluate-info>
|
<evaluate-info ref="evaluateInfoRef">
|
||||||
<div v-if="showApprovalForm">
|
<div v-if="showApprovalForm">
|
||||||
<div class="process-title">{{formData.processInstanceNodeName}}</div>
|
<div class="process-title">
|
||||||
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
|
{{formData.taskName}}
|
||||||
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
</div>
|
||||||
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
|
<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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row type="flex" justify="end">
|
<el-row type="flex" justify="end">
|
||||||
<el-button plain @click="$refs.guava.index()">取消</el-button>
|
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||||
<el-button type="danger" @click="doApproval('BACK')">退回</el-button>
|
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||||
<el-button type="danger" @click="doApproval('REJECT')">拒绝</el-button>
|
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||||
<el-button type="primary" @click="doApproval('PASS')">同意</el-button>
|
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
</evaluate-info>
|
||||||
</template>
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
</div>
|
</div>
|
||||||
@@ -112,42 +113,47 @@ layout("/layouts/platform.html"){
|
|||||||
methods: {
|
methods: {
|
||||||
openView(row) {
|
openView(row) {
|
||||||
this.$refs.guava.public(() => {
|
this.$refs.guava.public(() => {
|
||||||
this.$refs.examineInfoRef.onOpen(row.id)
|
this.$refs.evaluateInfoRef.onOpen(row)
|
||||||
this.showApprovalForm = false
|
this.showApprovalForm = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openApproval(row) {
|
onAudit(row) {
|
||||||
this.$refs.guava.public(() => {
|
this.$refs.guava.public(() => {
|
||||||
this.$refs.examineInfoRef.onOpen(row.id)
|
this.formData = {
|
||||||
this.formData = row.approvalParam
|
processTaskId: row.taskId,
|
||||||
|
taskName: row.curTaskName
|
||||||
|
}
|
||||||
this.showApprovalForm = true
|
this.showApprovalForm = true
|
||||||
|
this.$refs.evaluateInfoRef.onOpen(row)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
doApproval(approvalType) {
|
handleTaskAction(val) {
|
||||||
this.formData.bpmTaskApprovalType = approvalType
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
this.$refs.approvalFormRef.validate((valid) => {
|
confirmButtonText: "确定",
|
||||||
if (valid) {
|
cancelButtonText: "取消",
|
||||||
this.$axios
|
type: "warning"
|
||||||
.post(loc() + "/approval", {
|
}).then(() => {
|
||||||
approval: JSON.stringify(this.formData)
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
|
data: JSON.stringify({
|
||||||
|
...this.formData,
|
||||||
|
submitType: val
|
||||||
})
|
})
|
||||||
.then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$refs.guava.index()
|
this.$refs.guava.index()
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openRevoke(taskId) {
|
onRevoke(row) {
|
||||||
this.$confirm("您确定要撤回吗?", "提示", {
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "info"
|
type: "info"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$axios.post(loc() + "/revoke", { taskId }).then((res) => {
|
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
|
|||||||
@@ -4,11 +4,6 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
.left-span-label {
|
|
||||||
color: #236EB4;
|
|
||||||
margin: 10px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
@@ -17,10 +12,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
|
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<el-button icon="el-icon-back" style="font-size: 16px" type="text" @click="doBack"
|
<h3 style="color: rgb(24, 103, 176)">考核登记</h3>
|
||||||
v-if="formData.id">返回
|
|
||||||
</el-button>
|
|
||||||
<h3 style="color: rgb(24, 103, 176);font-family: Microsoft YaHei,serif;">考核登记</h3>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-steps :active="registerTypeName" finish-status="success" simple>
|
<el-steps :active="registerTypeName" finish-status="success" simple>
|
||||||
@@ -32,7 +24,6 @@ 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">
|
style="margin-top: 50px">
|
||||||
<!-- <div class="left-span-label">基础信息</div>-->
|
|
||||||
<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="填报年度"
|
||||||
@@ -66,27 +57,9 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20" type="flex">
|
|
||||||
<!-- <el-col :span="12">-->
|
|
||||||
<!-- <el-form-item prop="foundTime" label="成立时间">-->
|
|
||||||
<!-- <el-input v-model="formData.foundTime" placeholder="请输入成立时间"-->
|
|
||||||
<!-- disabled></el-input>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="12">-->
|
|
||||||
<!-- <el-form-item prop="due" label="会费标准">-->
|
|
||||||
<!-- <el-input v-model="formData.due" placeholder="请输入会费标准"-->
|
|
||||||
<!-- readonly></el-input>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="本年度活动开展情况" prop="yearActivity">
|
<el-form-item label="本年度活动开展情况" prop="yearActivity">
|
||||||
<!-- <el-button @click="formData.yearActivityList.push({})" icon="el-icon-plus" size="mini"-->
|
|
||||||
<!-- style="float: right;margin-bottom: 10px">-->
|
|
||||||
<!-- 添加-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<span style="color: red">说明:非赛事活动无需填写赛事举办单位、获奖情况。</span>
|
<span style="color: red">说明:非赛事活动无需填写赛事举办单位、获奖情况。</span>
|
||||||
<el-table
|
<el-table
|
||||||
:data="formData.yearActivityList"
|
:data="formData.yearActivityList"
|
||||||
@@ -98,13 +71,6 @@ layout("/layouts/platform.html"){
|
|||||||
<el-form-item :prop="'yearActivityList.'+$index+'.activityTime'"
|
<el-form-item :prop="'yearActivityList.'+$index+'.activityTime'"
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
||||||
label-width="0">
|
label-width="0">
|
||||||
<!--<el-date-picker
|
|
||||||
style="width: 100%"
|
|
||||||
placeholder="选择日期"
|
|
||||||
type="date"
|
|
||||||
v-model="row.activityTime"
|
|
||||||
value-format="yyyy-MM-dd">
|
|
||||||
</el-date-picker>-->
|
|
||||||
<el-input clearable maxlength="100" placeholder="请输入活动时间"
|
<el-input clearable maxlength="100" placeholder="请输入活动时间"
|
||||||
v-model="row.activityTime"></el-input>
|
v-model="row.activityTime"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -142,7 +108,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-form-item :prop="'yearActivityList.'+$index+'.joinNum'"
|
<el-form-item :prop="'yearActivityList.'+$index+'.joinNum'"
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
||||||
label-width="0">
|
label-width="0">
|
||||||
<el-input clearable maxlength="100" placeholder="请输入"
|
<el-input clearable maxlength="100" placeholder="请输入参加人数"
|
||||||
v-model="row.joinNum"></el-input>
|
v-model="row.joinNum"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -154,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" slot-scope="scope">
|
<template slot="header" v-slot="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>
|
||||||
@@ -171,10 +137,6 @@ layout("/layouts/platform.html"){
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item class="is-required" label="下一年度活动计划" prop="plans">
|
<el-form-item class="is-required" label="下一年度活动计划" prop="plans">
|
||||||
<!-- <el-button @click="formData.plans.push({})" icon="el-icon-plus" size="mini"-->
|
|
||||||
<!-- style="float: right;margin-bottom: 10px">-->
|
|
||||||
<!-- 添加-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<el-table
|
<el-table
|
||||||
:data="formData.plans"
|
:data="formData.plans"
|
||||||
border
|
border
|
||||||
@@ -185,13 +147,6 @@ layout("/layouts/platform.html"){
|
|||||||
<el-form-item :prop="'plans.'+$index+'.activityTime'"
|
<el-form-item :prop="'plans.'+$index+'.activityTime'"
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
||||||
label-width="0">
|
label-width="0">
|
||||||
<!--<el-date-picker
|
|
||||||
style="width: 100%"
|
|
||||||
placeholder="选择日期"
|
|
||||||
type="date"
|
|
||||||
v-model="row.activityTime"
|
|
||||||
value-format="yyyy-MM-dd">
|
|
||||||
</el-date-picker>-->
|
|
||||||
<el-input clearable maxlength="100" placeholder="请输入活动时间"
|
<el-input clearable maxlength="100" placeholder="请输入活动时间"
|
||||||
v-model="row.activityTime"></el-input>
|
v-model="row.activityTime"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -229,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" slot-scope="scope">
|
<template slot="header" v-slot="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>
|
||||||
@@ -258,25 +213,7 @@ layout("/layouts/platform.html"){
|
|||||||
></file-upload>
|
></file-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- <div class="left-span-label">协会成员变化情况</div>-->
|
|
||||||
<!-- <el-row :gutter="20" type="flex">-->
|
|
||||||
<!-- <el-col :span="24">-->
|
|
||||||
<!-- <el-form-item prop="" label="">-->
|
|
||||||
<!-- <el-table :data="formData.changeUserNum" max-height="300">-->
|
|
||||||
<!-- <el-table-column label="序号" type="index"-->
|
|
||||||
<!-- width="50"></el-table-column>-->
|
|
||||||
<!-- <el-table-column label="人员类型" prop="userState"></el-table-column>-->
|
|
||||||
<!-- <el-table-column label="年初人员" prop="yearFirstNum"></el-table-column>-->
|
|
||||||
<!-- <el-table-column label="年度增加" prop="yearAddNum"></el-table-column>-->
|
|
||||||
<!-- <el-table-column label="年度减少" prop="yearEditNum"></el-table-column>-->
|
|
||||||
<!-- <el-table-column label="年末人数" prop="thisYearNum"></el-table-column>-->
|
|
||||||
<!-- </el-table>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- </el-row>-->
|
|
||||||
</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"
|
||||||
@@ -324,12 +261,10 @@ layout("/layouts/platform.html"){
|
|||||||
value="年度结余"></el-option>
|
value="年度结余"></el-option>
|
||||||
<el-option key="社会赞助" label="社会赞助" value="社会赞助"></el-option>
|
<el-option key="社会赞助" label="社会赞助" value="社会赞助"></el-option>
|
||||||
<el-option key="支出" label="支出" value="支出"></el-option>
|
<el-option key="支出" label="支出" value="支出"></el-option>
|
||||||
<!-- <el-option key="其它" label="其它" value="其它"></el-option>-->
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="金额(元)" prop="money" width="120">
|
<el-table-column label="金额(元)" prop="money" width="120">
|
||||||
<template slot-scope="{row,$index}">
|
<template slot-scope="{row,$index}">
|
||||||
<el-form-item label-width="0">
|
<el-form-item label-width="0">
|
||||||
@@ -337,47 +272,6 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<!-- <el-table-column label="年初余额(元)" prop="qcMoney" width="120">-->
|
|
||||||
<!-- <template slot-scope="{row,$index}">-->
|
|
||||||
<!-- <el-form-item label-width="0">-->
|
|
||||||
<!-- <el-input :disabled="$index!=0" @input="inputQcMoney(row)"-->
|
|
||||||
<!-- type="number" v-model="row.qcMoney"></el-input>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column label="收入(元)" prop="income" width="120">-->
|
|
||||||
<!-- <template slot-scope="{row,$index}">-->
|
|
||||||
<!-- <el-form-item label-width="0">-->
|
|
||||||
<!-- <el-input-->
|
|
||||||
<!-- :disabled="!['会费收入','校工会拨款','社会赞助','其它'].includes(row.incomeType)"-->
|
|
||||||
<!-- @input="inputIncome(row)"-->
|
|
||||||
<!-- maxlength="15"-->
|
|
||||||
<!-- type="number"-->
|
|
||||||
<!-- v-model="row.income"></el-input>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column label="支出(元)" prop="expend" width="120">-->
|
|
||||||
<!-- <template slot-scope="{row,$index}">-->
|
|
||||||
<!-- <el-form-item label-width="0">-->
|
|
||||||
<!-- <el-input :disabled="!['支出','其它'].includes(row.incomeType)||$index===0"-->
|
|
||||||
<!-- @input="inputExpend(row)"-->
|
|
||||||
<!-- maxlength="15"-->
|
|
||||||
<!-- type="number"-->
|
|
||||||
<!-- v-model="row.expend"></el-input>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column label="年度结余(元)" prop="qmMoney" width="120">-->
|
|
||||||
<!-- <template slot-scope="{row}">-->
|
|
||||||
<!-- <el-form-item label-width="0">-->
|
|
||||||
<!-- <el-input disabled maxlength="15"-->
|
|
||||||
<!-- type="number"-->
|
|
||||||
<!-- v-model="row.qmMoney"></el-input>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<el-table-column label="备注" prop="notes">
|
<el-table-column label="备注" prop="notes">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-form-item label-width="0">
|
<el-form-item label-width="0">
|
||||||
@@ -393,7 +287,6 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
<template slot-scope="{row,$index}">
|
<template slot-scope="{row,$index}">
|
||||||
<el-form-item label-width="0">
|
<el-form-item label-width="0">
|
||||||
<!-- :disabled="[0,1,2].includes($index)"-->
|
|
||||||
<el-button
|
<el-button
|
||||||
@click="deleteIncomeDetailed(row,$index)"
|
@click="deleteIncomeDetailed(row,$index)"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@@ -405,67 +298,6 @@ layout("/layouts/platform.html"){
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="mt10">-->
|
|
||||||
<!-- <el-table :data="cwsz.incomeCensus" max-height="300">-->
|
|
||||||
<!-- <el-table-column label="去年年度结余(元)" prop="lasYearSurplus">-->
|
|
||||||
<!-- <template slot-scope="{row}">-->
|
|
||||||
<!-- <template v-if="lasYearSurplus">-->
|
|
||||||
<!-- {{row.lasYearSurplus=parseFloat(lasYearSurplus.toFixed(2))}}-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- <template v-else>-->
|
|
||||||
<!-- <template v-if="row.lasYearSurplus">-->
|
|
||||||
<!-- {{row.lasYearSurplus=parseFloat(row.lasYearSurplus.toFixed(2))}}-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column label="会费收入(元)" prop="income">-->
|
|
||||||
<!-- <template slot-scope="{row}">-->
|
|
||||||
<!-- <template v-if="income">-->
|
|
||||||
<!-- {{row.income=parseFloat(income.toFixed(2))}}-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- <template v-else>-->
|
|
||||||
<!-- {{row.income=parseFloat(row.income.toFixed(2))}}-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column label="校工会拨款(元)" prop="allocate">-->
|
|
||||||
<!-- <template slot-scope="{row}">-->
|
|
||||||
<!-- <template v-if="allocate">-->
|
|
||||||
<!-- {{row.allocate=parseFloat(allocate.toFixed(2))}}-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- <template v-else>-->
|
|
||||||
<!-- {{row.allocate=parseFloat(row.allocate.toFixed(2))}}-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column label="社会赞助(元)" prop="support">-->
|
|
||||||
<!-- <template slot-scope="{row}">-->
|
|
||||||
<!-- <template v-if="row.support">-->
|
|
||||||
<!-- {{parseFloat(row.support.toFixed(2))}}-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column label="年度总支出(元)" prop="totalExpend">-->
|
|
||||||
<!-- <template slot-scope="{row}">-->
|
|
||||||
<!-- <template v-if="row.totalExpend">-->
|
|
||||||
<!-- {{parseFloat(row.totalExpend.toFixed(2))}}-->
|
|
||||||
<!-- </template>-->
|
|
||||||
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column label="年度结余(元)" prop="surplus">-->
|
|
||||||
<!-- <template slot-scope="{row}">-->
|
|
||||||
<!-- <template v-if="row.income+row.support+row.allocate+row.lasYearSurplus-row.totalExpend">-->
|
|
||||||
<!-- {{row.surplus=row.income+row.support+row.allocate+row.lasYearSurplus-row.totalExpend}}-->
|
|
||||||
<!-- </template>-->
|
|
||||||
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- </el-table>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-form v-show="registerTypeName===2" ref="addForm3" :rules="rules"
|
<el-form v-show="registerTypeName===2" ref="addForm3" :rules="rules"
|
||||||
@@ -502,15 +334,11 @@ layout("/layouts/platform.html"){
|
|||||||
v-show="registerTypeName===2">提交
|
v-show="registerTypeName===2">提交
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- <el-row v-else class="mt10" justify="center" type="flex">-->
|
|
||||||
<!-- <el-button type="info">{{formData.clubName}}当前年度已提交考核登记</el-button>-->
|
|
||||||
<!-- </el-row>-->
|
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</guava>
|
</guava>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
@@ -557,7 +385,7 @@ layout("/layouts/platform.html"){
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/examine/mine")
|
location.href = '/platform/club/examine/mine'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -575,7 +403,7 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$message.success(resp.msg)
|
this.$message.success(resp.msg)
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/examine/mine")
|
location.href = '/platform/club/examine/mine'
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(resp.msg)
|
this.$message.warning(resp.msg)
|
||||||
}
|
}
|
||||||
@@ -752,7 +580,6 @@ layout("/layouts/platform.html"){
|
|||||||
this.$set(this.formData, "foundTime", this.$moment().format("YYYY-MM-DD"))
|
this.$set(this.formData, "foundTime", this.$moment().format("YYYY-MM-DD"))
|
||||||
}
|
}
|
||||||
this.$set(this.formData, "clubName", club?.clubName)
|
this.$set(this.formData, "clubName", club?.clubName)
|
||||||
// await this.getClubUserNum(val)
|
|
||||||
await this.getJgUser(val)
|
await this.getJgUser(val)
|
||||||
await this.getCount()
|
await this.getCount()
|
||||||
|
|
||||||
@@ -789,26 +616,15 @@ layout("/layouts/platform.html"){
|
|||||||
this.clubOptions = await this.getClubsByRole()
|
this.clubOptions = await this.getClubsByRole()
|
||||||
|
|
||||||
const { data } = await this.$axios.post("/platform/club/examine/apply/info", { id: id })
|
const { data } = await this.$axios.post("/platform/club/examine/apply/info", { id: id })
|
||||||
|
|
||||||
// if (!data.register.yearActivityList) {
|
|
||||||
// data.register.yearActivityList = [{}]
|
|
||||||
// }
|
|
||||||
// if (!data.register.plans) {
|
|
||||||
// data.register.plans = [{}]
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (!data.yearActivityList) {
|
if (!data.yearActivityList) {
|
||||||
data.yearActivityList = [{}]
|
data.yearActivityList = [{}]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data.plans) {
|
if (!data.plans) {
|
||||||
data.plans = [{}]
|
data.plans = [{}]
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data.year){
|
if(data.year){
|
||||||
data.year = data.year.toString()
|
data.year = data.year.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.formData = data
|
this.formData = data
|
||||||
this.$set(this.cwsz, "incomeCensus", data.incomeCensus)
|
this.$set(this.cwsz, "incomeCensus", data.incomeCensus)
|
||||||
this.$set(this.cwsz, "incomeDetailed", data.detailedList)
|
this.$set(this.cwsz, "incomeDetailed", data.detailedList)
|
||||||
@@ -823,14 +639,12 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
this.isRegister = resp.data > 0
|
this.isRegister = resp.data > 0
|
||||||
},
|
},
|
||||||
|
|
||||||
async yearChange() {
|
async yearChange() {
|
||||||
await this.getCount()
|
await this.getCount()
|
||||||
if (this.isRegister) {
|
if (this.isRegister) {
|
||||||
this.$message.warning(this.formData.year + "年度已经登记,请勿重复登记")
|
this.$message.warning(this.formData.year + "年度已经登记,请勿重复登记")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
if (this.id) {
|
if (this.id) {
|
||||||
|
|||||||
@@ -3,17 +3,14 @@ const EXAMINE_INFO_COMPONENT = {
|
|||||||
<div>
|
<div>
|
||||||
<el-tabs tab-position="top" v-model="activeName">
|
<el-tabs tab-position="top" v-model="activeName">
|
||||||
<el-tab-pane name="1" label="基础信息">
|
<el-tab-pane name="1" label="基础信息">
|
||||||
<div class="process-title">基础信息</div>
|
<div class="process-title">
|
||||||
|
申请信息
|
||||||
|
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||||
|
</div>
|
||||||
<el-descriptions v-if="viewData" :column="3" border class="table_fixed">
|
<el-descriptions v-if="viewData" :column="3" border class="table_fixed">
|
||||||
<el-descriptions-item label="协会名称">
|
<el-descriptions-item label="协会名称">{{ viewData.clubName }}</el-descriptions-item>
|
||||||
{{ viewData.clubName }}
|
<el-descriptions-item label="成立时间">{{ viewData.foundTime }} </el-descriptions-item>
|
||||||
</el-descriptions-item>
|
<el-descriptions-item label="会费标准">{{ viewData.due }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="成立时间">
|
|
||||||
{{ viewData.foundTime }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="会费标准">
|
|
||||||
{{ viewData.due }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item span="3">
|
<el-descriptions-item span="3">
|
||||||
<template slot="label">工作总结</template>
|
<template slot="label">工作总结</template>
|
||||||
<file-preview :files="viewData.summaryFiles" complete_result></file-preview>
|
<file-preview :files="viewData.summaryFiles" complete_result></file-preview>
|
||||||
@@ -28,6 +25,9 @@ const EXAMINE_INFO_COMPONENT = {
|
|||||||
<!-- <el-table-column label="年度减少" prop="yearEditNum"></el-table-column>-->
|
<!-- <el-table-column label="年度减少" prop="yearEditNum"></el-table-column>-->
|
||||||
<!-- <el-table-column label="年末人数" prop="thisYearNum"></el-table-column>-->
|
<!-- <el-table-column label="年末人数" prop="thisYearNum"></el-table-column>-->
|
||||||
<!-- </el-table>-->
|
<!-- </el-table>-->
|
||||||
|
|
||||||
|
<slot></slot>
|
||||||
|
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane name="2" label="本年度活动开展情况">
|
<el-tab-pane name="2" label="本年度活动开展情况">
|
||||||
<div class="process-title">本年度活动开展情况</div>
|
<div class="process-title">本年度活动开展情况</div>
|
||||||
@@ -86,25 +86,34 @@ const EXAMINE_INFO_COMPONENT = {
|
|||||||
</el-table>
|
</el-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane name="5" label="审核记录">
|
<el-tab-pane name="5" label="审核记录">
|
||||||
<template v-if="viewData.nodeTasks && viewData.nodeTasks.length > 0">
|
<template v-if="doneTasks.length > 0" v-for="task in doneTasks">
|
||||||
<div v-for="nodeTask in viewData.nodeTasks" :key="nodeTask.id">
|
<div class="mt10">
|
||||||
<div class="process-title">
|
<div class="process-title">{{ task.displayName }}</div>
|
||||||
{{nodeTask.nodeName}}
|
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||||
</div>
|
v-if="task.ext.isFirstTaskNode">
|
||||||
<div>
|
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||||
<el-descriptions :column="3" border v-for="task in nodeTask.tasks" :key="task.id">
|
}}({{task.ext.initiatorAccount}})
|
||||||
<el-descriptions-item label="审核人">{{ task.actualOwnerLoginName + '-' + task.actualOwnerUserName }}</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="审核时间">{{ task.endOn }}</el-descriptions-item>
|
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="审核结果">
|
<el-descriptions-item label="办理结果">
|
||||||
<div v-if="task.extVariable">
|
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||||
<el-tag type="success" size="mini" v-if="task.extVariable.bpmTaskApprovalType === 'PASS'">同意</el-tag>
|
:value="task.ext.submitType"></dict-tag>
|
||||||
<el-tag type="danger" size="mini" v-if="task.extVariable.bpmTaskApprovalType === 'BACK'">退回重新填写</el-tag>
|
</el-descriptions-item>
|
||||||
<el-tag type="danger" size="mini" v-if="task.extVariable.bpmTaskApprovalType === 'REJECT'">建议撤销</el-tag>
|
</el-descriptions>
|
||||||
</div>
|
|
||||||
|
<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-item>
|
||||||
<el-descriptions-item label="审核意见" :span="3">{{ task.extVariable.approvalOpinion}}</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
@@ -114,20 +123,25 @@ const EXAMINE_INFO_COMPONENT = {
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
|
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
viewData: {},
|
viewData: {},
|
||||||
activeName: "1"
|
activeName: "1",
|
||||||
|
row: {},
|
||||||
|
doneTasks: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async onOpen(id) {
|
async onOpen(row) {
|
||||||
const resp = await this.$axios.post("/platform/club/examine/common/findOne", { id: id })
|
this.row = row
|
||||||
|
const resp = await this.$axios.post("/platform/club/examine/common/findOne", { id: row.id })
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.viewData = resp.data
|
this.viewData = resp.data
|
||||||
await this.getClubUserNum(resp.data.clubId)
|
await this.getClubUserNum(resp.data.clubId)
|
||||||
await this.getJgUser(resp.data.clubId)
|
await this.getJgUser(resp.data.clubId)
|
||||||
}
|
}
|
||||||
|
this.getDoneTasks()
|
||||||
},
|
},
|
||||||
async getClubUserNum(clubId) {
|
async getClubUserNum(clubId) {
|
||||||
const resp = await this.$axios.post("/platform/club/examine/apply/getClubUserNum", {
|
const resp = await this.$axios.post("/platform/club/examine/apply/getClubUserNum", {
|
||||||
@@ -140,6 +154,28 @@ const EXAMINE_INFO_COMPONENT = {
|
|||||||
clubId: clubId
|
clubId: clubId
|
||||||
})
|
})
|
||||||
this.$set(this.viewData, "jgUser", respUser.data)
|
this.$set(this.viewData, "jgUser", respUser.data)
|
||||||
|
},
|
||||||
|
// 获取已办任务审批记录
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
layout("/layouts/platform.html"){
|
layout("/layouts/platform.html"){
|
||||||
#-->
|
#-->
|
||||||
<style>
|
<style>
|
||||||
.left-span-label {
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
@@ -19,6 +17,7 @@ layout("/layouts/platform.html"){
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="pageForm.year"
|
v-model="pageForm.year"
|
||||||
value-format="yyyy"
|
value-format="yyyy"
|
||||||
|
@change="doSearch"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="协会名称:">
|
<search-item label="协会名称:">
|
||||||
@@ -30,11 +29,9 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="mt10" shadow="never">
|
<el-card class="mt10" shadow="never">
|
||||||
<table-tool label="申请列表">
|
<table-tool label="申请列表"></table-tool>
|
||||||
<el-button @click="openAdd" size="small" type="primary">年审申请</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="80"></el-table-column>
|
||||||
<el-table-column label="年度" prop="year" sortable show-overflow-tooltip></el-table-column>
|
<el-table-column label="年度" prop="year" 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="clubName" sortable show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="成立时间" prop="foundTime" sortable show-overflow-tooltip>
|
<el-table-column label="成立时间" prop="foundTime" sortable show-overflow-tooltip>
|
||||||
@@ -43,25 +40,21 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="申请时间" prop="registerDate" sortable show-overflow-tooltip></el-table-column>
|
<el-table-column label="申请时间" prop="registerDate" sortable show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column>
|
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="操作" width="300px">
|
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
|
||||||
<template slot-scope="{row}">
|
<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="openView(row)" size="mini" type="primary">查看</el-button>
|
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||||
<el-button v-if="[10,40,70].includes(row.processInstanceNodeCode)" @click="openEdit(row)" size="mini" type="primary">
|
<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>
|
<el-button v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
|
||||||
<el-button
|
|
||||||
v-if="[20].includes(row.processInstanceNodeCode) && !row.nextTaskIsComplete"
|
|
||||||
size="mini"
|
|
||||||
type="danger"
|
|
||||||
@click="openRevoke(row)"
|
|
||||||
>
|
|
||||||
撤销
|
|
||||||
</el-button>
|
|
||||||
<el-button v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])" @click="deleteDo(row)" size="mini" type="danger">
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-else-if="[10].includes(row.processInstanceNodeCode)" @click="deleteDo(row)" size="mini" type="danger">
|
<el-button v-else-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<!--<el-button
|
<!--<el-button
|
||||||
@@ -104,37 +97,36 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openRevoke(row) {
|
onRevoke(row) {
|
||||||
this.$confirm("您确定要撤回吗?", "提示", {
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$axios.post("/platform/club/examine/mine/revokeApply", { id: row.id }).then((resp) => {
|
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
|
||||||
this.$message.success(resp.msg)
|
if (res.code === 0) {
|
||||||
this.doSearch()
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openAdd() {
|
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/examine/apply")
|
|
||||||
},
|
|
||||||
openView(row) {
|
openView(row) {
|
||||||
this.$refs.guava.view(() => {
|
this.$refs.guava.view(() => {
|
||||||
this.$refs.examineInfoRef.onOpen(row.id)
|
this.$refs.examineInfoRef.onOpen(row)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openEdit(row) {
|
onEdit(row) {
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/examine/apply?id=" + row.id)
|
location.href = '/platform/club/examine/apply?id=' + row.id
|
||||||
},
|
},
|
||||||
async deleteDo(row) {
|
async onDelete(id) {
|
||||||
const confirm = await this.$confirm("此操作将永久删除, 是否继续?", "提示", {
|
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/examine/mine/doDelete", { id: row.id })
|
const resp = await this.$axios.post("/platform/club/examine/mine/doDelete", { id: id })
|
||||||
this.$message.success(resp.msg)
|
this.$message.success(resp.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
layout("/layouts/platform.html"){
|
layout("/layouts/platform.html"){
|
||||||
#-->
|
#-->
|
||||||
<style>
|
<style>
|
||||||
.left-span-label {
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
@@ -18,6 +16,7 @@ layout("/layouts/platform.html"){
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="pageForm.year"
|
v-model="pageForm.year"
|
||||||
value-format="yyyy"
|
value-format="yyyy"
|
||||||
|
@change="doSearch"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="协会名称:">
|
<search-item label="协会名称:">
|
||||||
@@ -45,21 +44,17 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="申请时间" prop="registerDate" sortable show-overflow-tooltip></el-table-column>
|
<el-table-column label="申请时间" prop="registerDate" sortable show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column>
|
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="操作" width="300px">
|
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
|
||||||
<template slot-scope="{row}">
|
<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="openView(row)" size="mini" type="primary">查看</el-button>
|
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||||
<el-button v-if="row.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" size="mini" type="primary">
|
<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>
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"
|
|
||||||
@click="openRevoke(row.processInstanceTaskId)"
|
|
||||||
size="mini"
|
|
||||||
type="danger"
|
|
||||||
>
|
|
||||||
撤回
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -67,21 +62,26 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<template #public>
|
<template #public>
|
||||||
<examine-info ref="examineInfoRef"></examine-info>
|
<examine-info ref="examineInfoRef">
|
||||||
<div v-if="showApprovalForm">
|
<div v-if="showApprovalForm">
|
||||||
<div class="process-title">{{formData.processInstanceNodeName}}</div>
|
<div class="process-title">
|
||||||
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
|
{{formData.taskName}}
|
||||||
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
</div>
|
||||||
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
|
<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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row type="flex" justify="end">
|
<el-row type="flex" justify="end">
|
||||||
<el-button plain @click="$refs.guava.index()">取消</el-button>
|
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||||
<el-button type="danger" @click="doApproval('BACK')">退回</el-button>
|
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||||
<el-button type="danger" @click="doApproval('REJECT')">拒绝</el-button>
|
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||||
<el-button type="primary" @click="doApproval('PASS')">同意</el-button>
|
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
</examine-info>
|
||||||
</template>
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
</div>
|
</div>
|
||||||
@@ -109,42 +109,47 @@ layout("/layouts/platform.html"){
|
|||||||
methods: {
|
methods: {
|
||||||
openView(row) {
|
openView(row) {
|
||||||
this.$refs.guava.public(() => {
|
this.$refs.guava.public(() => {
|
||||||
this.$refs.examineInfoRef.onOpen(row.id)
|
this.$refs.examineInfoRef.onOpen(row)
|
||||||
this.showApprovalForm = false
|
this.showApprovalForm = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openApproval(row) {
|
onAudit(row) {
|
||||||
this.$refs.guava.public(() => {
|
this.$refs.guava.public(() => {
|
||||||
this.$refs.examineInfoRef.onOpen(row.id)
|
this.formData = {
|
||||||
this.formData = row.approvalParam
|
processTaskId: row.taskId,
|
||||||
|
taskName: row.curTaskName
|
||||||
|
}
|
||||||
this.showApprovalForm = true
|
this.showApprovalForm = true
|
||||||
|
this.$refs.examineInfoRef.onOpen(row)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
doApproval(approvalType) {
|
handleTaskAction(val) {
|
||||||
this.formData.bpmTaskApprovalType = approvalType
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
this.$refs.approvalFormRef.validate((valid) => {
|
confirmButtonText: "确定",
|
||||||
if (valid) {
|
cancelButtonText: "取消",
|
||||||
this.$axios
|
type: "warning"
|
||||||
.post(loc() + "/approval", {
|
}).then(() => {
|
||||||
approval: JSON.stringify(this.formData)
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
|
data: JSON.stringify({
|
||||||
|
...this.formData,
|
||||||
|
submitType: val
|
||||||
})
|
})
|
||||||
.then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$refs.guava.index()
|
this.$refs.guava.index()
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openRevoke(taskId) {
|
onRevoke(row) {
|
||||||
this.$confirm("您确定要撤回吗?", "提示", {
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "info"
|
type: "info"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$axios.post(loc() + "/revoke", { taskId }).then((res) => {
|
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
|
|||||||
@@ -35,23 +35,6 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
|
|||||||
<el-table-column label="电话" prop="mobile" show-overflow-tooltip></el-table-column>
|
<el-table-column label="电话" prop="mobile" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="所属单位" prop="unitName" sortable show-overflow-tooltip></el-table-column>
|
<el-table-column label="所属单位" prop="unitName" sortable show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="身份" prop="roleName" show-overflow-tooltip></el-table-column>
|
<el-table-column label="身份" prop="roleName" show-overflow-tooltip></el-table-column>
|
||||||
<!-- <el-table-column label="变更状态" prop="state"show-overflow-tooltip sortable>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span v-if="scope.row.state==1">待校工会审核</span>
|
|
||||||
<span v-else-if="scope.row.state==2">校工会审核拒绝</span>
|
|
||||||
<span v-else-if="scope.row.state==3">审核通过</span>
|
|
||||||
<span v-else-if="scope.row.state === '' || scope.row.state === undefined">暂无变更</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="申请状态" show-overflow-tooltip sortable>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag v-if="scope.row.status==1" size="mini" type="primary">待协会审核</el-tag>
|
|
||||||
<el-tag v-if="scope.row.status==2" size="mini" type="danger">协会拒绝</el-tag>
|
|
||||||
<el-tag v-if="scope.row.status==3" size="mini" type="primary">待校工会审核</el-tag>
|
|
||||||
<el-tag v-if="scope.row.status==4" size="mini" type="danger">校工会拒绝</el-tag>
|
|
||||||
<el-tag v-if="scope.row.status==5" size="mini" type="success">审核通过</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>-->
|
|
||||||
<el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-dropdown>
|
<el-dropdown>
|
||||||
@@ -60,13 +43,6 @@ 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">
|
||||||
<!-- <el-dropdown-item @click.native="updatePayed(row)" class="text-primary">-->
|
|
||||||
<!-- {{row.payed === true ? '设置为未缴费' : '设置为缴费'}}-->
|
|
||||||
<!-- </el-dropdown-item>-->
|
|
||||||
<!-- <el-dropdown-item @click.native="updateGive(row)" class="text-primary">-->
|
|
||||||
<!-- {{row.giveMoney === true ? '设置为不拨付' : '设置为拨付'}}-->
|
|
||||||
<!-- </el-dropdown-item>-->
|
|
||||||
<!--v-if="row.changeRoleCode === '' || row.changeRoleCode === undefined || row.state !== 1"-->
|
|
||||||
<template>
|
<template>
|
||||||
<el-dropdown-item v-if="row.roleCode !== 'CLUB_PRESIDENT'" @click.native="updateRoleCode(row, 'CLUB_PRESIDENT', '会长')" class="text-primary">
|
<el-dropdown-item v-if="row.roleCode !== 'CLUB_PRESIDENT'" @click.native="updateRoleCode(row, 'CLUB_PRESIDENT', '会长')" class="text-primary">
|
||||||
设置会长
|
设置会长
|
||||||
@@ -87,15 +63,10 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
|
|||||||
设置会员
|
设置会员
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</template>
|
</template>
|
||||||
<!-- <template v-else>
|
|
||||||
<el-dropdown-item @click.native="rollbackChange(row)" 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>
|
||||||
<el-dropdown-item @click.native="exitClub(row)">退会</el-dropdown-item>
|
<!--<el-dropdown-item @click.native="exitClub(row)">退会</el-dropdown-item>-->
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</template>
|
</template>
|
||||||
@@ -148,7 +119,6 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
|
|||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:visible.sync="importDialog"
|
:visible.sync="importDialog"
|
||||||
@@ -159,7 +129,6 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
|
|||||||
post_url="/platform/club/infoManage/manage/doImportUser" is_show_radio
|
post_url="/platform/club/infoManage/manage/doImportUser" is_show_radio
|
||||||
@flush="successImport" :business_id="parentNode.currentTreeData.id"
|
@flush="successImport" :business_id="parentNode.currentTreeData.id"
|
||||||
></file-import>
|
></file-import>
|
||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
@@ -296,22 +265,6 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async rollbackChange(row) {
|
|
||||||
const confirm = await this.$confirm("确定要撤回变更吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
})
|
|
||||||
if (confirm === "confirm") {
|
|
||||||
const resp = await this.$axios.post("/platform/club/infoManage/manage/rollbackChange", { id: row.id })
|
|
||||||
if (resp.code === 0) {
|
|
||||||
this.$message.success(resp.msg)
|
|
||||||
await this.pageData()
|
|
||||||
} else {
|
|
||||||
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 + "删除吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
|
|||||||
@@ -91,7 +91,9 @@ layout("/layouts/platform.html"){
|
|||||||
treeNodeClick(data, node) {
|
treeNodeClick(data, node) {
|
||||||
this.currentTreeData = data
|
this.currentTreeData = data
|
||||||
this.currentTreeNode = node
|
this.currentTreeNode = node
|
||||||
|
this.$nextTick(() => {
|
||||||
this.$refs.clubInfo.pageData()
|
this.$refs.clubInfo.pageData()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getTreeData() {
|
getTreeData() {
|
||||||
this.$axios.post("/platform/club/infoManage/manage/getClubTreeData").then((res) => {
|
this.$axios.post("/platform/club/infoManage/manage/getClubTreeData").then((res) => {
|
||||||
|
|||||||
@@ -27,8 +27,6 @@ const SCHOOL_CLUB_MANAGE_TEMPLATE = {
|
|||||||
<el-table-column label="协会名称" prop="clubName" sortable></el-table-column>
|
<el-table-column label="协会名称" prop="clubName" sortable></el-table-column>
|
||||||
<el-table-column label="会长" prop="clubLeader" show-overflow-tooltip></el-table-column>
|
<el-table-column label="会长" prop="clubLeader" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="秘书长" prop="clubSecretary" show-overflow-tooltip></el-table-column>
|
<el-table-column label="秘书长" prop="clubSecretary" show-overflow-tooltip></el-table-column>
|
||||||
<!-- <el-table-column label="报名联系人" show-overflow-tooltip prop="concatPersonName"></el-table-column> -->
|
|
||||||
<!-- <el-table-column label="联系人电话" show-overflow-tooltip prop="concatPersonMobile"></el-table-column> -->
|
|
||||||
<el-table-column label="当前人数" show-overflow-tooltip prop="currentNum"></el-table-column>
|
<el-table-column label="当前人数" show-overflow-tooltip prop="currentNum"></el-table-column>
|
||||||
<el-table-column label="成立时间" show-overflow-tooltip prop="foundTime"></el-table-column>
|
<el-table-column label="成立时间" show-overflow-tooltip prop="foundTime"></el-table-column>
|
||||||
<el-table-column label="状态" show-overflow-tooltip prop="dismiss">
|
<el-table-column label="状态" show-overflow-tooltip prop="dismiss">
|
||||||
@@ -95,7 +93,7 @@ const SCHOOL_CLUB_MANAGE_TEMPLATE = {
|
|||||||
const { id } = row
|
const { id } = row
|
||||||
this.parentNode.clubId = id
|
this.parentNode.clubId = id
|
||||||
this.parentNode.$refs.guava.view(() => {
|
this.parentNode.$refs.guava.view(() => {
|
||||||
this.parentNode.$refs.registerInfoRef.onOpen(id)
|
this.parentNode.$refs.registerInfoRef.onOpen(row)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openEdit(row) {
|
openEdit(row) {
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ layout("/layouts/platform.html"){
|
|||||||
#-->
|
#-->
|
||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<el-card shadow="never" class="form-box" style="width: 1000px">
|
<el-card shadow="never">
|
||||||
<h3 style="color: var(--color-primary)" slot="header">文体协会会员申请</h3>
|
<snaker-start slot="header" label="文体协会会员申请" define_key="XHRH"></snaker-start>
|
||||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0">
|
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":" class="flow-task-form">
|
||||||
<el-descriptions border class="descriptions-form">
|
<el-descriptions border class="descriptions-form">
|
||||||
<el-descriptions-item label="协会" :span="3">
|
<el-descriptions-item label="协会" :span="3">
|
||||||
<el-form-item prop="clubId" label="协会">
|
<el-form-item prop="clubId" label="协会">
|
||||||
<el-select v-model="formData.clubId" filterable @change="checkApplyClub">
|
<el-select v-model="formData.clubId" filterable @change="checkApplyClub" placeholder="请选择协会">
|
||||||
<el-option v-for="item in clubOptions" :label="item.clubName" :value="item.id" :key="item.id"></el-option>
|
<el-option v-for="item in clubOptions" :label="item.clubName" :value="item.id" :key="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -160,11 +160,10 @@ layout("/layouts/platform.html"){
|
|||||||
this.$message.warning("请先阅读并同意协议")
|
this.$message.warning("请先阅读并同意协议")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$confirm("您确定要提交申请吗?", "提示", { type: "warning" }).then(() => {
|
this.$confirm("您确定要提交申请吗?", "提示", { type: "warning" }).then(() => {
|
||||||
this.$axios.post("/platform/club/join/apply/submit", this.formData).then((res) => {
|
this.$axios.post("/platform/club/join/apply/submit", this.formData).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/join/mine")
|
location.href = '/platform/club/join/mine'
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -11,8 +11,9 @@ layout("/layouts/platform.html"){
|
|||||||
v-model="pageForm.year"
|
v-model="pageForm.year"
|
||||||
type="year"
|
type="year"
|
||||||
value-format="yyyy"
|
value-format="yyyy"
|
||||||
placeholder="选择年度"
|
placeholder="请选择年度"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@change="doSearch"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="姓名:">
|
<search-item label="姓名:">
|
||||||
@@ -56,21 +57,17 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="applyDate" label="申请时间" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="applyDate" label="申请时间" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column>
|
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="操作" width="300px">
|
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
|
||||||
<template slot-scope="{row}">
|
<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="openView(row)" size="mini" type="primary">查看</el-button>
|
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||||
<el-button v-if="row.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" size="mini" type="primary">
|
<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>
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"
|
|
||||||
@click="openRevoke(row.processInstanceTaskId)"
|
|
||||||
size="mini"
|
|
||||||
type="danger"
|
|
||||||
>
|
|
||||||
撤回
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -78,31 +75,32 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<template #public>
|
<template #public>
|
||||||
<info ref="infoRef"></info>
|
<info ref="infoRef">
|
||||||
<div v-if="showApprovalForm">
|
<div v-if="showApprovalForm">
|
||||||
<div class="process-title">{{formData.processInstanceNodeName}}</div>
|
<div class="process-title">
|
||||||
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
|
{{formData.taskName}}
|
||||||
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
</div>
|
||||||
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
|
<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-item>
|
||||||
<!-- <el-form-item label="电子签名" prop="approvalSignature" :rules="[{required:false,message:'必填',trigger:['change','blur']}]">-->
|
|
||||||
<!-- <pc-signature v-model="formData.approvalSignature"></pc-signature>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row type="flex" justify="end">
|
<el-row type="flex" justify="end">
|
||||||
<el-button plain @click="$refs.guava.index()">取消</el-button>
|
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||||
<el-button type="danger" @click="doApproval('BACK')">退回重新申请</el-button>
|
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||||
<el-button type="danger" @click="doApproval('REJECT')">拒绝申请</el-button>
|
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||||
<el-button type="primary" @click="doApproval('PASS')">同意申请</el-button>
|
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
</info>
|
||||||
</template>
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
<!--#include('../../common/clubUserJoin.js'){}#-->
|
<!--#include('../../common/clubUserJoin.js'){}#-->
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
@@ -127,49 +125,54 @@ layout("/layouts/platform.html"){
|
|||||||
methods: {
|
methods: {
|
||||||
openView(row) {
|
openView(row) {
|
||||||
this.$refs.guava.public(() => {
|
this.$refs.guava.public(() => {
|
||||||
this.$refs.infoRef.onOpen(row.id)
|
this.$refs.infoRef.onOpen(row)
|
||||||
this.showApprovalForm = false
|
this.showApprovalForm = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openApproval(row) {
|
onAudit(row) {
|
||||||
this.$refs.guava.public(() => {
|
this.$refs.guava.public(() => {
|
||||||
this.$refs.infoRef.onOpen(row.id)
|
this.formData = {
|
||||||
this.formData = row.approvalParam
|
processTaskId: row.taskId,
|
||||||
|
taskName: row.curTaskName
|
||||||
|
}
|
||||||
this.showApprovalForm = true
|
this.showApprovalForm = true
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
doApproval(approvalType) {
|
handleTaskAction(val) {
|
||||||
this.formData.bpmTaskApprovalType = approvalType
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
this.$refs.approvalFormRef.validate((valid) => {
|
confirmButtonText: "确定",
|
||||||
if (valid) {
|
cancelButtonText: "取消",
|
||||||
this.$axios
|
type: "warning"
|
||||||
.post(loc() + "/approval", {
|
}).then(() => {
|
||||||
approval: JSON.stringify(this.formData)
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
|
data: JSON.stringify({
|
||||||
|
...this.formData,
|
||||||
|
submitType: val
|
||||||
})
|
})
|
||||||
.then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$refs.guava.index()
|
this.$refs.guava.index()
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openRevoke(taskId) {
|
onRevoke(row) {
|
||||||
this.$confirm("您确定要撤回吗?", "提示", {
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "info"
|
type: "info"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$axios.post(loc() + "/revoke", { taskId }).then((res) => {
|
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.unitList = await this.$businessTool.listUnit()
|
this.unitList = await this.$businessTool.listUnit()
|
||||||
|
|||||||
@@ -0,0 +1,156 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.el-descriptions-item__label {
|
||||||
|
width: 200px;
|
||||||
|
min-width: 200px;
|
||||||
|
max-width: 200px;
|
||||||
|
}
|
||||||
|
.el-tabs__header {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<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 shadow="never">
|
||||||
|
<table-tool label="协会列表">
|
||||||
|
<el-radio-group v-model="hasJoin" @change="joinChange" size="small">
|
||||||
|
<el-radio-button :label="false">{{'可加入协会' + noJoinCount + '(入会)'}}</el-radio-button>
|
||||||
|
<el-radio-button :label="true">{{'已加入协会' + hasJoinCount + '(退会)'}}</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" row-key="id" style="width: 100%">
|
||||||
|
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||||
|
<el-table-column label="协会编码" sortable prop="clubCode"></el-table-column>
|
||||||
|
<el-table-column label="协会名称" prop="clubName" show-overflow-tooltip width="200px"></el-table-column>
|
||||||
|
<el-table-column label="成立时间" prop="foundTime"></el-table-column>
|
||||||
|
<el-table-column label="会长" prop="clubLeader" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="秘书长" prop="clubSecretary" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column sortable label="当前人数" show-overflow-tooltip prop="currentPeopleNum"></el-table-column>
|
||||||
|
<el-table-column label="操作" width="250px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="primary" @click="openDetail(scope.row)">查看</el-button>
|
||||||
|
<el-button size="mini" v-if="hasJoin === false" type="primary" @click="doSubmit(scope.row)">申请加入</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #view>
|
||||||
|
<el-descriptions class="margin-top" title="" :column="2" border>
|
||||||
|
<el-descriptions-item span="2">
|
||||||
|
<template slot="label">协会名称</template>
|
||||||
|
<div v-html="viewData.clubName"></div>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="成立时间">{{viewData.foundTime}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="协会编码">{{viewData.clubCode}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="协会类型">{{viewData.typeName}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="发起人">{{viewData.sponsorName}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">会费标准</template>
|
||||||
|
{{viewData.due}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item :span="2">
|
||||||
|
<template slot="label">当前人数</template>
|
||||||
|
{{viewData.currentPeopleNum}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item span="2">
|
||||||
|
<template slot="label">协会介绍</template>
|
||||||
|
<div class="text-left" v-html="viewData.introduce"></div>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item span="2">
|
||||||
|
<template slot="label">协会宗旨</template>
|
||||||
|
<div class="text-left" v-html="viewData.purpose"></div>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item span="2">
|
||||||
|
<template slot="label">协会章程</template>
|
||||||
|
<file-preview :files="viewData.rulesFile" complete_result></file-preview>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item span="2">
|
||||||
|
<template slot="label">年度活动计划</template>
|
||||||
|
<file-preview :files="viewData.yearPlanFile" complete_result></file-preview>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
store,
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
components: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
viewData: {},
|
||||||
|
hasJoin: false,
|
||||||
|
hasJoinCount: 0,
|
||||||
|
noJoinCount: 0,
|
||||||
|
clickRow: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async doSubmit(row) {
|
||||||
|
this.$axios.post("/platform/club/join/apply/checkApplyClub", { clubId: row.id }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
location.href = '/platform/club/join/apply?clubId=' + row.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async openDetail(row) {
|
||||||
|
const resp = await this.$axios.post("/platform/club/join/list/findOne", { id: row.id })
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.viewData = resp.data
|
||||||
|
this.$refs.guava.view()
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
joinChange(val) {
|
||||||
|
this.pageForm.hasJoin = val
|
||||||
|
this.tableData = []
|
||||||
|
this.doSearch()
|
||||||
|
},
|
||||||
|
async getCount() {
|
||||||
|
const resp = await this.$axios.post("/platform/club/join/list/getCount")
|
||||||
|
this.hasJoinCount = resp.data.hasJoinCount
|
||||||
|
this.noJoinCount = resp.data.noJoinCount
|
||||||
|
},
|
||||||
|
pageData() {
|
||||||
|
this.pageForm.hasJoin = this.hasJoin
|
||||||
|
this.$axios.post("/platform/club/join/list/pageData", this.pageForm).then((res) => {
|
||||||
|
this.tableData = res.data.list
|
||||||
|
this.pageForm.totalCount = res.data.totalCount
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
await this.getCount()
|
||||||
|
await this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -11,7 +11,8 @@ layout("/layouts/platform.html"){
|
|||||||
v-model="pageForm.year"
|
v-model="pageForm.year"
|
||||||
type="year"
|
type="year"
|
||||||
value-format="yyyy"
|
value-format="yyyy"
|
||||||
placeholder="选择年度"
|
placeholder="请选择年度"
|
||||||
|
@change="doSearch"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
@@ -19,34 +20,36 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
|
<table-tool label="申请列表"></table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder">
|
<el-table :data="tableData" @sort-change="pageOrder">
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||||
<el-table-column prop="loginName" label="工号"></el-table-column>
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
<el-table-column prop="clubName" label="协会名称"></el-table-column>
|
<el-table-column prop="clubName" label="协会名称"></el-table-column>
|
||||||
<el-table-column prop="mode" label="申请模式">
|
<el-table-column prop="mode" label="申请模式">
|
||||||
<template slot-scope="scope">
|
<template v-slot="scope">
|
||||||
<el-tag size="mini" v-if="scope.row.mode" type="success">加入</el-tag>
|
<el-tag size="mini" v-if="scope.row.mode" type="success">加入</el-tag>
|
||||||
<el-tag size="mini" v-else type="danger">退出</el-tag>
|
<el-tag size="mini" v-else type="danger">退出</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="applyDate" label="申请时间"></el-table-column>
|
<el-table-column prop="applyDate" label="申请时间"></el-table-column>
|
||||||
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column>
|
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="操作" width="300px">
|
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
|
||||||
<template slot-scope="{row}">
|
<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="openView(row)" size="mini" type="primary">查看</el-button>
|
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||||
<el-button v-if="[10,40,70].includes(row.processInstanceNodeCode)" size="mini" type="primary" @click="openEdit(row)">
|
<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="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
|
||||||
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-else-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
|
||||||
v-if="[20].includes(row.processInstanceNodeCode) && !row.nextTaskIsComplete"
|
删除
|
||||||
size="mini"
|
|
||||||
type="danger"
|
|
||||||
@click="openRevoke(row)"
|
|
||||||
>
|
|
||||||
撤销
|
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="[10].includes(row.processInstanceNodeCode)" size="mini" type="danger" @click="doDelete(row)">删除</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -55,30 +58,12 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<template #public>
|
<template #public>
|
||||||
<info ref="infoRef"></info>
|
<info ref="infoRef"></info>
|
||||||
<div v-if="showApprovalForm">
|
|
||||||
<div class="process-title">{{formData.processInstanceNodeName}}</div>
|
|
||||||
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
|
|
||||||
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
|
|
||||||
</el-form-item>
|
|
||||||
<!-- <el-form-item label="电子签名" prop="approvalSignature" :rules="[{required:false,message:'必填',trigger:['change','blur']}]">-->
|
|
||||||
<!-- <pc-signature v-model="formData.approvalSignature"></pc-signature>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
</el-form>
|
|
||||||
<el-row type="flex" justify="end">
|
|
||||||
<el-button plain @click="$refs.guava.index()">取消</el-button>
|
|
||||||
<el-button type="danger" @click="doApproval('BACK')">退回重新申请</el-button>
|
|
||||||
<el-button type="danger" @click="doApproval('REJECT')">拒绝申请</el-button>
|
|
||||||
<el-button type="primary" @click="doApproval('PASS')">同意申请</el-button>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
<!--#include('../../common/clubUserJoin.js'){}#-->
|
<!--#include('../../common/clubUserJoin.js'){}#-->
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
store,
|
store,
|
||||||
@@ -90,36 +75,35 @@ layout("/layouts/platform.html"){
|
|||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openView(row) {
|
onRevoke(row) {
|
||||||
this.$refs.guava.public(() => {
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
this.$refs.infoRef.onOpen(row.id)
|
|
||||||
this.showApprovalForm = false
|
|
||||||
})
|
|
||||||
},
|
|
||||||
openEdit(row) {
|
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/join/apply?id=" + row.id)
|
|
||||||
},
|
|
||||||
openRevoke(row) {
|
|
||||||
this.$confirm("您确定要撤销申请吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "info"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$axios.post(loc() + "/revokeApply", { id: row.id }).then((res) => {
|
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.pageData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
doDelete(row) {
|
openView(row) {
|
||||||
|
this.$refs.guava.public(() => {
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onEdit(row) {
|
||||||
|
location.href = '/platform/club/join/apply?id=' + row.id
|
||||||
|
},
|
||||||
|
onDelete(id) {
|
||||||
this.$confirm("确定要删除此申请吗?", "提示", {
|
this.$confirm("确定要删除此申请吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$axios.post(loc() + "/delete", { id: row.id }).then((resp) => {
|
this.$axios.post(loc() + "/delete", { id: id }).then((resp) => {
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$message.success(resp.msg)
|
this.$message.success(resp.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
|
|||||||
@@ -1,6 +1,18 @@
|
|||||||
<!--#
|
<!--#
|
||||||
layout("/layouts/platform.html"){
|
layout("/layouts/platform.html"){
|
||||||
#-->
|
#-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.el-descriptions-item__label {
|
||||||
|
width: 200px;
|
||||||
|
min-width: 200px;
|
||||||
|
max-width: 200px;
|
||||||
|
}
|
||||||
|
.el-tabs__header {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<guava ref="guava">
|
<guava ref="guava">
|
||||||
<template>
|
<template>
|
||||||
@@ -44,60 +56,23 @@ layout("/layouts/platform.html"){
|
|||||||
<template #view>
|
<template #view>
|
||||||
<el-tabs tab-position="top" v-model="activeName">
|
<el-tabs tab-position="top" v-model="activeName">
|
||||||
<el-tab-pane label="协会基础信息" name="1">
|
<el-tab-pane label="协会基础信息" name="1">
|
||||||
<el-descriptions style="margin-top: 20px;" class="margin-top" title="" :column="3" border>
|
<el-descriptions style="margin-top: 20px;" class="margin-top" title="" :column="2" border>
|
||||||
<el-descriptions-item span="2">
|
<el-descriptions-item label="协会名称">{{viewData.clubName}}</el-descriptions-item>
|
||||||
<template slot="label">协会名称</template>
|
|
||||||
<div v-html="viewData.clubName"></div>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="成立时间">{{viewData.foundTime}}</el-descriptions-item>
|
<el-descriptions-item label="成立时间">{{viewData.foundTime}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="协会编码">{{viewData.clubCode}}</el-descriptions-item>
|
<el-descriptions-item label="协会编码">{{viewData.clubCode}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="协会类型">{{viewData.typeName}}</el-descriptions-item>
|
<el-descriptions-item label="协会类型">{{viewData.typeName}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="发起人">{{viewData.sponsorName}}</el-descriptions-item>
|
<el-descriptions-item label="发起人">{{viewData.sponsorName}}</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item label="会费标准">{{viewData.due}}</el-descriptions-item>
|
||||||
<template slot="label">报名联系人</template>
|
<el-descriptions-item label="当前人数">{{viewData.currentPeopleNum}}</el-descriptions-item>
|
||||||
{{viewData.concatPersonName}}
|
<el-descriptions-item span="2">
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item>
|
|
||||||
<template slot="label">联系人电话</template>
|
|
||||||
{{viewData.concatPersonMobile}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item>
|
|
||||||
<template slot="label">联系人邮箱</template>
|
|
||||||
{{viewData.concatPersonEmail}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item>
|
|
||||||
<template slot="label">会费标准</template>
|
|
||||||
{{viewData.due}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item>
|
|
||||||
<template slot="label">当前人数</template>
|
|
||||||
{{viewData.currentPeopleNum}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item span="3">
|
|
||||||
<template slot="label">协会介绍</template>
|
<template slot="label">协会介绍</template>
|
||||||
<div class="text-left" v-html="viewData.introduce"></div>
|
<div class="text-left" v-html="viewData.introduce"></div>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item span="3">
|
<el-descriptions-item span="2">
|
||||||
<template slot="label">协会宗旨</template>
|
<template slot="label">协会宗旨</template>
|
||||||
<div class="text-left" v-html="viewData.purpose"></div>
|
<div class="text-left" v-html="viewData.purpose"></div>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<!--<el-descriptions-item span="1.5">
|
|
||||||
<template slot="label">QQ群二维码</template>
|
|
||||||
<file-upload
|
|
||||||
v-if="viewData.QQGroupCode && viewData.QQGroupCode.length > 0"
|
|
||||||
:files="JSON.parse(viewData.QQGroupCode)"
|
|
||||||
:view="true"
|
|
||||||
></file-upload>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item span="2">
|
<el-descriptions-item span="2">
|
||||||
<template slot="label">微信群二维码</template>
|
|
||||||
<file-upload
|
|
||||||
v-if="viewData.wechatGroupCode && viewData.wechatGroupCode.length > 0"
|
|
||||||
:files="JSON.parse(viewData.wechatGroupCode)"
|
|
||||||
:view="true"
|
|
||||||
></file-upload>
|
|
||||||
</el-descriptions-item>-->
|
|
||||||
<el-descriptions-item span="1.5">
|
|
||||||
<template slot="label">协会章程</template>
|
<template slot="label">协会章程</template>
|
||||||
<file-preview :files="viewData.rulesFile" complete_result></file-preview>
|
<file-preview :files="viewData.rulesFile" complete_result></file-preview>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@@ -148,7 +123,7 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async findOne(data) {
|
async findOne(data) {
|
||||||
const resp = await this.$axios.post("/platform/club/applyJoin/apply/findOne", {id: data.id})
|
const resp = await this.$axios.post("/platform/club/join/list/findOne", {id: data.id})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.viewData = resp.data
|
this.viewData = resp.data
|
||||||
}
|
}
|
||||||
@@ -158,7 +133,6 @@ layout("/layouts/platform.html"){
|
|||||||
this.tableData = res.data.list
|
this.tableData = res.data.list
|
||||||
this.pageForm.totalCount = res.data.totalCount
|
this.pageForm.totalCount = res.data.totalCount
|
||||||
})
|
})
|
||||||
console.log(this.tableData)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|||||||
@@ -11,8 +11,9 @@ layout("/layouts/platform.html"){
|
|||||||
v-model="pageForm.year"
|
v-model="pageForm.year"
|
||||||
type="year"
|
type="year"
|
||||||
value-format="yyyy"
|
value-format="yyyy"
|
||||||
placeholder="选择年度"
|
placeholder="请选择年度"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@change="doSearch"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="姓名:">
|
<search-item label="姓名:">
|
||||||
@@ -56,21 +57,17 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="applyDate" label="申请时间" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="applyDate" label="申请时间" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column>
|
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="操作" width="300px">
|
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
|
||||||
<template slot-scope="{row}">
|
<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="openView(row)" size="mini" type="primary">查看</el-button>
|
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||||
<el-button v-if="row.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" size="mini" type="primary">
|
<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>
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"
|
|
||||||
@click="openRevoke(row.processInstanceTaskId)"
|
|
||||||
size="mini"
|
|
||||||
type="danger"
|
|
||||||
>
|
|
||||||
撤回
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -78,31 +75,32 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<template #public>
|
<template #public>
|
||||||
<info ref="infoRef"></info>
|
<info ref="infoRef">
|
||||||
<div v-if="showApprovalForm">
|
<div v-if="showApprovalForm">
|
||||||
<div class="process-title">{{formData.processInstanceNodeName}}</div>
|
<div class="process-title">
|
||||||
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
|
{{formData.taskName}}
|
||||||
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
</div>
|
||||||
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
|
<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-item>
|
||||||
<!-- <el-form-item label="电子签名" prop="approvalSignature" :rules="[{required:false,message:'必填',trigger:['change','blur']}]">-->
|
|
||||||
<!-- <pc-signature v-model="formData.approvalSignature"></pc-signature>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row type="flex" justify="end">
|
<el-row type="flex" justify="end">
|
||||||
<el-button plain @click="$refs.guava.index()">取消</el-button>
|
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||||
<el-button type="danger" @click="doApproval('BACK')">退回重新申请</el-button>
|
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||||
<el-button type="danger" @click="doApproval('REJECT')">拒绝申请</el-button>
|
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||||
<el-button type="primary" @click="doApproval('PASS')">同意申请</el-button>
|
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
</info>
|
||||||
</template>
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
<!--#include('../../common/clubUserJoin.js'){}#-->
|
<!--#include('../../common/clubUserJoin.js'){}#-->
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
@@ -127,49 +125,54 @@ layout("/layouts/platform.html"){
|
|||||||
methods: {
|
methods: {
|
||||||
openView(row) {
|
openView(row) {
|
||||||
this.$refs.guava.public(() => {
|
this.$refs.guava.public(() => {
|
||||||
this.$refs.infoRef.onOpen(row.id)
|
this.$refs.infoRef.onOpen(row)
|
||||||
this.showApprovalForm = false
|
this.showApprovalForm = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openApproval(row) {
|
onAudit(row) {
|
||||||
this.$refs.guava.public(() => {
|
this.$refs.guava.public(() => {
|
||||||
this.$refs.infoRef.onOpen(row.id)
|
this.formData = {
|
||||||
this.formData = row.approvalParam
|
processTaskId: row.taskId,
|
||||||
|
taskName: row.curTaskName
|
||||||
|
}
|
||||||
this.showApprovalForm = true
|
this.showApprovalForm = true
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
doApproval(approvalType) {
|
handleTaskAction(val) {
|
||||||
this.formData.bpmTaskApprovalType = approvalType
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
this.$refs.approvalFormRef.validate((valid) => {
|
confirmButtonText: "确定",
|
||||||
if (valid) {
|
cancelButtonText: "取消",
|
||||||
this.$axios
|
type: "warning"
|
||||||
.post(loc() + "/approval", {
|
}).then(() => {
|
||||||
approval: JSON.stringify(this.formData)
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
|
data: JSON.stringify({
|
||||||
|
...this.formData,
|
||||||
|
submitType: val
|
||||||
})
|
})
|
||||||
.then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$refs.guava.index()
|
this.$refs.guava.index()
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openRevoke(taskId) {
|
onRevoke(row) {
|
||||||
this.$confirm("您确定要撤回吗?", "提示", {
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "info"
|
type: "info"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$axios.post(loc() + "/revoke", { taskId }).then((res) => {
|
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.unitList = await this.$businessTool.listUnit()
|
this.unitList = await this.$businessTool.listUnit()
|
||||||
|
|||||||
@@ -63,10 +63,10 @@ layout("/layouts/platform.html"){
|
|||||||
methods: {
|
methods: {
|
||||||
doBack() {
|
doBack() {
|
||||||
if (this.id !== "" && this.from === "") {
|
if (this.id !== "" && this.from === "") {
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/clubMyApply")
|
location.href = '/platform/club/clubMyApply'
|
||||||
}
|
}
|
||||||
if (this.from !== "") {
|
if (this.from !== "") {
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/sys/club/clubInfoManage")
|
location.href = '/platform/sys/club/clubInfoManage'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
nextStep() {
|
nextStep() {
|
||||||
@@ -149,7 +149,7 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$message.success(resp.msg)
|
this.$message.success(resp.msg)
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/register/clubMyApply")
|
location.href = '/platform/club/register/clubMyApply'
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
@@ -201,7 +201,7 @@ layout("/layouts/platform.html"){
|
|||||||
await this.$refs.clubFormRef.concatPersonChange(resp.data.concatPerson)
|
await this.$refs.clubFormRef.concatPersonChange(resp.data.concatPerson)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$.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.$refs.clubFormRef.formData.clubCode = res.data
|
||||||
|
|||||||
@@ -46,27 +46,22 @@ layout("/layouts/platform.html"){
|
|||||||
<span>{{ $moment(row.createTime).format('YYYY-MM-DD') }}</span>
|
<span>{{ $moment(row.createTime).format('YYYY-MM-DD') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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="sponsorName" sortable show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column>
|
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="操作" width="300px">
|
<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}">
|
<template v-slot="{row}">
|
||||||
<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="[10,40,70].includes(row.processInstanceNodeCode)" @click="openEdit(row)" size="mini" type="primary">
|
<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>
|
<el-button v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
|
||||||
<el-button
|
|
||||||
v-if="[20].includes(row.processInstanceNodeCode) && !row.nextTaskIsComplete"
|
|
||||||
size="mini"
|
|
||||||
type="danger"
|
|
||||||
@click="openRevoke(row)"
|
|
||||||
>
|
|
||||||
撤销
|
|
||||||
</el-button>
|
|
||||||
<el-button v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])" @click="deleteDo(row)" size="mini" type="danger">
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-else-if="[10].includes(row.processInstanceNodeCode)" @click="deleteDo(row)" size="mini" type="danger">
|
<el-button v-else-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -83,6 +78,7 @@ 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,
|
||||||
@@ -95,37 +91,39 @@ layout("/layouts/platform.html"){
|
|||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openRevoke(row) {
|
onRevoke(row) {
|
||||||
this.$confirm("您确定要撤回吗?", "提示", {
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$axios.post("/platform/club/register/clubMyApply/revokeApply", { id: row.id }).then((resp) => {
|
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
|
||||||
this.$message.success(resp.msg)
|
if (res.code === 0) {
|
||||||
this.doSearch()
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openAdd() {
|
openAdd() {
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/register/clubRegisterApply")
|
location.href = '/platform/club/register/clubRegisterApply'
|
||||||
},
|
},
|
||||||
openView(row) {
|
openView(row) {
|
||||||
this.$refs.guava.view(() => {
|
this.$refs.guava.view(() => {
|
||||||
this.$refs.registerInfoRef.onOpen(row.id)
|
this.$refs.registerInfoRef.onOpen(row)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openEdit(row) {
|
onEdit(row) {
|
||||||
this.$store.dispatch("pjaxRoute", "/platform/club/register/clubRegisterApply?id=" + row.id)
|
location.href = '/platform/club/register/clubRegisterApply?id=' + row.id
|
||||||
},
|
},
|
||||||
async deleteDo(row) {
|
async onDelete(id) {
|
||||||
const confirm = await this.$confirm("此操作将永久删除, 是否继续?", "提示", {
|
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/register/clubMyApply/doDelete", { id: row.id })
|
const resp = await this.$axios.post("/platform/club/register/clubMyApply/doDelete", { id: id })
|
||||||
this.$message.success(resp.msg)
|
this.$message.success(resp.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,23 +49,18 @@ layout("/layouts/platform.html"){
|
|||||||
<span>{{ $moment(row.createTime).format('YYYY-MM-DD') }}</span>
|
<span>{{ $moment(row.createTime).format('YYYY-MM-DD') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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="sponsorName" sortable show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column>
|
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="操作" width="300px">
|
<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}">
|
<template v-slot="{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 v-if="row.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" size="mini" type="primary">
|
<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>
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"
|
|
||||||
@click="openRevoke(row.processInstanceTaskId)"
|
|
||||||
size="mini"
|
|
||||||
type="danger"
|
|
||||||
>
|
|
||||||
撤回
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -73,21 +68,26 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<template #public>
|
<template #public>
|
||||||
<register-info ref="registerInfoRef"></register-info>
|
<register-info ref="registerInfoRef">
|
||||||
<div v-if="showApprovalForm">
|
<div v-if="showApprovalForm">
|
||||||
<div class="process-title">{{formData.processInstanceNodeName}}</div>
|
<div class="process-title">
|
||||||
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
|
{{formData.taskName}}
|
||||||
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
</div>
|
||||||
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
|
<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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row type="flex" justify="end">
|
<el-row type="flex" justify="end">
|
||||||
<el-button plain @click="$refs.guava.index()">取消</el-button>
|
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||||
<el-button type="danger" @click="doApproval('BACK')">退回</el-button>
|
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||||
<el-button type="danger" @click="doApproval('REJECT')">拒绝</el-button>
|
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||||
<el-button type="primary" @click="doApproval('PASS')">同意</el-button>
|
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
</register-info>
|
||||||
</template>
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
</div>
|
</div>
|
||||||
@@ -104,53 +104,57 @@ layout("/layouts/platform.html"){
|
|||||||
name: "",
|
name: "",
|
||||||
audit: false
|
audit: false
|
||||||
},
|
},
|
||||||
viewData: {},
|
formData: {},
|
||||||
showApprovalForm: false
|
showApprovalForm: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
"register-info": REGISTER_INFO_COMPONENT,
|
"register-info": REGISTER_INFO_COMPONENT
|
||||||
showApprovalForm: false
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openView(row) {
|
onView(row) {
|
||||||
this.$refs.guava.public(() => {
|
this.$refs.guava.public(() => {
|
||||||
this.$refs.registerInfoRef.onOpen(row.id)
|
this.$refs.registerInfoRef.onOpen(row)
|
||||||
this.showApprovalForm = false
|
this.showApprovalForm = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openApproval(row) {
|
onAudit(row) {
|
||||||
this.$refs.guava.public(() => {
|
this.$refs.guava.public(() => {
|
||||||
this.$refs.registerInfoRef.onOpen(row.id)
|
this.formData = {
|
||||||
this.formData = row.approvalParam
|
processTaskId: row.taskId,
|
||||||
|
taskName: row.curTaskName
|
||||||
|
}
|
||||||
this.showApprovalForm = true
|
this.showApprovalForm = true
|
||||||
|
this.$refs.registerInfoRef.onOpen(row)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
doApproval(approvalType) {
|
handleTaskAction(val) {
|
||||||
this.formData.bpmTaskApprovalType = approvalType
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
this.$refs.approvalFormRef.validate((valid) => {
|
confirmButtonText: "确定",
|
||||||
if (valid) {
|
cancelButtonText: "取消",
|
||||||
this.$axios
|
type: "warning"
|
||||||
.post(loc() + "/approval", {
|
}).then(() => {
|
||||||
approval: JSON.stringify(this.formData)
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
|
data: JSON.stringify({
|
||||||
|
...this.formData,
|
||||||
|
submitType: val
|
||||||
})
|
})
|
||||||
.then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$refs.guava.index()
|
this.$refs.guava.index()
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openRevoke(taskId) {
|
onRevoke(row) {
|
||||||
this.$confirm("您确定要撤回吗?", "提示", {
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "info"
|
type: "info"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$axios.post(loc() + "/revoke", { taskId }).then((res) => {
|
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ layout("/layouts/platform.html"){
|
|||||||
<el-row style="padding-right: 10px">
|
<el-row style="padding-right: 10px">
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<search @search="doSearch">
|
<search @search="doSearch">
|
||||||
<search-item label="年审状态:">
|
<!--<search-item label="年审状态:">
|
||||||
<el-select @change="getClub" v-model="pageForm.auditState" placeholder="请选择年审状态">
|
<el-select @change="getClub" v-model="pageForm.auditState" placeholder="请选择年审状态">
|
||||||
<el-option label="全部" :value="null"></el-option>
|
<el-option label="全部" :value="null"></el-option>
|
||||||
<el-option label="年审通过" :value="true"></el-option>
|
<el-option label="年审通过" :value="true"></el-option>
|
||||||
<el-option label="年审未通过" :value="false"></el-option>
|
<el-option label="年审未通过" :value="false"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>-->
|
||||||
<search-item label="协会名称:">
|
<search-item label="协会名称:">
|
||||||
<el-select v-model="pageForm.clubId" placeholder="请选择协会" clearable filterable>
|
<el-select v-model="pageForm.clubId" placeholder="请选择协会" clearable filterable>
|
||||||
<el-option v-for="item in clubList" :label="item.clubName" :value="item.id" :key="item.id"></el-option>
|
<el-option v-for="item in clubList" :label="item.clubName" :value="item.id" :key="item.id"></el-option>
|
||||||
@@ -52,7 +52,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-table-column label="女" prop="woman"></el-table-column>
|
<el-table-column label="女" prop="woman"></el-table-column>
|
||||||
<el-table-column label="理事机构人数" prop="governing_body"></el-table-column>
|
<el-table-column label="理事机构人数" prop="governing_body"></el-table-column>
|
||||||
<el-table-column fixed="right" label="操作">
|
<el-table-column fixed="right" label="操作">
|
||||||
<template scope="{row}">
|
<template v-slot="{row}">
|
||||||
<el-dropdown @command="dropdownCommand">
|
<el-dropdown @command="dropdownCommand">
|
||||||
<el-button plain size="mini">
|
<el-button plain size="mini">
|
||||||
<i class="ti-settings"></i>
|
<i class="ti-settings"></i>
|
||||||
|
|||||||
@@ -105,5 +105,15 @@ const condolenceInfo = {
|
|||||||
openChart(){
|
openChart(){
|
||||||
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
|
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;
|
||||||
|
}
|
||||||
|
`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,10 @@ 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="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
|
<el-button v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @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>
|
||||||
|
|||||||
+4
-4
@@ -244,7 +244,7 @@ layout("/layouts/platform.html"){
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
if (confirm !== 'confirm') return
|
if (confirm !== 'confirm') return
|
||||||
const resp = await this.$axios.post(loc() + '/deSelect', {lineId, unionId})
|
const resp = await this.$axios.post('/platform/recuperation/lineSelect/deSelect', {lineId, unionId})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
this.$message.success(resp.msg)
|
this.$message.success(resp.msg)
|
||||||
@@ -277,7 +277,7 @@ layout("/layouts/platform.html"){
|
|||||||
this.$refs.batchSelectRef.onOpen(this.multipleSelection, this.pageForm.year)
|
this.$refs.batchSelectRef.onOpen(this.multipleSelection, this.pageForm.year)
|
||||||
},
|
},
|
||||||
pageData() {
|
pageData() {
|
||||||
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
this.$axios.post("/platform/recuperation/lineSelect/pageData", this.pageForm).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.tableData = res.data.list
|
this.tableData = res.data.list
|
||||||
this.pageForm.totalCount = res.data.totalCount
|
this.pageForm.totalCount = res.data.totalCount
|
||||||
@@ -285,7 +285,7 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async getTravelAgencyOptions() {
|
async getTravelAgencyOptions() {
|
||||||
const {data} = await this.$axios.post(loc() + '/getTravelAgencyOptions')
|
const {data} = await this.$axios.post('/platform/recuperation/lineSelect/getTravelAgencyOptions')
|
||||||
this.travelAgencyOptions = data
|
this.travelAgencyOptions = data
|
||||||
},
|
},
|
||||||
async getEnumOptions(enumName) {
|
async getEnumOptions(enumName) {
|
||||||
@@ -294,7 +294,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.$set(this.pageForm, 'mode', Number(GetQueryString('mode')))
|
this.$set(this.pageForm, 'mode', Number(`${mode}`))
|
||||||
if(this.pageForm.mode === 2) {
|
if(this.pageForm.mode === 2) {
|
||||||
this.$set(this.pageForm, 'regionalNature', '全部')
|
this.$set(this.pageForm, 'regionalNature', '全部')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user