fix bug 除了会议负责人之外的角色也可以新增参会人
This commit is contained in:
+17
-12
@@ -138,9 +138,12 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
|||||||
}
|
}
|
||||||
|
|
||||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
if (!Objects.equals(payMeeting1.getDirectorId(),loginUser.getId())) {
|
if (!rolePermissionService.getRolePermission("committeeMeetingSituation:add")) {
|
||||||
throw new JeroBootException("只有会议负责人可以新增参会人");
|
if (!Objects.equals(payMeeting1.getDirectorId(),loginUser.getId())) {
|
||||||
|
throw new JeroBootException("只有会议负责人可以新增参会人");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
payMeetingSituation.setStatus(MeetingSubitemCommon.STATUS_3);
|
payMeetingSituation.setStatus(MeetingSubitemCommon.STATUS_3);
|
||||||
//payMeetingSituation.setNeedInvoice(PayProjectCommon.NO);
|
//payMeetingSituation.setNeedInvoice(PayProjectCommon.NO);
|
||||||
payMeetingSituation.setAmountReceivable(new BigDecimal("0"));
|
payMeetingSituation.setAmountReceivable(new BigDecimal("0"));
|
||||||
@@ -252,7 +255,6 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
|||||||
|
|
||||||
private void saveMeetingSituation(PayMeetingSituation payMeetingSituation1) {
|
private void saveMeetingSituation(PayMeetingSituation payMeetingSituation1) {
|
||||||
payMeetingSituation1.setCheckIn(PayProjectCommon.NO);
|
payMeetingSituation1.setCheckIn(PayProjectCommon.NO);
|
||||||
payMeetingSituation1.setCheckResult(MeetingSubitemCommon.SIGNUP_STATUS_0);
|
|
||||||
payMeetingSituation1.setPaidAmount(new BigDecimal("0"));
|
payMeetingSituation1.setPaidAmount(new BigDecimal("0"));
|
||||||
|
|
||||||
//到账
|
//到账
|
||||||
@@ -472,15 +474,17 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
|||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
String sysUserId = sysUser.getId();
|
String sysUserId = sysUser.getId();
|
||||||
String meetingType = payMeeting.getMeetingType().toString();
|
String meetingType = payMeeting.getMeetingType().toString();
|
||||||
if (meetingType.equals(MeetingCommon.INTERNATIONAL_MEETING)) {
|
if (!rolePermissionService.getRolePermission("committeeMeetingSituation:add")) {
|
||||||
//只有会议负责人,对接人可以审批
|
if (meetingType.equals(MeetingCommon.INTERNATIONAL_MEETING)) {
|
||||||
if (!directorId.equals(sysUserId) && !sysUserId.equals(payMeetingSituation.getCompanyContactId())) {
|
//只有会议负责人,对接人可以审批
|
||||||
throw new JeroBootException("只有会议负责人,对接人可以审批");
|
if (!directorId.equals(sysUserId) && !sysUserId.equals(payMeetingSituation.getCompanyContactId())) {
|
||||||
}
|
throw new JeroBootException("只有会议负责人,对接人可以审批");
|
||||||
} else {
|
}
|
||||||
//只有会议负责人可以审批
|
} else {
|
||||||
if (!directorId.equals(sysUserId)) {
|
//只有会议负责人可以审批
|
||||||
throw new JeroBootException("只有会议负责人可以审批");
|
if (!directorId.equals(sysUserId)) {
|
||||||
|
throw new JeroBootException("只有会议负责人可以审批");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -843,6 +847,7 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
|||||||
//要保存的对象
|
//要保存的对象
|
||||||
PayMeetingSituation payMeetingSituation1 = new PayMeetingSituation();
|
PayMeetingSituation payMeetingSituation1 = new PayMeetingSituation();
|
||||||
payMeetingSituation1.setAmountReceivable(new BigDecimal("0"));
|
payMeetingSituation1.setAmountReceivable(new BigDecimal("0"));
|
||||||
|
payMeetingSituation1.setCheckResult(MeetingSubitemCommon.SIGNUP_STATUS_1);
|
||||||
//会议校验基础类
|
//会议校验基础类
|
||||||
MeetingEntity meetingEntity = new MeetingEntity();
|
MeetingEntity meetingEntity = new MeetingEntity();
|
||||||
BeanUtils.copyProperties(payMeetingSituation, meetingEntity);
|
BeanUtils.copyProperties(payMeetingSituation, meetingEntity);
|
||||||
|
|||||||
Reference in New Issue
Block a user