add 审核报名信息
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.jero.meeting.common;
|
||||
|
||||
|
||||
import org.aspectj.weaver.ast.Not;
|
||||
|
||||
/**
|
||||
* @author liJiaRao
|
||||
* @date 2021-09-03 11:26
|
||||
@@ -18,6 +20,10 @@ public class MeetingCommon {
|
||||
* 国际研讨会
|
||||
*/
|
||||
public final static String INTERNATIONAL_MEETING = "3";
|
||||
/**
|
||||
* 其他会议
|
||||
*/
|
||||
public final static String OTHER_MEETING = "4";
|
||||
/**
|
||||
* 分标委会议
|
||||
*/
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ public class MeetingSubitemCommon {
|
||||
*/
|
||||
public static final Integer SIGNUP_STATUS_0 = 0;
|
||||
/**
|
||||
* 已审核
|
||||
* 已通过
|
||||
*/
|
||||
public static final Integer SIGNUP_STATUS_1 = 1;
|
||||
/**
|
||||
|
||||
+14
-3
@@ -210,16 +210,27 @@ public class PayMeetingSituationController extends JeroController<PayMeetingSitu
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核
|
||||
* 审核付款凭证
|
||||
*/
|
||||
@AutoLog(value = "审核")
|
||||
@ApiOperation(value = "审核", notes = "审核")
|
||||
@AutoLog(value = "审核付款凭证")
|
||||
@ApiOperation(value = "审核付款凭证")
|
||||
@PostMapping(value = "/check")
|
||||
public Result<?> check(@RequestBody CheckVO checkVO) {
|
||||
payMeetingSituationService.check(checkVO);
|
||||
return Result.OK("审核成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核报名信息
|
||||
*/
|
||||
@AutoLog(value = "审核报名信息")
|
||||
@ApiOperation(value = "审核报名信息")
|
||||
@PostMapping(value = "/checkRegister")
|
||||
public Result<?> checkRegister(@RequestBody CheckVO checkVO) {
|
||||
payMeetingSituationService.checkRegister(checkVO);
|
||||
return Result.OK("审核成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 合并开票
|
||||
*/
|
||||
|
||||
@@ -242,7 +242,11 @@ public class PayMeeting implements Serializable {
|
||||
@Dict(dicCode = "yn")
|
||||
private Integer remind;
|
||||
|
||||
/**付款二维码*/
|
||||
@ApiModelProperty(value = "付款二维码")
|
||||
/**收款二维码*/
|
||||
@ApiModelProperty(value = "收款二维码")
|
||||
private String paymentQrCode;
|
||||
|
||||
/**通知正文*/
|
||||
@ApiModelProperty(value = "通知正文")
|
||||
private String notice;
|
||||
}
|
||||
|
||||
+9
-2
@@ -346,9 +346,9 @@ public class PayMeetingSituation implements Serializable {
|
||||
@ApiModelProperty(value = "对接人姓名")
|
||||
private String dockName;
|
||||
|
||||
/**审核状态*/
|
||||
/**付款凭证审核状态*/
|
||||
//@Excel(name = "审核状态", width = 15)
|
||||
@ApiModelProperty(value = "审核状态")
|
||||
@ApiModelProperty(value = "付款凭证审核状态")
|
||||
@Dict(dicCode = "signup_status")
|
||||
private Integer checkResult;
|
||||
|
||||
@@ -359,6 +359,12 @@ public class PayMeetingSituation implements Serializable {
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal invoiceAmount;
|
||||
|
||||
/**
|
||||
* 报名信息审核状态
|
||||
*/
|
||||
@ApiModelProperty(value = "报名信息审核状态")
|
||||
private Integer registerCheckResult;
|
||||
|
||||
/**审核备注*/
|
||||
@ApiModelProperty(value = "审核备注")
|
||||
@TableField(exist = false)
|
||||
@@ -367,4 +373,5 @@ public class PayMeetingSituation implements Serializable {
|
||||
@ApiModelProperty(value = "邀请码")
|
||||
@TableField(exist = false)
|
||||
private String invitationCode;
|
||||
|
||||
}
|
||||
|
||||
+4
@@ -51,6 +51,8 @@ public interface IPayMeetingSituationService extends IService<PayMeetingSituatio
|
||||
|
||||
void check(CheckVO checkVO);
|
||||
|
||||
void checkRegister(CheckVO checkVO);
|
||||
|
||||
void mergePayBill(MergePayBillVO mergePayBillVO);
|
||||
|
||||
Integer countByMeetingId(String meetingId);
|
||||
@@ -58,4 +60,6 @@ public interface IPayMeetingSituationService extends IService<PayMeetingSituatio
|
||||
Page<MeetingSituationContractVO> contractPage(Page<MeetingSituationContractVO> page, MeetingSituationContractVO meetingSituationContractVO);
|
||||
|
||||
void signIn(SignInVO signInVO);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+69
-1
@@ -1,5 +1,7 @@
|
||||
package com.jero.meeting.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -15,6 +17,8 @@ import com.jero.company.service.IPayContactsManagementService;
|
||||
import com.jero.contract.common.PayIncomeContractCommon;
|
||||
import com.jero.contract.entity.PayIncomeContractAssociated;
|
||||
import com.jero.contract.service.IPayIncomeContractAssociatedService;
|
||||
import com.jero.data.entity.PayCaseCommitteeSubitem;
|
||||
import com.jero.data.service.IPayCaseCommitteeSubitemService;
|
||||
import com.jero.mail.entity.PayMailBill;
|
||||
import com.jero.mail.service.IPayMailBillService;
|
||||
import com.jero.meeting.common.MeetingCommon;
|
||||
@@ -31,6 +35,8 @@ import com.jero.pack.service.IPayPackCompanyProjectService;
|
||||
import com.jero.payment.entity.PayPaymentRecord;
|
||||
import com.jero.payment.service.IPayPaymentRecordService;
|
||||
import com.jero.project.common.PayProjectCommon;
|
||||
import com.jero.project.entity.PayWorkingGroupSubItem;
|
||||
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
||||
import com.jero.standards.memberinfo.service.IMemberInfoService;
|
||||
import com.jero.temporary.service.IPayCompanyManagementTemporaryService;
|
||||
import com.jero.temporary.service.IPayContactsManagementTemporaryService;
|
||||
@@ -82,6 +88,10 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
private IPayPackCompanyProjectService payPackCompanyProjectService;
|
||||
@Resource
|
||||
private IPayIncomeContractAssociatedService payIncomeContractAssociatedService;
|
||||
@Resource
|
||||
private IPayWorkingGroupSubItemService payWorkingGroupSubItemService;
|
||||
@Resource
|
||||
private IPayCaseCommitteeSubitemService payCaseCommitteeSubitemService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -134,6 +144,12 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
payMeetingSituation.setStatus(MeetingSubitemCommon.STATUS_1);
|
||||
String meetingId = payMeetingSituation.getMeetingId();
|
||||
PayMeeting payMeeting = meetingService.getById(meetingId);
|
||||
//判断报名时间
|
||||
Date registerDeadline = payMeeting.getRegisterDeadline();
|
||||
DateTime date = DateUtil.beginOfDay(DateUtil.date());
|
||||
if ((DateUtil.compare(date,registerDeadline) > 0)) {
|
||||
throw new JeroBootException("报名截止时间为:"+DateUtil.formatDate(registerDeadline));
|
||||
}
|
||||
//会议类型
|
||||
Integer meetingType = payMeeting.getMeetingType();
|
||||
//如果是国际研讨会会议并且邀请码不为空就进行比对嘉宾身份
|
||||
@@ -172,9 +188,13 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
public void check(CheckVO checkVO) {
|
||||
String id = checkVO.getId();
|
||||
PayMeetingSituation meetingSituation = getById(id);
|
||||
Integer registerCheckResult = meetingSituation.getRegisterCheckResult();
|
||||
if (registerCheckResult.equals(MeetingSubitemCommon.SIGNUP_STATUS_0)){
|
||||
throw new JeroBootException("报名信息未审核");
|
||||
}
|
||||
String paymentRecord = meetingSituation.getPaymentRecord();
|
||||
if (StrUtil.isBlank(paymentRecord)) {
|
||||
throw new JeroBootException("来款凭证为空不能审核");
|
||||
throw new JeroBootException("付款凭证为空不能审核");
|
||||
}
|
||||
Integer checkResult1 = meetingSituation.getCheckResult();
|
||||
if (checkResult1.equals(PayProjectCommon.YES)) {
|
||||
@@ -199,6 +219,26 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
// payPaymentRecordService.addAmountReceived(payPaymentRecord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkRegister(CheckVO checkVO) {
|
||||
String id = checkVO.getId();
|
||||
PayMeetingSituation meetingSituation = getById(id);
|
||||
Integer registerCheckResult = meetingSituation.getRegisterCheckResult();
|
||||
if (!registerCheckResult.equals(MeetingSubitemCommon.SIGNUP_STATUS_0)){
|
||||
throw new JeroBootException("报名信息已审核");
|
||||
}
|
||||
Integer checkResult = checkVO.getCheckResult();
|
||||
if (checkResult.equals(MeetingSubitemCommon.SIGNUP_STATUS_2)) {
|
||||
meetingSituation.setRegisterCheckResult(MeetingSubitemCommon.SIGNUP_STATUS_2);
|
||||
|
||||
//TODO 提示信息
|
||||
}else {
|
||||
meetingSituation.setRegisterCheckResult(MeetingSubitemCommon.SIGNUP_STATUS_1);
|
||||
|
||||
}
|
||||
saveOrUpdate(meetingSituation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mergePayBill(MergePayBillVO mergePayBillVO) {
|
||||
List<String> meetingSituationIds = mergePayBillVO.getMeetingSituationIds();
|
||||
@@ -454,6 +494,34 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
ValidUtil.validate(commonGuestVO);
|
||||
BeanUtils.copyProperties(commonGuestVO, payMeetingSituation1);
|
||||
}
|
||||
payMeetingSituation1.setRegisterCheckResult(MeetingSubitemCommon.SIGNUP_STATUS_1);
|
||||
//如果是工作组会议或者分标委会议,判断是否为成员
|
||||
if (meetingType.equals(Integer.parseInt(MeetingCommon.WORKING_GROUP_MEETING))){
|
||||
LambdaQueryWrapper<PayWorkingGroupSubItem> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayWorkingGroupSubItem::getWorkingGroupId,payMeeting.getWorkingGroupId());
|
||||
wrapper.eq(PayWorkingGroupSubItem::getChargeCompanyId,payMeetingSituation1.getCompanyId());
|
||||
wrapper.and(i -> i.eq(PayWorkingGroupSubItem::getContactsIdOne,payMeetingSituation1.getCompanyContactId())
|
||||
.or()
|
||||
.eq(PayWorkingGroupSubItem::getContactsIdTwo,payMeetingSituation1.getCompanyContactId())
|
||||
.or()
|
||||
.eq(PayWorkingGroupSubItem::getContactsIdThree,payMeetingSituation1.getCompanyContactId())
|
||||
);
|
||||
int count = payWorkingGroupSubItemService.count(wrapper);
|
||||
if (count<=0){
|
||||
payMeetingSituation1.setRegisterCheckResult(MeetingSubitemCommon.SIGNUP_STATUS_0);
|
||||
}
|
||||
|
||||
}else if (meetingType.equals(Integer.parseInt(MeetingCommon.COMMITTEE_MEETING))){
|
||||
LambdaQueryWrapper<PayCaseCommitteeSubitem> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayCaseCommitteeSubitem::getCommitteeId,payMeeting.getCaseCommitteeId());
|
||||
wrapper.eq(PayCaseCommitteeSubitem::getCompanyId,payMeetingSituation1.getCompanyId());
|
||||
wrapper.eq(PayCaseCommitteeSubitem::getContactsId,payMeetingSituation1.getCompanyContactId());
|
||||
|
||||
int count = payCaseCommitteeSubitemService.count(wrapper);
|
||||
if (count<=0){
|
||||
payMeetingSituation1.setRegisterCheckResult(MeetingSubitemCommon.SIGNUP_STATUS_0);
|
||||
}
|
||||
}
|
||||
return payMeetingSituation1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user