add
zongzhibin
2024-11-24 59575fe77af455478e81dff65e2e5e6979fdf7f6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 
use LA24030_LuLiPackageLine
GO
 
 /**
 **  机器人缓存库的空闲库位查询视图
 **/
IF EXISTS(SELECT 1 FROM sys.views WHERE name='V_EmptyStation') 
   DROP VIEW V_EmptyStation 
GO 
CREATE VIEW V_EmptyStation
AS
 
 SELECT
 
station.Id, station.PlaceCode, station.PlaceName, station.PlaceType, station.PlaceTypeName, station.[Length], 
station.Width, station.Height, station.Thick, station.PlaceStatus, station.AreaId, station.AreaCode, station.AreaName, station.RowNo,
 station.ColumnNo, station.LayerNo, station.LaneNo, station.IsVirtually, station.IsDisabled,
 station.CreateTime, station.UpdateTime, station.CreateUserId, station.CreateUserName, station.UpdateUserId, station.UpdateUserName, station.IsDelete
 
FROM dbo.wms_base_place as station
LEFT JOIN dbo.wms_stock_quan as svs ON station.placeCode=svs.placeCode
WHERE  station.IsDisabled=0  AND station.IsDelete=0
AND station.PlaceStatus=1  -- 1表示 正常
AND svs.Id IS NULL 
 
GO