add 会议联系人
This commit is contained in:
+13
-44
@@ -9,12 +9,10 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.service.SendMessageService;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
@@ -27,10 +25,11 @@ import com.jero.data.service.IPayCaseCommitteeService;
|
||||
import com.jero.data.service.IPayCaseCommitteeSubitemService;
|
||||
import com.jero.data.service.IPayCaseCouncilSubitemService;
|
||||
import com.jero.meeting.common.MeetingCommon;
|
||||
import com.jero.meeting.common.MeetingSubitemCommon;
|
||||
import com.jero.meeting.entity.PayMeeting;
|
||||
import com.jero.meeting.entity.PayMeetingContacts;
|
||||
import com.jero.meeting.entity.PayMeetingHotelContacts;
|
||||
import com.jero.meeting.entity.PayMeetingSituation;
|
||||
import com.jero.meeting.service.IPayMeetingContactsService;
|
||||
import com.jero.meeting.service.IPayMeetingHotelContactsService;
|
||||
import com.jero.meeting.service.IPayMeetingService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@@ -57,7 +56,6 @@ import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
@@ -86,8 +84,6 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
|
||||
@Resource
|
||||
private IPayWorkingGroupService payWorkingGroupService;
|
||||
@Resource
|
||||
private AuthenticationUtils authenticationUtils;
|
||||
@Resource
|
||||
private IOSSFileService iossFileService;
|
||||
@Resource
|
||||
private IPayCaseCommitteeService payCaseCommitteeService;
|
||||
@@ -101,16 +97,14 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
|
||||
private IPayCaseCommitteeSubitemService payCaseCommitteeSubitemService;
|
||||
@Resource
|
||||
private IPayCaseCouncilSubitemService payCaseCouncilSubitemService;
|
||||
@Resource
|
||||
private Environment env;
|
||||
@Resource
|
||||
private SendMessageService sendMessageService;
|
||||
@Value(value = "${jero.uploadType}")
|
||||
private String uploadType;
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
@Resource
|
||||
private IOSSFileService ossFileService;
|
||||
@Resource
|
||||
private IPayMeetingContactsService meetingContactsService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@@ -244,40 +238,16 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
///**
|
||||
// * 通过id删除
|
||||
//@RequiresPermissions("meeting: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("meeting: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) {
|
||||
public Result<PayMeetingVO> queryById(@RequestParam(name = "id") String id) {
|
||||
Date now = new Date();
|
||||
PayMeeting meeting = payMeetingService.queryByIdAndTime(id,now);
|
||||
if (meeting == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
throw new JeroBootException("未找到对应数据");
|
||||
}
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseAPI.getUserById(meeting.getDirectorId());
|
||||
@@ -287,17 +257,20 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(meeting, payMeetingVO);
|
||||
String meetingType = meeting.getMeetingType().toString();
|
||||
//String meetingType1 = sysBaseAPI.translateDict("meeting_type", meetingType);
|
||||
payMeetingVO.setMeetingType(meetingType);
|
||||
if (meeting.getTbMeetingType() != null) {
|
||||
payMeetingVO.setTbMeetingType(meeting.getTbMeetingType().toString());
|
||||
}
|
||||
//payMeetingVO.setHotelContactsList(new ArrayList<>());
|
||||
//会议查询酒店联系人列表
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
payMeetingVO.setHotelContactsList(payMeetingHotelContactsList);
|
||||
//查询会议联系人
|
||||
LambdaQueryWrapper<PayMeetingContacts> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PayMeetingContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingContacts> meetingContactsList = meetingContactsService.list(queryWrapper);
|
||||
payMeetingVO.setMeetingContactsList(meetingContactsList);
|
||||
//标协会议类型
|
||||
//String tbMeetingType = meeting.getTbMeetingType().toString();
|
||||
//String type = sysBaseAPI.translateDict("standard_meeting_type", tbMeetingType);
|
||||
@@ -440,10 +413,7 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
|
||||
* 新增标协会议
|
||||
*/
|
||||
@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);
|
||||
public Result<?> addStandards(@RequestBody PayMeeting payMeeting) {
|
||||
payMeetingService.addStandards(payMeeting);
|
||||
return Result.OK("合并开票成功!");
|
||||
}
|
||||
@@ -452,7 +422,7 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
|
||||
* 新增会议文件
|
||||
*/
|
||||
@PostMapping(value = "/addStandardsFile")
|
||||
public Result<?> addStandardsFile(@RequestBody List<OSSFile> ossFileList, HttpServletRequest request) {
|
||||
public Result<?> addStandardsFile(@RequestBody List<OSSFile> ossFileList) {
|
||||
for (OSSFile ossFile : ossFileList) {
|
||||
iossFileService.saveOrUpdate(ossFile);
|
||||
}
|
||||
@@ -463,7 +433,6 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
|
||||
* 预览图片&下载文件
|
||||
*
|
||||
* @param id 传入文件id
|
||||
* @param response
|
||||
*/
|
||||
@ApiOperation(value = "企业端会议下载资料", notes = "企业端会议下载资料")
|
||||
@GetMapping(value = "/userDownload/{id}/{meetingId}")
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.jero.meeting.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 会议关联联系人表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-01-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("pay_meeting_contacts")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="pay_meeting_contacts对象", description="会议关联联系人表")
|
||||
public class PayMeetingContacts implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(hidden = true)
|
||||
private String id;
|
||||
|
||||
/**会议id*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private String meetingId;
|
||||
|
||||
/**会议联系人id*/
|
||||
@ApiModelProperty(value = "会议联系人id")
|
||||
private String meetingContactsId;
|
||||
|
||||
/**会议联系人姓名*/
|
||||
@Excel(name = "会议联系人姓名", width = 15)
|
||||
@ApiModelProperty(value = "会议联系人姓名")
|
||||
private String meetingContactsName;
|
||||
|
||||
/**会议联系人电话*/
|
||||
@Excel(name = "会议联系人电话", width = 15)
|
||||
@ApiModelProperty(value = "会议联系人电话")
|
||||
private String meetingContactsPhone;
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.meeting.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.meeting.entity.PayMeetingContacts;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 会议关联联系人表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-01-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface PayMeetingContactsMapper extends BaseMapper<PayMeetingContacts> {
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<?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.meeting.mapper.PayMeetingContactsMapper">
|
||||
<resultMap id="PayMeetingContactsResultMap" type="com.jero.meeting.entity.PayMeetingContacts">
|
||||
<id column="id" property="id" />
|
||||
<result column="meeting_id" property="meetingId" />
|
||||
<result column="meeting_contacts_id" property="meetingContactsId" />
|
||||
<result column="meeting_contacts_name" property="meetingContactsName" />
|
||||
<result column="meeting_contacts_phone" property="meetingContactsPhone" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.jero.meeting.service;
|
||||
|
||||
import com.jero.meeting.entity.PayMeetingContacts;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 会议关联联系人表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-01-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IPayMeetingContactsService extends IService<PayMeetingContacts> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
void add(PayMeetingContacts payMeetingContacts);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
void editById(PayMeetingContacts payMeetingContacts);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*/
|
||||
PayMeetingContacts queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
List<PayMeetingContacts> queryList();
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.jero.meeting.service.impl;
|
||||
|
||||
import com.jero.meeting.entity.PayMeetingContacts;
|
||||
import com.jero.meeting.mapper.PayMeetingContactsMapper;
|
||||
import com.jero.meeting.service.IPayMeetingContactsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 会议关联联系人表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-01-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class PayMeetingContactsServiceImpl extends ServiceImpl<PayMeetingContactsMapper, PayMeetingContacts> implements IPayMeetingContactsService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Override
|
||||
public void add(PayMeetingContacts payMeetingContacts) {
|
||||
save(payMeetingContacts);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
@Override
|
||||
public void editById(PayMeetingContacts payMeetingContacts) {
|
||||
saveOrUpdate(payMeetingContacts);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*/
|
||||
@Override
|
||||
public PayMeetingContacts queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@Override
|
||||
public List<PayMeetingContacts> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
+35
-8
@@ -34,15 +34,9 @@ import com.jero.data.service.IPayCaseCouncilService;
|
||||
import com.jero.data.service.IPayCaseCouncilSubitemService;
|
||||
import com.jero.meeting.common.MeetingCommon;
|
||||
import com.jero.meeting.common.MeetingSubitemCommon;
|
||||
import com.jero.meeting.entity.PayMeeting;
|
||||
import com.jero.meeting.entity.PayMeetingHotelContacts;
|
||||
import com.jero.meeting.entity.PayMeetingRemindRecord;
|
||||
import com.jero.meeting.entity.PayMeetingSituation;
|
||||
import com.jero.meeting.entity.*;
|
||||
import com.jero.meeting.mapper.PayMeetingMapper;
|
||||
import com.jero.meeting.service.IPayMeetingHotelContactsService;
|
||||
import com.jero.meeting.service.IPayMeetingRemindRecordService;
|
||||
import com.jero.meeting.service.IPayMeetingService;
|
||||
import com.jero.meeting.service.IPayMeetingSituationService;
|
||||
import com.jero.meeting.service.*;
|
||||
import com.jero.meeting.valid.group.CaseCommitteeMeeting;
|
||||
import com.jero.meeting.valid.group.InternationalMeeting;
|
||||
import com.jero.meeting.valid.group.StandardMeeting;
|
||||
@@ -126,6 +120,8 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
private RolePermissionService rolePermissionService;
|
||||
@Resource
|
||||
private ITbMemberProjectService tbMemberProjectService;
|
||||
@Resource
|
||||
private IPayMeetingContactsService meetingContactsService;
|
||||
|
||||
/**
|
||||
* 新增会议
|
||||
@@ -145,6 +141,8 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
);
|
||||
meetingHotelContactsService.saveBatch(hotelContactsList);
|
||||
}
|
||||
//会议联系人
|
||||
addMeetingContactsList(payMeetingVO, payMeeting.getId());
|
||||
//新增会员系统标协会议
|
||||
if (payMeeting.getMeetingType().equals(Integer.parseInt(MeetingCommon.STANDARD_MEETING))) {
|
||||
stableCrossTrainingService.add(payMeeting, hotelContactsList);
|
||||
@@ -263,6 +261,8 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
);
|
||||
meetingHotelContactsService.saveBatch(hotelContactsList);
|
||||
}
|
||||
//会议联系人
|
||||
addMeetingContactsList(payMeetingVO, payMeeting.getId());
|
||||
//编辑标协会议
|
||||
if (payMeeting.getMeetingType().equals(Integer.parseInt(MeetingCommon.STANDARD_MEETING))) {
|
||||
stableCrossTrainingService.edit(payMeeting, hotelContactsList);
|
||||
@@ -281,6 +281,33 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加会议联系人
|
||||
*/
|
||||
private void addMeetingContactsList(PayMeetingVO payMeetingVO, String meetingId) {
|
||||
List<PayMeetingContacts> meetingContactsList = payMeetingVO.getMeetingContactsList();
|
||||
for (PayMeetingContacts payMeetingContacts : meetingContactsList) {
|
||||
String meetingContactsId = payMeetingContacts.getMeetingContactsId();
|
||||
LoginUser loginUser = sysBaseAPI.getUserById(meetingContactsId);
|
||||
if (loginUser == null) {
|
||||
throw new JeroBootException("会议联系人不存在");
|
||||
} else {
|
||||
payMeetingContacts.setMeetingContactsName(loginUser.getUsername());
|
||||
payMeetingContacts.setMeetingContactsPhone(loginUser.getPhone());
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(meetingContactsList)) {
|
||||
//先删除原先的会议联系人,在添加新的
|
||||
LambdaQueryWrapper<PayMeetingContacts> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PayMeetingContacts::getMeetingId, meetingId);
|
||||
meetingContactsService.remove(queryWrapper);
|
||||
meetingContactsList.forEach(meetingContacts ->
|
||||
meetingContacts.setMeetingId(meetingId)
|
||||
);
|
||||
meetingContactsService.saveBatch(meetingContactsList);
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private PayMeeting getPayMeeting(PayMeetingVO payMeetingVO, List<PayMeetingHotelContacts> hotelContactsList) {
|
||||
PayMeeting payMeeting = new PayMeeting();
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import com.jero.common.util.PasswordUtil;
|
||||
import com.jero.meeting.entity.PayMeetingContacts;
|
||||
import com.jero.meeting.entity.PayMeetingHotelContacts;
|
||||
import com.jero.meeting.valid.group.*;
|
||||
import com.jero.modules.system.volid.group.UpdateGroup;
|
||||
@@ -286,4 +287,7 @@ public class PayMeetingVO implements Serializable {
|
||||
@TableField(exist = false)
|
||||
@Dict(dicCode = "meeting_status")
|
||||
private Integer meetingStatus;
|
||||
|
||||
@ApiModelProperty(value = "会议联系人")
|
||||
private List<PayMeetingContacts> meetingContactsList;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user