opt:优化agv代码结构
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
<artifactId>nl-tool-platform</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>nl-agv</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>nl-agv</name>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
package org.nl.agv.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.agv.service.entity.AgvCar;
|
||||
import org.nl.agv.service.mapper.AgvCarMapper;
|
||||
import org.nl.layout.service.dto.MapLayout;
|
||||
import org.nl.layout.service.entity.AgvLayoutMap;
|
||||
|
||||
public interface AgvCarService extends IService<AgvCar> {
|
||||
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package org.nl.agv.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.nl.agv.service.AgvCarService;
|
||||
import org.nl.agv.service.entity.AgvCar;
|
||||
import org.nl.agv.service.mapper.AgvCarMapper;
|
||||
import org.nl.common.localStorage.service.LocalStorageService;
|
||||
import org.nl.common.localStorage.service.entity.LocalStorage;
|
||||
import org.nl.layout.service.AgvLayoutService;
|
||||
import org.nl.layout.service.dto.DeviceLayout;
|
||||
import org.nl.layout.service.dto.MapLayout;
|
||||
import org.nl.layout.service.entity.AgvLayoutDevice;
|
||||
import org.nl.layout.service.entity.AgvLayoutMap;
|
||||
import org.nl.layout.service.mapper.AgvLayoutDeviceMapper;
|
||||
import org.nl.layout.service.mapper.AgvLayoutMapMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service
|
||||
public class AgvCarServiceImpl extends ServiceImpl<AgvCarMapper, AgvCar> implements AgvCarService {
|
||||
|
||||
}
|
||||
4
nl-agv/src/main/java/org/nl/core/AgvConfig.java
Normal file
4
nl-agv/src/main/java/org/nl/core/AgvConfig.java
Normal file
@@ -0,0 +1,4 @@
|
||||
package org.nl.core;
|
||||
|
||||
public class AgvConfig {
|
||||
}
|
||||
4
nl-agv/src/main/java/org/nl/core/AgvEnum.java
Normal file
4
nl-agv/src/main/java/org/nl/core/AgvEnum.java
Normal file
@@ -0,0 +1,4 @@
|
||||
package org.nl.core;
|
||||
|
||||
public enum AgvEnum {
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package org.nl.layout.service.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Options;
|
||||
import org.nl.common.localStorage.service.entity.LocalStorage;
|
||||
import org.nl.layout.service.entity.AgvLayoutDevice;
|
||||
|
||||
@Mapper
|
||||
public interface AgvLayoutDeviceMapper extends BaseMapper<AgvLayoutDevice> {
|
||||
|
||||
|
||||
}
|
||||
@@ -10,19 +10,18 @@
|
||||
* 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
|
||||
* 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
|
||||
*/
|
||||
package org.nl.agv.controller;
|
||||
package org.nl.module.agv.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.agv.service.AgvCarService;
|
||||
import org.nl.agv.service.entity.AgvCar;
|
||||
import org.nl.agv.service.query.AgvCarQuery;
|
||||
import org.nl.module.agv.service.AgvCarService;
|
||||
import org.nl.module.agv.entity.AgvCar;
|
||||
import org.nl.module.agv.dto.AgvCarQuery;
|
||||
import org.nl.common.page.PageQuery;
|
||||
import org.nl.common.pojo.CommonResult;
|
||||
import org.nl.agv.service.dto.AgvStatus;
|
||||
import org.nl.module.agv.dto.AgvStatus;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -1,8 +1,7 @@
|
||||
package org.nl.agv.service.query;
|
||||
package org.nl.module.agv.dto;
|
||||
|
||||
import org.nl.agv.service.entity.AgvCar;
|
||||
import org.nl.module.agv.entity.AgvCar;
|
||||
import org.nl.common.page.BaseQuery;
|
||||
import org.nl.layout.service.entity.AgvLayoutMap;
|
||||
|
||||
public class AgvCarQuery extends BaseQuery<AgvCar> {
|
||||
@Override
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.nl.agv.service.dto;
|
||||
package org.nl.module.agv.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.nl.agv.service.entity;
|
||||
package org.nl.module.agv.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@@ -1,8 +1,8 @@
|
||||
package org.nl.agv.service.mapper;
|
||||
package org.nl.module.agv.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.nl.agv.service.entity.AgvCar;
|
||||
import org.nl.module.agv.entity.AgvCar;
|
||||
|
||||
@Mapper
|
||||
public interface AgvCarMapper extends BaseMapper<AgvCar> {
|
||||
@@ -0,0 +1,8 @@
|
||||
package org.nl.module.agv.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.module.agv.entity.AgvCar;
|
||||
|
||||
public interface AgvCarService extends IService<AgvCar> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.nl.module.agv.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.module.agv.entity.AgvCar;
|
||||
import org.nl.module.agv.mapper.AgvCarMapper;
|
||||
import org.nl.module.agv.service.AgvCarService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@Service
|
||||
public class AgvCarServiceImpl extends ServiceImpl<AgvCarMapper, AgvCar> implements AgvCarService {
|
||||
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
* 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
|
||||
* 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
|
||||
*/
|
||||
package org.nl.layout.controller;
|
||||
package org.nl.module.layout.controller;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
@@ -18,23 +18,17 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.nl.agv.service.AgvCarService;
|
||||
import org.nl.common.exception.CommonException;
|
||||
import org.nl.common.page.PageQuery;
|
||||
import org.nl.common.pojo.CommonResult;
|
||||
import org.nl.agv.service.dto.AgvStatus;
|
||||
import org.nl.layout.service.AgvLayoutService;
|
||||
import org.nl.layout.service.dto.MapLayout;
|
||||
import org.nl.layout.service.entity.AgvLayoutMap;
|
||||
import org.nl.layout.service.query.MapLayoutQuery;
|
||||
import org.nl.module.layout.service.AgvLayoutService;
|
||||
import org.nl.module.layout.service.dto.MapLayout;
|
||||
import org.nl.module.layout.service.entity.AgvLayoutMap;
|
||||
import org.nl.module.layout.service.query.MapLayoutQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@Tag(name = "AGV模块")
|
||||
@RestController()
|
||||
@RequestMapping("/api/agv/map")
|
||||
@@ -1,8 +1,8 @@
|
||||
package org.nl.layout.service;
|
||||
package org.nl.module.layout.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.layout.service.dto.MapLayout;
|
||||
import org.nl.layout.service.entity.AgvLayoutMap;
|
||||
import org.nl.module.layout.service.dto.MapLayout;
|
||||
import org.nl.module.layout.service.entity.AgvLayoutMap;
|
||||
|
||||
public interface AgvLayoutService extends IService<AgvLayoutMap> {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.nl.layout.service.dto;
|
||||
package org.nl.module.layout.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.nl.layout.service.dto;
|
||||
package org.nl.module.layout.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.nl.layout.service.dto;
|
||||
package org.nl.module.layout.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.nl.layout.service.entity;
|
||||
package org.nl.module.layout.service.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.nl.layout.service.entity;
|
||||
package org.nl.module.layout.service.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@@ -1,29 +1,20 @@
|
||||
package org.nl.layout.service.impl;
|
||||
package org.nl.module.layout.service.impl;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.nl.common.exception.CommonException;
|
||||
import org.nl.common.localStorage.service.LocalStorageService;
|
||||
import org.nl.common.localStorage.service.mapper.LocalStorageMapper;
|
||||
import org.nl.common.localStorage.service.entity.LocalStorage;
|
||||
import org.nl.common.util.FileProperties;
|
||||
import org.nl.common.util.FileUtil;
|
||||
import org.nl.layout.service.AgvLayoutService;
|
||||
import org.nl.layout.service.dto.DeviceLayout;
|
||||
import org.nl.layout.service.dto.MapLayout;
|
||||
import org.nl.layout.service.entity.AgvLayoutDevice;
|
||||
import org.nl.layout.service.entity.AgvLayoutMap;
|
||||
import org.nl.layout.service.mapper.AgvLayoutDeviceMapper;
|
||||
import org.nl.layout.service.mapper.AgvLayoutMapMapper;
|
||||
import org.nl.module.layout.service.AgvLayoutService;
|
||||
import org.nl.module.layout.service.dto.DeviceLayout;
|
||||
import org.nl.module.layout.service.dto.MapLayout;
|
||||
import org.nl.module.layout.service.entity.AgvLayoutDevice;
|
||||
import org.nl.module.layout.service.entity.AgvLayoutMap;
|
||||
import org.nl.module.layout.service.mapper.AgvLayoutDeviceMapper;
|
||||
import org.nl.module.layout.service.mapper.AgvLayoutMapMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package org.nl.module.layout.service.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.nl.module.layout.service.entity.AgvLayoutDevice;
|
||||
|
||||
@Mapper
|
||||
public interface AgvLayoutDeviceMapper extends BaseMapper<AgvLayoutDevice> {
|
||||
|
||||
|
||||
}
|
||||
@@ -1,12 +1,11 @@
|
||||
package org.nl.layout.service.mapper;
|
||||
package org.nl.module.layout.service.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Options;
|
||||
import org.nl.common.localStorage.service.entity.LocalStorage;
|
||||
import org.nl.layout.service.dto.MapLayout;
|
||||
import org.nl.layout.service.entity.AgvLayoutMap;
|
||||
import org.nl.module.layout.service.dto.MapLayout;
|
||||
import org.nl.module.layout.service.entity.AgvLayoutMap;
|
||||
|
||||
@Mapper
|
||||
public interface AgvLayoutMapMapper extends BaseMapper<AgvLayoutMap> {
|
||||
@@ -1,20 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.layout.service.mapper.AgvLayoutMapMapper">
|
||||
<mapper namespace="org.nl.module.layout.service.mapper.AgvLayoutMapMapper">
|
||||
|
||||
|
||||
<resultMap id="mapLayoutResultMap" type="org.nl.layout.service.dto.MapLayout">
|
||||
<resultMap id="mapLayoutResultMap" type="org.nl.module.layout.service.dto.MapLayout">
|
||||
<result property="mapId" column="map_id"/>
|
||||
<result property="width" column="width"/>
|
||||
<result property="height" column="height"/>
|
||||
<result property="url" column="url"/>
|
||||
<!-- 映射origin对象 -->
|
||||
<association property="origin" javaType="org.nl.layout.service.dto.MapOrigin">
|
||||
<association property="origin" javaType="org.nl.module.layout.service.dto.MapOrigin">
|
||||
<result property="x" column="origin_x"/>
|
||||
<result property="y" column="origin_y"/>
|
||||
</association>
|
||||
<!-- 映射设备列表 -->
|
||||
<collection property="devices" ofType="org.nl.layout.service.dto.DeviceLayout">
|
||||
<collection property="devices" ofType="org.nl.module.layout.service.dto.DeviceLayout">
|
||||
<id property="id" column="device_id"/>
|
||||
<result property="code" column="device_code"/>
|
||||
<result property="name" column="device_name"/>
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.nl.layout.service.query;
|
||||
package org.nl.module.layout.service.query;
|
||||
|
||||
import org.nl.common.page.BaseQuery;
|
||||
import org.nl.layout.service.entity.AgvLayoutMap;
|
||||
import org.nl.module.layout.service.entity.AgvLayoutMap;
|
||||
|
||||
public class MapLayoutQuery extends BaseQuery<AgvLayoutMap> {
|
||||
@Override
|
||||
Reference in New Issue
Block a user