|
@ -26,6 +26,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@ -280,7 +281,7 @@ public class IotDeviceController extends EnvelopRestEndpoint {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = IotRequestMapping.Device.uploadDeviceInfo)
|
|
|
/*@PostMapping(value = IotRequestMapping.Device.uploadDeviceInfo)
|
|
|
@ApiOperation(value = "导入设备sn码相关信息", notes = "导入设备sn码相关信息")
|
|
|
public MixEnvelop<IotDeviceImportVO, IotDeviceImportVO> uploadStream(@ApiParam(value = "文件", required = true)
|
|
|
@RequestParam(value = "file", required = true) MultipartFile file,
|
|
@ -289,7 +290,19 @@ public class IotDeviceController extends EnvelopRestEndpoint {
|
|
|
return iotDeviceService.uploadStream(file, request);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
|
|
|
return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = IotRequestMapping.Device.downloadTemplate)
|
|
|
@ApiOperation(value = "下载导入sn码相关信息模板", notes = "下载导入sn码相关信息模板")
|
|
|
public MixEnvelop downloadTemplate(HttpServletRequest request, HttpServletResponse response) {
|
|
|
try {
|
|
|
iotDeviceService.downloadTemplate(request, response);
|
|
|
return MixEnvelop.getSuccess(IotRequestMapping.FileUpload.message_success_download);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload);
|
|
|
}
|
|
|
}*/
|
|
|
}
|