forked from wuweidong/hzims-back-huoshan
1 changed files with 50 additions and 0 deletions
@ -0,0 +1,50 @@
|
||||
package com.hnac.hzims.operational.main.controller; |
||||
|
||||
import com.hnac.hzims.operational.main.service.HydropowerService; |
||||
import com.hnac.hzims.operational.main.service.ISideHustleService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @author ypj |
||||
* @since 2026/1/4 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/test") |
||||
@RequiredArgsConstructor |
||||
@Api(value = "测试接口") |
||||
public class TestController { |
||||
|
||||
private final HydropowerService hydropowerService; |
||||
|
||||
private final ISideHustleService sideHustleService; |
||||
|
||||
@GetMapping("/loadHydropowerTarget") |
||||
@ApiOperation(value = "加载统计数据") |
||||
R<Boolean> loadHydropowerTarget() { |
||||
hydropowerService.loadHydropowerTarget(DateUtil.format(new Date(), "yyyy-MM")); |
||||
return R.success("运行成功"); |
||||
} |
||||
|
||||
@GetMapping("/loadHydropowerReal") |
||||
@ApiOperation(value = "加载实时数据") |
||||
R<Boolean> loadHydropowerReal() { |
||||
hydropowerService.loadHydropowerReal(null); |
||||
return R.success("运行成功"); |
||||
} |
||||
|
||||
@GetMapping("/loadDutyInfo") |
||||
@ApiOperation(value = "加载区域日常运行数据") |
||||
R<Boolean> loadDutyInfo() { |
||||
sideHustleService.loadDutyInfo(null); |
||||
return R.success("运行成功"); |
||||
} |
||||
} |
||||
Loading…
Reference in new issue