package com.mosty.yjzl.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mosty.base.model.entity.yjzl.TbZlxx;
import com.mosty.base.model.entity.yjzl.TbZlxxZxr;
import com.mosty.base.model.vo.yjzl.TbZlxxZxrVo;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by 张海军 on 2022/7/11 17:20
 *
 * @ClassName TbZlMapper
 */
@Mapper
public interface TbZlxxMapper extends BaseMapper<TbZlxx> {

    @ApiOperation("根据时间查询指令执行情况")
    Map<String, Object> selectInstructCount(@Param("startTime") String startTime,
                                            @Param("endTime") String endTime,
                                            @Param("ssbmdm") String ssbmdm);

    @ApiOperation("查询指令列表")
    List<TbZlxx> getListPage(Map<String, Object> map);

    @ApiOperation("查询指令数量")
    int getCount(Map<String, Object> map);

    @ApiOperation("添加指令数据")
    void insertEntity(TbZlxx zl);

    @ApiOperation("修改指令数据")
    void updateEntity(TbZlxx zl);

    @ApiOperation("根据条件查询我的指令信息")
    List<Map<String, Object>> getMyZlCount(Map<String, Object> map);

    @ApiOperation("根据条件查询我的指令信息列表")
    List<TbZlxxZxrVo> getMyZlList(Map<String, Object> mp);

    @ApiOperation("根据条件获取指令数量")
    int getMyZlCountBy(Map<String, Object> mp);

    @ApiOperation("查询当前指令的执行人")
    TbZlxxZxr selectZxr(@Param("zlId") String zlId,
                        @Param("ssbmid") String ssbmid,
                        @Param("sfz") String sfz);

    @ApiOperation("APP指令统计--指令类型")
    List<Map<String, Object>> getTjOfZllx(@Param("kssj") String kssj,
                                          @Param("jssj") String jssj,
                                          @Param("ssbmdm") String ssbmdm);
    @ApiOperation("根据完成情况统计指令数量")
    int getStatisticsByStatus(@Param("sfz") String sfz,
                              @Param("ssbmid") String ssbmid,
                              @Param("type") String type);

    @ApiOperation("根据身份证号查询指令统计--新稚")
    List<Map<String, Object>> getStatistics(Map<String, Object> mp);
}
