Commit 168bdb36 zshaohui

1.1562亮灯接口开发

1 个父辈 bed2ce24
package com.neotel.smfcore.custom.Inventec1562.bean;
import lombok.Data;
@Data
public class AllLightsTurnOff {
private String ledBoard;
private String color;
private String reelShelfIp;
}
package com.neotel.smfcore.custom.Inventec1562.bean;
import lombok.Data;
@Data
public class AllLightsTurnOn {
private String ledBoard;
private String color;
private String reelShelfIp;
}
package com.neotel.smfcore.custom.Inventec1562.bean;
import lombok.Data;
@Data
public class LighthouseControl {
/**
* Return value:True/False
* Parameters:
* LedBoard:Shelf number, take the first 3 digits of the Storage location number , do not accept arrays.
* Color:R/Y -red,G/P-green,B/C-blue
* On the side of shelf location 1-700: R-red,G-green,B-blue
* On the side of shelf location 701-1400: Y-red,P-green,C-blue
* Action: 0 - off, 1 - on
* ReelShelfIP: Server IP connected to the material rack
*/
private String ledBoard;
private String color;
private Integer action;
private String reelShelfIp;
}
package com.neotel.smfcore.custom.Inventec1562.bean;
import lombok.Data;
@Data
public class MultiLight {
private String phwCode;
private String color;
private String reelShelfIp;
}
package com.neotel.smfcore.custom.Inventec1562.bean;
import lombok.Data;
@Data
public class SingleLight {
/**
* pHW_Code:Storage location number
* Color:R-red,G-green,B-blue
* Action: 0 – off, 1 – on, 2 - flashing
* Cycle:Each unit flashes for 1 second
* ReelShelfIP: Server IP connected to the material rack
*/
private String phwCode;
private String color;
private Integer action;
private Integer cycle;
private String reelShelfIp;
}
package com.neotel.smfcore.custom.Inventec1562.enums;
public enum LightAction {
close(0),
open(1),
flashing(2),
openAll(3),
closeAll(4);
private final int stateCode;
LightAction(int stateCode) {
this.stateCode = stateCode;
}
public static String getOpName(int stateCode) {
if (stateCode == 2) {
stateCode = 1;
}
for (LightAction action : LightAction.values()) {
if (action.stateCode == stateCode) {
return action.name();
}
}
return "";
}
}
package com.neotel.smfcore.custom.Inventec1562.enums;
public enum LightColor {
R("red"),
G("green"),
B("blue"),
Y("red"),
P("green"),
C("blue");
private final String blue;
LightColor(String blue) {
this.blue = blue;
}
public static String getColor(String name){
for (LightColor color : LightColor.values()) {
if (color.name().equals(name)){
return color.blue;
}
}
return "";
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!