修改信号读取
This commit is contained in:
@@ -107,6 +107,8 @@ public class MsgDdj extends BaseEntity
|
||||
private String plcDbReadAddress;
|
||||
private String plcDbWriteAddress;
|
||||
|
||||
private Integer height;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -86,6 +86,15 @@ public class DeviceSsj extends BaseEntity
|
||||
@Excel(name="输送线模式 1-入库 2-出库")
|
||||
private int model;
|
||||
|
||||
private int height;
|
||||
|
||||
private int jxdw;
|
||||
|
||||
private int sbzt;
|
||||
|
||||
private int spare1;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -90,10 +90,12 @@ public class ScheduleThread {
|
||||
for (DeviceSsj deviceSsj : deviceSsjs) {
|
||||
ssjList.put(deviceSsj.getDeviceCode(), deviceSsj);
|
||||
}
|
||||
|
||||
|
||||
String ipAddress = deviceSsjs.get(0).getIpAddress();
|
||||
String[] split = ipAddress.split(":");
|
||||
String ip = split[0];
|
||||
int port = Convert.toInt(split[1]);
|
||||
//plc输送机读取线程
|
||||
PlcSsjRead plcSsjRead = new PlcSsjRead(ssjList, new PlcConnectInfo(deviceSsjs.get(0).getIpAddress(), Convert.toInt(deviceSsjs.get(0).getPort())));
|
||||
PlcSsjRead plcSsjRead = new PlcSsjRead(ssjList, new PlcConnectInfo(ip, port));
|
||||
Thread plcSsjReadThread = new Thread(plcSsjRead);
|
||||
plcSsjReadCustomThread = new CustomThread<PlcSsjRead>(plcSsjReadThread, plcSsjRead);
|
||||
|
||||
@@ -167,12 +169,14 @@ public class ScheduleThread {
|
||||
*/
|
||||
public void stopAllThread() {
|
||||
plcSsjReadCustomThread.runnable.isRun = false;
|
||||
plcSsjReadCustomThread.thread.interrupt();
|
||||
plcDdj1ReadCustomThread.runnable.isRun = false;
|
||||
/* plcDdj2ReadCustomThread.runnable.isRun = false;
|
||||
plcDdj1ReadCustomThread.thread.interrupt();
|
||||
plcDdj2ReadCustomThread.runnable.isRun = false;
|
||||
plcDdj3ReadCustomThread.runnable.isRun = false;
|
||||
plcDdj4ReadCustomThread.runnable.isRun = false;
|
||||
plcDdj5ReadCustomThread.runnable.isRun = false;
|
||||
plcDdj6ReadCustomThread.runnable.isRun = false;*/
|
||||
plcDdj6ReadCustomThread.runnable.isRun = false;
|
||||
plcReadInit();
|
||||
isRun = false;
|
||||
}
|
||||
@@ -182,7 +186,9 @@ public class ScheduleThread {
|
||||
*/
|
||||
public void stopAllThread2() {
|
||||
monitoringCustomThread.runnable.isRun = false;
|
||||
monitoringCustomThread.thread.interrupt();
|
||||
ddj1CustomThread.runnable.isRun = false;
|
||||
ddj1CustomThread.thread.interrupt();
|
||||
/*ddj2CustomThread.runnable.isRun = false;
|
||||
ddj3CustomThread.runnable.isRun = false;
|
||||
ddj4CustomThread.runnable.isRun = false;
|
||||
|
||||
@@ -55,7 +55,6 @@ public class PlcDdjRead extends Thread {
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
log.info("********IP:" + this.ip + " port:" + this.port + "端口号 " + e.getMessage());
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class PlcSsjRead implements Runnable {
|
||||
for (String ssjCode : deviceSsjMap.keySet()) {
|
||||
DeviceSsj ssjDevice = deviceSsjMap.get(ssjCode);
|
||||
switch (ssjDevice.getType()) {
|
||||
case "1":
|
||||
/*case "1":
|
||||
readPlcLineSsj(ssjDevice);
|
||||
break;
|
||||
case "2":
|
||||
@@ -62,7 +62,7 @@ public class PlcSsjRead implements Runnable {
|
||||
break;
|
||||
case "3":
|
||||
readPlcOtherSsj(ssjDevice);
|
||||
break;
|
||||
break;*/
|
||||
case "4":
|
||||
readPlcRoadWaySsj(ssjDevice);
|
||||
break;
|
||||
@@ -109,10 +109,15 @@ public class PlcSsjRead implements Runnable {
|
||||
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.setTaskNo(ParseUtil.optDInt(6, ddsx1));
|
||||
ssjDevice.setDw(ParseUtil.optInt(0, ddsx1));
|
||||
ssjDevice.setKx(ParseUtil.optInt(2, ddsx1));
|
||||
ssjDevice.setTaskNo(ParseUtil.optDInt(4, ddsx1));
|
||||
ssjDevice.setSbzt(ParseUtil.optInt(8, ddsx1));
|
||||
ssjDevice.setRkqq(ParseUtil.optInt(10, ddsx1));
|
||||
ssjDevice.setHeight(ParseUtil.optInt(12, ddsx1));
|
||||
ssjDevice.setException(ParseUtil.optInt(14, ddsx1));
|
||||
ssjDevice.setJxdw(ParseUtil.optInt(16, ddsx1));
|
||||
ssjDevice.setSpare1(ParseUtil.optInt(18, ddsx1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
public boolean isRun = true;
|
||||
|
||||
@Override
|
||||
public abstract HashMap<String, Object> getParamMap(String trayCode);
|
||||
public abstract HashMap<String, Object> getParamMap(String trayCode,Integer height);
|
||||
|
||||
|
||||
@Override
|
||||
@@ -168,7 +168,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
MydoJob inJob = null;
|
||||
if (CollUtil.isEmpty(mydoJobs)) {
|
||||
//请求wms获取任务 并生成队列
|
||||
AjaxResult result = apiService.selectMydoJobByTrayCodeAndEntranceId(getParamMap(ddj.getTrayCode()));
|
||||
AjaxResult result = apiService.selectMydoJobByTrayCodeAndEntranceId(getParamMap(ddj.getTrayCode(),ddj.getHeight()));
|
||||
if (result.isSuccess()) {
|
||||
inJob = BeanUtil.toBean(result.get("data"), MydoJob.class);
|
||||
inJob.setStatus(TASK_STATUS_CREATE);
|
||||
@@ -255,7 +255,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
private void generateInBoundPickQueue(MsgDdj ddj) {
|
||||
List<DeviceSsj> roadSsjList = ssjList.get("roadSsjList");
|
||||
for (DeviceSsj ssj : roadSsjList) {
|
||||
if (ssj.getDw() == 1 && ssj.getTaskNo() > 0) {
|
||||
if (ssj.getDw() == 1 && ssj.getTaskNo() > 0 && ssj.getHeight() > 0 && ssj.getRkqq()==1) {
|
||||
DdjDeviceExecutionQueue ddjQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(Convert.toLong(ssj.getTaskNo()), ddj.getId());
|
||||
if (ObjUtil.isNull(ddjQueue)) {
|
||||
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = new DdjDeviceExecutionQueue();
|
||||
@@ -276,6 +276,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
ddjDeviceExecutionQueue.setScsj(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
|
||||
ddjDeviceExecutionQueue.setMlfs(3);
|
||||
ddjDeviceExecutionQueue.setSpare1("0");
|
||||
ddjDeviceExecutionQueue.setSpare2(Convert.toStr(ssj.getHeight()));
|
||||
ddjDeviceExecutionQueueService.insertDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
|
||||
}
|
||||
}
|
||||
@@ -298,6 +299,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
if (ObjUtil.isNotNull(mydoJob)){
|
||||
//回传完成信号
|
||||
ddjTaskFinish(rwh, ddj.getId(),1);
|
||||
ddj.setHeight(Convert.toInt(ddjDeviceExecutionQueue.getSpare2()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -310,6 +312,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
if (ddjDeviceExecutionQueue.getRwlx()==1){
|
||||
//完成队列
|
||||
ddjTaskFinish(rwh, ddj.getId(),2);
|
||||
ddj.setHeight(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ public interface DdjThreadInterface {
|
||||
* @param trayCode 托盘代码
|
||||
* @return 参数映射
|
||||
*/
|
||||
HashMap<String, Object> getParamMap(String trayCode);
|
||||
HashMap<String, Object> getParamMap(String trayCode,Integer height);
|
||||
|
||||
/**
|
||||
* 获取出库任务参数
|
||||
|
||||
@@ -19,6 +19,9 @@ import static com.ruoyi.common.Constant.WAREHOUSE_01;
|
||||
@Slf4j
|
||||
public class Ddj1Thread extends BaseDdjThread {
|
||||
|
||||
public volatile boolean isRun = true;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
super.init();
|
||||
@@ -57,7 +60,7 @@ public class Ddj1Thread extends BaseDdjThread {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> getParamMap(String trayCode) {
|
||||
public HashMap<String, Object> getParamMap(String trayCode,Integer height) {
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("trayCode", trayCode);
|
||||
paramMap.put("warehouseId",WAREHOUSE_01);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class Ddj2Thread extends BaseDdjThread {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> getParamMap(String trayCode) {
|
||||
public HashMap<String, Object> getParamMap(String trayCode,Integer height) {
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("trayCode", trayCode);
|
||||
paramMap.put("warehouseId",WAREHOUSE_01);
|
||||
|
||||
@@ -55,7 +55,7 @@ public class Ddj3Thread extends BaseDdjThread {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> getParamMap(String trayCode) {
|
||||
public HashMap<String, Object> getParamMap(String trayCode,Integer height) {
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("trayCode", trayCode);
|
||||
paramMap.put("warehouseId",WAREHOUSE_01);
|
||||
|
||||
@@ -46,7 +46,7 @@ public class Ddj4Thread extends BaseDdjThread {
|
||||
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> getParamMap(String trayCode) {
|
||||
public HashMap<String, Object> getParamMap(String trayCode,Integer height) {
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("trayCode", trayCode);
|
||||
paramMap.put("warehouseId",WAREHOUSE_02);
|
||||
|
||||
@@ -46,7 +46,7 @@ public class Ddj5Thread extends BaseDdjThread {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> getParamMap(String trayCode) {
|
||||
public HashMap<String, Object> getParamMap(String trayCode,Integer height) {
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("trayCode", trayCode);
|
||||
paramMap.put("warehouseId",WAREHOUSE_02);
|
||||
|
||||
@@ -46,7 +46,7 @@ public class Ddj6Thread extends BaseDdjThread {
|
||||
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> getParamMap(String trayCode) {
|
||||
public HashMap<String, Object> getParamMap(String trayCode,Integer height) {
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("trayCode", trayCode);
|
||||
paramMap.put("warehouseId",WAREHOUSE_02);
|
||||
|
||||
@@ -16,7 +16,7 @@ ruoyi:
|
||||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
port: 8081
|
||||
port: 10012
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
|
||||
@@ -22,10 +22,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="exception" column="exception" />
|
||||
<result property="traySize" column="tray_size" />
|
||||
<result property="allowPut" column="allow_put" />
|
||||
<result property="height" column="height" />
|
||||
<result property="jxdw" column="jxdw" />
|
||||
<result property="sbzt" column="sbzt" />
|
||||
<result property="spare1" column="spare1" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeviceSsjVo">
|
||||
select id, device_code , name , type, ip_address, plc_db_read_address, is_active, create_time, plc_db_write_address, rkqq, kx, dw, tray_code, task_no,exception,tray_size,allow_put from device_ssj
|
||||
select id, device_code , name , type, ip_address, plc_db_read_address, is_active, create_time, plc_db_write_address, rkqq, kx, dw, tray_code, task_no,exception,tray_size,allow_put,height,jxdw,sbzt,spare1 from device_ssj
|
||||
</sql>
|
||||
|
||||
<select id="selectDeviceSsjList" parameterType="DeviceSsj" resultMap="DeviceSsjResult">
|
||||
@@ -104,6 +108,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="exception != null">exception = #{exception},</if>
|
||||
<if test="traySize != null">tray_size = #{traySize},</if>
|
||||
<if test="allowPut != null">allow_put = #{allowPut},</if>
|
||||
<if test="height != null">height = #{height},</if>
|
||||
<if test="sbzt != null">status = #{sbzt},</if>
|
||||
<if test="jxdw != null">jxdw = #{jxdw},</if>
|
||||
<if test="spare1 != null">by = #{spare1},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = FORTUCKY WCS SYSTEM
|
||||
VUE_APP_TITLE = WCS SYSTEM
|
||||
|
||||
# 开发环境配置
|
||||
ENV = 'development'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = FORTUCKY WCS SYSTEM
|
||||
VUE_APP_TITLE = WCS SYSTEM
|
||||
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = FORTUCKY WCS SYSTEM
|
||||
VUE_APP_TITLE = WCS SYSTEM
|
||||
|
||||
BABEL_ENV = production
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "FLRD",
|
||||
"version": "3.8.9",
|
||||
"description": "FORTUCKY WCS SYSTEM",
|
||||
"description": " WCS SYSTEM",
|
||||
"author": "FLRD",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
||||
@@ -169,7 +169,7 @@ export default {
|
||||
deleteConfirm: '是否确认删除{content}的数据项?'
|
||||
},
|
||||
login: {
|
||||
title: '福莱瑞达WCS系统',
|
||||
title: 'WCS系统',
|
||||
logIn: '登录',
|
||||
username: '账号',
|
||||
password: '密码',
|
||||
|
||||
@@ -74,10 +74,18 @@
|
||||
<dict-tag :options="dict.type.ssj_ex" :value="scope.row.exception"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="模式" prop="traySize">
|
||||
<!-- <el-table-column label="模式" prop="traySize">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.ssj_model" :value="scope.row.traySize"/>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="高度" prop="height">
|
||||
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="状态" prop="sbzt">
|
||||
|
||||
</el-table-column>-->
|
||||
<el-table-column label="拣选到位" prop="jxdw">
|
||||
</el-table-column>
|
||||
|
||||
|
||||
@@ -111,10 +119,18 @@
|
||||
<dict-tag :options="dict.type.ssj_ex" :value="scope.row.exception"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="模式" prop="traySize">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.ssj_model" :value="scope.row.traySize"/>
|
||||
</template>
|
||||
<!-- <el-table-column label="模式" prop="traySize">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.ssj_model" :value="scope.row.traySize"/>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="高度" prop="height">
|
||||
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="状态" prop="sbzt">
|
||||
|
||||
</el-table-column>-->
|
||||
<el-table-column label="拣选到位" prop="jxdw">
|
||||
</el-table-column>
|
||||
|
||||
|
||||
@@ -148,10 +164,18 @@
|
||||
<dict-tag :options="dict.type.ssj_ex" :value="scope.row.exception"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="模式" prop="traySize">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.ssj_model" :value="scope.row.traySize"/>
|
||||
</template>
|
||||
<!-- <el-table-column label="模式" prop="traySize">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.ssj_model" :value="scope.row.traySize"/>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="高度" prop="height">
|
||||
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="状态" prop="sbzt">
|
||||
|
||||
</el-table-column>-->
|
||||
<el-table-column label="拣选到位" prop="jxdw">
|
||||
</el-table-column>
|
||||
|
||||
|
||||
@@ -187,10 +211,18 @@
|
||||
<dict-tag :options="dict.type.ssj_ex" :value="scope.row.exception"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="模式" prop="traySize">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.ssj_model" :value="scope.row.traySize"/>
|
||||
</template>
|
||||
<!-- <el-table-column label="模式" prop="traySize">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.ssj_model" :value="scope.row.traySize"/>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="高度" prop="height">
|
||||
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="状态" prop="sbzt">
|
||||
|
||||
</el-table-column>-->
|
||||
<el-table-column label="拣选到位" prop="jxdw">
|
||||
</el-table-column>
|
||||
|
||||
|
||||
@@ -224,10 +256,18 @@
|
||||
<dict-tag :options="dict.type.ssj_ex" :value="scope.row.exception"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="模式" prop="traySize">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.ssj_model" :value="scope.row.traySize"/>
|
||||
</template>
|
||||
<!-- <el-table-column label="模式" prop="traySize">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.ssj_model" :value="scope.row.traySize"/>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="高度" prop="height">
|
||||
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="状态" prop="sbzt">
|
||||
|
||||
</el-table-column>-->
|
||||
<el-table-column label="拣选到位" prop="jxdw">
|
||||
</el-table-column>
|
||||
|
||||
|
||||
@@ -261,10 +301,18 @@
|
||||
<dict-tag :options="dict.type.ssj_ex" :value="scope.row.exception"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="模式" prop="traySize">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.ssj_model" :value="scope.row.traySize"/>
|
||||
</template>
|
||||
<!-- <el-table-column label="模式" prop="traySize">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.ssj_model" :value="scope.row.traySize"/>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="高度" prop="height">
|
||||
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="状态" prop="sbzt">
|
||||
|
||||
</el-table-column>-->
|
||||
<el-table-column label="拣选到位" prop="jxdw">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
@@ -7,9 +7,9 @@ function resolve(dir) {
|
||||
|
||||
const CompressionPlugin = require('compression-webpack-plugin')
|
||||
|
||||
const name = process.env.VUE_APP_TITLE || 'FORTUCKY WCS SYSTEM' // 网页标题
|
||||
const name = process.env.VUE_APP_TITLE || ' WCS SYSTEM' // 网页标题
|
||||
|
||||
const baseUrl = 'http://localhost:8081' // 后端接口地址(你的后端端口是8081)
|
||||
const baseUrl = 'http://localhost:10012' // 后端接口地址(你的后端端口是8081)
|
||||
|
||||
const port = process.env.port || process.env.npm_config_port || 80 // 前端端口
|
||||
|
||||
|
||||
Reference in New Issue
Block a user