fix:bug
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@ CREATE TABLE `pay_meeting_question` (
|
|||||||
UNIQUE INDEX `id`(`id`) USING BTREE
|
UNIQUE INDEX `id`(`id`) USING BTREE
|
||||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会议征集问题' ROW_FORMAT = Dynamic;
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会议征集问题' ROW_FORMAT = Dynamic;
|
||||||
|
|
||||||
CREATE TABLE `pay_meeting_standerd` (
|
CREATE TABLE `pay_meeting_standard` (
|
||||||
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'id',
|
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'id',
|
||||||
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||||
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
|
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
|
||||||
|
|||||||
+26
-22
@@ -143,8 +143,10 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
|||||||
//进行校验,赋值操作
|
//进行校验,赋值操作
|
||||||
PayMeeting payMeeting = getPayMeeting(payMeetingVO, hotelContactsList);
|
PayMeeting payMeeting = getPayMeeting(payMeetingVO, hotelContactsList);
|
||||||
save(payMeeting);
|
save(payMeeting);
|
||||||
List<PayMeetingStandard> collect = payMeetingVO.getQuestionList().stream().map(s -> s.setMeetingId(payMeeting.getId())).collect(Collectors.toList());
|
if(!org.springframework.util.CollectionUtils.isEmpty(payMeetingVO.getQuestionList())) {
|
||||||
payMeetingStandardService.saveBatch(collect);
|
List<PayMeetingStandard> collect = payMeetingVO.getQuestionList().stream().map(s -> s.setMeetingId(payMeeting.getId())).collect(Collectors.toList());
|
||||||
|
payMeetingStandardService.saveBatch(collect);
|
||||||
|
}
|
||||||
//如果酒店联系人列表不为空,就新增
|
//如果酒店联系人列表不为空,就新增
|
||||||
if (!CollectionUtils.isEmpty(hotelContactsList)) {
|
if (!CollectionUtils.isEmpty(hotelContactsList)) {
|
||||||
String meetingId = payMeeting.getId();
|
String meetingId = payMeeting.getId();
|
||||||
@@ -418,6 +420,28 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
|||||||
TbMemberProject memberProject = getTbMemberProject();
|
TbMemberProject memberProject = getTbMemberProject();
|
||||||
payMeeting.setStandardsId(memberProject.getId());
|
payMeeting.setStandardsId(memberProject.getId());
|
||||||
}
|
}
|
||||||
|
if("1".equals(payMeetingVO.getTbMeetingType())||"2".equals(payMeetingVO.getTbMeetingType())) {
|
||||||
|
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(payMeetingVO.getQuestionList())) {
|
||||||
|
if ("0".equals(payMeetingVO.getIsAddQuestion())) {
|
||||||
|
throw new JeroBootException("征集问题状态冲突");
|
||||||
|
}
|
||||||
|
List<String> list = payMeetingVO.getQuestionList().stream().collect(Collectors.groupingBy(PayMeetingStandard::getStandardNumber, Collectors.counting())).entrySet().stream()
|
||||||
|
.filter(entry -> entry.getValue() > 1)
|
||||||
|
.map(Map.Entry::getKey)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (list.size() > 0) {
|
||||||
|
throw new JeroBootException("征集问题标准号重复!");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (!ObjectUtils.isEmpty(payMeeting.getEndTimeAddQuestion())) {
|
||||||
|
if (payMeeting.getEndTimeAddQuestion().after(new Date())) {
|
||||||
|
payMeeting.setAddQuestionStatue(1);
|
||||||
|
} else {
|
||||||
|
payMeeting.setAddQuestionStatue(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case MeetingCommon.INTERNATIONAL_MEETING:
|
case MeetingCommon.INTERNATIONAL_MEETING:
|
||||||
ValidUtil.validate(payMeetingVO, InternationalMeeting.class);
|
ValidUtil.validate(payMeetingVO, InternationalMeeting.class);
|
||||||
@@ -490,26 +514,6 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
|||||||
// ValidUtil.validate(hotelContacts, StandardMeeting.class);
|
// ValidUtil.validate(hotelContacts, StandardMeeting.class);
|
||||||
//}
|
//}
|
||||||
BeanUtils.copyProperties(payMeetingVO, payMeeting);
|
BeanUtils.copyProperties(payMeetingVO, payMeeting);
|
||||||
if(org.apache.commons.collections.CollectionUtils.isNotEmpty(payMeetingVO.getQuestionList())){
|
|
||||||
if("0".equals(payMeetingVO.getIsAddQuestion())){
|
|
||||||
throw new JeroBootException("征集问题状态冲突");
|
|
||||||
}
|
|
||||||
List<String> list= payMeetingVO.getQuestionList().stream().collect(Collectors.groupingBy(PayMeetingStandard::getStandardNumber,Collectors.counting())).entrySet().stream()
|
|
||||||
.filter(entry->entry.getValue()>1)
|
|
||||||
.map(Map.Entry::getKey)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
if(list.size()>0){
|
|
||||||
throw new JeroBootException("征集问题标准号重复!");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
if(!ObjectUtils.isEmpty(payMeeting.getEndTimeAddQuestion())){
|
|
||||||
if(payMeeting.getEndTimeAddQuestion().after(new Date())){
|
|
||||||
payMeeting.setAddQuestionStatue(1);
|
|
||||||
}else {
|
|
||||||
payMeeting.setAddQuestionStatue(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return payMeeting;
|
return payMeeting;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user