#
Junjie
2024-03-26 1fa4310f3a865b557569584702a047631b0967e4
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/service/MapService.java
@@ -14,6 +14,7 @@
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.Optional;
/**
 * Created by vincent on 3/15/2024
@@ -26,14 +27,16 @@
    @Autowired
    private DictService dictService;
    public MapDataParam getMapData(MapQueryParam param, Long userId) {
    public String getMapFloorList(Long userId) {
        String floorKey = "map-floor-list";
        Dict dict = dictService.getOne(new LambdaQueryWrapper<Dict>().eq(Dict::getFlag, floorKey));
        return Optional.ofNullable(dict).map(Dict::getValue).orElse(null);
    }
    public String getMapData(MapQueryParam param, Long userId) {
        String mapKey = getMapKey(param.getFloor());
        Dict dict = dictService.getOne(new LambdaQueryWrapper<Dict>().eq(Dict::getFlag, mapKey));
        if (Cools.isEmpty(dict)) {
            return null;
        } else {
            return JSON.parseObject(dict.getValue(), MapDataParam.class) ;
        }
        return Optional.ofNullable(dict).map(Dict::getValue).orElse(null);
    }
    public void saveMapData(MapDataParam param, Long userId) {