commit
This commit is contained in:
@@ -13,7 +13,7 @@ public class BillNoUtil {
|
||||
str.append(DateUtil.format(DateUtil.date(), "HHmmss"));
|
||||
Random random = new Random();
|
||||
// 生成一个10以内的随机数(包含0,但不包含10)
|
||||
int randomNumber = random.nextInt(10);
|
||||
int randomNumber = random.nextInt(10000);
|
||||
str.append("-" + randomNumber);
|
||||
return str.toString();
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.dao.CndPlus;
|
||||
import io.v.nutz.modules.models.PageForm;
|
||||
import io.v.nutz.oa.enums.OaBusinessTypeEnum;
|
||||
import io.v.nutz.oa.model.OaAuditInstance;
|
||||
import io.v.nutz.oa.service.IOaAuditInstanceService;
|
||||
import io.v.nutz.oa.service.impl.OaAuditInstanceServiceImpl;
|
||||
import io.v.nutz.proposal.constants.ProposalConstant;
|
||||
@@ -125,6 +126,7 @@ public class CaseReadController {
|
||||
}
|
||||
|
||||
cnd.asc("info.stateCode");
|
||||
|
||||
// proposalInfoService.sortAndSearch(cnd,page,search);
|
||||
Pagination pagination = (Pagination) proposalInfoService.initSql(sql, page, search, cnd);
|
||||
|
||||
@@ -194,39 +196,56 @@ public class CaseReadController {
|
||||
membersOpinions.add(proposalAudit.getId());
|
||||
proposalInfo.setMembersOpinions(membersOpinions);
|
||||
|
||||
// 搞下一个节点去
|
||||
ProposalProcessService processService = Mvcs.getIoc().get(ProposalProcessService.class);
|
||||
int nextStateCode = processService.getSomeNodeNextStateCode(proposalInfo.getStateCode(), ProposalStateDirectionEnum.NEXT);
|
||||
proposalInfo.setStateCode(nextStateCode);
|
||||
|
||||
|
||||
proposalInfoService.updateIgnoreNull(proposalInfo);
|
||||
|
||||
// 发待办
|
||||
IOaAuditInstanceService auditInstanceService = Mvcs.getIoc().get(OaAuditInstanceServiceImpl.class);
|
||||
try {
|
||||
// 发待办
|
||||
IOaAuditInstanceService auditInstanceService = Mvcs.getIoc().get(OaAuditInstanceServiceImpl.class);
|
||||
OaAuditInstance oaInstance = auditInstanceService.getByUser(OaBusinessTypeEnum.COMMITTEE_READ, ShiroUtil.getUserId());
|
||||
if (oaInstance != null) {
|
||||
|
||||
Sql userSql = Sqls.create("select su.* from sys_user su left join sys_user_role sur on su.id = sur.userid" +
|
||||
" where sur.roleId in (@roleId)");
|
||||
userSql.params().set("roleId", Arrays.asList(Roles.WYH_ZR,Roles.tmanage));
|
||||
userSql.setCallback(Sqls.callback.maps());
|
||||
dao.execute(userSql);
|
||||
List<NutMap> sysUsers = userSql.getList(NutMap.class);
|
||||
auditInstanceService.agree(oaInstance.getId(), ShiroUtil.getUserId(), "审核通过");
|
||||
}
|
||||
|
||||
if(Lang.isNotEmpty(sysUsers)) {
|
||||
List<String> userIds = sysUsers.stream().map(item-> { return item.getString("id"); }).collect(Collectors.toList());
|
||||
// 审核人员超过三个发待办
|
||||
if (membersOpinions.size() >= 3) {
|
||||
// 搞下一个节点去
|
||||
ProposalProcessService processService = Mvcs.getIoc().get(ProposalProcessService.class);
|
||||
int nextStateCode = processService.getSomeNodeNextStateCode(proposalInfo.getStateCode(), ProposalStateDirectionEnum.NEXT);
|
||||
proposalInfo.setStateCode(nextStateCode);
|
||||
proposalInfoService.updateIgnoreNull(proposalInfo);
|
||||
|
||||
Sys_user createUser = dao.fetch(Sys_user.class, proposalInfo.getCreateUser());
|
||||
String title = "提案委审核-" + proposalInfo.getProposalName() + "(" + proposalInfo.getProposalCode() + "[" + createUser.getUsername() + "]" + ")";
|
||||
String subTitle = createUser.getUsername() + "邀请您提案审核";
|
||||
Sql userSql = Sqls.create("select su.* from sys_user su left join sys_user_role sur on su.id = sur.userid" +
|
||||
" where sur.roleId in (@roleId)");
|
||||
userSql.params().set("roleId", Arrays.asList(Roles.WYH_ZR, Roles.tmanage));
|
||||
userSql.setCallback(Sqls.callback.maps());
|
||||
dao.execute(userSql);
|
||||
List<NutMap> sysUsers = userSql.getList(NutMap.class);
|
||||
|
||||
auditInstanceService.createTask(OaBusinessTypeEnum.PROPOSAL_COMMITTEE_AUDIT,
|
||||
proposalInfo.getId(),
|
||||
title,
|
||||
subTitle,
|
||||
createUser.getId(),
|
||||
userIds,
|
||||
Globals.AppDomain + "/platform/proposal/transact/case/case?proposalId=" + proposalInfo.getId(),
|
||||
Globals.AppDomain + "/platform/proposal/transact/case/case");
|
||||
}
|
||||
if (Lang.isNotEmpty(sysUsers)) {
|
||||
List<String> userIds = sysUsers.stream().map(item -> {
|
||||
return item.getString("id");
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
Sys_user createUser = dao.fetch(Sys_user.class, proposalInfo.getCreateUser());
|
||||
String title = "提案委审核-" + proposalInfo.getProposalName() + "(" + proposalInfo.getProposalCode() + "[" + createUser.getUsername() + "]" + ")";
|
||||
String subTitle = createUser.getUsername() + "邀请您提案审核";
|
||||
|
||||
auditInstanceService.createTask(OaBusinessTypeEnum.PROPOSAL_COMMITTEE_AUDIT,
|
||||
proposalInfo.getId(),
|
||||
title,
|
||||
subTitle,
|
||||
createUser.getId(),
|
||||
userIds,
|
||||
Globals.AppDomain + "/platform/proposal/transact/case/case?proposalId=" + proposalInfo.getId(),
|
||||
Globals.AppDomain + "/platform/proposal/transact/case/case");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
+34
-13
@@ -2,6 +2,7 @@ package io.v.nutz.proposal.services.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.page.Pagination;
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.modules.models.PageForm;
|
||||
import io.v.nutz.oa.enums.OaBusinessTypeEnum;
|
||||
import io.v.nutz.oa.service.IOaAuditInstanceService;
|
||||
@@ -27,8 +28,10 @@ import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -118,18 +121,36 @@ public class ProposalProposalPreAuditServiceImpl extends ViServiceImpl implement
|
||||
chain.add("stateCode", newStateCode);
|
||||
dao().update(ProposalInfo.class, chain, Cnd.where("id", "=", proposalId));
|
||||
|
||||
Sys_user createUser = dao().fetch(Sys_user.class, proposalInfo.getCreateUser());
|
||||
String title = "提案委成员审核-" + proposalInfo.getProposalName() + "(" + proposalInfo.getProposalCode() + "[" + createUser.getUsername() + "]" + ")";
|
||||
String subTitle = createUser.getUsername() + "邀请您提案审核";
|
||||
List<Sys_user> userList = dao().query(Sys_user.class, Cnd.where("loginname", "=", "20010021"));
|
||||
List<String> userIds = userList.stream().map(Sys_user::getId).collect(Collectors.toList());
|
||||
auditInstanceService.createTask(OaBusinessTypeEnum.COMMITTEE_READ,
|
||||
proposalInfo.getId(),
|
||||
title,
|
||||
subTitle,
|
||||
createUser.getId(),
|
||||
userIds,
|
||||
Globals.AppDomain + "/platform/proposal/transact/caseRead?proposalId=" + proposalInfo.getId(),
|
||||
Globals.AppDomain + "/platform/proposal/transact/caseRead");
|
||||
try {
|
||||
Sys_user createUser = dao().fetch(Sys_user.class, proposalInfo.getCreateUser());
|
||||
String title = "提案委成员审核-" + proposalInfo.getProposalName() + "(" + proposalInfo.getProposalCode() + "[" + createUser.getUsername() + "]" + ")";
|
||||
String subTitle = createUser.getUsername() + "邀请您提案审核";
|
||||
// 查询角色是提案委委员的用户
|
||||
Sql userSql = Sqls.create("select su.* from sys_user su left join sys_user_role sur on su.id = sur.userid" +
|
||||
" where sur.roleId in (@roleId)");
|
||||
userSql.params().set("roleId", Arrays.asList(Roles.JDH_TA_WXY_WY_ROLE_ID));
|
||||
userSql.setCallback(Sqls.callback.maps());
|
||||
dao().execute(userSql);
|
||||
List<NutMap> sysUsers = userSql.getList(NutMap.class);
|
||||
if (sysUsers == null || sysUsers.size() <= 0) {
|
||||
return;
|
||||
}
|
||||
List<String> userIds = sysUsers.stream().map(item -> {
|
||||
return item.getString("id");
|
||||
}).collect(Collectors.toList());
|
||||
for (String userId : userIds) {
|
||||
auditInstanceService.createTask(OaBusinessTypeEnum.COMMITTEE_READ,
|
||||
proposalInfo.getId(),
|
||||
title,
|
||||
subTitle,
|
||||
createUser.getId(),
|
||||
List.of(userId),
|
||||
Globals.AppDomain + "/platform/proposal/transact/caseRead?proposalId=" + proposalInfo.getId(),
|
||||
Globals.AppDomain + "/platform/proposal/transact/caseRead");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ layout("/mobile/platform.html"){
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<!--<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">联 系 人:</span>{{o.fzrname}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">电  话:</span>{{o.fzr_mobile}}</van-col>
|
||||
@@ -154,7 +154,7 @@ layout("/mobile/platform.html"){
|
||||
<van-col span="12"><span style="color: grey">会费标准:</span>{{o.dues_standard}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">限定人数:</span>{{o.number}}人</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<!--<van-row>
|
||||
<van-col span="12">
|
||||
<span style="color: grey">联 系 人:</span>
|
||||
<span>{{o.fzrname}}</span>
|
||||
@@ -135,7 +135,7 @@ layout("/mobile/platform.html"){
|
||||
<span style="color: grey">限定人数:</span>
|
||||
<span>{{o.number}}人</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</van-row>-->
|
||||
<van-row>
|
||||
<van-col span="12" class="cus_overflow">
|
||||
<span style="color: grey">入会状态:</span>
|
||||
|
||||
@@ -63,7 +63,7 @@ layout("/layouts/platform.html"){
|
||||
查看
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini"
|
||||
v-if="row.executorOpinion==null && row.resultCode!='notGive' && false"
|
||||
v-if="row.executorOpinion==null && row.resultCode!='notGive'"
|
||||
@click="openAudit(row.id,row)">
|
||||
审核
|
||||
</el-button>
|
||||
|
||||
@@ -62,7 +62,7 @@ layout("/layouts/platform.html"){
|
||||
查看
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini"
|
||||
v-if="row.executorOpinionConfirm==null && row.resultCode!='notGive' && false"
|
||||
v-if="row.executorOpinionConfirm==null && row.resultCode!='notGive'"
|
||||
@click="openAudit(row.id,row)">
|
||||
审核
|
||||
</el-button>
|
||||
|
||||
@@ -68,12 +68,12 @@ layout("/layouts/platform.html"){
|
||||
查看
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini"
|
||||
v-if="${@shiro.hasRole('principal')} && row.secretaryOpinions==null && row.resultCode!='notGive'&& false"
|
||||
v-if="${@shiro.hasRole('principal')} && row.secretaryOpinions==null && row.resultCode!='notGive'"
|
||||
@click="openAudit(row)">
|
||||
审阅
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini"
|
||||
v-if="${@shiro.hasRole('secretary')} && row.secretaryOpinionsAgain==null && row.resultCode!='notGive' && false"
|
||||
v-if="${@shiro.hasRole('secretary')} && row.secretaryOpinionsAgain==null && row.resultCode!='notGive'"
|
||||
@click="openAudit(row)">
|
||||
审阅
|
||||
</el-button>
|
||||
|
||||
Reference in New Issue
Block a user