|
@@ -1,6 +1,5 @@
|
|
|
package com.bosshand.virgo.api.operate.controller;
|
|
|
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
import com.bosshand.virgo.api.model.Project;
|
|
|
import com.bosshand.virgo.api.operate.model.*;
|
|
|
import com.bosshand.virgo.api.operate.service.GodownService;
|
|
@@ -10,6 +9,7 @@ import com.bosshand.virgo.api.service.ProjectItemTargetService;
|
|
|
import com.bosshand.virgo.api.service.ProjectService;
|
|
|
import com.bosshand.virgo.api.util.excel.ExcelUtils;
|
|
|
import com.bosshand.virgo.core.response.Response;
|
|
|
+import com.bosshand.virgo.core.utils.StringUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
@@ -140,10 +140,8 @@ public class OperateDeviceController {
|
|
|
* 导出数据(目录id,id多选,分割字符串)
|
|
|
*/
|
|
|
@ApiOperation(value = "资产导出数据(目录id,id多选,分割字符串)", notes = "资产导出数据(目录id,id多选,分割字符串)")
|
|
|
- @PostMapping("/exportData")
|
|
|
- public void export(HttpServletResponse response, @RequestBody JSONObject data) {
|
|
|
- long operateDeviceLevelId = data.getLongValue("operateDeviceLevelId");
|
|
|
- String ids = data.getString("ids");
|
|
|
+ @RequestMapping(value = "/exportData/{operateDeviceLevelId}/{ids}", method = RequestMethod.GET)
|
|
|
+ public void export(HttpServletResponse response, @PathVariable long operateDeviceLevelId, @PathVariable String ids) {
|
|
|
List<OperateDeviceExportDto> list = new ArrayList<>();
|
|
|
OperateDevice operateDevice = new OperateDevice();
|
|
|
if (operateDeviceLevelId != 0) {
|
|
@@ -155,7 +153,7 @@ public class OperateDeviceController {
|
|
|
}
|
|
|
operateDevice.setOperateDeviceLevelIds(String.join(", ", stringList));
|
|
|
}
|
|
|
- if (ids != null) {
|
|
|
+ if (!StringUtil.equals("0", ids)) {
|
|
|
operateDevice.setIds(ids);
|
|
|
}
|
|
|
List<OperateDevice> dataList = operateDeviceService.getExport(operateDevice);
|