add 信息交流会删除时同步删除会员系统的年会动态
This commit is contained in:
+27
-4
@@ -133,10 +133,16 @@ public class StandardsMeetingController extends JeroController<PayMeeting, IPayM
|
||||
@Transactional
|
||||
public Result<?> delete(@RequestParam(name = "id") String id) {
|
||||
extracted(id);
|
||||
PayMeeting payMeeting = payMeetingService.getById(id);
|
||||
payMeetingService.deleteById(id);
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("id",id);
|
||||
AuthenticationUtils.get("/stablecrosstraining/stableCrossTraining/deleteIncome",paramMap);
|
||||
Integer tbMeetingType = payMeeting.getTbMeetingType();
|
||||
if (Objects.equals(tbMeetingType,3)){
|
||||
AuthenticationUtils.get("/meetingNews/meetingNews/deleteIncome",paramMap);
|
||||
}else {
|
||||
AuthenticationUtils.get("/stablecrosstraining/stableCrossTraining/deleteIncome",paramMap);
|
||||
}
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
@@ -159,13 +165,30 @@ public class StandardsMeetingController extends JeroController<PayMeeting, IPayM
|
||||
@Transactional
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids") String ids) {
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
List<String> idList2 = new ArrayList<>();
|
||||
List<String> idList3 = new ArrayList<>();
|
||||
for (String id : idList) {
|
||||
extracted(id);
|
||||
PayMeeting payMeeting = payMeetingService.getById(id);
|
||||
Integer tbMeetingType = payMeeting.getTbMeetingType();
|
||||
if (Objects.equals(tbMeetingType,3)){
|
||||
idList3.add(id);
|
||||
}else {
|
||||
idList2.add(id);
|
||||
}
|
||||
}
|
||||
this.payMeetingService.deleteByIds(idList);
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("ids",ids);
|
||||
AuthenticationUtils.get("/stablecrosstraining/stableCrossTraining/deleteBatchIncome",paramMap);
|
||||
if (!idList2.isEmpty()) {
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("ids",idList2);
|
||||
AuthenticationUtils.get("/stablecrosstraining/stableCrossTraining/deleteBatchIncome",paramMap);
|
||||
}
|
||||
if (!idList3.isEmpty()) {
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("ids",idList3);
|
||||
AuthenticationUtils.get("/meetingNews/meetingNews/deleteBatchIncome",paramMap);
|
||||
}
|
||||
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package com.jero.standards.meetingNews.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class MeetingListsVo {
|
||||
private String id;
|
||||
private Integer meetingType;
|
||||
private String meetingName;
|
||||
|
||||
}
|
||||
+144
@@ -0,0 +1,144 @@
|
||||
package com.jero.standards.meetingNews.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jero.common.system.base.entity.JeroEntity;
|
||||
import com.jero.standards.jiudian.hotelcontact.entity.HotelContact;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 年会动态
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2021-05-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("web_meeting_news")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="web_meeting_news对象", description="年会动态")
|
||||
public class MeetingNews extends JeroEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "会议主题", width = 15)
|
||||
@ApiModelProperty(value = "会议主题")
|
||||
@TableField("conference_theme")
|
||||
private String conferenceTheme;
|
||||
|
||||
@Excel(name = "召开时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "召开时间")
|
||||
@TableField("hold_time")
|
||||
private String holdTime;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "召开开始时间")
|
||||
@TableField("convoke_start_time")
|
||||
private Date convokeStartTime;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "召开结束时间")
|
||||
@TableField("convoke_end_time")
|
||||
private Date convokeEndTime;
|
||||
|
||||
@Excel(name = "召开地点", width = 15)
|
||||
@ApiModelProperty(value = "召开地点")
|
||||
@TableField("place")
|
||||
private String place;
|
||||
|
||||
@Excel(name = "召开地点名称", width = 15)
|
||||
@ApiModelProperty(value = "召开地点名称")
|
||||
@TableField("place_name")
|
||||
private String placeName;
|
||||
|
||||
@Excel(name = "会议介绍", width = 15)
|
||||
@ApiModelProperty(value = "会议介绍")
|
||||
@TableField("introduction")
|
||||
private String introduction;
|
||||
|
||||
@Excel(name = "宣传图", width = 15)
|
||||
@ApiModelProperty(value = "宣传图")
|
||||
@TableField("propaganda_map")
|
||||
private String propagandaMap;
|
||||
|
||||
@Excel(name = "交通信息", width = 15)
|
||||
@ApiModelProperty(value = "交通信息")
|
||||
@TableField("traffic")
|
||||
private String traffic;
|
||||
|
||||
@Excel(name = "详情资讯", width = 15)
|
||||
@ApiModelProperty(value = "详情资讯")
|
||||
@TableField("details")
|
||||
private String details;
|
||||
|
||||
@Excel(name = "会议日程", width = 15)
|
||||
@ApiModelProperty(value = "会议日程")
|
||||
@TableField("schedule")
|
||||
private String schedule;
|
||||
|
||||
@Excel(name = "会议通知", width = 15)
|
||||
@ApiModelProperty(value = "会议通知")
|
||||
@TableField("announcement")
|
||||
private String announcement;
|
||||
|
||||
@Excel(name = "新闻报道", width = 15)
|
||||
@ApiModelProperty(value = "新闻报道")
|
||||
@TableField("news_report")
|
||||
private String newsReport;
|
||||
|
||||
@Excel(name = "报名链接", width = 15)
|
||||
@ApiModelProperty(value = "报名链接")
|
||||
@TableField("conference_registration")
|
||||
private String conferenceRegistration;
|
||||
|
||||
@Excel(name = "报名二维码", width = 15)
|
||||
@ApiModelProperty(value = "报名二维码")
|
||||
@TableField("conference_registration_img")
|
||||
private String conferenceRegistrationImg;
|
||||
|
||||
@Excel(name = "管理员", width = 15)
|
||||
@ApiModelProperty(value = "管理员")
|
||||
@TableField("administrator")
|
||||
private String administrator;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "1.宣贯, 2.年会")
|
||||
@TableField(exist = false)
|
||||
private Integer meetingType;
|
||||
|
||||
@ApiModelProperty(value = "酒店名称")
|
||||
@Excel(name = "酒店名称", width = 15)
|
||||
@TableField(exist = false)
|
||||
private String hotelName;
|
||||
|
||||
@ApiModelProperty(value = "地址")
|
||||
@Excel(name = "地址", width = 15)
|
||||
@TableField(exist = false)
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value = "联系人")
|
||||
@Excel(name = "联系人", width = 15)
|
||||
@TableField(exist = false)
|
||||
private String contactPerson;
|
||||
|
||||
@ApiModelProperty(value = "电话")
|
||||
@Excel(name = "电话", width = 15)
|
||||
@TableField(exist = false)
|
||||
private String telephoneNumber;
|
||||
|
||||
@ApiModelProperty("酒店联系人集合")
|
||||
@TableField(exist = false)
|
||||
private List<HotelContact> hotelList;
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.jero.standards.meetingNews.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ResultMeetings {
|
||||
private String code;
|
||||
private String area;
|
||||
private Integer number;
|
||||
private List<MeetingListsVo> meetingListsVos;
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.jero.standards.meetingNews.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ResultProvince {
|
||||
|
||||
//省份码
|
||||
private String code;
|
||||
|
||||
//城市数
|
||||
private Integer number;
|
||||
|
||||
//省份名称
|
||||
private String area;
|
||||
|
||||
//城市名称
|
||||
private List<String> cityNames;
|
||||
|
||||
//踏足省份/城市/城市集合
|
||||
private Map<String, Object> map;
|
||||
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.jero.standards.meetingNews.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.standards.jiudian.hotelManagement.entity.HotelManagement;
|
||||
import com.jero.standards.meetingNews.entity.MeetingNews;
|
||||
import com.jero.standards.xuanguan.stablecrosstraining.entity.StableCrossTraining;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 年会动态
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2021-05-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Repository
|
||||
public interface MeetingNewsMapper extends BaseMapper<MeetingNews> {
|
||||
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.standards.meetingNews.mapper.MeetingNewsMapper">
|
||||
|
||||
</mapper>
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.jero.standards.meetingNews.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.standards.jiudian.hotelManagement.entity.HotelManagement;
|
||||
import com.jero.standards.meetingNews.entity.MeetingNews;
|
||||
import com.jero.standards.meetingNews.entity.ResultMeetings;
|
||||
import com.jero.standards.meetingNews.entity.ResultProvince;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 年会动态
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2021-05-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IMeetingNewsService extends IService<MeetingNews> {
|
||||
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.jero.standards.meetingNews.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.util.Assert;
|
||||
import com.jero.common.util.BaseUtil;
|
||||
import com.jero.common.util.TokenUtils;
|
||||
import com.jero.common.util.charReplaceUtil;
|
||||
import com.jero.standards.jiudian.hotelManagement.entity.HotelManagement;
|
||||
import com.jero.standards.jiudian.hotelManagement.service.IHotelManagementService;
|
||||
import com.jero.standards.jiudian.hotelcontact.entity.HotelContact;
|
||||
import com.jero.standards.jiudian.hotelcontact.mapper.HotelContactMapper;
|
||||
import com.jero.standards.jiudian.hotelcontact.service.IHotelContactService;
|
||||
import com.jero.standards.meetingNews.entity.MeetingListsVo;
|
||||
import com.jero.standards.meetingNews.entity.MeetingNews;
|
||||
import com.jero.standards.meetingNews.entity.ResultMeetings;
|
||||
import com.jero.standards.meetingNews.entity.ResultProvince;
|
||||
import com.jero.standards.meetingNews.mapper.MeetingNewsMapper;
|
||||
import com.jero.standards.meetingNews.service.IMeetingNewsService;
|
||||
import com.jero.standards.xuanguan.stablecrosstraining.entity.StableCrossTraining;
|
||||
import com.jero.standards.xuanguan.stablecrosstraining.mapper.StableCrossTrainingMapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: 年会动态
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2021-05-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@DS(value = "multi-datasource1")
|
||||
public class MeetingNewsServiceImpl extends ServiceImpl<MeetingNewsMapper, MeetingNews> implements IMeetingNewsService {
|
||||
|
||||
}
|
||||
+145
-49
@@ -22,12 +22,15 @@ import com.jero.standards.jiudian.hotelManagement.service.IHotelManagementServic
|
||||
import com.jero.standards.jiudian.hotelcontact.entity.HotelContact;
|
||||
import com.jero.standards.jiudian.hotelcontact.mapper.HotelContactMapper;
|
||||
import com.jero.standards.jiudian.hotelcontact.service.IHotelContactService;
|
||||
import com.jero.standards.meetingNews.entity.MeetingNews;
|
||||
import com.jero.standards.meetingNews.service.IMeetingNewsService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.jero.standards.xuanguan.attendmeetings.entity.AttendMeetings;
|
||||
import com.jero.standards.xuanguan.attendmeetings.service.IAttendMeetingsService;
|
||||
import com.jero.standards.xuanguan.stablecrosstraining.entity.StableCrossTraining;
|
||||
import com.jero.standards.xuanguan.stablecrosstraining.mapper.StableCrossTrainingMapper;
|
||||
import com.jero.standards.xuanguan.stablecrosstraining.service.IStableCrossTrainingService;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
@@ -60,6 +63,8 @@ public class StableCrossTrainingServiceImpl extends ServiceImpl<StableCrossTrain
|
||||
private StableCrossTrainingMapper stableCrossTrainingMapper;
|
||||
@Autowired
|
||||
private IStableCrossTrainingService stableCrossTrainingService;
|
||||
@Autowired
|
||||
private IMeetingNewsService meetingNewsService;
|
||||
@Resource
|
||||
private IOSSFileService iossFileService;
|
||||
|
||||
@@ -116,37 +121,98 @@ public class StableCrossTrainingServiceImpl extends ServiceImpl<StableCrossTrain
|
||||
return stableCrossTraining;
|
||||
}
|
||||
|
||||
private MeetingNews pushNews(PayMeeting payMeeting, List<PayMeetingHotelContacts> hotelContactsList) {
|
||||
MeetingNews meetingNews = new MeetingNews();
|
||||
meetingNews.setId(payMeeting.getId());
|
||||
meetingNews.setConferenceTheme(payMeeting.getMeetingName());
|
||||
Date startTime = payMeeting.getStartTime();
|
||||
Date endTime = payMeeting.getEndTime();
|
||||
meetingNews.setHoldTime(DateUtil.formatDateTime(startTime) + "至" + DateUtil.formatDateTime(endTime));
|
||||
meetingNews.setConvokeStartTime(startTime);
|
||||
meetingNews.setConvokeEndTime(endTime);
|
||||
meetingNews.setPlace(payMeeting.getConvokeLocale());
|
||||
meetingNews.setPlaceName(payMeeting.getVenue());
|
||||
meetingNews.setIntroduction(payMeeting.getMeetingContent());
|
||||
meetingNews.setAnnouncement(payMeeting.getMeetingFiles());
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
meetingNews.setAdministrator(sysUser.getRealname());
|
||||
meetingNews.setHotelName(payMeeting.getHotelName());
|
||||
meetingNews.setAddress(payMeeting.getHotelAddress());
|
||||
List<HotelContact> hotelList = new ArrayList<>();
|
||||
List<PayMeetingHotelContacts> hotelContactsList1 = payMeeting.getHotelContactsList();
|
||||
for (PayMeetingHotelContacts meetingHotelContacts : hotelContactsList1) {
|
||||
HotelContact hotelContact = new HotelContact();
|
||||
hotelContact.setContactPerson(meetingHotelContacts.getHotelContacts());
|
||||
hotelContact.setTelephoneNumber(meetingHotelContacts.getHotelContactsPhone());
|
||||
hotelList.add(hotelContact);
|
||||
}
|
||||
meetingNews.setHotelList(hotelList);
|
||||
|
||||
return meetingNews;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Override
|
||||
public Boolean add(PayMeeting payMeeting, List<PayMeetingHotelContacts> hotelContactsList) {
|
||||
StableCrossTraining stableCrossTraining = push(payMeeting, hotelContactsList);
|
||||
// 会议名称唯一校验
|
||||
LambdaQueryWrapper<StableCrossTraining> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(StableCrossTraining::getName, stableCrossTraining.getName());
|
||||
int count = stableCrossTrainingService.count(wrapper);
|
||||
if (count > 0) {
|
||||
throw new JeroBootException("会议名称与标协会员系统重复");
|
||||
Integer tbMeetingType = payMeeting.getTbMeetingType();
|
||||
if (Objects.equals(tbMeetingType,1)||Objects.equals(tbMeetingType,2)){
|
||||
StableCrossTraining stableCrossTraining = push(payMeeting, hotelContactsList);
|
||||
// 会议名称唯一校验
|
||||
LambdaQueryWrapper<StableCrossTraining> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(StableCrossTraining::getName, stableCrossTraining.getName());
|
||||
int count = stableCrossTrainingService.count(wrapper);
|
||||
if (count > 0) {
|
||||
throw new JeroBootException("会议名称与标协会员系统重复");
|
||||
}
|
||||
//配置培训状态
|
||||
this.isTrainingState(stableCrossTraining);
|
||||
Boolean resFlag = stableCrossTrainingService.save(stableCrossTraining);
|
||||
//创建时间/创建人/修改时间/修改人
|
||||
BaseUtil.create(stableCrossTraining, "e9ca23d68d884d4ebb19d07889727dae");
|
||||
//添加酒店信息
|
||||
HotelManagement hotelManagement = new HotelManagement();
|
||||
hotelManagement.setHotelList(stableCrossTraining.getHotelList());
|
||||
hotelManagement.setTrainingId(stableCrossTraining.getId())
|
||||
.setConferenceTheme(stableCrossTraining.getName()).setHoldTime(stableCrossTraining.getConvokeTime())
|
||||
.setPlace(stableCrossTraining.getConvokeLocale()).setPlaceName(stableCrossTraining.getPlaceName())
|
||||
.setHotelName(stableCrossTraining.getHotelName()).setAddress(stableCrossTraining.getHotelAddress())
|
||||
.setMeetingType(1);
|
||||
hotelManagementService.add(hotelManagement);
|
||||
return resFlag;
|
||||
}else if (Objects.equals(tbMeetingType,3)){
|
||||
MeetingNews meetingNews = pushNews(payMeeting, hotelContactsList);
|
||||
// 会议名称唯一校验
|
||||
LambdaQueryWrapper<MeetingNews> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(MeetingNews::getConferenceTheme, meetingNews.getConferenceTheme());
|
||||
int count = meetingNewsService.count(wrapper);
|
||||
if (count > 0) {
|
||||
throw new JeroBootException("会议名称与标协会员系统重复");
|
||||
}
|
||||
boolean resFlag = meetingNewsService.save(meetingNews);
|
||||
if (!resFlag) {
|
||||
throw new JeroBootException("添加年会动态失败");
|
||||
}
|
||||
//创建时间/创建人/修改时间/修改人
|
||||
BaseUtil.create(meetingNews, "e9ca23d68d884d4ebb19d07889727dae");
|
||||
//添加酒店信息
|
||||
HotelManagement hotelManagement = new HotelManagement();
|
||||
hotelManagement.setHotelList(meetingNews.getHotelList());
|
||||
hotelManagement.setTrainingId(meetingNews.getId())
|
||||
.setConferenceTheme(meetingNews.getConferenceTheme()).setHoldTime(meetingNews.getHoldTime())
|
||||
.setPlace(meetingNews.getPlace()).setPlaceName(meetingNews.getPlaceName())
|
||||
.setHotelName(meetingNews.getHotelName()).setAddress(meetingNews.getAddress())
|
||||
.setMeetingType(1);
|
||||
hotelManagementService.add(hotelManagement);
|
||||
return resFlag;
|
||||
}
|
||||
//配置培训状态
|
||||
this.isTrainingState(stableCrossTraining);
|
||||
Boolean resFlag = stableCrossTrainingService.save(stableCrossTraining);
|
||||
//创建时间/创建人/修改时间/修改人
|
||||
BaseUtil.create(stableCrossTraining, "e9ca23d68d884d4ebb19d07889727dae");
|
||||
//添加酒店信息
|
||||
HotelManagement hotelManagement = new HotelManagement();
|
||||
hotelManagement.setHotelList(stableCrossTraining.getHotelList());
|
||||
hotelManagement.setTrainingId(stableCrossTraining.getId())
|
||||
.setConferenceTheme(stableCrossTraining.getName()).setHoldTime(stableCrossTraining.getConvokeTime())
|
||||
.setPlace(stableCrossTraining.getConvokeLocale()).setPlaceName(stableCrossTraining.getPlaceName())
|
||||
.setHotelName(stableCrossTraining.getHotelName()).setAddress(stableCrossTraining.getHotelAddress())
|
||||
.setMeetingType(1);
|
||||
hotelManagementService.add(hotelManagement);
|
||||
return resFlag;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//判断培训状态
|
||||
public StableCrossTraining isTrainingState(StableCrossTraining stableCrossTraining) {
|
||||
stableCrossTraining.setMeetingState(0);
|
||||
@@ -182,35 +248,65 @@ public class StableCrossTrainingServiceImpl extends ServiceImpl<StableCrossTrain
|
||||
*/
|
||||
@Override
|
||||
public Boolean edit(PayMeeting payMeeting, List<PayMeetingHotelContacts> hotelContactsList) {
|
||||
StableCrossTraining stableCrossTraining = push(payMeeting, hotelContactsList);
|
||||
Integer tbMeetingType = payMeeting.getTbMeetingType();
|
||||
if (Objects.equals(tbMeetingType,1)||Objects.equals(tbMeetingType,2)){
|
||||
StableCrossTraining stableCrossTraining = push(payMeeting, hotelContactsList);
|
||||
|
||||
// 会议名称唯一校验
|
||||
LambdaQueryWrapper<StableCrossTraining> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(StableCrossTraining::getName, stableCrossTraining.getName());
|
||||
wrapper.ne(StableCrossTraining::getId, stableCrossTraining.getId());
|
||||
int count = stableCrossTrainingService.count(wrapper);
|
||||
if (count > 0) {
|
||||
throw new JeroBootException("会议名称与标协会员系统重复");
|
||||
}
|
||||
//配置培训状态
|
||||
this.isTrainingState(stableCrossTraining);
|
||||
//创建时间/创建人/修改时间/修改人
|
||||
BaseUtil.update(stableCrossTraining, "e9ca23d68d884d4ebb19d07889727dae");
|
||||
//添加酒店信息
|
||||
LambdaQueryWrapper<HotelManagement> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(HotelManagement::getTrainingId, stableCrossTraining.getId());
|
||||
List<HotelManagement> hotelManagements = hotelManagementService.list(queryWrapper);
|
||||
HotelManagement hotelManagement = new HotelManagement();
|
||||
hotelManagement.setHotelList(stableCrossTraining.getHotelList());
|
||||
hotelManagement.setTrainingId(stableCrossTraining.getId())
|
||||
.setConferenceTheme(stableCrossTraining.getName()).setHoldTime(stableCrossTraining.getConvokeTime())
|
||||
.setPlace(stableCrossTraining.getConvokeLocale()).setPlaceName(stableCrossTraining.getPlaceName())
|
||||
.setHotelName(stableCrossTraining.getHotelName()).setAddress(stableCrossTraining.getHotelAddress())
|
||||
// 会议名称唯一校验
|
||||
LambdaQueryWrapper<StableCrossTraining> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(StableCrossTraining::getName, stableCrossTraining.getName());
|
||||
wrapper.ne(StableCrossTraining::getId, stableCrossTraining.getId());
|
||||
int count = stableCrossTrainingService.count(wrapper);
|
||||
if (count > 0) {
|
||||
throw new JeroBootException("会议名称与标协会员系统重复");
|
||||
}
|
||||
//配置培训状态
|
||||
this.isTrainingState(stableCrossTraining);
|
||||
//创建时间/创建人/修改时间/修改人
|
||||
BaseUtil.update(stableCrossTraining, "e9ca23d68d884d4ebb19d07889727dae");
|
||||
//添加酒店信息
|
||||
LambdaQueryWrapper<HotelManagement> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(HotelManagement::getTrainingId, stableCrossTraining.getId());
|
||||
List<HotelManagement> hotelManagements = hotelManagementService.list(queryWrapper);
|
||||
HotelManagement hotelManagement = new HotelManagement();
|
||||
hotelManagement.setHotelList(stableCrossTraining.getHotelList());
|
||||
hotelManagement.setTrainingId(stableCrossTraining.getId())
|
||||
.setConferenceTheme(stableCrossTraining.getName()).setHoldTime(stableCrossTraining.getConvokeTime())
|
||||
.setPlace(stableCrossTraining.getConvokeLocale()).setPlaceName(stableCrossTraining.getPlaceName())
|
||||
.setHotelName(stableCrossTraining.getHotelName()).setAddress(stableCrossTraining.getHotelAddress())
|
||||
// .setContactPerson(stableCrossTraining.getContactPerson()).setContactNumber(stableCrossTraining.getContactNumber())
|
||||
.setMeetingType(1).setId(hotelManagements.get(0).getId());
|
||||
hotelManagementService.edit(hotelManagement);
|
||||
//编辑宣贯信息
|
||||
return stableCrossTrainingService.updateById(stableCrossTraining);
|
||||
.setMeetingType(1).setId(hotelManagements.get(0).getId());
|
||||
hotelManagementService.edit(hotelManagement);
|
||||
//编辑宣贯信息
|
||||
return stableCrossTrainingService.updateById(stableCrossTraining);
|
||||
}else {
|
||||
MeetingNews meetingNews = pushNews(payMeeting, hotelContactsList);
|
||||
// 会议名称唯一校验
|
||||
LambdaQueryWrapper<MeetingNews> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(MeetingNews::getConferenceTheme, meetingNews.getConferenceTheme());
|
||||
wrapper.ne(MeetingNews::getId, meetingNews.getId());
|
||||
int count = meetingNewsService.count(wrapper);
|
||||
if (count > 0) {
|
||||
throw new JeroBootException("会议名称与标协会员系统重复");
|
||||
}
|
||||
boolean resFlag = meetingNewsService.save(meetingNews);
|
||||
if (!resFlag) {
|
||||
throw new JeroBootException("添加年会动态失败");
|
||||
}
|
||||
//创建时间/创建人/修改时间/修改人
|
||||
BaseUtil.create(meetingNews, "e9ca23d68d884d4ebb19d07889727dae");
|
||||
//添加酒店信息
|
||||
HotelManagement hotelManagement = new HotelManagement();
|
||||
hotelManagement.setHotelList(meetingNews.getHotelList());
|
||||
hotelManagement.setTrainingId(meetingNews.getId())
|
||||
.setConferenceTheme(meetingNews.getConferenceTheme()).setHoldTime(meetingNews.getHoldTime())
|
||||
.setPlace(meetingNews.getPlace()).setPlaceName(meetingNews.getPlaceName())
|
||||
.setHotelName(meetingNews.getHotelName()).setAddress(meetingNews.getAddress())
|
||||
.setMeetingType(1);
|
||||
hotelManagementService.edit(hotelManagement);
|
||||
return meetingNewsService.updateById(meetingNews);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user