现场调度问题修改

This commit is contained in:
liuhanqing
2026-01-17 17:55:06 +08:00
parent 82a596c2b7
commit ca65da7690
14 changed files with 138 additions and 180 deletions

View File

@@ -66,18 +66,35 @@ public class ScheduleThread {
private void scheduleInit() {
MonitoringThread monitoringThread = new MonitoringThread();
monitoringCustomThread = new CustomThread<MonitoringThread>(new Thread(monitoringThread), monitoringThread);
Ddj4Thread ddj4Thread = new Ddj4Thread(plcDdj4ReadCustomThread.runnable,plcSsjReadCustomThread.runnable);
ddj4CustomThread = new CustomThread<>(new Thread(ddj4Thread), ddj4Thread);
/*Ddj2Thread ddj2Thread = new Ddj2Thread();
ddj2CustomThread = new CustomThread<>(new Thread(ddj2Thread), ddj2Thread);
Ddj3Thread ddj3Thread = new Ddj3Thread();
ddj3CustomThread = new CustomThread<>(new Thread(ddj3Thread), ddj3Thread);
Ddj4Thread ddj4Thread = new Ddj4Thread();
ddj4CustomThread = new CustomThread<>(new Thread(ddj4Thread), ddj4Thread);
Ddj5Thread ddj5Thread = new Ddj5Thread();
ddj5CustomThread = new CustomThread<>(new Thread(ddj5Thread), ddj5Thread);
Ddj6Thread ddj6Thread = new Ddj6Thread();
ddj6CustomThread = new CustomThread<>(new Thread(ddj6Thread), ddj6Thread);*/
List<MsgDdj> msgDdjs = msgDdjService.selectMsgDdjList(new MsgDdj());
for (MsgDdj msgDdj : msgDdjs) {
if ("0".equals(msgDdj.getSpare1())){
if (msgDdj.getId() == 1){
Ddj1Thread ddjThread = new Ddj1Thread(plcDdj1ReadCustomThread.runnable,plcSsjReadCustomThread.runnable);
ddj1CustomThread = new CustomThread<>(new Thread(ddjThread), ddjThread);
}
if (msgDdj.getId() == 2){
Ddj2Thread ddjThread = new Ddj2Thread(plcDdj2ReadCustomThread.runnable,plcSsjReadCustomThread.runnable);
ddj2CustomThread = new CustomThread<>(new Thread(ddjThread), ddjThread);
}
if (msgDdj.getId() == 3){
Ddj3Thread ddjThread = new Ddj3Thread(plcDdj3ReadCustomThread.runnable,plcSsjReadCustomThread.runnable);
ddj3CustomThread = new CustomThread<>(new Thread(ddjThread), ddjThread);
}
if (msgDdj.getId() == 4){
Ddj4Thread ddjThread = new Ddj4Thread(plcDdj4ReadCustomThread.runnable,plcSsjReadCustomThread.runnable);
ddj4CustomThread = new CustomThread<>(new Thread(ddjThread), ddjThread);
}
if (msgDdj.getId() == 5){
Ddj5Thread ddjThread = new Ddj5Thread(plcDdj5ReadCustomThread.runnable,plcSsjReadCustomThread.runnable);
ddj5CustomThread = new CustomThread<>(new Thread(ddjThread), ddjThread);
}
if (msgDdj.getId() == 6){
Ddj6Thread ddjThread = new Ddj6Thread(plcDdj6ReadCustomThread.runnable,plcSsjReadCustomThread.runnable);
ddj6CustomThread = new CustomThread<>(new Thread(ddjThread), ddjThread);
}
}
}
}
/**
@@ -93,8 +110,8 @@ public class ScheduleThread {
}
String ipAddress = deviceSsjs.get(0).getIpAddress();
String[] split = ipAddress.split(":");
String ip = "192.168.56.80";
int port = 102;
String ip = split[0];
int port = Convert.toInt(split[1]);
//plc输送机读取线程
PlcSsjRead plcSsjRead = new PlcSsjRead(ssjList, new PlcConnectInfo(ip, port));
Thread plcSsjReadThread = new Thread(plcSsjRead);
@@ -107,33 +124,35 @@ public class ScheduleThread {
msgDdj.setPlcDbReadAddress(msgDdj.getPlcDbReadAddress());
msgDdj.setTrayCode(null);
PlcDdjRead plcDdjRead = new PlcDdjRead(msgDdj, new PlcConnectInfo(msgDdj.getIp(), Convert.toInt(msgDdj.getPort())));
switch (msgDdj.getId()){
case 1:
Thread plcDdjReadThread1 = new Thread(plcDdjRead);
plcDdj1ReadCustomThread = new CustomThread<PlcDdjRead>(plcDdjReadThread1, plcDdjRead);
break;
case 2:
Thread plcDdjReadThread2 = new Thread(plcDdjRead);
plcDdj2ReadCustomThread = new CustomThread<PlcDdjRead>(plcDdjReadThread2, plcDdjRead);
break;
case 3:
Thread plcDdjReadThread3 = new Thread(plcDdjRead);
plcDdj3ReadCustomThread = new CustomThread<PlcDdjRead>(plcDdjReadThread3, plcDdjRead);
break;
case 4:
Thread plcDdjReadThread4 = new Thread(plcDdjRead);
plcDdj4ReadCustomThread = new CustomThread<PlcDdjRead>(plcDdjReadThread4, plcDdjRead);
break;
case 5:
Thread plcDdjReadThread5 = new Thread(plcDdjRead);
plcDdj5ReadCustomThread = new CustomThread<PlcDdjRead>(plcDdjReadThread5, plcDdjRead);
break;
case 6:
Thread plcDdjReadThread6 = new Thread(plcDdjRead);
plcDdj6ReadCustomThread = new CustomThread<PlcDdjRead>(plcDdjReadThread6, plcDdjRead);
break;
if ("0".equals(msgDdj.getSpare1())){
switch (msgDdj.getId()){
case 1:
Thread plcDdjReadThread1 = new Thread(plcDdjRead);
plcDdj1ReadCustomThread = new CustomThread<PlcDdjRead>(plcDdjReadThread1, plcDdjRead);
break;
case 2:
Thread plcDdjReadThread2 = new Thread(plcDdjRead);
plcDdj2ReadCustomThread = new CustomThread<PlcDdjRead>(plcDdjReadThread2, plcDdjRead);
break;
case 3:
Thread plcDdjReadThread3 = new Thread(plcDdjRead);
plcDdj3ReadCustomThread = new CustomThread<PlcDdjRead>(plcDdjReadThread3, plcDdjRead);
break;
case 4:
Thread plcDdjReadThread4 = new Thread(plcDdjRead);
plcDdj4ReadCustomThread = new CustomThread<PlcDdjRead>(plcDdjReadThread4, plcDdjRead);
break;
case 5:
Thread plcDdjReadThread5 = new Thread(plcDdjRead);
plcDdj5ReadCustomThread = new CustomThread<PlcDdjRead>(plcDdjReadThread5, plcDdjRead);
break;
case 6:
Thread plcDdjReadThread6 = new Thread(plcDdjRead);
plcDdj6ReadCustomThread = new CustomThread<PlcDdjRead>(plcDdjReadThread6, plcDdjRead);
break;
}
ddjList.put("ddj" + msgDdj.getId(), msgDdj);
}
ddjList.put("ddj" + msgDdj.getId(), msgDdj);
}
PlcDdjRead.deviceDdjMap = ddjList;
}
@@ -143,6 +162,7 @@ public class ScheduleThread {
*/
public void startAllThread() {
plcSsjReadCustomThread.getThread().start();
plcDdj1ReadCustomThread.getThread().start();
plcDdj4ReadCustomThread.getThread().start();
/*plcDdj2ReadCustomThread.getThread().start();
plcDdj3ReadCustomThread.getThread().start();
@@ -157,6 +177,7 @@ public class ScheduleThread {
*/
public void startAllThread2() {
monitoringCustomThread.thread.start();
ddj1CustomThread.thread.start();
ddj4CustomThread.thread.start();
/*ddj2CustomThread.thread.start();
ddj3CustomThread.thread.start();

View File

@@ -73,9 +73,15 @@ public class PlcDdjRead extends Thread {
msgDdj.setYxxf(ParseUtil.optInt(24, ddsx));
msgDdj.setXtxh(ParseUtil.optInt(26, ddsx));
msgDdj.setHeight(ParseUtil.optInt(40, ddsx));
String trayCode = ParseUtil.optString(32, 8, ddsx);
String trayCode;
if (msgDdj.getId()<=3){
trayCode = ParseUtil.optString(32, 6, ddsx);
}else {
trayCode = ParseUtil.optString(32, 8, ddsx);
}
msgDdj.setTrayCode(trayCode);
}else {
reConnect();
}
}

View File

@@ -83,21 +83,6 @@ public class PlcSsjRead implements Runnable {
}
}
/**
* 其他输送机
*
* @param ssjDevice
*/
private void readPlcOtherSsj(DeviceSsj ssjDevice) {
OperateResultExOne<byte[]> read2 = readWriteNet.Read(ssjDevice.getPlcDbReadAddress(), Short.parseShort("20"));
String ddsx1 = "0";
if (read2.IsSuccess) {
ddsx1 = SoftBasic.ByteToHexString(read2.Content);
ssjDevice.setKx(ParseUtil.optInt(0, ddsx1));
ssjDevice.setDw(ParseUtil.optInt(2, ddsx1));
ssjDevice.setTaskNo(ParseUtil.optDInt(6, ddsx1));
}
}
/**
* 巷道输送机
@@ -118,64 +103,11 @@ public class PlcSsjRead implements Runnable {
ssjDevice.setException(ParseUtil.optInt(14, ddsx1));
ssjDevice.setJxdw(ParseUtil.optInt(16, ddsx1));
ssjDevice.setSpare1(ParseUtil.optInt(18, ddsx1));
}else {
reConnect();
}
}
/**
* 入出库输送机
*
* @param ssjDevice
*/
private void readPlcInOutSsj(DeviceSsj ssjDevice) {
OperateResultExOne<byte[]> read2 = readWriteNet.Read(ssjDevice.getPlcDbReadAddress(), Short.parseShort("20"));
String ddsx1 = "0";
if (read2.IsSuccess) {
ddsx1 = SoftBasic.ByteToHexString(read2.Content);
ssjDevice.setKx(ParseUtil.optInt(0, ddsx1));
ssjDevice.setDw(ParseUtil.optInt(2, ddsx1));
ssjDevice.setException(ParseUtil.optInt(4, ddsx1));
ssjDevice.setAllowPut(ParseUtil.optInt(6, ddsx1));
ssjDevice.setTaskNo(ParseUtil.optDInt(8, ddsx1));
}
}
/**
* 产线输送机
*
* @param ssjDevice
*/
private void readPlcLineSsj(DeviceSsj ssjDevice) {
OperateResultExOne<byte[]> read2 = readWriteNet.Read(ssjDevice.getPlcDbReadAddress(), Short.parseShort("220"));
String ddsx1 = "0";
if (read2.IsSuccess) {
ddsx1 = SoftBasic.ByteToHexString(read2.Content);
ssjDevice.setKx(ParseUtil.optInt(0, ddsx1));
ssjDevice.setDw(ParseUtil.optInt(2, ddsx1));
ssjDevice.setRkqq(ParseUtil.optInt(4, ddsx1));
ssjDevice.setTraySize(ParseUtil.optInt(6, ddsx1));
ssjDevice.setTaskNo(ParseUtil.optDInt(8, ddsx1));
String trayCodeReadAddress="";
switch (ssjDevice.getDeviceCode()){
case "G1005":
trayCodeReadAddress = "DB502.0";
break;
case "L2012":
trayCodeReadAddress = "DB503.0";
break;
case "L2013":
trayCodeReadAddress = "DB504.0";
break;
}
OperateResultExOne<byte[]> trayCodeRead = readWriteNet.Read(trayCodeReadAddress, Short.parseShort("220"));
if (trayCodeRead.IsSuccess){
byte[] content = trayCodeRead.Content;
//去除bytes中
ssjDevice.setTrayCode(ParseUtil.filterAndConvert(trayCodeRead.Content));
}
}
}

View File

@@ -85,14 +85,11 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
MsgDdj msgDdj = PlcDdjRead.deviceDdjMap.get(ddjCode);
try {
if (ObjUtil.isNotNull(msgDdj)) {
MsgDdj currentMsgDdj = msgDdjService.selectMsgDdjById(Convert.toLong(msgDdj.getId()));
if ("0".equals(currentMsgDdj.getSpare1())) {
generateInBoundPickQueue(msgDdj);
generateInBoundLoadQueue(msgDdj);
generateOutBoundQueue(msgDdj);
setOutSsjStatus(msgDdj);
ddjTask(msgDdj);
}
generateInBoundPickQueue(msgDdj);
generateInBoundLoadQueue(msgDdj);
generateOutBoundQueue(msgDdj);
setOutSsjStatus(msgDdj);
ddjTask(msgDdj);
} else {
log.error("堆垛机设备为空");
}
@@ -143,16 +140,14 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
List<DeviceSsj> outSsj1 = getDeviceSsjs("outSsj1");
if (outSsj1.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 && ddj.getHczt() == 0 && ddj.getSbzt() == 0)) {
outSsj = outSsj1.get(0).getDeviceCode();
int ssjJobCount = ddjDeviceExecutionQueueService.selectOutJobCount(getOtherOutDdjQueue(outSsj));
if (StrUtil.isNotEmpty(outSsj) && ssjJobCount == 0) {
if (StrUtil.isNotEmpty(outSsj) ) {
break;
}
}
List<DeviceSsj> outSsj2 = getDeviceSsjs("outSsj2");
if (outSsj2.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 && ddj.getHczt() == 0 && ddj.getSbzt() == 0)) {
outSsj = outSsj2.get(0).getDeviceCode();
int ssjJobCount = ddjDeviceExecutionQueueService.selectOutJobCount(getOtherOutDdjQueue(outSsj));
if (StrUtil.isNotEmpty(outSsj) && ssjJobCount == 0) {
if (StrUtil.isNotEmpty(outSsj) ) {
break;
}
}
@@ -161,16 +156,14 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
List<DeviceSsj> outSsj3 = getDeviceSsjs("outSsj3");
if (outSsj3.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 && ddj.getYxxf() == 1 && ddj.getHczt() == 0 && ddj.getSbzt() == 0)) {
outSsj = outSsj3.get(0).getDeviceCode();
int ssjJobCount = ddjDeviceExecutionQueueService.selectOutJobCount(getOtherOutDdjQueue(outSsj));
if (StrUtil.isNotEmpty(outSsj) && ssjJobCount == 0) {
if (StrUtil.isNotEmpty(outSsj) ) {
break;
}
}
List<DeviceSsj> outSsj4 = getDeviceSsjs("outSsj4");
if (outSsj4.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 && ddj.getYxxf() == 1 && ddj.getHczt() == 0 && ddj.getSbzt() == 0)) {
outSsj = outSsj4.get(0).getDeviceCode();
int ssjJobCount = ddjDeviceExecutionQueueService.selectOutJobCount(getOtherOutDdjQueue(outSsj));
if (StrUtil.isNotEmpty(outSsj) && ssjJobCount == 0) {
if (StrUtil.isNotEmpty(outSsj) ) {
break;
}
}
@@ -180,36 +173,41 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
}
if ("0".equals(outJob.getExecutionPhase()) && StrUtil.isNotEmpty(outSsj)) {
DdjDeviceExecutionQueue ddjQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(Convert.toLong(outJob.getTaskNo()), ddj.getId());
//查询这个站点是否存在任务
if (ObjUtil.isNull(ddjQueue)) {
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = new DdjDeviceExecutionQueue();
ddjDeviceExecutionQueue.setUuid(IdUtil.simpleUUID());
ddjDeviceExecutionQueue.setRwh(Convert.toLong(outJob.getTaskNo()));
ddjDeviceExecutionQueue.setDevName(ddj.getName());
ddjDeviceExecutionQueue.setDevId(ddj.getId());
ddjDeviceExecutionQueue.setRwzt(0);
int ssjJobCount = ddjDeviceExecutionQueueService.selectOutJobCount(getOtherOutDdjQueue(outSsj));
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(outJob.getCargoSpaceId());
ddjDeviceExecutionQueue.setYph(basCargoSpace.getThePlatoon());
ddjDeviceExecutionQueue.setYlh(basCargoSpace.getTheColumn());
ddjDeviceExecutionQueue.setYch(basCargoSpace.getTheFloor());
List<Integer> integers = roadwayMap.get(outSsj);
ddjDeviceExecutionQueue.setMbph(integers.get(0));
ddjDeviceExecutionQueue.setMblh(integers.get(1));
ddjDeviceExecutionQueue.setMbch(integers.get(2));
ddjDeviceExecutionQueue.setDdjxf("0");
ddjDeviceExecutionQueue.setMlfs(5);
ddjDeviceExecutionQueue.setScsj(DateUtil.formatDateTime(DateUtil.date()));
ddjDeviceExecutionQueue.setRwlx(DDJ_RWLX_3);
ddjDeviceExecutionQueueService.insertDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
outJob.setStatus("3");
outJob.setStartTime(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
outJob.setExecutionPhase(TASK_EP_DDJ);
mydoJobService.updateMydoJob(outJob);
} else {
log.info("任务已存在 rwh{}", outJob.getTaskNo());
if (ssjJobCount==0){
DdjDeviceExecutionQueue ddjQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(Convert.toLong(outJob.getTaskNo()), ddj.getId());
//查询这个站点是否存在任务
if (ObjUtil.isNull(ddjQueue)) {
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = new DdjDeviceExecutionQueue();
ddjDeviceExecutionQueue.setUuid(IdUtil.simpleUUID());
ddjDeviceExecutionQueue.setRwh(Convert.toLong(outJob.getTaskNo()));
ddjDeviceExecutionQueue.setDevName(ddj.getName());
ddjDeviceExecutionQueue.setDevId(ddj.getId());
ddjDeviceExecutionQueue.setRwzt(0);
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(outJob.getCargoSpaceId());
ddjDeviceExecutionQueue.setYph(basCargoSpace.getThePlatoon());
ddjDeviceExecutionQueue.setYlh(basCargoSpace.getTheColumn());
ddjDeviceExecutionQueue.setYch(basCargoSpace.getTheFloor());
List<Integer> integers = roadwayMap.get(outSsj);
ddjDeviceExecutionQueue.setMbph(integers.get(0));
ddjDeviceExecutionQueue.setMblh(integers.get(1));
ddjDeviceExecutionQueue.setMbch(integers.get(2));
ddjDeviceExecutionQueue.setDdjxf("0");
ddjDeviceExecutionQueue.setMlfs(5);
ddjDeviceExecutionQueue.setScsj(DateUtil.formatDateTime(DateUtil.date()));
ddjDeviceExecutionQueue.setRwlx(DDJ_RWLX_3);
ddjDeviceExecutionQueueService.insertDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
outJob.setStatus("3");
outJob.setStartTime(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
outJob.setExecutionPhase(TASK_EP_DDJ);
mydoJobService.updateMydoJob(outJob);
} else {
log.info("任务已存在 rwh{}", outJob.getTaskNo());
}
}
}
}
@@ -232,14 +230,14 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
*/
private void generateInBoundLoadQueue(MsgDdj ddj) {
if (ddj.getCzfs() == 5 && ddj.getSbzt() == 0 && ddj.getHczt() == 1 && ddj.getYxxf() == 1 && ddj.getHeight() > 0) {
String trayCode = ddj.getTrayCode();
//允许下发 联机 有货待机
if (ddj.getTrayCode() != null && StrUtil.isNotEmpty(ddj.getTrayCode().trim())) {
if ("11111111".equals(ddj.getTrayCode()) || "NoRead00".equalsIgnoreCase(ddj.getTrayCode())){
if (trayCode != null && StrUtil.isNotEmpty(trayCode.trim())) {
if ("11111111".equals(trayCode) || "111111".equals(trayCode) || "NoRead".equals(trayCode) || "NoRead00".equalsIgnoreCase(trayCode)) {
createRollbackQueue(ddj, 1);
}else if (!"00000000".equals(ddj.getTrayCode())){
String trayCode = ddj.getTrayCode();
trayCode = trayCode.substring(trayCode.length()-4);
} else if (!"00000000".equals(trayCode) && !"000000".equals(trayCode)) {
trayCode = trayCode.substring(trayCode.length() - 4);
MydoJob param = new MydoJob();
param.setTrayCode(trayCode);
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobList(param);
@@ -456,12 +454,13 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
if (ddj.getCzfs() == 5 && ddj.getSbzt() == 1052 && ddj.getJdbz() < 5 && ddj.getYxxf() == 1) {
//判断堆垛机上任务是否已重分,若未重分,则调用接口,请求重分货位
Long rwh = ddj.getRwh();
String trayCode = ddj.getTrayCode();
MydoJob mydoJob = mydoJobService.selectMydoJobByTaskNo(rwh);
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(rwh, ddj.getId());
if ("0".equals(mydoJob.getFaultFlag()) && "1".equals(ddjDeviceExecutionQueue.getSpare1())) {
mydoJob.setStatus("1");
mydoJobService.updateMydoJob(mydoJob);
AjaxResult ajaxResult = apiService.reAssign(new JobParam(mydoJob.getJobId(), ddj.getTrayCode(), ddjDeviceExecutionQueue.getRwh().toString()));
AjaxResult ajaxResult = apiService.reAssign(new JobParam(mydoJob.getJobId(), trayCode, ddjDeviceExecutionQueue.getRwh().toString()));
if (ajaxResult.isSuccess()) {
mydoJob = mydoJobService.selectMydoJobByTaskNo(rwh);
mydoJob.setFaultFlag("2");

View File

@@ -97,12 +97,8 @@ public class Ddj1Thread extends BaseDdjThread {
@Override
public DdjDeviceExecutionQueue getOtherOutDdjQueue(String exitSsj) {
List<Integer> integers = roadwayMap.get(exitSsj);
DdjDeviceExecutionQueue param = new DdjDeviceExecutionQueue();
param.setDevId(1);
param.setMbph(integers.get(0));
param.setMblh(integers.get(1));
param.setMbch(integers.get(2));
param.setSpare2(exitSsj);
return param;
}

View File

@@ -88,7 +88,9 @@ public class Ddj2Thread extends BaseDdjThread {
@Override
public DdjDeviceExecutionQueue getOtherOutDdjQueue(String exitSsj) {
return null;
DdjDeviceExecutionQueue param = new DdjDeviceExecutionQueue();
param.setSpare2(exitSsj);
return param;
}
}

View File

@@ -88,6 +88,8 @@ public class Ddj3Thread extends BaseDdjThread {
@Override
public DdjDeviceExecutionQueue getOtherOutDdjQueue(String exitSsj) {
return null;
DdjDeviceExecutionQueue param = new DdjDeviceExecutionQueue();
param.setSpare2(exitSsj);
return param;
}
}

View File

@@ -80,12 +80,8 @@ public class Ddj4Thread extends BaseDdjThread {
@Override
public DdjDeviceExecutionQueue getOtherOutDdjQueue(String exitSsj) {
List<Integer> integers = roadwayMap.get(exitSsj);
DdjDeviceExecutionQueue param = new DdjDeviceExecutionQueue();
param.setDevId(4);
param.setMbph(integers.get(0));
param.setMblh(integers.get(1));
param.setMbch(integers.get(2));
param.setSpare2(exitSsj);
return param;
}

View File

@@ -74,7 +74,9 @@ public class Ddj5Thread extends BaseDdjThread {
@Override
public DdjDeviceExecutionQueue getOtherOutDdjQueue(String exitSsj) {
return null;
DdjDeviceExecutionQueue param = new DdjDeviceExecutionQueue();
param.setSpare2(exitSsj);
return param;
}

View File

@@ -76,7 +76,9 @@ public class Ddj6Thread extends BaseDdjThread {
@Override
public DdjDeviceExecutionQueue getOtherOutDdjQueue(String exitSsj) {
return null;
DdjDeviceExecutionQueue param = new DdjDeviceExecutionQueue();
param.setSpare2(exitSsj);
return param;
}
}

View File

@@ -16,7 +16,7 @@ public class CheckWeight {
InputStream is = socket.getInputStream();
) {
Thread.sleep(300);
byte[] bytes = new byte[8];
byte[] bytes = new byte[10];
int read = is.read(bytes);
if (read!=-1){
String weight = byteArrayToCharArray(bytes, "UTF-8");

View File

@@ -6,7 +6,7 @@ spring:
druid:
#主数据信息
master:
url: jdbc:sqlserver://127.0.0.1:1433;databaseName=FT541-wcs;
url: jdbc:sqlserver://172.19.1.119:1433;databaseName=FT541-wcs;
username: sa
password: Flrd0914.
# 从库数据源

View File

@@ -68,7 +68,7 @@ spring:
# redis 配置
redis:
# 地址
host: 127.0.0.1
host: 172.19.1.119
# 端口,默认为6379
port: 6379
# 数据库索引

View File

@@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectOutJobCount">
select count(*) from ddj_device_execution_queue
where mbph = #{mbph} and mblh=#{mblh} and mbch=#{mbch} and dev_id = #{devId}
where spare2=#{spare2}
</select>