commit
This commit is contained in:
@@ -57,6 +57,6 @@ public class SysUserAllRenewJob implements Job {
|
||||
param.setUpdateMode(SysDataUpdateMode.ALL.name());
|
||||
param.setConditionGroup(conditionGroup);
|
||||
|
||||
// sysDataUserUpdateService.update(param);
|
||||
sysDataUserUpdateService.update(param);
|
||||
}
|
||||
}
|
||||
|
||||
+39
-6
@@ -60,19 +60,25 @@ public class ProposalPositiveSecondedController {
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/proposal/transact/positiveSeconded/index.html")
|
||||
@SaCheckPermission(value = {"proposal.positiveSeconded", "proposal.positiveSeconded.h5"}, mode = SaMode.OR)
|
||||
@SaCheckPermission(value = {"proposal.seconded", "h5.proposal.seconded"}, mode = SaMode.OR)
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/democratic/proposal/transact/positiveSeconded/index.html")
|
||||
@SaCheckPermission(value = {"proposal.positiveSeconded", "proposal.positiveSeconded.h5"}, mode = SaMode.OR)
|
||||
@SaCheckPermission(value = {"proposal.seconded", "h5.proposal.seconded"}, mode = SaMode.OR)
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission(value = {"proposal.positiveSeconded", "proposal.positiveSeconded.h5"}, mode = SaMode.OR)
|
||||
@SaCheckPermission(value = {"proposal.seconded", "h5.proposal.seconded"}, mode = SaMode.OR)
|
||||
public Result pageData(@Valid ProposalSearchParam pageForm, boolean approval) {
|
||||
// 主动附议查询规则:
|
||||
// 1. 受邀附议的提案不能出现在主动附议中;
|
||||
// 2. 自己发起的提案不能出现在主动附议“未附议”中;
|
||||
// 3. 主动附议“未附议”只展示:未被邀请、不是自己写、自己还没主动附议过的提案;
|
||||
// 4. 主动附议“已附议”只展示:本人已经主动附议过的提案,不混入受邀附议记录;
|
||||
// 5. 受邀附议识别同时兼容 proposal_second.mode=1 的新数据和 second 节点办理人的历史流程数据。
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
@@ -104,7 +110,34 @@ public class ProposalPositiveSecondedController {
|
||||
cnd.and("ps.seconderId", "=", SecurityUtil.getUserId());
|
||||
cnd.and("ps.mode", "=", false);
|
||||
cnd.and("ps.isAgree", "is not", null);
|
||||
// 已附议列表也排除“被邀请附议”的提案,保证这里只展示主动附议记录。
|
||||
cnd.and(new Static("info.id not in (select proposalId from proposal_second where seconderId = '%s' and mode = 1)".formatted(SecurityUtil.getUserId())));
|
||||
cnd.and(new Static("""
|
||||
info.id not in (
|
||||
select ins2.businessNo
|
||||
from wf_process_instance ins2
|
||||
inner join wf_process_task t2 on t2.processInstanceId = ins2.id and t2.taskName = 'second'
|
||||
inner join wf_process_task_actor ta2 on ta2.processTaskId = t2.id
|
||||
where ta2.actorId = '%s'
|
||||
)
|
||||
""".formatted(SecurityUtil.getUserId())));
|
||||
} else {
|
||||
// 未附议列表中排除自己发起的提案,已附议列表保留本人已主动附议记录。
|
||||
cnd.and("info.createdBy", "!=", SecurityUtil.getUserId());
|
||||
// 主动附议列表只查询当前用户可主动附议的提案。
|
||||
// 这里同时兼容两类受邀附议识别方式:
|
||||
// 1. proposal_second.mode = 1 的新数据;
|
||||
// 2. 流程中存在当前用户的 second 节点办理记录的历史数据。
|
||||
cnd.and(new Static("info.id not in (select proposalId from proposal_second where seconderId = '%s' and mode = 1)".formatted(SecurityUtil.getUserId())));
|
||||
cnd.and(new Static("""
|
||||
info.id not in (
|
||||
select ins2.businessNo
|
||||
from wf_process_instance ins2
|
||||
inner join wf_process_task t2 on t2.processInstanceId = ins2.id and t2.taskName = 'second'
|
||||
inner join wf_process_task_actor ta2 on ta2.processTaskId = t2.id
|
||||
where ta2.actorId = '%s'
|
||||
)
|
||||
""".formatted(SecurityUtil.getUserId())));
|
||||
cnd.and(new Static("info.id not in (select proposalId from proposal_second where seconderId = '%s' and isAgree is not null)".formatted(SecurityUtil.getUserId())));
|
||||
}
|
||||
|
||||
@@ -119,7 +152,7 @@ public class ProposalPositiveSecondedController {
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("主动附议")
|
||||
@SLog(tag = "提案管理系统-主动附议", msg = "主动附议")
|
||||
@SaCheckPermission(value = {"proposal.positiveSeconded", "proposal.positiveSeconded.h5"}, mode = SaMode.OR)
|
||||
@SaCheckPermission(value = {"proposal.seconded", "h5.proposal.seconded"}, mode = SaMode.OR)
|
||||
public Result handle(@Param("proposalId") String proposalId,
|
||||
@Param("opinion") String opinion,
|
||||
@Param("submitType") Integer submitType) {
|
||||
@@ -158,14 +191,14 @@ public class ProposalPositiveSecondedController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission(value = {"proposal.positiveSeconded", "proposal.positiveSeconded.h5"}, mode = SaMode.OR)
|
||||
@SaCheckPermission(value = {"proposal.seconded", "h5.proposal.seconded"}, mode = SaMode.OR)
|
||||
public Result listPositiveSeconded(String bizId) {
|
||||
List<ProposalSecond> list = dao.query(ProposalSecond.class, Cnd.where(ProposalSecond::getProposalId, "=", bizId).and(ProposalSecond::getMode, "=", false));
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission(value = {"proposal.positiveSeconded", "proposal.positiveSeconded.h5"}, mode = SaMode.OR)
|
||||
@SaCheckPermission(value = {"proposal.seconded", "h5.proposal.seconded"}, mode = SaMode.OR)
|
||||
public Result validateTime() {
|
||||
ProposalConfig config = dao.fetch(ProposalConfig.class, Cnd.NEW());
|
||||
if(System.currentTimeMillis() < config.getSecondedStartTime().getTime()) {
|
||||
|
||||
+10
-4
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.controller.transact;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
@@ -60,19 +61,24 @@ public class ProposalSecondedController {
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/proposal/transact/seconded/index.html")
|
||||
@SaCheckPermission("proposal.seconded")
|
||||
@SaCheckPermission(value = {"proposal.seconded", "h5.proposal.seconded"}, mode = SaMode.OR)
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/democratic/proposal/transact/seconded/index.html")
|
||||
@SaCheckPermission("proposal.seconded")
|
||||
@SaCheckPermission(value = {"proposal.seconded", "h5.proposal.seconded"}, mode = SaMode.OR)
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.seconded")
|
||||
@SaCheckPermission(value = {"proposal.seconded", "h5.proposal.seconded"}, mode = SaMode.OR)
|
||||
public Result pageData(@Valid ProposalSearchParam pageForm, boolean approval) {
|
||||
// 受邀附议查询规则:
|
||||
// 1. 只查询流程中的 second 节点任务,即“被邀请附议”的提案;
|
||||
// 2. 未附议:查询当前用户待办中的 second 任务;
|
||||
// 3. 已附议:查询当前用户已办/中断的 second 任务;
|
||||
// 4. 这里不处理主动附议口径,主动附议由 positiveSeconded 独立查询。
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
@@ -134,7 +140,7 @@ public class ProposalSecondedController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.seconded")
|
||||
@SaCheckPermission(value = {"proposal.seconded", "h5.proposal.seconded"}, mode = SaMode.OR)
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("修改提案附议信息")
|
||||
@SLog(tag = "提案管理系统-附议提案", msg = "修改提案附议信息")
|
||||
|
||||
Reference in New Issue
Block a user