package com.usky.fire.controller.web;


import com.usky.common.core.bean.ApiResult;
import com.usky.common.log.annotation.Log;
import com.usky.common.log.enums.BusinessType;
import com.usky.fire.domain.MhPostInspect;
import com.usky.fire.service.MhPostInspectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 查岗信息 前端控制器
 * </p>
 *
 * @author JCB
 * @since 2022-08-24
 */
@RestController
@RequestMapping("/mhPostInspect")
public class MhPostInspectController {

    @Autowired
    private MhPostInspectService mhPostInspectService;

    /**
     * 值班查岗-闵行支队平台查岗功能推送
     *
     * @param mhPostInspect
     * @return
     */
    @Log(title = "闵行支队平台查岗", businessType = BusinessType.INSERT)
    @PutMapping("postInspectPush")
    public ApiResult<MhPostInspect> postInspectPush(@RequestBody MhPostInspect mhPostInspect) {
        return ApiResult.success(mhPostInspectService.postInspectPush(mhPostInspect));
    }


    @GetMapping("postInspectAnswerRequest")
    public ApiResult<Void> postInspectAnswerRequest() {
        mhPostInspectService.postInspectAnswerRequest();
        return ApiResult.success();
    }

}

