update 审核起草组报名信息 兼容批量审核
This commit is contained in:
+29
-26
@@ -917,36 +917,39 @@ public class PayDraftingGroupSubItemServiceImpl extends ServiceImpl<PayDraftingG
|
||||
*/
|
||||
@Override
|
||||
public void checkRegister(CheckVo checkVO) {
|
||||
String payDraftingGroupSubItemId = checkVO.getId();
|
||||
String payDraftingGroupSubItemIds = checkVO.getId();
|
||||
String checkRemark = checkVO.getCheckRemark();
|
||||
Integer checkResult = checkVO.getCheckResult();
|
||||
PayDraftingGroupSubItem payDraftingGroupSubItem = payDraftingGroupSubItemService.getById(payDraftingGroupSubItemId);
|
||||
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payDraftingGroupSubItem.getDraftingGroupId());
|
||||
//判断是否有权限审核
|
||||
verificationGuests(payDraftingGroupSubItem);
|
||||
if(Objects.equals(checkVO.getCheckResult(),DraftingConstant.CHECK_PASS)) {
|
||||
// 审核通过,将状态改为2 发送消息
|
||||
LambdaUpdateWrapper<PayDraftingGroupSubItem> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(PayDraftingGroupSubItem::getId,payDraftingGroupSubItemId);
|
||||
updateWrapper.set(StringUtils.isNotBlank(checkRemark),PayDraftingGroupSubItem::getCheckRemark,checkRemark);
|
||||
updateWrapper.set(!Objects.isNull(checkResult),PayDraftingGroupSubItem::getCheckResult,checkResult);
|
||||
payDraftingGroupSubItemService.update(updateWrapper);
|
||||
for (String payDraftingGroupSubItemId : payDraftingGroupSubItemIds.split(",")) {
|
||||
PayDraftingGroupSubItem payDraftingGroupSubItem = payDraftingGroupSubItemService.getById(payDraftingGroupSubItemId);
|
||||
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payDraftingGroupSubItem.getDraftingGroupId());
|
||||
//判断是否有权限审核
|
||||
verificationGuests(payDraftingGroupSubItem);
|
||||
if(Objects.equals(checkVO.getCheckResult(),DraftingConstant.CHECK_PASS)) {
|
||||
// 审核通过,将状态改为2 发送消息
|
||||
LambdaUpdateWrapper<PayDraftingGroupSubItem> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(PayDraftingGroupSubItem::getId,payDraftingGroupSubItemId);
|
||||
updateWrapper.set(StringUtils.isNotBlank(checkRemark),PayDraftingGroupSubItem::getCheckRemark,checkRemark);
|
||||
updateWrapper.set(!Objects.isNull(checkResult),PayDraftingGroupSubItem::getCheckResult,checkResult);
|
||||
payDraftingGroupSubItemService.update(updateWrapper);
|
||||
|
||||
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PayDraftingGroupSubItemContacts::getDraftingGroupId,payDraftingGroupSubItem.getDraftingGroupId());
|
||||
queryWrapper.eq(PayDraftingGroupSubItemContacts::getDraftingGroupSubId,payDraftingGroupSubItem.getId());
|
||||
List<PayDraftingGroupSubItemContacts> payDraftingGroupSubItemContactsList = payDraftingGroupSubItemContactsService.list(queryWrapper);
|
||||
sendMessage(payDraftingGroupSubItem,payDraftingGroup,payDraftingGroupSubItemContactsList);
|
||||
}
|
||||
if(Objects.equals(checkVO.getCheckResult(),DraftingConstant.CHECK_REJECTION)) {
|
||||
// 直接将数据删除
|
||||
payDraftingGroupSubItemService.removeById(payDraftingGroupSubItemId);
|
||||
// 删除对应的联系表
|
||||
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PayDraftingGroupSubItemContacts::getDraftingGroupId,payDraftingGroupSubItem.getDraftingGroupId());
|
||||
queryWrapper.eq(PayDraftingGroupSubItemContacts::getDraftingGroupSubId,payDraftingGroupSubItem.getId());
|
||||
payDraftingGroupSubItemContactsService.remove(queryWrapper);
|
||||
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PayDraftingGroupSubItemContacts::getDraftingGroupId,payDraftingGroupSubItem.getDraftingGroupId());
|
||||
queryWrapper.eq(PayDraftingGroupSubItemContacts::getDraftingGroupSubId,payDraftingGroupSubItem.getId());
|
||||
List<PayDraftingGroupSubItemContacts> payDraftingGroupSubItemContactsList = payDraftingGroupSubItemContactsService.list(queryWrapper);
|
||||
sendMessage(payDraftingGroupSubItem,payDraftingGroup,payDraftingGroupSubItemContactsList);
|
||||
}
|
||||
if(Objects.equals(checkVO.getCheckResult(),DraftingConstant.CHECK_REJECTION)) {
|
||||
// 直接将数据删除
|
||||
payDraftingGroupSubItemService.removeById(payDraftingGroupSubItemId);
|
||||
// 删除对应的联系表
|
||||
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PayDraftingGroupSubItemContacts::getDraftingGroupId,payDraftingGroupSubItem.getDraftingGroupId());
|
||||
queryWrapper.eq(PayDraftingGroupSubItemContacts::getDraftingGroupSubId,payDraftingGroupSubItem.getId());
|
||||
payDraftingGroupSubItemContactsService.remove(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user