commit
This commit is contained in:
+129
@@ -1,5 +1,30 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.controller;
|
||||
|
||||
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.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.vo.CommonPageParam;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.declare.models.ActivityDeclareInfo;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.declare.service.ActivityDeclareService;
|
||||
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.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 javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
@@ -7,5 +32,109 @@ package com.budwk.app.zhgh.activity.declarereimbursement.declare.controller;
|
||||
* @Date 2025/7/31 15:46
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报")
|
||||
@At("/platform/activityDeclare/apply")
|
||||
public class ActivityDeclareApplyController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private ActivityDeclareService activityDeclareService;
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityDeclare.apply")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/apply/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityDeclare.apply")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/apply/form.html")
|
||||
public void form() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityDeclare.apply")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/apply/view.html")
|
||||
public void view() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("活动申报,我的申请列表")
|
||||
@SaCheckPermission("activityDeclare.apply")
|
||||
public Result pageData(CommonPageParam pageParam) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.id,
|
||||
info.userName,
|
||||
info.loginName,
|
||||
info.applyTime,
|
||||
info.activityName,
|
||||
info.activityAddress,
|
||||
info.startTime,
|
||||
info.endTime,
|
||||
info.declareUnitName,
|
||||
info.activityType,
|
||||
info.activityContent,
|
||||
info.activityNumber,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(SELECT MAX(id) FROM wf_process_task WHERE processInstanceId = ins.id AND taskName = 'startTask') AS startTaskId
|
||||
FROM
|
||||
activity_declare_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.taskState = 10
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
pageParam.buildSearch(cnd, "info.");
|
||||
if (StrUtil.isAllBlank(pageParam.getPageOrderName(), pageParam.getPageOrderBy())) {
|
||||
cnd.desc("info.applyTime");
|
||||
} else {
|
||||
cnd.orderBy("info." + pageParam.getPageOrderName(), PageUtil.getOrder(pageParam.getPageOrderBy()));
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = activityDeclareService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
|
||||
return Result.success().addData(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("活动申报,查看活动申报")
|
||||
@SaCheckPermission("activityDeclare.apply")
|
||||
public Result findOne(@Valid String id) {
|
||||
ActivityDeclareInfo info = dao.fetch(ActivityDeclareInfo.class, id);
|
||||
return Result.success().addData(info);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("删除活动申报")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("member.apply.submit")
|
||||
@SLog(tag = "活动申报", msg = "删除活动申报id: ${args[0]}")
|
||||
public Result onDelete(@Valid String id) {
|
||||
dao.clear(ActivityDeclareInfo.class, Cnd.where("id", "=", id));
|
||||
// 删除流程相关
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.vo.CommonPageParam;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.declare.service.ActivityDeclareService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.dao.Dao;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityDeclareBranchUnionController
|
||||
* @Date 2025/8/1 10:15
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,分工会管理员审核")
|
||||
@At("/platform/activityDeclare/branchUnion")
|
||||
public class ActivityDeclareBranchUnionController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private ActivityDeclareService activityDeclareService;
|
||||
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityDeclare.branchUnion")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/branchunion/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityDeclare.branchUnion")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/branchunion/form.html")
|
||||
public void form() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("分工会审核列表")
|
||||
@SaCheckPermission("activityDeclare.branchUnion")
|
||||
public Result pageData(CommonPageParam pageParam) {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityDeclareClubPrincipalController
|
||||
* @Date 2025/8/1 10:15
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,协会负责人审核")
|
||||
@At("/platform/activityDeclare/clubPrincipal")
|
||||
public class ActivityDeclareClubPrincipalController {
|
||||
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityDeclare.clubPrincipal")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/clubprincipal/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityDeclare.clubPrincipal")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/clubprincipal/form.html")
|
||||
public void form() {
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityDeclareSchoolPrincipalController
|
||||
* @Date 2025/8/1 10:16
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,校工会负责人审核")
|
||||
@At("/platform/activityDeclare/schoolPrincipal")
|
||||
public class ActivityDeclareSchoolPrincipalController {
|
||||
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityDeclare.schoolPrincipal")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/schoolprincipal/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityDeclare.schoolPrincipal")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/schoolprincipal/form.html")
|
||||
public void form() {
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityDeclareSchoolUnionController
|
||||
* @Date 2025/8/1 10:16
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,校工会审核")
|
||||
@At("/platform/activityDeclare/schoolUnion")
|
||||
public class ActivityDeclareSchoolUnionController {
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityDeclare.schoolUnion")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/schoolunion/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityDeclare.schoolUnion")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/schoolunion/form.html")
|
||||
public void form() {
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.interceptor;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityDeclareInterceptor
|
||||
* @Date 2025/8/1 11:05
|
||||
* @注释
|
||||
*/
|
||||
public class ActivityDeclareInterceptor {
|
||||
}
|
||||
+110
-1
@@ -1,9 +1,15 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.models;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.vo.ActivityBudget;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.Table;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
@@ -13,6 +19,109 @@ import org.nutz.dao.entity.annotation.Table;
|
||||
* @注释
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ActivityDeclareInfo extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("年份")
|
||||
@ColDefine(type = ColType.INT, width = 4)
|
||||
private Integer year;
|
||||
|
||||
@Column
|
||||
@Comment("申请人id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String userId;
|
||||
|
||||
@Column
|
||||
@Comment("申报人工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("申报人姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String userName;
|
||||
|
||||
@Column
|
||||
@Comment("联系方式")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("申报单位(校工会/二级工会名称/协会名称)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private String declareUnitName;
|
||||
|
||||
@Column
|
||||
@Comment("工会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("协会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String clubId;
|
||||
|
||||
@Column
|
||||
@Comment("申请时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date applyTime;
|
||||
|
||||
@Column
|
||||
@Comment("用户签字")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String sign;
|
||||
|
||||
@Column
|
||||
@Comment("活动名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String activityName;
|
||||
|
||||
@Column
|
||||
@Comment("活动地址")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 150)
|
||||
private String activityAddress;
|
||||
|
||||
@Column
|
||||
@Comment("活动开始时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String startTime;
|
||||
|
||||
@Column
|
||||
@Comment("活动结束时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String endTime;
|
||||
|
||||
@Column
|
||||
@Comment("活动类型")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String activityType;
|
||||
|
||||
@Column
|
||||
@Comment("活动内容")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String activityContent;
|
||||
|
||||
@Column
|
||||
@Comment("活动人数")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String activityNumber;
|
||||
|
||||
@Column
|
||||
@Comment("附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> files;
|
||||
|
||||
@Column
|
||||
@Comment("活动经费预算")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<ActivityBudget> budgets;
|
||||
|
||||
}
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.declare.models.ActivityDeclareInfo;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityDeclareService
|
||||
* @Date 2025/8/1 9:09
|
||||
* @注释
|
||||
*/
|
||||
public interface ActivityDeclareService extends BaseService<ActivityDeclareInfo> {
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.declare.models.ActivityDeclareInfo;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.declare.service.ActivityDeclareService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityDeclareServiceImpl
|
||||
* @Date 2025/8/1 9:10
|
||||
* @注释
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class ActivityDeclareServiceImpl extends BaseServiceImpl<ActivityDeclareInfo> implements ActivityDeclareService {
|
||||
|
||||
public ActivityDeclareServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.enums;
|
||||
|
||||
import com.budwk.app.base.annotation.DictEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityDeclareReimbursement
|
||||
* @Date 2025/7/31 17:01
|
||||
* @注释
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
@DictEnum(key = "ActivityDeclareReimbursement", name = "申报类型")
|
||||
public enum ActivityDeclareReimbursement {
|
||||
|
||||
/**
|
||||
* 校工会
|
||||
*/
|
||||
SCHOOL_UNION("校工会活动"),
|
||||
/**
|
||||
* 分工会
|
||||
*/
|
||||
BRANCH_UNION("分工会活动"),
|
||||
/**
|
||||
* 协会
|
||||
*/
|
||||
CLUB("协会活动");
|
||||
|
||||
private final String typeName;
|
||||
}
|
||||
+120
@@ -1,5 +1,30 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.controller;
|
||||
|
||||
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.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.vo.CommonPageParam;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models.ActivityReimbursementInfo;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementService;
|
||||
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.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 javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
@@ -7,5 +32,100 @@ package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.controlle
|
||||
* @Date 2025/7/31 15:47
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动报销")
|
||||
@At("/platform/activityReimbursement/apply")
|
||||
public class ActivityReimbursementApplyController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private ActivityReimbursementService activityReimbursementService;
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityReimbursement.apply")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/apply/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityReimbursement.apply")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/apply/form.html")
|
||||
public void form() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityReimbursement.apply")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/apply/view.html")
|
||||
public void view() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("活动报销,我的申请列表")
|
||||
@SaCheckPermission("activityDeclare.apply")
|
||||
public Result pageData(CommonPageParam pageParam) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.id,
|
||||
info.userName,
|
||||
info.loginName,
|
||||
info.applyTime,
|
||||
info.activityName,
|
||||
info.activityAddress,
|
||||
info.startTime,
|
||||
info.endTime,
|
||||
info.declareUnitName,
|
||||
info.activityType,
|
||||
info.activityContent,
|
||||
info.activityNumber,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(SELECT MAX(id) FROM wf_process_task WHERE processInstanceId = ins.id AND taskName = 'startTask') AS startTaskId
|
||||
FROM
|
||||
activity_reimbursement_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.taskState = 10
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
pageParam.buildSearch(cnd, "info.");
|
||||
if (StrUtil.isAllBlank(pageParam.getPageOrderName(), pageParam.getPageOrderBy())) {
|
||||
cnd.desc("info.applyTime");
|
||||
} else {
|
||||
cnd.orderBy("info." + pageParam.getPageOrderName(), PageUtil.getOrder(pageParam.getPageOrderBy()));
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = activityReimbursementService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
|
||||
return Result.success().addData(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("删除活动报销")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("member.apply.submit")
|
||||
@SLog(tag = "活动报销", msg = "删除活动报销id: ${args[0]}")
|
||||
public Result onDelete(@Valid String id) {
|
||||
dao.clear(ActivityReimbursementInfo.class, Cnd.where("id", "=", id));
|
||||
// 删除流程相关
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementBranchUnionController
|
||||
* @Date 2025/8/1 10:15
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,分工会管理员审核")
|
||||
@At("/platform/activityReimbursement/branchUnion")
|
||||
public class ActivityReimbursementBranchUnionController {
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityReimbursement.branchUnion")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/branchunion/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityReimbursement.branchUnion")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/branchunion/form.html")
|
||||
public void form() {
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementClubPrincipalController
|
||||
* @Date 2025/8/1 10:15
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,协会负责人审核")
|
||||
@At("/platform/activityReimbursement/clubPrincipal")
|
||||
public class ActivityReimbursementClubPrincipalController {
|
||||
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityReimbursement.clubPrincipal")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/clubprincipal/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityReimbursement.clubPrincipal")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/clubprincipal/form.html")
|
||||
public void form() {
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementSchoolPrincipalController
|
||||
* @Date 2025/8/1 10:16
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,校工会负责人审核")
|
||||
@At("/platform/activityReimbursement/schoolPrincipal")
|
||||
public class ActivityReimbursementSchoolPrincipalController {
|
||||
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityReimbursement.schoolPrincipal")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/schoolprincipal/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityReimbursement.schoolPrincipal")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/schoolprincipal/form.html")
|
||||
public void form() {
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementSchoolUnionController
|
||||
* @Date 2025/8/1 10:16
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,校工会审核")
|
||||
@At("/platform/activityReimbursement/schoolUnion")
|
||||
public class ActivityReimbursementSchoolUnionController {
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityReimbursement.schoolUnion")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/schoolunion/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityReimbursement.schoolUnion")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/schoolunion/form.html")
|
||||
public void form() {
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.interceptor;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementInterceptor
|
||||
* @Date 2025/8/1 11:05
|
||||
* @注释
|
||||
*/
|
||||
public class ActivityReimbursementInterceptor {
|
||||
}
|
||||
+28
-3
@@ -1,9 +1,12 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.declare.models.ActivityDeclareInfo;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.Table;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
@@ -13,6 +16,28 @@ import org.nutz.dao.entity.annotation.Table;
|
||||
* @注释
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ActivityReimbursementInfo extends BaseModel {
|
||||
public class ActivityReimbursementInfo extends ActivityDeclareInfo {
|
||||
|
||||
@Column
|
||||
@Comment("申报id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String declareId;
|
||||
|
||||
@Column
|
||||
@Comment("发票")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> billFiles;
|
||||
|
||||
@Column
|
||||
@Comment("照片")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> photoFiles;
|
||||
|
||||
@Column
|
||||
@Comment("其他")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> otherFiles;
|
||||
|
||||
}
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models.ActivityReimbursementInfo;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementService
|
||||
* @Date 2025/8/1 9:10
|
||||
* @注释
|
||||
*/
|
||||
public interface ActivityReimbursementService extends BaseService<ActivityReimbursementInfo> {
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models.ActivityReimbursementInfo;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementServiceImpl
|
||||
* @Date 2025/8/1 9:10
|
||||
* @注释
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class ActivityReimbursementServiceImpl extends BaseServiceImpl<ActivityReimbursementInfo> implements ActivityReimbursementService {
|
||||
public ActivityReimbursementServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityBudget
|
||||
* @Date 2025/7/31 16:23
|
||||
* @注释
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("费用预算")
|
||||
public class ActivityBudget {
|
||||
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "预算费用")
|
||||
private Double budgetPrice;
|
||||
|
||||
@ApiModelProperty(value = "实际费用")
|
||||
private Double actualPrice;
|
||||
|
||||
@ApiModelProperty(value = "收款人id")
|
||||
private String payeeId;
|
||||
|
||||
@ApiModelProperty(value = "收款人姓名")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "收款人工号")
|
||||
private String loginName;
|
||||
|
||||
@ApiModelProperty(value = "支行名称")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty(value = "报销卡号")
|
||||
private String bankCardNum;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.vo;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.declare.models.ActivityDeclareInfo;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.enums.ActivityDeclareReimbursement;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:CommonPageParam
|
||||
* @Date 2025/7/31 16:44
|
||||
* @注释
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("通用分页参数")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonPageParam extends PageForm<ActivityDeclareInfo> {
|
||||
|
||||
private Integer year;
|
||||
|
||||
private String clubId;
|
||||
|
||||
private String unionId;
|
||||
|
||||
|
||||
public void buildSearch(Cnd cnd, String prefix) {
|
||||
if (cnd == null) {
|
||||
cnd = Cnd.NEW();
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(this.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike(prefix + "userName", this.getSearchKeyword());
|
||||
seg.orLike(prefix + "loginName", this.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
|
||||
cnd.and(prefix + "declareUnitName", "<>", ActivityDeclareReimbursement.SCHOOL_UNION.name());
|
||||
if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_CHAIRMAN.name(),
|
||||
RoleConstant.BRANCH_UNION_ADMIN.name(),
|
||||
RoleConstant.BRANCH_UNION_OPERATOR.name())) {
|
||||
cnd.and(prefix + "unionid", "=", SecurityUtil.getUnionId());
|
||||
}
|
||||
|
||||
if (AuthUtil.hasRoleOr(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_PRESIDENT.name())) {
|
||||
// cnd.and(prefix + "clubId", "=", );
|
||||
}
|
||||
} else {
|
||||
cnd.andEX(prefix + "unionId", "=", this.getUnionId());
|
||||
cnd.andEX(prefix + "clubId", "=", this.getClubId());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+9
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.difficulthelp.vo;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
@@ -8,6 +9,7 @@ import com.budwk.app.zhgh.staffbenefit.difficulthelp.models.DifficultHelpInfo;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.lang.Lang;
|
||||
|
||||
import java.util.List;
|
||||
@@ -36,6 +38,13 @@ public class DifficultHelpPageParam extends PageForm<DifficultHelpInfo> {
|
||||
cnd = Cnd.NEW();
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(this.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike(prefix + "userName", this.getSearchKeyword());
|
||||
seg.orLike(prefix + "loginName", this.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
cnd.andEX("YEAR(" + prefix + "applyTime)", "=", this.getYear());
|
||||
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
|
||||
Reference in New Issue
Block a user