fix:文件上传优化
This commit is contained in:
@@ -6,7 +6,7 @@ import java.util.List;
|
||||
|
||||
@Data
|
||||
public class MapLayout {
|
||||
private Long mapId;
|
||||
private String mapId;
|
||||
private Integer width;
|
||||
private Integer height;
|
||||
private MapOrigin origin;
|
||||
|
||||
@@ -3,6 +3,8 @@ package org.nl.module.layout.service.impl;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.nl.common.localStorage.service.LocalStorageService;
|
||||
import org.nl.common.localStorage.service.entity.LocalStorage;
|
||||
import org.nl.dev.api.DevFileApi;
|
||||
import org.nl.dev.dto.DevFileApiDto;
|
||||
import org.nl.module.layout.service.AgvLayoutService;
|
||||
import org.nl.module.layout.service.dto.DeviceLayout;
|
||||
import org.nl.module.layout.service.dto.MapLayout;
|
||||
@@ -22,18 +24,18 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@Service
|
||||
public class AgvLayoutServiceImpl extends ServiceImpl<AgvLayoutMapMapper, AgvLayoutMap> implements AgvLayoutService {
|
||||
@Autowired
|
||||
private LocalStorageService localStorageService;
|
||||
private DevFileApi devFileApi;
|
||||
@Resource
|
||||
private AgvLayoutDeviceMapper agvLayoutDeviceMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void saveLayout(MapLayout layout) {
|
||||
LocalStorage storage = localStorageService.getById(layout.getMapId());
|
||||
DevFileApiDto storage = devFileApi.getFileInfoById(layout.getMapId());
|
||||
AgvLayoutMap layoutMap = AgvLayoutMap.builder()
|
||||
.mapId(layout.getMapId())
|
||||
.mapName(storage.getName())
|
||||
.url(storage.getPath())
|
||||
.url(storage.getStoragePath())
|
||||
.width(layout.getWidth())
|
||||
.height(layout.getHeight())
|
||||
.x(layout.getOrigin().getX())
|
||||
|
||||
Reference in New Issue
Block a user