251023南昌大学交流文档整改

This commit is contained in:
Paidax
2025-10-30 11:40:25 +08:00
parent 291f307f04
commit 9bf2c1cae5
46 changed files with 3837 additions and 255 deletions
@@ -1,19 +1,24 @@
package com.budwk.app.sys.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.lang.tree.Tree;
import cn.hutool.core.lang.tree.TreeNode;
import cn.hutool.core.lang.tree.TreeUtil;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.constant.BpmProcessConstant;
import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.exception.BaseException;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.bpm.service.BpmService;
import com.budwk.app.base.utils.PageUtil;
import com.budwk.app.flow.constant.FlowConst;
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.ProcessSubmitTypeEnum;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.sys.models.*;
import com.budwk.app.sys.services.*;
import com.budwk.app.sys.views.View_user;
@@ -41,35 +46,30 @@ import org.nutz.mvc.annotation.Param;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@IocBean
@At("/platform/sys/union")
@Ok("json:full")
@Api(tags = "分工会管理")
@At("/platform/sys/union")
public class SysUnionController {
@Inject
private SysUnionService sysUnionService;
private Dao dao;
@Inject
private FlowEngine flowEngine;
@Inject
private SysDictService sysDictService;
@Inject
private SysRoleService sysRoleService;
@Inject
private SysUserService sysUserService;
@Inject
private SysUnitService sysUnitService;
@Inject
private BpmService bpmService;
@Inject
private Dao dao;
private SysUnionService sysUnionService;
@At("")
@Ok("beetl:/platform/sys/union/index.html")
@@ -266,28 +266,43 @@ public class SysUnionController {
Sql sql = Sqls.create("""
SELECT
t1.userId,
t2.username,
t2.loginname,
t3.`code` AS roleCode,
t3.`name` AS roleName
info.*,
role.`name` AS roleName,
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,
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' AND taskState in (10,20)) AS startTaskId
FROM
sys_user_role t1
LEFT JOIN sys_user t2 ON t2.id = t1.userId
LEFT JOIN sys_role t3 ON t3.id = t1.roleId
sys_union_cadre info
LEFT JOIN sys_role role ON role.`code` = info.roleCode
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
$condition
""");
Cnd cnd = Cnd.where("t3.`code`", "in", branchUnionRoleCodes);
cnd.and("t1.unionId", "=", unionId);
Cnd cnd = Cnd.where("role.`code`", "in", branchUnionRoleCodes);
cnd.and("info.unionId", "=", unionId);
if (StrUtil.isAllNotBlank(pageForm.getSearchName(), pageForm.getSearchKeyword())) {
switch (pageForm.getSearchName()) {
case "loginname" -> cnd.where().andLike("t2.loginname", pageForm.getSearchKeyword());
case "username" -> cnd.where().andLike("t2.username", pageForm.getSearchKeyword());
case "roleName" -> cnd.where().andLike("t3.`name`", pageForm.getSearchKeyword());
case "loginname" -> cnd.where().andLike("info.loginname", pageForm.getSearchKeyword());
case "username" -> cnd.where().andLike("info.username", pageForm.getSearchKeyword());
case "roleName" -> cnd.where().andLike("role.`name`", pageForm.getSearchKeyword());
}
}
// cnd.asc("t2.username");
cnd.and(new Static("1=1 order by field(t3.code," + branchUnionRoleCodes.stream().map(code -> "'" + code + "'").collect(Collectors.joining(",")) + ")"));
cnd.and(new Static("1=1 order by field(role.code," + branchUnionRoleCodes.stream().map(code -> "'" + code + "'").collect(Collectors.joining(",")) + ")"));
sql.setCondition(cnd);
List<NutMap> list = sysUserService.listMap(sql);
return Result.success(list);
@@ -319,16 +334,54 @@ public class SysUnionController {
// bpmService.startSubmitProcessInstance(BpmProcessConstant.BRANCH_UNION_WEIYUAN_AUTHORIZATION.name(), instanceName, permission.getId(), List.of("24017"), null);
sysRoleService.clear("sys_user_role", Cnd.where("roleId", "=", role.getId()).and("userId", "=", userId).and("unionId", "=", unionId));
sysRoleService.insert("sys_user_role", Chain.make("roleId", role.getId()).add("userId", userId).add("unionId", unionId));
sysRoleService.clearCache();
sysUserService.clearCache();
// sysRoleService.clear("sys_user_role", Cnd.where("roleId", "=", role.getId()).and("userId", "=", userId).and("unionId", "=", unionId));
// sysRoleService.insert("sys_user_role", Chain.make("roleId", role.getId()).add("userId", userId).add("unionId", unionId));
// sysRoleService.clearCache();
// sysUserService.clearCache();
// 构建表结构存储
View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", userId));
Sys_union_cadre unionCadre = new Sys_union_cadre();
unionCadre.setUserId(userId);
unionCadre.setUnionId(unionId);
unionCadre.setMobile(user.getMobile());
unionCadre.setUnionName(user.getUnionName());
unionCadre.setLoginName(user.getLoginname());
unionCadre.setUserName(user.getUsername());
unionCadre.setRoleCode(roleCode);
unionCadre.setApplyDate(new Date());
unionCadre.setIsJoin(true);
dao.insert(unionCadre);
// 去走工作流
boolean isAdmin = AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name());
Dict args = Dict.create();
args.set("submit", isAdmin ? "admin" : "branch");
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
args.set(FlowConst.FORM_DATA, unionCadre);
ProcessInstance instance = flowEngine.startProcessInstanceByKey("JCGHWY", unionCadre.getId(), SecurityUtil.getUserId(), args);
// 自动完成第一个申请任务
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
for (ProcessTask task : doingTaskList) {
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
}
if (isAdmin) {
// 如果是管理员,直接加角色
sysRoleService.clear("sys_user_role", Cnd.where("roleId", "=", role.getId()).and("userId", "=", userId).and("unionId", "=", unionId));
sysRoleService.insert("sys_user_role", Chain.make("roleId", role.getId()).add("userId", userId).add("unionId", unionId));
sysRoleService.clearCache();
sysUserService.clearCache();
}
return Result.success();
}
@At
@SaCheckPermission("sys.manager.union.branchOfficer")
@ApiOperation("删除分工会人员角色")
@SaCheckPermission("sys.manager.union.branchOfficer")
public Result deleteBranchUnionUserRole(String userId, String roleCode, String unionId) {
Sys_role role = sysRoleService.fetch(Cnd.where("code", "=", roleCode));
if (Lang.isEmpty(role)) {
@@ -344,6 +397,10 @@ public class SysUnionController {
cnd.and("unionId", "=", unionId);
sysRoleService.clear("sys_user_role", cnd);
dao.clear(Sys_union_cadre.class, Cnd.where("userId", "=", userId)
.and("unionId", "=", unionId).and("roleCode", "=", roleCode));
sysRoleService.clearCache();
sysUserService.clearCache();
return Result.success();
@@ -395,22 +452,78 @@ public class SysUnionController {
@At
@ApiOperation("按关键字查询分工会下的人员")
@Ok("json:{ignoreNull:true}")
@SaCheckPermission("sys.manager.union.partUnit")
@SaCheckPermission("sys.manager.union")
public Result listUserSelect(@Valid String unionId, @Valid String keyWord) {
Sql sql = Sqls.create("select id,loginname,username,unitname from vw_user $condition");
Sql sql = Sqls.create("select id,loginname,username,unitName from vw_user $condition");
Cnd cnd = Cnd.NEW();
cnd.and(View_user::getUnionId, "=", unionId);
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike(View_user::getLoginname, keyWord, true);
seg.orLike(View_user::getUsername, keyWord, true);
cnd.and(seg);
cnd.limit(1, 10);
sql.setCondition(cnd);
sql.setCallback(Sqls.callback.entities());
sql.setEntity(dao.getEntity(View_user.class));
dao.execute(sql);
List<View_user> list = sql.getList(View_user.class);
return Result.success(list);
Pagination pagination = sysUnionService.listPageMap(1, 10, sql);
return Result.success(pagination.getList());
}
/**
* 基层干部审核相关
*/
@At
@ApiOperation("基层干部审核菜单")
@SaCheckPermission("sys.manager.union")
public Result cadrePageData(PageForm pageForm, @Param("isJoin") Boolean isJoin) {
Sql sql = Sqls.create("""
SELECT
info.*,
role.`name` AS roleName,
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,
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
FROM
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN sys_union_cadre info ON info.id = ins.businessNo
LEFT JOIN sys_role role ON role.`code` = info.roleCode
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 wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.and("t.taskName", "=", "2978a74a-75c1-4f95-99f9-9c08c480f1b5");
if (pageForm.getAudit()) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(),
ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
} else {
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
}
cnd.andEX("info.isJoin", "=", isJoin);
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.desc("t.createdAt");
cnd.desc("info.applyDate");
} else {
cnd.orderBy("info." + pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
}
cnd.groupBy("t.id");
sql.setCondition(cnd);
Pagination pagination = sysUnionService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
}
@@ -0,0 +1,53 @@
package com.budwk.app.sys.interceptor;
import cn.hutool.json.JSONUtil;
import com.budwk.app.flow.constant.FlowConst;
import com.budwk.app.flow.engine.FlowInterceptor;
import com.budwk.app.flow.engine.core.Execution;
import com.budwk.app.flow.engine.core.ServiceContext;
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
import com.budwk.app.sys.models.Sys_role;
import com.budwk.app.sys.models.Sys_union_cadre;
import com.budwk.app.sys.services.SysRoleService;
import com.budwk.app.sys.services.SysUserService;
import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
/**
* @version 1.0
* @Author FKY
* @nameSysUnionSchoolAuditInterceptor
* @Date 2025/10/28 10:15
* @注释
*/
public class SysUnionSchoolAuditInterceptor implements FlowInterceptor {
@Override
public void intercept(Execution execution) {
// 是否审核通过
boolean submitType = execution.getArgs().getInt("submitType").equals(ProcessSubmitTypeEnum.AGREE.getCode());
if (submitType) {
// 审核通过,添加相应的角色
String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA);
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
SysUserService sysUserService = ServiceContext.find(SysUserService.class);
// 表单数据
Sys_union_cadre unionBean = JSONUtil.toBean(formDataStr, Sys_union_cadre.class);
// 清除对应角色然后再新增
Sys_role role = sysRoleService.getByCode(unionBean.getRoleCode());
sysRoleService.clear("sys_user_role", Cnd.where("roleId", "=", role.getId())
.and("userId", "=", unionBean.getUserId()).and("unionId", "=", unionBean.getUnionId()));
sysRoleService.insert("sys_user_role", Chain.make("roleId", role.getId())
.add("userId", unionBean.getUserId()).add("unionId", unionBean.getUnionId()));
// 清除缓存
sysRoleService.clearCache();
sysUserService.clearCache();
}
// 未审核通过,不作操作
}
}
@@ -0,0 +1,73 @@
package com.budwk.app.sys.models;
import com.budwk.app.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.util.Date;
/**
* @version 1.0
* @Author FKY
* @nameSys_union_cadre
* @Date 2025/10/28 10:22
* @注释
*/
@Data
@Table
@EqualsAndHashCode(callSuper = true)
public class Sys_union_cadre extends BaseModel {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("工会Id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unionId;
@Column
@Comment("工会名称")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String unionName;
@Column
@Comment("用户Id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String userId;
@Column
@Comment("用户名称")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String userName;
@Column
@Comment("工号")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String loginName;
@Column
@Comment("联系方式")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String mobile;
@Column
@Comment("角色编码")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String roleCode;
@Column
@Comment("添加时间")
@ColDefine(type = ColType.DATETIME)
private Date applyDate;
@Column
@Comment("加入还是退出")
@ColDefine(type = ColType.BOOLEAN)
private Boolean isJoin;
}
@@ -258,6 +258,7 @@ public class Sys_user extends BaseModel implements Serializable {
private Integer loginCount;
@Column
@DataCenterColumn(name = "单位号", key = "dwh")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unitId;
@@ -114,8 +114,6 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl<Sys_user_source>
Map<String, List<Sys_data_dict>> dataDictMap = dataDictList.stream().collect(Collectors.groupingBy(Sys_data_dict::getParentCode));
Map<String, NutMap> financeUserMap = pullFinance();
// // 博士后进站日期数据
// Map<String, Date> doctoralData = pullPostDoctoral();
// 获取配置文件 接口地址 和 token
DataCenterProperties.Credential credential = dataCenterProperties.credential("teacher");
@@ -167,11 +165,15 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl<Sys_user_source>
// 特殊处理 根据身份证号获取性别和出生年月
if ("sfzjh".equals(mapping.field.getName())) {
String idCard = raw.getStr(mapping.key);
if (StrUtil.isNotBlank(idCard)) {
int gender = IdcardUtil.getGenderByIdCard(idCard);
// 性别(1 : 男 0 : 女)
sysUser.setSex(gender == 1 ? "" : "");
mapping.field.set(sysUser, raw.getStr(mapping.key));
if (StrUtil.isNotBlank(idCard) && IdcardUtil.isValidCard(idCard)) {
try {
int gender = IdcardUtil.getGenderByIdCard(idCard);
// 性别(1 : 男 0 : 女)
sysUser.setSex(gender == 1 ? "" : "");
mapping.field.set(sysUser, raw.getStr(mapping.key));
} catch (Exception e) {
sysUser.setSex(null);
}
}
} else {
mapping.field.set(sysUser, raw.getStr(mapping.key));
@@ -185,8 +187,7 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl<Sys_user_source>
}
}
// 设置单位相关信息
sysUser.setUnitId(raw.getStr("dwh"));
// 设置拉取时间
sysUser.setPullTime(nowDate);
// 判断财务信息有没有值,
@@ -0,0 +1,116 @@
package com.budwk.app.zhgh.activity.leadthought.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.result.Result;
import com.budwk.app.flow.constant.FlowConst;
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.ProcessSubmitTypeEnum;
import com.budwk.app.flow.service.FlowCommonService;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtInfo;
import com.budwk.app.zhgh.activity.leadthought.service.LeadThoughtInfoService;
import io.swagger.annotations.ApiOperation;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Dao;
import org.nutz.ioc.aop.Aop;
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 org.nutz.mvc.annotation.Param;
import java.util.List;
@IocBean
@Ok("json:full")
@At("/platform/leadThought/apply")
public class LeadThoughtApplyController {
@Inject
private Dao dao;
@Inject
private FlowEngine flowEngine;
@Inject
private FlowCommonService flowCommonService;
@Inject
private LeadThoughtInfoService leadThoughtInfoService;
@At("")
@Ok("beetl:/platform/zhgh/activity/leadthought/apply/index.html")
@SaCheckPermission("leadThought.apply")
public void index() {
}
@At
@ApiOperation("保存申请")
@SaCheckPermission("leadThought.apply")
@SLog(tag = "思政板块保存申请", msg = "保存申请")
public Result save(@Param("data") LeadThoughtInfo info) {
if (StrUtil.isBlank(info.getId())) {
leadThoughtInfoService.buildDbColumn(info);
}
dao.insertOrUpdate(info);
return Result.success();
}
@At
@ApiOperation("提交申请")
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("leadThought.apply")
@SLog(tag = "思政板块提交申请", msg = "提交申请")
public Result submit(@Param("data") LeadThoughtInfo info) {
if (StrUtil.isBlank(info.getId())) {
leadThoughtInfoService.buildDbColumn(info);
}
dao.insertOrUpdate(info);
// 开启流程实例
Dict args = Dict.create();
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
args.set(FlowConst.FORM_DATA, info);
ProcessInstance instance = flowEngine.startProcessInstanceByKey("SZBKSB", info.getId(), SecurityUtil.getUserId(), args);
// 自动完成第一个申请任务
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
for (ProcessTask task : doingTaskList) {
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
}
return Result.success();
}
@At
@ApiOperation("重新提交申请")
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("leadThought.apply")
@SLog(tag = "思政板块重新提交申请", msg = "重新提交申请")
public Result submitAgain(@Param("data") LeadThoughtInfo info, @Param("taskId") Long taskId) {
if (StrUtil.isBlank(info.getId())) {
leadThoughtInfoService.buildDbColumn(info);
}
dao.insertOrUpdate(info);
Dict dict = Dict.create();
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
flowCommonService.executeTask(dict);
return Result.success();
}
@At
@ApiOperation("获取填写信息")
@SaCheckPermission("leadThought.apply")
public Result findWriteInfo(String id) {
return Result.success(dao.fetch(LeadThoughtInfo.class, id));
}
}
@@ -0,0 +1,112 @@
package com.budwk.app.zhgh.activity.leadthought.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.utils.DateUtil;
import com.budwk.app.flow.engine.FlowEngine;
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtInfo;
import com.budwk.app.zhgh.activity.leadthought.service.LeadThoughtInfoService;
import com.budwk.app.zhgh.activity.leadthought.vo.LeadThoughtPageForm;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Strings;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import javax.validation.Valid;
import java.util.List;
@IocBean
@Ok("json:full")
@Api("思政板块-我的申报记录")
@At("/platform/leadThought/mine")
public class LeadThoughtApplyMineController {
@Inject
private Dao dao;
@Inject
private FlowEngine flowEngine;
@Inject
private LeadThoughtInfoService leadThoughtInfoService;
@At("")
@Ok("beetl:/platform/zhgh/activity/leadthought/mine/index.html")
@SaCheckPermission("leadThought.mine")
public void index() {}
@At
@ApiOperation("数据记录")
@SaCheckPermission("leadThought.mine")
public Result pageData(LeadThoughtPageForm pageForm) {
Sql sql = Sqls.create("""
SELECT
info.*,
p.manageName,
type.typeName,
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,
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' AND taskState in (10,20)) AS startTaskId
FROM
lead_thought_info info
LEFT JOIN `lead_thought_project` p ON p.id = info.manageId
LEFT JOIN `lead_thought_type` type ON type.id = info.typeId
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
$condition
""");
Cnd cnd = Cnd.NEW();
pageForm.buildSearch(cnd, "info.");
cnd.groupBy("t.id");
sql.setCondition(cnd);
Pagination pagination = leadThoughtInfoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
@At
@ApiOperation("删除申报记录")
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("leadThought.mine")
@SLog(tag = "思政板块-我的申报", msg = "删除了一条数据,id:${args[0]}")
public Result onDelete(@Valid String id) {
dao.clear(LeadThoughtInfo.class, Cnd.where("id", "=", id));
// 流程相关操作
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
return Result.success();
}
@At
@ApiOperation("获取填报信息")
@SaCheckPermission("leadThought.mine")
public Result findOne(String id) {
return Result.success(leadThoughtInfoService.findOne(id));
}
}
@@ -0,0 +1,99 @@
package com.budwk.app.zhgh.activity.leadthought.controller;
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.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.utils.DateUtil;
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.activity.leadthought.model.LeadThoughtInfo;
import com.budwk.app.zhgh.activity.leadthought.service.LeadThoughtInfoService;
import com.budwk.app.zhgh.activity.leadthought.vo.LeadThoughtPageForm;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Strings;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import java.util.List;
@IocBean
@Ok("json:full")
@Api("思政板块-分工会审核")
@At("/platform/leadThought/branchUnionAudit")
public class LeadThoughtBranchUnionAuditController {
@Inject
private Dao dao;
@Inject
private LeadThoughtInfoService leadThoughtInfoService;
@At("")
@Ok("beetl:/platform/zhgh/activity/leadthought/branchunionaudit/index.html")
@SaCheckPermission("leadThought.fghOption")
public void index() {
}
@At
@ApiOperation("数据列表")
@SaCheckPermission("leadThought.branchUnionAudit")
public Result pageData(LeadThoughtPageForm pageForm) {
Sql sql = Sqls.create("""
SELECT
info.*,
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,
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
FROM
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN lead_thought_info info ON info.id = ins.businessNo
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 wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
$condition
""");
Cnd cnd = Cnd.NEW();
pageForm.buildSearch(cnd, "info.");
cnd.and("t.taskName", "=", "8337f4ee-d8ff-45e2-8e21-978d916f64da");
if (pageForm.getAudit()) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
} else {
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
}
cnd.groupBy("t.id");
sql.setCondition(cnd);
Pagination pagination = leadThoughtInfoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
}
@@ -0,0 +1,278 @@
package com.budwk.app.zhgh.activity.leadthought.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
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.vo.ProcessTaskVO;
import com.budwk.app.sys.services.SysOfficeTemplateService;
import com.budwk.app.web.commons.base.Globals;
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtInfo;
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtType;
import com.budwk.app.zhgh.activity.leadthought.service.LeadThoughtInfoService;
import com.budwk.app.zhgh.activity.leadthought.vo.LeadThoughtPageForm;
import com.deepoove.poi.XWPFTemplate;
import com.deepoove.poi.config.Configure;
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
import io.swagger.annotations.ApiOperation;
import org.ddr.poi.html.HtmlRenderPolicy;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.entity.Record;
import org.nutz.dao.sql.Sql;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Lang;
import org.nutz.lang.Strings;
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 java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
@IocBean
@Ok("json:full")
@At("/platform/leadThought/query")
public class LeadThoughtQueryController {
@Inject
private Dao dao;
@Inject
private FlowEngine flowEngine;
@Inject
private LeadThoughtInfoService leadThoughtInfoService;
@Inject
private SysOfficeTemplateUtil sysOfficeTemplateUtil;
@At("")
@Ok("beetl:/platform/zhgh/activity/leadthought/query/index.html")
@SaCheckPermission("leadThought.query")
public void index() {}
@At
@ApiOperation("数据列表")
@SaCheckPermission("leadThought.query")
public Result pageData(LeadThoughtPageForm pageForm) {
Sql sql = Sqls.create("""
SELECT
info.*,
p.manageName,
type.typeName,
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,
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' AND taskState in (10,20)) AS startTaskId
FROM
lead_thought_info info
LEFT JOIN `lead_thought_project` p ON p.id = info.manageId
LEFT JOIN `lead_thought_type` type ON type.id = info.typeId
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
$condition
""");
Cnd cnd = Cnd.NEW();
pageForm.buildSearch(cnd, "info.");
sql.setCondition(cnd);
Pagination pagination = leadThoughtInfoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
@At
@Ok("void")
@SaCheckPermission("leadThought.query")
public void exportAllInfo(@Param(value = "searchName") String searchName,
@Param(value = "searchKeyword") String searchKeyword,
@Param(value = "year") Integer year,
@Param(value = "manageId") String manageId,
@Param(value = "typeId") String typeId,
@Param(value = "projectName") String projectName,
HttpServletResponse response) throws IOException {
Sql sql = Sqls.create("""
SELECT
lti.*,
au.stateColor,
au.stateName,
su.`name` AS applyUnitName,
ssu.`name` AS jointUnitName
FROM
`lead_thought_info` lti
LEFT JOIN `audit_state` au ON lti.state = au.stateId
LEFT JOIN `user` u ON u.id = lti.userId
LEFT JOIN `sys_unit` su ON su.id = lti.applyUnit
LEFT JOIN `sys_unit` ssu ON ssu.id = lti.jointUnit
$condition
""");
Cnd cnd = Cnd.NEW();
if (Strings.isNotBlank(searchName) && Strings.isNotBlank(searchKeyword)) {
cnd.and(searchName, "like", "%" + searchKeyword + "%");
}
cnd.andEX("YEAR(lti.applyTime)", "=", year);
cnd.andEX("lti.manageId", "=", manageId);
cnd.andEX("lti.typeId", "=", typeId);
if (Strings.isNotBlank(projectName)) {
cnd.and("lti.projectName", "like", "%" + projectName + "%");
}
cnd.and("lti.state", "=", 6250);
cnd.desc("lti.applyTime");
sql.setCondition(cnd);
List<Record> list = leadThoughtInfoService.list(sql);
ZipOutputStream zipOutputStream = new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()));
HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
// HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
// Configure config = Configure.newBuilder().bind("funds", policy)
// .bind("content", htmlRenderPolicy)
// .build();
// list.forEach(v -> {
// try {
// NutMap nutMap = getExportData(v.getString("id"));
// String fileName = nutMap.getString("manageName") + nutMap.getString("applyUnitName") + "登记表.docx";
// zipOutputStream.putNextEntry(new ZipEntry(fileName));
// XWPFTemplate.compile(officeTemplateUtil.getPath("leadThought"), config).render(nutMap).write(zipOutputStream);
// zipOutputStream.closeEntry();
// } catch (IOException e) {
// throw new RuntimeException(e);
// }
// });
zipOutputStream.finish();
zipOutputStream.close();
response.getOutputStream().close();
}
@At
@Ok("void")
@SaCheckPermission("leadThought.query")
public void exportInfo(String id, HttpServletResponse response) {
try {
NutMap infoMap = getExportData(id);
if (Lang.isNotEmpty(infoMap)) {
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
htmlRenderPolicy.getConfig().setShowDefaultTableBorderInTableCell(true);
Configure config = Configure.builder()
.bind("funds", policy)
.bind("content", htmlRenderPolicy)
.build();
String fileName = "" + infoMap.getString("applyUnitName") + "" + infoMap.getString("manageName") + "申报表.docx";
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("leadThought"), config).render(infoMap)
.writeAndClose(byteArrayOutputStream);
CommonDownloadUtil.download(fileName, byteArrayOutputStream.toByteArray(), response);
}
} catch (Exception e) {
e.printStackTrace();
}
}
public NutMap getExportData(String id) {
try {
NutMap infoMap = leadThoughtInfoService.findOne(id);
NutMap resultMap = NutMap.NEW();
// 流程实例
ProcessInstance processInstance = dao.fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", id));
List<ProcessTask> doneTaskList = flowEngine.processTaskService().getDoneTaskList(processInstance.getId(), null);
List<ProcessTaskVO> doneTaskVos = new ArrayList<>();
for (ProcessTask doneTask : doneTaskList) {
ProcessTaskVO taskVO = flowEngine.processTaskService().findById(doneTask.getId());
doneTaskVos.add(taskVO);
}
doneTaskVos.stream().filter(v -> "项目评审".equals(v.getDisplayName()))
.min(Comparator.comparing(ProcessTaskVO::getCreatedAt))
.ifPresent(v -> {
Dict taskFormData = v.getTaskFormData();
resultMap.put("xghOption", taskFormData.getStr("tf_opinion"));
resultMap.put("xghTime", DateUtil.format(v.getFinishTime(), "yyyy年MM月dd日"));
if (StrUtil.isNotBlank(taskFormData.getStr("tf_sign"))) {
resultMap.put("xqz", sysOfficeTemplateUtil.createPictureRenderData(taskFormData.getStr("tf_sign")));
}
});
resultMap.setv("manageName", infoMap.getString("manageName"));
resultMap.setv("projectName", infoMap.getString("projectName"));
resultMap.setv("applyUnitName", infoMap.getString("applyUnitName"));
resultMap.setv("jointUnitName", infoMap.getString("jointUnitName"));
resultMap.setv("headName", infoMap.getString("headName"));
resultMap.setv("mobile", infoMap.getString("mobile"));
resultMap.setv("email", infoMap.getString("email"));
resultMap.setv("projectTheme", infoMap.getString("projectTheme"));
resultMap.setv("content", infoMap.getString("content"));
resultMap.setv("xfu", infoMap.getString("schoolFundsAmount"));
resultMap.setv("dfu", infoMap.getString("deptFundsAmount"));
resultMap.setv("sfu", infoMap.getString("sumFundsAmount"));
resultMap.setv("nup", infoMap.getString("numberPeople"));
resultMap.setv("nul", infoMap.getString("numberLeader"));
resultMap.setv("nut", infoMap.getString("numberTeacher"));
resultMap.setv("unitp", infoMap.getString("unitPercentage"));
resultMap.setv("ldp", infoMap.getString("leaderPercentage"));
resultMap.setv("teap", infoMap.getString("teacherPercentage"));
List<LeadThoughtInfo.LeadThoughtFunds> leadThoughtFunds =
JSONUtil.toList(infoMap.getString("leadThoughtFunds"), LeadThoughtInfo.LeadThoughtFunds.class);
List<NutMap> list = leadThoughtFunds.stream().map(v -> {
NutMap map = NutMap.NEW();
map.setv("epa", v.getExpenseAccount());
map.setv("axm", v.getApplySchoolMoney());
map.setv("adm", v.getDeptMoney());
map.setv("att", v.getAmountTo());
return map;
}).toList();
resultMap.setv("funds", list);
List<LeadThoughtType> typeList = leadThoughtInfoService.dao().query(LeadThoughtType.class, Cnd.NEW());
typeList.forEach(v -> {
if (v.getTypeName().equals(infoMap.getString("typeName"))) {
v.setTypeName("(√)" + v.getTypeName());
}
});
resultMap.setv("types", typeList);
return resultMap;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
}
@@ -0,0 +1,96 @@
package com.budwk.app.zhgh.activity.leadthought.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.utils.DateUtil;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtInfo;
import com.budwk.app.zhgh.activity.leadthought.service.LeadThoughtInfoService;
import com.budwk.app.zhgh.activity.leadthought.vo.LeadThoughtPageForm;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Strings;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import java.util.List;
@IocBean
@Ok("json:full")
@Api("思政板块-校工会审核")
@At("/platform/leadThought/schoolUnionAudit")
public class LeadThoughtSchoolUnionAuditController {
@Inject
private Dao dao;
@Inject
private LeadThoughtInfoService leadThoughtInfoService;
@At("")
@Ok("beetl:/platform/zhgh/activity/leadthought/schoolunionaudit/index.html")
@SaCheckPermission("leadThought.schoolUnionAudit")
public void index() {
}
@At
@ApiOperation("数据列表")
@SaCheckPermission("leadThought.schoolUnionAudit")
public Result pageData(LeadThoughtPageForm pageForm) {
Sql sql = Sqls.create("""
SELECT
info.*,
p.manageName,
type.typeName,
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,
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
FROM
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN lead_thought_info info ON info.id = ins.businessNo
LEFT JOIN `lead_thought_project` p ON p.id = info.manageId
LEFT JOIN `lead_thought_type` type ON type.id = info.typeId
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 wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
$condition
""");
Cnd cnd = Cnd.NEW();
pageForm.buildSearch(cnd, "info.");
cnd.and("t.taskName", "=", "9ef58fdb-f45f-4df2-b11b-b9581b7ee949");
if (pageForm.getAudit()) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
} else {
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
}
cnd.groupBy("t.id");
sql.setCondition(cnd);
Pagination pagination = leadThoughtInfoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
}
@@ -0,0 +1,105 @@
package com.budwk.app.zhgh.activity.leadthought.controller.basic;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaMode;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.service.BaseService;
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtProject;
import com.budwk.app.zhgh.activity.leadthought.service.LeadThoughtInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import java.util.List;
@IocBean
@Ok("json:full")
@Api("思政项目管理")
@At("/platform/leadThought/basic/manage")
public class LeadThoughtManageController {
@Inject
private Dao dao;
@Inject
private LeadThoughtInfoService leadThoughtInfoService;
@At("")
@Ok("beetl:/platform/zhgh/activity/leadthought/basic/manage/index.html")
@SaCheckPermission("leadThought.basic.manage")
public void index() {
}
@At
@ApiOperation("数据列表")
@SaCheckPermission("leadThought.basic.manage")
public Result pageData(PageForm pageForm,
@Param(value = "projectName") String projectName,
@Param(value = "year") Integer year) {
Sql sql = Sqls.create("""
select
*
from
lead_thought_project
$condition
""");
Cnd cnd = Cnd.NEW();
if (StrUtil.isNotBlank(projectName)) {
cnd.and(Cnd.likeEX("projectName", projectName));
}
cnd.andEX("YEAR(createTime)", "=", year);
sql.setCondition(cnd);
Pagination pagination = leadThoughtInfoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
@At
@ApiOperation("添加项目")
@SaCheckPermission("leadThought.basic.manage")
@SLog(tag = "添加项目", msg = "项目名称:${args[0].projectName}")
public Result doAdd(LeadThoughtProject project) {
project.setCreateTime(DateUtil.now());
dao.insert(project);
return Result.success();
}
@At
@ApiOperation("编辑项目")
@SaCheckPermission("leadThought.basic.manage")
@SLog(tag = "编辑项目", msg = "项目名称:${args[0].projectName}")
public Result doEdit(LeadThoughtProject project) {
dao.updateIgnoreNull(project);
return Result.success();
}
@At
@ApiOperation("删除项目")
@SaCheckPermission("leadThought.basic.manage")
@SLog(tag = "删除项目", msg = "项目ID:${args[0]}")
public Result doDelete(String id) {
dao.clear(LeadThoughtProject.class, Cnd.where("id", "=", id));
return Result.success();
}
@At
@ApiOperation("获取项目列表")
@SaCheckPermission(value = {"leadThought.manage", "leadThought.apply"}, mode = SaMode.OR)
public Result getProjectList() {
List<LeadThoughtProject> list = dao.query(LeadThoughtProject.class, Cnd.where("isOpen", "=", 1));
return Result.success(list);
}
}
@@ -0,0 +1,99 @@
package com.budwk.app.zhgh.activity.leadthought.controller.basic;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaMode;
import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtType;
import com.budwk.app.zhgh.activity.leadthought.service.LeadThoughtInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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 org.nutz.mvc.annotation.Param;
import java.util.List;
@IocBean
@Ok("json:full")
@Api("思政项目类型管理")
@At("/platform/leadThought/basic/type")
public class LeadThoughtTypeController {
@Inject
private LeadThoughtInfoService leadThoughtInfoService;
@At("")
@Ok("beetl:/platform/zhgh/activity/leadthought/basic/type/index.html")
@SaCheckPermission("leadThought.basic.type")
public void index() {
}
@At
@ApiOperation("数据列表")
@SaCheckPermission("leadThought.basic.type")
public Result pageData(PageForm pageForm, @Param(value = "typeName") String typeName) {
Cnd cnd = Cnd.NEW();
Sql sql = Sqls.create("select * from lead_thought_type $condition");
cnd.and(Cnd.likeEX("typeName", typeName));
cnd.asc("sortNum");
sql.setCondition(cnd);
Pagination pagination = leadThoughtInfoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
@At
@ApiOperation("添加类型")
@SaCheckPermission("leadThought.basic.type")
@SLog(tag = "思政板块项目类型添加", msg = "思政板块项目类型添加")
public Result doAdd(LeadThoughtType type) {
int count = leadThoughtInfoService.count("lead_thought_type", Cnd.where("typeCode", "=", type.getTypeCode()));
if (count > 0) {
return Result.error("编码重复");
}
leadThoughtInfoService.dao().insert(type);
return Result.success();
}
@At
@ApiOperation("修改类型")
@SaCheckPermission("leadThought.basic.type")
@SLog(tag = "思政板块项目类型修改", msg = "思政板块项目类型修改")
public Result doEdit(LeadThoughtType type) {
int count = leadThoughtInfoService.count("lead_thought_type", Cnd.where("typeCode", "=", type.getTypeCode()).and("id", "!=", type.getId()));
if (count > 0) {
return Result.error("编码重复");
}
leadThoughtInfoService.dao().update(type);
return Result.success();
}
@At
@ApiOperation("删除类型")
@SaCheckPermission("leadThought.basic.type")
@SLog(tag = "删除类型", msg = "类型ID:${args[0]}")
public Result doDelete(String id) {
leadThoughtInfoService.clear("lead_thought_type", Cnd.where("id", "=", id));
return Result.success();
}
@At
@ApiOperation("查询所有类型")
@SaCheckPermission(value = {"leadThought.manage", "leadThought.apply", "leadThought.type"}, mode = SaMode.OR)
public Result findAllType() {
List<LeadThoughtType> list = leadThoughtInfoService.dao().query(LeadThoughtType.class, Cnd.where("isOpen", "=", 1).asc("sortNum"));
return Result.success(list);
}
}
@@ -0,0 +1,151 @@
package com.budwk.app.zhgh.activity.leadthought.model;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.util.List;
@Data
@Table
public class LeadThoughtInfo {
@Column
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("项目id(年度项目)")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String manageId;
@Column
@Comment("项目名称")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String projectName;
@Column
@Comment("申报单位Id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String applyUnitId;
@Column
@Comment("申报单位名称")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String applyUnitName;
@Column
@Comment("联合单位Id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String jointUnitId;
@Column
@Comment("联合单位名称")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String jointUnitName;
@Column
@Comment("负责人Id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String userId;
@Column
@Comment("项目负责人")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String headName;
@Column
@Comment("手机")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String mobile;
@Column
@Comment("邮箱")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String email;
@Column
@Comment("项目规模(人数)")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String numberPeople;
@Column
@Comment("领导参加人数")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String numberLeader;
@Column
@Comment("骨干教师参加人数")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String numberTeacher;
@Column
@Comment("占本单位人数%比")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String unitPercentage;
@Column
@Comment("占本领导人数%比")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String leaderPercentage;
@Column
@Comment("占本骨干教师人数%比")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String teacherPercentage;
@Column
@Comment("项目主题")
@ColDefine(type = ColType.VARCHAR, width = 255)
private String projectTheme;
@Column
@Comment("项目类别ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String typeId;
@Column
@Comment("项目主要内容/进度安排")
@ColDefine(type = ColType.TEXT)
private String content;
@Column
@Comment("校工会经费合计")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String schoolFundsAmount;
@Column
@Comment("部门经费合计")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String deptFundsAmount;
@Column
@Comment("总计")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String sumFundsAmount;
@Column
@ColDefine(type = ColType.VARCHAR, width = 20)
@Comment("填报时间")
private String applyTime;
@Column
@Comment("项目经费详情")
@ColDefine(type = ColType.MYSQL_JSON)
private List<LeadThoughtFunds> leadThoughtFunds;
@Data
public static class LeadThoughtFunds {
// 开支科目
private String expenseAccount;
// 向校工会申请经费
private String applySchoolMoney;
// 部门配套经费
private String deptMoney;
// 合计
private String amountTo;
}
}
@@ -0,0 +1,39 @@
package com.budwk.app.zhgh.activity.leadthought.model;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
@Data
@Table
public class LeadThoughtProject {
@Column
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("名称")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String manageName;
@Column
@Comment("创建时间")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String createTime;
@Column
@Comment("排序编号")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String sortNum;
@Column
@ColDefine(type = ColType.BOOLEAN)
@Comment("是否开启")
private boolean isOpen;
}
@@ -0,0 +1,37 @@
package com.budwk.app.zhgh.activity.leadthought.model;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
@Data
@Table
public class LeadThoughtType {
@Column
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("类别编码")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String typeCode;
@Column
@Comment("类型名称")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String typeName;
@Column
@Comment("排序编号")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String sortNum;
@Column
@ColDefine(type = ColType.BOOLEAN)
@Comment("是否开启")
private boolean isOpen;
}
@@ -0,0 +1,12 @@
package com.budwk.app.zhgh.activity.leadthought.service;
import com.budwk.app.base.service.BaseService;
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtInfo;
import org.nutz.lang.util.NutMap;
public interface LeadThoughtInfoService extends BaseService<LeadThoughtInfo> {
NutMap findOne(String id);
void buildDbColumn(LeadThoughtInfo info);
}
@@ -0,0 +1,59 @@
package com.budwk.app.zhgh.activity.leadthought.service.impl;
import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.base.utils.DateUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtInfo;
import com.budwk.app.zhgh.activity.leadthought.service.LeadThoughtInfoService;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.Daos;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
import java.util.List;
@IocBean(args = {"refer:dao"})
public class LeadThoughtInfoServiceImpl extends BaseServiceImpl<LeadThoughtInfo> implements LeadThoughtInfoService {
public LeadThoughtInfoServiceImpl(Dao dao) {
super(dao);
}
@Override
public NutMap findOne(String id) {
Sql sql = Sqls.create("""
SELECT
lti.*,
ltp.manageName,
ltt.typeName
FROM
`lead_thought_info` lti
LEFT JOIN `lead_thought_project` ltp ON ltp.id = lti.manageId
LEFT JOIN `lead_thought_type` ltt ON ltt.id = lti.typeId
where lti.id=@id
""");
sql.setParam("id", id);
return (NutMap) Daos.query(dao(), sql.toString(), Sqls.callback.map());
}
@Override
public void buildDbColumn(LeadThoughtInfo info) {
List<LeadThoughtInfo.LeadThoughtFunds> fundsList = info.getLeadThoughtFunds();
Double schoolFundsAmount = 0.00;
Double deptFundsAmount = 0.00;
Double sumFundsAmount = 0.00;
for (LeadThoughtInfo.LeadThoughtFunds funds : fundsList) {
schoolFundsAmount = schoolFundsAmount + Double.parseDouble(funds.getApplySchoolMoney());
deptFundsAmount = deptFundsAmount + Double.parseDouble(funds.getDeptMoney());
sumFundsAmount = sumFundsAmount + Double.parseDouble(funds.getAmountTo());
}
info.setUserId(SecurityUtil.getUserId());
info.setApplyTime(DateUtil.getDate());
info.setSchoolFundsAmount(String.valueOf(schoolFundsAmount));
info.setDeptFundsAmount(String.valueOf(deptFundsAmount));
info.setSumFundsAmount(String.valueOf(sumFundsAmount));
}
}
@@ -0,0 +1,57 @@
package com.budwk.app.zhgh.activity.leadthought.vo;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.web.commons.auth.utils.AuthUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.Cnd;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.lang.Strings;
/**
* @version 1.0
* @Author FKY
* @nameLeadThoughtPageForm
* @Date 2025/10/29 10:26
* @注释
*/
@Data
@ApiModel("思政板块公共参数")
@EqualsAndHashCode(callSuper = true)
public class LeadThoughtPageForm extends PageForm {
@ApiModelProperty("年份")
private Integer year;
@ApiModelProperty("管理Id")
private String manageId;
@ApiModelProperty("项目类型Id")
private String typeId;
@ApiModelProperty("项目名称")
private String projectName;
public void buildSearch(Cnd cnd, String prefix){
if (cnd == null) {
cnd = Cnd.NEW();
}
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
cnd.and(prefix + "userId", "=", SecurityUtil.getUserId());
}
cnd.andEX("YEAR(%s)".formatted((prefix + "applyTime")), "=", this.getYear());
cnd.andEX(prefix + "manageId", "=", this.getManageId());
cnd.andEX(prefix + "typeId", "=", this.getTypeId());
if (Strings.isNotBlank(this.getProjectName())) {
cnd.and(prefix + "projectName", "like", "%" + this.getProjectName() + "%");
}
cnd.desc(prefix + "applyTime");
}
}
@@ -18,6 +18,7 @@ import com.budwk.app.sys.models.Sys_user;
import com.budwk.app.zhgh.dayofficework.fund.member.mode.FundMemberImportExcelMode;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
import com.budwk.app.zhgh.dayofficework.fund.member.vo.FundMemberCommonPageForm;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.poi.ss.usermodel.Workbook;
@@ -43,9 +44,9 @@ import java.util.List;
import java.util.stream.Collectors;
@IocBean
@At("/platform/fundMember/batchJoin")
@Ok("json:full")
@Api("基金会员-批量加入")
@At("/platform/fundMember/batchJoin")
public class FundMemberBatchJoinController {
@Inject
@@ -64,7 +65,7 @@ public class FundMemberBatchJoinController {
@At
@SaCheckPermission("fundMember.batchJoin")
public Result pageData(PageForm pageForm, String unionId, String unitId, String userState) {
public Result pageData(FundMemberCommonPageForm pageForm) {
Sql sql = Sqls.create("""
SELECT
id,
@@ -72,6 +73,8 @@ public class FundMemberBatchJoinController {
loginname,
sex,
userState,
preparedBy,
personType,
unitName,
unionName
FROM
@@ -80,16 +83,7 @@ public class FundMemberBatchJoinController {
""");
Cnd cnd = Cnd.NEW();
cnd.and("aidFundMember", "!=", 1);
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("username", pageForm.getSearchKeyword());
seg.orLike("loginname", pageForm.getSearchKeyword());
cnd.and(seg);
}
cnd.andEX("unionId", "=", unionId);
cnd.andEX("unitId", "=", unitId);
cnd.andEX("userState", "=", userState);
pageForm.buildSearch(cnd, "");
cnd.asc("unionName").asc("unitName").asc("id");
sql.setCondition(cnd);
Pagination pagination = fundMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
@@ -22,6 +22,7 @@ import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberHis;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
import com.budwk.app.zhgh.dayofficework.fund.member.vo.FundMemberCommonPageForm;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.poi.ss.usermodel.Workbook;
@@ -45,9 +46,9 @@ import java.util.ArrayList;
import java.util.List;
@IocBean
@At("/platform/fundMember/query")
@Ok("json:full")
@Api(tags = "基金会员-查询")
@At("/platform/fundMember/query")
public class FundMemberQueryController {
@Inject
@@ -66,7 +67,7 @@ public class FundMemberQueryController {
@At
@SaCheckPermission("fundMember.query")
public Result pageData(PageForm pageForm, Integer year, String unionId) {
public Result pageData(FundMemberCommonPageForm pageForm) {
Sql sql = Sqls.create("""
SELECT
u.id,
@@ -75,6 +76,8 @@ public class FundMemberQueryController {
u.sex,
u.birthday,
u.userState,
u.preparedBy,
u.personType,
u.unitName,
u.unionName,
(SELECT changeTime FROM fund_member_change_record WHERE loginName = u.loginName AND isJoin = 1 ORDER BY changeTime DESC limit 1) joinTime
@@ -84,13 +87,7 @@ public class FundMemberQueryController {
""");
Cnd cnd = Cnd.NEW();
cnd.and("u.aidFundMember", "=", 1);
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("u.username", pageForm.getSearchKeyword());
seg.orLike("u.loginname", pageForm.getSearchKeyword());
cnd.and(seg);
}
cnd.andEX("u.unionId", "=", unionId);
pageForm.buildSearch(cnd, "u.");
sql.setCondition(cnd);
Pagination pagination = fundMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
@@ -1,9 +1,11 @@
package com.budwk.app.zhgh.dayofficework.fund.member.service.impl;
import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.sys.models.Sys_user;
import com.budwk.app.sys.views.View_user;
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberChangeRecord;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.IocBean;
@@ -36,5 +38,8 @@ public class FundMemberChangeRecordServiceImpl extends BaseServiceImpl<FundMembe
record.setChangeOrigin(changeOrigin);
record.setChangeTime(new Date());
insert(record);
// 同步修改人员数据
dao().update(Sys_user.class, Chain.make("aidFundMember", isJoin), Cnd.where(Sys_user::getLoginname, "=", loginName));
}
}
@@ -0,0 +1,64 @@
package com.budwk.app.zhgh.dayofficework.fund.member.vo;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.param.PageForm;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.Cnd;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import java.util.List;
/**
* @version 1.0
* @Author FKY
* @nameFundMemberCommonVo
* @Date 2025/10/27 17:35
* @注释
*/
@Data
@ApiModel("基金会员公共查询VO")
@EqualsAndHashCode(callSuper = true)
public class FundMemberCommonPageForm extends PageForm {
// 工会id
@ApiModelProperty("工会id")
private String unionId;
// 单位id
@ApiModelProperty("单位id")
private String unitId;
// 在职状态
@ApiModelProperty("在职状态")
private List<String> userStates;
// 在职状态
@ApiModelProperty("编制类别")
private List<String> preparedBys;
// 教职工类别
@ApiModelProperty("教职工类别")
private List<String> personTypes;
public void buildSearch(Cnd cnd, String prefix){
if (cnd == null) {
cnd = Cnd.NEW();
}
if (StrUtil.isNotBlank(this.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike(prefix + "username", this.getSearchKeyword());
seg.orLike(prefix + "loginname", this.getSearchKeyword());
cnd.and(seg);
}
cnd.andEX(prefix + "unionId", "=", this.getUnionId());
cnd.andEX(prefix + "unitId", "=", this.getUnitId());
cnd.andEX(prefix + "userState", "in", this.getUserStates());
cnd.andEX(prefix + "preparedBy", "in", this.getPreparedBys());
cnd.andEX(prefix + "personType", "in", this.getPersonTypes());
}
}
@@ -5,6 +5,7 @@ import cn.hutool.core.convert.Convert;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.pinyin.PinyinUtil;
import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.page.Pagination;
@@ -141,19 +142,21 @@ public class TeacherCongressDelegatePushController {
@At
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("tc.delegate.push")
@SLog(tag = "民主管理-教代会代表推选", msg = "获取本分工会下的非代表用户")
// @SLog(tag = "民主管理-教代会代表推选", msg = "获取本分工会下的非代表用户")
public Result getUnionUser(String sessionId, String unionId) {
// 查询预选中的代表
Cnd cndx = Cnd.where("sessionId", "=", sessionId);
cndx.andEX("unionId", "=", SecurityUtil.getUnionId());
List<TeacherCongressDelegatePush> delegateList = dao.query(TeacherCongressDelegatePush.class, cndx);
delegateList.sort(Comparator.comparing(u -> PinyinUtil.getFirstLetter(u.getUserName().charAt(0))));
List<String> userIds = delegateList.stream().map(TeacherCongressDelegatePush::getUserId).toList();
Sql sql = Sqls.create("""
SELECT
u.id AS userId,
u.loginname as loginName,
u.username as userName,
u.professionalTitle,
u.professionalTitle,
u.professionalLevel,
u.sex,
u.birthday,
@@ -176,7 +179,9 @@ public class TeacherCongressDelegatePushController {
cnd.and("tcdp.id", "is", null);
cnd.and("u.unionId", "=", SecurityUtil.getUnionId());
sql.setCondition(cnd);
List userList = baseService.listMap(sql);
List<NutMap> userList = baseService.listMap(sql);
userList.sort(Comparator.comparing(u -> PinyinUtil.getFirstLetter(u.getString("userName").charAt(0))));
return Result.success(Map.of("userData", userList, "userValue", delegateList));
}
@@ -176,4 +176,8 @@ public class MemberChangeManageController {
return Result.success(map);
}
public void doExport() {
}
}
@@ -22,7 +22,7 @@ import org.nutz.mvc.annotation.Ok;
@IocBean
@Api("个人核对")
@Ok("json:full")
@At("/platform/personnel/check/verification/manage")
@At("/platform/personnel/check/verification/single")
public class CheckTaskSingleController {
@Inject
@@ -91,8 +91,7 @@ public class CheckTaskVerificationController {
dao.clear(CheckTaskPersonnel.class, Cnd.where("taskId", "=", vo.getId()));
}
// 插入逻辑
// 以下是插入逻辑
// 1.界面可能会对相关审核步骤做修改修改审核流程配置
dao.update(vo.getBusinessConfig());
@@ -108,7 +107,7 @@ public class CheckTaskVerificationController {
// 4.读取文件构造数据动态字段 data CheckTaskPersonnel 表中插入数据
// todo 读取文件 转换成数据
// todo 读取文件 转换成数据 同时还要把字段转化成数据库的字段来存储
return Result.success();