update 会议复制5份拆分成五种会议
This commit is contained in:
+489
@@ -0,0 +1,489 @@
|
||||
package com.jero.meeting.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
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.common.util.oConvertUtils;
|
||||
import com.jero.company.service.IPayContactsManagementService;
|
||||
import com.jero.data.entity.PayCaseCommittee;
|
||||
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.meeting.vo.excel.*;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.system.volid.group.UpdateGroup;
|
||||
import com.jero.project.entity.PayWorkingGroup;
|
||||
import com.jero.project.service.IPayWorkingGroupService;
|
||||
import com.jero.standards.xuanguan.stablecrosstraining.entity.StableCrossTraining;
|
||||
import com.jero.util.QrcodeUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
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.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @description: 会议管理
|
||||
* @author: jero-boot
|
||||
* @date: 2021-09-02
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Api(tags = "会议管理-分标委会议")
|
||||
@RestController
|
||||
@RequestMapping("/meeting/committeeMeeting")
|
||||
@Slf4j
|
||||
public class CommitteeMeetingController 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;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@RequiresPermissions("committeeMeeting: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) {
|
||||
QueryWrapper<PayMeeting> queryWrapper = QueryGenerator.initQueryWrapper(payMeeting, req.getParameterMap());
|
||||
String meetingStartTime = req.getParameter("meetingStartTime");
|
||||
String meetingEndTime = req.getParameter("meetingEndTime");
|
||||
if (ObjectUtil.isNotEmpty(meetingStartTime) && ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime).or().lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingStartTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime)
|
||||
);
|
||||
}
|
||||
|
||||
Page<PayMeeting> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeeting> pageList = payMeetingService.page(page, queryWrapper);
|
||||
for (PayMeeting meeting : pageList.getRecords()) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(payMeetingVO, payMeeting);
|
||||
//查询酒店联系人列表
|
||||
if (meeting.getMeetingType().equals(Integer.parseInt(MeetingCommon.STANDARD_MEETING))) {
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
meeting.setHotelContactsList(payMeetingHotelContactsList);
|
||||
}
|
||||
}
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业端-会议-分页列表查询参会人的会议
|
||||
*/
|
||||
@ApiOperation(value = "企业端-会议-分页列表查询参会人的会议")
|
||||
@GetMapping(value = "/pageContract")
|
||||
public Result<?> queryPageListContract(PayMeeting payMeeting,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<PayMeeting> queryWrapper = QueryGenerator.initQueryWrapper(payMeeting, req.getParameterMap());
|
||||
String meetingStartTime = req.getParameter("meetingStartTime");
|
||||
String meetingEndTime = req.getParameter("meetingEndTime");
|
||||
if (ObjectUtil.isNotEmpty(meetingStartTime) && ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime).or().lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingStartTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime)
|
||||
);
|
||||
}
|
||||
String meetingStatus = req.getParameter("meetingStatus");
|
||||
String now = DateUtil.formatDate(new Date());
|
||||
if (StringUtils.isNotBlank(meetingStatus)) {
|
||||
switch (meetingStatus) {
|
||||
case MeetingCommon.MEETING_STATUS_2:
|
||||
queryWrapper.gt("date_format(start_time,'%Y-%m-%d')", now);
|
||||
break;
|
||||
case MeetingCommon.MEETING_STATUS_3:
|
||||
queryWrapper.le("date_format(start_time,'%Y-%m-%d')", now);
|
||||
queryWrapper.ge("date_format(end_time,'%Y-%m-%d')", now);
|
||||
break;
|
||||
case MeetingCommon.MEETING_STATUS_4:
|
||||
queryWrapper.le("date_format(end_time,'%Y-%m-%d')", now);
|
||||
break;
|
||||
}
|
||||
}
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String id = sysUser.getId();
|
||||
|
||||
//会议报名状态:1可报名/2已报名
|
||||
String meetingSignUpType = req.getParameter("meetingSignUpType");
|
||||
if (Objects.equals(meetingSignUpType,1+"")) {
|
||||
queryWrapper.eq("pmrr.contact_id",id);
|
||||
}else if (Objects.equals(meetingSignUpType,2+"")) {
|
||||
queryWrapper.eq("pms.company_contact_id",id);
|
||||
}else {
|
||||
queryWrapper.and(
|
||||
a -> a.eq("pms.company_contact_id",id)
|
||||
.or()
|
||||
.eq("pms.post_contact_id",id)
|
||||
.or()
|
||||
.eq("pmrr.contact_id",id)
|
||||
);
|
||||
}
|
||||
|
||||
Page<PayMeeting> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeeting> pageList = payMeetingService.pageListContract(page, queryWrapper, now);
|
||||
for (PayMeeting meeting : pageList.getRecords()) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(payMeetingVO, payMeeting);
|
||||
}
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@RequiresPermissions("committeeMeeting:search")
|
||||
@ApiOperation(value = "会议管理-列表查询", notes = "会议管理-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PayMeeting>> queryList() {
|
||||
List<PayMeeting> list = payMeetingService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@RequiresPermissions("committeeMeeting:add")
|
||||
@AutoLog(value = "会议管理-添加")
|
||||
@ApiOperation(value = "会议管理-添加", notes = "会议管理-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody PayMeetingVO payMeetingVO) {
|
||||
ValidUtil.validate(payMeetingVO);
|
||||
payMeetingService.add(payMeetingVO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@RequiresPermissions("committeeMeeting:edit")
|
||||
@AutoLog(value = "会议管理-编辑")
|
||||
@ApiOperation(value = "会议管理-编辑", notes = "会议管理-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody PayMeetingVO payMeetingVO) {
|
||||
ValidUtil.validate(payMeetingVO, UpdateGroup.class);
|
||||
payMeetingService.editById(payMeetingVO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
@RequiresPermissions("committeeMeeting:delete")
|
||||
@AutoLog(value = "会议管理-通过id删除")
|
||||
@ApiOperation(value = "会议管理-通过id删除", notes = "会议管理-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name = "id") String id) {
|
||||
payMeetingService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
@RequiresPermissions("committeeMeeting:batchDel")
|
||||
@AutoLog(value = "会议管理-批量删除")
|
||||
@ApiOperation(value = "会议管理-批量删除", notes = "会议管理-批量删除")
|
||||
@GetMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids") String ids) {
|
||||
this.payMeetingService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
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) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
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<>());
|
||||
//标协会议查询酒店联系人列表
|
||||
if (meetingType.equals(MeetingCommon.STANDARD_MEETING)) {
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
payMeetingVO.setHotelContactsList(payMeetingHotelContactsList);
|
||||
//标协会议类型
|
||||
//String tbMeetingType = meeting.getTbMeetingType().toString();
|
||||
//String type = sysBaseApi.translateDict("standard_meeting_type", tbMeetingType);
|
||||
//payMeetingVO.setTbMeetingType(type);
|
||||
// 工作组项目查询工作组项目名
|
||||
} else if (meetingType.equals(MeetingCommon.WORKING_GROUP_MEETING)) {
|
||||
String workingGroupId = meeting.getWorkingGroupId();
|
||||
PayWorkingGroup workingGroup = payWorkingGroupService.getById(workingGroupId);
|
||||
payMeetingVO.setWorkingGroupName(workingGroup.getWorkingGroupProject());
|
||||
}
|
||||
return Result.OK(payMeetingVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
@RequiresPermissions("committeeMeeting:export")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PayMeeting payMeeting) {
|
||||
QueryWrapper<PayMeeting> queryWrapper = QueryGenerator.initQueryWrapper(payMeeting, request.getParameterMap());
|
||||
List<PayMeeting> pageList = payMeetingService.list(queryWrapper);
|
||||
List<Object> exportList = new ArrayList<>();
|
||||
// 过滤选中数据
|
||||
String selections = request.getParameter("selections");
|
||||
if (oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
|
||||
}
|
||||
if (pageList.isEmpty()) {
|
||||
throw new JeroBootException("没有数据");
|
||||
}
|
||||
String meetingType = pageList.get(0).getMeetingType().toString();
|
||||
for (PayMeeting meeting : pageList) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(meeting, payMeetingVO);
|
||||
meetingType = meeting.getMeetingType().toString();
|
||||
String meetingType1 = sysBaseApi.translateDict("meeting_type", meetingType);
|
||||
payMeetingVO.setMeetingType(meetingType1);
|
||||
payMeetingVO.setHotelContactsList(new ArrayList<>());
|
||||
//标协会议查询酒店联系人列表
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
payMeetingVO.setHotelContactsList(payMeetingHotelContactsList);
|
||||
//标协会议类型
|
||||
String tbMeetingType = meeting.getTbMeetingType().toString();
|
||||
String type = sysBaseApi.translateDict("standard_meeting_type", tbMeetingType);
|
||||
payMeetingVO.setTbMeetingType(type);
|
||||
//保存数据
|
||||
StandardsMeetingExcel standardsMeetingExcel = new StandardsMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, standardsMeetingExcel);
|
||||
exportList.add(standardsMeetingExcel);
|
||||
// 工作组项目查询工作组项目名
|
||||
break;
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
String workingGroupId = meeting.getWorkingGroupId();
|
||||
PayWorkingGroup workingGroup = payWorkingGroupService.getById(workingGroupId);
|
||||
payMeetingVO.setWorkingGroupName(workingGroup.getWorkingGroupProject());
|
||||
//保存数据
|
||||
WorkingGroupMeetingExcel workingGroupMeetingExcel = new WorkingGroupMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, workingGroupMeetingExcel);
|
||||
exportList.add(workingGroupMeetingExcel);
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
//保存数据
|
||||
InternationalMeetingExcel internationalMeetingExcel = new InternationalMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, internationalMeetingExcel);
|
||||
exportList.add(internationalMeetingExcel);
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
//保存数据
|
||||
OtherMeetingExcel otherMeetingExcel = new OtherMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, otherMeetingExcel);
|
||||
exportList.add(otherMeetingExcel);
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
String caseCommitteeId = meeting.getCaseCommitteeId();
|
||||
PayCaseCommittee payCaseCommittee = payCaseCommitteeService.getById(caseCommitteeId);
|
||||
payMeetingVO.setCaseCommitteeName(payCaseCommittee.getName());
|
||||
|
||||
CommitteeMeetingExcel committeeMeetingExcel = new CommitteeMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, committeeMeetingExcel);
|
||||
exportList.add(committeeMeetingExcel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Class<?> classToExport = null;
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
classToExport = WorkingGroupMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
classToExport = StandardsMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
classToExport = InternationalMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
classToExport = OtherMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
classToExport = CommitteeMeetingExcel.class;
|
||||
break;
|
||||
}
|
||||
return super.exportListXls(exportList, classToExport, "会议管理");
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传资料
|
||||
*/
|
||||
@AutoLog(value = "上传资料")
|
||||
@RequiresPermissions("committeeMeeting:upload")
|
||||
@ApiOperation(value = "上传资料", notes = "上传资料")
|
||||
@PostMapping(value = "/uploadFile")
|
||||
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
||||
String fileIds = uploadFileVO.getFileIds();
|
||||
String id = uploadFileVO.getId();
|
||||
LambdaUpdateWrapper<PayMeeting> wrapper = new LambdaUpdateWrapper<>();
|
||||
wrapper.eq(PayMeeting::getId, id);
|
||||
wrapper.set(PayMeeting::getMeetingData, fileIds);
|
||||
payMeetingService.update(wrapper);
|
||||
PayMeeting payMeeting = payMeetingService.getById(id);
|
||||
if (payMeeting.getMeetingType().equals(Integer.parseInt(MeetingCommon.STANDARD_MEETING))) {
|
||||
List<String> idList = Arrays.asList(fileIds.split(","));
|
||||
List<OSSFile> ossFiles = iossFileService.listByIds(idList);
|
||||
for (OSSFile ossFile : ossFiles) {
|
||||
String url = ossFile.getUrl();
|
||||
String[] fileUrl = url.split("/");
|
||||
int length = fileUrl.length;
|
||||
ossFile.setFileName(fileUrl[length - 1]);
|
||||
}
|
||||
AuthenticationUtils.post("/stablecrosstraining/stableCrossTraining/addStandardsFile", null, ossFiles);
|
||||
StableCrossTraining stableCrossTraining = new StableCrossTraining();
|
||||
stableCrossTraining.setId(id);
|
||||
stableCrossTraining.setMeetingFiles(fileIds);
|
||||
AuthenticationUtils.post("/stablecrosstraining/stableCrossTraining/updateStandardsFile", null, stableCrossTraining);
|
||||
}
|
||||
return Result.OK("上传资料成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布提醒
|
||||
*/
|
||||
@AutoLog("发布提醒")
|
||||
@RequiresPermissions("committeeMeeting:publish")
|
||||
@ApiOperation(value = "发布提醒", notes = "发布提醒")
|
||||
@PostMapping(value = "/publishReminder")
|
||||
public Result<?> publishReminder(@RequestBody PublishReminderVO publishReminderVO) {
|
||||
payMeetingService.publishReminder(publishReminderVO);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "生成base64")
|
||||
@GetMapping(value = "/createBase64")
|
||||
@ApiImplicitParam(name = "contact", value = "内容", required = true, paramType = "query")
|
||||
public Result<String> createBase64(String contact) {
|
||||
return Result.OK(QrcodeUtil.create(contact));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增标协会议
|
||||
*/
|
||||
@ApiOperation(value = "新增标协会议")
|
||||
@PostMapping(value = "/addStandards")
|
||||
public Result<?> addStandards(@RequestBody PayMeeting payMeeting, HttpServletRequest request) {
|
||||
String publicKey = request.getParameter("publicKey");
|
||||
String token = request.getParameter("token");
|
||||
authenticationUtils.check(token, publicKey);
|
||||
|
||||
payMeetingService.addStandards(payMeeting);
|
||||
return Result.OK("合并开票成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会议文件
|
||||
*/
|
||||
@ApiOperation(value = "新增会议文件", notes = "新增会议文件")
|
||||
@PostMapping(value = "/addStandardsFile")
|
||||
public Result<?> addStandardsFile(@RequestBody List<OSSFile> ossFileList, HttpServletRequest request) {
|
||||
String publicKey = request.getParameter("publicKey");
|
||||
String token = request.getParameter("token");
|
||||
authenticationUtils.check(token, publicKey);
|
||||
for (OSSFile ossFile : ossFileList) {
|
||||
iossFileService.saveOrUpdate(ossFile);
|
||||
}
|
||||
return Result.OK("新增会议文件成功!");
|
||||
}
|
||||
|
||||
}
|
||||
+367
@@ -0,0 +1,367 @@
|
||||
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.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.PasswordUtil;
|
||||
import com.jero.common.util.ValidUtil;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.company.entity.PayCompanyManagement;
|
||||
import com.jero.company.entity.PayContactsManagement;
|
||||
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.*;
|
||||
import com.jero.meeting.vo.excel.*;
|
||||
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.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.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @description: 参会人员信息
|
||||
* @author: jero-boot
|
||||
* @date: 2021-09-02
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Api(tags = "参会人员信息")
|
||||
@RestController
|
||||
@RequestMapping("/meeting/committeeMeetingSituation")
|
||||
@Slf4j
|
||||
public class CommitteeMeetingSituationController extends JeroController<PayMeetingSituation, IPayMeetingSituationService> {
|
||||
@Resource
|
||||
private IPayMeetingSituationService payMeetingSituationService;
|
||||
@Resource
|
||||
private AuthenticationUtils authenticationUtils;
|
||||
@Resource
|
||||
private IPayContactsManagementService contactsManagementService;
|
||||
@Resource
|
||||
private IPayCompanyManagementService companyManagementService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@RequiresPermissions("committeeMeetingSituation: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) {
|
||||
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, req.getParameterMap());
|
||||
Page<PayMeetingSituation> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeetingSituation> pageList = payMeetingSituationService.page(page, queryWrapper);
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 合同查询未关联参会人列表
|
||||
*/
|
||||
@ApiOperation(value = "合同查询未关联参会人列表", notes = "合同查询未关联参会人列表")
|
||||
@GetMapping(value = "/contractPage")
|
||||
public Result<?> contractPage(MeetingSituationContractVO meetingSituationContractVO,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<MeetingSituationContractVO> page = new Page<>(pageNo, pageSize);
|
||||
IPage<MeetingSituationContractVO> pageList = payMeetingSituationService.contractPage(page, meetingSituationContractVO);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询 会员系统系统
|
||||
*/
|
||||
@ApiOperation(value = "参会人员信息-分页列表查询 会员系统系统", notes = "参会人员信息-分页列表查询")
|
||||
@GetMapping(value = "/page2")
|
||||
public Result<?> queryPageList2(PayMeetingSituation payMeetingSituation,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
String publicKey = req.getParameter("publicKey");
|
||||
String token = req.getParameter("token");
|
||||
authenticationUtils.check(token, publicKey);
|
||||
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, req.getParameterMap());
|
||||
Page<PayMeetingSituation> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeetingSituation> pageList = payMeetingSituationService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@ApiOperation(value = "参会人员信息-列表查询", notes = "参会人员信息-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PayMeetingSituation>> queryList() {
|
||||
List<PayMeetingSituation> list = payMeetingSituationService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加参会人
|
||||
*/
|
||||
@RequiresPermissions("committeeMeetingSituation:add")
|
||||
@AutoLog(value = "参会人员信息-添加参会人")
|
||||
@ApiOperation(value = "参会人员信息-添加参会人", notes = "参会人员信息-添加参会人")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody PayMeetingSituation payMeetingSituation) {
|
||||
payMeetingSituationService.add(payMeetingSituation);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 报名
|
||||
*/
|
||||
@AutoLog(value = "报名信息-报名")
|
||||
@ApiOperation(value = "报名信息-报名", notes = "报名信息-报名")
|
||||
@PostMapping(value = "/signUp")
|
||||
public Result<?> signUp(@RequestBody PayMeetingSituation payMeetingSituation) {
|
||||
payMeetingSituationService.signUp(payMeetingSituation);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@AutoLog(value = "参会人员信息-编辑")
|
||||
@RequiresPermissions("committeeMeetingSituation:edit")
|
||||
@ApiOperation(value = "参会人员信息-编辑", notes = "参会人员信息-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody PayMeetingSituationVO payMeetingSituationVO) {
|
||||
payMeetingSituationService.editById(payMeetingSituationVO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
@RequiresPermissions("committeeMeetingSituation: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("committeeMeetingSituation: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查询
|
||||
*/
|
||||
@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查询自己的参会人信息
|
||||
*/
|
||||
@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("committeeMeetingSituation:export")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PayMeetingSituation payMeetingSituation) {
|
||||
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, request.getParameterMap());
|
||||
List<PayMeetingSituation> pageList = payMeetingSituationService.list(queryWrapper);
|
||||
// 过滤选中数据
|
||||
String selections = request.getParameter("selections");
|
||||
if (oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
|
||||
}
|
||||
if (pageList.isEmpty()) {
|
||||
throw new JeroBootException("没有数据");
|
||||
}
|
||||
String meetingType = payMeetingSituationService.getMeetingType(payMeetingSituation);
|
||||
List<Object> exportList = new ArrayList<>();
|
||||
for (PayMeetingSituation meetingSituation : pageList) {
|
||||
|
||||
String companyContactId = meetingSituation.getCompanyContactId();
|
||||
PayContactsManagement contactsManagement = contactsManagementService.getById(companyContactId);
|
||||
meetingSituation.setCompanyContactName(contactsManagement.getName());
|
||||
meetingSituation.setPost(contactsManagement.getPost());
|
||||
meetingSituation.setPhone(PasswordUtil.decrypt(contactsManagement.getPhone()));
|
||||
meetingSituation.setEmail(PasswordUtil.decrypt(contactsManagement.getEmail()));
|
||||
PayCompanyManagement companyManagement = companyManagementService.getById(contactsManagement.getCompanyId());
|
||||
meetingSituation.setCompanyName(companyManagement.getCompanyName());
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
//保存数据
|
||||
StandardsSituationExcel standardsSituationExcel = new StandardsSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, standardsSituationExcel);
|
||||
exportList.add(standardsSituationExcel);
|
||||
// 工作组项目查询工作组项目名
|
||||
break;
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
//保存数据
|
||||
WorkingGroupSituationExcel workingGroupSituationExcel = new WorkingGroupSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, workingGroupSituationExcel);
|
||||
exportList.add(workingGroupSituationExcel);
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
//保存数据
|
||||
InternationalSituationExcel internationalSituationExcel = new InternationalSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, internationalSituationExcel);
|
||||
exportList.add(internationalSituationExcel);
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
//保存数据
|
||||
SituationExcel situationExcel = new SituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, situationExcel);
|
||||
exportList.add(situationExcel);
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
//保存数据
|
||||
CommitteeSituationExcel committeeSituationExcel = new CommitteeSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, committeeSituationExcel);
|
||||
exportList.add(committeeSituationExcel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Class<?> classToExport = null;
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
classToExport = WorkingGroupSituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
classToExport = StandardsSituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
classToExport = InternationalSituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
classToExport = SituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
classToExport = CommitteeSituationExcel.class;
|
||||
break;
|
||||
}
|
||||
return super.exportListXls(exportList, classToExport, "参会人员信息");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置对接人
|
||||
*/
|
||||
@RequiresPermissions("committeeMeetingSituation:batchSetDocker")
|
||||
@AutoLog(value = "设置对接人")
|
||||
@ApiOperation(value = "设置对接人", notes = "设置对接人")
|
||||
@PostMapping(value = "/addDock")
|
||||
public Result<?> addDock(@RequestBody AddDockVO addDockVO) {
|
||||
payMeetingSituationService.addDock(addDockVO);
|
||||
return Result.OK("设置对接人成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核付款凭证
|
||||
*/
|
||||
@RequiresPermissions("committeeMeetingSituation:auditCredentials")
|
||||
@AutoLog(value = "审核付款凭证")
|
||||
@ApiOperation(value = "审核付款凭证")
|
||||
@PostMapping(value = "/check")
|
||||
public Result<?> check(@RequestBody CheckVO checkVO) {
|
||||
payMeetingSituationService.check(checkVO);
|
||||
return Result.OK("审核成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核报名信息
|
||||
*/
|
||||
@AutoLog(value = "审核报名信息")
|
||||
@RequiresPermissions("committeeMeetingSituation: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("合并开票成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 签到
|
||||
*/
|
||||
@AutoLog(value = "签到")
|
||||
@ApiOperation(value = "签到")
|
||||
@PostMapping(value = "/signIn")
|
||||
public Result<?> signIn(@RequestBody SignInVO signInVO) {
|
||||
ValidUtil.validate(signInVO);
|
||||
payMeetingSituationService.signIn(signInVO);
|
||||
return Result.OK("签到成功!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+489
@@ -0,0 +1,489 @@
|
||||
package com.jero.meeting.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
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.common.util.oConvertUtils;
|
||||
import com.jero.company.service.IPayContactsManagementService;
|
||||
import com.jero.data.entity.PayCaseCommittee;
|
||||
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.meeting.vo.excel.*;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.system.volid.group.UpdateGroup;
|
||||
import com.jero.project.entity.PayWorkingGroup;
|
||||
import com.jero.project.service.IPayWorkingGroupService;
|
||||
import com.jero.standards.xuanguan.stablecrosstraining.entity.StableCrossTraining;
|
||||
import com.jero.util.QrcodeUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
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.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @description: 会议管理
|
||||
* @author: jero-boot
|
||||
* @date: 2021-09-02
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Api(tags = "会议管理-国际研讨会")
|
||||
@RestController
|
||||
@RequestMapping("/meeting/internalMeeting")
|
||||
@Slf4j
|
||||
public class InternalMeetingController 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;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@RequiresPermissions("internalMeeting: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) {
|
||||
QueryWrapper<PayMeeting> queryWrapper = QueryGenerator.initQueryWrapper(payMeeting, req.getParameterMap());
|
||||
String meetingStartTime = req.getParameter("meetingStartTime");
|
||||
String meetingEndTime = req.getParameter("meetingEndTime");
|
||||
if (ObjectUtil.isNotEmpty(meetingStartTime) && ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime).or().lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingStartTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime)
|
||||
);
|
||||
}
|
||||
|
||||
Page<PayMeeting> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeeting> pageList = payMeetingService.page(page, queryWrapper);
|
||||
for (PayMeeting meeting : pageList.getRecords()) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(payMeetingVO, payMeeting);
|
||||
//查询酒店联系人列表
|
||||
if (meeting.getMeetingType().equals(Integer.parseInt(MeetingCommon.STANDARD_MEETING))) {
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
meeting.setHotelContactsList(payMeetingHotelContactsList);
|
||||
}
|
||||
}
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业端-会议-分页列表查询参会人的会议
|
||||
*/
|
||||
@ApiOperation(value = "企业端-会议-分页列表查询参会人的会议")
|
||||
@GetMapping(value = "/pageContract")
|
||||
public Result<?> queryPageListContract(PayMeeting payMeeting,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<PayMeeting> queryWrapper = QueryGenerator.initQueryWrapper(payMeeting, req.getParameterMap());
|
||||
String meetingStartTime = req.getParameter("meetingStartTime");
|
||||
String meetingEndTime = req.getParameter("meetingEndTime");
|
||||
if (ObjectUtil.isNotEmpty(meetingStartTime) && ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime).or().lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingStartTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime)
|
||||
);
|
||||
}
|
||||
String meetingStatus = req.getParameter("meetingStatus");
|
||||
String now = DateUtil.formatDate(new Date());
|
||||
if (StringUtils.isNotBlank(meetingStatus)) {
|
||||
switch (meetingStatus) {
|
||||
case MeetingCommon.MEETING_STATUS_2:
|
||||
queryWrapper.gt("date_format(start_time,'%Y-%m-%d')", now);
|
||||
break;
|
||||
case MeetingCommon.MEETING_STATUS_3:
|
||||
queryWrapper.le("date_format(start_time,'%Y-%m-%d')", now);
|
||||
queryWrapper.ge("date_format(end_time,'%Y-%m-%d')", now);
|
||||
break;
|
||||
case MeetingCommon.MEETING_STATUS_4:
|
||||
queryWrapper.le("date_format(end_time,'%Y-%m-%d')", now);
|
||||
break;
|
||||
}
|
||||
}
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String id = sysUser.getId();
|
||||
|
||||
//会议报名状态:1可报名/2已报名
|
||||
String meetingSignUpType = req.getParameter("meetingSignUpType");
|
||||
if (Objects.equals(meetingSignUpType,1+"")) {
|
||||
queryWrapper.eq("pmrr.contact_id",id);
|
||||
}else if (Objects.equals(meetingSignUpType,2+"")) {
|
||||
queryWrapper.eq("pms.company_contact_id",id);
|
||||
}else {
|
||||
queryWrapper.and(
|
||||
a -> a.eq("pms.company_contact_id",id)
|
||||
.or()
|
||||
.eq("pms.post_contact_id",id)
|
||||
.or()
|
||||
.eq("pmrr.contact_id",id)
|
||||
);
|
||||
}
|
||||
|
||||
Page<PayMeeting> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeeting> pageList = payMeetingService.pageListContract(page, queryWrapper, now);
|
||||
for (PayMeeting meeting : pageList.getRecords()) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(payMeetingVO, payMeeting);
|
||||
}
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@RequiresPermissions("internalMeeting:search")
|
||||
@ApiOperation(value = "会议管理-列表查询", notes = "会议管理-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PayMeeting>> queryList() {
|
||||
List<PayMeeting> list = payMeetingService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@RequiresPermissions("internalMeeting:add")
|
||||
@AutoLog(value = "会议管理-添加")
|
||||
@ApiOperation(value = "会议管理-添加", notes = "会议管理-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody PayMeetingVO payMeetingVO) {
|
||||
ValidUtil.validate(payMeetingVO);
|
||||
payMeetingService.add(payMeetingVO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@RequiresPermissions("internalMeeting:edit")
|
||||
@AutoLog(value = "会议管理-编辑")
|
||||
@ApiOperation(value = "会议管理-编辑", notes = "会议管理-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody PayMeetingVO payMeetingVO) {
|
||||
ValidUtil.validate(payMeetingVO, UpdateGroup.class);
|
||||
payMeetingService.editById(payMeetingVO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
@RequiresPermissions("internalMeeting:delete")
|
||||
@AutoLog(value = "会议管理-通过id删除")
|
||||
@ApiOperation(value = "会议管理-通过id删除", notes = "会议管理-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name = "id") String id) {
|
||||
payMeetingService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
@RequiresPermissions("internalMeeting:batchDel")
|
||||
@AutoLog(value = "会议管理-批量删除")
|
||||
@ApiOperation(value = "会议管理-批量删除", notes = "会议管理-批量删除")
|
||||
@GetMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids") String ids) {
|
||||
this.payMeetingService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
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) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
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<>());
|
||||
//标协会议查询酒店联系人列表
|
||||
if (meetingType.equals(MeetingCommon.STANDARD_MEETING)) {
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
payMeetingVO.setHotelContactsList(payMeetingHotelContactsList);
|
||||
//标协会议类型
|
||||
//String tbMeetingType = meeting.getTbMeetingType().toString();
|
||||
//String type = sysBaseApi.translateDict("standard_meeting_type", tbMeetingType);
|
||||
//payMeetingVO.setTbMeetingType(type);
|
||||
// 工作组项目查询工作组项目名
|
||||
} else if (meetingType.equals(MeetingCommon.WORKING_GROUP_MEETING)) {
|
||||
String workingGroupId = meeting.getWorkingGroupId();
|
||||
PayWorkingGroup workingGroup = payWorkingGroupService.getById(workingGroupId);
|
||||
payMeetingVO.setWorkingGroupName(workingGroup.getWorkingGroupProject());
|
||||
}
|
||||
return Result.OK(payMeetingVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
@RequiresPermissions("internalMeeting:export")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PayMeeting payMeeting) {
|
||||
QueryWrapper<PayMeeting> queryWrapper = QueryGenerator.initQueryWrapper(payMeeting, request.getParameterMap());
|
||||
List<PayMeeting> pageList = payMeetingService.list(queryWrapper);
|
||||
List<Object> exportList = new ArrayList<>();
|
||||
// 过滤选中数据
|
||||
String selections = request.getParameter("selections");
|
||||
if (oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
|
||||
}
|
||||
if (pageList.isEmpty()) {
|
||||
throw new JeroBootException("没有数据");
|
||||
}
|
||||
String meetingType = pageList.get(0).getMeetingType().toString();
|
||||
for (PayMeeting meeting : pageList) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(meeting, payMeetingVO);
|
||||
meetingType = meeting.getMeetingType().toString();
|
||||
String meetingType1 = sysBaseApi.translateDict("meeting_type", meetingType);
|
||||
payMeetingVO.setMeetingType(meetingType1);
|
||||
payMeetingVO.setHotelContactsList(new ArrayList<>());
|
||||
//标协会议查询酒店联系人列表
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
payMeetingVO.setHotelContactsList(payMeetingHotelContactsList);
|
||||
//标协会议类型
|
||||
String tbMeetingType = meeting.getTbMeetingType().toString();
|
||||
String type = sysBaseApi.translateDict("standard_meeting_type", tbMeetingType);
|
||||
payMeetingVO.setTbMeetingType(type);
|
||||
//保存数据
|
||||
StandardsMeetingExcel standardsMeetingExcel = new StandardsMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, standardsMeetingExcel);
|
||||
exportList.add(standardsMeetingExcel);
|
||||
// 工作组项目查询工作组项目名
|
||||
break;
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
String workingGroupId = meeting.getWorkingGroupId();
|
||||
PayWorkingGroup workingGroup = payWorkingGroupService.getById(workingGroupId);
|
||||
payMeetingVO.setWorkingGroupName(workingGroup.getWorkingGroupProject());
|
||||
//保存数据
|
||||
WorkingGroupMeetingExcel workingGroupMeetingExcel = new WorkingGroupMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, workingGroupMeetingExcel);
|
||||
exportList.add(workingGroupMeetingExcel);
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
//保存数据
|
||||
InternationalMeetingExcel internationalMeetingExcel = new InternationalMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, internationalMeetingExcel);
|
||||
exportList.add(internationalMeetingExcel);
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
//保存数据
|
||||
OtherMeetingExcel otherMeetingExcel = new OtherMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, otherMeetingExcel);
|
||||
exportList.add(otherMeetingExcel);
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
String caseCommitteeId = meeting.getCaseCommitteeId();
|
||||
PayCaseCommittee payCaseCommittee = payCaseCommitteeService.getById(caseCommitteeId);
|
||||
payMeetingVO.setCaseCommitteeName(payCaseCommittee.getName());
|
||||
|
||||
CommitteeMeetingExcel committeeMeetingExcel = new CommitteeMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, committeeMeetingExcel);
|
||||
exportList.add(committeeMeetingExcel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Class<?> classToExport = null;
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
classToExport = WorkingGroupMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
classToExport = StandardsMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
classToExport = InternationalMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
classToExport = OtherMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
classToExport = CommitteeMeetingExcel.class;
|
||||
break;
|
||||
}
|
||||
return super.exportListXls(exportList, classToExport, "会议管理");
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传资料
|
||||
*/
|
||||
@AutoLog(value = "上传资料")
|
||||
@RequiresPermissions("internalMeeting:upload")
|
||||
@ApiOperation(value = "上传资料", notes = "上传资料")
|
||||
@PostMapping(value = "/uploadFile")
|
||||
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
||||
String fileIds = uploadFileVO.getFileIds();
|
||||
String id = uploadFileVO.getId();
|
||||
LambdaUpdateWrapper<PayMeeting> wrapper = new LambdaUpdateWrapper<>();
|
||||
wrapper.eq(PayMeeting::getId, id);
|
||||
wrapper.set(PayMeeting::getMeetingData, fileIds);
|
||||
payMeetingService.update(wrapper);
|
||||
PayMeeting payMeeting = payMeetingService.getById(id);
|
||||
if (payMeeting.getMeetingType().equals(Integer.parseInt(MeetingCommon.STANDARD_MEETING))) {
|
||||
List<String> idList = Arrays.asList(fileIds.split(","));
|
||||
List<OSSFile> ossFiles = iossFileService.listByIds(idList);
|
||||
for (OSSFile ossFile : ossFiles) {
|
||||
String url = ossFile.getUrl();
|
||||
String[] fileUrl = url.split("/");
|
||||
int length = fileUrl.length;
|
||||
ossFile.setFileName(fileUrl[length - 1]);
|
||||
}
|
||||
AuthenticationUtils.post("/stablecrosstraining/stableCrossTraining/addStandardsFile", null, ossFiles);
|
||||
StableCrossTraining stableCrossTraining = new StableCrossTraining();
|
||||
stableCrossTraining.setId(id);
|
||||
stableCrossTraining.setMeetingFiles(fileIds);
|
||||
AuthenticationUtils.post("/stablecrosstraining/stableCrossTraining/updateStandardsFile", null, stableCrossTraining);
|
||||
}
|
||||
return Result.OK("上传资料成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布提醒
|
||||
*/
|
||||
@AutoLog("发布提醒")
|
||||
@RequiresPermissions("internalMeeting:publish")
|
||||
@ApiOperation(value = "发布提醒", notes = "发布提醒")
|
||||
@PostMapping(value = "/publishReminder")
|
||||
public Result<?> publishReminder(@RequestBody PublishReminderVO publishReminderVO) {
|
||||
payMeetingService.publishReminder(publishReminderVO);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "生成base64")
|
||||
@GetMapping(value = "/createBase64")
|
||||
@ApiImplicitParam(name = "contact", value = "内容", required = true, paramType = "query")
|
||||
public Result<String> createBase64(String contact) {
|
||||
return Result.OK(QrcodeUtil.create(contact));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增标协会议
|
||||
*/
|
||||
@ApiOperation(value = "新增标协会议")
|
||||
@PostMapping(value = "/addStandards")
|
||||
public Result<?> addStandards(@RequestBody PayMeeting payMeeting, HttpServletRequest request) {
|
||||
String publicKey = request.getParameter("publicKey");
|
||||
String token = request.getParameter("token");
|
||||
authenticationUtils.check(token, publicKey);
|
||||
|
||||
payMeetingService.addStandards(payMeeting);
|
||||
return Result.OK("合并开票成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会议文件
|
||||
*/
|
||||
@ApiOperation(value = "新增会议文件", notes = "新增会议文件")
|
||||
@PostMapping(value = "/addStandardsFile")
|
||||
public Result<?> addStandardsFile(@RequestBody List<OSSFile> ossFileList, HttpServletRequest request) {
|
||||
String publicKey = request.getParameter("publicKey");
|
||||
String token = request.getParameter("token");
|
||||
authenticationUtils.check(token, publicKey);
|
||||
for (OSSFile ossFile : ossFileList) {
|
||||
iossFileService.saveOrUpdate(ossFile);
|
||||
}
|
||||
return Result.OK("新增会议文件成功!");
|
||||
}
|
||||
|
||||
}
|
||||
+367
@@ -0,0 +1,367 @@
|
||||
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.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.PasswordUtil;
|
||||
import com.jero.common.util.ValidUtil;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.company.entity.PayCompanyManagement;
|
||||
import com.jero.company.entity.PayContactsManagement;
|
||||
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.*;
|
||||
import com.jero.meeting.vo.excel.*;
|
||||
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.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.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @description: 参会人员信息
|
||||
* @author: jero-boot
|
||||
* @date: 2021-09-02
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Api(tags = "参会人员信息")
|
||||
@RestController
|
||||
@RequestMapping("/meeting/internalMeetingSituation")
|
||||
@Slf4j
|
||||
public class InternalMeetingSituationController extends JeroController<PayMeetingSituation, IPayMeetingSituationService> {
|
||||
@Resource
|
||||
private IPayMeetingSituationService payMeetingSituationService;
|
||||
@Resource
|
||||
private AuthenticationUtils authenticationUtils;
|
||||
@Resource
|
||||
private IPayContactsManagementService contactsManagementService;
|
||||
@Resource
|
||||
private IPayCompanyManagementService companyManagementService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@RequiresPermissions("internalMeetingSituation: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) {
|
||||
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, req.getParameterMap());
|
||||
Page<PayMeetingSituation> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeetingSituation> pageList = payMeetingSituationService.page(page, queryWrapper);
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 合同查询未关联参会人列表
|
||||
*/
|
||||
@ApiOperation(value = "合同查询未关联参会人列表", notes = "合同查询未关联参会人列表")
|
||||
@GetMapping(value = "/contractPage")
|
||||
public Result<?> contractPage(MeetingSituationContractVO meetingSituationContractVO,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<MeetingSituationContractVO> page = new Page<>(pageNo, pageSize);
|
||||
IPage<MeetingSituationContractVO> pageList = payMeetingSituationService.contractPage(page, meetingSituationContractVO);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询 会员系统系统
|
||||
*/
|
||||
@ApiOperation(value = "参会人员信息-分页列表查询 会员系统系统", notes = "参会人员信息-分页列表查询")
|
||||
@GetMapping(value = "/page2")
|
||||
public Result<?> queryPageList2(PayMeetingSituation payMeetingSituation,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
String publicKey = req.getParameter("publicKey");
|
||||
String token = req.getParameter("token");
|
||||
authenticationUtils.check(token, publicKey);
|
||||
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, req.getParameterMap());
|
||||
Page<PayMeetingSituation> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeetingSituation> pageList = payMeetingSituationService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@ApiOperation(value = "参会人员信息-列表查询", notes = "参会人员信息-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PayMeetingSituation>> queryList() {
|
||||
List<PayMeetingSituation> list = payMeetingSituationService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加参会人
|
||||
*/
|
||||
@RequiresPermissions("internalMeetingSituation:add")
|
||||
@AutoLog(value = "参会人员信息-添加参会人")
|
||||
@ApiOperation(value = "参会人员信息-添加参会人", notes = "参会人员信息-添加参会人")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody PayMeetingSituation payMeetingSituation) {
|
||||
payMeetingSituationService.add(payMeetingSituation);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 报名
|
||||
*/
|
||||
@AutoLog(value = "报名信息-报名")
|
||||
@ApiOperation(value = "报名信息-报名", notes = "报名信息-报名")
|
||||
@PostMapping(value = "/signUp")
|
||||
public Result<?> signUp(@RequestBody PayMeetingSituation payMeetingSituation) {
|
||||
payMeetingSituationService.signUp(payMeetingSituation);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@AutoLog(value = "参会人员信息-编辑")
|
||||
@RequiresPermissions("internalMeetingSituation:edit")
|
||||
@ApiOperation(value = "参会人员信息-编辑", notes = "参会人员信息-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody PayMeetingSituationVO payMeetingSituationVO) {
|
||||
payMeetingSituationService.editById(payMeetingSituationVO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
@RequiresPermissions("internalMeetingSituation: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("internalMeetingSituation: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查询
|
||||
*/
|
||||
@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查询自己的参会人信息
|
||||
*/
|
||||
@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("internalMeetingSituation:export")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PayMeetingSituation payMeetingSituation) {
|
||||
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, request.getParameterMap());
|
||||
List<PayMeetingSituation> pageList = payMeetingSituationService.list(queryWrapper);
|
||||
// 过滤选中数据
|
||||
String selections = request.getParameter("selections");
|
||||
if (oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
|
||||
}
|
||||
if (pageList.isEmpty()) {
|
||||
throw new JeroBootException("没有数据");
|
||||
}
|
||||
String meetingType = payMeetingSituationService.getMeetingType(payMeetingSituation);
|
||||
List<Object> exportList = new ArrayList<>();
|
||||
for (PayMeetingSituation meetingSituation : pageList) {
|
||||
|
||||
String companyContactId = meetingSituation.getCompanyContactId();
|
||||
PayContactsManagement contactsManagement = contactsManagementService.getById(companyContactId);
|
||||
meetingSituation.setCompanyContactName(contactsManagement.getName());
|
||||
meetingSituation.setPost(contactsManagement.getPost());
|
||||
meetingSituation.setPhone(PasswordUtil.decrypt(contactsManagement.getPhone()));
|
||||
meetingSituation.setEmail(PasswordUtil.decrypt(contactsManagement.getEmail()));
|
||||
PayCompanyManagement companyManagement = companyManagementService.getById(contactsManagement.getCompanyId());
|
||||
meetingSituation.setCompanyName(companyManagement.getCompanyName());
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
//保存数据
|
||||
StandardsSituationExcel standardsSituationExcel = new StandardsSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, standardsSituationExcel);
|
||||
exportList.add(standardsSituationExcel);
|
||||
// 工作组项目查询工作组项目名
|
||||
break;
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
//保存数据
|
||||
WorkingGroupSituationExcel workingGroupSituationExcel = new WorkingGroupSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, workingGroupSituationExcel);
|
||||
exportList.add(workingGroupSituationExcel);
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
//保存数据
|
||||
InternationalSituationExcel internationalSituationExcel = new InternationalSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, internationalSituationExcel);
|
||||
exportList.add(internationalSituationExcel);
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
//保存数据
|
||||
SituationExcel situationExcel = new SituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, situationExcel);
|
||||
exportList.add(situationExcel);
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
//保存数据
|
||||
CommitteeSituationExcel committeeSituationExcel = new CommitteeSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, committeeSituationExcel);
|
||||
exportList.add(committeeSituationExcel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Class<?> classToExport = null;
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
classToExport = WorkingGroupSituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
classToExport = StandardsSituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
classToExport = InternationalSituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
classToExport = SituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
classToExport = CommitteeSituationExcel.class;
|
||||
break;
|
||||
}
|
||||
return super.exportListXls(exportList, classToExport, "参会人员信息");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置对接人
|
||||
*/
|
||||
@RequiresPermissions("internalMeetingSituation:batchSetDocker")
|
||||
@AutoLog(value = "设置对接人")
|
||||
@ApiOperation(value = "设置对接人", notes = "设置对接人")
|
||||
@PostMapping(value = "/addDock")
|
||||
public Result<?> addDock(@RequestBody AddDockVO addDockVO) {
|
||||
payMeetingSituationService.addDock(addDockVO);
|
||||
return Result.OK("设置对接人成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核付款凭证
|
||||
*/
|
||||
@RequiresPermissions("internalMeetingSituation:auditCredentials")
|
||||
@AutoLog(value = "审核付款凭证")
|
||||
@ApiOperation(value = "审核付款凭证")
|
||||
@PostMapping(value = "/check")
|
||||
public Result<?> check(@RequestBody CheckVO checkVO) {
|
||||
payMeetingSituationService.check(checkVO);
|
||||
return Result.OK("审核成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核报名信息
|
||||
*/
|
||||
@AutoLog(value = "审核报名信息")
|
||||
@RequiresPermissions("internalMeetingSituation: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("合并开票成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 签到
|
||||
*/
|
||||
@AutoLog(value = "签到")
|
||||
@ApiOperation(value = "签到")
|
||||
@PostMapping(value = "/signIn")
|
||||
public Result<?> signIn(@RequestBody SignInVO signInVO) {
|
||||
ValidUtil.validate(signInVO);
|
||||
payMeetingSituationService.signIn(signInVO);
|
||||
return Result.OK("签到成功!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+489
@@ -0,0 +1,489 @@
|
||||
package com.jero.meeting.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
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.common.util.oConvertUtils;
|
||||
import com.jero.company.service.IPayContactsManagementService;
|
||||
import com.jero.data.entity.PayCaseCommittee;
|
||||
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.meeting.vo.excel.*;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.system.volid.group.UpdateGroup;
|
||||
import com.jero.project.entity.PayWorkingGroup;
|
||||
import com.jero.project.service.IPayWorkingGroupService;
|
||||
import com.jero.standards.xuanguan.stablecrosstraining.entity.StableCrossTraining;
|
||||
import com.jero.util.QrcodeUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
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.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @description: 会议管理
|
||||
* @author: jero-boot
|
||||
* @date: 2021-09-02
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Api(tags = "会议管理-其他会议")
|
||||
@RestController
|
||||
@RequestMapping("/meeting/otherMeeting")
|
||||
@Slf4j
|
||||
public class OtherMeetingController 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;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@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) {
|
||||
QueryWrapper<PayMeeting> queryWrapper = QueryGenerator.initQueryWrapper(payMeeting, req.getParameterMap());
|
||||
String meetingStartTime = req.getParameter("meetingStartTime");
|
||||
String meetingEndTime = req.getParameter("meetingEndTime");
|
||||
if (ObjectUtil.isNotEmpty(meetingStartTime) && ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime).or().lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingStartTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime)
|
||||
);
|
||||
}
|
||||
|
||||
Page<PayMeeting> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeeting> pageList = payMeetingService.page(page, queryWrapper);
|
||||
for (PayMeeting meeting : pageList.getRecords()) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(payMeetingVO, payMeeting);
|
||||
//查询酒店联系人列表
|
||||
if (meeting.getMeetingType().equals(Integer.parseInt(MeetingCommon.STANDARD_MEETING))) {
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
meeting.setHotelContactsList(payMeetingHotelContactsList);
|
||||
}
|
||||
}
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业端-会议-分页列表查询参会人的会议
|
||||
*/
|
||||
@ApiOperation(value = "企业端-会议-分页列表查询参会人的会议")
|
||||
@GetMapping(value = "/pageContract")
|
||||
public Result<?> queryPageListContract(PayMeeting payMeeting,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<PayMeeting> queryWrapper = QueryGenerator.initQueryWrapper(payMeeting, req.getParameterMap());
|
||||
String meetingStartTime = req.getParameter("meetingStartTime");
|
||||
String meetingEndTime = req.getParameter("meetingEndTime");
|
||||
if (ObjectUtil.isNotEmpty(meetingStartTime) && ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime).or().lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingStartTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime)
|
||||
);
|
||||
}
|
||||
String meetingStatus = req.getParameter("meetingStatus");
|
||||
String now = DateUtil.formatDate(new Date());
|
||||
if (StringUtils.isNotBlank(meetingStatus)) {
|
||||
switch (meetingStatus) {
|
||||
case MeetingCommon.MEETING_STATUS_2:
|
||||
queryWrapper.gt("date_format(start_time,'%Y-%m-%d')", now);
|
||||
break;
|
||||
case MeetingCommon.MEETING_STATUS_3:
|
||||
queryWrapper.le("date_format(start_time,'%Y-%m-%d')", now);
|
||||
queryWrapper.ge("date_format(end_time,'%Y-%m-%d')", now);
|
||||
break;
|
||||
case MeetingCommon.MEETING_STATUS_4:
|
||||
queryWrapper.le("date_format(end_time,'%Y-%m-%d')", now);
|
||||
break;
|
||||
}
|
||||
}
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String id = sysUser.getId();
|
||||
|
||||
//会议报名状态:1可报名/2已报名
|
||||
String meetingSignUpType = req.getParameter("meetingSignUpType");
|
||||
if (Objects.equals(meetingSignUpType,1+"")) {
|
||||
queryWrapper.eq("pmrr.contact_id",id);
|
||||
}else if (Objects.equals(meetingSignUpType,2+"")) {
|
||||
queryWrapper.eq("pms.company_contact_id",id);
|
||||
}else {
|
||||
queryWrapper.and(
|
||||
a -> a.eq("pms.company_contact_id",id)
|
||||
.or()
|
||||
.eq("pms.post_contact_id",id)
|
||||
.or()
|
||||
.eq("pmrr.contact_id",id)
|
||||
);
|
||||
}
|
||||
|
||||
Page<PayMeeting> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeeting> pageList = payMeetingService.pageListContract(page, queryWrapper, now);
|
||||
for (PayMeeting meeting : pageList.getRecords()) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(payMeetingVO, payMeeting);
|
||||
}
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@RequiresPermissions("otherMeeting:search")
|
||||
@ApiOperation(value = "会议管理-列表查询", notes = "会议管理-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PayMeeting>> queryList() {
|
||||
List<PayMeeting> list = payMeetingService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@RequiresPermissions("otherMeeting:add")
|
||||
@AutoLog(value = "会议管理-添加")
|
||||
@ApiOperation(value = "会议管理-添加", notes = "会议管理-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody PayMeetingVO payMeetingVO) {
|
||||
ValidUtil.validate(payMeetingVO);
|
||||
payMeetingService.add(payMeetingVO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@RequiresPermissions("otherMeeting:edit")
|
||||
@AutoLog(value = "会议管理-编辑")
|
||||
@ApiOperation(value = "会议管理-编辑", notes = "会议管理-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody PayMeetingVO payMeetingVO) {
|
||||
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) {
|
||||
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) {
|
||||
this.payMeetingService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
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) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
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<>());
|
||||
//标协会议查询酒店联系人列表
|
||||
if (meetingType.equals(MeetingCommon.STANDARD_MEETING)) {
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
payMeetingVO.setHotelContactsList(payMeetingHotelContactsList);
|
||||
//标协会议类型
|
||||
//String tbMeetingType = meeting.getTbMeetingType().toString();
|
||||
//String type = sysBaseApi.translateDict("standard_meeting_type", tbMeetingType);
|
||||
//payMeetingVO.setTbMeetingType(type);
|
||||
// 工作组项目查询工作组项目名
|
||||
} else if (meetingType.equals(MeetingCommon.WORKING_GROUP_MEETING)) {
|
||||
String workingGroupId = meeting.getWorkingGroupId();
|
||||
PayWorkingGroup workingGroup = payWorkingGroupService.getById(workingGroupId);
|
||||
payMeetingVO.setWorkingGroupName(workingGroup.getWorkingGroupProject());
|
||||
}
|
||||
return Result.OK(payMeetingVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
@RequiresPermissions("otherMeeting:export")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PayMeeting payMeeting) {
|
||||
QueryWrapper<PayMeeting> queryWrapper = QueryGenerator.initQueryWrapper(payMeeting, request.getParameterMap());
|
||||
List<PayMeeting> pageList = payMeetingService.list(queryWrapper);
|
||||
List<Object> exportList = new ArrayList<>();
|
||||
// 过滤选中数据
|
||||
String selections = request.getParameter("selections");
|
||||
if (oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
|
||||
}
|
||||
if (pageList.isEmpty()) {
|
||||
throw new JeroBootException("没有数据");
|
||||
}
|
||||
String meetingType = pageList.get(0).getMeetingType().toString();
|
||||
for (PayMeeting meeting : pageList) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(meeting, payMeetingVO);
|
||||
meetingType = meeting.getMeetingType().toString();
|
||||
String meetingType1 = sysBaseApi.translateDict("meeting_type", meetingType);
|
||||
payMeetingVO.setMeetingType(meetingType1);
|
||||
payMeetingVO.setHotelContactsList(new ArrayList<>());
|
||||
//标协会议查询酒店联系人列表
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
payMeetingVO.setHotelContactsList(payMeetingHotelContactsList);
|
||||
//标协会议类型
|
||||
String tbMeetingType = meeting.getTbMeetingType().toString();
|
||||
String type = sysBaseApi.translateDict("standard_meeting_type", tbMeetingType);
|
||||
payMeetingVO.setTbMeetingType(type);
|
||||
//保存数据
|
||||
StandardsMeetingExcel standardsMeetingExcel = new StandardsMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, standardsMeetingExcel);
|
||||
exportList.add(standardsMeetingExcel);
|
||||
// 工作组项目查询工作组项目名
|
||||
break;
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
String workingGroupId = meeting.getWorkingGroupId();
|
||||
PayWorkingGroup workingGroup = payWorkingGroupService.getById(workingGroupId);
|
||||
payMeetingVO.setWorkingGroupName(workingGroup.getWorkingGroupProject());
|
||||
//保存数据
|
||||
WorkingGroupMeetingExcel workingGroupMeetingExcel = new WorkingGroupMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, workingGroupMeetingExcel);
|
||||
exportList.add(workingGroupMeetingExcel);
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
//保存数据
|
||||
InternationalMeetingExcel internationalMeetingExcel = new InternationalMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, internationalMeetingExcel);
|
||||
exportList.add(internationalMeetingExcel);
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
//保存数据
|
||||
OtherMeetingExcel otherMeetingExcel = new OtherMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, otherMeetingExcel);
|
||||
exportList.add(otherMeetingExcel);
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
String caseCommitteeId = meeting.getCaseCommitteeId();
|
||||
PayCaseCommittee payCaseCommittee = payCaseCommitteeService.getById(caseCommitteeId);
|
||||
payMeetingVO.setCaseCommitteeName(payCaseCommittee.getName());
|
||||
|
||||
CommitteeMeetingExcel committeeMeetingExcel = new CommitteeMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, committeeMeetingExcel);
|
||||
exportList.add(committeeMeetingExcel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Class<?> classToExport = null;
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
classToExport = WorkingGroupMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
classToExport = StandardsMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
classToExport = InternationalMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
classToExport = OtherMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
classToExport = CommitteeMeetingExcel.class;
|
||||
break;
|
||||
}
|
||||
return super.exportListXls(exportList, classToExport, "会议管理");
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传资料
|
||||
*/
|
||||
@AutoLog(value = "上传资料")
|
||||
@RequiresPermissions("otherMeeting:upload")
|
||||
@ApiOperation(value = "上传资料", notes = "上传资料")
|
||||
@PostMapping(value = "/uploadFile")
|
||||
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
||||
String fileIds = uploadFileVO.getFileIds();
|
||||
String id = uploadFileVO.getId();
|
||||
LambdaUpdateWrapper<PayMeeting> wrapper = new LambdaUpdateWrapper<>();
|
||||
wrapper.eq(PayMeeting::getId, id);
|
||||
wrapper.set(PayMeeting::getMeetingData, fileIds);
|
||||
payMeetingService.update(wrapper);
|
||||
PayMeeting payMeeting = payMeetingService.getById(id);
|
||||
if (payMeeting.getMeetingType().equals(Integer.parseInt(MeetingCommon.STANDARD_MEETING))) {
|
||||
List<String> idList = Arrays.asList(fileIds.split(","));
|
||||
List<OSSFile> ossFiles = iossFileService.listByIds(idList);
|
||||
for (OSSFile ossFile : ossFiles) {
|
||||
String url = ossFile.getUrl();
|
||||
String[] fileUrl = url.split("/");
|
||||
int length = fileUrl.length;
|
||||
ossFile.setFileName(fileUrl[length - 1]);
|
||||
}
|
||||
AuthenticationUtils.post("/stablecrosstraining/stableCrossTraining/addStandardsFile", null, ossFiles);
|
||||
StableCrossTraining stableCrossTraining = new StableCrossTraining();
|
||||
stableCrossTraining.setId(id);
|
||||
stableCrossTraining.setMeetingFiles(fileIds);
|
||||
AuthenticationUtils.post("/stablecrosstraining/stableCrossTraining/updateStandardsFile", null, stableCrossTraining);
|
||||
}
|
||||
return Result.OK("上传资料成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布提醒
|
||||
*/
|
||||
@AutoLog("发布提醒")
|
||||
@RequiresPermissions("otherMeeting:publish")
|
||||
@ApiOperation(value = "发布提醒", notes = "发布提醒")
|
||||
@PostMapping(value = "/publishReminder")
|
||||
public Result<?> publishReminder(@RequestBody PublishReminderVO publishReminderVO) {
|
||||
payMeetingService.publishReminder(publishReminderVO);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "生成base64")
|
||||
@GetMapping(value = "/createBase64")
|
||||
@ApiImplicitParam(name = "contact", value = "内容", required = true, paramType = "query")
|
||||
public Result<String> createBase64(String contact) {
|
||||
return Result.OK(QrcodeUtil.create(contact));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增标协会议
|
||||
*/
|
||||
@ApiOperation(value = "新增标协会议")
|
||||
@PostMapping(value = "/addStandards")
|
||||
public Result<?> addStandards(@RequestBody PayMeeting payMeeting, HttpServletRequest request) {
|
||||
String publicKey = request.getParameter("publicKey");
|
||||
String token = request.getParameter("token");
|
||||
authenticationUtils.check(token, publicKey);
|
||||
|
||||
payMeetingService.addStandards(payMeeting);
|
||||
return Result.OK("合并开票成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会议文件
|
||||
*/
|
||||
@ApiOperation(value = "新增会议文件", notes = "新增会议文件")
|
||||
@PostMapping(value = "/addStandardsFile")
|
||||
public Result<?> addStandardsFile(@RequestBody List<OSSFile> ossFileList, HttpServletRequest request) {
|
||||
String publicKey = request.getParameter("publicKey");
|
||||
String token = request.getParameter("token");
|
||||
authenticationUtils.check(token, publicKey);
|
||||
for (OSSFile ossFile : ossFileList) {
|
||||
iossFileService.saveOrUpdate(ossFile);
|
||||
}
|
||||
return Result.OK("新增会议文件成功!");
|
||||
}
|
||||
|
||||
}
|
||||
+367
@@ -0,0 +1,367 @@
|
||||
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.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.PasswordUtil;
|
||||
import com.jero.common.util.ValidUtil;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.company.entity.PayCompanyManagement;
|
||||
import com.jero.company.entity.PayContactsManagement;
|
||||
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.*;
|
||||
import com.jero.meeting.vo.excel.*;
|
||||
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.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.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @description: 参会人员信息
|
||||
* @author: jero-boot
|
||||
* @date: 2021-09-02
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Api(tags = "参会人员信息")
|
||||
@RestController
|
||||
@RequestMapping("/meeting/ohterMeetingSituation")
|
||||
@Slf4j
|
||||
public class OtherMeetingSituationController extends JeroController<PayMeetingSituation, IPayMeetingSituationService> {
|
||||
@Resource
|
||||
private IPayMeetingSituationService payMeetingSituationService;
|
||||
@Resource
|
||||
private AuthenticationUtils authenticationUtils;
|
||||
@Resource
|
||||
private IPayContactsManagementService contactsManagementService;
|
||||
@Resource
|
||||
private IPayCompanyManagementService companyManagementService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@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) {
|
||||
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, req.getParameterMap());
|
||||
Page<PayMeetingSituation> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeetingSituation> pageList = payMeetingSituationService.page(page, queryWrapper);
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 合同查询未关联参会人列表
|
||||
*/
|
||||
@ApiOperation(value = "合同查询未关联参会人列表", notes = "合同查询未关联参会人列表")
|
||||
@GetMapping(value = "/contractPage")
|
||||
public Result<?> contractPage(MeetingSituationContractVO meetingSituationContractVO,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<MeetingSituationContractVO> page = new Page<>(pageNo, pageSize);
|
||||
IPage<MeetingSituationContractVO> pageList = payMeetingSituationService.contractPage(page, meetingSituationContractVO);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询 会员系统系统
|
||||
*/
|
||||
@ApiOperation(value = "参会人员信息-分页列表查询 会员系统系统", notes = "参会人员信息-分页列表查询")
|
||||
@GetMapping(value = "/page2")
|
||||
public Result<?> queryPageList2(PayMeetingSituation payMeetingSituation,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
String publicKey = req.getParameter("publicKey");
|
||||
String token = req.getParameter("token");
|
||||
authenticationUtils.check(token, publicKey);
|
||||
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, req.getParameterMap());
|
||||
Page<PayMeetingSituation> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeetingSituation> pageList = payMeetingSituationService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@ApiOperation(value = "参会人员信息-列表查询", notes = "参会人员信息-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PayMeetingSituation>> queryList() {
|
||||
List<PayMeetingSituation> list = payMeetingSituationService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加参会人
|
||||
*/
|
||||
@RequiresPermissions("otherMeetingSituation::add")
|
||||
@AutoLog(value = "参会人员信息-添加参会人")
|
||||
@ApiOperation(value = "参会人员信息-添加参会人", notes = "参会人员信息-添加参会人")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody PayMeetingSituation payMeetingSituation) {
|
||||
payMeetingSituationService.add(payMeetingSituation);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 报名
|
||||
*/
|
||||
@AutoLog(value = "报名信息-报名")
|
||||
@ApiOperation(value = "报名信息-报名", notes = "报名信息-报名")
|
||||
@PostMapping(value = "/signUp")
|
||||
public Result<?> signUp(@RequestBody PayMeetingSituation payMeetingSituation) {
|
||||
payMeetingSituationService.signUp(payMeetingSituation);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@AutoLog(value = "参会人员信息-编辑")
|
||||
@RequiresPermissions("otherMeetingSituation::edit")
|
||||
@ApiOperation(value = "参会人员信息-编辑", notes = "参会人员信息-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody PayMeetingSituationVO payMeetingSituationVO) {
|
||||
payMeetingSituationService.editById(payMeetingSituationVO);
|
||||
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查询
|
||||
*/
|
||||
@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查询自己的参会人信息
|
||||
*/
|
||||
@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) {
|
||||
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, request.getParameterMap());
|
||||
List<PayMeetingSituation> pageList = payMeetingSituationService.list(queryWrapper);
|
||||
// 过滤选中数据
|
||||
String selections = request.getParameter("selections");
|
||||
if (oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
|
||||
}
|
||||
if (pageList.isEmpty()) {
|
||||
throw new JeroBootException("没有数据");
|
||||
}
|
||||
String meetingType = payMeetingSituationService.getMeetingType(payMeetingSituation);
|
||||
List<Object> exportList = new ArrayList<>();
|
||||
for (PayMeetingSituation meetingSituation : pageList) {
|
||||
|
||||
String companyContactId = meetingSituation.getCompanyContactId();
|
||||
PayContactsManagement contactsManagement = contactsManagementService.getById(companyContactId);
|
||||
meetingSituation.setCompanyContactName(contactsManagement.getName());
|
||||
meetingSituation.setPost(contactsManagement.getPost());
|
||||
meetingSituation.setPhone(PasswordUtil.decrypt(contactsManagement.getPhone()));
|
||||
meetingSituation.setEmail(PasswordUtil.decrypt(contactsManagement.getEmail()));
|
||||
PayCompanyManagement companyManagement = companyManagementService.getById(contactsManagement.getCompanyId());
|
||||
meetingSituation.setCompanyName(companyManagement.getCompanyName());
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
//保存数据
|
||||
StandardsSituationExcel standardsSituationExcel = new StandardsSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, standardsSituationExcel);
|
||||
exportList.add(standardsSituationExcel);
|
||||
// 工作组项目查询工作组项目名
|
||||
break;
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
//保存数据
|
||||
WorkingGroupSituationExcel workingGroupSituationExcel = new WorkingGroupSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, workingGroupSituationExcel);
|
||||
exportList.add(workingGroupSituationExcel);
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
//保存数据
|
||||
InternationalSituationExcel internationalSituationExcel = new InternationalSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, internationalSituationExcel);
|
||||
exportList.add(internationalSituationExcel);
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
//保存数据
|
||||
SituationExcel situationExcel = new SituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, situationExcel);
|
||||
exportList.add(situationExcel);
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
//保存数据
|
||||
CommitteeSituationExcel committeeSituationExcel = new CommitteeSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, committeeSituationExcel);
|
||||
exportList.add(committeeSituationExcel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Class<?> classToExport = null;
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
classToExport = WorkingGroupSituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
classToExport = StandardsSituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
classToExport = InternationalSituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
classToExport = SituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
classToExport = CommitteeSituationExcel.class;
|
||||
break;
|
||||
}
|
||||
return super.exportListXls(exportList, classToExport, "参会人员信息");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置对接人
|
||||
*/
|
||||
@RequiresPermissions("otherMeetingSituation::batchSetDocker")
|
||||
@AutoLog(value = "设置对接人")
|
||||
@ApiOperation(value = "设置对接人", notes = "设置对接人")
|
||||
@PostMapping(value = "/addDock")
|
||||
public Result<?> addDock(@RequestBody AddDockVO addDockVO) {
|
||||
payMeetingSituationService.addDock(addDockVO);
|
||||
return Result.OK("设置对接人成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核付款凭证
|
||||
*/
|
||||
@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("合并开票成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 签到
|
||||
*/
|
||||
@AutoLog(value = "签到")
|
||||
@ApiOperation(value = "签到")
|
||||
@PostMapping(value = "/signIn")
|
||||
public Result<?> signIn(@RequestBody SignInVO signInVO) {
|
||||
ValidUtil.validate(signInVO);
|
||||
payMeetingSituationService.signIn(signInVO);
|
||||
return Result.OK("签到成功!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+1
-1
@@ -86,7 +86,7 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@RequiresPermissions({"meeting:search","meeting:search"})
|
||||
@RequiresPermissions("meeting:search")
|
||||
@ApiOperation(value = "会议管理-分页列表查询", notes = "会议管理-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(PayMeeting payMeeting,
|
||||
|
||||
+489
@@ -0,0 +1,489 @@
|
||||
package com.jero.meeting.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
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.common.util.oConvertUtils;
|
||||
import com.jero.company.service.IPayContactsManagementService;
|
||||
import com.jero.data.entity.PayCaseCommittee;
|
||||
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.meeting.vo.excel.*;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.system.volid.group.UpdateGroup;
|
||||
import com.jero.project.entity.PayWorkingGroup;
|
||||
import com.jero.project.service.IPayWorkingGroupService;
|
||||
import com.jero.standards.xuanguan.stablecrosstraining.entity.StableCrossTraining;
|
||||
import com.jero.util.QrcodeUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
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.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @description: 会议管理
|
||||
* @author: jero-boot
|
||||
* @date: 2021-09-02
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Api(tags = "会议管理-标协会议")
|
||||
@RestController
|
||||
@RequestMapping("/meeting/standardsMeeting")
|
||||
@Slf4j
|
||||
public class StandardsMeetingController 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;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@RequiresPermissions("standardsMeeting: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) {
|
||||
QueryWrapper<PayMeeting> queryWrapper = QueryGenerator.initQueryWrapper(payMeeting, req.getParameterMap());
|
||||
String meetingStartTime = req.getParameter("meetingStartTime");
|
||||
String meetingEndTime = req.getParameter("meetingEndTime");
|
||||
if (ObjectUtil.isNotEmpty(meetingStartTime) && ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime).or().lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingStartTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime)
|
||||
);
|
||||
}
|
||||
|
||||
Page<PayMeeting> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeeting> pageList = payMeetingService.page(page, queryWrapper);
|
||||
for (PayMeeting meeting : pageList.getRecords()) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(payMeetingVO, payMeeting);
|
||||
//查询酒店联系人列表
|
||||
if (meeting.getMeetingType().equals(Integer.parseInt(MeetingCommon.STANDARD_MEETING))) {
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
meeting.setHotelContactsList(payMeetingHotelContactsList);
|
||||
}
|
||||
}
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业端-会议-分页列表查询参会人的会议
|
||||
*/
|
||||
@ApiOperation(value = "企业端-会议-分页列表查询参会人的会议")
|
||||
@GetMapping(value = "/pageContract")
|
||||
public Result<?> queryPageListContract(PayMeeting payMeeting,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<PayMeeting> queryWrapper = QueryGenerator.initQueryWrapper(payMeeting, req.getParameterMap());
|
||||
String meetingStartTime = req.getParameter("meetingStartTime");
|
||||
String meetingEndTime = req.getParameter("meetingEndTime");
|
||||
if (ObjectUtil.isNotEmpty(meetingStartTime) && ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime).or().lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingStartTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime)
|
||||
);
|
||||
}
|
||||
String meetingStatus = req.getParameter("meetingStatus");
|
||||
String now = DateUtil.formatDate(new Date());
|
||||
if (StringUtils.isNotBlank(meetingStatus)) {
|
||||
switch (meetingStatus) {
|
||||
case MeetingCommon.MEETING_STATUS_2:
|
||||
queryWrapper.gt("date_format(start_time,'%Y-%m-%d')", now);
|
||||
break;
|
||||
case MeetingCommon.MEETING_STATUS_3:
|
||||
queryWrapper.le("date_format(start_time,'%Y-%m-%d')", now);
|
||||
queryWrapper.ge("date_format(end_time,'%Y-%m-%d')", now);
|
||||
break;
|
||||
case MeetingCommon.MEETING_STATUS_4:
|
||||
queryWrapper.le("date_format(end_time,'%Y-%m-%d')", now);
|
||||
break;
|
||||
}
|
||||
}
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String id = sysUser.getId();
|
||||
|
||||
//会议报名状态:1可报名/2已报名
|
||||
String meetingSignUpType = req.getParameter("meetingSignUpType");
|
||||
if (Objects.equals(meetingSignUpType,1+"")) {
|
||||
queryWrapper.eq("pmrr.contact_id",id);
|
||||
}else if (Objects.equals(meetingSignUpType,2+"")) {
|
||||
queryWrapper.eq("pms.company_contact_id",id);
|
||||
}else {
|
||||
queryWrapper.and(
|
||||
a -> a.eq("pms.company_contact_id",id)
|
||||
.or()
|
||||
.eq("pms.post_contact_id",id)
|
||||
.or()
|
||||
.eq("pmrr.contact_id",id)
|
||||
);
|
||||
}
|
||||
|
||||
Page<PayMeeting> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeeting> pageList = payMeetingService.pageListContract(page, queryWrapper, now);
|
||||
for (PayMeeting meeting : pageList.getRecords()) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(payMeetingVO, payMeeting);
|
||||
}
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@RequiresPermissions("standardsMeeting:search")
|
||||
@ApiOperation(value = "会议管理-列表查询", notes = "会议管理-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PayMeeting>> queryList() {
|
||||
List<PayMeeting> list = payMeetingService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@RequiresPermissions("standardsMeeting:add")
|
||||
@AutoLog(value = "会议管理-添加")
|
||||
@ApiOperation(value = "会议管理-添加", notes = "会议管理-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody PayMeetingVO payMeetingVO) {
|
||||
ValidUtil.validate(payMeetingVO);
|
||||
payMeetingService.add(payMeetingVO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@RequiresPermissions("standardsMeeting:edit")
|
||||
@AutoLog(value = "会议管理-编辑")
|
||||
@ApiOperation(value = "会议管理-编辑", notes = "会议管理-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody PayMeetingVO payMeetingVO) {
|
||||
ValidUtil.validate(payMeetingVO, UpdateGroup.class);
|
||||
payMeetingService.editById(payMeetingVO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
@RequiresPermissions("standardsMeeting:delete")
|
||||
@AutoLog(value = "会议管理-通过id删除")
|
||||
@ApiOperation(value = "会议管理-通过id删除", notes = "会议管理-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name = "id") String id) {
|
||||
payMeetingService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
@RequiresPermissions("standardsMeeting:batchDel")
|
||||
@AutoLog(value = "会议管理-批量删除")
|
||||
@ApiOperation(value = "会议管理-批量删除", notes = "会议管理-批量删除")
|
||||
@GetMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids") String ids) {
|
||||
this.payMeetingService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
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) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
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<>());
|
||||
//标协会议查询酒店联系人列表
|
||||
if (meetingType.equals(MeetingCommon.STANDARD_MEETING)) {
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
payMeetingVO.setHotelContactsList(payMeetingHotelContactsList);
|
||||
//标协会议类型
|
||||
//String tbMeetingType = meeting.getTbMeetingType().toString();
|
||||
//String type = sysBaseApi.translateDict("standard_meeting_type", tbMeetingType);
|
||||
//payMeetingVO.setTbMeetingType(type);
|
||||
// 工作组项目查询工作组项目名
|
||||
} else if (meetingType.equals(MeetingCommon.WORKING_GROUP_MEETING)) {
|
||||
String workingGroupId = meeting.getWorkingGroupId();
|
||||
PayWorkingGroup workingGroup = payWorkingGroupService.getById(workingGroupId);
|
||||
payMeetingVO.setWorkingGroupName(workingGroup.getWorkingGroupProject());
|
||||
}
|
||||
return Result.OK(payMeetingVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
@RequiresPermissions("standardsMeeting:export")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PayMeeting payMeeting) {
|
||||
QueryWrapper<PayMeeting> queryWrapper = QueryGenerator.initQueryWrapper(payMeeting, request.getParameterMap());
|
||||
List<PayMeeting> pageList = payMeetingService.list(queryWrapper);
|
||||
List<Object> exportList = new ArrayList<>();
|
||||
// 过滤选中数据
|
||||
String selections = request.getParameter("selections");
|
||||
if (oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
|
||||
}
|
||||
if (pageList.isEmpty()) {
|
||||
throw new JeroBootException("没有数据");
|
||||
}
|
||||
String meetingType = pageList.get(0).getMeetingType().toString();
|
||||
for (PayMeeting meeting : pageList) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(meeting, payMeetingVO);
|
||||
meetingType = meeting.getMeetingType().toString();
|
||||
String meetingType1 = sysBaseApi.translateDict("meeting_type", meetingType);
|
||||
payMeetingVO.setMeetingType(meetingType1);
|
||||
payMeetingVO.setHotelContactsList(new ArrayList<>());
|
||||
//标协会议查询酒店联系人列表
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
payMeetingVO.setHotelContactsList(payMeetingHotelContactsList);
|
||||
//标协会议类型
|
||||
String tbMeetingType = meeting.getTbMeetingType().toString();
|
||||
String type = sysBaseApi.translateDict("standard_meeting_type", tbMeetingType);
|
||||
payMeetingVO.setTbMeetingType(type);
|
||||
//保存数据
|
||||
StandardsMeetingExcel standardsMeetingExcel = new StandardsMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, standardsMeetingExcel);
|
||||
exportList.add(standardsMeetingExcel);
|
||||
// 工作组项目查询工作组项目名
|
||||
break;
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
String workingGroupId = meeting.getWorkingGroupId();
|
||||
PayWorkingGroup workingGroup = payWorkingGroupService.getById(workingGroupId);
|
||||
payMeetingVO.setWorkingGroupName(workingGroup.getWorkingGroupProject());
|
||||
//保存数据
|
||||
WorkingGroupMeetingExcel workingGroupMeetingExcel = new WorkingGroupMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, workingGroupMeetingExcel);
|
||||
exportList.add(workingGroupMeetingExcel);
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
//保存数据
|
||||
InternationalMeetingExcel internationalMeetingExcel = new InternationalMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, internationalMeetingExcel);
|
||||
exportList.add(internationalMeetingExcel);
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
//保存数据
|
||||
OtherMeetingExcel otherMeetingExcel = new OtherMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, otherMeetingExcel);
|
||||
exportList.add(otherMeetingExcel);
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
String caseCommitteeId = meeting.getCaseCommitteeId();
|
||||
PayCaseCommittee payCaseCommittee = payCaseCommitteeService.getById(caseCommitteeId);
|
||||
payMeetingVO.setCaseCommitteeName(payCaseCommittee.getName());
|
||||
|
||||
CommitteeMeetingExcel committeeMeetingExcel = new CommitteeMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, committeeMeetingExcel);
|
||||
exportList.add(committeeMeetingExcel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Class<?> classToExport = null;
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
classToExport = WorkingGroupMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
classToExport = StandardsMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
classToExport = InternationalMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
classToExport = OtherMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
classToExport = CommitteeMeetingExcel.class;
|
||||
break;
|
||||
}
|
||||
return super.exportListXls(exportList, classToExport, "会议管理");
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传资料
|
||||
*/
|
||||
@AutoLog(value = "上传资料")
|
||||
@RequiresPermissions("standardsMeeting:upload")
|
||||
@ApiOperation(value = "上传资料", notes = "上传资料")
|
||||
@PostMapping(value = "/uploadFile")
|
||||
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
||||
String fileIds = uploadFileVO.getFileIds();
|
||||
String id = uploadFileVO.getId();
|
||||
LambdaUpdateWrapper<PayMeeting> wrapper = new LambdaUpdateWrapper<>();
|
||||
wrapper.eq(PayMeeting::getId, id);
|
||||
wrapper.set(PayMeeting::getMeetingData, fileIds);
|
||||
payMeetingService.update(wrapper);
|
||||
PayMeeting payMeeting = payMeetingService.getById(id);
|
||||
if (payMeeting.getMeetingType().equals(Integer.parseInt(MeetingCommon.STANDARD_MEETING))) {
|
||||
List<String> idList = Arrays.asList(fileIds.split(","));
|
||||
List<OSSFile> ossFiles = iossFileService.listByIds(idList);
|
||||
for (OSSFile ossFile : ossFiles) {
|
||||
String url = ossFile.getUrl();
|
||||
String[] fileUrl = url.split("/");
|
||||
int length = fileUrl.length;
|
||||
ossFile.setFileName(fileUrl[length - 1]);
|
||||
}
|
||||
AuthenticationUtils.post("/stablecrosstraining/stableCrossTraining/addStandardsFile", null, ossFiles);
|
||||
StableCrossTraining stableCrossTraining = new StableCrossTraining();
|
||||
stableCrossTraining.setId(id);
|
||||
stableCrossTraining.setMeetingFiles(fileIds);
|
||||
AuthenticationUtils.post("/stablecrosstraining/stableCrossTraining/updateStandardsFile", null, stableCrossTraining);
|
||||
}
|
||||
return Result.OK("上传资料成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布提醒
|
||||
*/
|
||||
@AutoLog("发布提醒")
|
||||
@RequiresPermissions("standardsMeeting:publish")
|
||||
@ApiOperation(value = "发布提醒", notes = "发布提醒")
|
||||
@PostMapping(value = "/publishReminder")
|
||||
public Result<?> publishReminder(@RequestBody PublishReminderVO publishReminderVO) {
|
||||
payMeetingService.publishReminder(publishReminderVO);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "生成base64")
|
||||
@GetMapping(value = "/createBase64")
|
||||
@ApiImplicitParam(name = "contact", value = "内容", required = true, paramType = "query")
|
||||
public Result<String> createBase64(String contact) {
|
||||
return Result.OK(QrcodeUtil.create(contact));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增标协会议
|
||||
*/
|
||||
@ApiOperation(value = "新增标协会议")
|
||||
@PostMapping(value = "/addStandards")
|
||||
public Result<?> addStandards(@RequestBody PayMeeting payMeeting, HttpServletRequest request) {
|
||||
String publicKey = request.getParameter("publicKey");
|
||||
String token = request.getParameter("token");
|
||||
authenticationUtils.check(token, publicKey);
|
||||
|
||||
payMeetingService.addStandards(payMeeting);
|
||||
return Result.OK("合并开票成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会议文件
|
||||
*/
|
||||
@ApiOperation(value = "新增会议文件", notes = "新增会议文件")
|
||||
@PostMapping(value = "/addStandardsFile")
|
||||
public Result<?> addStandardsFile(@RequestBody List<OSSFile> ossFileList, HttpServletRequest request) {
|
||||
String publicKey = request.getParameter("publicKey");
|
||||
String token = request.getParameter("token");
|
||||
authenticationUtils.check(token, publicKey);
|
||||
for (OSSFile ossFile : ossFileList) {
|
||||
iossFileService.saveOrUpdate(ossFile);
|
||||
}
|
||||
return Result.OK("新增会议文件成功!");
|
||||
}
|
||||
|
||||
}
|
||||
+367
@@ -0,0 +1,367 @@
|
||||
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.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.PasswordUtil;
|
||||
import com.jero.common.util.ValidUtil;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.company.entity.PayCompanyManagement;
|
||||
import com.jero.company.entity.PayContactsManagement;
|
||||
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.*;
|
||||
import com.jero.meeting.vo.excel.*;
|
||||
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.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.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @description: 参会人员信息
|
||||
* @author: jero-boot
|
||||
* @date: 2021-09-02
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Api(tags = "参会人员信息")
|
||||
@RestController
|
||||
@RequestMapping("/meeting/standardsMeetingSituation")
|
||||
@Slf4j
|
||||
public class StandardsMeetingSituationController extends JeroController<PayMeetingSituation, IPayMeetingSituationService> {
|
||||
@Resource
|
||||
private IPayMeetingSituationService payMeetingSituationService;
|
||||
@Resource
|
||||
private AuthenticationUtils authenticationUtils;
|
||||
@Resource
|
||||
private IPayContactsManagementService contactsManagementService;
|
||||
@Resource
|
||||
private IPayCompanyManagementService companyManagementService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@RequiresPermissions("standardsMeetingSituation: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) {
|
||||
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, req.getParameterMap());
|
||||
Page<PayMeetingSituation> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeetingSituation> pageList = payMeetingSituationService.page(page, queryWrapper);
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 合同查询未关联参会人列表
|
||||
*/
|
||||
@ApiOperation(value = "合同查询未关联参会人列表", notes = "合同查询未关联参会人列表")
|
||||
@GetMapping(value = "/contractPage")
|
||||
public Result<?> contractPage(MeetingSituationContractVO meetingSituationContractVO,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<MeetingSituationContractVO> page = new Page<>(pageNo, pageSize);
|
||||
IPage<MeetingSituationContractVO> pageList = payMeetingSituationService.contractPage(page, meetingSituationContractVO);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询 会员系统系统
|
||||
*/
|
||||
@ApiOperation(value = "参会人员信息-分页列表查询 会员系统系统", notes = "参会人员信息-分页列表查询")
|
||||
@GetMapping(value = "/page2")
|
||||
public Result<?> queryPageList2(PayMeetingSituation payMeetingSituation,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
String publicKey = req.getParameter("publicKey");
|
||||
String token = req.getParameter("token");
|
||||
authenticationUtils.check(token, publicKey);
|
||||
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, req.getParameterMap());
|
||||
Page<PayMeetingSituation> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeetingSituation> pageList = payMeetingSituationService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@ApiOperation(value = "参会人员信息-列表查询", notes = "参会人员信息-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PayMeetingSituation>> queryList() {
|
||||
List<PayMeetingSituation> list = payMeetingSituationService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加参会人
|
||||
*/
|
||||
@RequiresPermissions("standardsMeetingSituation:add")
|
||||
@AutoLog(value = "参会人员信息-添加参会人")
|
||||
@ApiOperation(value = "参会人员信息-添加参会人", notes = "参会人员信息-添加参会人")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody PayMeetingSituation payMeetingSituation) {
|
||||
payMeetingSituationService.add(payMeetingSituation);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 报名
|
||||
*/
|
||||
@AutoLog(value = "报名信息-报名")
|
||||
@ApiOperation(value = "报名信息-报名", notes = "报名信息-报名")
|
||||
@PostMapping(value = "/signUp")
|
||||
public Result<?> signUp(@RequestBody PayMeetingSituation payMeetingSituation) {
|
||||
payMeetingSituationService.signUp(payMeetingSituation);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@AutoLog(value = "参会人员信息-编辑")
|
||||
@RequiresPermissions("standardsMeetingSituation:edit")
|
||||
@ApiOperation(value = "参会人员信息-编辑", notes = "参会人员信息-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody PayMeetingSituationVO payMeetingSituationVO) {
|
||||
payMeetingSituationService.editById(payMeetingSituationVO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
@RequiresPermissions("standardsMeetingSituation: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("standardsMeetingSituation: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查询
|
||||
*/
|
||||
@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查询自己的参会人信息
|
||||
*/
|
||||
@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("standardsMeetingSituation:export")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PayMeetingSituation payMeetingSituation) {
|
||||
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, request.getParameterMap());
|
||||
List<PayMeetingSituation> pageList = payMeetingSituationService.list(queryWrapper);
|
||||
// 过滤选中数据
|
||||
String selections = request.getParameter("selections");
|
||||
if (oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
|
||||
}
|
||||
if (pageList.isEmpty()) {
|
||||
throw new JeroBootException("没有数据");
|
||||
}
|
||||
String meetingType = payMeetingSituationService.getMeetingType(payMeetingSituation);
|
||||
List<Object> exportList = new ArrayList<>();
|
||||
for (PayMeetingSituation meetingSituation : pageList) {
|
||||
|
||||
String companyContactId = meetingSituation.getCompanyContactId();
|
||||
PayContactsManagement contactsManagement = contactsManagementService.getById(companyContactId);
|
||||
meetingSituation.setCompanyContactName(contactsManagement.getName());
|
||||
meetingSituation.setPost(contactsManagement.getPost());
|
||||
meetingSituation.setPhone(PasswordUtil.decrypt(contactsManagement.getPhone()));
|
||||
meetingSituation.setEmail(PasswordUtil.decrypt(contactsManagement.getEmail()));
|
||||
PayCompanyManagement companyManagement = companyManagementService.getById(contactsManagement.getCompanyId());
|
||||
meetingSituation.setCompanyName(companyManagement.getCompanyName());
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
//保存数据
|
||||
StandardsSituationExcel standardsSituationExcel = new StandardsSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, standardsSituationExcel);
|
||||
exportList.add(standardsSituationExcel);
|
||||
// 工作组项目查询工作组项目名
|
||||
break;
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
//保存数据
|
||||
WorkingGroupSituationExcel workingGroupSituationExcel = new WorkingGroupSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, workingGroupSituationExcel);
|
||||
exportList.add(workingGroupSituationExcel);
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
//保存数据
|
||||
InternationalSituationExcel internationalSituationExcel = new InternationalSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, internationalSituationExcel);
|
||||
exportList.add(internationalSituationExcel);
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
//保存数据
|
||||
SituationExcel situationExcel = new SituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, situationExcel);
|
||||
exportList.add(situationExcel);
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
//保存数据
|
||||
CommitteeSituationExcel committeeSituationExcel = new CommitteeSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, committeeSituationExcel);
|
||||
exportList.add(committeeSituationExcel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Class<?> classToExport = null;
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
classToExport = WorkingGroupSituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
classToExport = StandardsSituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
classToExport = InternationalSituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
classToExport = SituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
classToExport = CommitteeSituationExcel.class;
|
||||
break;
|
||||
}
|
||||
return super.exportListXls(exportList, classToExport, "参会人员信息");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置对接人
|
||||
*/
|
||||
@RequiresPermissions("standardsMeetingSituation:batchSetDocker")
|
||||
@AutoLog(value = "设置对接人")
|
||||
@ApiOperation(value = "设置对接人", notes = "设置对接人")
|
||||
@PostMapping(value = "/addDock")
|
||||
public Result<?> addDock(@RequestBody AddDockVO addDockVO) {
|
||||
payMeetingSituationService.addDock(addDockVO);
|
||||
return Result.OK("设置对接人成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核付款凭证
|
||||
*/
|
||||
@RequiresPermissions("standardsMeetingSituation:auditCredentials")
|
||||
@AutoLog(value = "审核付款凭证")
|
||||
@ApiOperation(value = "审核付款凭证")
|
||||
@PostMapping(value = "/check")
|
||||
public Result<?> check(@RequestBody CheckVO checkVO) {
|
||||
payMeetingSituationService.check(checkVO);
|
||||
return Result.OK("审核成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核报名信息
|
||||
*/
|
||||
@AutoLog(value = "审核报名信息")
|
||||
@RequiresPermissions("standardsMeetingSituation: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("合并开票成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 签到
|
||||
*/
|
||||
@AutoLog(value = "签到")
|
||||
@ApiOperation(value = "签到")
|
||||
@PostMapping(value = "/signIn")
|
||||
public Result<?> signIn(@RequestBody SignInVO signInVO) {
|
||||
ValidUtil.validate(signInVO);
|
||||
payMeetingSituationService.signIn(signInVO);
|
||||
return Result.OK("签到成功!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+489
@@ -0,0 +1,489 @@
|
||||
package com.jero.meeting.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
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.common.util.oConvertUtils;
|
||||
import com.jero.company.service.IPayContactsManagementService;
|
||||
import com.jero.data.entity.PayCaseCommittee;
|
||||
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.meeting.vo.excel.*;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.system.volid.group.UpdateGroup;
|
||||
import com.jero.project.entity.PayWorkingGroup;
|
||||
import com.jero.project.service.IPayWorkingGroupService;
|
||||
import com.jero.standards.xuanguan.stablecrosstraining.entity.StableCrossTraining;
|
||||
import com.jero.util.QrcodeUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
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.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @description: 会议管理
|
||||
* @author: jero-boot
|
||||
* @date: 2021-09-02
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Api(tags = "会议管理-工作组会议")
|
||||
@RestController
|
||||
@RequestMapping("/meeting/workGroupMeeting")
|
||||
@Slf4j
|
||||
public class WorkGroupMeetingController 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;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@RequiresPermissions("workGroupMeeting: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) {
|
||||
QueryWrapper<PayMeeting> queryWrapper = QueryGenerator.initQueryWrapper(payMeeting, req.getParameterMap());
|
||||
String meetingStartTime = req.getParameter("meetingStartTime");
|
||||
String meetingEndTime = req.getParameter("meetingEndTime");
|
||||
if (ObjectUtil.isNotEmpty(meetingStartTime) && ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime).or().lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingStartTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime)
|
||||
);
|
||||
}
|
||||
|
||||
Page<PayMeeting> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeeting> pageList = payMeetingService.page(page, queryWrapper);
|
||||
for (PayMeeting meeting : pageList.getRecords()) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(payMeetingVO, payMeeting);
|
||||
//查询酒店联系人列表
|
||||
if (meeting.getMeetingType().equals(Integer.parseInt(MeetingCommon.STANDARD_MEETING))) {
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
meeting.setHotelContactsList(payMeetingHotelContactsList);
|
||||
}
|
||||
}
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业端-会议-分页列表查询参会人的会议
|
||||
*/
|
||||
@ApiOperation(value = "企业端-会议-分页列表查询参会人的会议")
|
||||
@GetMapping(value = "/pageContract")
|
||||
public Result<?> queryPageListContract(PayMeeting payMeeting,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<PayMeeting> queryWrapper = QueryGenerator.initQueryWrapper(payMeeting, req.getParameterMap());
|
||||
String meetingStartTime = req.getParameter("meetingStartTime");
|
||||
String meetingEndTime = req.getParameter("meetingEndTime");
|
||||
if (ObjectUtil.isNotEmpty(meetingStartTime) && ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime).or().lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingStartTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.lt("end_time", meetingStartTime)
|
||||
);
|
||||
} else if (ObjectUtil.isNotEmpty(meetingEndTime)) {
|
||||
queryWrapper.not(
|
||||
a -> a.gt("start_time", meetingEndTime)
|
||||
);
|
||||
}
|
||||
String meetingStatus = req.getParameter("meetingStatus");
|
||||
String now = DateUtil.formatDate(new Date());
|
||||
if (StringUtils.isNotBlank(meetingStatus)) {
|
||||
switch (meetingStatus) {
|
||||
case MeetingCommon.MEETING_STATUS_2:
|
||||
queryWrapper.gt("date_format(start_time,'%Y-%m-%d')", now);
|
||||
break;
|
||||
case MeetingCommon.MEETING_STATUS_3:
|
||||
queryWrapper.le("date_format(start_time,'%Y-%m-%d')", now);
|
||||
queryWrapper.ge("date_format(end_time,'%Y-%m-%d')", now);
|
||||
break;
|
||||
case MeetingCommon.MEETING_STATUS_4:
|
||||
queryWrapper.le("date_format(end_time,'%Y-%m-%d')", now);
|
||||
break;
|
||||
}
|
||||
}
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String id = sysUser.getId();
|
||||
|
||||
//会议报名状态:1可报名/2已报名
|
||||
String meetingSignUpType = req.getParameter("meetingSignUpType");
|
||||
if (Objects.equals(meetingSignUpType,1+"")) {
|
||||
queryWrapper.eq("pmrr.contact_id",id);
|
||||
}else if (Objects.equals(meetingSignUpType,2+"")) {
|
||||
queryWrapper.eq("pms.company_contact_id",id);
|
||||
}else {
|
||||
queryWrapper.and(
|
||||
a -> a.eq("pms.company_contact_id",id)
|
||||
.or()
|
||||
.eq("pms.post_contact_id",id)
|
||||
.or()
|
||||
.eq("pmrr.contact_id",id)
|
||||
);
|
||||
}
|
||||
|
||||
Page<PayMeeting> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeeting> pageList = payMeetingService.pageListContract(page, queryWrapper, now);
|
||||
for (PayMeeting meeting : pageList.getRecords()) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(payMeetingVO, payMeeting);
|
||||
}
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@RequiresPermissions("workGroupMeeting:search")
|
||||
@ApiOperation(value = "会议管理-列表查询", notes = "会议管理-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PayMeeting>> queryList() {
|
||||
List<PayMeeting> list = payMeetingService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@RequiresPermissions("workGroupMeeting:add")
|
||||
@AutoLog(value = "会议管理-添加")
|
||||
@ApiOperation(value = "会议管理-添加", notes = "会议管理-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody PayMeetingVO payMeetingVO) {
|
||||
ValidUtil.validate(payMeetingVO);
|
||||
payMeetingService.add(payMeetingVO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@RequiresPermissions("workGroupMeeting:edit")
|
||||
@AutoLog(value = "会议管理-编辑")
|
||||
@ApiOperation(value = "会议管理-编辑", notes = "会议管理-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody PayMeetingVO payMeetingVO) {
|
||||
ValidUtil.validate(payMeetingVO, UpdateGroup.class);
|
||||
payMeetingService.editById(payMeetingVO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
@RequiresPermissions("workGroupMeeting:delete")
|
||||
@AutoLog(value = "会议管理-通过id删除")
|
||||
@ApiOperation(value = "会议管理-通过id删除", notes = "会议管理-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name = "id") String id) {
|
||||
payMeetingService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
@RequiresPermissions("workGroupMeeting:batchDel")
|
||||
@AutoLog(value = "会议管理-批量删除")
|
||||
@ApiOperation(value = "会议管理-批量删除", notes = "会议管理-批量删除")
|
||||
@GetMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids") String ids) {
|
||||
this.payMeetingService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
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) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
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<>());
|
||||
//标协会议查询酒店联系人列表
|
||||
if (meetingType.equals(MeetingCommon.STANDARD_MEETING)) {
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
payMeetingVO.setHotelContactsList(payMeetingHotelContactsList);
|
||||
//标协会议类型
|
||||
//String tbMeetingType = meeting.getTbMeetingType().toString();
|
||||
//String type = sysBaseApi.translateDict("standard_meeting_type", tbMeetingType);
|
||||
//payMeetingVO.setTbMeetingType(type);
|
||||
// 工作组项目查询工作组项目名
|
||||
} else if (meetingType.equals(MeetingCommon.WORKING_GROUP_MEETING)) {
|
||||
String workingGroupId = meeting.getWorkingGroupId();
|
||||
PayWorkingGroup workingGroup = payWorkingGroupService.getById(workingGroupId);
|
||||
payMeetingVO.setWorkingGroupName(workingGroup.getWorkingGroupProject());
|
||||
}
|
||||
return Result.OK(payMeetingVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
@RequiresPermissions("workGroupMeeting:export")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PayMeeting payMeeting) {
|
||||
QueryWrapper<PayMeeting> queryWrapper = QueryGenerator.initQueryWrapper(payMeeting, request.getParameterMap());
|
||||
List<PayMeeting> pageList = payMeetingService.list(queryWrapper);
|
||||
List<Object> exportList = new ArrayList<>();
|
||||
// 过滤选中数据
|
||||
String selections = request.getParameter("selections");
|
||||
if (oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
|
||||
}
|
||||
if (pageList.isEmpty()) {
|
||||
throw new JeroBootException("没有数据");
|
||||
}
|
||||
String meetingType = pageList.get(0).getMeetingType().toString();
|
||||
for (PayMeeting meeting : pageList) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseApi.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getUsername());
|
||||
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(meeting, payMeetingVO);
|
||||
meetingType = meeting.getMeetingType().toString();
|
||||
String meetingType1 = sysBaseApi.translateDict("meeting_type", meetingType);
|
||||
payMeetingVO.setMeetingType(meetingType1);
|
||||
payMeetingVO.setHotelContactsList(new ArrayList<>());
|
||||
//标协会议查询酒店联系人列表
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
payMeetingVO.setHotelContactsList(payMeetingHotelContactsList);
|
||||
//标协会议类型
|
||||
String tbMeetingType = meeting.getTbMeetingType().toString();
|
||||
String type = sysBaseApi.translateDict("standard_meeting_type", tbMeetingType);
|
||||
payMeetingVO.setTbMeetingType(type);
|
||||
//保存数据
|
||||
StandardsMeetingExcel standardsMeetingExcel = new StandardsMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, standardsMeetingExcel);
|
||||
exportList.add(standardsMeetingExcel);
|
||||
// 工作组项目查询工作组项目名
|
||||
break;
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
String workingGroupId = meeting.getWorkingGroupId();
|
||||
PayWorkingGroup workingGroup = payWorkingGroupService.getById(workingGroupId);
|
||||
payMeetingVO.setWorkingGroupName(workingGroup.getWorkingGroupProject());
|
||||
//保存数据
|
||||
WorkingGroupMeetingExcel workingGroupMeetingExcel = new WorkingGroupMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, workingGroupMeetingExcel);
|
||||
exportList.add(workingGroupMeetingExcel);
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
//保存数据
|
||||
InternationalMeetingExcel internationalMeetingExcel = new InternationalMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, internationalMeetingExcel);
|
||||
exportList.add(internationalMeetingExcel);
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
//保存数据
|
||||
OtherMeetingExcel otherMeetingExcel = new OtherMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, otherMeetingExcel);
|
||||
exportList.add(otherMeetingExcel);
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
String caseCommitteeId = meeting.getCaseCommitteeId();
|
||||
PayCaseCommittee payCaseCommittee = payCaseCommitteeService.getById(caseCommitteeId);
|
||||
payMeetingVO.setCaseCommitteeName(payCaseCommittee.getName());
|
||||
|
||||
CommitteeMeetingExcel committeeMeetingExcel = new CommitteeMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, committeeMeetingExcel);
|
||||
exportList.add(committeeMeetingExcel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Class<?> classToExport = null;
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
classToExport = WorkingGroupMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
classToExport = StandardsMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
classToExport = InternationalMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
classToExport = OtherMeetingExcel.class;
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
classToExport = CommitteeMeetingExcel.class;
|
||||
break;
|
||||
}
|
||||
return super.exportListXls(exportList, classToExport, "会议管理");
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传资料
|
||||
*/
|
||||
@AutoLog(value = "上传资料")
|
||||
@RequiresPermissions("workGroupMeeting:upload")
|
||||
@ApiOperation(value = "上传资料", notes = "上传资料")
|
||||
@PostMapping(value = "/uploadFile")
|
||||
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
||||
String fileIds = uploadFileVO.getFileIds();
|
||||
String id = uploadFileVO.getId();
|
||||
LambdaUpdateWrapper<PayMeeting> wrapper = new LambdaUpdateWrapper<>();
|
||||
wrapper.eq(PayMeeting::getId, id);
|
||||
wrapper.set(PayMeeting::getMeetingData, fileIds);
|
||||
payMeetingService.update(wrapper);
|
||||
PayMeeting payMeeting = payMeetingService.getById(id);
|
||||
if (payMeeting.getMeetingType().equals(Integer.parseInt(MeetingCommon.STANDARD_MEETING))) {
|
||||
List<String> idList = Arrays.asList(fileIds.split(","));
|
||||
List<OSSFile> ossFiles = iossFileService.listByIds(idList);
|
||||
for (OSSFile ossFile : ossFiles) {
|
||||
String url = ossFile.getUrl();
|
||||
String[] fileUrl = url.split("/");
|
||||
int length = fileUrl.length;
|
||||
ossFile.setFileName(fileUrl[length - 1]);
|
||||
}
|
||||
AuthenticationUtils.post("/stablecrosstraining/stableCrossTraining/addStandardsFile", null, ossFiles);
|
||||
StableCrossTraining stableCrossTraining = new StableCrossTraining();
|
||||
stableCrossTraining.setId(id);
|
||||
stableCrossTraining.setMeetingFiles(fileIds);
|
||||
AuthenticationUtils.post("/stablecrosstraining/stableCrossTraining/updateStandardsFile", null, stableCrossTraining);
|
||||
}
|
||||
return Result.OK("上传资料成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布提醒
|
||||
*/
|
||||
@AutoLog("发布提醒")
|
||||
@RequiresPermissions("workGroupMeeting:publish")
|
||||
@ApiOperation(value = "发布提醒", notes = "发布提醒")
|
||||
@PostMapping(value = "/publishReminder")
|
||||
public Result<?> publishReminder(@RequestBody PublishReminderVO publishReminderVO) {
|
||||
payMeetingService.publishReminder(publishReminderVO);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "生成base64")
|
||||
@GetMapping(value = "/createBase64")
|
||||
@ApiImplicitParam(name = "contact", value = "内容", required = true, paramType = "query")
|
||||
public Result<String> createBase64(String contact) {
|
||||
return Result.OK(QrcodeUtil.create(contact));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增标协会议
|
||||
*/
|
||||
@ApiOperation(value = "新增标协会议")
|
||||
@PostMapping(value = "/addStandards")
|
||||
public Result<?> addStandards(@RequestBody PayMeeting payMeeting, HttpServletRequest request) {
|
||||
String publicKey = request.getParameter("publicKey");
|
||||
String token = request.getParameter("token");
|
||||
authenticationUtils.check(token, publicKey);
|
||||
|
||||
payMeetingService.addStandards(payMeeting);
|
||||
return Result.OK("合并开票成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会议文件
|
||||
*/
|
||||
@ApiOperation(value = "新增会议文件", notes = "新增会议文件")
|
||||
@PostMapping(value = "/addStandardsFile")
|
||||
public Result<?> addStandardsFile(@RequestBody List<OSSFile> ossFileList, HttpServletRequest request) {
|
||||
String publicKey = request.getParameter("publicKey");
|
||||
String token = request.getParameter("token");
|
||||
authenticationUtils.check(token, publicKey);
|
||||
for (OSSFile ossFile : ossFileList) {
|
||||
iossFileService.saveOrUpdate(ossFile);
|
||||
}
|
||||
return Result.OK("新增会议文件成功!");
|
||||
}
|
||||
|
||||
}
|
||||
+367
@@ -0,0 +1,367 @@
|
||||
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.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.PasswordUtil;
|
||||
import com.jero.common.util.ValidUtil;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.company.entity.PayCompanyManagement;
|
||||
import com.jero.company.entity.PayContactsManagement;
|
||||
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.*;
|
||||
import com.jero.meeting.vo.excel.*;
|
||||
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.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.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @description: 参会人员信息
|
||||
* @author: jero-boot
|
||||
* @date: 2021-09-02
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Api(tags = "参会人员信息")
|
||||
@RestController
|
||||
@RequestMapping("/meeting/workGroupMeetingSituation")
|
||||
@Slf4j
|
||||
public class WorkGroupMeetingSituationController extends JeroController<PayMeetingSituation, IPayMeetingSituationService> {
|
||||
@Resource
|
||||
private IPayMeetingSituationService payMeetingSituationService;
|
||||
@Resource
|
||||
private AuthenticationUtils authenticationUtils;
|
||||
@Resource
|
||||
private IPayContactsManagementService contactsManagementService;
|
||||
@Resource
|
||||
private IPayCompanyManagementService companyManagementService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@RequiresPermissions("workGroupMeetingSituation: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) {
|
||||
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, req.getParameterMap());
|
||||
Page<PayMeetingSituation> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeetingSituation> pageList = payMeetingSituationService.page(page, queryWrapper);
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 合同查询未关联参会人列表
|
||||
*/
|
||||
@ApiOperation(value = "合同查询未关联参会人列表", notes = "合同查询未关联参会人列表")
|
||||
@GetMapping(value = "/contractPage")
|
||||
public Result<?> contractPage(MeetingSituationContractVO meetingSituationContractVO,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<MeetingSituationContractVO> page = new Page<>(pageNo, pageSize);
|
||||
IPage<MeetingSituationContractVO> pageList = payMeetingSituationService.contractPage(page, meetingSituationContractVO);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询 会员系统系统
|
||||
*/
|
||||
@ApiOperation(value = "参会人员信息-分页列表查询 会员系统系统", notes = "参会人员信息-分页列表查询")
|
||||
@GetMapping(value = "/page2")
|
||||
public Result<?> queryPageList2(PayMeetingSituation payMeetingSituation,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
String publicKey = req.getParameter("publicKey");
|
||||
String token = req.getParameter("token");
|
||||
authenticationUtils.check(token, publicKey);
|
||||
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, req.getParameterMap());
|
||||
Page<PayMeetingSituation> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeetingSituation> pageList = payMeetingSituationService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@ApiOperation(value = "参会人员信息-列表查询", notes = "参会人员信息-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PayMeetingSituation>> queryList() {
|
||||
List<PayMeetingSituation> list = payMeetingSituationService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加参会人
|
||||
*/
|
||||
@RequiresPermissions("workGroupMeetingSituation:add")
|
||||
@AutoLog(value = "参会人员信息-添加参会人")
|
||||
@ApiOperation(value = "参会人员信息-添加参会人", notes = "参会人员信息-添加参会人")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody PayMeetingSituation payMeetingSituation) {
|
||||
payMeetingSituationService.add(payMeetingSituation);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 报名
|
||||
*/
|
||||
@AutoLog(value = "报名信息-报名")
|
||||
@ApiOperation(value = "报名信息-报名", notes = "报名信息-报名")
|
||||
@PostMapping(value = "/signUp")
|
||||
public Result<?> signUp(@RequestBody PayMeetingSituation payMeetingSituation) {
|
||||
payMeetingSituationService.signUp(payMeetingSituation);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@AutoLog(value = "参会人员信息-编辑")
|
||||
@RequiresPermissions("workGroupMeetingSituation:edit")
|
||||
@ApiOperation(value = "参会人员信息-编辑", notes = "参会人员信息-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody PayMeetingSituationVO payMeetingSituationVO) {
|
||||
payMeetingSituationService.editById(payMeetingSituationVO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
@RequiresPermissions("workGroupMeetingSituation: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("workGroupMeetingSituation: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查询
|
||||
*/
|
||||
@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查询自己的参会人信息
|
||||
*/
|
||||
@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("workGroupMeetingSituation:export")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PayMeetingSituation payMeetingSituation) {
|
||||
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, request.getParameterMap());
|
||||
List<PayMeetingSituation> pageList = payMeetingSituationService.list(queryWrapper);
|
||||
// 过滤选中数据
|
||||
String selections = request.getParameter("selections");
|
||||
if (oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
|
||||
}
|
||||
if (pageList.isEmpty()) {
|
||||
throw new JeroBootException("没有数据");
|
||||
}
|
||||
String meetingType = payMeetingSituationService.getMeetingType(payMeetingSituation);
|
||||
List<Object> exportList = new ArrayList<>();
|
||||
for (PayMeetingSituation meetingSituation : pageList) {
|
||||
|
||||
String companyContactId = meetingSituation.getCompanyContactId();
|
||||
PayContactsManagement contactsManagement = contactsManagementService.getById(companyContactId);
|
||||
meetingSituation.setCompanyContactName(contactsManagement.getName());
|
||||
meetingSituation.setPost(contactsManagement.getPost());
|
||||
meetingSituation.setPhone(PasswordUtil.decrypt(contactsManagement.getPhone()));
|
||||
meetingSituation.setEmail(PasswordUtil.decrypt(contactsManagement.getEmail()));
|
||||
PayCompanyManagement companyManagement = companyManagementService.getById(contactsManagement.getCompanyId());
|
||||
meetingSituation.setCompanyName(companyManagement.getCompanyName());
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
//保存数据
|
||||
StandardsSituationExcel standardsSituationExcel = new StandardsSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, standardsSituationExcel);
|
||||
exportList.add(standardsSituationExcel);
|
||||
// 工作组项目查询工作组项目名
|
||||
break;
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
//保存数据
|
||||
WorkingGroupSituationExcel workingGroupSituationExcel = new WorkingGroupSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, workingGroupSituationExcel);
|
||||
exportList.add(workingGroupSituationExcel);
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
//保存数据
|
||||
InternationalSituationExcel internationalSituationExcel = new InternationalSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, internationalSituationExcel);
|
||||
exportList.add(internationalSituationExcel);
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
//保存数据
|
||||
SituationExcel situationExcel = new SituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, situationExcel);
|
||||
exportList.add(situationExcel);
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
//保存数据
|
||||
CommitteeSituationExcel committeeSituationExcel = new CommitteeSituationExcel();
|
||||
BeanUtils.copyProperties(meetingSituation, committeeSituationExcel);
|
||||
exportList.add(committeeSituationExcel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Class<?> classToExport = null;
|
||||
switch (meetingType) {
|
||||
case MeetingCommon.WORKING_GROUP_MEETING:
|
||||
classToExport = WorkingGroupSituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.STANDARD_MEETING:
|
||||
classToExport = StandardsSituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||
classToExport = InternationalSituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.OTHER_MEETING:
|
||||
classToExport = SituationExcel.class;
|
||||
break;
|
||||
case MeetingCommon.COMMITTEE_MEETING:
|
||||
classToExport = CommitteeSituationExcel.class;
|
||||
break;
|
||||
}
|
||||
return super.exportListXls(exportList, classToExport, "参会人员信息");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置对接人
|
||||
*/
|
||||
@RequiresPermissions("workGroupMeetingSituation:batchSetDocker")
|
||||
@AutoLog(value = "设置对接人")
|
||||
@ApiOperation(value = "设置对接人", notes = "设置对接人")
|
||||
@PostMapping(value = "/addDock")
|
||||
public Result<?> addDock(@RequestBody AddDockVO addDockVO) {
|
||||
payMeetingSituationService.addDock(addDockVO);
|
||||
return Result.OK("设置对接人成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核付款凭证
|
||||
*/
|
||||
@RequiresPermissions("workGroupMeetingSituation:auditCredentials")
|
||||
@AutoLog(value = "审核付款凭证")
|
||||
@ApiOperation(value = "审核付款凭证")
|
||||
@PostMapping(value = "/check")
|
||||
public Result<?> check(@RequestBody CheckVO checkVO) {
|
||||
payMeetingSituationService.check(checkVO);
|
||||
return Result.OK("审核成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核报名信息
|
||||
*/
|
||||
@AutoLog(value = "审核报名信息")
|
||||
@RequiresPermissions("workGroupMeetingSituation: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("合并开票成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 签到
|
||||
*/
|
||||
@AutoLog(value = "签到")
|
||||
@ApiOperation(value = "签到")
|
||||
@PostMapping(value = "/signIn")
|
||||
public Result<?> signIn(@RequestBody SignInVO signInVO) {
|
||||
ValidUtil.validate(signInVO);
|
||||
payMeetingSituationService.signIn(signInVO);
|
||||
return Result.OK("签到成功!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user