From d03b4d165e407ea16f954ebde444ce03c70a7540 Mon Sep 17 00:00:00 2001 From: sunzheng Date: Tue, 10 Sep 2024 11:01:16 +0800 Subject: [PATCH] =?UTF-8?q?update:=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81;?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../club/controller/LawsClubController.java | 83 +++++++++------- .../laws/club/entity/LawsClubJoinTeam.java | 25 +---- .../laws/club/entity/LawsClubMeeting.java | 17 +--- .../club/entity/LawsClubMeetingMember.java | 4 + .../entity/LawsClubResearchInformation.java | 6 +- .../club/entity/LawsClubWorkingGroupFile.java | 8 +- .../laws/club/service/ILawsClubService.java | 2 - .../service/impl/LawsClubServiceImpl.java | 95 ++----------------- .../laws/club/vo/LawsClubMeetingExcel.java | 37 ++++++++ .../modules/laws/vo/LawsClubMeetingExcel.java | 67 ------------- 10 files changed, 111 insertions(+), 233 deletions(-) create mode 100644 laws-modules/src/main/java/com/jero/modules/laws/club/vo/LawsClubMeetingExcel.java delete mode 100644 laws-modules/src/main/java/com/jero/modules/laws/vo/LawsClubMeetingExcel.java diff --git a/laws-modules/src/main/java/com/jero/modules/laws/club/controller/LawsClubController.java b/laws-modules/src/main/java/com/jero/modules/laws/club/controller/LawsClubController.java index 78d932a2..92057188 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/club/controller/LawsClubController.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/club/controller/LawsClubController.java @@ -4,13 +4,14 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.metadata.IPage; import com.jero.common.api.vo.Result; import com.jero.common.aspect.annotation.AutoLog; -import com.jero.common.aspect.annotation.DictPoint; +import com.jero.common.aspect.annotation.Translation; import com.jero.common.system.base.controller.JeroController; import com.jero.modules.laws.club.entity.LawsClub; import com.jero.modules.laws.club.service.ILawsClubService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; import javax.annotation.Resource; @@ -34,31 +35,6 @@ public class LawsClubController extends JeroController queryTree(@RequestParam(name = "nodeType", required = false, defaultValue = "") String nodeType) { - List list = lawsClubService.getTree("Part", nodeType); - return Result.OK(list); - } - - /** - * 获取子集 - * @param parentId - * @param nodeType - * @return - */ -// @AutoLog(value = "社团管理-获取子集") -// @ApiOperation(value = "社团管理-获取子集", notes = "社团管理-获取子集") -// @GetMapping("/getChild") - public Result getChild(@RequestParam("parentId") String parentId, - @RequestParam("nodeType") String nodeType) { - return Result.OK(lawsClubService.getTree(parentId, nodeType)); - } - /** * 树形查询所有 * @param nodeType @@ -67,6 +43,7 @@ public class LawsClubController extends JeroController queryTreeAll(@RequestParam(name = "nodeType", required = false, defaultValue = "") String nodeType) { List tree = lawsClubService.getTreeStructure("Part", nodeType); return Result.OK(tree); @@ -80,6 +57,7 @@ public class LawsClubController extends JeroController queryPageList(LawsClub lawsClub, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, @@ -89,15 +67,30 @@ public class LawsClubController extends JeroController addOrEdit(@RequestBody LawsClub lawsClub) { + @AutoLog(value = "社团管理-添加") + @ApiOperation(value="社团管理-添加", notes="社团管理-添加") + @PostMapping(value = "/add") + @RequiresPermissions("clubManagement:clubManagement:add") + public Result add(@RequestBody LawsClub lawsClub) { + return lawsClubService.addOrEdit(lawsClub); + } + + /** + * 编辑 + * + * @param lawsClub + * @return + */ + @AutoLog(value = "社团管理-编辑") + @ApiOperation(value="社团管理-编辑", notes="社团管理-编辑") + @PostMapping(value = "/edit") + @RequiresPermissions("clubManagement:clubManagement:edit") + public Result edit(@RequestBody LawsClub lawsClub) { return lawsClubService.addOrEdit(lawsClub); } @@ -107,29 +100,44 @@ public class LawsClubController extends JeroController queryOne(@RequestBody JSONObject jsonObject) { String id = jsonObject.getString("id"); return lawsClubService.queryOne(id); } /** - * 通过id删除 + * 删除 */ - @AutoLog(value = "社团管理-通过id删除") - @ApiOperation(value="社团管理-通过id删除", notes="社团管理-通过id删除") + @AutoLog(value = "社团管理-删除") + @ApiOperation(value="社团管理-通过id删除", notes="社团管理-删除") @PostMapping(value = "/delete") + @RequiresPermissions("clubManagement:clubManagement:delete") public Result delete(@RequestBody JSONObject jsonObject) { String id = jsonObject.getString("id"); return lawsClubService.delete(id); } + /** + * 树形结构删除 + */ + @AutoLog(value = "社团管理-树形结构删除") + @ApiOperation(value="社团管理-树形结构删除", notes="社团管理-树形结构删除") + @PostMapping(value = "/treeDelete") + @RequiresPermissions("clubManagement:clubManagement:treeDelete") + public Result treeDelete(@RequestBody JSONObject jsonObject) { + String id = jsonObject.getString("id"); + return lawsClubService.delete(id); + } + /** * 导出全部 */ @AutoLog(value = "社团管理-导出") @ApiOperation(value="社团管理-导出", notes="社团管理-导出") @RequestMapping(value = "/exportXls") + @RequiresPermissions("clubManagement:clubManagement:export") public ModelAndView exportAll(LawsClub lawsClub, HttpServletRequest request) { return lawsClubService.exportAll(lawsClub,request); } @@ -140,6 +148,7 @@ public class LawsClubController extends JeroController excelimport(HttpServletRequest request) { return lawsClubService.importExcel(request); } diff --git a/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubJoinTeam.java b/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubJoinTeam.java index 33cff0f8..69fc80c5 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubJoinTeam.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubJoinTeam.java @@ -1,14 +1,10 @@ package com.jero.modules.laws.club.entity; -import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; -import java.time.LocalDate; -import java.time.LocalDateTime; import com.baomidou.mybatisplus.annotation.TableId; import java.io.Serializable; import java.util.Date; - import com.fasterxml.jackson.annotation.JsonFormat; import com.jero.common.aspect.annotation.Dict; import io.swagger.annotations.ApiModel; @@ -51,34 +47,32 @@ public class LawsClubJoinTeam implements Serializable { @ApiModelProperty(value = "社团职务担任者id") @Dict(dictTable = "sys_user", dicCode = "id", dicText = "realname") -// @Excel(name = "社团职务担任者", width = 20, dicText = "realname", dicCode = "id", dictTable = "sys_user") private String leadId; @ApiModelProperty(value = "入团经费") -// @Excel(name = "入团经费", width = 20) private String joinCast; @ApiModelProperty(value = "社团简介") -// @Excel(name = "社团简介", width = 20) private String clubProfile; @ApiModelProperty(value = "部门id") @Excel(name = "部门名称", width = 20, dicText = "depart_name", dicCode = "id", dictTable = "sys_depart") + @Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name") private String departId; @ApiModelProperty(value = "专业模块") + @Dict(dicCode = "professional_module") private String specializedModule; @ApiModelProperty(value = "申请人的id") @Excel(name = "申请人", width = 20, dicText = "realname", dicCode = "id", dictTable = "sys_user") + @Dict(dictTable = "sys_user", dicCode = "id", dicText = "realname") private String proposerId; @ApiModelProperty(value = "秘书处") -// @Excel(name = "秘书处", width = 20) private String secretariat; @ApiModelProperty(value = "联系人") -// @Excel(name = "联系人", width = 20) private String contacts; @ApiModelProperty(value = "备注") @@ -100,17 +94,4 @@ public class LawsClubJoinTeam implements Serializable { @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date updateTime; - @ApiModelProperty(value = "社团职务担任者名称") - @TableField(exist = false) - private String leadIdText; - - @ApiModelProperty(value = "部门名称") - @TableField(exist = false) - private String departText; - - @ApiModelProperty(value = "申请人名称") - @TableField(exist = false) - private String proposerText; - - } diff --git a/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubMeeting.java b/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubMeeting.java index 9ad920e3..ba847091 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubMeeting.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubMeeting.java @@ -46,51 +46,44 @@ public class LawsClubMeeting implements Serializable { private String clubId; @ApiModelProperty(value = "会议名称") - @Excel(name = "会议名称", width = 20) private String meetingName; @ApiModelProperty(value = "会议日期") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") - @Excel(name = "会议日期", width = 20, format = "yyyy-MM-dd") private Date meetingDate; @ApiModelProperty(value = "会议费用") - @Excel(name = "会议费用", width = 20) private String meetingCost; @ApiModelProperty(value = "线下/线上地点") - @Excel(name = "线下/线上地点", width = 20) private String meetingPlace; @ApiModelProperty(value = "计划完成日期") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") -// @Excel(name = "计划完成日期", width = 20, format = "yyyy-MM-dd") private Date planCompletionDate; @ApiModelProperty(value = "通知人id") -// @Excel(name = "通知人", width = 20, dicText = "realname", dicCode = "id", dictTable = "sys_user") + @Dict(dictTable = "sys_user", dicCode = "id", dicText = "realname") private String notifierId; @ApiModelProperty(value = "通知部门id") -// @Excel(name = "部门名称", width = 20, dicText = "depart_name", dicCode = "id", dictTable = "sys_depart") + @Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name") private String notifyDepartId; @ApiModelProperty(value = "通知部门专业模块") -// @Excel(name = "参会部门专业模块", width = 20, dicCode = "professional_module") + @Dict(dicCode = "professional_module") private String informSpecializedModule; @ApiModelProperty(value = "是否宣贯 0-否 1-是") -// @Excel(name = "参会部门专业模块", width = 20, dicCode = "yn") + @Dict(dicCode = "yn") private String isPublicize; @ApiModelProperty(value = "会议组织人") -// @Excel(name = "会议组织人", width = 20) private String meetingOrganizer; @ApiModelProperty(value = "会议内容") -// @Excel(name = "会议内容", width = 20) private String meetingContent; @ApiModelProperty(value = "创建人") @@ -111,7 +104,7 @@ public class LawsClubMeeting implements Serializable { @TableField(exist = false) @ApiModelProperty(value = "会议成员列表") -// @ExcelCollection(name = "会议成员列表") private List meetingMemberList; + } diff --git a/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubMeetingMember.java b/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubMeetingMember.java index 2a32f202..3b778d15 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubMeetingMember.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubMeetingMember.java @@ -42,18 +42,22 @@ public class LawsClubMeetingMember implements Serializable { @ApiModelProperty(value = "参会人员的id") @Excel(name = "参会人员", width = 20, dicText = "realname", dicCode = "id", dictTable = "sys_user") + @Dict(dictTable = "sys_user", dicCode = "id", dicText = "realname") private String memberId; @ApiModelProperty(value = "参会部门专业模块") @Excel(name = "参会部门专业模块", dicCode = "professional_module") + @Dict(dicCode = "professional_module") private String meetingSpecializedModule; @ApiModelProperty(value = "参会部门的id") @Excel(name = "参会部门", width = 20, dicText = "depart_name", dicCode = "id", dictTable = "sys_depart") + @Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name") private String departId; @ApiModelProperty(value = "参会报告文件id") @Excel(name = "参会报告文件", width = 20) + @Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name") private String meetingFileId; @ApiModelProperty(value = "备注") diff --git a/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubResearchInformation.java b/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubResearchInformation.java index bc67c499..c0935f85 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubResearchInformation.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubResearchInformation.java @@ -2,13 +2,11 @@ package com.jero.modules.laws.club.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; -import java.time.LocalDate; -import java.time.LocalDateTime; import com.baomidou.mybatisplus.annotation.TableId; import java.io.Serializable; import java.util.Date; - import com.fasterxml.jackson.annotation.JsonFormat; +import com.jero.common.aspect.annotation.Dict; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -74,12 +72,14 @@ public class LawsClubResearchInformation implements Serializable { private String feedbackDepart; @ApiModelProperty(value = "反馈部门专业模块") + @Dict(dicCode = "professional_module") private String feedbackSpecializedModule; @ApiModelProperty(value = "反馈情况") private String feedbackSituation; @ApiModelProperty(value = "任务来源") + @Dict(dicCode = "task_source") private String taskSource; @ApiModelProperty(value = "盖章流程完成情况") diff --git a/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubWorkingGroupFile.java b/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubWorkingGroupFile.java index 3d320496..5f7c9c95 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubWorkingGroupFile.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/club/entity/LawsClubWorkingGroupFile.java @@ -2,12 +2,11 @@ package com.jero.modules.laws.club.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; -import java.time.LocalDateTime; import com.baomidou.mybatisplus.annotation.TableId; import java.io.Serializable; import java.util.Date; - import com.fasterxml.jackson.annotation.JsonFormat; +import com.jero.common.aspect.annotation.Dict; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -40,12 +39,11 @@ public class LawsClubWorkingGroupFile implements Serializable { private String clubId; @ApiModelProperty(value = "文件id") + @Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name") private String fileId; - @ApiModelProperty(value = "文件名称") - private String fileName; - @ApiModelProperty(value = "文件类型") + @Dict(dicCode = "file_type") private String fileType; @ApiModelProperty(value = "创建人") diff --git a/laws-modules/src/main/java/com/jero/modules/laws/club/service/ILawsClubService.java b/laws-modules/src/main/java/com/jero/modules/laws/club/service/ILawsClubService.java index 3f9964aa..010c02e5 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/club/service/ILawsClubService.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/club/service/ILawsClubService.java @@ -18,8 +18,6 @@ import java.util.List; */ public interface ILawsClubService extends IService { - List getTree(String parentId, String nodeType); - Result addOrEdit(LawsClub lawsClub); Result queryOne(String id); diff --git a/laws-modules/src/main/java/com/jero/modules/laws/club/service/impl/LawsClubServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/club/service/impl/LawsClubServiceImpl.java index b5643f3b..b58f3448 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/club/service/impl/LawsClubServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/club/service/impl/LawsClubServiceImpl.java @@ -1,6 +1,5 @@ package com.jero.modules.laws.club.service.impl; -import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -18,13 +17,10 @@ import com.jero.common.util.oConvertUtils; import com.jero.modules.laws.club.entity.*; import com.jero.modules.laws.club.mapper.LawsClubMapper; import com.jero.modules.laws.club.service.*; -import com.jero.modules.laws.vo.LawsClubMeetingExcel; -import com.jero.modules.system.entity.SysDepart; -import com.jero.modules.system.entity.SysUser; +import com.jero.modules.laws.club.vo.LawsClubMeetingExcel; import com.jero.modules.system.service.ISysDepartService; import com.jero.modules.system.service.ISysUserService; import org.apache.commons.lang3.StringUtils; -import org.apache.lucene.search.similarities.LambdaDF; import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; @@ -36,7 +32,6 @@ import org.springframework.web.servlet.ModelAndView; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.util.*; -import java.util.concurrent.ConcurrentHashMap; import java.util.function.Function; import java.util.stream.Collectors; @@ -71,79 +66,20 @@ public class LawsClubServiceImpl extends ServiceImpl i @Resource private RedisUtil redisUtil; - @Override - public List getTree(String parentId, String nodeType) { - // 查询所有节点 - List allNodes = list(); - - // 过滤符合条件的节点 - List matchedNodes = allNodes.parallelStream() - .filter(node -> node.getNodeType() != null && node.getNodeType().contains(nodeType)) - .collect(Collectors.toList()); - - // 构建节点映射,以及父子关系映射 - Map nodeMap = allNodes.parallelStream() - .collect(Collectors.toConcurrentMap(LawsClub::getId, Function.identity())); - Map> parentChildMap = matchedNodes.parallelStream() - .collect(Collectors.groupingByConcurrent(LawsClub::getParentId)); - - if (matchedNodes.isEmpty()) { - return Collections.emptyList(); - } - - // 查找每个匹配节点的一级父节点 - Set rootNodes = ConcurrentHashMap.newKeySet(); - Set allParentNodeCodes = ConcurrentHashMap.newKeySet(); - matchedNodes.parallelStream().forEach(matchedNode -> { - LawsClub currentNode = matchedNode; - while (currentNode != null && !currentNode.getParentId().equals(parentId)) { - currentNode = nodeMap.get(currentNode.getParentId()); - if (currentNode != null) { - allParentNodeCodes.add(currentNode.getId()); - } - } - if (currentNode != null) { - rootNodes.add(currentNode); - } - }); - - // 设置叶子标志 - rootNodes.parallelStream().forEach(rootNode -> { - List children = parentChildMap.get(rootNode.getId()); - boolean hasNoChildren = (children == null || children.isEmpty()); - - if (StringUtils.isBlank(nodeType)) { - rootNode.setLeafFlag(hasNoChildren); - } else { - boolean isNotInAllParents = !allParentNodeCodes.contains(rootNode.getId()); - rootNode.setLeafFlag(hasNoChildren && isNotInAllParents); - } - }); - - // 按名字排序 - return rootNodes.stream() - .sorted(Comparator.comparing(LawsClub::getNodeType)) - .collect(Collectors.toList()); - } - @Override public List getTreeStructure(String parentId, String nodeType) { // 查询所有节点 List allNodes = list(); - // 构建节点映射 Map nodeMap = allNodes.parallelStream() .collect(Collectors.toConcurrentMap(LawsClub::getId, Function.identity())); - // 构建父子关系映射 Map> parentChildMap = allNodes.parallelStream() .collect(Collectors.groupingBy(LawsClub::getParentId)); - // 如果 nodeType 为空,则返回完整树结构 if (StringUtils.isBlank(nodeType)) { return buildTreeStructure(parentId, parentChildMap, nodeMap); // 构建并返回完整的树形结构 } - // 查找 nodeType 对应的目标节点 List targetNodes = allNodes.stream() .filter(node -> node.getNodeType() != null && node.getNodeType().contains(nodeType)) @@ -152,19 +88,8 @@ public class LawsClubServiceImpl extends ServiceImpl i // 如果没有找到与 nodeType 模糊匹配的节点,返回空列表 return Collections.emptyList(); } - -// // 目标节点ID集合 -// Set targetNodeIds = targetNodes.stream() -// .map(LawsClub::getId) -// .collect(Collectors.toSet()); -// // 筛选目标节点,排除那些 parentId 在 targetNodeIds 中的节点 -// List filteredTargetNodes = targetNodes.stream() -// .filter(node -> !targetNodeIds.contains(node.getParentId())) -// .collect(Collectors.toList()); - // 创建结果列表 List result = new ArrayList<>(); - // 处理每个匹配到的目标节点 for (LawsClub targetNode : targetNodes) { // 查找目标节点的直接上级节点 @@ -357,27 +282,23 @@ public class LawsClubServiceImpl extends ServiceImpl i @Override public Result queryOne(String id) { + if (StringUtils.isBlank(id)) { + throw new JeroBootException(ResultCommon.PARAMETERS_CANNOT_BE_NULL); + } // 先根据id查出社团管理的相关数据 LawsClub lawsClub = getById(id); + if (Objects.isNull(lawsClub)) { + throw new JeroBootException(ResultCommon.PARAMETERS_CANNOT_BE_NULL); + } + // 解密联系方式 if (StringUtils.isNotBlank(lawsClub.getContactNumber())) { String contactNumber = lawsClub.getContactNumber(); String encryptNumber = PasswordUtil.decrypt(contactNumber); lawsClub.setContactNumber(encryptNumber); } - if (Objects.isNull(lawsClub)) { - throw new JeroBootException(ResultCommon.PARAMETERS_CANNOT_BE_NULL); - } String clubId = lawsClub.getId(); // 查出几张关联表的数据 List joinTeamList = lawsClubJoinTeamService.list(new LambdaQueryWrapper().eq(LawsClubJoinTeam::getClubId, clubId)); - for (LawsClubJoinTeam lawsClubJoinTeam : joinTeamList) { - SysUser user1 = sysUserService.getById(lawsClubJoinTeam.getLeadId()); - SysUser user2 = sysUserService.getById(lawsClubJoinTeam.getProposerId()); - SysDepart depart = sysDepartService.getById(lawsClubJoinTeam.getDepartId()); - lawsClubJoinTeam.setLeadIdText(user1!= null ? user1.getRealname() : null); - lawsClubJoinTeam.setDepartText(depart!= null ? depart.getDepartName() : null); - lawsClubJoinTeam.setProposerText(user2 != null ? user2.getRealname() : null); - } List paymentList = lawsClubPaymentService.list(new LambdaQueryWrapper().eq(LawsClubPayment::getClubId, clubId)); List meetingList = lawsClubMeetingService.list(new LambdaQueryWrapper().eq(LawsClubMeeting::getClubId, clubId)); for (LawsClubMeeting lawsClubMeeting : meetingList) { diff --git a/laws-modules/src/main/java/com/jero/modules/laws/club/vo/LawsClubMeetingExcel.java b/laws-modules/src/main/java/com/jero/modules/laws/club/vo/LawsClubMeetingExcel.java new file mode 100644 index 00000000..2b20183f --- /dev/null +++ b/laws-modules/src/main/java/com/jero/modules/laws/club/vo/LawsClubMeetingExcel.java @@ -0,0 +1,37 @@ +package com.jero.modules.laws.club.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.jero.modules.laws.club.entity.LawsClubMeetingMember; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecgframework.poi.excel.annotation.ExcelCollection; +import org.springframework.format.annotation.DateTimeFormat; +import java.util.Date; +import java.util.List; + +@Data +public class LawsClubMeetingExcel { + + @ApiModelProperty(value = "会议名称") + @Excel(name = "会议名称", width = 20) + private String meetingName; + + @ApiModelProperty(value = "会议日期") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @Excel(name = "会议日期", width = 20, format = "yyyy-MM-dd") + private Date meetingDate; + + @ApiModelProperty(value = "会议费用") + @Excel(name = "会议费用", width = 20) + private String meetingCost; + + @ApiModelProperty(value = "线下/线上地点") + @Excel(name = "线下/线上地点", width = 20) + private String meetingPlace; + + @ApiModelProperty(value = "会议成员列表") + @ExcelCollection(name = "会议成员列表") + private List meetingMemberList; +} diff --git a/laws-modules/src/main/java/com/jero/modules/laws/vo/LawsClubMeetingExcel.java b/laws-modules/src/main/java/com/jero/modules/laws/vo/LawsClubMeetingExcel.java deleted file mode 100644 index b6a91393..00000000 --- a/laws-modules/src/main/java/com/jero/modules/laws/vo/LawsClubMeetingExcel.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.jero.modules.laws.vo; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.jero.modules.laws.club.entity.LawsClubMeetingMember; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import org.jeecgframework.poi.excel.annotation.Excel; -import org.jeecgframework.poi.excel.annotation.ExcelCollection; -import org.springframework.format.annotation.DateTimeFormat; -import java.util.Date; -import java.util.List; - -@Data -public class LawsClubMeetingExcel { - - @ApiModelProperty(value = "会议名称") - @Excel(name = "会议名称", width = 20) - private String meetingName; - - @ApiModelProperty(value = "会议日期") - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") - @DateTimeFormat(pattern="yyyy-MM-dd") - @Excel(name = "会议日期", width = 20, format = "yyyy-MM-dd") - private Date meetingDate; - - @ApiModelProperty(value = "会议费用") - @Excel(name = "会议费用", width = 20) - private String meetingCost; - - @ApiModelProperty(value = "线下/线上地点") - @Excel(name = "线下/线上地点", width = 20) - private String meetingPlace; - - @ApiModelProperty(value = "计划完成日期") - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") - @DateTimeFormat(pattern="yyyy-MM-dd") -// @Excel(name = "计划完成日期", width = 20, format = "yyyy-MM-dd") - private Date planCompletionDate; - - @ApiModelProperty(value = "通知人id") -// @Excel(name = "通知人", width = 20, dicText = "realname", dicCode = "id", dictTable = "sys_user") - private String notifierId; - - @ApiModelProperty(value = "通知部门id") -// @Excel(name = "部门名称", width = 20, dicText = "depart_name", dicCode = "id", dictTable = "sys_depart") - private String notifyDepartId; - - @ApiModelProperty(value = "通知部门专业模块") -// @Excel(name = "参会部门专业模块", width = 20, dicCode = "professional_module") - private String informSpecializedModule; - - @ApiModelProperty(value = "是否宣贯 0-否 1-是") -// @Excel(name = "参会部门专业模块", width = 20, dicCode = "yn") - private String isPublicize; - - @ApiModelProperty(value = "会议组织人") -// @Excel(name = "会议组织人", width = 20) - private String meetingOrganizer; - - @ApiModelProperty(value = "会议内容") -// @Excel(name = "会议内容", width = 20) - private String meetingContent; - - @ApiModelProperty(value = "会议成员列表") - @ExcelCollection(name = "会议成员列表") - private List meetingMemberList; -}