update 功能安全中心报名 校验成员

This commit is contained in:
lijiarao
2024-07-05 09:59:46 +08:00
parent 904319211b
commit 0edd743ee5
2 changed files with 27 additions and 0 deletions
@@ -32,4 +32,11 @@ public class SafetyCenterSubitemContactsService extends ServiceImpl<SafetyCenter
public List<SafetyCenterSubitemContacts> listByParentIdAndContactIdList(String parentId, List<String> contactIdList){
return baseMapper.listByParentIdAndContactIdList(parentId,contactIdList);
}
public boolean checkSafetyCenterSubitem(String projectId, String contactsId) {
LambdaQueryWrapper<SafetyCenterSubitemContacts> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SafetyCenterSubitemContacts::getProjectId,projectId);
wrapper.eq(SafetyCenterSubitemContacts::getContactsId,contactsId);
return count(wrapper) > 0;
}
}
@@ -49,6 +49,7 @@ import com.jero.data.service.IPayCaseCouncilService;
import com.jero.data.service.IPayCaseCouncilSubitemService;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import com.jero.drafting.service.IPayDraftingGroupSubItemContactsService;
import com.jero.functionalsafetycenter.service.SafetyCenterSubitemContactsService;
import com.jero.mail.entity.PayMailBill;
import com.jero.mail.service.IPayMailBillService;
import com.jero.meeting.common.MeetingCommon;
@@ -170,6 +171,8 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
private IPayDraftingGroupSubItemContactsService draftingGroupSubItemContactsService;
@Resource
private ITbMemberProjectSubitemService tbMemberProjectSubitemService;
@Resource
private SafetyCenterSubitemContactsService safetyCenterSubitemContactsService;
private static final String[] CAN_MODIFY_LIST =
@@ -1180,6 +1183,15 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
//判断身份
Integer identity = payMeetingSituation.getIdentity();
payMeetingSituation1.setIsZero(true);
//功能安全中心会议只有成员才能报名
if (meetingType.equals(MeetingCommon.SAFETY_CENTER_MEETING_INT)) {
//校验是否功能安全中心成员
String safetyCenterId = payMeeting.getSafetyCenterId();
boolean b = checkSafetyCenterSubitem(safetyCenterId, companyContactId);
if (!b){
throw new JeroBootException("功能安全中心成员才能报名");
}
}
//国际研讨会会议的嘉宾和其他类型不同
if (meetingType.equals(Integer.parseInt(MeetingCommon.INTERNATIONAL_MEETING)) &&
identity.equals(MeetingSubitemCommon.JIA_BIN)) {
@@ -1425,6 +1437,14 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
return payMeetingSituation1;
}
/**
* 校验是否功能安全中心成员
*/
private boolean checkSafetyCenterSubitem(String safetyCenterId, String companyContactId) {
return safetyCenterSubitemContactsService.checkSafetyCenterSubitem(safetyCenterId, companyContactId);
}
/**
* 校验嘉宾参数格式
* @param internationalGuestVO