2026-03-31提交:下载附件接口挪动;
This commit is contained in:
parent
93f0092f75
commit
e3da8a6895
@ -5,8 +5,6 @@ import com.southern.power.grid.entity.*;
|
|||||||
import com.southern.power.grid.service.*;
|
import com.southern.power.grid.service.*;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.core.io.Resource;
|
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -37,9 +35,6 @@ public class DnerController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IRegionalWeatherDataService regionalWeatherDataService;
|
private IRegionalWeatherDataService regionalWeatherDataService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private DnerEventAttachmentService dnerEventAttachmentService;
|
|
||||||
|
|
||||||
@PostMapping("/area-tree/query")
|
@PostMapping("/area-tree/query")
|
||||||
public Result<List<AreaTreeVO>> queryAreaTree(@RequestBody @Valid AreaTreeReq req) {
|
public Result<List<AreaTreeVO>> queryAreaTree(@RequestBody @Valid AreaTreeReq req) {
|
||||||
return Result.success(dnerSiteAreaConfigurationService.queryAreaTree(req));
|
return Result.success(dnerSiteAreaConfigurationService.queryAreaTree(req));
|
||||||
@ -80,18 +75,6 @@ public class DnerController {
|
|||||||
orgCode, startDate, endDate, eventId));
|
orgCode, startDate, endDate, eventId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 下载附件
|
|
||||||
*
|
|
||||||
* @param attachmentId 附件ID
|
|
||||||
* @return 响应体
|
|
||||||
*/
|
|
||||||
@GetMapping("/excel/download/{attachmentId}")
|
|
||||||
public ResponseEntity<Resource> downloadExcel(@PathVariable Long attachmentId) {
|
|
||||||
return dnerEventAttachmentService.downloadExcel(attachmentId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同步区域气象数据
|
* 同步区域气象数据
|
||||||
*
|
*
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.southern.power.grid.controller;
|
|||||||
import com.southern.power.grid.common.Result;
|
import com.southern.power.grid.common.Result;
|
||||||
import com.southern.power.grid.entity.DnerEvent;
|
import com.southern.power.grid.entity.DnerEvent;
|
||||||
import com.southern.power.grid.entity.DnerEventVO;
|
import com.southern.power.grid.entity.DnerEventVO;
|
||||||
|
import com.southern.power.grid.service.DnerEventAttachmentService;
|
||||||
import com.southern.power.grid.service.DnerEventService;
|
import com.southern.power.grid.service.DnerEventService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.core.io.Resource;
|
import org.springframework.core.io.Resource;
|
||||||
@ -26,6 +27,9 @@ public class DnerEventController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private DnerEventService dnerEventService;
|
private DnerEventService dnerEventService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DnerEventAttachmentService dnerEventAttachmentService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增事件
|
* 新增事件
|
||||||
*/
|
*/
|
||||||
@ -98,4 +102,15 @@ public class DnerEventController {
|
|||||||
public ResponseEntity<Resource> downloadTemplate() {
|
public ResponseEntity<Resource> downloadTemplate() {
|
||||||
return dnerEventService.downloadTemplate();
|
return dnerEventService.downloadTemplate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载附件
|
||||||
|
*
|
||||||
|
* @param attachmentId 附件ID
|
||||||
|
* @return 响应体
|
||||||
|
*/
|
||||||
|
@GetMapping("/excel/download/{attachmentId}")
|
||||||
|
public ResponseEntity<Resource> downloadExcel(@PathVariable Long attachmentId) {
|
||||||
|
return dnerEventAttachmentService.downloadExcel(attachmentId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,2 +1,3 @@
|
|||||||
ALTER TABLE pmds_qxj_city_weather
|
ALTER TABLE pmds_qxj_city_weather
|
||||||
MODIFY COLUMN `prediction_time` int COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '预报时效,小时';
|
MODIFY COLUMN `prediction_time` int COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '预报时效,小时';
|
||||||
|
ALTER TABLE pmds_qxj_city_weather COMMENT = '地区天气预报表';
|
||||||
Loading…
x
Reference in New Issue
Block a user