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


import com.alibaba.fastjson.JSONArray;
import com.bonus.gs.sub.evaluate.evaluate.beans.*;
import com.bonus.gs.sub.evaluate.manager.utils.AjaxRes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author xliu
 * @date 2024/11/15 15:24
 */
@Mapper
public interface OutsourcerEvaluateDao {

    //根据评价id  获取分包商、项目列表
    List<EvaluateSubBean> getEvaluatSubListById(EvaluateSubBean bean);

    //根据模板id获取模板信息
    SetTemplateBean getTemplateById(@Param("id") String id);

    /**
     * 外包商评价列表
     *
     * @param o OutsourcerBean
     * @return AjaxRes
     */
    List<OutSourceBean> getTeamEvaluateList(OutSourceBean o);

    List<EvaluateSubBean>getSubAndProjectByEvaluateId(@Param("id") String id, @Param("type") String type,
                                                      @Param("userId") String userId);
    /**
     * 获取部门名称
     * @param deptId 部门id
     * @return 部门名称
     */
    String getDeptNameById(String deptId);

    List<SetTemplateBean> getTemplateDeatailsList(EvaluateSubBean o);

    int insertEvaluateData(EvaluateDataBean o);

    int saveEvaluateData(@Param("list") List<EvaluateDataDetailsBean> list);

    int getEvaluateCount(EvaluateDataBean o);

    List<EvaluateDataBean> getCollectData(EvaluateSubBean o);

    List<EvaluateDataDetailsBean> getCollectChildData(EvaluateSubBean o);

    List<OutSourceBean> getEvaluateAuditList(OutSourceBean o);

    EvaluateDataBean getAuditJson(EvaluateSubBean o);

    int audit(EvaluateDataBean o);

    int auditByThreeParams(EvaluateDataBean o);

    int insertEvaluateChildData(EvaluateDataBean childBean);

    List<EvaluateDataBean> getChildData(EvaluateSubBean o);

    int updateEvaluateData(EvaluateDataBean o);

    int updateEvaluateChildData(EvaluateDataBean childBean);

    int deleteEvaluateData(EvaluateDataBean o);

    int updatepjEvaluateDetailsStatus(EvaluateDataBean o);

    int updatePjEvaluateDetailsStatusByThreeParams(EvaluateDataBean o);

    int getCurrentIsApprove(EvaluateDataBean o);

    String getIsBusinessDivision(String deptId);

    //获取已评价人
    int getEvaluatedNum(String evaluateId);

    //项目部未评价人
    int getUnEvaluateNum(String evaluateId);

    //判断事业部是否需要评价  返回值大于0则需要评价
    int getProEvaluateNum(String evaluateId);

   // int getThisPersonIsNeedWait(String deptId,String roleId);

    EvaluatePersonBean getDeptName(EvaluateSubBean o);

    //新增审核人信息
    int addExaminePerson(ExamineBean o);

    int updateEvaluateRecordByEvaluateId(String taskStatus,String evaluateId);

    //获取审核人信息 根据部门id
    List<String> getExaminePersonByDeptAndRoleName(String orgId,String roleName);

    //根据评价id获取模板待评价部门id
    List<SetTemplateBean> getThisTemplateByEvaluateId(String evaluateId);

    String getOrgIddByEvaluateId(String evaluateId);

    int getExamineNumByEvaluateId(String evaluateId,String evaluateNode);

    List<EvaluateDataBean> getAuditBtn(EvaluateDataBean o);

    AjaxRes updateJsonData(EvaluateDataBean o);

    EvaluateDataBean getSummaryJsonData(EvaluateSubBean o);

    String getIndexNameById(String id);

    String getCountTypeById(String id);

    String getStandardScoreById(String id);

    int startCollectExamineByEvaluateId(EvaluateDataBean o);

    int updateCheckTwoStatus(EvaluateDataBean o);

    int fullApproval(EvaluateDataBean o);

    int getCurrentTwoIsApprove(EvaluateDataBean o);

    int updateRecordStatus(EvaluateDataBean o);

    List<SummaryCompareBean> getSummaryCompareList(@Param("bean") EvaluateSubBean o,
                                                   @Param("arr") String[] evaluateDate);

    int getIsApprovalByDeptId(@Param("bean") EvaluateDataBean o,@Param("dataBean") EvaluateDataBean dataBean);

    int getIsRejectionByDeptId(@Param("bean") EvaluateDataBean o,@Param("dataBean") EvaluateDataBean dataBean);

    int isCheckOneIsAudit(EvaluateDataBean o);

    List<EvaluateDataBean> getEvaluateSubInfo(EvaluateDataBean o);

    int addMonthRank(@Param("bean") EvaluateDataBean bean,@Param("list") List<EvaluateDataBean> list);

    int isCheckTwoIsAudit(EvaluateDataBean o);

    /**
     * 重新
     * @param o
     */
    void updateEvalStatus(@Param("status") String status,@Param("id")String id);

    List<String> getPjEvaluateResultDeptId(EvaluateDataBean o);

    List<String> getPjTaskEvaluatedPostId(EvaluateDataBean o);
}
