package com.chinaitop.depot.intelligent.ventilation.controller;


import com.chinaitop.depot.intelligent.ventilation.model.TJob;
import com.chinaitop.depot.intelligent.ventilation.service.AerationCompareService;
import com.chinaitop.depot.intelligent.ventilation.service.AerationJobService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.unissoft.model.ResponseEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value = "/intelligents/aerationCompare")
@Api(value = "AerationCompareController", description = "通风对比")
public class AeratioCompareController {

    @Autowired
    private AerationCompareService aerationCompareService;

   
    @RequestMapping(value = "/getJobTime", method = RequestMethod.GET)
    @ApiOperation(value = "根据仓房获取通风作业的时间", notes = "根据仓房获取通风作业的时间")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "vCfCode", value = "仓房的code", paramType = "query")
    })
    public ResponseEntity<List<TJob>> getJobTime(String vCfCode) {
        List<TJob> list = null;
        try {
            
            list = aerationCompareService.getJobTime(vCfCode);
        } catch (Exception e) {
            e.printStackTrace();
            ResponseEntity.failed(e.getMessage());
        }
       
        return ResponseEntity.ok(list);
     }

    
   

    

    
    
    
    
}
