package com.xhpc.order.controller;
import com.xhpc.common.core.web.controller.BaseController;
import com.xhpc.common.core.web.domain.AjaxResult;
import com.xhpc.order.domain.XhpcPileRegularInspect;
import com.xhpc.order.service.IXhpcPileRegularInspectService;
import io.swagger.annotations.Api;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/pileRegularInspect")
@Api(value = "桩定期检查接口", tags = "桩定期检查接口")
public class XhpcPileRegularInspectController extends BaseController {

    @Resource
    private IXhpcPileRegularInspectService xhpcPileRegularInspectService;

    /**
     * 查询桩定期检查接口
     */
    @GetMapping("/getMessage")
    public AjaxResult getMessage()
    {
        return xhpcPileRegularInspectService.getPileRegularInspectTenantId();
    }


    @PostMapping("/addPileRegularInspect")
    public AjaxResult addPileRegularInspect(HttpServletRequest request, @RequestBody XhpcPileRegularInspect xhpcPileRegularInspect)
    {
        return xhpcPileRegularInspectService.addPileRegularInspect(request,xhpcPileRegularInspect);
    }

    //版本号定时任务
    @GetMapping("/getVersionTimer")
    //@Scheduled(cron = "0 0/2 * * * ?")
    public void getVersionTimer()
    {
        xhpcPileRegularInspectService.getVersionTimer();
    }

    //校时效价定时任务
    @GetMapping("/getTimingPriceTime")
    @Scheduled(cron = "0 0/1 * * * ?")
    public void getTimingPriceTime()
    {
        xhpcPileRegularInspectService.getTimingPriceTime();
    }

    //费率定时任务
    @GetMapping("/getRateTime")
    //@Scheduled(cron = "0 0/4 * * * ?")
    public void getRateTime()
    {
        xhpcPileRegularInspectService.getRateTime();
    }

    //定期抄发管理员定时任务





}
