From 1e5aefcfe44ed8570d58cb810e798803186a2a79 Mon Sep 17 00:00:00 2001
From: rain <167982779@qq.com>
Date: Tue, 07 May 2024 10:39:29 +0800
Subject: [PATCH] 修改上传接口

---
 src/main/java/com/dji/sample/patches/service/impl/ShpToDataSourceServiceImpl.java |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/dji/sample/patches/service/impl/ShpToDataSourceServiceImpl.java b/src/main/java/com/dji/sample/patches/service/impl/ShpToDataSourceServiceImpl.java
index 5e256ed..4549c98 100644
--- a/src/main/java/com/dji/sample/patches/service/impl/ShpToDataSourceServiceImpl.java
+++ b/src/main/java/com/dji/sample/patches/service/impl/ShpToDataSourceServiceImpl.java
@@ -79,11 +79,13 @@
     }
 
     @Transactional
-    public void savaInMysql(List<TbDkjbxxEntity> list, String workspaceId) {
+    public void savaInMysql(List<TbDkjbxxEntity> list, String workspaceId,int id,String name) {
         for (int i = 0; i < list.size(); i++) {
             LotInfo lotInfo = new LotInfo();
             lotInfo.setWorkspaceId(workspaceId);
-            lotInfo = dbConvertToEntity(list.get(i), workspaceId);
+            lotInfo.setTaskId(id);
+            lotInfo.setTaskName(name);
+            lotInfo = dbConvertToEntity(list.get(i), workspaceId, id, name);
             shpToDataSourceMapper.insert(lotInfo);
         }
     }
@@ -95,20 +97,22 @@
      * @param file 需要转换的DKJBXX对象。
      * @return 返回一个构建好的LotInfo对象,包含从数据库实体中转换来的信息。
      */
-    private LotInfo dbConvertToEntity(TbDkjbxxEntity file, String workspaceId) {
+    private LotInfo dbConvertToEntity(TbDkjbxxEntity file, String workspaceId,int id,String name) {
         LotInfo.LotInfoBuilder builder = LotInfo.builder();
         builder.bsm(file.getFId())
                 .xzqdm(file.getFXzqdmsys())
                 .dkbh(file.getFTbbh())
                 .dkfw(file.getFShape())
                 .workspaceId(workspaceId)
-                .isplan(0)
+                .isPlan(0)
+                .taskId(id)
+                .taskName(name)
                 .build();
         return builder.build();
     }
 
     public List<LotInfo> getNoPlan(){
-   return shpToDataSourceMapper.selectList(new LambdaQueryWrapper<LotInfo>().eq(LotInfo::getIsplan,0));
+   return shpToDataSourceMapper.selectList(new LambdaQueryWrapper<LotInfo>().eq(LotInfo::getIsPlan,0));
     }
 }
 

--
Gitblit v1.9.3