package com.mosty.bkzx.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mosty.base.model.dto.bkzx.XdxxQuery;
import com.mosty.bkzx.service.XdxxService;
import com.mosty.common.base.domain.BaseController;
import com.mosty.common.base.domain.ResponseResult;
import com.mosty.common.token.JwtSysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@AllArgsConstructor
@RestController
@Api(tags = "系统字典--原magic接口")
@RequestMapping("/xdxx")
public class XdxxController extends BaseController {

    @Resource
    private XdxxService xdxxService;

    @GetMapping("/queryXdxxBYSzfh")
    @ApiOperation(value = "根据身份证号查询行动信息列表")
    @JwtSysUser
    public ResponseResult<IPage<Map<String, Object>>> queryXdxxBYSzfh(XdxxQuery dto) {
        return ResponseResult.success(this.xdxxService.queryXdxxBYSzfh(dto));
    }

    @GetMapping("/xdrylb")
    @ApiOperation(value = "行动人员列表")
    @JwtSysUser
    public ResponseResult<IPage<Map<String, Object>>> xdrylb(XdxxQuery dto) {
        return ResponseResult.success(this.xdxxService.xdrylb(dto));
    }

    @GetMapping("/xdrytj")
    @ApiOperation(value = "行动人员统计")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> xdrytj(XdxxQuery dto) {
        return ResponseResult.success(this.xdxxService.xdrytj(dto));
    }

    @GetMapping("/xdxxlb")
    @ApiOperation(value = "行动信息列表")
    @JwtSysUser
    public ResponseResult<IPage<Map<String, Object>>> xdxxlb(XdxxQuery dto) {
        return ResponseResult.success(this.xdxxService.xdxxlb(dto));
    }

    @GetMapping("/xdxxtj")
    @ApiOperation(value = "行动信息统计")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> xdxxtj(XdxxQuery dto) {
        return ResponseResult.success(this.xdxxService.xdxxtj(dto));
    }
}


