63 lines
1.6 KiB
Java
63 lines
1.6 KiB
Java
package com.gunshi.project.hsz.controller;
|
|
|
|
import com.gunshi.core.result.R;
|
|
import com.gunshi.project.hsz.timetask.JcskDataTask;
|
|
import com.gunshi.project.hsz.timetask.PaDataTask;
|
|
import com.gunshi.project.hsz.timetask.WarningRuleTask;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import java.text.ParseException;
|
|
|
|
@Tag(name = "后门")
|
|
@RestController
|
|
@RequestMapping(value="/debug")
|
|
public class DebugController {
|
|
|
|
|
|
@Autowired
|
|
private PaDataTask paDataTask;
|
|
|
|
@Autowired
|
|
private JcskDataTask jcskDataTask;
|
|
|
|
@Autowired
|
|
private WarningRuleTask warningRuleTask;
|
|
|
|
@GetMapping("/warnRule")
|
|
public String warningRuleTast(){
|
|
try {
|
|
warningRuleTask.warningRuleExecute();
|
|
return "success";
|
|
} catch (Exception e) {
|
|
throw new RuntimeException(e);
|
|
}
|
|
}
|
|
|
|
|
|
@GetMapping("/patask")
|
|
public String patask(){
|
|
try {
|
|
paDataTask.PaDataCalc();
|
|
return "成功";
|
|
} catch (ParseException e) {
|
|
return "失败";
|
|
}
|
|
}
|
|
|
|
@Operation(description = "同步一次渗压、渗流、位移的数据")
|
|
@GetMapping("/syncJcskData")
|
|
public R syncJcskData(){
|
|
jcskDataTask.syncGnssREightAmData();
|
|
|
|
jcskDataTask.syncSlREightAmData();
|
|
|
|
jcskDataTask.syncSyREightAmData();
|
|
return R.ok("ok");
|
|
}
|
|
}
|