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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
| 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
|
| /**
| ** 机器人缓存库的库位查询视图
| **/
| IF EXISTS(SELECT 1 FROM sys.views WHERE name='V_Station_Quan')
| DROP VIEW V_Station_Quan
| GO
| CREATE VIEW V_Station_Quan
| 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,
| svs.InTime,svs.Upi,svs.DetailName,svs.PlanNo,svs.OrderId,svs.PackageCode,
| svs.Length,svs.Width,svs.Thk,svs.StockStatus,svs.StockStatusName,
| svs.OperReason,svs.OperUser,svs.OperTime,svs.LockStatus,svs.LockReason,svs.LockUser,svs.LockTime
|
| FROM dbo.wms_base_place as station
| LEFT JOIN dbo.wms_stock_quan as svs ON station.placeCode=svs.placeCode
|
|
| GO
|
|
| /**
| ** 机器人缓存库的库存查询视图
| **/
| IF EXISTS(SELECT 1 FROM sys.views WHERE name='V_Station_Quan')
| DROP VIEW V_Station_Quan
| GO
| CREATE VIEW V_Station_Quan
| 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,
| svs.InTime,svs.Upi,svs.DetailName,svs.PlanNo,svs.OrderId,svs.PackageCode,
| svs.Length,svs.Width,svs.Thk,svs.StockStatus,svs.StockStatusName,
| svs.OperReason,svs.OperUser,svs.OperTime,svs.LockStatus,svs.LockReason,svs.LockUser,svs.LockTime
|
| FROM dbo.wms_base_place as station
| LEFT JOIN dbo.wms_stock_quan as svs ON station.placeCode=svs.placeCode
|
|
| GO
|
|