forked from BaoKaiWms/202501-Wms-Kate-Wuxi
1.添加后端接口
2.添加库位可视化界面
This commit is contained in:
parent
2a7eba72c5
commit
f6328d49bd
|
|
@ -32,9 +32,17 @@ const updateELocationInfo = (params) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getAllLocations = () => {
|
||||||
|
return request({
|
||||||
|
url: '/location/getAllLocations',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getLocations,
|
getLocations,
|
||||||
updateLocation,
|
updateLocation,
|
||||||
getELocationsByPage,
|
getELocationsByPage,
|
||||||
updateELocationInfo
|
updateELocationInfo,
|
||||||
|
getAllLocations
|
||||||
}
|
}
|
||||||
|
|
@ -35,6 +35,7 @@ const routes = [
|
||||||
{ path: '/dbsList', component: () => import('@/layout/dbsList.vue') },// dbs计划
|
{ path: '/dbsList', component: () => import('@/layout/dbsList.vue') },// dbs计划
|
||||||
{ path: '/kittingList', component: () => import('@/layout/kittingList.vue') },// 配料单
|
{ path: '/kittingList', component: () => import('@/layout/kittingList.vue') },// 配料单
|
||||||
{ path: '/kittingRelation', component: () => import('@/layout/kittingRelation.vue') },// 配料单
|
{ path: '/kittingRelation', component: () => import('@/layout/kittingRelation.vue') },// 配料单
|
||||||
|
{ path: '/locationVisualization', component: () => import('@/layout/locationVisualization.vue')} // 库位可视化
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ import com.wms_main.service.controller.ILocationControllerService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 卡特相关控制类
|
* 卡特相关控制类
|
||||||
*/
|
*/
|
||||||
|
|
@ -39,4 +41,13 @@ public class LocationController {
|
||||||
public WmsApiResponse<PageVo<LocationVo>> queryLocationsByPage(@RequestBody LocationQuery locationQuery) {
|
public WmsApiResponse<PageVo<LocationVo>> queryLocationsByPage(@RequestBody LocationQuery locationQuery) {
|
||||||
return locationControllerService.queryLocationsByPage(locationQuery);
|
return locationControllerService.queryLocationsByPage(locationQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有库位信息
|
||||||
|
* @return 所有库位列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/getAllLocations")
|
||||||
|
public WmsApiResponse<List<LocationVo>> getAllLocations() {
|
||||||
|
return locationControllerService.getAllLocations();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,12 @@ package com.wms_main.service.controller;
|
||||||
import com.wms_main.model.dto.query.LocationQuery;
|
import com.wms_main.model.dto.query.LocationQuery;
|
||||||
import com.wms_main.model.dto.response.wms.BaseWmsApiResponse;
|
import com.wms_main.model.dto.response.wms.BaseWmsApiResponse;
|
||||||
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||||
|
import com.wms_main.model.po.TAppLocation;
|
||||||
import com.wms_main.model.vo.wms.LocationVo;
|
import com.wms_main.model.vo.wms.LocationVo;
|
||||||
import com.wms_main.model.vo.wms.PageVo;
|
import com.wms_main.model.vo.wms.PageVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库位控制类服务
|
* 库位控制类服务
|
||||||
*/
|
*/
|
||||||
|
|
@ -23,4 +26,10 @@ public interface ILocationControllerService {
|
||||||
* @return 查询结果
|
* @return 查询结果
|
||||||
*/
|
*/
|
||||||
WmsApiResponse<PageVo<LocationVo>> queryLocationsByPage(LocationQuery locationQuery);
|
WmsApiResponse<PageVo<LocationVo>> queryLocationsByPage(LocationQuery locationQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有库位信息
|
||||||
|
* @return 库位列表
|
||||||
|
*/
|
||||||
|
WmsApiResponse<List<LocationVo>> getAllLocations();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,4 +89,21 @@ public class LocationControllerServiceImpl implements ILocationControllerService
|
||||||
PageVo<LocationVo> pageVo = PageVo.of(poPage, LocationVo::of);
|
PageVo<LocationVo> pageVo = PageVo.of(poPage, LocationVo::of);
|
||||||
return WmsApiResponse.success("查询库位成功", pageVo);
|
return WmsApiResponse.success("查询库位成功", pageVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有库位信息---实现
|
||||||
|
* @return 库位列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public WmsApiResponse<List<LocationVo>> getAllLocations() {
|
||||||
|
// 获取所有库位数据
|
||||||
|
List<TAppLocation> locationList = appLocationService.list();
|
||||||
|
|
||||||
|
// 将PO对象转换为VO对象
|
||||||
|
List<LocationVo> locationVoList = locationList.stream()
|
||||||
|
.map(LocationVo::of)
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
return WmsApiResponse.success("获取所有库位成功", locationVoList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user