Commit 0d936efc authored by wanghao's avatar wanghao

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

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