update 功能安全中心 发布提醒
This commit is contained in:
+33
@@ -41,6 +41,10 @@ import com.jero.drafting.entity.PayDraftingGroup;
|
||||
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
|
||||
import com.jero.drafting.service.IPayDraftingGroupService;
|
||||
import com.jero.drafting.service.IPayDraftingGroupSubItemContactsService;
|
||||
import com.jero.functionalsafetycenter.entity.SafetyCenter;
|
||||
import com.jero.functionalsafetycenter.entity.SafetyCenterSubitemContacts;
|
||||
import com.jero.functionalsafetycenter.service.SafetyCenterService;
|
||||
import com.jero.functionalsafetycenter.service.SafetyCenterSubitemContactsService;
|
||||
import com.jero.meeting.common.MeetingCommon;
|
||||
import com.jero.meeting.common.MeetingSubitemCommon;
|
||||
import com.jero.meeting.entity.*;
|
||||
@@ -149,6 +153,10 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
private IPayContactsManagementService contactsManagementService;
|
||||
@Resource
|
||||
private PayMeetingStandardProjectService meetingStandardProjectService;
|
||||
@Resource
|
||||
private SafetyCenterService safetyCenterService;
|
||||
@Resource
|
||||
private SafetyCenterSubitemContactsService safetyCenterSubitemContactsService;
|
||||
/**
|
||||
* 新增会议
|
||||
*/
|
||||
@@ -723,6 +731,7 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
List<String> contactsIdList = new ArrayList<>();
|
||||
String workingGroupId = null;
|
||||
String draftingGroupId = null;
|
||||
String safetyCenterId = null;
|
||||
//工作组项目直接是人
|
||||
if (Objects.equals(projectType, 1)) {
|
||||
//把单位会员中所有的联系人取出
|
||||
@@ -784,6 +793,23 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
.setContactId(contactsId)
|
||||
);
|
||||
}
|
||||
}else if (Objects.equals(projectType, 5)) {
|
||||
//把单位会员中所有的联系人取出
|
||||
safetyCenterId = publishReminderVO.getSafetyCenterId();
|
||||
LambdaQueryWrapper<SafetyCenterSubitemContacts> wrapper1 = new LambdaQueryWrapper<>();
|
||||
wrapper1.eq(SafetyCenterSubitemContacts::getProjectId, safetyCenterId);
|
||||
wrapper1.in(SafetyCenterSubitemContacts::getContactsId,subitemIds);
|
||||
List<SafetyCenterSubitemContacts> groupSubItemContactsList = safetyCenterSubitemContactsService.list(wrapper1);
|
||||
for (SafetyCenterSubitemContacts payDraftingGroupSubItemContacts : groupSubItemContactsList) {
|
||||
String subitemId = payDraftingGroupSubItemContacts.getSubitemId();
|
||||
String contactsId = payDraftingGroupSubItemContacts.getContactsId();
|
||||
contactsIdList.add(contactsId);
|
||||
meetingRemindRecordList.add(
|
||||
new PayMeetingRemindRecord()
|
||||
.setSubitemId(subitemId)
|
||||
.setContactId(contactsId)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
throw new JeroBootException("项目类型不正确");
|
||||
}
|
||||
@@ -815,6 +841,13 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
LoginUser userById = sysBaseAPI.getUserById(principalIdA);
|
||||
fromUser = userById.getUsername();
|
||||
}
|
||||
//起草组项目用工作组负责人A发邮件
|
||||
if (Objects.nonNull(safetyCenterId)) {
|
||||
SafetyCenter safetyCenter = safetyCenterService.getById(safetyCenterId);
|
||||
String principalId = safetyCenter.getPrincipalId();
|
||||
LoginUser userById = sysBaseAPI.getUserById(principalId);
|
||||
fromUser = userById.getUsername();
|
||||
}
|
||||
//发送消息
|
||||
int success = list.size();
|
||||
int failed = 0;
|
||||
|
||||
@@ -26,4 +26,6 @@ public class PublishReminderVO {
|
||||
|
||||
@ApiModelProperty(value = "起草组id")
|
||||
private java.lang.String draftingGroupId;
|
||||
@ApiModelProperty(value = "安全中心id")
|
||||
private String safetyCenterId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user