add 功能安全中心会议

This commit is contained in:
lijiarao
2024-07-03 09:45:57 +08:00
parent ac2d762e59
commit dd53b327eb
5 changed files with 577 additions and 1 deletions
@@ -69,9 +69,17 @@ public class MeetingCommon {
*/
public final static String OVERSEAS_MEETING = "8";
/**
* 起草组会议
* 海外会议
*/
public final static Integer OVERSEAS_MEETING_INT = 8;
/**
* 安全中心会议
*/
public final static String SAFETY_CENTER_MEETING = "9";
/**
* 安全中心会议
*/
public final static Integer SAFETY_CENTER_MEETING_INT = 9;
/**
* 标准宣贯
*/
@@ -0,0 +1,234 @@
package com.jero.meeting.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.system.api.ISysBaseAPI;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.AuthenticationUtils;
import com.jero.common.util.PasswordUtil;
import com.jero.common.util.ValidUtil;
import com.jero.company.service.IPayContactsManagementService;
import com.jero.data.service.IPayCaseCommitteeService;
import com.jero.meeting.common.MeetingCommon;
import com.jero.meeting.entity.PayMeeting;
import com.jero.meeting.entity.PayMeetingHotelContacts;
import com.jero.meeting.service.IPayMeetingHotelContactsService;
import com.jero.meeting.service.IPayMeetingService;
import com.jero.meeting.vo.PayMeetingVO;
import com.jero.meeting.vo.PublishReminderVO;
import com.jero.meeting.vo.UploadFileVO;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.system.volid.group.UpdateGroup;
import com.jero.project.service.IPayWorkingGroupService;
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.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
/**
* @description: 会议管理
* @author: jero-boot
* @date: 2021-09-02
* @version: V1.0
*/
@Api(tags = "会议管理-功能安全中心会议")
@RestController
@RequestMapping("/meeting/safetyCenterMeeting")
@Slf4j
public class SafetyCenterMeetingController extends JeroController<PayMeeting, IPayMeetingService> {
@Resource
private IPayMeetingService payMeetingService;
@Resource
private ISysBaseAPI sysBaseAPI;
@Resource
private IPayMeetingHotelContactsService meetingHotelContactsService;
@Resource
private IPayWorkingGroupService payWorkingGroupService;
@Resource
private AuthenticationUtils authenticationUtils;
@Resource
private IOSSFileService iossFileService;
@Resource
private IPayCaseCommitteeService payCaseCommitteeService;
@Resource
private IPayContactsManagementService payContactsManagementService;
private final Integer MEETING_TYPE = MeetingCommon.SAFETY_CENTER_MEETING_INT;
/**
* 分页列表查询
*/
@RequiresPermissions("otherMeeting:search")
@ApiOperation(value = "会议管理-分页列表查询", notes = "会议管理-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(PayMeeting payMeeting,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
payMeeting.setMeetingType(MEETING_TYPE);
IPage<PayMeeting> pageList = payMeetingService.queryPageList(payMeeting, pageNo, pageSize, req);
return Result.OK(pageList);
}
/**
* 添加
*/
@RequiresPermissions("otherMeeting:add")
@AutoLog(value = "会议管理-添加")
@ApiOperation(value = "会议管理-添加", notes = "会议管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody PayMeetingVO payMeetingVO) {
String meetingType = payMeetingVO.getMeetingType();
if (!Objects.equals(meetingType, MeetingCommon.OTHER_MEETING)) {
throw new RuntimeException();
}
ValidUtil.validate(payMeetingVO);
payMeetingService.add(payMeetingVO);
return Result.OK("添加成功!");
}
private void extracted(String id) {
PayMeeting payMeeting = payMeetingService.getById(id);
Integer meetingType = payMeeting.getMeetingType();
if (!Objects.equals(meetingType, MEETING_TYPE)) {
throw new RuntimeException();
}
}
/**
* 编辑
*/
@RequiresPermissions("otherMeeting:edit")
@AutoLog(value = "会议管理-编辑")
@ApiOperation(value = "会议管理-编辑", notes = "会议管理-编辑")
@PostMapping(value = "/edit")
public Result<?> edit(@RequestBody PayMeetingVO payMeetingVO) {
String id = payMeetingVO.getId();
extracted(id);
ValidUtil.validate(payMeetingVO, UpdateGroup.class);
payMeetingService.editById(payMeetingVO);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*/
@RequiresPermissions("otherMeeting:delete")
@AutoLog(value = "会议管理-通过id删除")
@ApiOperation(value = "会议管理-通过id删除", notes = "会议管理-通过id删除")
@GetMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id") String id) {
extracted(id);
payMeetingService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*/
@RequiresPermissions("otherMeeting:batchDel")
@AutoLog(value = "会议管理-批量删除")
@ApiOperation(value = "会议管理-批量删除", notes = "会议管理-批量删除")
@GetMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids") String ids) {
List<String> idList = Arrays.asList(ids.split(","));
for (String id : idList) {
extracted(id);
}
this.payMeetingService.deleteByIds(idList);
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*/
@ApiOperation(value = "会议管理-通过id查询", notes = "会议管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id") String id) {
PayMeeting meeting = payMeetingService.queryById(id);
if (meeting == null || !Objects.equals(meeting.getMeetingType(), MEETING_TYPE)) {
return Result.error("未找到对应数据");
}
//查询会议负责人
LoginUser user = sysBaseAPI.getUserById(meeting.getDirectorId());
meeting.setDirectorName(user.getRealname());
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
PayMeetingVO payMeetingVO = new PayMeetingVO();
BeanUtils.copyProperties(meeting, payMeetingVO);
String meetingType = meeting.getMeetingType().toString();
//String meetingType1 = sysBaseAPI.translateDict("meeting_type", meetingType);
payMeetingVO.setMeetingType(meetingType);
payMeetingVO.setTbMeetingType(meeting.getMeetingType().toString());
//payMeetingVO.setHotelContactsList(new ArrayList<>());
//会议查询酒店联系人列表
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
payMeetingVO.setHotelContactsList(payMeetingHotelContactsList);
return Result.OK(payMeetingVO);
}
/**
* 导出excel
*/
@RequiresPermissions("otherMeeting:export")
@GetMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, PayMeeting payMeeting) {
payMeeting.setMeetingType(MEETING_TYPE);
IPage<PayMeeting> queryPageList = payMeetingService.queryPageList(payMeeting, -1, -1, request);
List<Object> exportList = payMeetingService.getExportList(request, queryPageList);
Class<?> aClass = payMeetingService.getaClass(MEETING_TYPE);
return super.exportListXls(exportList, aClass, "会议管理");
}
/**
* 上传资料
*/
@AutoLog(value = "上传资料")
@RequiresPermissions("otherMeeting:upload")
@ApiOperation(value = "上传资料", notes = "上传资料")
@PostMapping(value = "/uploadFile")
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MEETING_TYPE, false);
return Result.OK("上传资料成功!",strings);
}
/**
* 上传会议纪要
*/
@AutoLog(value = "上传会议纪要")
@RequiresPermissions("otherMeeting:uploadCouncil")
@ApiOperation(value = "上传会议纪要", notes = "上传会议纪要")
@PostMapping(value = "/uploadCouncilFile")
public Result<?> uploadCouncilFile(@RequestBody UploadFileVO uploadFileVO) {
payMeetingService.uploadFile(uploadFileVO, MEETING_TYPE);
return Result.OK("上传会议纪要成功!");
}
/**
* 发布
*/
@AutoLog("发布")
@RequiresPermissions("otherMeeting:release")
@ApiOperation(value = "发布")
@PostMapping(value = "/release")
public Result<?> release(@RequestBody PublishReminderVO publishReminderVO) {
payMeetingService.release(publishReminderVO);
return Result.OK();
}
}
@@ -0,0 +1,233 @@
package com.jero.meeting.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.aspect.annotation.CompanyNameTranslate;
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.exception.JeroBootException;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator;
import com.jero.common.util.AuthenticationUtils;
import com.jero.common.util.ValidUtil;
import com.jero.company.service.IPayCompanyManagementService;
import com.jero.company.service.IPayContactsManagementService;
import com.jero.meeting.common.MeetingCommon;
import com.jero.meeting.entity.PayMeetingSituation;
import com.jero.meeting.service.IPayMeetingSituationService;
import com.jero.meeting.vo.CheckVO;
import com.jero.meeting.vo.MergePayBillVO;
import com.jero.meeting.vo.PayMeetingSituationVO;
import com.jero.meeting.vo.SetGuestsUploadFileVO;
import com.jero.project.common.PayProjectCommon;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
/**
* @description: 参会人员信息
* @author: jero-boot
* @date: 2021-09-02
* @version: V1.0
*/
@Api(tags = "参会人员信息-功能安全中心会议")
@RestController
@RequestMapping("/meeting/safetyCenterMeetingSituation")
@Slf4j
public class SafetyCenterMeetingSituationController extends JeroController<PayMeetingSituation, IPayMeetingSituationService> {
@Resource
private IPayMeetingSituationService payMeetingSituationService;
@Resource
private AuthenticationUtils authenticationUtils;
@Resource
private IPayContactsManagementService contactsManagementService;
@Resource
private IPayCompanyManagementService companyManagementService;
private final Integer MEETING_TYPE = MeetingCommon.SAFETY_CENTER_MEETING_INT;
/**
* 分页列表查询
*/
@CompanyNameTranslate
@RequiresPermissions("otherMeetingSituation:search")
@ApiOperation(value = "参会人员信息-分页列表查询", notes = "参会人员信息-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(PayMeetingSituation payMeetingSituation,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
String meetingId = payMeetingSituation.getMeetingId();
if (StringUtils.isBlank(meetingId)) {
throw new JeroBootException("会议id不能为空");
}
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, req.getParameterMap());
String particularYear = req.getParameter("particularYear");
if (StringUtils.isNotBlank(particularYear)){
queryWrapper.eq("DATE_FORMAT( ppr.payment_date, '%Y' )",particularYear);
}
Page<PayMeetingSituation> page = new Page<>(pageNo, pageSize);
IPage<PayMeetingSituation> pageList = payMeetingSituationService.pageListContract(meetingId, page, queryWrapper,MEETING_TYPE);
List<PayMeetingSituation> situationList = pageList.getRecords();
for (PayMeetingSituation meetingSituation : situationList) {
Integer payMode = meetingSituation.getPayMode();
//汇款并且缴费凭证为空
if (Objects.equals(payMode,1) && StringUtils.isBlank(meetingSituation.getPaymentRecord())){
meetingSituation.setIdentification(PayProjectCommon.YES);
}else {
meetingSituation.setIdentification(PayProjectCommon.NO);
}
}
return Result.OK(pageList);
}
/**
* 添加参会人
*/
@RequiresPermissions("otherMeetingSituation:add")
@AutoLog(value = "参会人员信息-添加参会人")
@ApiOperation(value = "参会人员信息-添加参会人", notes = "参会人员信息-添加参会人")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody PayMeetingSituation payMeetingSituation) {
payMeetingSituationService.add(payMeetingSituation, MEETING_TYPE);
return Result.OK("添加成功!");
}
/**
* 编辑
*/
@AutoLog(value = "参会人员信息-编辑")
@RequiresPermissions("otherMeetingSituation:edit")
@ApiOperation(value = "参会人员信息-编辑", notes = "参会人员信息-编辑")
@PostMapping(value = "/edit")
public Result<?> edit(@RequestBody PayMeetingSituationVO payMeetingSituationVO) {
payMeetingSituationService.editById(payMeetingSituationVO, MEETING_TYPE);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*/
@RequiresPermissions("otherMeetingSituation:delete")
@AutoLog(value = "参会人员信息-通过id删除")
@ApiOperation(value = "参会人员信息-通过id删除", notes = "参会人员信息-通过id删除")
@GetMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id") String id) {
payMeetingSituationService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*/
@RequiresPermissions("otherMeetingSituation:batchDel")
@AutoLog(value = "参会人员信息-批量删除")
@ApiOperation(value = "参会人员信息-批量删除", notes = "参会人员信息-批量删除")
@GetMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids") String ids) {
this.payMeetingSituationService.deleteByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*/
@CompanyNameTranslate
@DictPoint
@ApiOperation(value = "参会人员信息-通过id查询", notes = "参会人员信息-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id") String id) {
PayMeetingSituation payMeetingSituation = payMeetingSituationService.queryById(id);
if (payMeetingSituation == null) {
return Result.error("未找到对应数据");
}
return Result.OK(payMeetingSituation);
}
/**
* 通过会议id查询自己的参会人信息
*/
@CompanyNameTranslate
@DictPoint
@ApiOperation(value = "参会人员信息-通过会议id查询自己的参会人信息")
@GetMapping(value = "/queryByMeetingId")
public Result<?> queryByMeetingId(@RequestParam(name = "meetingId") String meetingId) {
PayMeetingSituation payMeetingSituation = payMeetingSituationService.queryByMeetingIdAndContactId(meetingId);
if (payMeetingSituation == null) {
return Result.error("未找到对应数据");
}
return Result.OK(payMeetingSituation);
}
/**
* 导出excel
*/
@RequiresPermissions("otherMeetingSituation:export")
@GetMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, PayMeetingSituation payMeetingSituation) {
List<Object> objects = payMeetingSituationService.MeetingSituationGetModelAndView(request, payMeetingSituation,MEETING_TYPE);
Class<?> aClass = payMeetingSituationService.getaClass(MEETING_TYPE);
return super.exportListXls(objects, aClass, "参会人员信息");
}
/**
* 审核缴费凭证
*/
@RequiresPermissions("otherMeetingSituation:auditCredentials")
@AutoLog(value = "审核缴费凭证")
@ApiOperation(value = "审核缴费凭证")
@PostMapping(value = "/check")
public Result<?> check(@RequestBody CheckVO checkVO) {
payMeetingSituationService.check(checkVO);
return Result.OK("审核成功!");
}
/**
* 审核报名信息
*/
@AutoLog(value = "审核报名信息")
@RequiresPermissions("otherMeetingSituation:auditSignUp")
@ApiOperation(value = "审核报名信息")
@PostMapping(value = "/checkRegister")
public Result<?> checkRegister(@RequestBody CheckVO checkVO) {
payMeetingSituationService.checkRegister(checkVO);
return Result.OK("审核成功!");
}
/**
* 合并开票
*/
@AutoLog(value = "合并开票")
@ApiOperation(value = "合并开票", notes = "合并开票")
@PostMapping(value = "/batchPayBill")
public Result<?> mergePayBill(@RequestBody MergePayBillVO mergePayBillVO) {
ValidUtil.validate(mergePayBillVO);
payMeetingSituationService.mergePayBill(mergePayBillVO);
return Result.OK("合并开票成功!");
}
/**
* 设置嘉宾上传文件
*/
@RequiresPermissions("otherMeetingSituation:guestsUploadFileFlag")
@AutoLog(value = "设置嘉宾上传文件")
@ApiOperation(value = "设置嘉宾上传文件", notes = "设置嘉宾上传文件")
@PostMapping(value = "/setGuestsUploadFile")
public Result<?> setGuestsUploadFile(@RequestBody SetGuestsUploadFileVO setGuestsUploadFileVO) {
ValidUtil.validate(setGuestsUploadFileVO);
payMeetingSituationService.setGuestsUploadFile(setGuestsUploadFileVO,MEETING_TYPE);
return Result.OK("设置嘉宾上传文件成功!");
}
}
@@ -1045,6 +1045,8 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
permission = "draftGroupMeeting:search";
}else if (meetingType.equals(MeetingCommon.OVERSEAS_MEETING_INT)) {
permission = "overseasMeeting:search";
}else if (meetingType.equals(MeetingCommon.SAFETY_CENTER_MEETING_INT)) {
permission = "overseasMeeting:search";
}
}
if (StringUtils.isNotBlank(permission)) {
@@ -1421,6 +1423,8 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
classToExport = DraftingGroupMeetingExcel.class;
}else if (meetingType.equals(MeetingCommon.OVERSEAS_MEETING_INT)){
classToExport = OverseasMeetingExcel.class;
}else if (meetingType.equals(MeetingCommon.SAFETY_CENTER_MEETING_INT)){
classToExport = SafetyCenterMeetingExcel.class;
}
return classToExport;
}
@@ -1534,6 +1538,12 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
BeanUtils.copyProperties(payMeetingVO, overseasMeetingExcel);
exportList.add(overseasMeetingExcel);
break;
case MeetingCommon.SAFETY_CENTER_MEETING:
//保存数据
SafetyCenterMeetingExcel safetyCenterMeetingExcel = new SafetyCenterMeetingExcel();
BeanUtils.copyProperties(payMeetingVO, safetyCenterMeetingExcel);
exportList.add(safetyCenterMeetingExcel);
break;
}
}
return exportList;
@@ -0,0 +1,91 @@
package com.jero.meeting.vo.excel;
import com.jero.meeting.entity.PayMeetingContacts;
import com.jero.meeting.entity.PayMeetingHotelContacts;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
import java.math.BigDecimal;
import java.util.List;
/**
* @author liJiaRao
* @date 2021-09-22 14:02
*/
@Data
public class SafetyCenterMeetingExcel {
/**会议名称*/
@Excel(name = "会议名称", width = 15)
private String meetingName;
/**会议类型*/
@Excel(name = "会议类型", width = 15)
private String meetingType;
/**开始时间*/
@Excel(name = "会议开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
private java.util.Date startTime;
/**结束时间*/
@Excel(name = "会议结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
private java.util.Date endTime;
/**年份*/
@Excel(name = "年份", width = 15)
private String particularYear;
/**召开地点*/
@Excel(name = "召开地点", width = 15)
private String venue;
/**详细地址*/
@Excel(name = "详细地址", width = 15)
private String address;
/**预计参加人数*/
@Excel(name = "预计参加人数", width = 15)
private String estimatedNumber;
/**会议内容*/
@Excel(name = "会议内容", width = 15)
private String meetingContent;
/**报名截止时间*/
@Excel(name = "报名截止时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
private java.util.Date registerDeadline;
/**会议费用*/
@Excel(name = "会议费用", width = 15)
private BigDecimal meetingCosts;
/**会议负责人*/
@Excel(name = "会议负责人", width = 15)
private String directorName;
/**会议负责人手机号*/
@Excel(name = "会议负责人手机号", width = 15)
private String directorPhone;
/**酒店名称*/
@Excel(name = "酒店名称", width = 15)
private String hotelName;
/**酒店地址*/
@Excel(name = "酒店地址", width = 15)
private String hotelAddress;
/**
* 会议关联酒店联系人列表
*/
private List<PayMeetingHotelContacts> hotelContactsList;
/**
* 会议联系人列表
*/
@ExcelCollection(name = "会议联系人列表")
private List<PayMeetingContacts> meetingContactsList;
/**备注*/
@Excel(name = "备注", width = 15)
private String remark;
}