|
@@ -10,12 +10,14 @@ import com.example.opc_common.util.Blank;
|
|
|
import com.example.opc_common.util.Result;
|
|
|
import com.example.opc_da.annotation.WebLog;
|
|
|
import com.example.opc_da.service.DeviceLedgerService;
|
|
|
+import com.example.opc_da.util.downloadExcel.DownloadExcelUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
import javax.validation.Valid;
|
|
|
import javax.validation.constraints.Min;
|
|
|
import javax.validation.constraints.NotNull;
|
|
@@ -163,9 +165,9 @@ public class DeviceLedgerController {
|
|
|
*/
|
|
|
@GetMapping("/getManyDirectoryAllAlarm")
|
|
|
@WebLog(ServerEnum = ServerEnum.CLIENT, ModelEnum = ModelEnum.DEVICEDIRECTORY, OperationEnum = OperationEnum.SELECT)
|
|
|
- public Result getManyDirectoryAllAlarm(Integer directoryId,@RequestParam List<Integer> directoryIdList, @RequestParam String startTime, @RequestParam String endTime,
|
|
|
- @RequestParam Integer page, @RequestParam Integer limit) {
|
|
|
- return deviceLedgerService.getManyDirectoryAllAlarm(directoryId,directoryIdList, startTime, endTime, page, limit);
|
|
|
+ public Result getManyDirectoryAllAlarm(Integer directoryId, @RequestParam List<Integer> directoryIdList, @RequestParam String startTime, @RequestParam String endTime,
|
|
|
+ @RequestParam Integer page, @RequestParam Integer limit) {
|
|
|
+ return deviceLedgerService.getManyDirectoryAllAlarm(directoryId, directoryIdList, startTime, endTime, page, limit);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -179,7 +181,7 @@ public class DeviceLedgerController {
|
|
|
@GetMapping("/getOneDirectoryAllAlarm")
|
|
|
@WebLog(ServerEnum = ServerEnum.CLIENT, ModelEnum = ModelEnum.DEVICEDIRECTORY, OperationEnum = OperationEnum.SELECT)
|
|
|
public Result getOneDirectoryAllAlarm(Integer directoryId, String startTime, String endTime,
|
|
|
- @RequestParam Integer page, @RequestParam Integer limit) {
|
|
|
+ @RequestParam Integer page, @RequestParam Integer limit) {
|
|
|
return deviceLedgerService.getOneDirectoryAllAlarm(directoryId, startTime, endTime, page, limit);
|
|
|
}
|
|
|
|
|
@@ -261,6 +263,17 @@ public class DeviceLedgerController {
|
|
|
return deviceLedgerService.getDeviceLedgerPage(page, limit, directoryId, deviceTypeId, deviceName, deviceNum, isShow);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @RequestMapping(value = "/downloadExcelFile", method = RequestMethod.GET)
|
|
|
+ @WebLog(ServerEnum = ServerEnum.CLIENT, ModelEnum = ModelEnum.DEVICELEDGER, OperationEnum = OperationEnum.EXPORT)
|
|
|
+ public void downloadExcelFile(@RequestParam String excelKeyData
|
|
|
+ , @RequestParam String excelTitle, @RequestParam(required = false) String excelUser, @RequestParam(required = false) String excelDate
|
|
|
+ , HttpServletResponse response
|
|
|
+ , @RequestParam Integer directoryId, Integer deviceTypeId, String deviceName, String deviceNum, Integer isShow) {
|
|
|
+ List<DeviceLedger> deviceLedgerList = deviceLedgerService.getDeviceLedgerForExport(directoryId, deviceTypeId, deviceName, deviceNum, isShow);
|
|
|
+ DownloadExcelUtil.downloadExcelFile(excelKeyData, excelTitle, excelUser, excelDate, deviceLedgerList, response);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 修改设备台账排序号
|
|
|
*
|