package com.bonus.gs.sub.evaluate.evaluate.dao;

import com.alibaba.fastjson.JSONArray;
import com.bonus.gs.sub.evaluate.evaluate.beans.InitiateEvaluateBean;
import com.bonus.gs.sub.evaluate.evaluate.beans.NodeBean;
import com.bonus.gs.sub.evaluate.evaluate.beans.SubBean;
import com.bonus.gs.sub.evaluate.manager.model.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;
import java.util.StringTokenizer;

/**
 * @ClassName: InitiateEvaluateDao
 * @author: tqzhang
 * @Date: 2024/12/19 9:11
 * @version: 1.0
 * @description:
 */
@Mapper
public interface InitiateEvaluateDao {
    /**
     * 获取外包商发起评价列表
     * @param o
     * @return
     */
    List<InitiateEvaluateBean> getInitiateEvaluateList(InitiateEvaluateBean o);
    /**
     * 删除外包商发起评价
     * @param id
     * @return
     */
    int deleteInitiateEvaluateById(String id);
    /**
     * 删除外包商发起评价关联
     * @param id
     * @return
     */
    int deleteInitiateEvaluateLink(String id);
    /**
     * 获取评价单位下拉框
     * @param bean
     * @return
     */
    List<InitiateEvaluateBean> getOrgSelect(InitiateEvaluateBean bean);
    /**
     * 获取评价模板下拉框
     * @param bean
     * @return
     */
    List<InitiateEvaluateBean> getTemplateSelect(InitiateEvaluateBean bean);
    /**
     * 获取评价单位树
     * @param o
     * @return
     */
    List<NodeBean> getOrgTree(InitiateEvaluateBean o);
    /**
     * 获取评价外包商列表根据proId
     * @param arr
     * @return
     */
    List<InitiateEvaluateBean> getSubListByOrgId(@Param("arr") String[] arr);
    /**
     * 新增外包商发起评价
     * @param o
     * @return
     */
    int insertInitiateEvaluate(InitiateEvaluateBean o);

    int insertInitiateEvaluateLink(@Param("arr") JSONArray jsonArray,@Param("id") String id);

    int checkIsExistEvaluate(InitiateEvaluateBean o);
    /**
     * 获取外包商发起评价详情
     * @param bean
     * @return
     */
    InitiateEvaluateBean getInitiateEvaluateDetails(InitiateEvaluateBean bean);
    /**
     * 获取外包商信息
     * @param id
     * @return
     */
    List<SubBean> getSubInfo(String id);
    /**
     * 删除外包商发起评价
     * @param id
     * @return
     */
    int deleteInitiateLink(String id);
    /**
     * 更新外包商发起评价
     * @param o
     * @return
     */
    int updateInitiateEvaluate(InitiateEvaluateBean o);

    int deletePjTaskEvaluate(String id);

    String getTemplationJson(String templateId);

    List<SysUser> getProUserIdByDeptId(@Param("arr") JSONArray jsonArray);

    List<SysUser> getUserIdByDeptId(String id);

    int insertPjTaskEvaluate(String id, String ids, String deptId, String isWait);

    List<SysUser> getBusinessDivisionUserIdByDeptId(String orgId);
}
