海澜之家的特殊code处理

special-code-hailan
qiushui 4 years ago
parent 3398c3efdb
commit 1380279036

@ -202,7 +202,7 @@ public class PlcService {
gyrateCameraByCode(cameraId,orderInfo.getCmdCode());
if(needCapture){
Boolean delay = false;
if(code.startsWith("C1") || code.startsWith("C3")){
if(code.startsWith("C1") || code.startsWith("C3") || code.startsWith("C4")){
delay = true;
}
path = cameraCapture(cameraId,delay,2000L);
@ -214,10 +214,10 @@ public class PlcService {
//转向原点位
if(times == 2){
if(street.getCamera2Id() != null){
gyrateCameraByCode(street.getCamera2Id(),"C5");
gyrateCameraByCode(street.getCamera2Id(),"C6");
}
if(street.getCamera1Id() != null){
gyrateCameraByCode(street.getCamera1Id(),"C5");
gyrateCameraByCode(street.getCamera1Id(),"C6");
}
}
}
@ -250,7 +250,7 @@ public class PlcService {
*/
public Boolean doNeedCaptureByCode(String code) {
String picCmd = code.substring(0, 2);
if (picCmd.equals("C2") || picCmd.equals("C4") || picCmd.equals("C1") || picCmd.equals("C3")) {
if (picCmd.equals("C2") || picCmd.equals("C4") || picCmd.equals("C1") || picCmd.equals("C3") || picCmd.equals("C5")) {
return true;
}
return false;

@ -120,7 +120,7 @@ public class ProtocolDecoder extends FixedLengthFrameDecoder {
}
} else if (type.equals(ACTION)) {
log.info("action code,{} plcId:{},orderInfo:{}", code, plcId, plcCmdInfo.toString());
if(code.equals("C1") || code.equals("C2") || code.equals("C3") || code.equals("C4")){
if(code.equals("C1") || code.equals("C2") || code.equals("C3") || code.equals("C4") || code.equals("C5")){
// 只有取放货的命令 才能增加 times
Integer times = GoodsActionTimes.put(plcCmdInfo.getOrderNum());
//执行动作

Loading…
Cancel
Save