rain
2024-05-30 c00662a72ca1582c064a2bd76aa92fd22fbfedc6
src/main/java/com/dji/sample/patches/service/impl/GetPatchesServiceImpl.java
@@ -14,6 +14,7 @@
import com.dji.sample.wayline.model.entity.WaylineFileEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.stream.Collectors;
@@ -26,6 +27,7 @@
    /**
     * 分页获取数据的接口实现。
     *
     * @param param 包含分页信息和查询条件的工作空间ID。
     * @return 返回一个包含查询结果和分页信息的PaginationData对象。
     */
@@ -44,6 +46,7 @@
    public void delPatches() {
        mapper.delete(null);
    }
    /**
     * 根据条件获取照片的分页数据
     *
@@ -54,12 +57,13 @@
    @Override
    public PaginationData<MediaFileEntity> getPhoto(PatchesParam param,String dkbh) {
        Page<MediaFileEntity> page=fileMapper.selectPage(new Page<MediaFileEntity>(param.getPage(), param.getPageSize()),
                new LambdaQueryWrapper<MediaFileEntity>().like(MediaFileEntity::getFileName, "%" + dkbh + "%") );
                new LambdaQueryWrapper<MediaFileEntity>().like(MediaFileEntity::getFileName, "%" + dkbh + "~" + "%"));
        List<MediaFileEntity> records = page.getRecords()
                .stream()
                .collect(Collectors.toList());
        return new PaginationData<MediaFileEntity>(records, new Pagination(page));
    }
    /**
     * 根据条件获取照片的分页数据
     *
@@ -71,8 +75,10 @@
       return fileMapper.selectList(new LambdaQueryWrapper<MediaFileEntity>().like(MediaFileEntity::getFileName, "%" + dkbh + "%")
               .eq(MediaFileEntity::getWorkspaceId,workspaceId));
    }
    /**
     * 根据地块编号和工作空间ID获取地块信息。
     *
     * @param dkbh 地块编号,用于查询特定定单的地块信息。
     * @param workspaceId 工作空间ID,用于查询属于特定工作空间的地块信息。
     * @return 返回匹配给定地块编号和工作空间ID的地块信息对象。如果找不到匹配的记录,则返回null。
@@ -81,9 +87,11 @@
       return mapper.selectOne(new LambdaQueryWrapper<LotInfo>().eq(LotInfo::getDkbh, dkbh)
                .eq(LotInfo::getWorkspaceId, workspaceId));
    }
    public LotInfo getLotinfoToDb(String dkbh) {
        return mapper.selectOne(new LambdaQueryWrapper<LotInfo>().eq(LotInfo::getDkbh, dkbh));
    }
    public List<LotInfo>listLotinfo(){
        return mapper.selectList(null);
    }