commit
This commit is contained in:
@@ -53,14 +53,14 @@ public enum ProposalAuditEnum {
|
||||
if (flag == 0) {
|
||||
newStateCode = ProposalState.DELEGATION_BACK;
|
||||
proposalSecondedService.clear(Cnd.where("proposalId", "=", audit.getProposalId()));
|
||||
String rollBackTemplate = "{}团长审核并退回了您的[{}]提案,请您通过门户网站或企业微信登录到智慧工会平台修改并重新邀请附议人";
|
||||
String rollBackTemplate = "{}团长审核并退回了您的[{}]提案,请您通过门户网站或钉钉登录到智慧工会平台修改并重新邀请附议人";
|
||||
} else if (flag == 1) {
|
||||
//通过
|
||||
newStateCode = proposalProcessService.getStateCode(info.getId(), ProposalStateDirectionEnum.NEXT, false);
|
||||
} else {
|
||||
//建议撤销
|
||||
newStateCode = ProposalState.DELEGATION_REVOKE;
|
||||
String rollBackTemplate = "{}团长审核并建议撤销了您的[{}]提案,请您通过门户网站或企业微信登录到智慧工会平台修改并重新邀请附议人";
|
||||
String rollBackTemplate = "{}团长审核并建议撤销了您的[{}]提案,请您通过门户网站或钉钉登录到智慧工会平台修改并重新邀请附议人";
|
||||
// msgApi.sendMsg(StrUtil.format(rollBackTemplate, audit.getUsername(), info.getProposalName()), List.of(proposalCreater.getLoginname()));
|
||||
}
|
||||
audit.setFlag(flag == 1);
|
||||
@@ -77,7 +77,7 @@ public enum ProposalAuditEnum {
|
||||
//退回
|
||||
ProposalToDoHandler.CREATE_TEAM_LEADER_BACK_TASK.exec(info.getId(), nutMap);
|
||||
} else if (flag == 1) {
|
||||
//通过
|
||||
//通过,杭医是到提案工作组组长审阅
|
||||
ProposalToDoHandler.CREATE_CASE_TASK.exec(info.getId(), nutMap);
|
||||
} else if (flag == 2) {
|
||||
//建议撤销
|
||||
|
||||
@@ -52,16 +52,16 @@ public interface ProposalState {
|
||||
*/
|
||||
Integer UNITREPLY = 500;
|
||||
|
||||
/**
|
||||
* 待反馈评分
|
||||
*/
|
||||
Integer FEEDBACKSCORE = 600;
|
||||
|
||||
/**
|
||||
* 分管校领导审批
|
||||
*/
|
||||
Integer LEADER_SUFFIX_AUDIT = 700;
|
||||
|
||||
/**
|
||||
* 待反馈评分
|
||||
*/
|
||||
Integer FEEDBACKSCORE = 800;
|
||||
|
||||
/**
|
||||
* 已完结
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.v.nutz.zhgh.proposal.constants;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.ViResource;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
@@ -164,6 +165,48 @@ public enum ProposalToDoHandler {
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 提案工作组组长审阅待办
|
||||
*/
|
||||
CREATE_PROPOSAL_TEAM_LEADER_REVIEW_TASK() {
|
||||
@Override
|
||||
public void exec(String proposalId, NutMap extra) {
|
||||
localProcessService.createTask(
|
||||
"proposal_info@" + proposalId,
|
||||
"proposalTeamLeaderRAuditId",
|
||||
"待提案工作组组长查阅",
|
||||
ShiroUtil.getUserId(),
|
||||
proposalCommonService.getCommitteeLeader(proposalId),
|
||||
"/platform/proposal/transact/caseRead",
|
||||
"/platform/proposal/transact/caseRead",
|
||||
null,
|
||||
null
|
||||
);
|
||||
localProcessService.updateProcessNodeName(
|
||||
"proposal_info@" + proposalId,
|
||||
"待提案工作组组长查阅"
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 提案工作组组长完成待办
|
||||
*/
|
||||
COMPLETE_PROPOSAL_TEAM_LEADER_REVIEW_TASK() {
|
||||
@Override
|
||||
public void exec(String proposalId, NutMap extra) {
|
||||
//完成待办
|
||||
localProcessService.completeTask(
|
||||
"proposalTeamLeaderRAuditId",
|
||||
"proposal_info@" + proposalId,
|
||||
ShiroUtil.getUserId(),
|
||||
extra.getString("opinion")
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 创建委员会待办
|
||||
*/
|
||||
@@ -173,7 +216,7 @@ public enum ProposalToDoHandler {
|
||||
localProcessService.createTask(
|
||||
"proposal_info@" + proposalId,
|
||||
"caseAuditId",
|
||||
"待提案委员会立案",
|
||||
"待提案工作组立案审核",
|
||||
ShiroUtil.getUserId(),
|
||||
proposalCommonService.getCommitteeLeader(proposalId),
|
||||
"/platform/proposal/transact/case/case",
|
||||
@@ -183,7 +226,7 @@ public enum ProposalToDoHandler {
|
||||
);
|
||||
localProcessService.updateProcessNodeName(
|
||||
"proposal_info@" + proposalId,
|
||||
"待提案委员会立案"
|
||||
ObjectUtil.defaultIfBlank(extra.getString("opinion"), "待提案工作组立案审核")
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
+36
@@ -303,4 +303,40 @@ public class ProposalUndertakeController {
|
||||
sql.setCondition(cnd);
|
||||
return sysUserService.list(sql);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置其他单位为承办单位负责人
|
||||
* @param id 单位Id
|
||||
* @param userId 用户Id
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("proposal.basics.undertake")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doAdminOtherUnit(@Param("unitId") String id, @Param("userId") String userId){
|
||||
// 删除该用户在承办单位负责人
|
||||
sysUserRoleService.clear(Cnd.where("userId", "=", userId).and("cbdwid", "=", id)
|
||||
.and("roleId", "=", Roles.CONTRACTOR_PERSON));
|
||||
|
||||
Sys_user_role sysUserRole = new Sys_user_role();
|
||||
sysUserRole.setUserId(userId);
|
||||
sysUserRole.setCbdwid(id);
|
||||
sysUserRole.setRoleId(Roles.CONTRACTOR_PERSON);
|
||||
sysUserRoleService.insert(sysUserRole);
|
||||
|
||||
// 删除该用户二级单位负责人
|
||||
ProposalUndertake proposalUndertake = dao.fetch(ProposalUndertake.class, id);
|
||||
dao.clear(Sys_user_role.class, Cnd.where("userId", "=", userId).and("roleId", "=", Roles.UNIT_MANGER)
|
||||
.and("unitid", "=", proposalUndertake.getUnitCode()));
|
||||
sysUserRole.setRoleId(Roles.UNIT_MANGER);
|
||||
sysUserRole.setCbdwid(null);
|
||||
sysUserRole.setUnitid(proposalUndertake.getUnitCode());
|
||||
sysUserRoleService.insert(sysUserRole);
|
||||
|
||||
// 清缓存
|
||||
sysUserService.deleteCacheAndUpdate(userId);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -55,7 +55,7 @@ public class ProposalAllFinishedQueryController {
|
||||
@Param(value = "searchKeyword2",required = false)String searchKeyword2) {
|
||||
CndPlus cnd = CndPlus.create();
|
||||
|
||||
cnd.andEx("info.stateCode", "=", stateCode);
|
||||
// cnd.andEx("info.stateCode", "=", stateCode);
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "A06", "tamange"})) {
|
||||
if (ShiroUtil.hasAnyRoles("jdhdbt01,jdhdbt02")) {
|
||||
@@ -146,9 +146,9 @@ public class ProposalAllFinishedQueryController {
|
||||
group.orLike("su.loginname", search.getCreateUser());
|
||||
cnd.and(group);
|
||||
}
|
||||
cnd.andEx("info.delegationId", "=", search.getDelegationId());
|
||||
cnd.andEx("su.unionId", "=", search.getUnionId());
|
||||
cnd.andEx("su.unitId", "=", search.getUnitId());
|
||||
cnd.andEX("info.delegationId", "=", search.getDelegationId());
|
||||
cnd.andEX("su.unionId", "=", search.getUnionId());
|
||||
cnd.andEX("su.unitId", "=", search.getUnitId());
|
||||
cnd.groupBy("info.id");
|
||||
cnd.desc("info.proposalCode");
|
||||
sql.setCondition(cnd);
|
||||
|
||||
+8
-4
@@ -133,9 +133,11 @@ public class ProposalBranchLeaderSuffixAuditController {
|
||||
@POST
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions("proposal.transact.branchLeaderPrefixAudit")
|
||||
// @RequiresPermissions("proposal.transact.branchLeaderPrefixAudit")
|
||||
@RequiresPermissions("proposal.transact.branchLeaderSuffixAudit")
|
||||
@SLog(type = "proposal", tag = "分管领导审批答复", msg = "分管领导审批答复")
|
||||
public Object doAudit(@Param(value = "sign", required = false) String sign, @Param("audit") ProposalAudit proposalAudit, @Param("pblsaId") String pblsaId) {
|
||||
String proposalId = proposalAudit.getProposalId();
|
||||
//签字
|
||||
String signId = null;
|
||||
if (StrUtil.isNotBlank(sign)) {
|
||||
@@ -150,10 +152,12 @@ public class ProposalBranchLeaderSuffixAuditController {
|
||||
.add("auditId", proposalAudit.getId()),
|
||||
Cnd.where("id", "=", pblsaId));
|
||||
|
||||
dao.update(ProposalInfo.class, Chain.make("stateCode", ProposalState.FINISH), Cnd.where("id", "=", proposalAudit.getProposalId()));
|
||||
dao.update(ProposalInfo.class, Chain.make("stateCode", ProposalState.FEEDBACKSCORE), Cnd.where("id", "=", proposalId));
|
||||
ProposalToDoHandler.COMPLETE_BRANCH_LEADER_SUFFIX_AUDIT_TASK.exec(proposalId, NutMap.NEW().addv("pblsaId", pblsaId).addv("opinion", proposalAudit.getOpinion()));
|
||||
|
||||
//反馈评分待办
|
||||
ProposalToDoHandler.CREATE_FEEDBACK_TASK.exec(proposalId, null);
|
||||
|
||||
ProposalToDoHandler.COMPLETE_BRANCH_LEADER_SUFFIX_AUDIT_TASK.exec(proposalAudit.getProposalId(), NutMap.NEW().addv("pblsaId", pblsaId).addv("opinion", proposalAudit.getOpinion()));
|
||||
ProposalToDoHandler.COMPLETE_PROCESS.exec(proposalAudit.getProposalId(), null);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
+21
-11
@@ -10,6 +10,8 @@ import io.v.nutz.base.dao.CndPlus;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.zhgh.proposal.constants.ProposalConstant;
|
||||
import io.v.nutz.zhgh.proposal.constants.ProposalState;
|
||||
import io.v.nutz.zhgh.proposal.constants.ProposalStateDirectionEnum;
|
||||
import io.v.nutz.zhgh.proposal.constants.ProposalToDoHandler;
|
||||
import io.v.nutz.zhgh.proposal.models.ProposalAudit;
|
||||
import io.v.nutz.zhgh.proposal.models.ProposalInfo;
|
||||
import io.v.nutz.zhgh.proposal.models.ProposalSearch;
|
||||
@@ -19,6 +21,7 @@ import io.v.nutz.sys.models.Sys_user_role;
|
||||
import io.v.nutz.sys.models.User;
|
||||
import io.v.nutz.sys.services.SysSignatureService;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.proposal.services.ProposalProcessService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
@@ -46,6 +49,8 @@ public class ProposalCaseReadController {
|
||||
|
||||
@Inject
|
||||
private ProposalInfoService proposalInfoService;
|
||||
@Inject
|
||||
private ProposalProcessService proposalProcessService;
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@@ -114,17 +119,17 @@ public class ProposalCaseReadController {
|
||||
// proposalInfoService.sortAndSearch(cnd,page,search);
|
||||
Pagination pagination = (Pagination) proposalInfoService.initSql(sql, page, search, cnd);
|
||||
|
||||
List<NutMap> list = pagination.getList();
|
||||
for (NutMap map : list) {
|
||||
if (StrUtil.isNotBlank(search.getIsAudit()) && "true".equals(search.getIsAudit())) {
|
||||
String membersOpinions = map.getString("membersOpinions");
|
||||
List<String> mlist = Json.fromJsonAsList(String.class, membersOpinions);
|
||||
map.putAll(getCommitteeOpinion(mlist));
|
||||
} else {
|
||||
map.putAll(NutMap.NEW().addv("caseNum", "暂无")
|
||||
.addv("opinionNum", "暂无").addv("notGiveNum", "暂无"));
|
||||
}
|
||||
}
|
||||
// List<NutMap> list = pagination.getList();
|
||||
// for (NutMap map : list) {
|
||||
// if (StrUtil.isNotBlank(search.getIsAudit()) && "true".equals(search.getIsAudit())) {
|
||||
// String membersOpinions = map.getString("membersOpinions");
|
||||
// List<String> mlist = Json.fromJsonAsList(String.class, membersOpinions);
|
||||
// map.putAll(getCommitteeOpinion(mlist));
|
||||
// } else {
|
||||
// map.putAll(NutMap.NEW().addv("caseNum", "暂无")
|
||||
// .addv("opinionNum", "暂无").addv("notGiveNum", "暂无"));
|
||||
// }
|
||||
// }
|
||||
// pagination.setList(list);
|
||||
return pagination;
|
||||
}
|
||||
@@ -180,6 +185,11 @@ public class ProposalCaseReadController {
|
||||
membersOpinions.add(proposalAudit.getId());
|
||||
proposalInfo.setMembersOpinions(membersOpinions);
|
||||
proposalInfoService.updateIgnoreNull(proposalInfo);
|
||||
// // 提案小组组长审核后,修改提案状态之后,流程开始往下走
|
||||
// proposalInfo.setStateCode(proposalProcessService.getStateCode(proposalId, ProposalStateDirectionEnum.NEXT, false));
|
||||
// ProposalToDoHandler.COMPLETE_PROPOSAL_TEAM_LEADER_REVIEW_TASK.exec(proposalInfo.getId(), NutMap.NEW().setv("opinion", "提案工作组组长审阅完成"));
|
||||
// // 创建校党委审议待办
|
||||
// ProposalToDoHandler.CREATE_CASE_TASK.exec(proposalInfo.getId(), NutMap.NEW().setv("opinion", "提案工作组组长审阅完成"));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
+3
-12
@@ -200,18 +200,9 @@ public class ProposalFeedbackScoreController {
|
||||
ProposalToDoHandler.CREATE_UNDERTAKE_TASK.exec(proposalFeedback.getProposalId(), null);
|
||||
|
||||
} else {
|
||||
dao.update(ProposalInfo.class, Chain.make("stateCode", ProposalState.LEADER_SUFFIX_AUDIT), Cnd.where("id", "=", proposalFeedback.getProposalId()));
|
||||
|
||||
//插入领导审批记录
|
||||
ProposalBranchLeaderSuffixAudit leaderSuffixAudit = new ProposalBranchLeaderSuffixAudit();
|
||||
leaderSuffixAudit.setProposalId(proposalFeedback.getProposalId());
|
||||
leaderSuffixAudit.setUnderTakeId(lastReply.getReplyUnitId());
|
||||
leaderSuffixAudit.setIsMaster(true);
|
||||
leaderSuffixAudit.setIsAudit(false);
|
||||
dao.insert(leaderSuffixAudit);
|
||||
|
||||
ProposalToDoHandler.CREATE_BRANCH_LEADER_SUFFIX_AUDIT_TASK.exec(proposalFeedback.getProposalId(), NutMap.NEW().addv("leaderSuffixAudit", leaderSuffixAudit));
|
||||
|
||||
// 流程结束
|
||||
dao.update(ProposalInfo.class, Chain.make("stateCode", ProposalState.FINISH), Cnd.where("id", "=", lastReply.getProposalId()));
|
||||
ProposalToDoHandler.COMPLETE_PROCESS.exec(lastReply.getProposalId(), null);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
+97
-12
@@ -1,16 +1,19 @@
|
||||
package io.v.nutz.zhgh.proposal.controller.transact;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import cn.wizzer.framework.base.service.BaseService;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.MsgApi;
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.base.dao.CndPlus;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.sys.models.Sys_local_process_instance;
|
||||
import io.v.nutz.sys.models.Sys_local_process_instance_task;
|
||||
import io.v.nutz.web.commons.base.Globals;
|
||||
import io.v.nutz.zhgh.proposal.constants.ProposalMannerEnum;
|
||||
import io.v.nutz.zhgh.proposal.constants.ProposalState;
|
||||
import io.v.nutz.zhgh.proposal.constants.ProposalStateDirectionEnum;
|
||||
import io.v.nutz.zhgh.proposal.constants.ProposalToDoHandler;
|
||||
import io.v.nutz.zhgh.proposal.models.ProposalInfo;
|
||||
import io.v.nutz.zhgh.proposal.models.ProposalSearch;
|
||||
@@ -41,11 +44,8 @@ import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@@ -62,25 +62,20 @@ public class ProposalMineController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
@Inject
|
||||
private MsgApi msgApi;
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@Inject
|
||||
private SysUserService sysUserService;
|
||||
|
||||
@Inject
|
||||
private SysSignatureService sysSignatureService;
|
||||
|
||||
@Inject
|
||||
private ProposalInfoService proposalInfoService;
|
||||
|
||||
@Inject("ProposalSeconded")
|
||||
private ViService<ProposalSeconded> secondedService;
|
||||
|
||||
@Inject
|
||||
private ProposalProcessService proposalProcessService;
|
||||
|
||||
@Inject
|
||||
private SysLocalProcessService sysLocalProcessService;
|
||||
|
||||
@@ -235,11 +230,23 @@ public class ProposalMineController {
|
||||
ProposalSeconded seconded = new ProposalSeconded();
|
||||
seconded.setProposalId(proposalId);
|
||||
seconded.setSeconderId(userId);
|
||||
seconded.setInviteTime(DateUtil.getDate());
|
||||
seconded.setInviteTime(cn.hutool.core.date.DateUtil.now());
|
||||
return seconded;
|
||||
}).collect(Collectors.toList());
|
||||
dao.insert(secondedList);
|
||||
|
||||
String linkUrl = Globals.AppDomain + "/mobile/proposal/seconded";
|
||||
// 提案人信息
|
||||
Sys_user sysUser = dao.fetch(Sys_user.class, Cnd.where("id", "=", proposalInfo.getCreateUser()));
|
||||
// 附议人发送短信
|
||||
List<Sys_user> userList = dao.query(Sys_user.class, Cnd.where("id", "in", users));
|
||||
for (Sys_user user : userList) {
|
||||
String template = "{}代表,您好,{}代表的提案《{}》邀请您作为附议人,请您点击此消息或登录“智慧工会”系统进行附议,感谢您对教代会提案工作的大力支持!";
|
||||
String content = StrUtil.format(template, user.getUsername(), sysUser.getUsername(), proposalInfo.getProposalName());
|
||||
System.out.println(content);
|
||||
msgApi.sendMsg(List.of("DingTalk"), user.getLoginname(), 2, "提案附议邀请", content, "", linkUrl);
|
||||
}
|
||||
|
||||
ProposalToDoHandler.CREATE_SECONDED_TASK.exec(proposalId, NutMap.NEW().addv("secondedList", secondedList));
|
||||
|
||||
return null;
|
||||
@@ -485,4 +492,82 @@ public class ProposalMineController {
|
||||
return secondedService.listMap(sql);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 撤回提案
|
||||
* @param proposalId
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions("proposal.transact.compose")
|
||||
public Object doRevoke(String proposalId) {
|
||||
// 提案撰写人信息
|
||||
Sql userSql = Sqls.create("""
|
||||
SELECT
|
||||
u.loginname,
|
||||
u.username,
|
||||
info.id AS proposalId,
|
||||
info.proposalName
|
||||
FROM
|
||||
proposal_info info
|
||||
LEFT JOIN sys_user u ON info.createUser = u.id
|
||||
WHERE
|
||||
info.id = @proposalId
|
||||
""").setParam("proposalId", proposalId);
|
||||
userSql.setCallback(Sqls.callback.map());
|
||||
dao.execute(userSql);
|
||||
NutMap userMap = (NutMap) userSql.getResult();
|
||||
|
||||
|
||||
// 查询出这个提案下的所有附议人,发送提案撤销消息
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
ps.*,
|
||||
u.loginname,
|
||||
u.username
|
||||
FROM
|
||||
proposal_seconded ps
|
||||
LEFT JOIN sys_user u ON ps.seconderId = u.id
|
||||
WHERE
|
||||
ps.proposalId = @proposalId
|
||||
""").setParam("proposalId", proposalId);
|
||||
sql.setCallback(Sqls.callback.maps());
|
||||
dao.execute(sql);
|
||||
List<NutMap> secondedList = (List<NutMap>) sql.getResult();
|
||||
|
||||
// 同意的附议人
|
||||
List<NutMap> agreeList = secondedList.stream().filter(v -> "1".equals(v.getString("isAgree"))).toList();
|
||||
// 没有附议的人员
|
||||
List<NutMap> noSecondedList = secondedList.stream().filter(v -> StrUtil.isBlank(v.getString("isAgree"))).toList();
|
||||
|
||||
if (Lang.isNotEmpty(agreeList)) {
|
||||
// 循环发送消息
|
||||
for (NutMap map : agreeList) {
|
||||
String template = "{}代表,您好,您附议的提案《{}》已被{}代表(起草人)撤回重新修改,特此告知,烦请知悉。感谢您对教代会提案工作的大力支持!";
|
||||
String content = StrUtil.format(template, map.getString("username"),
|
||||
userMap.getString("proposalName"), userMap.getString("username"));
|
||||
msgApi.sendMsg(List.of("DingTalk"), map.getString("loginname"), 1, "提案重新起草通知", content, "", "");
|
||||
}
|
||||
}
|
||||
|
||||
if (Lang.isNotEmpty(noSecondedList)) {
|
||||
for (NutMap map : noSecondedList) {
|
||||
String template = "{}代表,您好,您附议的提案《{}》已被{}代表(起草人)撤回重新修改,您已无需附议。特此告知,烦请知悉。感谢您对教代会提案工作的大力支持!";
|
||||
String content = StrUtil.format(template, map.getString("username"),
|
||||
userMap.getString("proposalName"), userMap.getString("username"));
|
||||
msgApi.sendMsg(List.of("DingTalk"), map.getString("loginname"), 1, "提案无需附议通知", content, "", "");
|
||||
}
|
||||
}
|
||||
|
||||
dao.update(ProposalInfo.class, Chain.make("stateCode", ProposalState.UNSUBMIT), Cnd.where("id", "=", proposalId));
|
||||
dao.clear(ProposalSeconded.class, Cnd.where("proposalId", "=", proposalId));
|
||||
|
||||
dao.clear(Sys_local_process_instance.class, Cnd.where("processUniqueId", "=", "proposal_info@" + proposalId));
|
||||
dao.clear(Sys_local_process_instance_task.class, Cnd.where("processUniqueId", "=", "proposal_info@" + proposalId));
|
||||
|
||||
ProposalToDoHandler.START_PROCESS.exec(proposalId, null);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
package io.v.nutz.zhgh.proposal.controller.transact;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.page.Pagination;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.MsgApi;
|
||||
import io.v.nutz.base.dao.CndPlus;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
@@ -210,7 +210,7 @@ public class ProposalSecondedController {
|
||||
ProposalConfig proposalConfig = dao.fetch(ProposalConfig.class);
|
||||
//签字
|
||||
String seconderSignId = sysSignatureService.insert(new Sys_signature(seconderSign)).getId();
|
||||
dao.update(ProposalSeconded.class, Chain.make("isAgree", flag).add("seconderSignId", seconderSignId).add("secondedTime", DateUtil.getDate()), Cnd.where("id", "=", secondedId));
|
||||
dao.update(ProposalSeconded.class, Chain.make("isAgree", flag).add("seconderSignId", seconderSignId).add("secondedTime", DateUtil.now()), Cnd.where("id", "=", secondedId));
|
||||
|
||||
//完成附议待办
|
||||
ProposalToDoHandler.COMPLETE_SECONDED_TASK.exec(proposalId, NutMap.NEW().addv("secondedId", secondedId));
|
||||
@@ -224,7 +224,7 @@ public class ProposalSecondedController {
|
||||
long agreeCount = secondedList.stream().filter(v -> v.getInt("isAgree") == 1).count();
|
||||
if (agreeCount == proposalConfig.getSeconderNum() || (proposalInfo.getStateCode().equals(ProposalState.INVIRTE) && agreeCount > proposalConfig.getSeconderNum())) {
|
||||
int stateCode = proposalProcessService.getSomeNodeNextStateCode(ProposalState.INVIRTE, ProposalStateDirectionEnum.NEXT);
|
||||
dao.update(ProposalInfo.class, Chain.make("stateCode", stateCode), Cnd.where("id", "=", proposalId));
|
||||
dao.update(ProposalInfo.class, Chain.make("stateCode", stateCode).add("secondReminderTime", DateUtil.date()), Cnd.where("id", "=", proposalId));
|
||||
|
||||
ProposalToDoHandler.CREATE_TEAM_LEADER_TASK.exec(proposalId, null);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -247,6 +248,21 @@ public class ProposalInfo extends BaseModel implements Serializable {
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private Boolean caseCheckNeedSecondAudit;
|
||||
|
||||
@Column
|
||||
@Comment("上次催办时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date lastReminderTime;
|
||||
|
||||
@Column
|
||||
@Comment("附议完成的时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date secondReminderTime;
|
||||
|
||||
@Column
|
||||
@Comment("上次团长催办的时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date lastDelegationReminderTime;
|
||||
|
||||
/*---------------审核相关 end ---------------*/
|
||||
|
||||
public List<NutMap> emptyList() {
|
||||
|
||||
@@ -3,6 +3,8 @@ package io.v.nutz.zhgh.proposal.models;
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author: Aaron
|
||||
* @create: 2021-01-25 11:03
|
||||
@@ -49,4 +51,8 @@ public class ProposalSeconded {
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private Boolean isAgree;
|
||||
|
||||
@Column
|
||||
@Comment("上次催办时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date lastReminderTime;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ package io.v.nutz.zhgh.proposal.services;
|
||||
*/
|
||||
public interface ProposalSecondedService {
|
||||
|
||||
String TZ_TEMPLATE = "[{}]提案待您审核,请您通过门户网站或企业微信登录智慧工会平台进行审核";
|
||||
String TZ_TEMPLATE = "[{}]提案待您审核,请您通过门户网站或钉钉登录智慧工会平台进行审核";
|
||||
|
||||
/**
|
||||
* 发送信息给提案人的团长
|
||||
|
||||
+9
-7
@@ -196,13 +196,15 @@ public class ProposalCaseConfirmServiceImpl extends ViServiceImpl implements Pro
|
||||
//完成审核待办
|
||||
ProposalToDoHandler.COMPLETE_CASE_UNIT_TASK.exec(id, null);
|
||||
|
||||
if (resultCode.equals(ProposalConstant.DETERMINE)) {
|
||||
//推送分管校领导审批待办
|
||||
ProposalToDoHandler.CREATE_BRANCH_LEADER_PREFIX_AUDIT_TASK.exec(id, NutMap.NEW().addv("hostBranchAudit", hostBranchAudit));
|
||||
} else if (resultCode.equals(ProposalConstant.OPINION)) {
|
||||
//推送承办单位答复待办
|
||||
ProposalToDoHandler.CREATE_UNDERTAKE_TASK.exec(id, null);
|
||||
}
|
||||
// if (resultCode.equals(ProposalConstant.DETERMINE)) {
|
||||
// //推送分管校领导审批待办
|
||||
// ProposalToDoHandler.CREATE_BRANCH_LEADER_PREFIX_AUDIT_TASK.exec(id, NutMap.NEW().addv("hostBranchAudit", hostBranchAudit));
|
||||
// } else if (resultCode.equals(ProposalConstant.OPINION)) {
|
||||
// //推送承办单位答复待办
|
||||
// ProposalToDoHandler.CREATE_UNDERTAKE_TASK.exec(id, null);
|
||||
// }
|
||||
//推送承办单位答复待办
|
||||
ProposalToDoHandler.CREATE_CASE_UNIT_TASK.exec(id, null);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,12 +229,9 @@ public class ProposalCaseServiceImpl extends ViServiceImpl implements ProposalCa
|
||||
|
||||
ProposalToDoHandler.COMPLETE_CASE_TASK.exec(id,NutMap.NEW().addv("opinion",audit.getOpinion()));
|
||||
|
||||
if (resultCode.equals(ProposalConstant.NOTGIVE)) {
|
||||
sysLocalProcessService.completeProcess("proposal_info@" + id);
|
||||
} else if (resultCode.equals(ProposalConstant.DETERMINE)) {
|
||||
ProposalToDoHandler.CREATE_CASE_UNIT_TASK.exec(id,null);
|
||||
} else if (resultCode.equals(ProposalConstant.OPINION)) {
|
||||
ProposalToDoHandler.CREATE_CASE_UNIT_TASK.exec(id,null);
|
||||
switch (resultCode) {
|
||||
case ProposalConstant.NOTGIVE -> sysLocalProcessService.completeProcess("proposal_info@" + id);
|
||||
case ProposalConstant.DETERMINE, ProposalConstant.OPINION -> ProposalToDoHandler.CREATE_CASE_UNIT_TASK.exec(id, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,9 +26,7 @@ import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@@ -216,11 +214,30 @@ public class ProposalCommonServiceImpl extends ViServiceImpl implements Proposal
|
||||
basicInfo.setv("caseUnitAudit", null);
|
||||
}
|
||||
|
||||
// 承办单位提出意见
|
||||
Sql underTakeFirstOpinionSql = Sqls.create("""
|
||||
SELECT
|
||||
po.*,
|
||||
pu.unitName AS underTakeName
|
||||
FROM
|
||||
proposal_under_take_first_opinion po
|
||||
LEFT JOIN proposal_undertake pu ON pu.id = po.underTakeId
|
||||
WHERE
|
||||
po.proposalId = @proposalId
|
||||
""").setParam("proposalId", proposalId);
|
||||
List<NutMap> underTakeFirstOpinionList = proposalAuditService.listMap(underTakeFirstOpinionSql);
|
||||
if (Lang.isNotEmpty(underTakeFirstOpinionList)) {
|
||||
basicInfo.setv("underTakeFirstOpinion", underTakeFirstOpinionList);
|
||||
} else {
|
||||
basicInfo.setv("underTakeFirstOpinion", null);
|
||||
}
|
||||
|
||||
|
||||
//分管校领导审批立案
|
||||
Sql branchCaseSql = Sqls.create("select auditId from proposal_branch_leader_audit where proposalId = @proposalId");
|
||||
branchCaseSql.setParam("proposalId", proposalId);
|
||||
String[] branchCaseArray = (String[]) Daos.query(dao(), branchCaseSql.toString(), Sqls.callback.strs());
|
||||
if (Lang.isNotEmpty(branchCaseArray)) {
|
||||
if (Lang.isNotEmpty(branchCaseArray) && !Arrays.stream(branchCaseArray).allMatch(Objects::isNull)) {
|
||||
basicInfo.setv("branchLeaderOpinion", CollectionUtil.addAll(new ArrayList<>(), proposalAuditService.getAuditRecordList(branchCaseArray)));
|
||||
} else {
|
||||
basicInfo.setv("branchLeaderOpinion", Collections.emptyList());
|
||||
|
||||
@@ -66,11 +66,11 @@ public class ProposalConfigServiceImpl extends ViServiceImpl<ProposalConfig> imp
|
||||
|
||||
dao().updateWith(config, null);
|
||||
|
||||
Sys_dict dict = sysDictService.fetch(Cnd.where("code", "=", "proposal_manner"));
|
||||
sysDictService.update(Chain.make("disabled", true), Cnd.where("parentId", "=", Strings.sNull(dict.getId())));
|
||||
for (String s : mannerList) {
|
||||
sysDictService.update(Chain.make("disabled", false), Cnd.where("id", "=", s));
|
||||
}
|
||||
// Sys_dict dict = sysDictService.fetch(Cnd.where("code", "=", "proposal_manner"));
|
||||
// sysDictService.update(Chain.make("disabled", true), Cnd.where("parentId", "=", Strings.sNull(dict.getId())));
|
||||
// for (String s : mannerList) {
|
||||
// sysDictService.update(Chain.make("disabled", false), Cnd.where("id", "=", s));
|
||||
// }
|
||||
|
||||
Jdh_jdhxx latestJdh = dao().fetch(Jdh_jdhxx.class, Cnd.where("jdhkqzt", "=", 1).desc("jdhkqsj"));
|
||||
if (latestJdh != null) {
|
||||
|
||||
+59
-33
@@ -171,7 +171,9 @@ public class ProposalExportServiceImpl extends BaseServiceImpl implements Propos
|
||||
}
|
||||
|
||||
|
||||
Sql oneAuditRecordSql = Sqls.create("""
|
||||
List<NutMap> oneAuditRecordList = new ArrayList<>();
|
||||
if (StrUtil.isNotBlank(nutMap.getString("caseAuditId"))) {
|
||||
Sql oneAuditRecordSql = Sqls.create("""
|
||||
SELECT
|
||||
pa.*,
|
||||
sign.`data` auditSign
|
||||
@@ -180,22 +182,23 @@ public class ProposalExportServiceImpl extends BaseServiceImpl implements Propos
|
||||
LEFT JOIN sys_signature sign ON sign.id = pa.signId
|
||||
where pa.id in (@id)
|
||||
""").setParam("id", Json.fromJsonAsList(String.class, nutMap.getString("caseAuditId")));
|
||||
List<NutMap> oneAuditRecordList = proposalInfoService.listMap(oneAuditRecordSql);
|
||||
if (Lang.isNotEmpty(oneAuditRecordList)) {
|
||||
oneAuditRecordList.forEach(v -> {
|
||||
try {
|
||||
v.setv("auditSign", StrUtil.isNotBlank(v.getString("auditSign")) ? getImg(v.getString("auditSign")) : null);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (nutMap.getString("resultCode").equals("determine")) {
|
||||
v.setv("resultAudit", "经提案工作委员会研究,符合提案立案条件,予以立案,此提案建议由%s办理,%s协办。".formatted(nutMap.getString("under1Unit"), (Strings.isNotBlank(nutMap.getString("under2Unit")) ? nutMap.getString("under2Unit") : "暂无")));
|
||||
} else if (nutMap.getString("resultCode").equals("opinion")) {
|
||||
v.setv("resultAudit", "作为意见建议转送参考");
|
||||
} else {
|
||||
v.setv("resultAudit", "该提案不予立项,不予立案原因属于以下提案内容");
|
||||
}
|
||||
});
|
||||
oneAuditRecordList = proposalInfoService.listMap(oneAuditRecordSql);
|
||||
if (Lang.isNotEmpty(oneAuditRecordList)) {
|
||||
oneAuditRecordList.forEach(v -> {
|
||||
try {
|
||||
v.setv("auditSign", StrUtil.isNotBlank(v.getString("auditSign")) ? getImg(v.getString("auditSign")) : null);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if ("determine".equals(nutMap.getString("resultCode"))) {
|
||||
v.setv("resultAudit", "经提案工作组审理,符合提案立案条件,予以立案,此提案建议由%s办理,%s协办。".formatted(nutMap.getString("under1Unit"), (Strings.isNotBlank(nutMap.getString("under2Unit")) ? nutMap.getString("under2Unit") : "暂无")));
|
||||
} else if ("opinion".equals(nutMap.getString("resultCode"))) {
|
||||
v.setv("resultAudit", "作为意见建议转送参考");
|
||||
} else {
|
||||
v.setv("resultAudit", "该提案不予立项,不予立案原因属于以下提案内容");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Sql branchCaseSql = Sqls.create("select auditId from proposal_branch_leader_audit where proposalId = @proposalId AND isMaster=true").setParam("proposalId", proposalId);
|
||||
@@ -302,30 +305,53 @@ public class ProposalExportServiceImpl extends BaseServiceImpl implements Propos
|
||||
}
|
||||
|
||||
|
||||
// Sql leaderListSql = Sqls.create("""
|
||||
// SELECT
|
||||
// pr.*,
|
||||
// pu.unitName,
|
||||
// u.username,
|
||||
// u.loginname,
|
||||
// sign.`data`
|
||||
// FROM
|
||||
// proposal_reply pr
|
||||
// LEFT JOIN proposal_undertake pu ON pu.id = pr.replyUnitId
|
||||
// LEFT JOIN `user` u ON u.id = pr.leaderId
|
||||
// LEFT JOIN sys_signature sign ON sign.id=pr.leaderSignId
|
||||
// WHERE
|
||||
// pr.proposalId = @proposalId
|
||||
// AND pr.leaderId IS NOT NULL
|
||||
// And pr.undertakeType=1
|
||||
// ORDER BY
|
||||
// pr.undertakeType ASC,
|
||||
// pr.leaderCheckNumber ASC
|
||||
// """).setParam("proposalId", proposalId);
|
||||
// List<NutMap> leaderList = proposalInfoService.listMap(leaderListSql);
|
||||
// if (Lang.isNotEmpty(leaderList)) {
|
||||
// leaderList.forEach(v -> {
|
||||
// v.setv("replyContent", Html2Text.toPlainText(v.getString("replyContent")));
|
||||
// });
|
||||
// }
|
||||
|
||||
Sql leaderListSql = Sqls.create("""
|
||||
SELECT
|
||||
pr.*,
|
||||
pu.unitName,
|
||||
u.username,
|
||||
u.loginname,
|
||||
sign.`data`
|
||||
pa.username,
|
||||
sign.`data`,
|
||||
pa.auditTime AS replyTime,
|
||||
pa.opinion AS leaderCheckOpinion
|
||||
FROM
|
||||
proposal_reply pr
|
||||
LEFT JOIN proposal_undertake pu ON pu.id = pr.replyUnitId
|
||||
LEFT JOIN `user` u ON u.id = pr.leaderId
|
||||
LEFT JOIN sys_signature sign ON sign.id=pr.leaderSignId
|
||||
proposal_branch_leader_suffix_audit pblsa
|
||||
LEFT JOIN `proposal_audit` pa ON pa.id = pblsa.auditId
|
||||
LEFT JOIN `sys_signature` sign ON sign.id = pa.signId
|
||||
WHERE
|
||||
pr.proposalId = @proposalId
|
||||
AND pr.leaderId IS NOT NULL
|
||||
And pr.undertakeType=1
|
||||
ORDER BY
|
||||
pr.undertakeType ASC,
|
||||
pr.leaderCheckNumber ASC
|
||||
pblsa.proposalId = @proposalId
|
||||
AND pblsa.isAudit = 1
|
||||
ORDER BY
|
||||
createdAt DESC
|
||||
""").setParam("proposalId", proposalId);
|
||||
List<NutMap> leaderList = proposalInfoService.listMap(leaderListSql);
|
||||
if (Lang.isNotEmpty(leaderList)) {
|
||||
leaderList.forEach(v -> {
|
||||
v.setv("replyContent", Html2Text.toPlainText(v.getString("replyContent")));
|
||||
v.setv("leaderCheckOpinion", Html2Text.toPlainText(v.getString("leaderCheckOpinion")));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -81,9 +81,9 @@ public class ProposalReplyServiceImpl extends ViServiceImpl<ProposalReply> imple
|
||||
|
||||
Sql sql = Sqls.create(COMMON_SQL);
|
||||
if (StrUtil.isNotBlank(search.getIsAudit())) {
|
||||
int isReply = search.getIsAudit().equals("true") ? 1 : 0;
|
||||
int isReply = "true".equals(search.getIsAudit()) ? 1 : 0;
|
||||
sql.setVar("temp_sql", "AND isReply = %d group by proposalId".formatted(isReply));
|
||||
cnd.and("info.stateCode", search.getIsAudit().equals("true") ? ">=" : "=", ProposalState.UNITREPLY);
|
||||
cnd.and("info.stateCode", "true".equals(search.getIsAudit()) ? ">=" : "=", ProposalState.UNITREPLY);
|
||||
} else {
|
||||
sql.setVar("temp_sql", "group by proposalId");
|
||||
cnd.and("info.stateCode", ">=", ProposalState.UNITREPLY);
|
||||
@@ -137,8 +137,8 @@ public class ProposalReplyServiceImpl extends ViServiceImpl<ProposalReply> imple
|
||||
|
||||
// cnd.and("pr.replyUnitId", "in", manageUnderTakeIds);
|
||||
if (Strings.isNotBlank(search.getIsAudit())) {
|
||||
cnd.and("pr.isReply", "=", search.getIsAudit().equals("true") ? 1 : 0);
|
||||
cnd.and("info.stateCode", search.getIsAudit().equals("true") ? ">=" : "=", ProposalState.UNITREPLY);
|
||||
cnd.and("pr.isReply", "=", "true".equals(search.getIsAudit()) ? 1 : 0);
|
||||
cnd.and("info.stateCode", "true".equals(search.getIsAudit()) ? ">=" : "=", ProposalState.UNITREPLY);
|
||||
} else {
|
||||
cnd.and("info.stateCode", ">=", ProposalState.UNITREPLY);
|
||||
}
|
||||
@@ -307,7 +307,6 @@ public class ProposalReplyServiceImpl extends ViServiceImpl<ProposalReply> imple
|
||||
chain.add("isReply", isSave ? 0 : 1);
|
||||
chain.add("replyFiles", reply.getReplyFiles());
|
||||
|
||||
|
||||
List<String> conjoin = proposalCommonService.findConjoin(proposalId);
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("proposalId", "in", conjoin);
|
||||
@@ -325,9 +324,15 @@ public class ProposalReplyServiceImpl extends ViServiceImpl<ProposalReply> imple
|
||||
if (proposalInfo.getResultCode().equals(ProposalConstant.DETERMINE)) {
|
||||
int stateCode = proposalProcessService.getStateCode(proposalId, ProposalStateDirectionEnum.NEXT, false);
|
||||
proposalInfo.setStateCode(stateCode);
|
||||
//插入领导审批记录
|
||||
ProposalBranchLeaderSuffixAudit leaderSuffixAudit = new ProposalBranchLeaderSuffixAudit();
|
||||
leaderSuffixAudit.setProposalId(proposalId);
|
||||
leaderSuffixAudit.setUnderTakeId(replyUnitId);
|
||||
leaderSuffixAudit.setIsMaster(true);
|
||||
leaderSuffixAudit.setIsAudit(false);
|
||||
dao().insert(leaderSuffixAudit);
|
||||
|
||||
//反馈评分待办
|
||||
ProposalToDoHandler.CREATE_FEEDBACK_TASK.exec(proposalId, null);
|
||||
ProposalToDoHandler.CREATE_BRANCH_LEADER_SUFFIX_AUDIT_TASK.exec(proposalId, NutMap.NEW().addv("leaderSuffixAudit", leaderSuffixAudit));
|
||||
} else {
|
||||
proposalInfo.setStateCode(ProposalState.FINISH);
|
||||
//流程完结
|
||||
|
||||
Reference in New Issue
Block a user