Commit ff1c02a2 authored by wanghao's avatar wanghao

1 上料后 机械臂 回零 后 出现了一次 没有上电的操作,涉及到的 机械臂回零判断流程 优化。

2 实时数据 根据 托盘编号排序
3 如果设备号为空,则不设置各种状态信息,防止出现 没有板子的位置也报错,不能解绑的问题。
parent 9dc83746
...@@ -93,6 +93,8 @@ public class CalibrationResultEventHandler { ...@@ -93,6 +93,8 @@ public class CalibrationResultEventHandler {
for (PalletDeviceBinding palletDeviceBinding : palletDeviceBindings) { for (PalletDeviceBinding palletDeviceBinding : palletDeviceBindings) {
MesDeviceDomain mesDeviceDomain = new MesDeviceDomain(); MesDeviceDomain mesDeviceDomain = new MesDeviceDomain();
// 如果设备编号为空 则不处理改设备
if(StringUtils.isBlank(palletDeviceBinding.getDeviceCode())) continue;
// 主板码 // 主板码
mesDeviceDomain.setMotherboardCode(palletDeviceBinding.getDeviceCode()); mesDeviceDomain.setMotherboardCode(palletDeviceBinding.getDeviceCode());
// 浓度 // 浓度
......
...@@ -89,6 +89,10 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService ...@@ -89,6 +89,10 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
} }
} }
/**
* 机械臂空闲状态下 需要执行的待执行的指令
*/
@Override @Override
@Transactional @Transactional
public void processPendingCommands() { public void processPendingCommands() {
...@@ -336,6 +340,10 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService ...@@ -336,6 +340,10 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
return 0; return 0;
} }
/**
* 完成指令
* @param commandId c
*/
@Override @Override
@Transactional @Transactional
public void completeCommand(Long commandId) { public void completeCommand(Long commandId) {
...@@ -346,7 +354,6 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService ...@@ -346,7 +354,6 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
log.info("command != null && \"2\".equals(command.getStatus()"); log.info("command != null && \"2\".equals(command.getStatus()");
// 发送上电指令 // 发送上电指令
try { try {
String storeyCode = command.getStoreyCode(); String storeyCode = command.getStoreyCode();
String equitmentCode; String equitmentCode;
int registerOffset; int registerOffset;
...@@ -361,6 +368,7 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService ...@@ -361,6 +368,7 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
log.info("tEquipmentInfo != null"); log.info("tEquipmentInfo != null");
String powerOutageIp = tEquipmentInfo.getfPowerOutageIp(); String powerOutageIp = tEquipmentInfo.getfPowerOutageIp();
Integer powerOutagePort = tEquipmentInfo.getfPowerOutagePort(); Integer powerOutagePort = tEquipmentInfo.getfPowerOutagePort();
log.info("powerOutageIp: {}, powerOutagePort: {},command.getType:{}", powerOutageIp, powerOutagePort, command.getType());
if(StringUtils.isNotBlank(powerOutageIp) && powerOutagePort != null) { if(StringUtils.isNotBlank(powerOutageIp) && powerOutagePort != null) {
if("0".equals(command.getType())) { if("0".equals(command.getType())) {
eventPublisher.publishEvent(new CheckPowerOnCommandEvent( eventPublisher.publishEvent(new CheckPowerOnCommandEvent(
......
...@@ -114,12 +114,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -114,12 +114,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null "> and palDeviceBinding.f_create_time = #{createTime}</if> <if test="createTime != null "> and palDeviceBinding.f_create_time = #{createTime}</if>
<if test="status != null and status != '' "> and palDeviceBinding.f_status = #{status}</if> <if test="status != null and status != '' "> and palDeviceBinding.f_status = #{status}</if>
</where> </where>
order by trayInfo.f_tray_code ,palDeviceBinding.f_index asc order by trayInfo.f_tray_code ,palDeviceBinding.f_number asc
</select> </select>
<select id="getAllExcludeUnbindingTimeByTrayId" parameterType="long" resultMap="PalletDeviceBindingResult"> <select id="getAllExcludeUnbindingTimeByTrayId" parameterType="long" resultMap="PalletDeviceBindingResult">
<include refid="selectPalletDeviceBindingVo"/> <include refid="selectPalletDeviceBindingVo"/>
where palDeviceBinding.f_tray_id = #{trayId} where palDeviceBinding.f_tray_id = #{trayId}
order by palDeviceBinding.f_index asc order by palDeviceBinding.f_number asc
</select> </select>
<select id="listByTrayCode" parameterType="string" resultMap="PalletDeviceBindingResult"> <select id="listByTrayCode" parameterType="string" resultMap="PalletDeviceBindingResult">
<include refid="selectPalletDeviceBindingVo"/> <include refid="selectPalletDeviceBindingVo"/>
...@@ -327,7 +327,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -327,7 +327,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="simCardStatus != null">f_sim_card_status = #{simCardStatus},</if> <if test="simCardStatus != null">f_sim_card_status = #{simCardStatus},</if>
<if test="networkStatus != null">f_network_status = #{networkStatus},</if> <if test="networkStatus != null">f_network_status = #{networkStatus},</if>
</trim> </trim>
where f_pallet_device_binding_id = #{palletDeviceBindingId} where f_pallet_device_binding_id = #{palletDeviceBindingId} and f_device_code is not null
</update> </update>
<update id="batchUpdateDeviceCode" parameterType="list"> <update id="batchUpdateDeviceCode" parameterType="list">
<foreach collection="palletDeviceBindingList" item="item" index="index" separator=";"> <foreach collection="palletDeviceBindingList" item="item" index="index" separator=";">
...@@ -350,7 +350,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -350,7 +350,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="item.calibrationConcentration != null">f_calibration_concentration = #{item.calibrationConcentration},</if> <if test="item.calibrationConcentration != null">f_calibration_concentration = #{item.calibrationConcentration},</if>
<if test="item.calibrationConcentrationStatus != null">f_calibration_concentration_status = #{item.calibrationConcentrationStatus},</if> <if test="item.calibrationConcentrationStatus != null">f_calibration_concentration_status = #{item.calibrationConcentrationStatus},</if>
</trim> </trim>
where f_pallet_device_binding_id = #{item.palletDeviceBindingId} where f_pallet_device_binding_id = #{item.palletDeviceBindingId} and f_device_code is not null
</foreach> </foreach>
</update> </update>
<update id="batchUpdateDeviceCodeAndUnbindingTime" parameterType="list"> <update id="batchUpdateDeviceCodeAndUnbindingTime" parameterType="list">
......
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