修改jdk版本
This commit is contained in:
@@ -112,14 +112,6 @@
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>17</source>
|
||||
<target>17</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</build>
|
||||
|
||||
@@ -151,7 +151,7 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
}
|
||||
MydoJob outJob = outMydoJobs.get(0);
|
||||
//料箱出库 需同步电子标签
|
||||
if("23".equals(outJob.getInOut())){
|
||||
if("23".equals(outJob.getInOrOut())){
|
||||
//查询拣选工位绑定的电子标签
|
||||
BasTag tagParam = new BasTag();
|
||||
tagParam.setPickAdd(wmsJobRequest.getPickSsj());
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
@@ -182,7 +183,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!stringBuilder.isEmpty()){
|
||||
if (!StrUtil.isEmpty(stringBuilder.toString())){
|
||||
return AjaxResult.warn(stringBuilder.toString());
|
||||
}
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -41,6 +41,7 @@ public class TagReadThread implements Runnable{
|
||||
for (Long tagId : tagGroup.keySet()) {
|
||||
BasTag basTag = basTagService.selectBasTagById(tagId);
|
||||
try (Socket socket = getSocket(basTag)){
|
||||
while (true){
|
||||
/** 接收电子标签指令 */
|
||||
String content = ElectronicTagClient.receiveHexData(socket,0);//读取值
|
||||
if (!content.isEmpty()) {
|
||||
@@ -80,6 +81,7 @@ public class TagReadThread implements Runnable{
|
||||
basTagService.updateBasTag(basTag);
|
||||
//删除tagList
|
||||
tagTaskMapper.deleteTagTaskByIds(tagTasks.stream().map(TagTask::getId).toArray(Long[]::new));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,6 +92,8 @@ public class TagReadThread implements Runnable{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.ruoyi.out.tagTask.util;
|
||||
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.HexFormat;
|
||||
|
||||
public class ElectronicTagClient {
|
||||
|
||||
@@ -85,11 +85,11 @@ public class ElectronicTagClient {
|
||||
|
||||
// 16进制字符串转字节数组
|
||||
public static byte[] hexStringToByteArray(String hexString) {
|
||||
return HexFormat.of().parseHex(hexString);
|
||||
return DatatypeConverter.parseHexBinary(hexString);
|
||||
}
|
||||
|
||||
// 字节数组转16进制字符串
|
||||
private static String byteArrayToHexString(byte[] bytes) {
|
||||
return HexFormat.of().formatHex(bytes).toUpperCase();
|
||||
return DatatypeConverter.printHexBinary(bytes).toUpperCase();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user