Commit 1235fb46 authored by wanghao's avatar wanghao

1 老化过程中 获取卡号,获取IOT状态调整中

parent f83e45b7
......@@ -146,11 +146,18 @@ public class CalibrationResultEventHandler {
&& "1".equals(palletDeviceBinding.getRealTimeStatus())
&& "4".equals(palletDeviceBinding.getCalibrationConcentrationStatus())
&& palletDeviceBinding.getWriteSelfCheckStatus() != null && palletDeviceBinding.getWriteSelfCheckStatus() == 1
&& palletDeviceBinding.getModuleStatus() != null && palletDeviceBinding.getModuleStatus() == 1
&& palletDeviceBinding.getSimCardStatus() != null && palletDeviceBinding.getSimCardStatus() == 1
&& palletDeviceBinding.getModuleStatus() != null && palletDeviceBinding.getModuleStatus() == 1) {
palletDeviceBinding.setStandardInspectResult("1");
}
if("1".equals(palletDeviceBinding.getHasUpload())){
if( palletDeviceBinding.getSimCardStatus() != null && palletDeviceBinding.getSimCardStatus() == 1
&& palletDeviceBinding.getNetworkStatus() != null && palletDeviceBinding.getNetworkStatus() == 1
&& palletDeviceBinding.getIotStatus() != null && palletDeviceBinding.getIotStatus() == 1) {
&& palletDeviceBinding.getIotStatus() != null && palletDeviceBinding.getIotStatus() == 1){
palletDeviceBinding.setStandardInspectResult("1");
} else {
palletDeviceBinding.setStandardInspectResult("0");
}
}
if(!"2".equals(palletDeviceBinding.getReadingMode())) {
......
......@@ -193,7 +193,12 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
Modbus4jUtils.writeCoil(master, 1, registerOffsetInt, false);
log.info("已发送断电指令 - 设备:{} 层:{}", tEquipmentInfo.getfEquipmentCode(), layer);
master.destroy();
ProductStandardInspection productStandardInspection = productStandardInspectionMapper.selectByNumber(command.getProductStandardInspectionNumber());
if("1".equals(productStandardInspection.getHasUpload())){
log.info("子任务开始查询IOT状态了" );
eventPublisher.publishEvent(new IotStatusEvent(this, storeyCode));
}
// 如果正常 则发送 IOT请求
} catch (ModbusTransportException | ModbusInitException e) {
log.info("下料发送断电指令失败 - 设备:{} 层:{}", tEquipmentInfo.getfEquipmentCode(), layer);
......
......@@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="endExecutionTime" column="f_end_execution_time" />
<result property="createTime" column="f_create_time" />
<result property="command" column="f_command" />
<result property="productStandardInspectionNumber" column="f_product_standard_inspection_number" />
</resultMap>
<sql id="selectRobotArmCommandVo">
......@@ -25,7 +26,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f_start_execution_time,
f_end_execution_time,
f_create_time,
f_command
f_command,
f_product_standard_inspection_number
from t_robot_arm_command
</sql>
......@@ -111,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="endExecutionTime != null">f_end_execution_time,</if>
<if test="createTime != null">f_create_time,</if>
<if test="command != null">f_command,</if>
<if test="productStandardInspectionNumber != null">f_product_standard_inspection_number,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="trayCode != null">#{trayCode},</if>
......@@ -121,6 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="endExecutionTime != null">#{endExecutionTime},</if>
<if test="createTime != null">#{createTime},</if>
<if test="command != null">#{command},</if>
<if test="productStandardInspectionNumber != null">#{productStandardInspectionNumber},</if>
</trim>
</insert>
......
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