|
@@ -14,6 +14,7 @@ import com.tofly.xrtygis.service.DmaregionService;
|
|
|
import com.tofly.xrtygis.service.IndicatorCorrectionService;
|
|
|
import com.tofly.xrtygis.service.NoiseJobService;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -126,17 +127,31 @@ public class IndicatorCorrectionController {
|
|
|
@ApiImplicitParam(name = "reviseDate", value = "统计日期 yyyy-MM-dd 统计当前日期各指标", required = true, dataType = "String")
|
|
|
})
|
|
|
public ResultRespone leakageRateCalculate(String reviseDate) {
|
|
|
- LocalDate localDate1 = DateTimeUtil.fromString2LocalDate(reviseDate, DateTimeUtil.DAY_FORMAT);
|
|
|
- Date localDate = DateTimeUtil.localDateToDate(localDate1);
|
|
|
- return ResultRespone.success(indicatorCorrectionService.leakageRateCalculate(localDate));
|
|
|
+ try {
|
|
|
+ LocalDate localDate1 = DateTimeUtil.fromString2LocalDate(reviseDate, DateTimeUtil.DAY_FORMAT);
|
|
|
+ Date localDate = DateTimeUtil.localDateToDate(localDate1);
|
|
|
+ indicatorCorrectionService.leakageRateCalculate(localDate);
|
|
|
+
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ return ResultRespone.failed(e.getMessage());
|
|
|
+ }
|
|
|
+ return ResultRespone.success();
|
|
|
+
|
|
|
}
|
|
|
@GetMapping("/test" )
|
|
|
@ApiOperation(value = "测试111")
|
|
|
|
|
|
public ResultRespone noiseJobServices(String reviseDate) {
|
|
|
- LocalDate localDate1 = DateTimeUtil.fromString2LocalDate(reviseDate, DateTimeUtil.DAY_FORMAT);
|
|
|
- Date localDate = DateTimeUtil.localDateToDate(localDate1);
|
|
|
- indicatorCorrectionService.totalCalculate(localDate);
|
|
|
+ try {
|
|
|
+ LocalDate localDate1 = DateTimeUtil.fromString2LocalDate(reviseDate, DateTimeUtil.DAY_FORMAT);
|
|
|
+ Date localDate = DateTimeUtil.localDateToDate(localDate1);
|
|
|
+ indicatorCorrectionService.totalCalculate(localDate);
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ return ResultRespone.failed(e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
return ResultRespone.success();
|
|
|
}
|
|
|
|