update 国际研讨会处理参会人金额
This commit is contained in:
+38
-47
@@ -1159,13 +1159,46 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
if (meetingType.equals(Integer.parseInt(MeetingCommon.STANDARD_MEETING))) {
|
||||
checkMember = checkMemberCompany(payMeetingSituation1.getCompanyName());
|
||||
}
|
||||
BigDecimal amountReceivable;
|
||||
if (checkMember){
|
||||
BigDecimal meetingCostsVip = payMeeting.getMeetingCostsVip();
|
||||
isZero = meetingCostsVip.compareTo(new BigDecimal("0.00")) == 0;
|
||||
}else {
|
||||
BigDecimal meetingCosts = payMeeting.getMeetingCosts();
|
||||
isZero = meetingCosts.compareTo(new BigDecimal("0.00")) == 0;
|
||||
amountReceivable = payMeeting.getMeetingCostsVip();
|
||||
}else if(meetingType.equals(MeetingCommon.INTERNATIONAL_MEETING_INT)){
|
||||
Integer isWasic = payMeeting.getIsWasic();
|
||||
if (PayProjectCommon.YES.equals(isWasic)){
|
||||
String linkTopics = payMeeting.getLinkTopics();
|
||||
List<String> linkTopicList = Arrays.asList(linkTopics.split(","));
|
||||
//先判断是否有免费专题
|
||||
String choiceTopic = payMeetingSituation.getChoiceTopic();
|
||||
payMeetingSituation1.setChoiceTopic(choiceTopic);
|
||||
List<String> choiceTopicList = Arrays.asList(choiceTopic.split(","));
|
||||
if (!linkTopicList.containsAll(choiceTopicList)) {
|
||||
throw new JeroBootException("课题名称选择错误");
|
||||
}
|
||||
boolean isFree = false;
|
||||
for (String s : choiceTopicList) {
|
||||
if ("6".equals(s)){
|
||||
isFree = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//根据选择的课题数量,存入金额
|
||||
if (isFree){
|
||||
amountReceivable = BigDecimal.ZERO;
|
||||
}else {
|
||||
if (choiceTopicList.size() <= 2){
|
||||
amountReceivable = payMeeting.getMeetingCostsTwoTopic();
|
||||
}else {
|
||||
amountReceivable = payMeeting.getMeetingCostsThreeTopic();
|
||||
}
|
||||
}
|
||||
}else {
|
||||
amountReceivable = payMeeting.getMeetingCosts();
|
||||
}
|
||||
} else {
|
||||
amountReceivable = payMeeting.getMeetingCosts();
|
||||
}
|
||||
isZero = amountReceivable.compareTo(new BigDecimal("0.00")) == 0;
|
||||
payMeetingSituation1.setAmountReceivable(amountReceivable);
|
||||
|
||||
CommonPeopleVO commonPeopleVO = new CommonPeopleVO();
|
||||
BeanUtils.copyProperties(payMeetingSituation, commonPeopleVO);
|
||||
@@ -1245,48 +1278,7 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
payMeetingSituation1.setOrderCode(orderCode);
|
||||
payMeetingSituation1.setNeedInvoice(payMeetingSituation.getNeedInvoice()==null?0:payMeetingSituation.getNeedInvoice());
|
||||
|
||||
//如果是标协会议判断会员类型
|
||||
if (meetingType.equals(MeetingCommon.STANDARD_MEETING_INT)) {
|
||||
//根据企业名称和会员类型不为null判断是否为标协会员
|
||||
//如果是标协会员就存入会议费用(标协会员)
|
||||
if (checkMember) {
|
||||
payMeetingSituation1.setAmountReceivable(payMeeting.getMeetingCostsVip());
|
||||
} else {
|
||||
payMeetingSituation1.setAmountReceivable(payMeeting.getMeetingCosts());
|
||||
}
|
||||
} else if (meetingType.equals(MeetingCommon.INTERNATIONAL_MEETING_INT)){
|
||||
|
||||
Integer isWasic = payMeeting.getIsWasic();
|
||||
if (PayProjectCommon.YES.equals(isWasic)){
|
||||
String linkTopics = payMeeting.getLinkTopics();
|
||||
List<String> linkTopicList = Arrays.asList(linkTopics.split(","));
|
||||
//先判断是否有免费专题
|
||||
String choiceTopic = payMeetingSituation.getChoiceTopic();
|
||||
payMeetingSituation1.setChoiceTopic(choiceTopic);
|
||||
List<String> choiceTopicList = Arrays.asList(choiceTopic.split(","));
|
||||
if (!linkTopicList.containsAll(choiceTopicList)) {
|
||||
throw new JeroBootException("课题名称选择错误");
|
||||
}
|
||||
boolean isFree = false;
|
||||
for (String s : choiceTopicList) {
|
||||
if ("6".equals(s)){
|
||||
payMeetingSituation1.setAmountReceivable(BigDecimal.ZERO);
|
||||
isFree = true;
|
||||
}
|
||||
}
|
||||
//根据选择的课题数量,存入金额
|
||||
if (!isFree && choiceTopicList.size() <= 2){
|
||||
payMeetingSituation1.setAmountReceivable(payMeeting.getMeetingCostsTwoTopic());
|
||||
}
|
||||
if (!isFree && choiceTopicList.size() > 2){
|
||||
payMeetingSituation1.setAmountReceivable(payMeeting.getMeetingCostsThreeTopic());
|
||||
}
|
||||
}else {
|
||||
payMeetingSituation1.setAmountReceivable(payMeeting.getMeetingCosts());
|
||||
}
|
||||
} else {
|
||||
payMeetingSituation1.setAmountReceivable(payMeeting.getMeetingCosts());
|
||||
}
|
||||
if (!isZero){
|
||||
ValidUtil.validate(commonPeopleVO);
|
||||
}
|
||||
@@ -1311,7 +1303,6 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
payMeetingSituation1.setArrivalTime(payMeetingSituation.getArrivalTime());
|
||||
payMeetingSituation1.setDepartureTime(payMeetingSituation.getDepartureTime());
|
||||
//处理默认税率
|
||||
BigDecimal amountReceivable = payMeetingSituation1.getAmountReceivable();
|
||||
BigDecimal taxRate = payMeetingSituation.getTaxRate();
|
||||
if (taxRate == null){
|
||||
payMeetingSituation1.setTaxRate(StaticConfig.TAX_RATE);
|
||||
|
||||
+16
-16
@@ -69,6 +69,22 @@ public class InternationalMeetingExcel {
|
||||
@Excel(name = "会议费用", width = 15)
|
||||
private BigDecimal meetingCosts;
|
||||
|
||||
/**是否WASIC*/
|
||||
@Excel(name = "是否WASIC", width = 15, dicCode = "yn")
|
||||
private Integer isWasic;
|
||||
|
||||
/**关联课题*/
|
||||
@Excel(name = "关联课题", width = 15, dicCode = "linkTopics")
|
||||
private String linkTopics;
|
||||
|
||||
/**会议费用(2个课题)*/
|
||||
@Excel(name = "会议费用(2个课题)", width = 15)
|
||||
private BigDecimal meetingCostsTwoTopic;
|
||||
|
||||
/**会议费用(3个及以上)*/
|
||||
@Excel(name = "会议费用(3个及以上)", width = 15)
|
||||
private BigDecimal meetingCostsThreeTopic;
|
||||
|
||||
/**会议负责人*/
|
||||
@Excel(name = "会议负责人", width = 15)
|
||||
private String directorName;
|
||||
@@ -97,22 +113,6 @@ public class InternationalMeetingExcel {
|
||||
@Excel(name = "参展商邀请码", width = 15)
|
||||
private java.lang.String exhibitorInvitationCode;
|
||||
|
||||
/**是否WASIC*/
|
||||
@Excel(name = "是否WASIC", width = 15, dicCode = "yn")
|
||||
private Integer isWasic;
|
||||
|
||||
/**关联课题*/
|
||||
@Excel(name = "关联课题", width = 15, dicCode = "linkTopics")
|
||||
private String linkTopics;
|
||||
|
||||
/**会议费用(2个课题)*/
|
||||
@Excel(name = "会议费用(2个课题)", width = 15)
|
||||
private BigDecimal meetingCostsTwoTopic;
|
||||
|
||||
/**会议费用(3个及以上)*/
|
||||
@Excel(name = "会议费用(3个及以上)", width = 15)
|
||||
private BigDecimal meetingCostsThreeTopic;
|
||||
|
||||
/**酒店名称*/
|
||||
@Excel(name = "酒店名称", width = 15)
|
||||
private String hotelName;
|
||||
|
||||
Reference in New Issue
Block a user