Commit 0d936efc authored by wanghao's avatar wanghao

1 托盘信息 预计老化结束时间 调整

2 读取板子由之前的读10位,改成了读15位调整
parent ec6ffe29
......@@ -21,7 +21,7 @@ import java.util.List;
/**
* 参数配置 信息操作处理
*
*
* @author zehong
*/
@RestController
......@@ -96,6 +96,14 @@ public class SysConfigController extends BaseController
return AjaxResult.success(configService.selectAgingStageTime().get(2));
}
/**
* 获取老化阶段时间
*/
@GetMapping(value = "/getAgingStage4Time")
public AjaxResult selectAgingStage4Time() {
return AjaxResult.success(configService.selectAgingStageTime().get(3));
}
/**
* 修改老化阶段时间
*/
......
......@@ -31,7 +31,7 @@ public class Modbus4jUtils {
private static ModbusMaster master;
private static final int START_ADDRESS = 0; // 对应40001
private static final int REGISTER_COUNT = 10; // 读取10个寄存器
private static final int REGISTER_COUNT = 15; // 读取15个寄存器
private static final int TARGET_VALUE = 1; // 目标值(第二个寄存器的期望值)
private static final int MAX_RETRIES = 3; // 最大重试次数
private static final int RETRY_DELAY = 500; // 重试延迟(ms)// 监控参数
......
......@@ -44,9 +44,9 @@ public class AgingStageTwoProcessJob implements Job {
private ITEquipmentAlarmDataService alarmDataService;
@Resource
private TStoreyInfoMapper tStoreyInfoMapper;
private TStoreyInfoMapper tStoreyInfoMapper;
@Resource
private Scheduler scheduler;
private Scheduler scheduler;
@Resource
private PalletDeviceBindingMapper palletDeviceBindingMapper;
// 全局线程池 - 避免重复创建
......@@ -200,7 +200,6 @@ public class AgingStageTwoProcessJob implements Job {
errorCount.incrementAndGet();
return false;
}
binding.setRelayStatus(result[10]);
binding.setPulseStatus(result[11]);
binding.setModuleStatus(result[12]);
......
......@@ -45,6 +45,12 @@ export function getAgingStage3Time() {
method: 'get'
})
}
export function getAgingStage4Time() {
return request({
url: '/system/config/getAgingStage4Time',
method: 'get'
})
}
export function updateAgingStageTime(data) {
return request({
......
......@@ -146,7 +146,7 @@ export default {
// 动态列宽
boardCountWidth: '150',
locationWidth: '150',
agingStage3Time: 0,
agingStage4Time: 0,
};
},
created() {
......@@ -159,7 +159,7 @@ export default {
this.$nextTick(() => {
this.adjustTableLayout();
});
this.initAgingStage3Time();
this.initAgingStage4Time();
},
beforeDestroy() {
window.removeEventListener('resize', this.handleResize);
......@@ -207,9 +207,9 @@ export default {
getRowKey(row) {
return row.fTrayCode || row.trayId;
},
initAgingStage3Time() {
getAgingStage3Time().then(response => {
this.agingStage3Time = response.data.configValue;
initAgingStage4Time() {
getAgingStage4Time().then(response => {
this.agingStage4Time = response.data.configValue;
})
},
......@@ -224,7 +224,7 @@ export default {
// 将开始时间转换为Date对象
const startTime = new Date(item.fAgingStartTime);
// 加上配置的分钟数(agingStage3Time以分钟为单位)
const endTime = new Date(startTime.getTime() + this.agingStage3Time * 60 * 1000);
const endTime = new Date(startTime.getTime() + this.agingStage4Time * 60 * 1000);
// 添加到item对象中
item.fAgingEndTime = endTime;
} catch (e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment