新增申诉管理模块: 新增角色(申诉处理委员会成员);
This commit is contained in:
@@ -25,6 +25,7 @@ RoleConstant {
|
||||
SCHOOL_UNION_WC_ADMIN("校工会工代会管理员"),
|
||||
SCHOOL_UNION_DC_ADMIN("校工会民主管理员"),
|
||||
SCHOOL_UNION_PROPOSAL_ADMIN("校工会提案管理员"),
|
||||
APPEAL_COMMITTEE_MEMBER("申诉处理委员会成员"),
|
||||
SCHOOL_UNION_CLUB_ADMIN("校工会协会管理员"),
|
||||
SCHOOL_UNION_ACTIVITY_ADMIN("校工会活动管理员"),
|
||||
SCHOOL_UNION_ARTICLE_CLUB_ADMIN("校工会协会新闻审批管理员"),
|
||||
|
||||
@@ -61,6 +61,9 @@ public class FlowEngineImpl implements FlowEngine {
|
||||
@Override
|
||||
public ProcessInstance startProcessInstanceByKey(String key, String businessKey, String operator, Dict args) {
|
||||
ProcessDefine define = processDefineService.getLastByName(key);
|
||||
if (define == null) {
|
||||
throw new BaseException("流程定义不存在或未启用:" + key);
|
||||
}
|
||||
return startProcessInstanceById(define.getId(), businessKey, operator, args);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.budwk.app.flow.handler;
|
||||
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.exception.BaseException;
|
||||
import com.budwk.app.flow.engine.AssignmentHandler;
|
||||
import com.budwk.app.flow.engine.core.Execution;
|
||||
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||
import com.budwk.app.flow.engine.model.TaskModel;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.lang.Lang;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 获取申诉处理委员会成员
|
||||
*/
|
||||
public class FlowAppealCommitteeAssignmentHandler implements AssignmentHandler {
|
||||
|
||||
@Override
|
||||
public List<String> assign(TaskModel model, Execution execution) {
|
||||
Dao dao = ServiceContext.find(Dao.class);
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
userRole.userId
|
||||
FROM
|
||||
`sys_user_role` userRole
|
||||
LEFT JOIN sys_role role ON role.id = userRole.roleId
|
||||
WHERE
|
||||
role.`code` = @roleCode
|
||||
GROUP BY
|
||||
userRole.userId
|
||||
""").setParam("roleCode", RoleConstant.APPEAL_COMMITTEE_MEMBER.name());
|
||||
sql.setCallback(Sqls.callback.strList());
|
||||
dao.execute(sql);
|
||||
List<String> userIds = sql.getList(String.class);
|
||||
if (Lang.isEmpty(userIds)) {
|
||||
throw new BaseException("申诉处理委员会成员没有设置,请联系管理员!");
|
||||
}
|
||||
return userIds;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "申诉处理委员会成员";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package com.budwk.app.flow.handler;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.exception.BaseException;
|
||||
import com.budwk.app.flow.engine.AssignmentHandler;
|
||||
import com.budwk.app.flow.engine.core.Execution;
|
||||
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||
import com.budwk.app.flow.engine.model.TaskModel;
|
||||
import com.budwk.app.sys.models.Sys_role;
|
||||
import com.budwk.app.sys.models.Sys_user_role;
|
||||
import com.budwk.app.sys.services.SysRoleService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.lang.Lang;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 获取被申诉单位分工会管理员
|
||||
*/
|
||||
public class FlowAppealDefendantUnitAssignmentHandler implements AssignmentHandler {
|
||||
|
||||
@Override
|
||||
public List<String> assign(TaskModel model, Execution execution) {
|
||||
Dao dao = ServiceContext.find(Dao.class);
|
||||
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
|
||||
|
||||
String unitId = StrUtil.blankToDefault(execution.getArgs().getStr("appealDefendantUnitId"), execution.getArgs().getStr("defendantUnitId"));
|
||||
if (StrUtil.isBlank(unitId)) {
|
||||
throw new BaseException("被申诉单位不能为空!");
|
||||
}
|
||||
|
||||
Sys_role sysRole = sysRoleService.getByCode(RoleConstant.BRANCH_UNION_ADMIN);
|
||||
List<Sys_user_role> userRoles = dao.query(Sys_user_role.class, Cnd.where("roleId", "=", sysRole.getId()).and("unitId", "=", unitId));
|
||||
if (Lang.isEmpty(userRoles)) {
|
||||
userRoles = dao.query(Sys_user_role.class, Cnd.where("roleId", "=", sysRole.getId()).and("unionId", "=", unitId));
|
||||
}
|
||||
if (Lang.isEmpty(userRoles)) {
|
||||
throw new BaseException("被申诉单位分工会管理员没有设置,请联系管理员!", sysRole.getCode());
|
||||
}
|
||||
return userRoles.stream().map(Sys_user_role::getUserId).distinct().toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "被申诉单位分工会管理员";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
@@ -114,9 +114,9 @@ public class SysUserServiceImpl extends BaseServiceImpl<Sys_user> implements Sys
|
||||
user.setMenus(allMenus);
|
||||
|
||||
//pc端菜单
|
||||
List<Sys_menu> pcMenus = allMenus.stream().filter(menu -> menu.getPlatform().equals("PC")).toList();
|
||||
List<Sys_menu> pcMenus = allMenus.stream().filter(menu -> StrUtil.equals(menu.getPlatform(), "PC")).toList();
|
||||
//h5端菜单
|
||||
List<Sys_menu> h5Menus = allMenus.stream().filter(menu -> menu.getPlatform().equals("H5")).toList();
|
||||
List<Sys_menu> h5Menus = allMenus.stream().filter(menu -> StrUtil.equals(menu.getPlatform(), "H5")).toList();
|
||||
|
||||
//所有的模块
|
||||
Set<String> allModuleIds = allMenus.stream().map(Sys_menu::getModuleId).collect(Collectors.toSet());
|
||||
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
package com.budwk.app.zhgh.democratic.appeal.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.appeal.models.AppealInfo;
|
||||
import com.budwk.app.zhgh.democratic.appeal.service.AppealInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/appeal/accept")
|
||||
@Ok("json:full")
|
||||
@Api("申诉管理-受理")
|
||||
public class AppealAcceptController {
|
||||
|
||||
@Inject
|
||||
private AppealInfoService appealInfoService;
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/appeal/accept/index.html")
|
||||
@SaCheckPermission("appeal.accept")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.accept")
|
||||
public Result pageData(Integer pageNumber, Integer pageSize, String searchKeyword, String appealTypeId,
|
||||
Integer year, boolean approval) {
|
||||
Sql sql = listSql();
|
||||
Cnd cnd = taskCondition("appealAccept", "受理", approval);
|
||||
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||
cnd.where().andLike("info.title", searchKeyword);
|
||||
}
|
||||
cnd.andEX("info.appealTypeId", "=", appealTypeId);
|
||||
cnd.andEX("YEAR(info.applyDate)", "=", year);
|
||||
cnd.desc("info.applyDate");
|
||||
cnd.groupBy("t.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = appealInfoService.listPageMap(pageNumber, pageSize, sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.accept")
|
||||
@ApiOperation("查询受理任务")
|
||||
public Result queryTask(@Param("taskId") Long taskId) {
|
||||
Sql sql = listSql();
|
||||
sql.setCondition(Cnd.where("t.id", "=", taskId));
|
||||
return Result.success(appealInfoService.fetchMap(sql));
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.accept")
|
||||
@ApiOperation("受理申诉")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "申诉管理-受理", msg = "受理申诉")
|
||||
public Result accept(@Param("data") AppealInfo appealInfo, @Param("taskId") Long taskId,
|
||||
@Param("submitType") Integer submitType) {
|
||||
AppealInfo old = appealInfoService.fetch(appealInfo.getId());
|
||||
BeanUtil.copyProperties(appealInfo, old, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
|
||||
old.setAcceptUserId(SecurityUtil.getUserId());
|
||||
old.setAcceptUserName(SecurityUtil.getUserUsername());
|
||||
old.setAcceptTime(new Date());
|
||||
if (ProcessSubmitTypeEnum.AGREE.getCode().equals(submitType)) {
|
||||
old.setState("待执行");
|
||||
} else if (ProcessSubmitTypeEnum.ROLLBACK_TO_OPERATOR.getCode().equals(submitType)) {
|
||||
old.setState("退回修改");
|
||||
} else if (ProcessSubmitTypeEnum.REJECT.getCode().equals(submitType)) {
|
||||
old.setState("已办结");
|
||||
}
|
||||
appealInfoService.updateIgnoreNull(old);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||
dict.set(FlowConst.SUBMIT_TYPE, submitType);
|
||||
dict.set(FlowConst.FORM_DATA, old);
|
||||
dict.set("appealDefendantUnitId", old.getDefendantUnitId());
|
||||
dict.set("defendantUnitId", old.getDefendantUnitId());
|
||||
flowCommonService.executeTask(dict);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
private Sql listSql() {
|
||||
return Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN appeal_info info ON info.id = ins.businessNo
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
}
|
||||
|
||||
private Cnd taskCondition(String taskName, String displayName, boolean approval) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and(Cnd.exps("t.taskName", "=", taskName).or("t.displayName", "=", displayName));
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
return cnd;
|
||||
}
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package com.budwk.app.zhgh.democratic.appeal.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.zhgh.democratic.appeal.service.AppealTypeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/appeal/common")
|
||||
@Ok("json:full")
|
||||
@Api("申诉管理-公共接口")
|
||||
public class AppealCommonController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private AppealTypeService appealTypeService;
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result typeOptions() {
|
||||
return Result.success(appealTypeService.query(Cnd.where("enabled", "=", true).asc("sort").desc("createdAt")));
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result unitOptions(String unionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
unit.*,
|
||||
su.`name` AS unionName
|
||||
FROM
|
||||
`sys_unit` unit
|
||||
LEFT JOIN sys_union su ON su.id = unit.unionId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("unit.unionId", "=", unionId);
|
||||
cnd.and("unit.unitLevel", "=", "2");
|
||||
cnd.asc("unit.unitcode");
|
||||
sql.setCondition(cnd);
|
||||
return Result.success(appealTypeService.listMap(sql));
|
||||
}
|
||||
}
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
package com.budwk.app.zhgh.democratic.appeal.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.appeal.models.AppealInfo;
|
||||
import com.budwk.app.zhgh.democratic.appeal.service.AppealInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/appeal/execute")
|
||||
@Ok("json:full")
|
||||
@Api("申诉管理-执行")
|
||||
public class AppealExecuteController {
|
||||
|
||||
@Inject
|
||||
private AppealInfoService appealInfoService;
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/appeal/execute/index.html")
|
||||
@SaCheckPermission("appeal.execute")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.execute")
|
||||
public Result pageData(Integer pageNumber, Integer pageSize, String searchKeyword, String appealTypeId,
|
||||
Integer year, boolean approval) {
|
||||
Sql sql = listSql();
|
||||
Cnd cnd = taskCondition("appealExecute", "执行", approval);
|
||||
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||
cnd.where().andLike("info.title", searchKeyword);
|
||||
}
|
||||
cnd.andEX("info.appealTypeId", "=", appealTypeId);
|
||||
cnd.andEX("YEAR(info.applyDate)", "=", year);
|
||||
cnd.desc("info.applyDate");
|
||||
cnd.groupBy("t.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = appealInfoService.listPageMap(pageNumber, pageSize, sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.execute")
|
||||
@ApiOperation("查询执行任务")
|
||||
public Result queryTask(@Param("taskId") Long taskId) {
|
||||
Sql sql = listSql();
|
||||
sql.setCondition(Cnd.where("t.id", "=", taskId));
|
||||
return Result.success(appealInfoService.fetchMap(sql));
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.execute")
|
||||
@ApiOperation("提交执行情况")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "申诉管理-执行", msg = "提交执行情况")
|
||||
public Result execute(@Param("data") AppealInfo appealInfo, @Param("taskId") Long taskId) {
|
||||
AppealInfo old = appealInfoService.fetch(appealInfo.getId());
|
||||
BeanUtil.copyProperties(appealInfo, old, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
|
||||
old.setExecuteUserId(SecurityUtil.getUserId());
|
||||
old.setExecuteUserName(SecurityUtil.getUserUsername());
|
||||
old.setExecuteTime(new Date());
|
||||
old.setState("已办结");
|
||||
appealInfoService.updateIgnoreNull(old);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.AGREE.getCode());
|
||||
dict.set(FlowConst.FORM_DATA, old);
|
||||
flowCommonService.executeTask(dict);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
private Sql listSql() {
|
||||
return Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN appeal_info info ON info.id = ins.businessNo
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
}
|
||||
|
||||
private Cnd taskCondition(String taskName, String displayName, boolean approval) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and(Cnd.exps("t.taskName", "=", taskName).or("t.displayName", "=", displayName));
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
return cnd;
|
||||
}
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
package com.budwk.app.zhgh.democratic.appeal.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.appeal.service.AppealInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/appeal/mine")
|
||||
@Ok("json:full")
|
||||
@Api("申诉管理-我的申诉")
|
||||
public class AppealMineController {
|
||||
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private AppealInfoService appealInfoService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/appeal/mine/index.html")
|
||||
@SaCheckPermission("appeal.mine")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.mine")
|
||||
public Result pageData(Integer pageNumber, Integer pageSize, String searchKeyword, String appealTypeId, Integer year) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.state instanceState,
|
||||
t.id startTaskId,
|
||||
t.taskName AS taskKey,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') taskName,
|
||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||
FROM
|
||||
appeal_info info
|
||||
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskName = 'startTask'
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.where("info.userId", "=", SecurityUtil.getUserId());
|
||||
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||
cnd.where().andLike("info.title", searchKeyword);
|
||||
}
|
||||
cnd.andEX("info.appealTypeId", "=", appealTypeId);
|
||||
cnd.andEX("YEAR(info.applyDate)", "=", year);
|
||||
cnd.groupBy("info.id");
|
||||
cnd.desc("info.applyDate");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = appealInfoService.listPageMap(pageNumber, pageSize, sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.mine")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("删除申诉")
|
||||
public Result delete(@Param("id") String id) {
|
||||
appealInfoService.delete(id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
package com.budwk.app.zhgh.democratic.appeal.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.zhgh.democratic.appeal.service.AppealInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/appeal/query")
|
||||
@Ok("json:full")
|
||||
@Api("申诉管理-查询统计")
|
||||
public class AppealQueryController {
|
||||
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private AppealInfoService appealInfoService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/appeal/query/index.html")
|
||||
@SaCheckPermission("appeal.query")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.query")
|
||||
public Result pageData(Integer pageNumber, Integer pageSize, String searchKeyword, String appealTypeId, String state,
|
||||
String unitId, String defendantUnitId, Integer year) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.state instanceState
|
||||
FROM
|
||||
appeal_info info
|
||||
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = buildCondition(searchKeyword, appealTypeId, state, unitId, defendantUnitId, year);
|
||||
cnd.desc("info.applyDate");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = appealInfoService.listPageMap(pageNumber, pageSize, sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.query")
|
||||
@ApiOperation("申诉统计")
|
||||
public Result statistics(String searchKeyword, String appealTypeId, String state, String unitId,
|
||||
String defendantUnitId, Integer year) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
COUNT(1) totalCount,
|
||||
SUM(CASE WHEN info.state = '待受理' THEN 1 ELSE 0 END) waitAcceptCount,
|
||||
SUM(CASE WHEN info.state = '待执行' THEN 1 ELSE 0 END) waitExecuteCount,
|
||||
SUM(CASE WHEN info.state = '已办结' THEN 1 ELSE 0 END) finishCount,
|
||||
SUM(CASE WHEN info.decisionType = 'MAINTAIN' THEN 1 ELSE 0 END) maintainCount,
|
||||
SUM(CASE WHEN info.decisionType LIKE 'REPROCESS%' THEN 1 ELSE 0 END) reprocessCount
|
||||
FROM
|
||||
appeal_info info
|
||||
$condition
|
||||
""");
|
||||
sql.setCondition(buildCondition(searchKeyword, appealTypeId, state, unitId, defendantUnitId, year));
|
||||
NutMap data = appealInfoService.fetchMap(sql);
|
||||
return Result.success(data);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.query")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("删除申诉")
|
||||
public Result delete(@Param("id") String id) {
|
||||
appealInfoService.delete(id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
private Cnd buildCondition(String searchKeyword, String appealTypeId, String state, String unitId,
|
||||
String defendantUnitId, Integer year) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||
cnd.where().andLike("info.title", searchKeyword);
|
||||
}
|
||||
cnd.andEX("info.appealTypeId", "=", appealTypeId);
|
||||
cnd.andEX("info.state", "=", state);
|
||||
cnd.andEX("info.unitId", "=", unitId);
|
||||
cnd.andEX("info.defendantUnitId", "=", defendantUnitId);
|
||||
cnd.andEX("YEAR(info.applyDate)", "=", year);
|
||||
return cnd;
|
||||
}
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
package com.budwk.app.zhgh.democratic.appeal.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.zhgh.democratic.appeal.models.AppealType;
|
||||
import com.budwk.app.zhgh.democratic.appeal.service.AppealTypeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.dao.Cnd;
|
||||
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 org.nutz.mvc.annotation.Param;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/appeal/type")
|
||||
@Ok("json:full")
|
||||
@Api("申诉管理-类型维护")
|
||||
public class AppealTypeController {
|
||||
|
||||
@Inject
|
||||
private AppealTypeService appealTypeService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/appeal/type/index.html")
|
||||
@SaCheckPermission("appeal.type")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.type")
|
||||
public Result pageData(Integer pageNumber, Integer pageSize, String name) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(name)) {
|
||||
cnd.where().andLike("name", name);
|
||||
}
|
||||
cnd.asc("sort").desc("createdAt");
|
||||
Pagination page = appealTypeService.listPage(pageNumber, pageSize, cnd);
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.type")
|
||||
@ApiOperation("保存申诉类型")
|
||||
@SLog(tag = "申诉管理-类型维护", msg = "保存申诉类型")
|
||||
public Result save(@Param("data") AppealType appealType) {
|
||||
if (appealType.getEnabled() == null) {
|
||||
appealType.setEnabled(true);
|
||||
}
|
||||
if (appealType.getSort() == null) {
|
||||
appealType.setSort(0);
|
||||
}
|
||||
appealTypeService.insertOrUpdate(appealType);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.type")
|
||||
@ApiOperation("删除申诉类型")
|
||||
@SLog(tag = "申诉管理-类型维护", msg = "删除申诉类型")
|
||||
public Result delete(@Param("id") String id) {
|
||||
appealTypeService.delete(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("申诉类型下拉")
|
||||
public Result options() {
|
||||
return Result.success(appealTypeService.query(Cnd.where("enabled", "=", true).asc("sort").desc("createdAt")));
|
||||
}
|
||||
}
|
||||
+161
@@ -0,0 +1,161 @@
|
||||
package com.budwk.app.zhgh.democratic.appeal.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.appeal.models.AppealInfo;
|
||||
import com.budwk.app.zhgh.democratic.appeal.models.AppealType;
|
||||
import com.budwk.app.zhgh.democratic.appeal.service.AppealInfoService;
|
||||
import com.budwk.app.zhgh.democratic.appeal.service.AppealTypeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/appeal/write")
|
||||
@Ok("json:full")
|
||||
@Api("申诉管理-提交申诉")
|
||||
public class AppealWriteController {
|
||||
|
||||
private static final String DEFINE_KEY = "SSGL";
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
@Inject
|
||||
private AppealInfoService appealInfoService;
|
||||
@Inject
|
||||
private AppealTypeService appealTypeService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/appeal/write/index.html")
|
||||
@SaCheckPermission("appeal.write")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.write")
|
||||
@ApiOperation("当前用户信息")
|
||||
public Result currentUserInfo() {
|
||||
View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId()));
|
||||
AppealInfo info = new AppealInfo();
|
||||
if (user != null) {
|
||||
info.setUserId(user.getId());
|
||||
info.setUserName(user.getUsername());
|
||||
info.setLoginName(user.getLoginname());
|
||||
info.setSex(user.getSex());
|
||||
info.setBirthday(user.getBirthday());
|
||||
info.setPolitical(user.getPolitical());
|
||||
info.setUnitId(user.getUnitId());
|
||||
info.setUnitName(user.getUnitName());
|
||||
info.setPositionName(user.getPosition());
|
||||
info.setMobile(user.getMobile());
|
||||
} else {
|
||||
info.setUserId(SecurityUtil.getUserId());
|
||||
info.setUserName(SecurityUtil.getUserUsername());
|
||||
info.setLoginName(SecurityUtil.getUserLoginname());
|
||||
info.setUnitId(SecurityUtil.getUnitId());
|
||||
}
|
||||
info.setApplyDate(new Date());
|
||||
return Result.success(info);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.write")
|
||||
@ApiOperation("获取申诉信息")
|
||||
public Result info(@Param("id") String id) {
|
||||
return Result.success(appealInfoService.fetch(id));
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.write")
|
||||
@ApiOperation("保存申诉")
|
||||
@SLog(tag = "申诉管理-提交申诉", msg = "保存申诉")
|
||||
public Result save(@Param("data") AppealInfo appealInfo) {
|
||||
fillTypeName(appealInfo);
|
||||
appealInfoService.insertOrUpdate(appealInfo);
|
||||
return Result.success(appealInfo);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.write")
|
||||
@ApiOperation("提交申诉")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "申诉管理-提交申诉", msg = "提交申诉")
|
||||
public Result submit(@Param("data") AppealInfo appealInfo) {
|
||||
fillTypeName(appealInfo);
|
||||
if (appealInfo.getApplyDate() == null) {
|
||||
appealInfo.setApplyDate(new Date());
|
||||
}
|
||||
appealInfo.setState("待受理");
|
||||
appealInfoService.insertOrUpdate(appealInfo);
|
||||
|
||||
Dict args = Dict.create();
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, appealInfo);
|
||||
args.set("appealDefendantUnitId", appealInfo.getDefendantUnitId());
|
||||
args.set("defendantUnitId", appealInfo.getDefendantUnitId());
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey(DEFINE_KEY, appealInfo.getId(), SecurityUtil.getUserId(), args);
|
||||
|
||||
// 自动完成开始节点任务,进入受理环节。
|
||||
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||
for (ProcessTask task : doingTaskList) {
|
||||
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||
}
|
||||
return Result.success(appealInfo);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("appeal.write")
|
||||
@ApiOperation("重新提交申诉")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "申诉管理-提交申诉", msg = "重新提交申诉")
|
||||
public Result submitAgain(@Param("data") AppealInfo appealInfo, @Param("taskId") Long taskId) {
|
||||
fillTypeName(appealInfo);
|
||||
appealInfo.setState("待受理");
|
||||
appealInfoService.insertOrUpdate(appealInfo);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||
dict.set(FlowConst.FORM_DATA, appealInfo);
|
||||
dict.set("appealDefendantUnitId", appealInfo.getDefendantUnitId());
|
||||
dict.set("defendantUnitId", appealInfo.getDefendantUnitId());
|
||||
flowCommonService.executeTask(dict);
|
||||
return Result.success(appealInfo);
|
||||
}
|
||||
|
||||
private void fillTypeName(AppealInfo appealInfo) {
|
||||
if (appealInfo == null || StrUtil.isBlank(appealInfo.getAppealTypeId())) {
|
||||
return;
|
||||
}
|
||||
AppealType type = appealTypeService.fetch(appealInfo.getAppealTypeId());
|
||||
if (type != null) {
|
||||
appealInfo.setAppealTypeName(type.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,215 @@
|
||||
package com.budwk.app.zhgh.democratic.appeal.models;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("appeal_info")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("教职工申诉")
|
||||
@Data
|
||||
public class AppealInfo extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("申诉人ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String userId;
|
||||
|
||||
@Column
|
||||
@Comment("申诉人姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String userName;
|
||||
|
||||
@Column
|
||||
@Comment("申诉人工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("性别")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String sex;
|
||||
|
||||
@Column
|
||||
@Comment("出生年月")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date birthday;
|
||||
|
||||
@Column
|
||||
@Comment("政治面貌")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String political;
|
||||
|
||||
@Column
|
||||
@Comment("所在单位ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unitId;
|
||||
|
||||
@Column
|
||||
@Comment("所在单位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unitName;
|
||||
|
||||
@Column
|
||||
@Comment("岗位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String positionName;
|
||||
|
||||
@Column
|
||||
@Comment("住址")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 300)
|
||||
private String address;
|
||||
|
||||
@Column
|
||||
@Comment("联系方式")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("申诉类型ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String appealTypeId;
|
||||
|
||||
@Column
|
||||
@Comment("申诉类型名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String appealTypeName;
|
||||
|
||||
@Column
|
||||
@Comment("被申诉单位ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String defendantUnitId;
|
||||
|
||||
@Column
|
||||
@Comment("被申诉单位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String defendantUnitName;
|
||||
|
||||
@Column
|
||||
@Comment("被申诉单位地址")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 300)
|
||||
private String defendantAddress;
|
||||
|
||||
@Column
|
||||
@Comment("被申诉单位联系方式")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String defendantContact;
|
||||
|
||||
@Column
|
||||
@Comment("申诉标题")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private String title;
|
||||
|
||||
@Column
|
||||
@Comment("申诉事项")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String appealMatter;
|
||||
|
||||
@Column
|
||||
@Comment("申诉理由")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String reason;
|
||||
|
||||
@Column
|
||||
@Comment("申诉要求")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String request;
|
||||
|
||||
@Column
|
||||
@Comment("申请日期")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date applyDate;
|
||||
|
||||
@Column
|
||||
@Comment("申诉人签名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String signature;
|
||||
|
||||
@Column
|
||||
@Comment("附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> files;
|
||||
|
||||
@Column
|
||||
@Comment("业务状态")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String state;
|
||||
|
||||
@Column
|
||||
@Comment("受理人ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String acceptUserId;
|
||||
|
||||
@Column
|
||||
@Comment("受理人姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String acceptUserName;
|
||||
|
||||
@Column
|
||||
@Comment("受理时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date acceptTime;
|
||||
|
||||
@Column
|
||||
@Comment("处理决定类型")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 80)
|
||||
private String decisionType;
|
||||
|
||||
@Column
|
||||
@Comment("处理决定")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String decisionContent;
|
||||
|
||||
@Column
|
||||
@Comment("事实理由及适用依据")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String legalBasis;
|
||||
|
||||
@Column
|
||||
@Comment("作出决定日期")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date decisionDate;
|
||||
|
||||
@Column
|
||||
@Comment("决定书附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> decisionFiles;
|
||||
|
||||
@Column
|
||||
@Comment("执行人ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String executeUserId;
|
||||
|
||||
@Column
|
||||
@Comment("执行人姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String executeUserName;
|
||||
|
||||
@Column
|
||||
@Comment("执行时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date executeTime;
|
||||
|
||||
@Column
|
||||
@Comment("执行情况")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String executeContent;
|
||||
|
||||
@Column
|
||||
@Comment("执行附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> executeFiles;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.budwk.app.zhgh.democratic.appeal.models;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("appeal_type")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("申诉类型")
|
||||
@Data
|
||||
public class AppealType extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("类型名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String name;
|
||||
|
||||
@Column
|
||||
@Comment("排序")
|
||||
@ColDefine(type = ColType.INT)
|
||||
@Default("0")
|
||||
private Integer sort;
|
||||
|
||||
@Column
|
||||
@Comment("是否启用")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
@Default("1")
|
||||
private Boolean enabled;
|
||||
|
||||
@Column
|
||||
@Comment("备注")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.budwk.app.zhgh.democratic.appeal.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.democratic.appeal.models.AppealInfo;
|
||||
|
||||
public interface AppealInfoService extends BaseService<AppealInfo> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.budwk.app.zhgh.democratic.appeal.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.democratic.appeal.models.AppealType;
|
||||
|
||||
public interface AppealTypeService extends BaseService<AppealType> {
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.budwk.app.zhgh.democratic.appeal.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.democratic.appeal.models.AppealInfo;
|
||||
import com.budwk.app.zhgh.democratic.appeal.service.AppealInfoService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class AppealInfoServiceImpl extends BaseServiceImpl<AppealInfo> implements AppealInfoService {
|
||||
public AppealInfoServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.budwk.app.zhgh.democratic.appeal.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.democratic.appeal.models.AppealType;
|
||||
import com.budwk.app.zhgh.democratic.appeal.service.AppealTypeService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class AppealTypeServiceImpl extends BaseServiceImpl<AppealType> implements AppealTypeService {
|
||||
public AppealTypeServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user