add 工作组会议导出接口
This commit is contained in:
+35
@@ -255,6 +255,41 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
|
||||
}
|
||||
return super.exportListXls(exportList, PayMeetingVO.class, "会议管理");
|
||||
}
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
@GetMapping(value = "/exportWorkingGroupXls")
|
||||
public ModelAndView exportWorkingGroupXls(HttpServletRequest request, PayMeeting payMeeting) {
|
||||
QueryWrapper<PayMeeting> queryWrapper = QueryGenerator.initQueryWrapper(payMeeting, request.getParameterMap());
|
||||
List<PayMeeting> pageList = payMeetingService.list(queryWrapper);
|
||||
List<PayMeetingVO> 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());
|
||||
}
|
||||
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);
|
||||
String meetingType = meeting.getMeetingType().toString();
|
||||
String meetingType1 = sysBaseApi.translateDict("meeting_type", meetingType);
|
||||
payMeetingVO.setMeetingType(meetingType1);
|
||||
payMeetingVO.setHotelContactsList(new ArrayList<>());
|
||||
// 工作组项目查询工作组项目名
|
||||
if (meetingType.equals(MeetingCommon.WORKING_GROUP_MEETING)) {
|
||||
String workingGroupId = meeting.getWorkingGroupId();
|
||||
PayWorkingGroup workingGroup = payWorkingGroupService.getById(workingGroupId);
|
||||
payMeetingVO.setWorkingGroupName(workingGroup.getWorkingGroupProject());
|
||||
}
|
||||
exportList.add(payMeetingVO);
|
||||
}
|
||||
return super.exportListXls(exportList, PayMeetingVO.class, "会议管理");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel模板
|
||||
|
||||
+3
-1
@@ -57,6 +57,7 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
public void add(PayMeetingVO payMeetingVO) {
|
||||
//酒店联系人列表
|
||||
List<PayMeetingHotelContacts> hotelContactsList = payMeetingVO.getHotelContactsList();
|
||||
//进行校验,赋值操作
|
||||
PayMeeting payMeeting = getPayMeeting(payMeetingVO,hotelContactsList);
|
||||
save(payMeeting);
|
||||
//如果酒店联系人列表不为空,就新增
|
||||
@@ -77,7 +78,8 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
*/
|
||||
@Override
|
||||
public void editById(PayMeetingVO payMeetingVO) {
|
||||
List<PayMeetingHotelContacts> hotelContactsList = new ArrayList<>();
|
||||
List<PayMeetingHotelContacts> hotelContactsList = payMeetingVO.getHotelContactsList();
|
||||
//进行校验,赋值操作
|
||||
PayMeeting payMeeting = getPayMeeting(payMeetingVO, hotelContactsList);
|
||||
saveOrUpdate(payMeeting);
|
||||
//如果酒店联系人列表不为空,就更新
|
||||
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
package com.jero.meeting.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jero.meeting.entity.PayMeetingHotelContacts;
|
||||
import com.jero.meeting.valid.group.InternationalMeeting;
|
||||
import com.jero.meeting.valid.group.StandardMeeting;
|
||||
import com.jero.meeting.valid.group.WorkingGroupMeeting;
|
||||
import com.jero.modules.system.volid.group.UpdateGroup;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author liJiaRao
|
||||
* @date 2021-09-07 18:29
|
||||
*/
|
||||
@Data
|
||||
public class WorkingGroupMeetingExel {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@NotBlank(message = "会议id不能为空",groups = UpdateGroup.class)
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
/**会议名称*/
|
||||
@Excel(name = "会议名称", width = 15)
|
||||
@ApiModelProperty(value = "会议名称")
|
||||
@NotBlank(message = "会议名称不能为空")
|
||||
@Size(max = 50,message = "会议名称最长为50字符")
|
||||
private String meetingName;
|
||||
|
||||
/**会议类型*/
|
||||
@Excel(name = "会议类型", width = 15)
|
||||
@ApiModelProperty(value = "会议类型")
|
||||
@NotBlank(message = "会议类型不能为空")
|
||||
private String meetingType;
|
||||
|
||||
/**标协会议类型*/
|
||||
@Excel(name = "标协会议类型", width = 15)
|
||||
@ApiModelProperty(value = "标协会议类型")
|
||||
@NotBlank(message = "标协会议类型不能为空", groups = StandardMeeting.class)
|
||||
private String tbMeetingType;
|
||||
|
||||
/**工作组项目id*/
|
||||
@ApiModelProperty(value = "工作组项目id")
|
||||
@NotBlank(message = "工作组项目名称不能为空", groups = WorkingGroupMeeting.class)
|
||||
private String workingGroupId;
|
||||
|
||||
/**工作组项目名称*/
|
||||
@Excel(name = "工作组项目名称", width = 15)
|
||||
@ApiModelProperty(value = "工作组项目名称")
|
||||
private String workingGroupName;
|
||||
|
||||
/**开始时间*/
|
||||
@Excel(name = "会议开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "会议开始时间")
|
||||
@NotNull(message = "会议召开时间不能为空")
|
||||
private java.util.Date startTime;
|
||||
|
||||
/**结束时间*/
|
||||
@Excel(name = "会议结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "会议结束时间")
|
||||
@NotNull(message = "会议召开时间不能为空")
|
||||
private java.util.Date endTime;
|
||||
|
||||
/**年份*/
|
||||
@Excel(name = "年份", width = 15)
|
||||
@ApiModelProperty(value = "年份")
|
||||
@NotBlank(message = "年份不能为空")
|
||||
private String particularYear;
|
||||
|
||||
/**召开地点*/
|
||||
@Excel(name = "召开地点", width = 15)
|
||||
@ApiModelProperty(value = "召开地点")
|
||||
@NotBlank(message = "召开地点不能为空")
|
||||
@Size(max = 50, message = "召开地点最大为50字符")
|
||||
private String venue;
|
||||
|
||||
/**召开地点对照码*/
|
||||
@ApiModelProperty(value = "召开地点对照码")
|
||||
@NotBlank(message = "召开地点对照码不能为空")
|
||||
private String convokeLocale;
|
||||
|
||||
/**详细地址*/
|
||||
@Excel(name = "详细地址", width = 15)
|
||||
@ApiModelProperty(value = "详细地址")
|
||||
@NotBlank(message = "详细地址不能为空")
|
||||
@Size(max = 100, message = "召开地点最大为100字符")
|
||||
private String address;
|
||||
|
||||
/**预计参加人数*/
|
||||
@Excel(name = "预计参加人数", width = 15)
|
||||
@ApiModelProperty(value = "预计参加人数")
|
||||
private String estimatedNumber;
|
||||
|
||||
/**会议内容*/
|
||||
@Excel(name = "会议内容", width = 15)
|
||||
@ApiModelProperty(value = "会议内容")
|
||||
@NotBlank(message = "会议内容不能为空")
|
||||
@Size(max = 200, message = "会议内容最大为200字符")
|
||||
private String meetingContent;
|
||||
|
||||
/**报名截止时间*/
|
||||
@Excel(name = "报名截止时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "报名截止时间")
|
||||
@NotNull(message = "报名截止时间不能为空")
|
||||
private java.util.Date registerDeadline;
|
||||
|
||||
/**会议费用*/
|
||||
@Excel(name = "会议费用", width = 15)
|
||||
@ApiModelProperty(value = "会议费用")
|
||||
@NotNull(message = "会议费用不能为空")
|
||||
@Max(value = 999999999,message = "会议费用格式错误")
|
||||
private Integer meetingCosts;
|
||||
|
||||
/**会议负责人id*/
|
||||
@ApiModelProperty(value = "会议负责人id")
|
||||
@NotBlank(message = "会议负责人不能为空")
|
||||
private String directorId;
|
||||
|
||||
/**会议负责人*/
|
||||
@Excel(name = "会议负责人", width = 15)
|
||||
@ApiModelProperty(value = "会议负责人")
|
||||
private String directorName;
|
||||
|
||||
/**会议负责人手机号*/
|
||||
@Excel(name = "会议负责人手机号", width = 15)
|
||||
@ApiModelProperty(value = "会议负责人手机号")
|
||||
private String directorPhone;
|
||||
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Size(max = 200, message = "备注最大为200字符")
|
||||
private String remark;
|
||||
|
||||
/**会议通知文件*/
|
||||
@ApiModelProperty(value = "会议通知文件")
|
||||
@Size(max = 1000, message = "会议通知文件数量超出最大限制")
|
||||
private String meetingFiles;
|
||||
|
||||
/**会议资料*/
|
||||
@ApiModelProperty(value = "会议资料")
|
||||
@Size(max = 1000, message = "会议资料数量超出最大限制")
|
||||
private String meetingData;
|
||||
|
||||
/**是否提醒*/
|
||||
@ApiModelProperty(value = "是否提醒")
|
||||
private Integer remind;
|
||||
}
|
||||
Reference in New Issue
Block a user