This commit is contained in:
zt
2025-03-20 16:41:38 +08:00
parent 1dc93404b5
commit 21ded5ae19
17 changed files with 174 additions and 15 deletions

View File

@ -86,4 +86,8 @@ public interface IAnnexService extends IServicePlus<Annex> {
*/
void deleteByUserIdAndRecruitIdAndType(Long userId,Long recruitId,String type);
/**
* 检查入场材料
*/
boolean checkEntry(Long userId,Long recruitId);
}

View File

@ -19,9 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import static com.ruoyi.common.constant.Constants.WGZ;
@ -164,4 +162,24 @@ public class AnnexServiceImpl extends ServicePlusImpl<AnnexMapper, Annex> implem
baseMapper.delete(Wrappers.<Annex>lambdaQuery().eq(Annex::getUserId,userId)
.eq(Annex::getRecruitId,recruitId).eq(Annex::getAnnexType,type).eq(Annex::getUserType,WGZ));
}
@Override
public boolean checkEntry(Long userId, Long recruitId) {
boolean result = false;
LambdaQueryWrapper<Annex> wra = new LambdaQueryWrapper<Annex>().
eq(Annex::getUserType,WGZ).
eq(Annex::getUserId,userId).
eq(Annex::getRecruitId,recruitId).
in(Annex::getAnnexType, Arrays.asList("1","2"));
List<Annex> annexes = baseMapper.selectList(wra);
if(CollectionUtil.isNotEmpty(annexes)){
Set<String> collect = annexes.stream().map(Annex::getAnnexType).collect(Collectors.toSet());
if(collect.contains("1") && collect.contains("2")){
result = true;
}
}
return result;
}
}