|
@@ -75,9 +75,9 @@ public class VectorController {
|
|
|
*/
|
|
|
private static int COORD_NOT_WGS84 = 0;
|
|
|
|
|
|
- BlockingQueue<MyQueue> vectorCoordQueue = new LinkedBlockingQueue<MyQueue>(1);
|
|
|
+ BlockingQueue<MyQueue> vectorCoordQueue = new LinkedBlockingQueue<MyQueue>(5);
|
|
|
|
|
|
- BlockingQueue<MyQueue> vectorSliceQueue = new LinkedBlockingQueue<MyQueue>(1);
|
|
|
+ BlockingQueue<MyQueue> vectorSliceQueue = new LinkedBlockingQueue<MyQueue>(5);
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -263,7 +263,7 @@ public class VectorController {
|
|
|
try {
|
|
|
MyQueue data = queue.poll(2, TimeUnit.SECONDS);
|
|
|
if (data != null) {
|
|
|
- log.info("消费者,拿到队列中的数据data: " + data.toString());
|
|
|
+ log.info("consumer judgeCoord: {}", data.toString());
|
|
|
|
|
|
entity = data.getOutputFile();
|
|
|
|
|
@@ -473,6 +473,38 @@ public class VectorController {
|
|
|
return vectorServer.moveFileToServer(fileId, param);
|
|
|
}
|
|
|
|
|
|
+// @ApiOperation("移动数据到服务器上")
|
|
|
+// @PostMapping("move/{fileId}/")
|
|
|
+// private R moveFile(@PathVariable("fileId") Long fileId, @RequestBody ConfigJsonDto param) {
|
|
|
+// log.info("run moveFile: {}", fileId);
|
|
|
+//
|
|
|
+// OutputFileEntity entity = vectorServer.findById(fileId);
|
|
|
+// entity.setUpdateTime(new Date());
|
|
|
+// // 发布中
|
|
|
+// entity.setStatus(13);
|
|
|
+// entity = vectorServer.save(entity);
|
|
|
+//
|
|
|
+// new Thread(new MoveVectorThread(fileId, param)).start();
|
|
|
+//
|
|
|
+// return new R(200, entity);
|
|
|
+// }
|
|
|
+
|
|
|
+ public class MoveVectorThread implements Runnable{
|
|
|
+
|
|
|
+ private Long fileId;
|
|
|
+ private ConfigJsonDto param;
|
|
|
+ public MoveVectorThread(Long fileId, ConfigJsonDto param){
|
|
|
+ this.fileId = fileId;
|
|
|
+ this.param = param;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ log.info("run MoveVectorThread");
|
|
|
+ vectorServer.moveFileToServer(fileId, param);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@ApiOperation("保存样式")
|
|
|
@PostMapping("style/save/")
|