1.开放了rfid检查时间配置参数

2.在wms发送盘点命令后,执行check方法
3.完成如果rfid获取到wms传输的trayCode数据的话,设置盘点为盘点成功
nanjing-yancao-rfid
LAPTOP-S9HJSOEB\昊天 3 years ago
parent 8878705305
commit f88f2d128a

@ -36,11 +36,19 @@ public class ConfigProperties {
private LightSource lightSource;
private ScanCodeMode scanCodeMode;
private Rfid rfid;
@Data
public static class Rfid {
private Long scanTime = 5L;
}
@Data
public static class CameraConfig{
private Integer cameraType;
private String cameraPassword;

@ -14,13 +14,18 @@ import com.zhehekeji.web.service.hikLightSource.HikControlSocket;
import com.zhehekeji.web.service.ksec.KsecNettyClient;
import com.zhehekeji.web.service.sick.SickSocket;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.SetUtils;
import org.apache.poi.util.ArrayUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.io.File;
import java.io.FileWriter;
import java.time.Duration;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@ -621,6 +626,22 @@ public class PlcService {
//RFID
RFID rfid = rfidService.getRFIDByPlc(street.getId());
try{
RFIDCheck(plcCmdInfo);
Thread.sleep(1000*configProperties.getRfid().getScanTime());
Set<String> tags = RFIDStop(plcCmdInfo);
if(tags!= null && tags.size()>0 && tags.contains(wmsTrayCode)){
trayCode = "";
trayCheck = Boolean.TRUE;
}else {
trayCode = "未识别";
trayCheck = Boolean.FALSE;
log.warn("sick ocr error:{}",trayCode);
}
}catch (Exception e){
e.printStackTrace();
}
}

@ -201,11 +201,14 @@ public class KsecDecoder extends DelimiterBasedFrameDecoder {
// ctx.channel().writeAndFlush(ksecInfo);
//rfid的逻辑
String code = dataInfo.getCmdName();
plcService.check(plcCmdInfo,ksecInfo.getType(),dataInfo.getCode(),dataInfo.getTrayCode());
/*
if("E1".equals(code)){
plcService.RFIDCheck(plcCmdInfo);
}else {
plcService.RFIDStop(plcCmdInfo);
}
}*/
}
//找到该货位的最后一张照片与现在的照片比照

@ -87,3 +87,9 @@ scanCodeMode:
- 14
# 照片 視頻保存多久
deleteFileDays: 365
#rfid
rfid:
#rfid连续扫描时间默认5s 单位s
scanTime: 1

@ -87,3 +87,9 @@ scanCodeMode:
- 14
# 照片 視頻保存多久
deleteFileDays: 365
#rfid
rfid:
#rfid连续扫描时间默认5s 单位s
scanTime: 1

@ -7,7 +7,7 @@ spring:
maxWait: 60000
minEvictableIdleTimeMillis: 300000
minIdle: 15
password: Leaper@123
password: root
poolPreparedStatements: true
testOnBorrow: true
testOnReturn: false
@ -64,7 +64,7 @@ lightSource:
# -----goods 货物
# 扫码模式 0:此处不盘点 1球机扫码 2sick扫码枪 3:南北达RFID
scanCodeMode:
tray: 0
tray: 3
goods: 1
goodsCodeTypes:
- 14
@ -72,3 +72,8 @@ scanCodeMode:
- 14
# 照片 視頻保存多久
deleteFileDays: 365
#rfid
rfid:
#rfid连续扫描时间默认5s 单位s
scanTime: 1

@ -32,3 +32,5 @@ zhehe:
postToken: w89euijon2&UHBTY$%huni34ri
logging:
config: classpath:logback-spring.xml
level:
com.com.zhehekeji.web.mapper: debug
Loading…
Cancel
Save