From 75e6eea8cd3fac9cc888e2ffc9cdb126fab8429d Mon Sep 17 00:00:00 2001
From: rain <167982779@qq.com>
Date: Wed, 14 Aug 2024 15:45:55 +0800
Subject: [PATCH] 任务下发、更新、取消,优化图斑逻辑

---
 src/main/java/com/dji/sample/patches/service/impl/GetPatchesServiceImpl.java |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/dji/sample/patches/service/impl/GetPatchesServiceImpl.java b/src/main/java/com/dji/sample/patches/service/impl/GetPatchesServiceImpl.java
index 846be5a..581b5f6 100644
--- a/src/main/java/com/dji/sample/patches/service/impl/GetPatchesServiceImpl.java
+++ b/src/main/java/com/dji/sample/patches/service/impl/GetPatchesServiceImpl.java
@@ -67,6 +67,12 @@
         if (param.getBsm() != null && !param.getBsm().isEmpty()) {
             queryWrapper.like(LotInfo::getXmc, param.getBsm());
         }
+        if (param.getDkmj()!=null){
+            queryWrapper.eq(LotInfo::getDkmj,param.getDkmj());
+        }
+        if (param.getIsPush() != null) {
+            queryWrapper.eq(LotInfo::getIsPush, param.getIsPush());
+        }
 
         // 执行分页查询
         Page<LotInfo> resultPage = mapper.selectPage(page, queryWrapper);
@@ -161,14 +167,29 @@
                 .eq(MediaFileEntity::getWorkspaceId, workspaceId)
                 .eq(MediaFileEntity::getExamine,1));
     }
+    public List<MediaFileEntity> listPohto(String dkbh) {
+        return fileMapper.selectList(new LambdaQueryWrapper<MediaFileEntity>().like(MediaFileEntity::getFileName, "%" + dkbh + "%")
+                .eq(MediaFileEntity::getExamine,1));
+    }
     public LotInfo getLotinfo(String dkbh, String workspaceId) {
         return mapper.selectOne(new LambdaQueryWrapper<LotInfo>().eq(LotInfo::getDkbh, dkbh)
                 .eq(LotInfo::getWorkspaceId, workspaceId));
+    }
+
+    public LotInfo getLotinfo(String dkbh) {
+        return mapper.selectOne(new LambdaQueryWrapper<LotInfo>().eq(LotInfo::getDkbh, dkbh));
     }
     public void patchesPushed(String taskId, String dkbh, String workspaceId) {
         LambdaUpdateWrapper<LotInfo> updateWrapper = new LambdaUpdateWrapper<>();
         updateWrapper.set(LotInfo::getIsPush, 1)
                 .eq(LotInfo::getWorkspaceId, workspaceId)
+                .eq(LotInfo::getDkbh, dkbh)
+                .eq(LotInfo::getTaskId, taskId);
+        mapper.update(null, updateWrapper);
+    }
+    public void patchesPushed(String taskId, String dkbh) {
+        LambdaUpdateWrapper<LotInfo> updateWrapper = new LambdaUpdateWrapper<>();
+        updateWrapper.set(LotInfo::getIsPush, 1)
                 .eq(LotInfo::getDkbh, dkbh)
                 .eq(LotInfo::getTaskId, taskId);
         mapper.update(null, updateWrapper);
@@ -181,8 +202,8 @@
         queryWrapper.in(LotInfo::getId, ids);
         return mapper.selectList(queryWrapper);
     }
-    public List<LotInfo> listLotinfo() {
-        return mapper.selectList(null);
+    public List<LotInfo> listLotinfo(String workspaceId) {
+        return mapper.selectList(new LambdaQueryWrapper<LotInfo>().eq(LotInfo::getWorkspaceId,workspaceId));
     }
     @Override
     public LotInfo getPatchesFromId(String patchesId){

--
Gitblit v1.9.3