Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
SmartShelf
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 01df7a66
由
LN
编写于
2020-06-02 17:23:20 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
/rest/api/v1/shelf/allPosOff 增加 shelf参数 表示料架号
1 个父辈
5695894c
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
24 行增加
和
4 行删除
DeviceLibrary/manager/BOXManager.cs
DeviceLibrary/manager/BOXManager.cs
查看文件 @
01df7a6
...
@@ -181,6 +181,7 @@ namespace SmartShelf.DeviceLibrary
...
@@ -181,6 +181,7 @@ namespace SmartShelf.DeviceLibrary
public
static
string
Param_posId
=
"posId"
;
public
static
string
Param_posId
=
"posId"
;
public
static
string
Param_color
=
"color"
;
public
static
string
Param_color
=
"color"
;
public
static
string
Param_shelf
=
"shelf"
;
public
static
char
PosId_SpiltChar
=
';'
;
public
static
char
PosId_SpiltChar
=
';'
;
public
static
char
PosId_Color_SpiltChar
=
'@'
;
public
static
char
PosId_Color_SpiltChar
=
'@'
;
...
@@ -232,15 +233,25 @@ namespace SmartShelf.DeviceLibrary
...
@@ -232,15 +233,25 @@ namespace SmartShelf.DeviceLibrary
{
{
bool
result
=
true
;
bool
result
=
true
;
string
color
=
""
;
string
color
=
""
;
string
shelf
=
""
;
if
(
paramMap
.
ContainsKey
(
Param_color
)
&&
(
paramMap
[
Param_color
]
!=
""
))
if
(
paramMap
.
ContainsKey
(
Param_color
)
&&
(
paramMap
[
Param_color
]
!=
""
))
{
{
color
=
paramMap
[
Param_color
];
color
=
paramMap
[
Param_color
];
result
=
ProcessCloseByColor
(
color
);
}
}
else
if
(
paramMap
.
ContainsKey
(
Param_shelf
)
&&
paramMap
[
Param_shelf
]
!=
""
)
{
shelf
=
paramMap
[
Param_shelf
];
}
if
(
String
.
IsNullOrEmpty
(
color
)&&
String
.
IsNullOrEmpty
(
shelf
))
{
{
result
=
ProcessCloseAll
();
result
=
ProcessCloseAll
();
}
}
else
{
result
=
ProcessCloseByParam
(
color
,
shelf
);
}
return
GetResult
(
result
,
"allPosOff"
);
return
GetResult
(
result
,
"allPosOff"
);
}
}
else
else
...
@@ -349,7 +360,7 @@ namespace SmartShelf.DeviceLibrary
...
@@ -349,7 +360,7 @@ namespace SmartShelf.DeviceLibrary
return
true
;
return
true
;
}
}
public
static
bool
ProcessCloseBy
Color
(
string
color
,
string
proMsg
=
"Revice "
,
string
ip
=
""
)
public
static
bool
ProcessCloseBy
Param
(
string
color
,
string
shelf
,
string
proMsg
=
"Revice "
,
string
ip
=
""
)
{
{
LogUtil
.
info
(
BoxName
+
proMsg
+
" ProcessCloseByColor 命令:"
+
color
);
LogUtil
.
info
(
BoxName
+
proMsg
+
" ProcessCloseByColor 命令:"
+
color
);
List
<
string
>
posIdList
=
new
List
<
string
>(
PositionMap
.
Keys
);
List
<
string
>
posIdList
=
new
List
<
string
>(
PositionMap
.
Keys
);
...
@@ -357,8 +368,16 @@ namespace SmartShelf.DeviceLibrary
...
@@ -357,8 +368,16 @@ namespace SmartShelf.DeviceLibrary
Dictionary
<
string
,
List
<
Light
>>
lightsMap
=
new
Dictionary
<
string
,
List
<
Light
>>();
Dictionary
<
string
,
List
<
Light
>>
lightsMap
=
new
Dictionary
<
string
,
List
<
Light
>>();
foreach
(
string
key
in
posIdList
)
foreach
(
string
key
in
posIdList
)
{
{
string
shelfStr
=
shelf
+
"_"
;
if
(
String
.
IsNullOrEmpty
(
shelf
)
||
key
.
StartsWith
(
shelfStr
))
{
string
status
=
GetPosIdColor
(
key
);
string
status
=
GetPosIdColor
(
key
);
if
(
status
.
ToLower
().
Equals
(
color
.
ToLower
()))
if
(
String
.
IsNullOrEmpty
(
status
))
{
continue
;
}
if
(
String
.
IsNullOrEmpty
(
color
)
||
status
.
ToLower
().
Equals
(
color
.
ToLower
()))
{
{
BoxPosition
position
=
PositionMap
[
key
];
BoxPosition
position
=
PositionMap
[
key
];
Light
[]
lightArray
=
Light
.
GetLights
(
position
.
DmxId
,
position
.
GetLedList
(),
0
);
Light
[]
lightArray
=
Light
.
GetLights
(
position
.
DmxId
,
position
.
GetLedList
(),
0
);
...
@@ -367,6 +386,7 @@ namespace SmartShelf.DeviceLibrary
...
@@ -367,6 +386,7 @@ namespace SmartShelf.DeviceLibrary
UpdatePosIdColor
(
key
);
UpdatePosIdColor
(
key
);
}
}
}
}
}
foreach
(
string
dip
in
lightsMap
.
Keys
)
foreach
(
string
dip
in
lightsMap
.
Keys
)
{
{
List
<
Light
>
lights
=
lightsMap
[
dip
];
List
<
Light
>
lights
=
lightsMap
[
dip
];
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论