commit
This commit is contained in:
@@ -56,6 +56,7 @@ RoleConstant {
|
|||||||
TEACHER_CONGRESS_DELEGATION_HEAD("教代会代表团团长"),
|
TEACHER_CONGRESS_DELEGATION_HEAD("教代会代表团团长"),
|
||||||
TEACHER_CONGRESS_VICE_DELEGATION_HEAD("教代会代表团副团长"),
|
TEACHER_CONGRESS_VICE_DELEGATION_HEAD("教代会代表团副团长"),
|
||||||
TEACHER_CONGRESS_DELEGATION_CONTACT("教代会代表团联络人"),
|
TEACHER_CONGRESS_DELEGATION_CONTACT("教代会代表团联络人"),
|
||||||
|
TEACHER_CONGRESS_DELEGATION_QUALIFICATION("教代会代表资格审查员"),
|
||||||
|
|
||||||
PROPOSAL_COMMITTEE_DIRECTOR("提案委员会主任"),
|
PROPOSAL_COMMITTEE_DIRECTOR("提案委员会主任"),
|
||||||
PROPOSAL_COMMITTEE_DEPUTY_DIRECTOR("提案委员会副主任"),
|
PROPOSAL_COMMITTEE_DEPUTY_DIRECTOR("提案委员会副主任"),
|
||||||
|
|||||||
+61
@@ -0,0 +1,61 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @version 1.0
|
||||||
|
* @Author FKY
|
||||||
|
* @name:FlowQualificationReviewGroupByArgsAssignmentHandler
|
||||||
|
* @Date 2025/12/9 10:21
|
||||||
|
* @注释 获取代表资格审查组成员
|
||||||
|
*/
|
||||||
|
public class FlowQualificationReviewGroupByArgsAssignmentHandler implements AssignmentHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> assign(TaskModel model, Execution execution) {
|
||||||
|
String sessionId = execution.getArgs().getStr("sessionId");
|
||||||
|
|
||||||
|
if (StrUtil.isBlank(sessionId)) {
|
||||||
|
throw new BaseException("参数 sessionId 不能为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
|
||||||
|
Sys_role role = sysRoleService.getByCode(RoleConstant.TEACHER_CONGRESS_DELEGATION_QUALIFICATION);
|
||||||
|
|
||||||
|
List<Sys_user_role> roles = ServiceContext.find(Dao.class).query(
|
||||||
|
Sys_user_role.class,
|
||||||
|
Cnd.where(Sys_user_role::getRoleId, "=", role.getId())
|
||||||
|
.and(Sys_user_role::getTcSessionId, "=", sessionId)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (Lang.isEmpty(roles)) {
|
||||||
|
throw new RuntimeException("未获取到当前届次的代表资格审查小组,无法流转到下一步,请联系校工会进行设置。");
|
||||||
|
}
|
||||||
|
return roles.stream().map(Sys_user_role::getUserId).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMessage() {
|
||||||
|
return "获取代表资格审查组成员(通用版本,根据args中的sessionId)";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getOrder() {
|
||||||
|
return AssignmentHandler.super.getOrder();
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
-4
@@ -2,8 +2,10 @@ package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.i
|
|||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models.ActivityReimbursementInfo;
|
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models.ActivityReimbursementInfo;
|
||||||
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementService;
|
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementService;
|
||||||
@@ -87,10 +89,12 @@ public class ActivityReimbursementServiceImpl extends BaseServiceImpl<ActivityRe
|
|||||||
cnd.and("YEAR(ab.applyDate)", "=", DateUtil.thisYear());
|
cnd.and("YEAR(ab.applyDate)", "=", DateUtil.thisYear());
|
||||||
cnd.and("ins.state", "=", 20);
|
cnd.and("ins.state", "=", 20);
|
||||||
cnd.and("ab.outlayManageSource", "=", outlayManageSource);
|
cnd.and("ab.outlayManageSource", "=", outlayManageSource);
|
||||||
if (Objects.equals("ACTIVITY_BUDGET_TYPE_TWO", outlayManageSource)) {
|
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
||||||
cnd.and("ab.unionId", "=", SecurityUtil.getUnionId());
|
if (Objects.equals("ACTIVITY_BUDGET_TYPE_TWO", outlayManageSource)) {
|
||||||
} else if (Objects.equals("ACTIVITY_BUDGET_TYPE_THREE", outlayManageSource)) {
|
cnd.and("ab.unionId", "=", SecurityUtil.getUnionId());
|
||||||
cnd.and("ab.clubId", "=", clubId);
|
} else if (Objects.equals("ACTIVITY_BUDGET_TYPE_THREE", outlayManageSource)) {
|
||||||
|
cnd.and("ab.clubId", "=", clubId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
List<NutMap> budgetList = listMap(sql);
|
List<NutMap> budgetList = listMap(sql);
|
||||||
|
|||||||
+48
-17
@@ -225,10 +225,17 @@ layout("/layouts/platform.html"){
|
|||||||
budgetOption: []
|
budgetOption: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'formData.activityType': function(newVal, oldVal) {
|
||||||
|
if (newVal !== oldVal) {
|
||||||
|
this.$set(this.formData, "deductionBudgetId", null)
|
||||||
|
this.getBudgetByYear()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getBudgetByYear() {
|
getBudgetByYear() {
|
||||||
this.budgetOption = []
|
this.budgetOption = []
|
||||||
this.$set(this.formData, "deductionBudgetId", null)
|
|
||||||
let outlayManageSource = ""
|
let outlayManageSource = ""
|
||||||
if (this.formData.activityType === "SCHOOL_UNION") {
|
if (this.formData.activityType === "SCHOOL_UNION") {
|
||||||
outlayManageSource = "ACTIVITY_BUDGET_TYPE_ONE"
|
outlayManageSource = "ACTIVITY_BUDGET_TYPE_ONE"
|
||||||
@@ -237,13 +244,15 @@ layout("/layouts/platform.html"){
|
|||||||
} else if (this.formData.activityType === "CLUB") {
|
} else if (this.formData.activityType === "CLUB") {
|
||||||
outlayManageSource = "ACTIVITY_BUDGET_TYPE_THREE"
|
outlayManageSource = "ACTIVITY_BUDGET_TYPE_THREE"
|
||||||
}
|
}
|
||||||
this.$axios.post('/platform/activityReimbursement/apply/getBudgetByYear', {
|
|
||||||
|
return this.$axios.post('/platform/activityReimbursement/apply/getBudgetByYear', {
|
||||||
outlayManageSource: outlayManageSource,
|
outlayManageSource: outlayManageSource,
|
||||||
clubId: this.formData.clubId
|
clubId: this.formData.clubId
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.budgetOption = res.data
|
this.budgetOption = res.data
|
||||||
}
|
}
|
||||||
|
return res.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
@@ -309,11 +318,15 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 设置申报主体名称
|
// 设置申报主体名称
|
||||||
setDeclareUnitName(val) {
|
setDeclareUnitName(val) {
|
||||||
const club = this.clubList.find(v => v.id === val)
|
const club = this.clubList.find(v => v.id === val)
|
||||||
this.$set(this.formData, "declareUnitName", club ? club.clubName : null)
|
this.$set(this.formData, "declareUnitName", club ? club.clubName : null)
|
||||||
|
|
||||||
|
// 清空当前预算选择,因为社团变更会影响可选的预算
|
||||||
|
this.$set(this.formData, "deductionBudgetId", null)
|
||||||
|
|
||||||
|
// 获取新的预算数据
|
||||||
this.getBudgetByYear()
|
this.getBudgetByYear()
|
||||||
},
|
},
|
||||||
// 申请类型选中
|
// 申请类型选中
|
||||||
@@ -323,25 +336,43 @@ layout("/layouts/platform.html"){
|
|||||||
} else if (val === "BRANCH_UNION") {
|
} else if (val === "BRANCH_UNION") {
|
||||||
this.$set(this.formData, "declareUnitName", this.$store.state.user.union.name)
|
this.$set(this.formData, "declareUnitName", this.$store.state.user.union.name)
|
||||||
this.$set(this.formData, "unionId", this.$store.state.user.union.id)
|
this.$set(this.formData, "unionId", this.$store.state.user.union.id)
|
||||||
|
} else if (val === "CLUB") {
|
||||||
|
// 当活动类型变为社团时,清空已选择的预算
|
||||||
|
this.$set(this.formData, "deductionBudgetId", null)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.$set(this.formData, "deductionBudgetId", null)
|
||||||
this.getBudgetByYear()
|
this.getBudgetByYear()
|
||||||
},
|
},
|
||||||
findOne(id) {
|
async findOne(id) {
|
||||||
this.$axios.post("/platform/activityDeclare/mine/findOne", {id})
|
try {
|
||||||
.then((res) => {
|
const res = await this.$axios.post("/platform/activityDeclare/mine/findOne", {id})
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.formData = res.data
|
|
||||||
if (res.data.clubId) {
|
|
||||||
this.setDeclareUnitName(res.data.clubId)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (res.data.planStartTime && res.data.planEndTime) {
|
const originalBudgetId = res.data.deductionBudgetId
|
||||||
this.$set(this.formData, "planDate", [res.data.planStartTime, res.data.planEndTime])
|
|
||||||
}
|
this.formData = {...res.data}
|
||||||
} else {
|
this.$set(this.formData, "deductionBudgetId", null) // 先清空
|
||||||
this.$message.error(res.msg)
|
|
||||||
|
if (res.data.clubId) {
|
||||||
|
this.setDeclareUnitName(res.data.clubId)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
await this.getBudgetByYear()
|
||||||
|
|
||||||
|
// 预算数据加载完成后,再设置选中的预算ID
|
||||||
|
if (originalBudgetId) {
|
||||||
|
this.$set(this.formData, "deductionBudgetId", originalBudgetId)
|
||||||
|
}
|
||||||
|
if (res.data.planStartTime && res.data.planEndTime) {
|
||||||
|
this.$set(this.formData, "planDate", [res.data.planStartTime, res.data.planEndTime])
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.msg)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
this.$message.error("获取数据失败:" + error.message)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async initActivityTypeList() {
|
async initActivityTypeList() {
|
||||||
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
|
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
|
||||||
|
|||||||
Reference in New Issue
Block a user