add 分标委会议发布

This commit is contained in:
lijiarao
2021-09-27 11:48:42 +08:00
parent 09b96d5c9d
commit 8c020d4ccc
6 changed files with 53 additions and 18 deletions
@@ -105,7 +105,6 @@ public class PayCaseCommitteeSubitemController extends JeroController<PayCaseCom
* 列表查询 * 列表查询
*/ */
@DictPoint @DictPoint
@AutoLog(value = "分标委成员表-列表查询")
@ApiOperation(value="分标委成员表-列表查询", notes="分标委成员表-列表查询") @ApiOperation(value="分标委成员表-列表查询", notes="分标委成员表-列表查询")
@GetMapping(value = "/list") @GetMapping(value = "/list")
public Result<?> queryPageList(@RequestParam(name="id",required = true) String id, public Result<?> queryPageList(@RequestParam(name="id",required = true) String id,
@@ -128,10 +127,12 @@ public class PayCaseCommitteeSubitemController extends JeroController<PayCaseCom
} }
if (StringUtils.isNotBlank(meetingId)){ if (StringUtils.isNotBlank(meetingId)){
LambdaQueryWrapper<PayMeetingRemindRecord> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<PayMeetingRemindRecord> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PayMeetingRemindRecord::getId,p.getId()); wrapper.eq(PayMeetingRemindRecord::getSubitemId,p.getId());
int count = payMeetingRemindRecordService.count(wrapper); int count = payMeetingRemindRecordService.count(wrapper);
if (count>0){ if (count>0){
p.setRemind(PayProjectCommon.YES); p.setRemind(PayProjectCommon.YES);
}else {
p.setRemind(PayProjectCommon.NO);
} }
} }
}); });
@@ -367,7 +367,7 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
@ApiOperation(value="发布提醒", notes="发布提醒") @ApiOperation(value="发布提醒", notes="发布提醒")
@PostMapping(value = "/publishReminder") @PostMapping(value = "/publishReminder")
public Result<?> publishReminder(@RequestBody PublishReminderVO publishReminderVO) { public Result<?> publishReminder(@RequestBody PublishReminderVO publishReminderVO) {
payMeetingService.publishReminder(publishReminderVO.getMeetingIds(),publishReminderVO.getSubitemIds()); payMeetingService.publishReminder(publishReminderVO);
return Result.OK(); return Result.OK();
} }
@@ -4,6 +4,7 @@ import com.jero.meeting.entity.PayMeeting;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.meeting.entity.PayMeetingSituation; import com.jero.meeting.entity.PayMeetingSituation;
import com.jero.meeting.vo.PayMeetingVO; import com.jero.meeting.vo.PayMeetingVO;
import com.jero.meeting.vo.PublishReminderVO;
import java.util.List; import java.util.List;
@@ -53,10 +54,12 @@ public interface IPayMeetingService extends IService<PayMeeting> {
/** /**
* 发布提醒 * 发布提醒
* @param meetingIds * @param publishReminderVO
* @param subitemIds * @author lijiarao
* @date 2021/9/27
* @return void
*/ */
void publishReminder(List<String> meetingIds, List<String> subitemIds); void publishReminder(PublishReminderVO publishReminderVO);
} }
@@ -16,7 +16,9 @@ import com.jero.company.entity.PayContactsManagement;
import com.jero.company.service.IPayCompanyManagementService; import com.jero.company.service.IPayCompanyManagementService;
import com.jero.company.service.IPayContactsManagementService; import com.jero.company.service.IPayContactsManagementService;
import com.jero.data.entity.PayCaseCommittee; import com.jero.data.entity.PayCaseCommittee;
import com.jero.data.entity.PayCaseCommitteeSubitem;
import com.jero.data.service.IPayCaseCommitteeService; import com.jero.data.service.IPayCaseCommitteeService;
import com.jero.data.service.IPayCaseCommitteeSubitemService;
import com.jero.meeting.common.MeetingCommon; import com.jero.meeting.common.MeetingCommon;
import com.jero.meeting.entity.PayMeeting; import com.jero.meeting.entity.PayMeeting;
import com.jero.meeting.entity.PayMeetingHotelContacts; import com.jero.meeting.entity.PayMeetingHotelContacts;
@@ -32,6 +34,7 @@ import com.jero.meeting.valid.group.InternationalMeeting;
import com.jero.meeting.valid.group.StandardMeeting; import com.jero.meeting.valid.group.StandardMeeting;
import com.jero.meeting.valid.group.WorkingGroupMeeting; import com.jero.meeting.valid.group.WorkingGroupMeeting;
import com.jero.meeting.vo.PayMeetingVO; import com.jero.meeting.vo.PayMeetingVO;
import com.jero.meeting.vo.PublishReminderVO;
import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.oss.service.IOSSFileService;
import com.jero.project.entity.PayWorkingGroup; import com.jero.project.entity.PayWorkingGroup;
import com.jero.project.entity.PayWorkingGroupSubItem; import com.jero.project.entity.PayWorkingGroupSubItem;
@@ -85,9 +88,12 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
@Resource @Resource
private IPayCaseCommitteeService payCaseCommitteeService; private IPayCaseCommitteeService payCaseCommitteeService;
@Resource @Resource
private IPayCaseCommitteeSubitemService payCaseCommitteeSubitemService;
@Resource
private IPayMeetingRemindRecordService payMeetingRemindRecordService; private IPayMeetingRemindRecordService payMeetingRemindRecordService;
@Resource @Resource
private SendMessageService sendMessageService; private SendMessageService sendMessageService;
/** /**
* 新增会议 * 新增会议
*/ */
@@ -368,21 +374,41 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
} }
@Override @Override
public void publishReminder(List<String> meetingIds, List<String> subitemIds) { public void publishReminder(PublishReminderVO publishReminderVO) {
List<PayWorkingGroupSubItem> payWorkingGroupSubItems = payWorkingGroupSubItemService.listByIds(subitemIds); List<String> meetingIds = publishReminderVO.getMeetingIds();
List<String> companyIds = new ArrayList<>(); List<String> subitemIds = publishReminderVO.getSubitemIds();
Integer projectType = publishReminderVO.getProjectType();
//用于新增关联关系 //用于新增关联关系
List<String> meetingIdList = new ArrayList<>(); List<String> meetingIdList = new ArrayList<>();
List<String> subitemIdList = new ArrayList<>(); List<String> subitemIdList = new ArrayList<>();
//把单位会员中所有的联系人和有机联系人取出 //组装查询联系人条件
for (PayWorkingGroupSubItem payWorkingGroupSubItem : payWorkingGroupSubItems) {
subitemIdList.add(payWorkingGroupSubItem.getId());
String companyId = payWorkingGroupSubItem.getChargeCompanyId();
companyIds.add(companyId);
}
//去重
LambdaQueryWrapper<PayContactsManagement> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<PayContactsManagement> wrapper = new LambdaQueryWrapper<>();
wrapper.in(PayContactsManagement::getCompanyId,companyIds); //工作组项目查询公司
if (Objects.equals(projectType,1)){
List<String> companyIds = new ArrayList<>();
List<PayWorkingGroupSubItem> payWorkingGroupSubItems = payWorkingGroupSubItemService.listByIds(subitemIds);
//把单位会员中所有的联系人和有机联系人取出
for (PayWorkingGroupSubItem payWorkingGroupSubItem : payWorkingGroupSubItems) {
subitemIdList.add(payWorkingGroupSubItem.getId());
String companyId = payWorkingGroupSubItem.getChargeCompanyId();
companyIds.add(companyId);
}
wrapper.in(PayContactsManagement::getCompanyId,companyIds);
// 分标委项目查询人
}else if (Objects.equals(projectType,2)){
List<String> contactsIdList = new ArrayList<>();
List<PayCaseCommitteeSubitem> payCaseCommitteeSubitems = payCaseCommitteeSubitemService.listByIds(subitemIds);
for (PayCaseCommitteeSubitem payCaseCommitteeSubitem : payCaseCommitteeSubitems) {
subitemIdList.add(payCaseCommitteeSubitem.getId());
contactsIdList.add(payCaseCommitteeSubitem.getContactsId());
}
wrapper.in(PayContactsManagement::getId,contactsIdList);
}else {
throw new JeroBootException("项目类型不正确");
}
List<PayContactsManagement> list = payContactsManagementService.list(wrapper); List<PayContactsManagement> list = payContactsManagementService.list(wrapper);
//标记会议为已提醒 //标记会议为已提醒
@@ -15,4 +15,6 @@ public class PublishReminderVO {
private List<String> meetingIds; private List<String> meetingIds;
@ApiModelProperty(value = "成员id列表") @ApiModelProperty(value = "成员id列表")
private List<String> subitemIds; private List<String> subitemIds;
@ApiModelProperty(value = "项目类型1:工作组,2:分标委")
private Integer projectType;
} }
@@ -110,10 +110,13 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
for (PayWorkingGroupSubItem workingGroupSubItem : records) { for (PayWorkingGroupSubItem workingGroupSubItem : records) {
String workingGroupSubItemId = workingGroupSubItem.getId(); String workingGroupSubItemId = workingGroupSubItem.getId();
LambdaQueryWrapper<PayMeetingRemindRecord> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<PayMeetingRemindRecord> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PayMeetingRemindRecord::getId,workingGroupSubItemId); wrapper.eq(PayMeetingRemindRecord::getSubitemId,workingGroupSubItemId);
wrapper.eq(PayMeetingRemindRecord::getMeetingId,payWorkingGroupSubitem.getMeetingId());
int count = payMeetingRemindRecordService.count(wrapper); int count = payMeetingRemindRecordService.count(wrapper);
if (count>0){ if (count>0){
workingGroupSubItem.setRemind(PayProjectCommon.YES); workingGroupSubItem.setRemind(PayProjectCommon.YES);
}else {
workingGroupSubItem.setRemind(PayProjectCommon.NO);
} }
} }
} }