Merge branch 'main' of https://dd3skj.picp.vip/JyuHsin/zhgh_cug_v4
This commit is contained in:
@@ -29,13 +29,13 @@ public enum BpmProcessConstant {
|
||||
|
||||
MEMBER_BRANCH_UNION_CHANGE("会员分工会变更"),
|
||||
|
||||
CLUB_JOIN("协会入会申请"),
|
||||
CLUB_JOIN("社团入会申请"),
|
||||
|
||||
CLUB_EXAMINE("协会考核"),
|
||||
CLUB_EXAMINE("社团考核"),
|
||||
|
||||
CLUB_EVALUATE("协会评优"),
|
||||
CLUB_EVALUATE("社团评优"),
|
||||
|
||||
CLUB_REGISTER("协会注册"),
|
||||
CLUB_REGISTER("社团注册"),
|
||||
|
||||
PERSON_EVALUATE("评优评先申请"),
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ RoleConstant {
|
||||
SCHOOL_UNION_WC_ADMIN("校工会工代会管理员"),
|
||||
SCHOOL_UNION_DC_ADMIN("校工会民主管理员"),
|
||||
SCHOOL_UNION_PROPOSAL_ADMIN("校工会提案管理员"),
|
||||
SCHOOL_UNION_CLUB_ADMIN("校工会协会管理员"),
|
||||
SCHOOL_UNION_CLUB_ADMIN("校工会社团管理员"),
|
||||
SCHOOL_UNION_ACTIVITY_ADMIN("校工会活动管理员"),
|
||||
SCHOOL_UNION_ARTICLE_CLUB_ADMIN("校工会协会新闻审批管理员"),
|
||||
SCHOOL_UNION_ARTICLE_CLUB_ADMIN("校工会社团新闻审批管理员"),
|
||||
SCHOOL_UNION_ARTICLE_FGH_ADMIN("校工会分工会新闻审批管理员"),
|
||||
SCHOOL_UNION_ARTICLE_ADMIN("校工会新闻审批管理员"),
|
||||
SCHOOL_OUTLAY_ADMIN("校工会经费管理员"),
|
||||
@@ -78,16 +78,16 @@ RoleConstant {
|
||||
|
||||
SCHOOL_HOSPITAL_LEADER("校医院负责人"),
|
||||
|
||||
/*协会模块*/
|
||||
CLUB_MEMBER("协会会员"),
|
||||
CLUB_MANAGER("协会负责人"),
|
||||
CLUB_PRESIDENT("协会会长"),
|
||||
CLUB_VICE_PRESIDENT("协会副会长"),
|
||||
CLUB_SECRETARY("协会秘书长"),
|
||||
CLUB_VICE_SECRETARY("协会副秘书长"),
|
||||
// SCHOOL_UNION_CLUB_ADMIN("校工会协会管理员"),
|
||||
CLUB_AUDIT_LEADER("协会分管领导"),
|
||||
CLUB_OPERATOR("协会操作员"),
|
||||
/*社团模块*/
|
||||
CLUB_MEMBER("社团会员"),
|
||||
CLUB_MANAGER("社团负责人"),
|
||||
CLUB_PRESIDENT("社团会长"),
|
||||
CLUB_VICE_PRESIDENT("社团副会长"),
|
||||
CLUB_SECRETARY("社团秘书长"),
|
||||
CLUB_VICE_SECRETARY("社团副秘书长"),
|
||||
// SCHOOL_UNION_CLUB_ADMIN("校工会社团管理员"),
|
||||
CLUB_AUDIT_LEADER("社团分管领导"),
|
||||
CLUB_OPERATOR("社团操作员"),
|
||||
|
||||
/*大病基金会员*/
|
||||
AID_FUND_MEMBER("大病基金会员"),
|
||||
@@ -103,7 +103,7 @@ RoleConstant {
|
||||
LEGAL_DOCTOR("法律顾问"),
|
||||
|
||||
UNION_REIMBURSEMENT_MANAGER("分工会报销负责人"),
|
||||
CLUB_REIMBURSEMENT_MANAGER("协会报销负责人"),
|
||||
CLUB_REIMBURSEMENT_MANAGER("社团报销负责人"),
|
||||
SCHOOL_REIMBURSEMENT_MANAGER("校工会报销负责人"),
|
||||
|
||||
;
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ import org.nutz.lang.util.NutMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 获取协会审批人根据流程变量参数(clubId) 必传
|
||||
* 获取社团审批人根据流程变量参数(clubId) 必传
|
||||
*/
|
||||
public class FlowClubPresidentByArgsAssignmentHandler implements AssignmentHandler {
|
||||
@Override
|
||||
@@ -45,7 +45,7 @@ public class FlowClubPresidentByArgsAssignmentHandler implements AssignmentHandl
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "获取协会会长(根据args中的clubId)";
|
||||
return "获取社团会长(根据args中的clubId)";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -51,10 +51,12 @@ public class FlowCommonService {
|
||||
|
||||
ProcessTask processTask = flowEngine.processTaskService().getById(processTaskId);
|
||||
ProcessTask parentTask = flowEngine.processTaskService().getById(processTask.getTaskParentId());
|
||||
Dict taskArgs = Json.fromJson(Dict.class, parentTask.getVariable());
|
||||
if(taskArgs.containsKey("tf_sourceTaskKey") && !taskArgs.getBool("tf_audit")) {
|
||||
submitType = ProcessSubmitTypeEnum.JUMP.getCode();
|
||||
args.put(FlowConst.TASK_NAME, taskArgs.getStr("tf_sourceTaskKey"));
|
||||
if(parentTask != null) {
|
||||
Dict taskArgs = Json.fromJson(Dict.class, parentTask.getVariable());
|
||||
if(taskArgs.containsKey("tf_sourceTaskKey") && !taskArgs.getBool("tf_audit")) {
|
||||
submitType = ProcessSubmitTypeEnum.JUMP.getCode();
|
||||
args.put(FlowConst.TASK_NAME, taskArgs.getStr("tf_sourceTaskKey"));
|
||||
}
|
||||
}
|
||||
|
||||
args.put(FlowConst.SUBMIT_TYPE, submitType);
|
||||
|
||||
@@ -52,7 +52,7 @@ public class Sys_user_role {
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Comment("协会ID")
|
||||
@Comment("社团ID")
|
||||
private String clubId;
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
* @Author JyuHsin
|
||||
* @Date 2026/1/22 16:56
|
||||
* @Version 1.0
|
||||
* @Description 每年的1月1日生成协会成员下年的缴费记录
|
||||
* @Description 每年的1月1日生成社团成员下年的缴费记录
|
||||
*/
|
||||
@IocBean
|
||||
public class ClubGeneratePayRecordJob implements Job {
|
||||
@@ -33,7 +33,7 @@ public class ClubGeneratePayRecordJob implements Job {
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
// 当前年份
|
||||
int thisYear = DateUtil.thisYear();
|
||||
// 获取最新的协会成员信息
|
||||
// 获取最新的社团成员信息
|
||||
List<ClubUser> clubUserList = dao.query(ClubUser.class, Cnd.NEW());
|
||||
// 生成缴费记录对象
|
||||
List<ClubPayRecord> list = new ArrayList<>();
|
||||
|
||||
@@ -56,7 +56,7 @@ public class SecurityUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户协会ID
|
||||
* 获取当前用户社团ID
|
||||
*/
|
||||
public static List<String> getClubIds() {
|
||||
String clubIds = getSession().get("clubIds").toString();
|
||||
|
||||
@@ -108,12 +108,14 @@ public class CommonController {
|
||||
public Result unionOptions(String unionId) {
|
||||
List<Sys_union> sys_unions = sysUserService.dao().query(Sys_union.class,
|
||||
Cnd.NEW().andEX("id", "=", unionId).asc("unionCode"));
|
||||
|
||||
sysUserService.clearCache();
|
||||
return Result.success(sys_unions);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("协会列表")
|
||||
@ApiOperation("社团列表")
|
||||
public Result clubOptions(String clubId) {
|
||||
List<SysClub> sysClubs = sysClubService.dao().query(SysClub.class,
|
||||
Cnd.NEW().andEX("id", "=", clubId));
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@ import java.util.List;
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,协会负责人审核")
|
||||
@ApiOperation("活动申报,社团负责人审核")
|
||||
@At("/platform/activityDeclare/clubPrincipal")
|
||||
public class ActivityDeclareClubPrincipalController {
|
||||
|
||||
@@ -51,7 +51,7 @@ public class ActivityDeclareClubPrincipalController {
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("活动申报,协会负责人审核列表")
|
||||
@ApiOperation("活动申报,社团负责人审核列表")
|
||||
@SaCheckPermission("activityDeclare.clubPrincipal")
|
||||
public Result pageData(CommonPageParam pageParam) {
|
||||
Sql sql = Sqls.create("""
|
||||
|
||||
+2
-2
@@ -222,8 +222,8 @@ public class ActivityDeclareMineController {
|
||||
docData.put("fgh", approval);
|
||||
});
|
||||
|
||||
// 协会负责人审核
|
||||
doneTaskVos.stream().filter(task -> "协会负责人审核".equals(task.getDisplayName()))
|
||||
// 社团负责人审核
|
||||
doneTaskVos.stream().filter(task -> "社团负责人审核".equals(task.getDisplayName()))
|
||||
.max(Comparator.comparing(ProcessTaskVO::getCreatedAt))
|
||||
.ifPresent(v -> {
|
||||
Dict taskFormData = v.getTaskFormData();
|
||||
|
||||
+2
-2
@@ -58,7 +58,7 @@ public class ActivityDeclareInfo extends BaseModel {
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("申报单位(校工会/二级工会名称/协会名称)")
|
||||
@Comment("申报单位(校工会/二级工会名称/社团名称)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private String declareUnitName;
|
||||
|
||||
@@ -68,7 +68,7 @@ public class ActivityDeclareInfo extends BaseModel {
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("协会id")
|
||||
@Comment("社团id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String clubId;
|
||||
|
||||
|
||||
+2
-2
@@ -25,9 +25,9 @@ public enum ActivityDeclareReimbursement {
|
||||
*/
|
||||
BRANCH_UNION("分工会活动"),
|
||||
/**
|
||||
* 协会
|
||||
* 社团
|
||||
*/
|
||||
CLUB("协会活动");
|
||||
CLUB("社团活动");
|
||||
|
||||
private final String typeName;
|
||||
}
|
||||
|
||||
+1
-1
@@ -250,7 +250,7 @@ public class ActivityReimbursementBoardController {
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("所有协会的报销费用或活动数统计")
|
||||
@ApiOperation("所有社团的报销费用或活动数统计")
|
||||
@SaCheckPermission("activityReimbursement.board")
|
||||
public Result allClubActivityAndMoney(Integer year, Boolean isClubMoney) {
|
||||
Sql sql = Sqls.create("""
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@ import java.util.List;
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动报销,协会负责人审核")
|
||||
@ApiOperation("活动报销,社团负责人审核")
|
||||
@At("/platform/activityReimbursement/clubPrincipal")
|
||||
public class ActivityReimbursementClubPrincipalController {
|
||||
|
||||
@@ -51,7 +51,7 @@ public class ActivityReimbursementClubPrincipalController {
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("活动报销,协会负责人审核列表")
|
||||
@ApiOperation("活动报销,社团负责人审核列表")
|
||||
@SaCheckPermission("activityReimbursement.clubPrincipal")
|
||||
public Result pageData(CommonPageParam pageParam) {
|
||||
Sql sql = Sqls.create("""
|
||||
|
||||
+2
-2
@@ -323,8 +323,8 @@ public class ActivityReimbursementMineController {
|
||||
docData.put("fgh", approval);
|
||||
});
|
||||
|
||||
// 协会负责人审核
|
||||
doneTaskVos.stream().filter(task -> "协会负责人审核".equals(task.getDisplayName()))
|
||||
// 社团负责人审核
|
||||
doneTaskVos.stream().filter(task -> "社团负责人审核".equals(task.getDisplayName()))
|
||||
.max(Comparator.comparing(ProcessTaskVO::getCreatedAt))
|
||||
.ifPresent(v -> {
|
||||
Dict taskFormData = v.getTaskFormData();
|
||||
|
||||
+1
-1
@@ -141,7 +141,7 @@ public class YearPlanController {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("获取协会")
|
||||
@ApiOperation("获取社团")
|
||||
@SaCheckPermission("planSummary.yearPlan.manage")
|
||||
public Result queryClub() {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
@@ -51,7 +51,7 @@ public class YearPlan extends BaseModel {
|
||||
private Double money;
|
||||
|
||||
@Column
|
||||
@Comment("计划类型(40001-校活动、40002-分工会活动、40003-协会社团活动)")
|
||||
@Comment("计划类型(40001-校活动、40002-分工会活动、40003-社团社团活动)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 7)
|
||||
private String planType;
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ public class YearSummary extends BaseModel {
|
||||
private String cTime;
|
||||
|
||||
@Column
|
||||
@Comment("工会/协会id")
|
||||
@Comment("工会/社团id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String tissueId;
|
||||
|
||||
@@ -87,7 +87,7 @@ public class YearSummary extends BaseModel {
|
||||
private String summaryType;
|
||||
|
||||
@Column
|
||||
@Comment("总结来源(1-校活动、2-分工会活动、3协会社团活动)")
|
||||
@Comment("总结来源(1-校活动、2-分工会活动、3社团社团活动)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String summaryFrom;
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ public class ActivitySchool extends BaseModel implements Serializable , SysHomeC
|
||||
private Boolean close;
|
||||
|
||||
@Column
|
||||
@Comment("活动级别(40001-校级、40002-分工会、40003-社团或协会)")
|
||||
@Comment("活动级别(40001-校级、40002-分工会、40003-社团或社团)")
|
||||
@ColDefine(type = ColType.INT, width = 10)
|
||||
private Integer activityLevel;
|
||||
|
||||
|
||||
+1
-1
@@ -205,7 +205,7 @@ public class TrainSignUpManageController {
|
||||
|
||||
@At
|
||||
@Ok("json:full")
|
||||
@ApiOperation("查询分工会和协会")
|
||||
@ApiOperation("查询分工会和社团")
|
||||
@SaCheckPermission("trainSignUp.manage")
|
||||
public Result selectUnitAndClub() {
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ public class TrainSignUpActivityStatisticsController {
|
||||
if(!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_CHAIRMAN.name())) {
|
||||
// 获取当前登录用户的工会
|
||||
String unionId = SecurityUtil.getUnionId();
|
||||
// 获取当前登录用户的协会
|
||||
// 获取当前登录用户的社团
|
||||
List<String> clubIds = SecurityUtil.getClubIds();
|
||||
|
||||
List<TrainSignUpActivity> result = new ArrayList<>();
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ public class ClubUserClubListController {
|
||||
@At
|
||||
@SaCheckPermission("club.join.list")
|
||||
public Result getCount() {
|
||||
// 获取所有协会
|
||||
// 获取所有社团
|
||||
List<SysClub> list = sysClubService.query();
|
||||
// 获取审核通过的
|
||||
List<ProcessInstance> instanceList = sysClubService.dao().query(
|
||||
|
||||
+10
-8
@@ -50,7 +50,7 @@ import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/club/join/apply")
|
||||
@Api("协会申请入会、退会")
|
||||
@Api("社团申请入会、退会")
|
||||
@Ok("json:full")
|
||||
public class ClubUserJoinApplyController {
|
||||
|
||||
@@ -107,7 +107,7 @@ public class ClubUserJoinApplyController {
|
||||
@At
|
||||
@ApiOperation("保存申请")
|
||||
@SaCheckPermission(value = {"club.join.apply", "h5.club.join.apply"}, mode = SaMode.OR)
|
||||
@SLog(tag = "协会管理系统-申请入会", msg = "保存协会入会")
|
||||
@SLog(tag = "社团管理系统-申请入会", msg = "保存社团入会")
|
||||
public Result save(@Param("data") ClubUserApply clubUserApply) {
|
||||
clubUserApply.setRoleCode(RoleConstant.CLUB_MEMBER.name());
|
||||
clubUserApply.setMode(true);
|
||||
@@ -120,7 +120,7 @@ public class ClubUserJoinApplyController {
|
||||
@ApiOperation("提交")
|
||||
@SaCheckPermission(value = {"club.join.apply", "h5.club.join.apply"}, mode = SaMode.OR)
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "协会管理系统-申请入/退会", msg = "申请协会入/退会")
|
||||
@SLog(tag = "社团管理系统-申请入/退会", msg = "申请社团入/退会")
|
||||
public Result submit(@Param("data") ClubUserApply clubUserApply,
|
||||
@Param("mode") Boolean mode) {
|
||||
if(mode == false) {
|
||||
@@ -134,12 +134,14 @@ public class ClubUserJoinApplyController {
|
||||
ClubUserApply userApply = dao.fetch(ClubUserApply.class, Cnd.where("userId", "=", clubUserApply.getUserId()).and("clubId", "=", clubUserApply.getClubId()).and("mode", "=", mode).desc(ClubUserApply::getApplyDate));
|
||||
if (ObjectUtil.isNotEmpty(userApply) && StrUtil.isNotBlank(userApply.getId())) {
|
||||
ProcessInstance processInstance = dao.fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", userApply.getId()));
|
||||
if (!List.of(ProcessInstanceStateEnum.REJECT.getCode(), ProcessInstanceStateEnum.FINISHED.getCode()).contains(processInstance.getState())) {
|
||||
return Result.error("您有该协会的申请记录尚未完成,请到我的申请里查看!");
|
||||
if (processInstance != null && !List.of(ProcessInstanceStateEnum.REJECT.getCode(), ProcessInstanceStateEnum.FINISHED.getCode()).contains(processInstance.getState())) {
|
||||
return Result.error("您有该社团的申请记录尚未完成,请到我的申请里查看!");
|
||||
}
|
||||
}
|
||||
|
||||
clubUserApply.setId(null);
|
||||
if(!mode) {
|
||||
clubUserApply.setId(null);
|
||||
}
|
||||
clubUserApply.setRoleCode(RoleConstant.CLUB_MEMBER.name());
|
||||
clubUserApply.setMode(mode);
|
||||
clubUserApply.setApplyDate(new Date());
|
||||
@@ -176,7 +178,7 @@ public class ClubUserJoinApplyController {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("校验是否申请过协会")
|
||||
@ApiOperation("校验是否申请过社团")
|
||||
@SaCheckPermission(value = {"club.join.apply", "h5.club.join.apply"}, mode = SaMode.OR)
|
||||
public Result checkApplyClub(@Valid String clubId) {
|
||||
View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId()));
|
||||
@@ -196,7 +198,7 @@ public class ClubUserJoinApplyController {
|
||||
|
||||
ProcessInstance processInstance = dao.fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", userApply.getId()));
|
||||
if (!List.of(ProcessInstanceStateEnum.REJECT.getCode(), ProcessInstanceStateEnum.FINISHED.getCode()).contains(processInstance.getState())) {
|
||||
return Result.error(99, "您有该协会的申请记录尚未完成,请到我的申请里查看!");
|
||||
return Result.error(99, "您有该社团的申请记录尚未完成,请到我的申请里查看!");
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
+1
-2
@@ -79,7 +79,6 @@ public class ClubUserJoinMineController {
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||
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
|
||||
@@ -106,7 +105,7 @@ public class ClubUserJoinMineController {
|
||||
@SaCheckPermission(value = {"club.join.mine", "h5.club.join.mine"}, mode = SaMode.OR)
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "协会管理系统-申请入会-我的申请", msg = "删除协会入会")
|
||||
@SLog(tag = "社团管理系统-申请入会-我的申请", msg = "删除社团入会")
|
||||
public Result delete(@Valid String id) {
|
||||
dao.delete(ClubUserApply.class, id);
|
||||
dao.delete(ClubUser.class, id);
|
||||
|
||||
+2
-2
@@ -69,7 +69,7 @@ public class ClubEvaluateApplyController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.evaluate.apply")
|
||||
@SLog(tag = "协会管理系统-协会评优", msg = "保存协会评优申请")
|
||||
@SLog(tag = "社团管理系统-社团评优", msg = "保存社团评优申请")
|
||||
public Result save(@Param("data") SysClubEvaluate evaluate) {
|
||||
evaluateService.dao().insertOrUpdate(evaluate);
|
||||
return Result.success(evaluate);
|
||||
@@ -78,7 +78,7 @@ public class ClubEvaluateApplyController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.evaluate.apply")
|
||||
@SLog(tag = "协会管理系统-协会评优", msg = "提交协会评优")
|
||||
@SLog(tag = "社团管理系统-社团评优", msg = "提交社团评优")
|
||||
public Result submit(@Valid @Param("data") SysClubEvaluate evaluate) {
|
||||
evaluateService.dao().insertOrUpdate(evaluate);
|
||||
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ public class ClubEvaluateMineController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.evaluate.mine")
|
||||
@SLog(tag = "协会管理系统-协会评优", msg = "删除协会评优")
|
||||
@SLog(tag = "社团管理系统-社团评优", msg = "删除社团评优")
|
||||
public Result doDelete(@Valid String id) {
|
||||
sysClubEvaluateService.dao().delete(SysClubEvaluate.class, id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
|
||||
+7
-7
@@ -71,7 +71,7 @@ public class ClubExamineApplyController {
|
||||
@SaCheckLogin
|
||||
public Result getCount(String id, Integer year, String clubId) {
|
||||
if(StrUtil.isBlank(clubId)) {
|
||||
return Result.error("协会信息为空,请核查");
|
||||
return Result.error("社团信息为空,请核查");
|
||||
}
|
||||
if(year == null) {
|
||||
return Result.error("年份信息为空,请核查");
|
||||
@@ -96,7 +96,7 @@ public class ClubExamineApplyController {
|
||||
@SaCheckLogin
|
||||
public Result getClubUserNum(String clubId, Integer year) {
|
||||
if(StrUtil.isBlank(clubId)) {
|
||||
return Result.error("协会信息为空,请核查");
|
||||
return Result.error("社团信息为空,请核查");
|
||||
}
|
||||
List<NutMap> result = sysClubExamineService.getClubUserNum(clubId, year);
|
||||
return Result.success(result);
|
||||
@@ -106,7 +106,7 @@ public class ClubExamineApplyController {
|
||||
@SaCheckLogin
|
||||
public Result getJgUser(String clubId) {
|
||||
if(StrUtil.isBlank(clubId)) {
|
||||
return Result.error("协会信息为空,请核查");
|
||||
return Result.error("社团信息为空,请核查");
|
||||
}
|
||||
List<NutMap> result = sysClubExamineService.getJgUser(clubId);
|
||||
return Result.success(result);
|
||||
@@ -116,7 +116,7 @@ public class ClubExamineApplyController {
|
||||
@SaCheckLogin
|
||||
public Result getClubMemberMoney(String clubId) {
|
||||
if(StrUtil.isBlank(clubId)) {
|
||||
return Result.error("协会信息为空,请核查");
|
||||
return Result.error("社团信息为空,请核查");
|
||||
}
|
||||
int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId));
|
||||
SysClub club = dao.fetch(SysClub.class, clubId);
|
||||
@@ -141,7 +141,7 @@ public class ClubExamineApplyController {
|
||||
@SaCheckLogin
|
||||
public Result getLastYearSurplus(String clubId) {
|
||||
if(StrUtil.isBlank(clubId)) {
|
||||
return Result.error("协会信息为空,请核查");
|
||||
return Result.error("社团信息为空,请核查");
|
||||
}
|
||||
SysClubExamineRegister register = dao.fetch(SysClubExamineRegister.class, Cnd.where("clubId", "=", clubId)
|
||||
.and("YEAR(registerDate)", "=", DateUtil.thisYear() - 1));
|
||||
@@ -167,7 +167,7 @@ public class ClubExamineApplyController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.examine.apply")
|
||||
@SLog(tag = "协会管理系统-协会年审", msg = "保存协会年审")
|
||||
@SLog(tag = "社团管理系统-社团年审", msg = "保存社团年审")
|
||||
public Result save(@Param("data") SysClubExamineRegister examineRegister,
|
||||
@Param("incomeDetailed") String incomeDetailed,
|
||||
@Param("incomeCensus") String incomeCensus) {
|
||||
@@ -182,7 +182,7 @@ public class ClubExamineApplyController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.examine.apply")
|
||||
@SLog(tag = "协会管理系统-协会年审", msg = "提交协会年审")
|
||||
@SLog(tag = "社团管理系统-社团年审", msg = "提交社团年审")
|
||||
public Result submit(@Param("data") SysClubExamineRegister examineRegister,
|
||||
@Param("incomeDetailed") String incomeDetailed,
|
||||
@Param("incomeCensus") String incomeCensus) {
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ public class ClubExamineMineController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.examine.mine")
|
||||
@SLog(tag = "协会管理系统-协会年审", msg = "删除协会年审")
|
||||
@SLog(tag = "社团管理系统-社团年审", msg = "删除社团年审")
|
||||
public Result doDelete(@Valid String id) {
|
||||
sysClubExamineService.delete(id);
|
||||
sysClubExamineService.dao().clear(SysClubExamineRegisterDetailed.class, Cnd.where("registerId", "=", id));
|
||||
|
||||
+2
-2
@@ -128,7 +128,7 @@ public class ClubChangeManagerController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.change")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "提交变更理事机构")
|
||||
@SLog(tag = "社团管理系统-信息管理", msg = "提交变更理事机构")
|
||||
public Object submit(@Param("data") SysClubManager clubManager) {
|
||||
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
@@ -188,7 +188,7 @@ public class ClubChangeManagerController {
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.change")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "删除变更理事机构")
|
||||
@SLog(tag = "社团管理系统-信息管理", msg = "删除变更理事机构")
|
||||
public Result delete(@Param("id") String id) {
|
||||
dao.delete(SysClubManager.class, id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
|
||||
+10
-10
@@ -104,7 +104,7 @@ public class ClubInfoManageController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.manage")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "修改协会信息")
|
||||
@SLog(tag = "社团管理系统-信息管理", msg = "修改社团信息")
|
||||
public Result doSubmit(@Param("club") SysClub club) {
|
||||
clubInfoManageService.dao().update(club);
|
||||
return Result.success();
|
||||
@@ -113,7 +113,7 @@ public class ClubInfoManageController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.manage")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "修改缴费状态")
|
||||
@SLog(tag = "社团管理系统-信息管理", msg = "修改缴费状态")
|
||||
public Result updatePayed(@Valid Boolean payed, @Valid String id) {
|
||||
clubInfoManageService.dao().update(ClubUser.class, Chain.make("payed", payed), Cnd.where("id", "=", id));
|
||||
return Result.success();
|
||||
@@ -122,7 +122,7 @@ public class ClubInfoManageController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.manage")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "修改拨付状态")
|
||||
@SLog(tag = "社团管理系统-信息管理", msg = "修改拨付状态")
|
||||
public Result updateGive(@Valid Boolean giveMoney, @Valid String id) {
|
||||
clubInfoManageService.dao().update(ClubUser.class, Chain.make("giveMoney", giveMoney), Cnd.where("id", "=", id));
|
||||
return Result.success();
|
||||
@@ -131,7 +131,7 @@ public class ClubInfoManageController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.manage")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "退会")
|
||||
@SLog(tag = "社团管理系统-信息管理", msg = "退会")
|
||||
public Result exitClub(@Valid String id) {
|
||||
ClubUser clubUser = dao.fetch(ClubUser.class, id);
|
||||
dao.delete(ClubUser.class,id);
|
||||
@@ -152,7 +152,7 @@ public class ClubInfoManageController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.manage")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "删除协会成员")
|
||||
@SLog(tag = "社团管理系统-信息管理", msg = "删除社团成员")
|
||||
public Result userDelete(@Valid String id) {
|
||||
ClubUser clubUser = dao.fetch(ClubUser.class, id);
|
||||
dao.delete(ClubUser.class,id);
|
||||
@@ -193,7 +193,7 @@ public class ClubInfoManageController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.manage")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "修改身份")
|
||||
@SLog(tag = "社团管理系统-信息管理", msg = "修改身份")
|
||||
public Result updateRoleCode(@Param("id") String id, @Valid String[] roleCodes, @Valid String clubId) {
|
||||
List<String> roleCodeList = Arrays.asList(roleCodes);
|
||||
//查询社团是否存在会长或者秘书长
|
||||
@@ -269,7 +269,7 @@ public class ClubInfoManageController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.manage")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "添加协会成员")
|
||||
@SLog(tag = "社团管理系统-信息管理", msg = "添加社团成员")
|
||||
public Result userDoAdd(@Valid String clubId, @Valid String[] users, @Valid String roleCode, @Valid Boolean payed) {
|
||||
|
||||
//查询社团是否存在会长或者秘书长
|
||||
@@ -326,9 +326,9 @@ public class ClubInfoManageController {
|
||||
public void downloadUserImport(HttpServletResponse response) {
|
||||
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();){
|
||||
EasyExcel.write(byteArrayOutputStream, ClubUserImportVo.class)
|
||||
.sheet("协会会员导入模版")
|
||||
.sheet("社团会员导入模版")
|
||||
.doWrite(ArrayList::new);
|
||||
CommonDownloadUtil.download("协会会员导入模版.xlsx", byteArrayOutputStream.toByteArray() ,response);
|
||||
CommonDownloadUtil.download("社团会员导入模版.xlsx", byteArrayOutputStream.toByteArray() ,response);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -359,7 +359,7 @@ public class ClubInfoManageController {
|
||||
continue;
|
||||
}
|
||||
if (clubUsers.stream().anyMatch(s -> s.getUserId().equals(user.getId()))) {
|
||||
v.setErrorInfo("该用户已加入该协会");
|
||||
v.setErrorInfo("该用户已加入该社团");
|
||||
errorInfos.add(v);
|
||||
continue;
|
||||
}
|
||||
|
||||
+3
-3
@@ -44,7 +44,7 @@ import java.util.Optional;
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api(tags = "协会缴费记录")
|
||||
@Api(tags = "社团缴费记录")
|
||||
@At("/platform/club/pay")
|
||||
public class ClubPayRecordController {
|
||||
|
||||
@@ -159,9 +159,9 @@ public class ClubPayRecordController {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("修改协会成员缴费状态")
|
||||
@ApiOperation("修改社团成员缴费状态")
|
||||
@SaCheckPermission("club.infoManage.pay")
|
||||
@SLog(tag = "协会管理系统-缴费记录", msg = "修改协会成员缴费状态")
|
||||
@SLog(tag = "社团管理系统-缴费记录", msg = "修改社团成员缴费状态")
|
||||
public Result handle(@Param("ids") String[] ids,
|
||||
@Param("payed") Boolean payed) {
|
||||
List<ClubPayRecord> list = payRecordService.query(Cnd.where("id", "in", ids));
|
||||
|
||||
+4
-3
@@ -106,6 +106,7 @@ public class ClubRefreshReportController {
|
||||
} else {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = clubInfoManageService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
@@ -114,7 +115,7 @@ public class ClubRefreshReportController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.refreshReport")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "提交换届报告")
|
||||
@SLog(tag = "社团管理系统-信息管理", msg = "提交换届报告")
|
||||
public Object submit(@Param("data") SysClubRefresh clubRefresh) {
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
@@ -125,7 +126,7 @@ public class ClubRefreshReportController {
|
||||
List<String> idList = list.stream().map(SysClubRefresh::getId).toList();
|
||||
int count = dao.count(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "in", idList).and(ProcessInstance::getState, "not in", List.of(ProcessInstanceStateEnum.FINISHED.getCode(), ProcessInstanceStateEnum.REJECT.getCode())));
|
||||
if (count > 0) {
|
||||
return Result.error("您有该协会的申请记录尚未完成,请核对!");
|
||||
return Result.error("您有该社团的申请记录尚未完成,请核对!");
|
||||
}
|
||||
|
||||
SysClub club = clubInfoManageService.dao().fetch(SysClub.class, clubRefresh.getClubId());
|
||||
@@ -167,7 +168,7 @@ public class ClubRefreshReportController {
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.refreshReport")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "删除换届报告")
|
||||
@SLog(tag = "社团管理系统-信息管理", msg = "删除换届报告")
|
||||
public Result delete(@Param("id") String id) {
|
||||
clubInfoManageService.dao().delete(SysClubRefresh.class, id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
|
||||
+4
-3
@@ -107,6 +107,7 @@ public class ClubRuleUpdateController {
|
||||
} else {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = clubInfoManageService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
@@ -115,7 +116,7 @@ public class ClubRuleUpdateController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.ruleUpdate")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "提交章程备案")
|
||||
@SLog(tag = "社团管理系统-信息管理", msg = "提交章程备案")
|
||||
public Object submit(@Param("data")SysClubRule clubRule) {
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
@@ -126,7 +127,7 @@ public class ClubRuleUpdateController {
|
||||
List<String> idList = list.stream().map(SysClubRule::getId).toList();
|
||||
int count = dao.count(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "in", idList).and(ProcessInstance::getState, "not in", List.of(ProcessInstanceStateEnum.FINISHED.getCode(), ProcessInstanceStateEnum.REJECT.getCode())));
|
||||
if (count > 0) {
|
||||
return Result.error("您有该协会的申请记录尚未完成,请核对!");
|
||||
return Result.error("您有该社团的申请记录尚未完成,请核对!");
|
||||
}
|
||||
|
||||
SysClub club = clubInfoManageService.dao().fetch(SysClub.class, clubRule.getClubId());
|
||||
@@ -168,7 +169,7 @@ public class ClubRuleUpdateController {
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.ruleUpdate")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "删除章程备案")
|
||||
@SLog(tag = "社团管理系统-信息管理", msg = "删除章程备案")
|
||||
public Result delete(@Param("id") String id) {
|
||||
clubInfoManageService.dao().delete(SysClubRule.class, id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import javax.validation.Valid;
|
||||
* @Author: JyuHsin
|
||||
* @Date: 2024/8/6 10:02
|
||||
* @Version: v1.0.0
|
||||
* @Description: 协会确认
|
||||
* @Description: 社团确认
|
||||
**/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
|
||||
+3
-3
@@ -31,7 +31,7 @@ import javax.validation.Valid;
|
||||
**/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@Api("协会-我的注册")
|
||||
@Api("社团-我的注册")
|
||||
@At("/platform/club/register/clubMyApply")
|
||||
public class ClubMyApplyController {
|
||||
|
||||
@@ -54,10 +54,10 @@ public class ClubMyApplyController {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("删除协会")
|
||||
@ApiOperation("删除社团")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.register.myApply")
|
||||
@SLog(tag = "协会管理系统-协会注册", msg = "删除协会")
|
||||
@SLog(tag = "社团管理系统-社团注册", msg = "删除社团")
|
||||
public Result doDelete(@Valid String id) {
|
||||
sysClubService.delete(id);
|
||||
sysClubService.dao().clear(SysClubSponsor.class, Cnd.where("clubId", "=", id));
|
||||
|
||||
+2
-2
@@ -67,7 +67,7 @@ public class ClubRegistApplyController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.register.apply")
|
||||
@SLog(tag = "协会管理系统-协会注册", msg = "保存注册协会")
|
||||
@SLog(tag = "社团管理系统-社团注册", msg = "保存注册社团")
|
||||
public Result save(@Param("club") SysClub club,
|
||||
@Param("::deleteIds") List<String> deleteIds,
|
||||
@Param("::managePerson") List<NutMap> managePerson) {
|
||||
@@ -83,7 +83,7 @@ public class ClubRegistApplyController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.register.apply")
|
||||
@SLog(tag = "协会管理系统-协会注册", msg = "提交注册协会")
|
||||
@SLog(tag = "社团管理系统-社团注册", msg = "提交注册社团")
|
||||
public Result submit(@Param("club") SysClub club,
|
||||
@Param("::deleteIds") List<String> deleteIds,
|
||||
@Param("::managePerson") List<NutMap> managePerson) {
|
||||
|
||||
+1
-1
@@ -279,7 +279,7 @@ public class ClubStatisticsController {
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
|
||||
CommonDownloadUtil.download("协会统计表.xlsx", workbook, response);
|
||||
CommonDownloadUtil.download("社团统计表.xlsx", workbook, response);
|
||||
}
|
||||
|
||||
@At
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ClubRefreshUpdateInterceptor implements FlowInterceptor {
|
||||
SysClubRefresh clubRefresh = Json.fromJson(SysClubRefresh.class, formDataStr);
|
||||
|
||||
Dao dao = ServiceContext.find(Dao.class);
|
||||
// 审核通过,将新的附件更新到协会表
|
||||
// 审核通过,将新的附件更新到社团表
|
||||
SysClub club = dao.fetch(SysClub.class, clubRefresh.getClubId());
|
||||
club.setReplaceReport(clubRefresh.getFiles());
|
||||
dao.update(club);
|
||||
|
||||
@@ -24,7 +24,7 @@ public class ClubRuleUpdateInterceptor implements FlowInterceptor {
|
||||
SysClubRule clubRule = Json.fromJson(SysClubRule.class, formDataStr);
|
||||
|
||||
Dao dao = ServiceContext.find(Dao.class);
|
||||
// 审核通过,将新的附件更新到协会表
|
||||
// 审核通过,将新的附件更新到社团表
|
||||
SysClub club = dao.fetch(SysClub.class, clubRule.getClubId());
|
||||
club.setRulesFile(clubRule.getFiles());
|
||||
dao.update(club);
|
||||
|
||||
@@ -42,12 +42,12 @@ public class ClubUserJoinInterceptor implements FlowInterceptor {
|
||||
// 获取操作类
|
||||
Dao dao = ServiceContext.find(Dao.class);
|
||||
|
||||
// 将申请信息复制一份,插入协会成员表
|
||||
// 将申请信息复制一份,插入社团成员表
|
||||
ClubUser clubUser = BeanUtil.copyProperties(clubUserApply, ClubUser.class);
|
||||
dao.insert(clubUser);
|
||||
|
||||
// 还要加到协会成员缴费表中
|
||||
// 对了,如果同一个人,在同一年,多次加入同一协会,则只插入一条
|
||||
// 还要加到社团成员缴费表中
|
||||
// 对了,如果同一个人,在同一年,多次加入同一社团,则只插入一条
|
||||
ClubPayRecord payRecord = dao.fetch(
|
||||
ClubPayRecord.class,
|
||||
Cnd.where(ClubPayRecord::getClubId, "=", clubUser.getClubId())
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("club_pay_record")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("协会会员缴费记录表")
|
||||
@Comment("社团会员缴费记录表")
|
||||
public class ClubPayRecord extends BaseModel {
|
||||
|
||||
@Name
|
||||
@@ -35,7 +35,7 @@ public class ClubPayRecord extends BaseModel {
|
||||
private Integer year;
|
||||
|
||||
@Column
|
||||
@Comment("协会ID")
|
||||
@Comment("社团ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String clubId;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("club_user")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("协会会员表")
|
||||
@Comment("社团会员表")
|
||||
public class ClubUser extends BaseModel {
|
||||
|
||||
@Name
|
||||
@@ -23,7 +23,7 @@ public class ClubUser extends BaseModel {
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("协会ID")
|
||||
@Comment("社团ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String clubId;
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ClubUser extends BaseModel {
|
||||
private List<String> roleCode = new ArrayList<>();
|
||||
|
||||
@Column
|
||||
@Comment("协会职务")
|
||||
@Comment("社团职务")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String clubPosition;
|
||||
|
||||
@@ -53,7 +53,7 @@ public class ClubUser extends BaseModel {
|
||||
private String avatar;
|
||||
|
||||
@Column
|
||||
@Comment("同时参加其他协会情况")
|
||||
@Comment("同时参加其他社团情况")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String sameTimeJoinOtherClubSituation;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.Date;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("club_user_apply")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("协会申请退出申请表")
|
||||
@Comment("社团申请退出申请表")
|
||||
public class ClubUserApply extends BaseModel {
|
||||
|
||||
@Name
|
||||
@@ -22,7 +22,7 @@ public class ClubUserApply extends BaseModel {
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("协会ID")
|
||||
@Comment("社团ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String clubId;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ClubUserApply extends BaseModel {
|
||||
private Boolean mode;
|
||||
|
||||
@Column
|
||||
@Comment("协会职务")
|
||||
@Comment("社团职务")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String clubPosition;
|
||||
|
||||
@@ -67,7 +67,7 @@ public class ClubUserApply extends BaseModel {
|
||||
private String avatar;
|
||||
|
||||
@Column
|
||||
@Comment("同时参加其他协会情况")
|
||||
@Comment("同时参加其他社团情况")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String sameTimeJoinOtherClubSituation;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("sys_club")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("协会")
|
||||
@Comment("社团")
|
||||
public class SysClub extends BaseModel {
|
||||
|
||||
@Column
|
||||
@@ -32,21 +32,21 @@ public class SysClub extends BaseModel {
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("协会名称")
|
||||
@Comment("社团名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
@NotEmpty(message = "协会名称不能为空")
|
||||
@NotEmpty(message = "社团名称不能为空")
|
||||
private String clubName;
|
||||
|
||||
@Column
|
||||
@Comment("协会编码")
|
||||
@Comment("社团编码")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
@NotEmpty(message = "协会编码不能为空")
|
||||
@NotEmpty(message = "社团编码不能为空")
|
||||
private String clubCode;
|
||||
|
||||
@Column
|
||||
@Comment("协会类型")
|
||||
@Comment("社团类型")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
@NotEmpty(message = "协会类型不能为空")
|
||||
@NotEmpty(message = "社团类型不能为空")
|
||||
private String clubType;
|
||||
|
||||
@Column
|
||||
@@ -65,12 +65,12 @@ public class SysClub extends BaseModel {
|
||||
private String concatPersonEmail;
|
||||
|
||||
@Column
|
||||
@Comment("协会介绍")
|
||||
@Comment("社团介绍")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String introduce;
|
||||
|
||||
@Column
|
||||
@Comment("协会宗旨")
|
||||
@Comment("社团宗旨")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String purpose;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("sys_club_evaluate")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("协会评优")
|
||||
@Comment("社团评优")
|
||||
public class SysClubEvaluate extends BaseModel {
|
||||
|
||||
@Column
|
||||
@@ -32,9 +32,9 @@ public class SysClubEvaluate extends BaseModel {
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("协会id")
|
||||
@Comment("社团id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@NotEmpty(message = "协会id不能为空")
|
||||
@NotEmpty(message = "社团id不能为空")
|
||||
private String clubId;
|
||||
|
||||
@Column
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("sys_club_examine_register")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("协会年审")
|
||||
@Comment("社团年审")
|
||||
public class SysClubExamineRegister extends BaseModel {
|
||||
|
||||
@Column
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("sys_club_examine_register_detailed")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("协会年审其他信息")
|
||||
@Comment("社团年审其他信息")
|
||||
public class SysClubExamineRegisterDetailed extends BaseModel {
|
||||
|
||||
@Column
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("sys_club_manager")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("协会理事机构")
|
||||
@Comment("社团理事机构")
|
||||
public class SysClubManager extends BaseModel {
|
||||
|
||||
@Column
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("sys_club_refresh")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("协会换届报告")
|
||||
@Comment("社团换届报告")
|
||||
public class SysClubRefresh extends BaseModel {
|
||||
|
||||
@Column
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("sys_club_rule")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("协会章程修订")
|
||||
@Comment("社团章程修订")
|
||||
public class SysClubRule extends BaseModel {
|
||||
|
||||
@Column
|
||||
|
||||
@@ -18,7 +18,7 @@ import javax.validation.constraints.NotEmpty;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("sys_club_sponsor")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("协会发起人")
|
||||
@Comment("社团发起人")
|
||||
public class SysClubSponsor extends BaseModel {
|
||||
|
||||
@Column
|
||||
@@ -29,9 +29,9 @@ public class SysClubSponsor extends BaseModel {
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("协会id")
|
||||
@Comment("社团id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@NotEmpty(message = "协会不能为空")
|
||||
@NotEmpty(message = "社团不能为空")
|
||||
private String clubId;
|
||||
|
||||
@Column
|
||||
|
||||
@@ -14,7 +14,7 @@ public interface ClubPayRecordService extends BaseService<ClubPayRecord> {
|
||||
|
||||
|
||||
/**
|
||||
* 获取协会成员是否拨付
|
||||
* 获取社团成员是否拨付
|
||||
* @param userId
|
||||
* @param clubId
|
||||
*/
|
||||
|
||||
@@ -56,7 +56,7 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
|
||||
SysClubExamineRegister examineRegister = dao().fetch(SysClubExamineRegister.class,
|
||||
Cnd.where("year", "=", year - 1).and("clubId", "=", clubId));
|
||||
|
||||
// 构建协会用户申请记录查询SQL(关联用户信息、流程实例)
|
||||
// 构建社团用户申请记录查询SQL(关联用户信息、流程实例)
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
cu.*,
|
||||
@@ -97,7 +97,7 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
|
||||
// 初始化年末人数为0
|
||||
int thisYearNum = 0;
|
||||
if (!Lang.isEmpty(personTypeUsers)) {
|
||||
// 统计年末人数:加入协会且无退出记录的用户数量
|
||||
// 统计年末人数:加入社团且无退出记录的用户数量
|
||||
List<String> exitUserIds = personTypeUsers.stream()
|
||||
.filter(u -> u.getInt("mode") == 0)
|
||||
.map(u -> u.getString("userId"))
|
||||
@@ -174,7 +174,7 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
|
||||
|
||||
@Override
|
||||
public List<NutMap> getJgUser(String clubId) {
|
||||
// 构建协会管理人员查询SQL(排除普通成员,按职务排序)
|
||||
// 构建社团管理人员查询SQL(排除普通成员,按职务排序)
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
cl.*,
|
||||
@@ -264,13 +264,13 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
|
||||
@Override
|
||||
public Pagination<ClubExaminePageVo> minePageData(ClubUserPageForm pageForm) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
// 非系统管理员,仅查询自己管理的协会(空集合判断避免in查询异常)
|
||||
// 非系统管理员,仅查询自己管理的社团(空集合判断避免in查询异常)
|
||||
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
||||
List<SysClub> myManageClub = sysClubService.getMyManageClub();
|
||||
if (!Lang.isEmpty(myManageClub)) {
|
||||
cnd.and("info.clubId", "in", myManageClub.stream().map(SysClub::getId).collect(Collectors.toList()));
|
||||
} else {
|
||||
// 无管理协会,返回空分页结果
|
||||
// 无管理社团,返回空分页结果
|
||||
return new Pagination<>(pageForm.getPageNumber(), pageForm.getPageSize(), 0, new ArrayList<>());
|
||||
}
|
||||
}
|
||||
@@ -344,7 +344,7 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
|
||||
|
||||
@Override
|
||||
public ClubExamineVo findOne(String id) {
|
||||
// 构建单条考核登记查询SQL(关联协会、联系人信息)
|
||||
// 构建单条考核登记查询SQL(关联社团、联系人信息)
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
scer.*,
|
||||
@@ -431,7 +431,7 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建分页查询基础条件(年度、协会ID)
|
||||
* 构建分页查询基础条件(年度、社团ID)
|
||||
* @param cnd 条件对象
|
||||
* @param pageForm 分页参数
|
||||
* @param tableAlias 表别名
|
||||
|
||||
+2
-2
@@ -316,9 +316,9 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
||||
|
||||
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
|
||||
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("clubRegis"), config).render(docData).writeAndClose(byteArrayOutputStream);
|
||||
CommonDownloadUtil.download("教职工文体协会登记表(" + clubInfo.getString("clubName") + ").docx", byteArrayOutputStream.toByteArray(), response);
|
||||
CommonDownloadUtil.download("教职工文体社团登记表(" + clubInfo.getString("clubName") + ").docx", byteArrayOutputStream.toByteArray(), response);
|
||||
} catch (IOException e) {
|
||||
log.error("协会登记表导出失败,id:{},错误信息:{}", clubId, e.getMessage());
|
||||
log.error("社团登记表导出失败,id:{},错误信息:{}", clubId, e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
||||
|
||||
@Override
|
||||
public SysClub doEdit(SysClub club, List<String> deleteIds, List<NutMap> managePerson) {
|
||||
// 修改协会表
|
||||
// 修改社团表
|
||||
dao().update(club);
|
||||
// 修改发起人表
|
||||
dao().clear(SysClubSponsor.class, Cnd.where("clubId", "=", club.getId()));
|
||||
@@ -228,7 +228,6 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||
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
|
||||
|
||||
@@ -149,7 +149,7 @@ public class SysClubUserServiceImpl extends BaseServiceImpl<ClubUser> implements
|
||||
|
||||
@Override
|
||||
public void clubUser2Scope(String clubId, List<String> users) {
|
||||
// 添加协会成员,需要增加到品牌活动的组别去,wcnm
|
||||
// 添加社团成员,需要增加到品牌活动的组别去,wcnm
|
||||
List<TrainSignUpActivity> list = dao().query(TrainSignUpActivity.class, Cnd.NEW());
|
||||
List<TrainSignUpActivity> activityList = new ArrayList<>();
|
||||
for (TrainSignUpActivity activity : list) {
|
||||
|
||||
+2
-2
@@ -90,10 +90,10 @@ public class ArticleAnalysisController {
|
||||
.trend(null)
|
||||
.build());
|
||||
|
||||
// 获取参与协会数量
|
||||
// 获取参与社团数量
|
||||
long clubCount = articleService.count(Sqls.create("SELECT COUNT(distinct clubId) FROM article WHERE clubId IS NOT NULL"));
|
||||
list.add(ArticleAnalysisOverviewVO.builder()
|
||||
.label("参与协会")
|
||||
.label("参与社团")
|
||||
.value(clubCount)
|
||||
.icon("el-icon-office-building")
|
||||
.bgColor("rgba(230, 162, 60, 0.1)")
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ import java.util.Map;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/article/clubApproval")
|
||||
@Api("新闻投稿协会审核")
|
||||
@Api("新闻投稿社团审核")
|
||||
@Ok("json:full")
|
||||
public class ArticleClubApprovalController {
|
||||
@Inject
|
||||
|
||||
+1
-1
@@ -140,7 +140,7 @@ public class ArticleFirstExamineController {
|
||||
} else if (result.equals("BACK_TO_CLUB")) {
|
||||
String branchClubApprovalLoginName = commonService.findUserLoginNameByRoleCode(RoleConstant.CLUB_PRESIDENT, Cnd.where(Sys_user_role::getClubId, "=", article.getClubId()));
|
||||
if (StrUtil.isBlank(branchClubApprovalLoginName)) {
|
||||
return Result.error("协会未配置审批人,请联系协会!");
|
||||
return Result.error("社团未配置审批人,请联系社团!");
|
||||
}
|
||||
assignments.add(branchClubApprovalLoginName);
|
||||
} else if (result.equals("PASS")) {
|
||||
|
||||
@@ -75,12 +75,12 @@ public class Article extends BaseModel {
|
||||
private String unitName;
|
||||
|
||||
@Column
|
||||
@Comment("协会名称")
|
||||
@Comment("社团名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String clubName;
|
||||
|
||||
@Column
|
||||
@Comment("协会id")
|
||||
@Comment("社团id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String clubId;
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ public class ArticleInfoPageParam extends PageForm {
|
||||
@ApiModelProperty("单位")
|
||||
private String unitId;
|
||||
|
||||
@ApiModelProperty("协会")
|
||||
@ApiModelProperty("社团")
|
||||
private String clubId;
|
||||
|
||||
@ApiModelProperty("稿件来源")
|
||||
|
||||
@@ -48,10 +48,10 @@ public class ArticleInfoPageVO extends BpmTaskApprovalVo {
|
||||
@ApiModelProperty("投稿人单位")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty("投稿人协会")
|
||||
@ApiModelProperty("投稿人社团")
|
||||
private String clubName;
|
||||
|
||||
@ApiModelProperty("投稿人协会ID")
|
||||
@ApiModelProperty("投稿人社团ID")
|
||||
private String clubId;
|
||||
|
||||
@ApiModelProperty("投稿时间")
|
||||
|
||||
@@ -133,7 +133,7 @@ public class UnionCareDataCon {
|
||||
double totalBudgetMoney3 = mapList3.stream().mapToDouble(map -> map.getDouble("totalBudgetMoney")).sum();
|
||||
list.add(new HashMap<String, Object>() {{
|
||||
put("year", year);
|
||||
put("type", "协会经费");
|
||||
put("type", "社团经费");
|
||||
put("value", totalBudgetMoney3);
|
||||
}});
|
||||
|
||||
|
||||
+1
-1
@@ -152,7 +152,7 @@ public class ActivityBudgetApplyController {
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("查询协会,超级管理员查全部的")
|
||||
@ApiOperation("查询社团,超级管理员查全部的")
|
||||
@SaCheckLogin
|
||||
public Result listClub(){
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ public class ActivityBudgetQueryStatisticsController {
|
||||
entities.add(new ExcelExportEntity("分工会", "unionName", 20));
|
||||
}else if (outlayManageSource.equals("ACTIVITY_BUDGET_TYPE_THREE")) {
|
||||
entities.add(new ExcelExportEntity("编码", "clubCode", 20));
|
||||
entities.add(new ExcelExportEntity("协会名称", "clubName", 20));
|
||||
entities.add(new ExcelExportEntity("社团名称", "clubName", 20));
|
||||
}
|
||||
ExcelExportEntity draftCodeEntity = new ExcelExportEntity("预算金额", "totalBudgetMoney", 20);
|
||||
draftCodeEntity.setType(10);
|
||||
|
||||
+1
-1
@@ -180,7 +180,7 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
|
||||
}
|
||||
} else if (activityBudget.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_THREE")) {
|
||||
//如果不等于校工会预算才往表里面加预算
|
||||
//代表协会可能用的是校工会的预算
|
||||
//代表社团可能用的是校工会的预算
|
||||
if (!activityBudget.getIsSchoolBudget()) {
|
||||
*//* jf_club jfClub = dao.fetch(jf_club.class, Cnd.where("year", "=", DateUtil.getYear())
|
||||
.and("club_id", "=", activityBudget.getClubId()));
|
||||
|
||||
+2
-2
@@ -38,7 +38,7 @@ import java.util.Objects;
|
||||
@At("/platform/outlay/outlayManage/backHistory")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
@Api(tags = "协会经费查询")
|
||||
@Api(tags = "社团经费查询")
|
||||
public class OutlayManageClubBackHistoryController {
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ public class OutlayManageClubBackHistoryController {
|
||||
exportEntities.add(new ExcelExportEntity("在职状态", "userState", 20));
|
||||
exportEntities.add(new ExcelExportEntity("是否拨付", "isGiveMoney", 20));
|
||||
exportEntities.add(new ExcelExportEntity("是否缴费", "payed", 20));
|
||||
exportEntities.add(new ExcelExportEntity("所在协会", "clubName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("所在社团", "clubName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("身份", "roleName", 20));
|
||||
|
||||
try {
|
||||
|
||||
+4
-4
@@ -44,7 +44,7 @@ import java.util.stream.Collectors;
|
||||
@At("/platform/outlay/outlayManage/clubManage")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
@Api(tags = "协会经费预算管理")
|
||||
@Api(tags = "社团经费预算管理")
|
||||
public class OutlayManageClubController {
|
||||
|
||||
@Inject
|
||||
@@ -105,7 +105,7 @@ public class OutlayManageClubController {
|
||||
@At
|
||||
@ApiOperation("重置预算")
|
||||
@SaCheckPermission("outlay.outlayManage.club.manage")
|
||||
@SLog(tag = "协会预算分配", msg = "重置了预算分配的金额:${args[0]}")
|
||||
@SLog(tag = "社团预算分配", msg = "重置了预算分配的金额:${args[0]}")
|
||||
public Result resetOutlay(Integer year) {
|
||||
int count = baseService.dao().clear(OutlayManageClub.class, Cnd.where("year", "=", year));
|
||||
return Result.success(count);
|
||||
@@ -114,7 +114,7 @@ public class OutlayManageClubController {
|
||||
@At
|
||||
@ApiOperation("下发预算")
|
||||
@SaCheckPermission("outlay.outlayManage.club.manage")
|
||||
@SLog(tag = "协会预算分配", msg = "根据申报的金额修改本年的预算预算")
|
||||
@SLog(tag = "社团预算分配", msg = "根据申报的金额修改本年的预算预算")
|
||||
public Result issuedOutlay() {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -185,7 +185,7 @@ public class OutlayManageClubController {
|
||||
@At
|
||||
@ApiOperation("给没有核对的人发送核对提醒")
|
||||
@SaCheckPermission("outlay.outlayManage.club.manage")
|
||||
@SLog(tag = "协会预算分配", msg = "给没有核对的人发送核对提醒")
|
||||
@SLog(tag = "社团预算分配", msg = "给没有核对的人发送核对提醒")
|
||||
public Result doMsg() {
|
||||
List<OutlayManageClub> manageClubList = baseService.dao().query(OutlayManageClub.class,
|
||||
Cnd.where(OutlayManageClub::getYear, "=", DateUtil.thisYear())
|
||||
|
||||
+5
-5
@@ -46,13 +46,13 @@ import java.util.Objects;
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2026/2/5 09:44
|
||||
* @description 协会经费查询
|
||||
* @description 社团经费查询
|
||||
*/
|
||||
@IocBean
|
||||
@At("/platform/outlay/outlayManage/query")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
@Api(tags = "协会经费查询")
|
||||
@Api(tags = "社团经费查询")
|
||||
public class OutlayManageClubQueryController {
|
||||
|
||||
@Inject
|
||||
@@ -99,7 +99,7 @@ public class OutlayManageClubQueryController {
|
||||
@At
|
||||
@ApiOperation("提交核对")
|
||||
@SaCheckPermission("outlay.outlayManage.club.query")
|
||||
@SLog(tag = "协会经费查询", msg = "提交核对")
|
||||
@SLog(tag = "社团经费查询", msg = "提交核对")
|
||||
public Result doAudit(String id) {
|
||||
clubQueryService.dao().update(OutlayManageClub.class,
|
||||
Chain.make("isCheck", true),
|
||||
@@ -111,7 +111,7 @@ public class OutlayManageClubQueryController {
|
||||
@At
|
||||
@ApiOperation("取消核对")
|
||||
@SaCheckPermission("outlay.outlayManage.club.query")
|
||||
@SLog(tag = "协会经费查询", msg = "取消核对")
|
||||
@SLog(tag = "社团经费查询", msg = "取消核对")
|
||||
public Result cancelAudit(String id) {
|
||||
clubQueryService.dao().update(OutlayManageClub.class,
|
||||
Chain.make("isCheck", false),
|
||||
@@ -123,7 +123,7 @@ public class OutlayManageClubQueryController {
|
||||
@At
|
||||
@ApiOperation("更新拨付金额")
|
||||
@SaCheckPermission("outlay.outlayManage.club.query")
|
||||
@SLog(tag = "协会经费查询", msg = "更新拨付金额")
|
||||
@SLog(tag = "社团经费查询", msg = "更新拨付金额")
|
||||
public Result doMoney(String clubId) {
|
||||
clubQueryService.doMoney(clubId);
|
||||
|
||||
|
||||
+6
-6
@@ -40,7 +40,7 @@ import java.util.List;
|
||||
@At("/platform/outlay/outlayManage/clubUseDetail")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
@Api(tags = "协会预算使用明细")
|
||||
@Api(tags = "社团预算使用明细")
|
||||
public class OutlayManageClubUseDetailController {
|
||||
|
||||
@Inject
|
||||
@@ -92,7 +92,7 @@ public class OutlayManageClubUseDetailController {
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("某个协会预算使用详情")
|
||||
@ApiOperation("某个社团预算使用详情")
|
||||
@SaCheckPermission("outlay.outlayManage.club.useDetail")
|
||||
public Result detailInfo(PageForm pageForm, String outlayManageId) {
|
||||
Sql sql = Sqls.create("""
|
||||
@@ -104,10 +104,10 @@ public class OutlayManageClubUseDetailController {
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("删除协会预算详情")
|
||||
@ApiOperation("删除社团预算详情")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("outlay.outlayManage.club.useDetail")
|
||||
@SLog(tag = "协会预算使用详情", msg = "删除了协会预算使用详情:${args[0]}")
|
||||
@SLog(tag = "社团预算使用详情", msg = "删除了社团预算使用详情:${args[0]}")
|
||||
public Result doDeleteDetail(String id) {
|
||||
outlayUseDetailService.doDeleteDetail(id,"club");
|
||||
return Result.success();
|
||||
@@ -115,10 +115,10 @@ public class OutlayManageClubUseDetailController {
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("编辑协会预算详情")
|
||||
@ApiOperation("编辑社团预算详情")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("outlay.outlayManage.club.useDetail")
|
||||
@SLog(tag = "协会预算使用详情", msg = "编辑了协会预算使用详情:${args[0]}")
|
||||
@SLog(tag = "社团预算使用详情", msg = "编辑了社团预算使用详情:${args[0]}")
|
||||
public Result doEditDetail(OutlayUseDetail outlayUseDetail) {
|
||||
outlayUseDetailService.doEditDetail(outlayUseDetail,"club");
|
||||
return Result.success();
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class OutlayClubUserBackHistory extends BaseModel implements Serializable
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("协会ID")
|
||||
@Comment("社团ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String clubId;
|
||||
|
||||
|
||||
+4
-4
@@ -17,7 +17,7 @@ import java.math.BigDecimal;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("outlay_manage_club")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("协会经费管理")
|
||||
@Comment("社团经费管理")
|
||||
public class OutlayManageClub extends BaseModel implements Serializable {
|
||||
|
||||
@Column
|
||||
@@ -69,17 +69,17 @@ public class OutlayManageClub extends BaseModel implements Serializable {
|
||||
private Integer historyNotGiveMoneyNum;
|
||||
|
||||
@Column
|
||||
@Comment("协会ID")
|
||||
@Comment("社团ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String clubId;
|
||||
|
||||
@Column
|
||||
@Comment("协会名称")
|
||||
@Comment("社团名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String clubName;
|
||||
|
||||
@Column
|
||||
@Comment("协会code")
|
||||
@Comment("社团code")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String clubCode;
|
||||
|
||||
|
||||
+2
-2
@@ -42,7 +42,7 @@ import java.util.List;
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
@Api(tags = "费用报销管理-协会审核")
|
||||
@Api(tags = "费用报销管理-社团审核")
|
||||
@At("/platform/outlay/reimburse/clubAudit")
|
||||
public class OutlayReimburseClubAuditController {
|
||||
|
||||
@@ -136,7 +136,7 @@ public class OutlayReimburseClubAuditController {
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("协会审核")
|
||||
@ApiOperation("社团审核")
|
||||
@SaCheckPermission(value = {"outlay.reimburse.clubAudit", "h5.outlay.reimburse.clubAudit"}, mode = SaMode.OR)
|
||||
public Result submit(@Param("data") OutlayReimburse outlayReimburse) {
|
||||
// 开启流程实例
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ import java.util.List;
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
@Api(tags = "费用报销管理-协会主席审核")
|
||||
@Api(tags = "费用报销管理-社团主席审核")
|
||||
@At("/platform/outlay/reimburse/clubZxAudit")
|
||||
public class OutlayReimburseClubZxAuditController {
|
||||
|
||||
|
||||
+1
-1
@@ -272,7 +272,7 @@ public class OutlayReimburseApplyServiceImpl extends BaseServiceImpl<OutlayReimb
|
||||
|
||||
}
|
||||
}else if ("ACTIVITY_BUDGET_TYPE_THREE".equals(outlayManageSource)) {
|
||||
//如果进来的是协会
|
||||
//如果进来的是社团
|
||||
OutlayManageClub outlayManageClub = dao().fetch(OutlayManageClub.class, Cnd.where("year", "=", DateUtil.thisYear())
|
||||
.and("clubId", "=", clubId));
|
||||
if (ObjectUtil.isEmpty(outlayManageClub)) {
|
||||
|
||||
+8
@@ -104,6 +104,14 @@ public class ProposalExportComprehensiveController {
|
||||
proposalExportService.exportProposalStatisticsAsZip(pageForm, response);
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@ApiOperation("导出全部提案为单个DOCX")
|
||||
@SaCheckPermission("proposal.query.comprehensive")
|
||||
public void exportAllProposalAsDocx(@Valid @Param("pageForm") ProposalQueryComprehensiveParam pageForm, HttpServletResponse response) {
|
||||
proposalExportService.exportProposalStatisticsAsDocx(pageForm, response);
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@ApiOperation("导出全部提案反馈表ZIP")
|
||||
|
||||
+458
@@ -0,0 +1,458 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.controller.export;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.flow.vo.ProcessTaskVO;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalSearchParam;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFRun;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTable;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTableRow;
|
||||
import org.ddr.poi.html.HtmlRenderPolicy;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
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 org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/proposal/export/singleCustom")
|
||||
@Slf4j
|
||||
@Ok("json:full")
|
||||
@Api(tags = "提案导出-单个提案表自定义")
|
||||
public class ProposalExportSingleCustomController {
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
|
||||
@Inject
|
||||
private SysOfficeTemplateUtil sysOfficeTemplateUtil;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/proposal/export/singleCustom/index.html")
|
||||
@SaCheckPermission("proposal.query.comprehensive")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页提案列表")
|
||||
@SaCheckPermission("proposal.query.comprehensive")
|
||||
public Result pageData(@Valid ProposalSearchParam pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
type.name AS typeName,
|
||||
tcs.fullName AS sessionName,
|
||||
tcd.name AS delegationName,
|
||||
ins.id AS instanceId,
|
||||
ins.state instanceState,
|
||||
t.displayName curTaskName
|
||||
FROM proposal_info info
|
||||
LEFT JOIN proposal_type type ON type.id = info.typeId
|
||||
LEFT JOIN teacher_congress_session tcs ON tcs.id = info.sessionId
|
||||
LEFT JOIN teacher_congress_delegation tcd ON tcd.id = info.delegationId
|
||||
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
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
ProposalSearchParam.buildSearch(cnd, pageForm);
|
||||
cnd.groupBy("info.id");
|
||||
cnd.desc("info.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("查询可导出环节")
|
||||
@SaCheckPermission("proposal.query.comprehensive")
|
||||
public Result stageOptions(String id) {
|
||||
if (StrUtil.isBlank(id)) {
|
||||
return Result.error("参数错误");
|
||||
}
|
||||
ProcessInstance instance = baseService.dao().fetch(ProcessInstance.class, Cnd.where("businessNo", "=", id));
|
||||
if (instance == null) {
|
||||
return Result.success(new ArrayList<>());
|
||||
}
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t.taskName AS value,
|
||||
MAX(t.displayName) AS label,
|
||||
MIN(t.id) AS seq
|
||||
FROM wf_process_task t
|
||||
WHERE t.processInstanceId = @processInstanceId
|
||||
AND t.taskState IN (@doing, @finished)
|
||||
AND t.taskName != 'startTask'
|
||||
AND IFNULL(t.displayName, '') != ''
|
||||
GROUP BY t.taskName
|
||||
ORDER BY seq ASC
|
||||
""");
|
||||
sql.params().set("processInstanceId", instance.getId());
|
||||
sql.params().set("doing", ProcessTaskStateEnum.DOING.getCode());
|
||||
sql.params().set("finished", ProcessTaskStateEnum.FINISHED.getCode());
|
||||
return Result.success(baseService.listMap(sql));
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@ApiOperation("按选择环节导出单个提案表")
|
||||
@SaCheckPermission("proposal.query.comprehensive")
|
||||
public void exportSelectedDocx(String id, @Param("stageTaskNamesJson") String stageTaskNamesJson, HttpServletResponse response) {
|
||||
if (StrUtil.isBlank(id)) {
|
||||
throw new IllegalArgumentException("提案ID不能为空");
|
||||
}
|
||||
|
||||
NutMap proposal = queryProposalBase(id);
|
||||
if (proposal == null) {
|
||||
throw new IllegalArgumentException("提案不存在");
|
||||
}
|
||||
|
||||
List<String> selectedStageTaskNames = parseSelectedStageTaskNames(stageTaskNamesJson);
|
||||
List<NutMap> selectedTasks = querySelectedTasks(id, selectedStageTaskNames);
|
||||
|
||||
byte[] templateBytes = buildTemplateDocxBytes(id);
|
||||
byte[] finalBytes = appendSelectedStageSection(templateBytes, selectedTasks);
|
||||
|
||||
String fileName = proposal.getString("code", "proposal") + "-" + proposal.getString("name", "提案") + "-自定义导出.docx";
|
||||
CommonDownloadUtil.download(fileName, finalBytes, response);
|
||||
}
|
||||
|
||||
private byte[] buildTemplateDocxBytes(String id) {
|
||||
NutMap baseInfo = queryProposalBase(id);
|
||||
if (baseInfo == null) {
|
||||
throw new IllegalArgumentException("提案不存在");
|
||||
}
|
||||
|
||||
String brief = baseInfo.getString("brief", "");
|
||||
String measures = baseInfo.getString("measures", "");
|
||||
baseInfo.put("brief", sysOfficeTemplateUtil.convertRichTextToDocText(brief));
|
||||
baseInfo.put("measures", sysOfficeTemplateUtil.convertRichTextToDocText(measures));
|
||||
|
||||
ProcessInstance processInstance = baseService.dao().fetch(ProcessInstance.class, Cnd.where("businessNo", "=", id));
|
||||
List<ProcessTaskVO> doneTaskVos = new ArrayList<>();
|
||||
if (processInstance != null) {
|
||||
List<ProcessTask> doneTaskList = flowEngine.processTaskService().getDoneTaskList(processInstance.getId(), null);
|
||||
for (ProcessTask doneTask : doneTaskList) {
|
||||
ProcessTaskVO taskVO = flowEngine.processTaskService().findById(doneTask.getId());
|
||||
if (taskVO != null) {
|
||||
doneTaskVos.add(taskVO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, List<ProcessTaskVO>> taskGroups = doneTaskVos.stream().collect(Collectors.groupingBy(ProcessTaskVO::getDisplayName));
|
||||
|
||||
List<NutMap> secondInfos = new ArrayList<>();
|
||||
List<ProcessTaskVO> secondTaskVos = taskGroups.get("提案附议");
|
||||
if (secondTaskVos != null) {
|
||||
for (ProcessTaskVO secondTaskVO : secondTaskVos) {
|
||||
Dict taskFormData = secondTaskVO.getTaskFormData();
|
||||
if (taskFormData == null) {
|
||||
continue;
|
||||
}
|
||||
NutMap secondInfo = new NutMap();
|
||||
secondInfo.put("s_username", taskFormData.getStr("userName"));
|
||||
secondInfo.put("s_unitName", taskFormData.getStr("unitName"));
|
||||
String loginName = taskFormData.getStr("loginName");
|
||||
if (StrUtil.isNotBlank(loginName)) {
|
||||
Sql taskUserSql = Sqls.create("select mobile from sys_user where loginname=@loginname and delFlag != 1 limit 0,1");
|
||||
taskUserSql.setParam("loginname", loginName);
|
||||
taskUserSql.setCallback(Sqls.callback.map());
|
||||
baseService.dao().execute(taskUserSql);
|
||||
NutMap taskUserMap = (NutMap) taskUserSql.getResult();
|
||||
secondInfo.put("s_mobile", taskUserMap == null ? "" : taskUserMap.getString("mobile", ""));
|
||||
} else {
|
||||
secondInfo.put("s_mobile", "");
|
||||
}
|
||||
secondInfos.add(secondInfo);
|
||||
}
|
||||
}
|
||||
|
||||
List<NutMap> delegationAuditList = new ArrayList<>();
|
||||
List<ProcessTaskVO> delegationTaskVos = taskGroups.get("团长审核");
|
||||
if (delegationTaskVos != null) {
|
||||
for (ProcessTaskVO delegationTaskVO : delegationTaskVos) {
|
||||
Dict taskFormData = delegationTaskVO.getTaskFormData();
|
||||
if (taskFormData == null) {
|
||||
continue;
|
||||
}
|
||||
NutMap delegationAudit = new NutMap();
|
||||
delegationAudit.put("opinion", taskFormData.getStr("opinion"));
|
||||
delegationAudit.put("username", taskFormData.getStr("userName"));
|
||||
delegationAudit.put("auditTime", delegationTaskVO.getFinishTime() == null ? "" : DateUtil.format(delegationTaskVO.getFinishTime(), "yyyy-MM-dd HH:mm:ss"));
|
||||
delegationAuditList.add(delegationAudit);
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, Object> docCellDataMap = new HashMap<>();
|
||||
docCellDataMap.put("proposalCode", baseInfo.getString("code", ""));
|
||||
docCellDataMap.put("createTime", baseInfo.getString("createTime", ""));
|
||||
docCellDataMap.put("username", baseInfo.getString("createUserName", ""));
|
||||
docCellDataMap.put("delegationName", baseInfo.getString("delegationName", ""));
|
||||
docCellDataMap.put("unitName", baseInfo.getString("unitName", ""));
|
||||
docCellDataMap.put("mobile", baseInfo.getString("mobile", ""));
|
||||
docCellDataMap.put("proposalName", baseInfo.getString("name", ""));
|
||||
docCellDataMap.put("brief", baseInfo.getString("brief", ""));
|
||||
docCellDataMap.put("measures", baseInfo.getString("measures", ""));
|
||||
|
||||
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
|
||||
HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
|
||||
htmlRenderPolicy.getConfig().setShowDefaultTableBorderInTableCell(true);
|
||||
|
||||
Configure config = Configure.builder()
|
||||
.bind("secondedList", policy)
|
||||
.bind("seconders", policy)
|
||||
.bind("brief", htmlRenderPolicy)
|
||||
.bind("measures", htmlRenderPolicy)
|
||||
.bind("taskFormData.tf_opinion", htmlRenderPolicy)
|
||||
.build();
|
||||
|
||||
Map<String, Object> renderDocCellDataMap = MapUtil.of("proposal", docCellDataMap);
|
||||
renderDocCellDataMap.put("secondedList", secondInfos);
|
||||
renderDocCellDataMap.put("delegationAuditList", delegationAuditList);
|
||||
|
||||
try (ByteArrayOutputStream out = new ByteArrayOutputStream()) {
|
||||
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("proposal"), config).render(renderDocCellDataMap).writeAndClose(out);
|
||||
return out.toByteArray();
|
||||
} catch (IOException e) {
|
||||
log.error("提案模板导出失败, proposalId={}, error={}", id, e.getMessage());
|
||||
throw new RuntimeException("导出失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
private byte[] appendSelectedStageSection(byte[] templateBytes, List<NutMap> selectedTasks) {
|
||||
if (templateBytes == null || templateBytes.length == 0) {
|
||||
throw new RuntimeException("模板文档为空");
|
||||
}
|
||||
if (selectedTasks == null) {
|
||||
selectedTasks = new ArrayList<>();
|
||||
}
|
||||
|
||||
try (XWPFDocument doc = new XWPFDocument(new ByteArrayInputStream(templateBytes));
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream()) {
|
||||
XWPFParagraph titleP = doc.createParagraph();
|
||||
titleP.setAlignment(ParagraphAlignment.LEFT);
|
||||
XWPFRun titleRun = titleP.createRun();
|
||||
titleRun.setBold(true);
|
||||
titleRun.setText("附加环节内容(按勾选导出)");
|
||||
|
||||
if (selectedTasks.isEmpty()) {
|
||||
XWPFParagraph emptyP = doc.createParagraph();
|
||||
emptyP.createRun().setText("未勾选流程环节,或所选环节暂无数据。");
|
||||
} else {
|
||||
appendStageContent(doc, selectedTasks);
|
||||
}
|
||||
|
||||
doc.write(out);
|
||||
return out.toByteArray();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("导出失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
private NutMap queryProposalBase(String id) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.id,
|
||||
info.code,
|
||||
info.name,
|
||||
info.brief,
|
||||
info.measures,
|
||||
info.createUserName,
|
||||
info.createUserLoginName,
|
||||
DATE_FORMAT(info.createTime, '%Y-%m-%d') AS createTime,
|
||||
IFNULL(type.name, '') AS typeName,
|
||||
IFNULL(tcs.fullName, '') AS sessionName,
|
||||
IFNULL(tcd.name, '') AS delegationName,
|
||||
IFNULL(tcde.unitName, '') AS unitName,
|
||||
IFNULL(tcde.mobile, '') AS mobile
|
||||
FROM proposal_info info
|
||||
LEFT JOIN proposal_type type ON type.id = info.typeId
|
||||
LEFT JOIN teacher_congress_session tcs ON tcs.id = info.sessionId
|
||||
LEFT JOIN teacher_congress_delegation tcd ON tcd.id = info.delegationId
|
||||
LEFT JOIN teacher_congress_delegate tcde ON tcde.loginName = info.createUserLoginName
|
||||
WHERE info.id = @id
|
||||
""");
|
||||
sql.setParam("id", id);
|
||||
sql.setCallback(Sqls.callback.map());
|
||||
baseService.dao().execute(sql);
|
||||
return (NutMap) sql.getResult();
|
||||
}
|
||||
|
||||
private List<String> parseSelectedStageTaskNames(String stageTaskNamesJson) {
|
||||
if (StrUtil.isBlank(stageTaskNamesJson)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
try {
|
||||
String[] arr = JSONUtil.toBean(stageTaskNamesJson, String[].class);
|
||||
if (arr == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return Arrays.stream(arr).filter(StrUtil::isNotBlank).distinct().collect(Collectors.toList());
|
||||
} catch (Exception e) {
|
||||
log.warn("解析环节参数失败: {}", stageTaskNamesJson);
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
private List<NutMap> querySelectedTasks(String proposalId, List<String> selectedStageTaskNames) {
|
||||
ProcessInstance instance = baseService.dao().fetch(ProcessInstance.class, Cnd.where("businessNo", "=", proposalId));
|
||||
if (instance == null || selectedStageTaskNames.isEmpty()) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t.id,
|
||||
t.taskName,
|
||||
t.displayName,
|
||||
t.finishTime,
|
||||
t.taskState
|
||||
FROM wf_process_task t
|
||||
WHERE t.processInstanceId = @processInstanceId
|
||||
AND t.taskState IN (@doing, @finished)
|
||||
AND t.taskName IN (@taskNames)
|
||||
ORDER BY t.id ASC
|
||||
""");
|
||||
sql.params().set("processInstanceId", instance.getId());
|
||||
sql.params().set("doing", ProcessTaskStateEnum.DOING.getCode());
|
||||
sql.params().set("finished", ProcessTaskStateEnum.FINISHED.getCode());
|
||||
sql.params().set("taskNames", selectedStageTaskNames);
|
||||
|
||||
List<NutMap> rawList = baseService.listMap(sql);
|
||||
|
||||
Map<String, Integer> stageOrderMap = new LinkedHashMap<>();
|
||||
for (int i = 0; i < selectedStageTaskNames.size(); i++) {
|
||||
stageOrderMap.put(selectedStageTaskNames.get(i), i);
|
||||
}
|
||||
|
||||
rawList.sort((a, b) -> {
|
||||
int orderA = stageOrderMap.getOrDefault(a.getString("taskName", ""), Integer.MAX_VALUE);
|
||||
int orderB = stageOrderMap.getOrDefault(b.getString("taskName", ""), Integer.MAX_VALUE);
|
||||
if (orderA != orderB) {
|
||||
return Integer.compare(orderA, orderB);
|
||||
}
|
||||
return Long.compare(a.getLong("id", 0L), b.getLong("id", 0L));
|
||||
});
|
||||
|
||||
return rawList;
|
||||
}
|
||||
|
||||
private void appendStageContent(XWPFDocument doc, List<NutMap> selectedTasks) {
|
||||
Map<String, List<NutMap>> grouped = selectedTasks.stream()
|
||||
.collect(Collectors.groupingBy(v -> v.getString("taskName", ""), LinkedHashMap::new, Collectors.toList()));
|
||||
|
||||
int stageIndex = 1;
|
||||
for (Map.Entry<String, List<NutMap>> entry : grouped.entrySet()) {
|
||||
List<NutMap> tasks = entry.getValue();
|
||||
String displayName = tasks.get(0).getString("displayName", entry.getKey());
|
||||
|
||||
XWPFParagraph stageP = doc.createParagraph();
|
||||
XWPFRun stageRun = stageP.createRun();
|
||||
stageRun.setBold(true);
|
||||
stageRun.setText(String.format("%d.%s", stageIndex++, displayName));
|
||||
|
||||
int idx = 1;
|
||||
for (NutMap task : tasks) {
|
||||
ProcessTaskVO vo = flowEngine.processTaskService().findById(task.getLong("id"));
|
||||
Dict formData = vo == null ? null : vo.getTaskFormData();
|
||||
|
||||
XWPFTable table = doc.createTable(5, 2);
|
||||
fillCell(table.getRow(0), "序号", String.valueOf(idx++));
|
||||
fillCell(table.getRow(1), "办理人", extractUserName(formData, vo));
|
||||
fillCell(table.getRow(2), "办理时间", task.getTime("finishTime") == null ? "" : DateUtil.formatDateTime(task.getTime("finishTime")));
|
||||
fillCell(table.getRow(3), "办理意见", extractOpinion(formData));
|
||||
fillCell(table.getRow(4), "环节数据", flattenFormData(formData));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String extractUserName(Dict formData, ProcessTaskVO vo) {
|
||||
String userName = "";
|
||||
if (formData != null) {
|
||||
userName = formData.getStr("userName");
|
||||
if (StrUtil.isBlank(userName)) {
|
||||
userName = formData.getStr("username");
|
||||
}
|
||||
}
|
||||
if (StrUtil.isBlank(userName)) {
|
||||
userName = vo == null ? "" : vo.getOperator();
|
||||
}
|
||||
return StrUtil.blankToDefault(userName, "");
|
||||
}
|
||||
|
||||
private String extractOpinion(Dict formData) {
|
||||
if (formData == null || formData.isEmpty()) {
|
||||
return "";
|
||||
}
|
||||
List<String> keys = List.of("opinion", "auditOpinion", "feedback", "caseFilingResult", "caseFilingType", "tf_opinion", "tf_feedback", "tf_caseFilingResult", "tf_caseFilingType");
|
||||
for (String key : keys) {
|
||||
String val = formData.getStr(key);
|
||||
if (StrUtil.isNotBlank(val)) {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private String flattenFormData(Dict formData) {
|
||||
if (formData == null || formData.isEmpty()) {
|
||||
return "";
|
||||
}
|
||||
Set<String> skipKeys = Set.of("tf_userName", "userName", "tf_loginName", "loginName", "tf_unitId", "unitId", "tf_unitName", "unitName", "tf_unionId", "unionId", "finishTimeForDocx");
|
||||
return formData.entrySet().stream()
|
||||
.filter(e -> !skipKeys.contains(e.getKey()))
|
||||
.filter(e -> e.getValue() != null && StrUtil.isNotBlank(String.valueOf(e.getValue())))
|
||||
.map(e -> e.getKey() + "=" + String.valueOf(e.getValue()))
|
||||
.collect(Collectors.joining(";"));
|
||||
}
|
||||
|
||||
private void fillCell(XWPFTableRow row, String key, String value) {
|
||||
row.getCell(0).setText(key);
|
||||
row.getCell(1).setText(StrUtil.blankToDefault(value, ""));
|
||||
}
|
||||
}
|
||||
+317
@@ -0,0 +1,317 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.controller.query;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.sys.models.Sys_dict;
|
||||
import com.budwk.app.sys.services.SysDictService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.json.Json;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/proposal/query/analysis")
|
||||
@Slf4j
|
||||
@Ok("json:full")
|
||||
@Api(tags = "提案统计分析")
|
||||
public class ProposalQueryAnalysisController {
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
@Inject
|
||||
private SysDictService sysDictService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/proposal/query/analysis/index.html")
|
||||
@SaCheckPermission("proposal.query.analysis")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("统计数据")
|
||||
@SaCheckPermission("proposal.query.analysis")
|
||||
public Result statisticsData(String sessionId) {
|
||||
if (StrUtil.isBlank(sessionId)) {
|
||||
return Result.error("请先选择教代会届次");
|
||||
}
|
||||
return Result.success(buildStatisticsRows(sessionId));
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分析数据")
|
||||
@SaCheckPermission("proposal.query.analysis")
|
||||
public Result analysisData(String sessionId) {
|
||||
if (StrUtil.isBlank(sessionId)) {
|
||||
return Result.error("请先选择教代会届次");
|
||||
}
|
||||
return Result.success(buildAnalysisRows(sessionId));
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@ApiOperation("导出统计数据")
|
||||
@SaCheckPermission("proposal.query.analysis")
|
||||
public void exportStatisticsData(String sessionId, HttpServletResponse response) {
|
||||
List<NutMap> list = buildStatisticsRows(sessionId);
|
||||
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||
entities.add(new ExcelExportEntity("统计维度", "dimension", 20));
|
||||
entities.add(new ExcelExportEntity("分类项", "itemName", 30));
|
||||
entities.add(new ExcelExportEntity("数量", "count", 12));
|
||||
entities.add(new ExcelExportEntity("占比", "rate", 12));
|
||||
ExportParams params = new ExportParams();
|
||||
params.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(params, entities, list);
|
||||
CommonDownloadUtil.download("提案统计数据.xlsx", workbook, response);
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@ApiOperation("导出分析数据")
|
||||
@SaCheckPermission("proposal.query.analysis")
|
||||
public void exportAnalysisData(String sessionId, HttpServletResponse response) {
|
||||
List<NutMap> list = buildAnalysisRows(sessionId);
|
||||
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||
entities.add(new ExcelExportEntity("统计维度", "dimension", 20));
|
||||
entities.add(new ExcelExportEntity("总量", "total", 12));
|
||||
entities.add(new ExcelExportEntity("分类数量", "categoryCount", 12));
|
||||
entities.add(new ExcelExportEntity("最高项", "topItem", 30));
|
||||
entities.add(new ExcelExportEntity("最高数量", "topCount", 12));
|
||||
entities.add(new ExcelExportEntity("最高占比", "topRate", 12));
|
||||
entities.add(new ExcelExportEntity("分析结论", "analysis", 60));
|
||||
ExportParams params = new ExportParams();
|
||||
params.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(params, entities, list);
|
||||
CommonDownloadUtil.download("提案分析数据.xlsx", workbook, response);
|
||||
}
|
||||
|
||||
private List<NutMap> buildStatisticsRows(String sessionId) {
|
||||
Map<String, List<NutMap>> dataMap = loadDimensionData(sessionId);
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
dataMap.forEach((dimension, items) -> {
|
||||
long total = items.stream().mapToLong(v -> v.getLong("count", 0L)).sum();
|
||||
for (NutMap item : items) {
|
||||
long count = item.getLong("count", 0L);
|
||||
result.add(NutMap.NEW()
|
||||
.addv("dimension", dimension)
|
||||
.addv("itemName", item.getString("itemName", "未维护"))
|
||||
.addv("count", count)
|
||||
.addv("rate", formatPercent(count, total)));
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<NutMap> buildAnalysisRows(String sessionId) {
|
||||
Map<String, List<NutMap>> dataMap = loadDimensionData(sessionId);
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
dataMap.forEach((dimension, items) -> {
|
||||
if (items.isEmpty()) {
|
||||
result.add(NutMap.NEW()
|
||||
.addv("dimension", dimension)
|
||||
.addv("total", 0)
|
||||
.addv("categoryCount", 0)
|
||||
.addv("topItem", "-")
|
||||
.addv("topCount", 0)
|
||||
.addv("topRate", "0.00%")
|
||||
.addv("analysis", "暂无数据"));
|
||||
return;
|
||||
}
|
||||
|
||||
List<NutMap> sorted = items.stream()
|
||||
.sorted(Comparator.comparingLong((NutMap v) -> v.getLong("count", 0L)).reversed())
|
||||
.toList();
|
||||
|
||||
long total = sorted.stream().mapToLong(v -> v.getLong("count", 0L)).sum();
|
||||
NutMap top = sorted.get(0);
|
||||
long topCount = top.getLong("count", 0L);
|
||||
String topItem = top.getString("itemName", "未维护");
|
||||
String topRate = formatPercent(topCount, total);
|
||||
String analysis = String.format("%s主要集中在【%s】,数量为%d,占比%s。", dimension, topItem, topCount, topRate);
|
||||
|
||||
result.add(NutMap.NEW()
|
||||
.addv("dimension", dimension)
|
||||
.addv("total", total)
|
||||
.addv("categoryCount", sorted.size())
|
||||
.addv("topItem", topItem)
|
||||
.addv("topCount", topCount)
|
||||
.addv("topRate", topRate)
|
||||
.addv("analysis", analysis));
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
private Map<String, List<NutMap>> loadDimensionData(String sessionId) {
|
||||
Map<String, List<NutMap>> map = new LinkedHashMap<>();
|
||||
map.put("提案人单位", queryUnitStat(sessionId));
|
||||
map.put("提案类型", queryTypeStat(sessionId));
|
||||
map.put("代表团", queryDelegationStat(sessionId));
|
||||
map.put("立案结果", queryCaseFilingResultStat(sessionId));
|
||||
map.put("满意度", querySatisfactionStat(sessionId));
|
||||
return map;
|
||||
}
|
||||
|
||||
private List<NutMap> queryUnitStat(String sessionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
IFNULL(tcde.unitName, '未维护') AS itemName,
|
||||
COUNT(info.id) AS count
|
||||
FROM proposal_info info
|
||||
LEFT JOIN teacher_congress_delegate tcde ON tcde.loginName = info.createUserLoginName
|
||||
WHERE info.sessionId = @sessionId
|
||||
GROUP BY itemName
|
||||
ORDER BY count DESC, itemName ASC
|
||||
""");
|
||||
sql.setParam("sessionId", sessionId);
|
||||
return baseService.listMap(sql);
|
||||
}
|
||||
|
||||
private List<NutMap> queryTypeStat(String sessionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
IFNULL(t.name, '未分类') AS itemName,
|
||||
COUNT(info.id) AS count
|
||||
FROM proposal_info info
|
||||
LEFT JOIN proposal_type t ON t.id = info.typeId
|
||||
WHERE info.sessionId = @sessionId
|
||||
GROUP BY itemName
|
||||
ORDER BY count DESC, itemName ASC
|
||||
""");
|
||||
sql.setParam("sessionId", sessionId);
|
||||
return baseService.listMap(sql);
|
||||
}
|
||||
|
||||
private List<NutMap> queryDelegationStat(String sessionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
IFNULL(d.name, '未分团') AS itemName,
|
||||
COUNT(info.id) AS count
|
||||
FROM proposal_info info
|
||||
LEFT JOIN teacher_congress_delegation d ON d.id = info.delegationId
|
||||
WHERE info.sessionId = @sessionId
|
||||
GROUP BY itemName
|
||||
ORDER BY count DESC, itemName ASC
|
||||
""");
|
||||
sql.setParam("sessionId", sessionId);
|
||||
return baseService.listMap(sql);
|
||||
}
|
||||
|
||||
private List<NutMap> queryCaseFilingResultStat(String sessionId) {
|
||||
List<Sys_dict> dictList = sysDictService.getSubListByCode("PROPOSAL_CASE_FILING_RESULT");
|
||||
Map<String, String> dictNameMap = dictList.stream().collect(Collectors.toMap(Sys_dict::getCode, Sys_dict::getName, (a, b) -> a));
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
IFNULL(info.caseFilingResult, '') AS code,
|
||||
COUNT(info.id) AS count
|
||||
FROM proposal_info info
|
||||
WHERE info.sessionId = @sessionId
|
||||
GROUP BY info.caseFilingResult
|
||||
""");
|
||||
sql.setParam("sessionId", sessionId);
|
||||
List<NutMap> rawList = baseService.listMap(sql);
|
||||
Map<String, Long> countMap = rawList.stream().collect(Collectors.toMap(v -> v.getString("code", ""), v -> v.getLong("count", 0L), Long::sum));
|
||||
|
||||
LinkedHashSet<String> allCodes = new LinkedHashSet<>(dictNameMap.keySet());
|
||||
allCodes.addAll(countMap.keySet());
|
||||
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
for (String code : allCodes) {
|
||||
String itemName = StrUtil.isBlank(code) ? "未立案结果" : dictNameMap.getOrDefault(code, code);
|
||||
result.add(NutMap.NEW().addv("itemName", itemName).addv("count", countMap.getOrDefault(code, 0L)));
|
||||
}
|
||||
result.sort(Comparator.comparingLong((NutMap v) -> v.getLong("count", 0L)).reversed());
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<NutMap> querySatisfactionStat(String sessionId) {
|
||||
List<Sys_dict> dictList = sysDictService.getSubListByCode("PROPOSAL_FEEDBACK");
|
||||
Map<String, String> dictNameMap = dictList.stream().collect(Collectors.toMap(Sys_dict::getCode, Sys_dict::getName, (a, b) -> a));
|
||||
|
||||
Sql totalSql = Sqls.create("SELECT COUNT(1) AS total FROM proposal_info WHERE sessionId = @sessionId");
|
||||
totalSql.setParam("sessionId", sessionId);
|
||||
List<NutMap> totalList = baseService.listMap(totalSql);
|
||||
long total = totalList.isEmpty() ? 0L : totalList.get(0).getLong("total", 0L);
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t.variable
|
||||
FROM proposal_info info
|
||||
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
|
||||
LEFT JOIN (
|
||||
SELECT processInstanceId, MAX(finishTime) AS finishTime
|
||||
FROM wf_process_task
|
||||
WHERE taskName = 'feedback' AND taskState = 20
|
||||
GROUP BY processInstanceId
|
||||
) latest ON latest.processInstanceId = ins.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id
|
||||
AND t.taskName = 'feedback'
|
||||
AND t.taskState = 20
|
||||
AND t.finishTime = latest.finishTime
|
||||
WHERE info.sessionId = @sessionId
|
||||
""");
|
||||
sql.setParam("sessionId", sessionId);
|
||||
List<NutMap> rowList = baseService.listMap(sql);
|
||||
|
||||
Map<String, Long> countMap = new LinkedHashMap<>();
|
||||
long ratedCount = 0L;
|
||||
for (NutMap row : rowList) {
|
||||
String variableStr = row.getString("variable", "");
|
||||
if (StrUtil.isBlank(variableStr)) {
|
||||
continue;
|
||||
}
|
||||
NutMap variable = Json.fromJson(NutMap.class, variableStr);
|
||||
String code = variable.getString("tf_feedback", "");
|
||||
if (StrUtil.isBlank(code)) {
|
||||
continue;
|
||||
}
|
||||
countMap.put(code, countMap.getOrDefault(code, 0L) + 1);
|
||||
ratedCount++;
|
||||
}
|
||||
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
for (Sys_dict dict : dictList) {
|
||||
result.add(NutMap.NEW().addv("itemName", dict.getName()).addv("count", countMap.getOrDefault(dict.getCode(), 0L)));
|
||||
}
|
||||
|
||||
countMap.forEach((code, cnt) -> {
|
||||
if (!dictNameMap.containsKey(code)) {
|
||||
result.add(NutMap.NEW().addv("itemName", code).addv("count", cnt));
|
||||
}
|
||||
});
|
||||
|
||||
long unrated = Math.max(total - ratedCount, 0L);
|
||||
result.add(NutMap.NEW().addv("itemName", "未评价").addv("count", unrated));
|
||||
result.sort(Comparator.comparingLong((NutMap v) -> v.getLong("count", 0L)).reversed());
|
||||
return result;
|
||||
}
|
||||
|
||||
private String formatPercent(long count, long total) {
|
||||
if (total <= 0) {
|
||||
return "0.00%";
|
||||
}
|
||||
return String.format("%.2f%%", (count * 100.0D) / total);
|
||||
}
|
||||
}
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.controller.transact;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.flow.enums.ProcessTaskPerformTypeEnum;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalSearchParam;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
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;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/proposal/control")
|
||||
@Slf4j
|
||||
@Ok("json:full")
|
||||
@Api(tags = "提案管理-状态调整")
|
||||
public class ProposalControlController {
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/proposal/transact/control/index.html")
|
||||
@SaCheckPermission("proposal.control")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.control")
|
||||
@ApiOperation("分页列表")
|
||||
public Result pageData(@Valid ProposalSearchParam pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
type.name AS typeName,
|
||||
tcs.fullName AS sessionName,
|
||||
tcd.name AS delegationName,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName), '结束') curTaskName
|
||||
FROM wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN proposal_info info ON info.id = ins.businessNo
|
||||
LEFT JOIN proposal_type type ON type.id = info.typeId
|
||||
LEFT JOIN teacher_congress_session tcs ON tcs.id = info.sessionId
|
||||
LEFT JOIN teacher_congress_delegation tcd ON tcd.id = info.delegationId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
|
||||
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
}
|
||||
|
||||
ProposalSearchParam.buildSearch(cnd, pageForm);
|
||||
cnd.groupBy("t.id");
|
||||
cnd.desc("t.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.control")
|
||||
@ApiOperation("获取可跳转节点")
|
||||
public Result jumpNodes(Long instanceId) {
|
||||
if (instanceId == null) {
|
||||
return Result.error("参数错误");
|
||||
}
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t.taskName AS value,
|
||||
MAX(t.displayName) AS label,
|
||||
MIN(t.id) AS seq
|
||||
FROM wf_process_task t
|
||||
WHERE t.processInstanceId = @instanceId
|
||||
AND t.taskState IN (@doing, @finish)
|
||||
AND t.performType != @countersign
|
||||
GROUP BY t.taskName
|
||||
ORDER BY seq ASC
|
||||
""");
|
||||
sql.params().set("instanceId", instanceId);
|
||||
sql.params().set("doing", ProcessTaskStateEnum.DOING.getCode());
|
||||
sql.params().set("finish", ProcessTaskStateEnum.FINISHED.getCode());
|
||||
sql.params().set("countersign", ProcessTaskPerformTypeEnum.COUNTERSIGN.getCode());
|
||||
return Result.success(baseService.listMap(sql));
|
||||
}
|
||||
}
|
||||
+8
@@ -49,6 +49,14 @@ public interface ProposalExportService extends BaseService<ProposalInfo> {
|
||||
* @param response
|
||||
*/
|
||||
void exportProposalStatisticsAsZip(ProposalQueryComprehensiveParam pageForm, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 批量导出提案表为单个汇集文档
|
||||
*
|
||||
* @param pageForm
|
||||
* @param response
|
||||
*/
|
||||
void exportProposalStatisticsAsDocx(ProposalQueryComprehensiveParam pageForm, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 导出反馈表
|
||||
|
||||
+96
-2
@@ -28,6 +28,12 @@ import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.xwpf.usermodel.BreakType;
|
||||
import org.apache.poi.xwpf.usermodel.IBodyElement;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFRun;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTable;
|
||||
import org.ddr.poi.html.HtmlRenderPolicy;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
@@ -40,6 +46,7 @@ import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@@ -326,15 +333,16 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
|
||||
for (NutMap proposalRow : list) {
|
||||
try (ByteArrayOutputStream docxByteArrayOutputStream = new ByteArrayOutputStream()) {
|
||||
proposalCommonService.exportProposalAsDocx(proposalRow.getString("id"), docxByteArrayOutputStream);
|
||||
ZipEntry zipEntry = new ZipEntry(proposalRow.getString("code") + "-" + proposalRow.getString("name") + ".docx");
|
||||
ZipEntry zipEntry = new ZipEntry(proposalRow.getString("code") + "-" + sanitizeZipFileName(proposalRow.getString("name")) + ".docx");
|
||||
zipOutputStream.putNextEntry(zipEntry);
|
||||
docxByteArrayOutputStream.writeTo(zipOutputStream);
|
||||
zipOutputStream.closeEntry();
|
||||
} catch (IOException e) {
|
||||
// 处理单个文件生成失败的情况
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException("zip entry write failed, proposalId=" + proposalRow.getString("id"), e);
|
||||
}
|
||||
}
|
||||
zipOutputStream.finish();
|
||||
zipOutputStream.close();
|
||||
CommonDownloadUtil.download("提案汇总压缩包.zip", bos.toByteArray(), response);
|
||||
} catch (Exception e) {
|
||||
@@ -345,6 +353,92 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void exportProposalStatisticsAsDocx(ProposalQueryComprehensiveParam pageForm, HttpServletResponse response) {
|
||||
List<NutMap> list = queryProposalBaseList(pageForm);
|
||||
if (Lang.isEmpty(list)) {
|
||||
throw Lang.makeThrow("暂无可导出的提案数据");
|
||||
}
|
||||
XWPFDocument mergedDoc = null;
|
||||
try (ByteArrayOutputStream out = new ByteArrayOutputStream()) {
|
||||
for (NutMap proposalRow : list) {
|
||||
try (ByteArrayOutputStream oneDocOut = new ByteArrayOutputStream()) {
|
||||
proposalCommonService.exportProposalAsDocx(proposalRow.getString("id"), oneDocOut);
|
||||
if (mergedDoc == null) {
|
||||
mergedDoc = new XWPFDocument(new ByteArrayInputStream(oneDocOut.toByteArray()));
|
||||
} else {
|
||||
try (XWPFDocument oneDoc = new XWPFDocument(new ByteArrayInputStream(oneDocOut.toByteArray()))) {
|
||||
appendDocument(mergedDoc, oneDoc, true);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("proposal merge export failed, proposalId={}, error={}", proposalRow.getString("id"), e.getMessage());
|
||||
}
|
||||
}
|
||||
if (mergedDoc == null) {
|
||||
throw Lang.makeThrow("暂无可导出的提案数据");
|
||||
}
|
||||
mergedDoc.write(out);
|
||||
CommonDownloadUtil.download("proposal-merged.docx", out.toByteArray(), response);
|
||||
} catch (Exception e) {
|
||||
log.error("proposal merge docx export failed: {}", e.getMessage(), e);
|
||||
throw Lang.makeThrow("导出失败");
|
||||
} finally {
|
||||
if (mergedDoc != null) {
|
||||
try {
|
||||
mergedDoc.close();
|
||||
} catch (IOException e) {
|
||||
log.warn("close merged doc failed: {}", e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private List<NutMap> queryProposalBaseList(ProposalQueryComprehensiveParam pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.id,
|
||||
info.code,
|
||||
info.name
|
||||
FROM
|
||||
proposal_info info
|
||||
LEFT JOIN proposal_type type on type.id = info.typeId
|
||||
LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId
|
||||
LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId
|
||||
LEFT JOIN teacher_congress_delegate tcde on tcde.loginName = info.createUserLoginName
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
ProposalQueryComprehensiveParam.buildSearch(cnd, pageForm);
|
||||
cnd.groupBy("info.id");
|
||||
cnd.asc("info.code");
|
||||
sql.setCondition(cnd);
|
||||
return listMap(sql);
|
||||
}
|
||||
|
||||
private void appendDocument(XWPFDocument target, XWPFDocument source, boolean addPageBreakBefore) {
|
||||
if (addPageBreakBefore && !target.getBodyElements().isEmpty()) {
|
||||
XWPFParagraph paragraph = target.createParagraph();
|
||||
XWPFRun run = paragraph.createRun();
|
||||
run.addBreak(BreakType.PAGE);
|
||||
}
|
||||
for (IBodyElement bodyElement : source.getBodyElements()) {
|
||||
if (bodyElement instanceof XWPFParagraph) {
|
||||
XWPFParagraph paragraph = (XWPFParagraph) bodyElement;
|
||||
XWPFParagraph newParagraph = target.createParagraph();
|
||||
newParagraph.getCTP().set(paragraph.getCTP().copy());
|
||||
} else if (bodyElement instanceof XWPFTable) {
|
||||
XWPFTable table = (XWPFTable) bodyElement;
|
||||
XWPFTable newTable = target.createTable();
|
||||
newTable.getCTTbl().set(table.getCTTbl().copy());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String sanitizeZipFileName(String name) {
|
||||
return StrUtil.blankToDefault(name, "unnamed").replaceAll("[\\\\/:*?\"<>|\\r\\n]+", "_");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportFeedBackAsZip(ProposalQueryComprehensiveParam pageForm, HttpServletResponse response) {
|
||||
Sql sql = Sqls.create("""
|
||||
|
||||
@@ -229,9 +229,9 @@
|
||||
|
||||
<el-row class="query-row"
|
||||
v-if="is_A06===true||is_sysadmin===true||is_H02===true">
|
||||
<el-col class="query-title">协会:</el-col>
|
||||
<el-col class="query-title">社团:</el-col>
|
||||
<el-col class="query-content">
|
||||
<el-select v-model="pageForm.clubId" placeholder="请选择协会" @change="doSearch"
|
||||
<el-select v-model="pageForm.clubId" placeholder="请选择社团" @change="doSearch"
|
||||
filterable
|
||||
:clearable="is_A06===true||is_sysadmin===true||(is_H04===true&&is_H02===true)"
|
||||
style="width: 100%">
|
||||
|
||||
@@ -58,9 +58,9 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="activity_type===40003">
|
||||
<el-form-item prop="clubId" label="活动所属协会">
|
||||
<el-form-item prop="clubId" label="活动所属社团">
|
||||
<el-select v-model="formData.clubId" clearable filterable
|
||||
placeholder="请选择活动所属协会"
|
||||
placeholder="请选择活动所属社团"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in clubOptions"
|
||||
@@ -651,7 +651,7 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
return
|
||||
}
|
||||
if (!this.formData.clubId && this.activity_type === 40003) {
|
||||
this.$message.error("请选择活动所属协会")
|
||||
this.$message.error("请选择活动所属社团")
|
||||
return
|
||||
}
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
|
||||
@@ -27,7 +27,7 @@ const ACTIVITY_CULTURE_INFO_ACTIVITY = {
|
||||
{{ viewData.activity_type === 40001 ? '校工会活动' : viewData.activity_type === 40002 ?
|
||||
'分工会活动'
|
||||
:
|
||||
'协会/社团活动' }}
|
||||
'社团/社团活动' }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="活动计划时间">-->
|
||||
<!-- {{ viewData.startPlannedDate + ' - ' + viewData.endPlannedDate }}-->
|
||||
|
||||
@@ -23,7 +23,7 @@ const singleSignUp = {
|
||||
<el-descriptions-item label="活动类型" :span="2">
|
||||
{{ viewData.activity_type === 40001 ? '校工会活动' : viewData.activity_type === 40002 ? '分工会活动'
|
||||
:
|
||||
'协会/社团活动' }}
|
||||
'社团/社团活动' }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="活动计划时间">-->
|
||||
<!-- {{ viewData.startPlannedDate + ' - ' + viewData.endPlannedDate }}-->
|
||||
|
||||
+3
-3
@@ -28,9 +28,9 @@
|
||||
</el-descriptions-item>
|
||||
|
||||
<template v-if="formData.activityType == 'CLUB'">
|
||||
<el-descriptions-item label="申请协会">
|
||||
<el-form-item prop="clubId" label="申请协会">
|
||||
<el-select v-model="formData.clubId" placeholder="请选择协会"
|
||||
<el-descriptions-item label="申请社团">
|
||||
<el-form-item prop="clubId" label="申请社团">
|
||||
<el-select v-model="formData.clubId" placeholder="请选择社团"
|
||||
@change="setDeclareUnitName" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in clubList"
|
||||
|
||||
+3
-3
@@ -43,9 +43,9 @@ layout("/layouts/platform.html"){
|
||||
</el-descriptions-item>
|
||||
|
||||
<template v-if="formData.activityType == 'CLUB'">
|
||||
<el-descriptions-item label="申请协会">
|
||||
<el-form-item prop="clubId" label="申请协会">
|
||||
<el-select v-model="formData.clubId" placeholder="请选择协会"
|
||||
<el-descriptions-item label="申请社团">
|
||||
<el-form-item prop="clubId" label="申请社团">
|
||||
<el-select v-model="formData.clubId" placeholder="请选择社团"
|
||||
@change="setDeclareUnitName" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in clubList"
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<el-descriptions-item label="活动类型">{{ getActivityTypeName(viewData.activityType) }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="申请人">{{ viewData.userName + '(' + viewData.loginName + ')' }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="viewData.activityType == 'CLUB' ? '申请协会' : '申请单位'">{{ viewData.declareUnitName }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="viewData.activityType == 'CLUB' ? '申请社团' : '申请单位'">{{ viewData.declareUnitName }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="联系方式">{{ viewData.mobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ viewData.applyTime }}</el-descriptions-item>
|
||||
|
||||
+1
-1
@@ -135,7 +135,7 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "mobile", label: "联系方式"},
|
||||
{ prop: "activityName", label: "活动名称"},
|
||||
{ prop: "activityType", label: "活动类型"},
|
||||
{ prop: "declareUnitName", label: "申报单位/协会", sortable: true },
|
||||
{ prop: "declareUnitName", label: "申报单位/社团", sortable: true },
|
||||
{ prop: "activityNumber", label: "活动人数", sortable: true },
|
||||
{ prop: "applyTime", label: "申报时间", sortable: true },
|
||||
{ prop: "curTaskName", label: "当前节点"},
|
||||
|
||||
+3
-3
@@ -19,8 +19,8 @@ layout("/layouts/platform.html"){
|
||||
<el-input placeholder="请输入申请人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属协会">
|
||||
<el-select clearable filterable placeholder="所属协会"
|
||||
<search-item label="所属社团">
|
||||
<el-select clearable filterable placeholder="所属社团"
|
||||
style="width: 100%;" v-model="pageForm.clubId">
|
||||
<el-option :label="item.clubName" :value="item.id"
|
||||
v-for="item in clubs"></el-option>
|
||||
@@ -122,7 +122,7 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "mobile", label: "联系方式"},
|
||||
{ prop: "activityName", label: "活动名称"},
|
||||
{ prop: "activityType", label: "活动类型"},
|
||||
{ prop: "declareUnitName", label: "申报单位/协会", sortable: true },
|
||||
{ prop: "declareUnitName", label: "申报单位/社团", sortable: true },
|
||||
{ prop: "activityNumber", label: "活动人数", sortable: true },
|
||||
{ prop: "applyTime", label: "申报时间", sortable: true },
|
||||
{ prop: "curTaskName", label: "当前节点"},
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ const INFO = {
|
||||
|
||||
<el-descriptions-item label="申请人">{{ viewData.userName + '(' + viewData.loginName + ')' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :label="viewData.activityType == 'CLUB' ? '申请协会' : '申请单位'">{{
|
||||
<el-descriptions-item :label="viewData.activityType == 'CLUB' ? '申请社团' : '申请单位'">{{
|
||||
viewData.declareUnitName }}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
+3
-3
@@ -41,8 +41,8 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
|
||||
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, CLUB_MANAGER, CLUB_PRESIDENT')">
|
||||
<search-item label="所属协会">
|
||||
<el-select clearable filterable placeholder="所属协会"
|
||||
<search-item label="所属社团">
|
||||
<el-select clearable filterable placeholder="所属社团"
|
||||
style="width: 100%;" v-model="pageForm.clubId">
|
||||
<el-option :label="item.clubName" :value="item.id"
|
||||
v-for="item in clubs"></el-option>
|
||||
@@ -128,7 +128,7 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "mobile", label: "联系方式"},
|
||||
{ prop: "activityName", label: "活动名称"},
|
||||
{ prop: "activityType", label: "活动类型"},
|
||||
{ prop: "declareUnitName", label: "申报单位/协会", sortable: true },
|
||||
{ prop: "declareUnitName", label: "申报单位/社团", sortable: true },
|
||||
{ prop: "activityNumber", label: "活动人数", sortable: true },
|
||||
{ prop: "applyTime", label: "申报时间", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点"},
|
||||
|
||||
+3
-3
@@ -30,8 +30,8 @@ layout("/layouts/platform.html"){
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属协会">
|
||||
<el-select clearable filterable placeholder="所属协会"
|
||||
<search-item label="所属社团">
|
||||
<el-select clearable filterable placeholder="所属社团"
|
||||
style="width: 100%;" v-model="pageForm.clubId">
|
||||
<el-option :label="item.clubName" :value="item.id"
|
||||
v-for="item in clubs"></el-option>
|
||||
@@ -142,7 +142,7 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "mobile", label: "联系方式"},
|
||||
{ prop: "activityName", label: "活动名称"},
|
||||
{ prop: "activityType", label: "活动类型"},
|
||||
{ prop: "declareUnitName", label: "申报单位/协会", sortable: true },
|
||||
{ prop: "declareUnitName", label: "申报单位/社团", sortable: true },
|
||||
{ prop: "activityNumber", label: "活动人数", sortable: true },
|
||||
{ prop: "applyTime", label: "申报时间", sortable: true },
|
||||
{ prop: "curTaskName", label: "当前节点"},
|
||||
|
||||
+3
-3
@@ -30,8 +30,8 @@ layout("/layouts/platform.html"){
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属协会">
|
||||
<el-select clearable filterable placeholder="所属协会"
|
||||
<search-item label="所属社团">
|
||||
<el-select clearable filterable placeholder="所属社团"
|
||||
style="width: 100%;" v-model="pageForm.clubId">
|
||||
<el-option :label="item.clubName" :value="item.id"
|
||||
v-for="item in clubs"></el-option>
|
||||
@@ -142,7 +142,7 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "mobile", label: "联系方式"},
|
||||
{ prop: "activityName", label: "活动名称"},
|
||||
{ prop: "activityType", label: "活动类型"},
|
||||
{ prop: "declareUnitName", label: "申报单位/协会", sortable: true },
|
||||
{ prop: "declareUnitName", label: "申报单位/社团", sortable: true },
|
||||
{ prop: "activityNumber", label: "活动人数", sortable: true },
|
||||
{ prop: "applyTime", label: "申报时间", sortable: true },
|
||||
{ prop: "curTaskName", label: "当前节点"},
|
||||
|
||||
+3
-3
@@ -35,12 +35,12 @@ layout("/layouts/platform.html"){
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属协会"
|
||||
<el-descriptions-item label="所属社团"
|
||||
v-if="['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)">
|
||||
<el-form-item label="所属协会" prop="clubId"
|
||||
<el-form-item label="所属社团" prop="clubId"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-select
|
||||
placeholder="请选择协会"
|
||||
placeholder="请选择社团"
|
||||
style="width: 100%;" v-model="formData.clubId"
|
||||
@change="clubIdChange">
|
||||
<el-option
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<el-descriptions-item label="活动类型">{{ getActivityTypeName(viewData.activityType) }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="申请人">{{ viewData.userName + '(' + viewData.loginName + ')' }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="viewData.activityType == 'CLUB' ? '申请协会' : '申请单位'">{{ viewData.declareUnitName }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="viewData.activityType == 'CLUB' ? '申请社团' : '申请单位'">{{ viewData.declareUnitName }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="联系方式">{{ viewData.mobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ viewData.applyTime }}</el-descriptions-item>
|
||||
|
||||
+4
-4
@@ -80,7 +80,7 @@ layout("/layouts/platform.html"){
|
||||
<div class="cut-off-line"></div>
|
||||
</el-col>
|
||||
<el-col :span="4" style="position: relative">
|
||||
<div class="top_title">协会活动总人数</div>
|
||||
<div class="top_title">社团活动总人数</div>
|
||||
<div class="top_num">{{numData.clubSignNum?numData.clubSignNum:'0'}}</div>
|
||||
<div class="cut-off-line"></div>
|
||||
</el-col>-->
|
||||
@@ -262,7 +262,7 @@ layout("/layouts/platform.html"){
|
||||
isUnionJf:true,
|
||||
|
||||
all_club_loading: false,
|
||||
clubTip:'协会活动数',
|
||||
clubTip:'社团活动数',
|
||||
allClubYear: moment().format('YYYY'),
|
||||
isClubJf:true,
|
||||
}
|
||||
@@ -485,7 +485,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
async doClubSwitch(){
|
||||
this.isClubJf = !this.isClubJf
|
||||
this.clubTip = this.isClubJf ? '协会活动数' : '协会经费详情'
|
||||
this.clubTip = this.isClubJf ? '社团活动数' : '社团经费详情'
|
||||
await this.allClubActivityAndJf();
|
||||
},
|
||||
async allClubActivityAndJf(){
|
||||
@@ -533,7 +533,7 @@ layout("/layouts/platform.html"){
|
||||
"yAxis": {},
|
||||
meta: {
|
||||
clubName: {
|
||||
alias: '协会',
|
||||
alias: '社团',
|
||||
},
|
||||
money: {
|
||||
alias: this.isClubJf?'金额':'活动数',
|
||||
|
||||
+1
-1
@@ -158,7 +158,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: "outlayManageSource", label: "经费类型"},
|
||||
{prop: "budgetReimburseType", label: "预算条目"},
|
||||
{prop: "actualMoney", label: "报销金额(元)"},
|
||||
{prop: "declareUnitName", label: "申报单位/协会", sortable: true},
|
||||
{prop: "declareUnitName", label: "申报单位/社团", sortable: true},
|
||||
{prop: "applyTime", label: "申报时间", sortable: true},
|
||||
{prop: "curTaskName", label: "当前节点"},
|
||||
{prop: "instanceState", label: "流程状态"}
|
||||
|
||||
+3
-3
@@ -35,8 +35,8 @@ layout("/layouts/platform.html"){
|
||||
placeholder="请选择预算条目"></dict-select>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属协会">
|
||||
<el-select clearable filterable placeholder="所属协会"
|
||||
<search-item label="所属社团">
|
||||
<el-select clearable filterable placeholder="所属社团"
|
||||
style="width: 100%;" v-model="pageForm.clubId">
|
||||
<el-option :label="item.clubName" :value="item.id"
|
||||
v-for="item in clubs"></el-option>
|
||||
@@ -149,7 +149,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: "outlayManageSource", label: "经费类型"},
|
||||
{prop: "budgetReimburseType", label: "预算条目"},
|
||||
{prop: "actualMoney", label: "报销金额(元)"},
|
||||
{prop: "declareUnitName", label: "申报单位/协会", sortable: true},
|
||||
{prop: "declareUnitName", label: "申报单位/社团", sortable: true},
|
||||
{prop: "applyTime", label: "申报时间", sortable: true},
|
||||
{prop: "curTaskName", label: "当前节点"},
|
||||
{prop: "instanceState", label: "流程状态"}
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ const INFO = {
|
||||
<el-descriptions-item label="申请人">{{ viewData.userName + '(' + viewData.loginName + ')' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
:label="viewData.outlayManageSource == 'ACTIVITY_BUDGET_TYPE_THREE' ? '申请协会' : '申请单位'">
|
||||
:label="viewData.outlayManageSource == 'ACTIVITY_BUDGET_TYPE_THREE' ? '申请社团' : '申请单位'">
|
||||
{{viewData.declareUnitName }}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user