update 校验嘉宾参数格式
This commit is contained in:
+50
-78
@@ -1,5 +1,4 @@
|
|||||||
package com.jero.meeting.service.impl;
|
package com.jero.meeting.service.impl;
|
||||||
import java.io.File;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateField;
|
import cn.hutool.core.date.DateField;
|
||||||
@@ -27,7 +26,6 @@ import com.jero.common.service.ContractCreateProjectSendMessageService;
|
|||||||
import com.jero.common.system.api.ISysBaseAPI;
|
import com.jero.common.system.api.ISysBaseAPI;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.common.util.AuthenticationUtils;
|
|
||||||
import com.jero.common.util.PasswordUtil;
|
import com.jero.common.util.PasswordUtil;
|
||||||
import com.jero.common.util.ValidUtil;
|
import com.jero.common.util.ValidUtil;
|
||||||
import com.jero.common.util.oConvertUtils;
|
import com.jero.common.util.oConvertUtils;
|
||||||
@@ -75,13 +73,11 @@ import com.jero.project.entity.PayWorkingGroupSubItemContacts;
|
|||||||
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
|
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
|
||||||
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
||||||
import com.jero.standards.memberinfo.service.IMemberInfoService;
|
import com.jero.standards.memberinfo.service.IMemberInfoService;
|
||||||
import com.jero.standards.xuanguan.stablecrosstraining.entity.StableCrossTraining;
|
|
||||||
import com.jero.temporary.service.IPayCompanyManagementTemporaryService;
|
import com.jero.temporary.service.IPayCompanyManagementTemporaryService;
|
||||||
import com.jero.temporary.service.IPayContactsManagementTemporaryService;
|
import com.jero.temporary.service.IPayContactsManagementTemporaryService;
|
||||||
import com.jero.util.ObjRecordUtil;
|
import com.jero.util.ObjRecordUtil;
|
||||||
import com.jero.util.module.ObjRecordUtilModule;
|
import com.jero.util.module.ObjRecordUtilModule;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.logging.log4j.util.Strings;
|
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
@@ -525,7 +521,7 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
|||||||
String meetingId = payMeetingSituation.getMeetingId();
|
String meetingId = payMeetingSituation.getMeetingId();
|
||||||
PayMeeting payMeeting = meetingService.getById(meetingId);
|
PayMeeting payMeeting = meetingService.getById(meetingId);
|
||||||
//判断是否有权限审核
|
//判断是否有权限审核
|
||||||
extracted(payMeetingSituation, payMeeting);
|
verificationGuests(payMeetingSituation, payMeeting);
|
||||||
|
|
||||||
Integer registerCheckResult = payMeetingSituation.getRegisterCheckResult();
|
Integer registerCheckResult = payMeetingSituation.getRegisterCheckResult();
|
||||||
if (!registerCheckResult.equals(MeetingSubitemCommon.SIGNUP_STATUS_1)) {
|
if (!registerCheckResult.equals(MeetingSubitemCommon.SIGNUP_STATUS_1)) {
|
||||||
@@ -592,7 +588,7 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
|||||||
* @author lijiarao
|
* @author lijiarao
|
||||||
* @date 2021/9/28
|
* @date 2021/9/28
|
||||||
*/
|
*/
|
||||||
private void extracted(PayMeetingSituation payMeetingSituation, PayMeeting payMeeting) {
|
private void verificationGuests(PayMeetingSituation payMeetingSituation, PayMeeting payMeeting) {
|
||||||
//判断是否有权限审核
|
//判断是否有权限审核
|
||||||
String directorId = payMeeting.getDirectorId();
|
String directorId = payMeeting.getDirectorId();
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
@@ -624,7 +620,7 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
|||||||
String meetingId = payMeetingSituation.getMeetingId();
|
String meetingId = payMeetingSituation.getMeetingId();
|
||||||
PayMeeting payMeeting = meetingService.getById(meetingId);
|
PayMeeting payMeeting = meetingService.getById(meetingId);
|
||||||
//判断是否有权限审核
|
//判断是否有权限审核
|
||||||
extracted(payMeetingSituation, payMeeting);
|
verificationGuests(payMeetingSituation, payMeeting);
|
||||||
|
|
||||||
Integer registerCheckResult = payMeetingSituation.getRegisterCheckResult();
|
Integer registerCheckResult = payMeetingSituation.getRegisterCheckResult();
|
||||||
if (registerCheckResult.equals(MeetingSubitemCommon.SIGNUP_STATUS_1)) {
|
if (registerCheckResult.equals(MeetingSubitemCommon.SIGNUP_STATUS_1)) {
|
||||||
@@ -1155,41 +1151,8 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
|||||||
}
|
}
|
||||||
InternationalGuestVO internationalGuestVO = new InternationalGuestVO();
|
InternationalGuestVO internationalGuestVO = new InternationalGuestVO();
|
||||||
BeanUtils.copyProperties(payMeetingSituation, internationalGuestVO);
|
BeanUtils.copyProperties(payMeetingSituation, internationalGuestVO);
|
||||||
//合作伙伴和参展商只有最基础的参数所以不需要校验,只需要校验VIP,演讲嘉宾,特邀嘉宾
|
//校验嘉宾
|
||||||
if (!guestType.equals(MeetingSubitemCommon.COOPERATIVE) && !guestType.equals(MeetingSubitemCommon.EXHIBITOR)) {
|
verificationGuests(internationalGuestVO);
|
||||||
//先校验VIP,演讲嘉宾,特邀嘉宾的公共字段
|
|
||||||
List<String> validateReturnList = ValidUtil.validateReturnList(internationalGuestVO);
|
|
||||||
//接站
|
|
||||||
Integer pickUp = internationalGuestVO.getPickUp();
|
|
||||||
if (pickUp.equals(MeetingSubitemCommon.PICK_UP)) {
|
|
||||||
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, PickUp.class));
|
|
||||||
}
|
|
||||||
//送站
|
|
||||||
Integer deliveryStation = internationalGuestVO.getDeliveryStation();
|
|
||||||
if (deliveryStation.equals(MeetingSubitemCommon.DELIVERY_STATION)) {
|
|
||||||
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, DeliveryStation.class));
|
|
||||||
}
|
|
||||||
//校验VIP,演讲嘉宾的公共字段
|
|
||||||
if (!guestType.equals(MeetingSubitemCommon.GUEST)) {
|
|
||||||
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, Guest.class));
|
|
||||||
//用餐
|
|
||||||
Integer haveMeals = internationalGuestVO.getHaveMeals();
|
|
||||||
if (haveMeals.equals(MeetingSubitemCommon.HAVE_MEALS)) {
|
|
||||||
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, HaveMeals.class));
|
|
||||||
}
|
|
||||||
//校验VIP
|
|
||||||
if (guestType.equals(MeetingSubitemCommon.VIP)) {
|
|
||||||
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, VIP.class));
|
|
||||||
Integer checkInHotel = internationalGuestVO.getCheckInHotel();
|
|
||||||
if (checkInHotel.equals(MeetingSubitemCommon.CHECK_IN_HOTEL)) {
|
|
||||||
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, CheckInHotel.class));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!validateReturnList.isEmpty()){
|
|
||||||
throw new JeroBootException(StringUtils.join(validateReturnList,","));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BeanUtils.copyProperties(internationalGuestVO, payMeetingSituation1);
|
BeanUtils.copyProperties(internationalGuestVO, payMeetingSituation1);
|
||||||
setZero(payMeetingSituation1);
|
setZero(payMeetingSituation1);
|
||||||
// 参会人
|
// 参会人
|
||||||
@@ -1410,6 +1373,49 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
|||||||
return payMeetingSituation1;
|
return payMeetingSituation1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验嘉宾参数格式
|
||||||
|
* @param internationalGuestVO
|
||||||
|
*/
|
||||||
|
private static void verificationGuests(InternationalGuestVO internationalGuestVO) {
|
||||||
|
Integer guestType = internationalGuestVO.getGuestType();
|
||||||
|
//合作伙伴和参展商只有最基础的参数所以不需要校验,只需要校验VIP,演讲嘉宾,特邀嘉宾
|
||||||
|
if (!guestType.equals(MeetingSubitemCommon.COOPERATIVE) && !guestType.equals(MeetingSubitemCommon.EXHIBITOR)) {
|
||||||
|
//先校验VIP,演讲嘉宾,特邀嘉宾的公共字段
|
||||||
|
List<String> validateReturnList = ValidUtil.validateReturnList(internationalGuestVO);
|
||||||
|
//接站
|
||||||
|
Integer pickUp = internationalGuestVO.getPickUp();
|
||||||
|
if (pickUp.equals(MeetingSubitemCommon.PICK_UP)) {
|
||||||
|
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, PickUp.class));
|
||||||
|
}
|
||||||
|
//送站
|
||||||
|
Integer deliveryStation = internationalGuestVO.getDeliveryStation();
|
||||||
|
if (deliveryStation.equals(MeetingSubitemCommon.DELIVERY_STATION)) {
|
||||||
|
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, DeliveryStation.class));
|
||||||
|
}
|
||||||
|
//校验VIP,演讲嘉宾的公共字段
|
||||||
|
if (!guestType.equals(MeetingSubitemCommon.GUEST)) {
|
||||||
|
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, Guest.class));
|
||||||
|
//用餐
|
||||||
|
Integer haveMeals = internationalGuestVO.getHaveMeals();
|
||||||
|
if (haveMeals.equals(MeetingSubitemCommon.HAVE_MEALS)) {
|
||||||
|
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, HaveMeals.class));
|
||||||
|
}
|
||||||
|
//校验VIP
|
||||||
|
if (guestType.equals(MeetingSubitemCommon.VIP)) {
|
||||||
|
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, VIP.class));
|
||||||
|
Integer checkInHotel = internationalGuestVO.getCheckInHotel();
|
||||||
|
if (checkInHotel.equals(MeetingSubitemCommon.CHECK_IN_HOTEL)) {
|
||||||
|
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, CheckInHotel.class));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!validateReturnList.isEmpty()){
|
||||||
|
throw new JeroBootException(StringUtils.join(validateReturnList,","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void setZero(PayMeetingSituation payMeetingSituation1) {
|
private void setZero(PayMeetingSituation payMeetingSituation1) {
|
||||||
payMeetingSituation1.setAmountReceivable(BigDecimal.ZERO);
|
payMeetingSituation1.setAmountReceivable(BigDecimal.ZERO);
|
||||||
|
|
||||||
@@ -1789,42 +1795,8 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
|||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
InternationalGuestVO internationalGuestVO = new InternationalGuestVO();
|
InternationalGuestVO internationalGuestVO = new InternationalGuestVO();
|
||||||
BeanUtils.copyProperties(payMeetingSituation, internationalGuestVO);
|
BeanUtils.copyProperties(payMeetingSituation, internationalGuestVO);
|
||||||
Integer guestType = payMeetingSituation.getGuestType();
|
//校验嘉宾
|
||||||
//合作伙伴和参展商只有最基础的参数所以不需要校验,只需要校验VIP,演讲嘉宾,特邀嘉宾
|
verificationGuests(internationalGuestVO);
|
||||||
if (!guestType.equals(MeetingSubitemCommon.COOPERATIVE) && !guestType.equals(MeetingSubitemCommon.EXHIBITOR)) {
|
|
||||||
//先校验VIP,演讲嘉宾,特邀嘉宾的公共字段
|
|
||||||
List<String> validateReturnList = ValidUtil.validateReturnList(internationalGuestVO);
|
|
||||||
//用餐
|
|
||||||
Integer haveMeals = internationalGuestVO.getHaveMeals();
|
|
||||||
if (haveMeals.equals(MeetingSubitemCommon.HAVE_MEALS)) {
|
|
||||||
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, HaveMeals.class));
|
|
||||||
}
|
|
||||||
//接站
|
|
||||||
Integer pickUp = internationalGuestVO.getPickUp();
|
|
||||||
if (pickUp.equals(MeetingSubitemCommon.PICK_UP)) {
|
|
||||||
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, PickUp.class));
|
|
||||||
}
|
|
||||||
//送站
|
|
||||||
Integer deliveryStation = internationalGuestVO.getDeliveryStation();
|
|
||||||
if (deliveryStation.equals(MeetingSubitemCommon.DELIVERY_STATION)) {
|
|
||||||
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, DeliveryStation.class));
|
|
||||||
}
|
|
||||||
//校验VIP,演讲嘉宾的公共字段
|
|
||||||
if (!guestType.equals(MeetingSubitemCommon.GUEST)) {
|
|
||||||
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, Guest.class));
|
|
||||||
//校验VIP
|
|
||||||
if (guestType.equals(MeetingSubitemCommon.VIP)) {
|
|
||||||
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, VIP.class));
|
|
||||||
Integer checkInHotel = internationalGuestVO.getCheckInHotel();
|
|
||||||
if (checkInHotel.equals(MeetingSubitemCommon.CHECK_IN_HOTEL)) {
|
|
||||||
validateReturnList.addAll(ValidUtil.validateReturnList(internationalGuestVO, CheckInHotel.class));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!validateReturnList.isEmpty()) {
|
|
||||||
throw new JeroBootException(StringUtils.join(validateReturnList, ","));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
PayMeetingSituation update = new PayMeetingSituation();
|
PayMeetingSituation update = new PayMeetingSituation();
|
||||||
update.setId(id);
|
update.setId(id);
|
||||||
BeanUtils.copyProperties(internationalGuestVO, update);
|
BeanUtils.copyProperties(internationalGuestVO, update);
|
||||||
|
|||||||
Reference in New Issue
Block a user