package cn.com.goldenwater.dcproj.controller.ducha; import cn.com.goldenwater.core.web.BaseController; import cn.com.goldenwater.core.web.BaseResponse; import cn.com.goldenwater.dcproj.param.BisInspRsvrPblmMendParam; import cn.com.goldenwater.dcproj.service.BisInspRsvrPblmMendService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @Api(value = "水利部整改问题下载k", tags = "水利部整改问题下载") @RestController @RequestMapping("/mwr/data/down/load") @EnableScheduling public class MwrDataDownLoadController extends BaseController { private Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private BisInspRsvrPblmMendService bisInspRsvrPblmMendService; /** * 定时导入小水库问题数据 * @throws Exception */ /* @Scheduled(cron = "0 0/2 * * * ? ")*/ /*@Scheduled(cron = "0 0 0-4 1/1 * ?")*/ /* @Scheduled(cron = "0 0 0/4 * * ?")*/ public void getQuanguo(){ bisInspRsvrPblmMendService.getQuanguo(); } @ApiOperation(value = "手动导入小水库问题数据") @GetMapping("/importRsvr") public BaseResponse importRsvrData(@RequestBody BisInspRsvrPblmMendParam param){ if(StringUtils.isBlank(param.getStartTime()) && StringUtils.isBlank(param.getEndTime())){ return buildFailResponse("必传参数不可为空!"); } bisInspRsvrPblmMendService.importRsvrData(param); return buildSuccessResponse(); } /** * 定时更新省级复核情况 */ @Scheduled(cron = "0 0 23 * * ?") public void updRevwInfo(){ bisInspRsvrPblmMendService.updRevwInfo(); } }