package com.ruoyi.bgt.service;

import com.ruoyi.bgt.bo.BgtProjectRecruitApplyQueryBo;
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
import com.ruoyi.bgt.domain.dto.BgtAttendanceDayDTO;
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyConsentDTO;
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyQueryDTO;
import com.ruoyi.bgt.domain.dto.BgtScoreDTO;
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO;
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import com.ruoyi.wgz.bo.req.WgzAppUnderwayReq;
import com.ruoyi.wgz.bo.res.WgzAppUnderwayRes;
import org.springframework.validation.annotation.Validated;

import java.util.Collection;
import java.util.List;

/**
 * 包工头招工申请Service接口
 *
 * @author ruoyi
 * @date 2025-02-18
 */
public interface IBgtProjectRecruitApplyService extends IServicePlus<BgtProjectRecruitApply> {
    /**
     * 查询单个
     * @return
     */
    BgtProjectRecruitApply queryById(Long id);

    /**
     * 查询列表
     */
    TableDataInfo<BgtProjectRecruitApply> queryPageList(BgtProjectRecruitApplyQueryBo bo);

    /**
     * 查询列表
     */
    List<BgtProjectRecruitApply> queryList(BgtProjectRecruitApplyQueryBo bo);

    /**
     * 根据新增业务对象插入包工头招工申请
     * @param bo 包工头招工申请新增业务对象
     * @return
     */
    Boolean insert(BgtProjectRecruitApply bo);

    /**
     * 根据编辑业务对象修改包工头招工申请
     * @param bo 包工头招工申请编辑业务对象
     * @return
     */
    Boolean update(BgtProjectRecruitApply bo);

    /**
     * 校验并删除数据
     * @param ids 主键集合
     * @param isValid 是否校验,true-删除前校验,false-不校验
     * @return
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

	/**
	 * 查询列表
	 */
	List<BgtProjectRecruitApplyVO> appQueryList(BgtProjectRecruitApplyQueryDTO dto);

	/**
	 * LC-APP相关
	 * =================================================================================================================
	 * =================================================================================================================
	 * =================================================================================================================
	 */

	/**
	 * 根据用户唯一标识去查询当前进场的工地信息
	 */
	BgtProjectRecruitApply selectByUserIdProjectRecruitApplyId(Long id);

	/**
	 * 务工者申请报名
	 */
	Boolean userApplyForRegistration(Long id);

	/**
	 * 同意申请
	 */
	Boolean consent(BgtProjectRecruitApplyConsentDTO dto);

	/**
	 * 指定日期打卡记录
	 */
	List<BgtProjectRecruitApplyVO> todayAttendanceList(BgtAttendanceDayDTO dto);

	/**
	 * 退场
	 */
	Boolean quit(Long id);

	/**
	 * 评分
	 */
	Boolean score(@Validated @RequestBody BgtScoreDTO dto);

	/**
	 * 务工者取消报名
	 */
	Boolean userCancelRegistration(Long recruitId);

	/**
	 * 项目进行中
	 */
	TableDataInfo<WgzAppUnderwayRes> userUnderway(@Validated WgzAppUnderwayReq req);


}
