Commit 3d76f1ab authored by wanghao's avatar wanghao

1 实时数据里面加上 绑定层编号 记录

parent dfb061ce
...@@ -28,6 +28,9 @@ public class PalletDeviceBinding extends BaseEntity ...@@ -28,6 +28,9 @@ public class PalletDeviceBinding extends BaseEntity
/** 托盘编号 */ /** 托盘编号 */
private String fTrayCode; private String fTrayCode;
/** 绑定层编号 */
@Excel(name = "绑定层编号")
private String storeyCode;
/** 绑定的设备编号 */ /** 绑定的设备编号 */
@Excel(name = "绑定的设备编号") @Excel(name = "绑定的设备编号")
private String deviceCode; private String deviceCode;
...@@ -449,11 +452,20 @@ public class PalletDeviceBinding extends BaseEntity ...@@ -449,11 +452,20 @@ public class PalletDeviceBinding extends BaseEntity
this.networkStatus = networkStatus; this.networkStatus = networkStatus;
} }
public String getStoreyCode() {
return storeyCode;
}
public void setStoreyCode(String storeyCode) {
this.storeyCode = storeyCode;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("palletDeviceBindingId", getPalletDeviceBindingId()) .append("palletDeviceBindingId", getPalletDeviceBindingId())
.append("trayId", getTrayId()) .append("trayId", getTrayId())
.append("storeyCode", getStoreyCode())
.append("fTrayCode", getfTrayCode()) .append("fTrayCode", getfTrayCode())
.append("deviceCode", getDeviceCode()) .append("deviceCode", getDeviceCode())
.append("row", getRow()) .append("row", getRow())
......
...@@ -10,7 +10,7 @@ import com.zehong.common.core.domain.BaseEntity; ...@@ -10,7 +10,7 @@ import com.zehong.common.core.domain.BaseEntity;
/** /**
* 未上传成功的历史数据列对象 t_pallet_device_upload_history * 未上传成功的历史数据列对象 t_pallet_device_upload_history
* *
* @author zehong * @author zehong
* @date 2025-11-24 * @date 2025-11-24
*/ */
...@@ -23,6 +23,9 @@ public class PalletDeviceUploadHistory extends BaseEntity ...@@ -23,6 +23,9 @@ public class PalletDeviceUploadHistory extends BaseEntity
/** 托盘id */ /** 托盘id */
private Long trayId; private Long trayId;
/** 绑定层编号 */
@Excel(name = "绑定层编号")
private String storeyCode;
/** 托盘编号 */ /** 托盘编号 */
@Excel(name = "托盘编号") @Excel(name = "托盘编号")
...@@ -166,201 +169,201 @@ public class PalletDeviceUploadHistory extends BaseEntity ...@@ -166,201 +169,201 @@ public class PalletDeviceUploadHistory extends BaseEntity
*/ */
@Excel(name = "网络状态;0:异常 1:正常") @Excel(name = "网络状态;0:异常 1:正常")
private Integer networkStatus; private Integer networkStatus;
public void setId(Long id) public void setId(Long id)
{ {
this.id = id; this.id = id;
} }
public Long getId() public Long getId()
{ {
return id; return id;
} }
public void setTrayId(Long trayId) public void setTrayId(Long trayId)
{ {
this.trayId = trayId; this.trayId = trayId;
} }
public Long getTrayId() public Long getTrayId()
{ {
return trayId; return trayId;
} }
public void setDeviceCode(String deviceCode) public void setDeviceCode(String deviceCode)
{ {
this.deviceCode = deviceCode; this.deviceCode = deviceCode;
} }
public String getDeviceCode() public String getDeviceCode()
{ {
return deviceCode; return deviceCode;
} }
public void setRow(Integer row) public void setRow(Integer row)
{ {
this.row = row; this.row = row;
} }
public Integer getRow() public Integer getRow()
{ {
return row; return row;
} }
public void setCol(Integer col) public void setCol(Integer col)
{ {
this.col = col; this.col = col;
} }
public Integer getCol() public Integer getCol()
{ {
return col; return col;
} }
public void setIndex(Integer index) public void setIndex(Integer index)
{ {
this.index = index; this.index = index;
} }
public Integer getIndex() public Integer getIndex()
{ {
return index; return index;
} }
public void setNumber(Integer number) public void setNumber(Integer number)
{ {
this.number = number; this.number = number;
} }
public Integer getNumber() public Integer getNumber()
{ {
return number; return number;
} }
public void setBindingTime(Date bindingTime) public void setBindingTime(Date bindingTime)
{ {
this.bindingTime = bindingTime; this.bindingTime = bindingTime;
} }
public Date getBindingTime() public Date getBindingTime()
{ {
return bindingTime; return bindingTime;
} }
public void setUnbindingTime(Date unbindingTime) public void setUnbindingTime(Date unbindingTime)
{ {
this.unbindingTime = unbindingTime; this.unbindingTime = unbindingTime;
} }
public Date getUnbindingTime() public Date getUnbindingTime()
{ {
return unbindingTime; return unbindingTime;
} }
public void setStatus(String status) public void setStatus(String status)
{ {
this.status = status; this.status = status;
} }
public String getStatus() public String getStatus()
{ {
return status; return status;
} }
public void setRecordYear(String recordYear) public void setRecordYear(String recordYear)
{ {
this.recordYear = recordYear; this.recordYear = recordYear;
} }
public String getRecordYear() public String getRecordYear()
{ {
return recordYear; return recordYear;
} }
public void setRecordMonth(String recordMonth) public void setRecordMonth(String recordMonth)
{ {
this.recordMonth = recordMonth; this.recordMonth = recordMonth;
} }
public String getRecordMonth() public String getRecordMonth()
{ {
return recordMonth; return recordMonth;
} }
public void setRecordDate(String recordDate) public void setRecordDate(String recordDate)
{ {
this.recordDate = recordDate; this.recordDate = recordDate;
} }
public String getRecordDate() public String getRecordDate()
{ {
return recordDate; return recordDate;
} }
public void setRecordHour(String recordHour) public void setRecordHour(String recordHour)
{ {
this.recordHour = recordHour; this.recordHour = recordHour;
} }
public String getRecordHour() public String getRecordHour()
{ {
return recordHour; return recordHour;
} }
public void setRecordMinute(String recordMinute) public void setRecordMinute(String recordMinute)
{ {
this.recordMinute = recordMinute; this.recordMinute = recordMinute;
} }
public String getRecordMinute() public String getRecordMinute()
{ {
return recordMinute; return recordMinute;
} }
public void setWriteTimeStatus(String writeTimeStatus) public void setWriteTimeStatus(String writeTimeStatus)
{ {
this.writeTimeStatus = writeTimeStatus; this.writeTimeStatus = writeTimeStatus;
} }
public String getWriteTimeStatus() public String getWriteTimeStatus()
{ {
return writeTimeStatus; return writeTimeStatus;
} }
public void setAdjustmentZeroAd(String adjustmentZeroAd) public void setAdjustmentZeroAd(String adjustmentZeroAd)
{ {
this.adjustmentZeroAd = adjustmentZeroAd; this.adjustmentZeroAd = adjustmentZeroAd;
} }
public String getAdjustmentZeroAd() public String getAdjustmentZeroAd()
{ {
return adjustmentZeroAd; return adjustmentZeroAd;
} }
public void setZeroStatus(String zeroStatus) public void setZeroStatus(String zeroStatus)
{ {
this.zeroStatus = zeroStatus; this.zeroStatus = zeroStatus;
} }
public String getZeroStatus() public String getZeroStatus()
{ {
return zeroStatus; return zeroStatus;
} }
public void setCalibrationAd(String calibrationAd) public void setCalibrationAd(String calibrationAd)
{ {
this.calibrationAd = calibrationAd; this.calibrationAd = calibrationAd;
} }
public String getCalibrationAd() public String getCalibrationAd()
{ {
return calibrationAd; return calibrationAd;
} }
public void setCalibrationStatus(String calibrationStatus) public void setCalibrationStatus(String calibrationStatus)
{ {
this.calibrationStatus = calibrationStatus; this.calibrationStatus = calibrationStatus;
} }
public String getCalibrationStatus() public String getCalibrationStatus()
{ {
return calibrationStatus; return calibrationStatus;
} }
public void setConcentration(String concentration) public void setConcentration(String concentration)
{ {
this.concentration = concentration; this.concentration = concentration;
} }
public String getConcentration() public String getConcentration()
{ {
return concentration; return concentration;
} }
public void setRunTimeStatus(String runTimeStatus) public void setRunTimeStatus(String runTimeStatus)
{ {
this.runTimeStatus = runTimeStatus; this.runTimeStatus = runTimeStatus;
} }
public String getRunTimeStatus() public String getRunTimeStatus()
{ {
return runTimeStatus; return runTimeStatus;
} }
...@@ -373,12 +376,12 @@ public class PalletDeviceUploadHistory extends BaseEntity ...@@ -373,12 +376,12 @@ public class PalletDeviceUploadHistory extends BaseEntity
{ {
return realTimeAd; return realTimeAd;
} }
public void setRealTimeAdStatus(String realTimeAdStatus) public void setRealTimeAdStatus(String realTimeAdStatus)
{ {
this.realTimeAdStatus = realTimeAdStatus; this.realTimeAdStatus = realTimeAdStatus;
} }
public String getRealTimeAdStatus() public String getRealTimeAdStatus()
{ {
return realTimeAdStatus; return realTimeAdStatus;
} }
...@@ -455,11 +458,20 @@ public class PalletDeviceUploadHistory extends BaseEntity ...@@ -455,11 +458,20 @@ public class PalletDeviceUploadHistory extends BaseEntity
this.networkStatus = networkStatus; this.networkStatus = networkStatus;
} }
public String getStoreyCode() {
return storeyCode;
}
public void setStoreyCode(String storeyCode) {
this.storeyCode = storeyCode;
}
@Override @Override
public String toString() { public String toString() {
return "PalletDeviceUploadHistory{" + return "PalletDeviceUploadHistory{" +
"id=" + id + "id=" + id +
", trayId=" + trayId + ", trayId=" + trayId +
", storeyCode=" + storeyCode +
", trayCode='" + trayCode + '\'' + ", trayCode='" + trayCode + '\'' +
", deviceCode='" + deviceCode + '\'' + ", deviceCode='" + deviceCode + '\'' +
", row=" + row + ", row=" + row +
......
...@@ -6,15 +6,15 @@ import org.apache.ibatis.annotations.Param; ...@@ -6,15 +6,15 @@ import org.apache.ibatis.annotations.Param;
/** /**
* 托盘绑定的设备列Mapper接口 * 托盘绑定的设备列Mapper接口
* *
* @author zehong * @author zehong
* @date 2025-06-29 * @date 2025-06-29
*/ */
public interface PalletDeviceBindingMapper public interface PalletDeviceBindingMapper
{ {
/** /**
* 查询托盘绑定的设备列 * 查询托盘绑定的设备列
* *
* @param palletDeviceBindingId 托盘绑定的设备列ID * @param palletDeviceBindingId 托盘绑定的设备列ID
* @return 托盘绑定的设备列 * @return 托盘绑定的设备列
*/ */
...@@ -28,9 +28,11 @@ public interface PalletDeviceBindingMapper ...@@ -28,9 +28,11 @@ public interface PalletDeviceBindingMapper
*/ */
public PalletDeviceBinding selectByTrayIdAndIndex(@Param("ip") String ip, @Param("index") Integer index); public PalletDeviceBinding selectByTrayIdAndIndex(@Param("ip") String ip, @Param("index") Integer index);
public void updateStoreCodeByTrayId(@Param("fTrayId") Long fTrayId, @Param("storeCode")String storeCode);
/** /**
* 查询托盘绑定的设备列列表 * 查询托盘绑定的设备列列表
* *
* @param palletDeviceBinding 托盘绑定的设备列 * @param palletDeviceBinding 托盘绑定的设备列
* @return 托盘绑定的设备列集合 * @return 托盘绑定的设备列集合
*/ */
...@@ -48,7 +50,7 @@ public interface PalletDeviceBindingMapper ...@@ -48,7 +50,7 @@ public interface PalletDeviceBindingMapper
/** /**
* 新增托盘绑定的设备列 * 新增托盘绑定的设备列
* *
* @param palletDeviceBinding 托盘绑定的设备列 * @param palletDeviceBinding 托盘绑定的设备列
* @return 结果 * @return 结果
*/ */
...@@ -62,7 +64,7 @@ public interface PalletDeviceBindingMapper ...@@ -62,7 +64,7 @@ public interface PalletDeviceBindingMapper
/** /**
* 修改托盘绑定的设备列 * 修改托盘绑定的设备列
* *
* @param palletDeviceBinding 托盘绑定的设备列 * @param palletDeviceBinding 托盘绑定的设备列
* @return 结果 * @return 结果
*/ */
...@@ -82,7 +84,7 @@ public interface PalletDeviceBindingMapper ...@@ -82,7 +84,7 @@ public interface PalletDeviceBindingMapper
/** /**
* 删除托盘绑定的设备列 * 删除托盘绑定的设备列
* *
* @param palletDeviceBindingId 托盘绑定的设备列ID * @param palletDeviceBindingId 托盘绑定的设备列ID
* @return 结果 * @return 结果
*/ */
...@@ -90,7 +92,7 @@ public interface PalletDeviceBindingMapper ...@@ -90,7 +92,7 @@ public interface PalletDeviceBindingMapper
/** /**
* 批量删除托盘绑定的设备列 * 批量删除托盘绑定的设备列
* *
* @param palletDeviceBindingIds 需要删除的数据ID * @param palletDeviceBindingIds 需要删除的数据ID
* @return 结果 * @return 结果
*/ */
......
...@@ -400,6 +400,7 @@ public class CalibrationResultEventHandler { ...@@ -400,6 +400,7 @@ public class CalibrationResultEventHandler {
PalletDeviceUploadHistory history = new PalletDeviceUploadHistory(); PalletDeviceUploadHistory history = new PalletDeviceUploadHistory();
// 基础信息字段 // 基础信息字段
history.setTrayId(binding.getTrayId()); history.setTrayId(binding.getTrayId());
history.setStoreyCode(binding.getStoreyCode());
history.setDeviceCode(binding.getDeviceCode()); history.setDeviceCode(binding.getDeviceCode());
history.setRow(binding.getRow()); history.setRow(binding.getRow());
history.setCol(binding.getCol()); history.setCol(binding.getCol());
......
...@@ -488,6 +488,7 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService ...@@ -488,6 +488,7 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public int insertRobotArmCommand(RobotArmCommand robotArmCommand) public int insertRobotArmCommand(RobotArmCommand robotArmCommand)
{ {
robotArmCommand.setCreateTime(DateUtils.getNowDate()); robotArmCommand.setCreateTime(DateUtils.getNowDate());
...@@ -525,6 +526,10 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService ...@@ -525,6 +526,10 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
tStoreyInfo.setfStatus("1"); tStoreyInfo.setfStatus("1");
storeyInfoMapper.updateStatusByCode(tStoreyInfo); storeyInfoMapper.updateStatusByCode(tStoreyInfo);
// 20260108 新加的把绑定层编号设置到实时数据上
palletDeviceBindingMapper.updateStoreCodeByTrayId(tTrayInfo.getfTrayId(), tStoreyInfo.getfStoreyCode());
} else { } else {
robotArmCommand.setStoreyCode("待分配位置"); robotArmCommand.setStoreyCode("待分配位置");
} }
......
...@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="PalletDeviceBinding" id="PalletDeviceBindingResult"> <resultMap type="PalletDeviceBinding" id="PalletDeviceBindingResult">
<result property="palletDeviceBindingId" column="f_pallet_device_binding_id" /> <result property="palletDeviceBindingId" column="f_pallet_device_binding_id" />
<result property="trayId" column="f_tray_id" /> <result property="trayId" column="f_tray_id" />
<result property="storeyCode" column="f_storey_code" />
<result property="deviceCode" column="f_device_code" /> <result property="deviceCode" column="f_device_code" />
<result property="row" column="f_row" /> <result property="row" column="f_row" />
<result property="col" column="f_col" /> <result property="col" column="f_col" />
...@@ -48,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -48,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectPalletDeviceBindingVo"> <sql id="selectPalletDeviceBindingVo">
select palDeviceBinding.f_pallet_device_binding_id, select palDeviceBinding.f_pallet_device_binding_id,
palDeviceBinding.f_tray_id, palDeviceBinding.f_tray_id,
palDeviceBinding.f_storey_code,
trayInfo.f_tray_code as fTrayCode, trayInfo.f_tray_code as fTrayCode,
palDeviceBinding.f_device_code, palDeviceBinding.f_device_code,
palDeviceBinding.f_row, palDeviceBinding.f_row,
...@@ -132,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -132,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectByTrayIdAndIndex" resultMap="PalletDeviceBindingResult"> <select id="selectByTrayIdAndIndex" resultMap="PalletDeviceBindingResult">
select f_pallet_device_binding_id, select f_pallet_device_binding_id,
f_storey_code,
f_tray_id, f_tray_id,
f_device_code, f_device_code,
f_row, f_row,
...@@ -189,19 +192,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -189,19 +192,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if> </if>
</select> </select>
<insert id="batchInsertPalletDeviceBinding" parameterType="list" useGeneratedKeys="true" keyProperty="palletDeviceBindingId"> <insert id="batchInsertPalletDeviceBinding" parameterType="list" useGeneratedKeys="true" keyProperty="palletDeviceBindingId">
insert into t_pallet_device_binding (f_tray_id, f_device_code,f_row,f_col,f_index,f_number,f_binding_time, insert into t_pallet_device_binding (f_tray_id,f_storey_code f_device_code,f_row,f_col,f_index,f_number,f_binding_time,
f_create_time,f_status) f_create_time,f_status)
values values
<foreach collection="palletDeviceBindingList" item="item" index="index" separator=","> <foreach collection="palletDeviceBindingList" item="item" index="index" separator=",">
( (
#{item.trayId}, #{item.deviceCode}, #{item.row}, #{item.col},#{item.index},#{item.number}, #{item.trayId}, #{item.storeyCode}, #{item.deviceCode}, #{item.row}, #{item.col},#{item.index},#{item.number},
#{item.bindingTime},#{item.createTime},#{item.status} #{item.bindingTime},#{item.createTime},#{item.status}
) )
</foreach> </foreach>
</insert> </insert>
<update id="updateStoreCodeByTrayId">
update t_pallet_device_binding set f_device_code = #{deviceCode} where f_tray_id = #{trayId}
</update>
<update id="resetAll" parameterType="long"> <update id="resetAll" parameterType="long">
update t_pallet_device_binding update t_pallet_device_binding
set f_device_code = null, set f_device_code = null,
f_storey_code = null,
f_status = null, f_status = null,
f_binding_time = null, f_binding_time = null,
f_unbinding_time = null, f_unbinding_time = null,
...@@ -236,6 +243,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -236,6 +243,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="trayId != null">f_tray_id,</if> <if test="trayId != null">f_tray_id,</if>
<if test="deviceCode != null">f_device_code,</if> <if test="deviceCode != null">f_device_code,</if>
<if test="storeyCode != null">f_storey_code,</if>
<if test="row != null">f_row,</if> <if test="row != null">f_row,</if>
<if test="col != null">f_col,</if> <if test="col != null">f_col,</if>
<if test="index != null">f_index,</if> <if test="index != null">f_index,</if>
...@@ -248,6 +256,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -248,6 +256,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="trayId != null">#{trayId},</if> <if test="trayId != null">#{trayId},</if>
<if test="deviceCode != null">#{deviceCode},</if> <if test="deviceCode != null">#{deviceCode},</if>
<if test="storeyCode != null">#{storeyCode},</if>
<if test="row != null">#{row},</if> <if test="row != null">#{row},</if>
<if test="col != null">#{col},</if> <if test="col != null">#{col},</if>
<if test="index != null">#{index},</if> <if test="index != null">#{index},</if>
...@@ -262,6 +271,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -262,6 +271,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="unbindDevice" parameterType="long"> <update id="unbindDevice" parameterType="long">
update t_pallet_device_binding update t_pallet_device_binding
set f_device_code = null, set f_device_code = null,
f_storey_code = null,
f_status = null, f_status = null,
f_unbinding_time = NOW(), f_unbinding_time = NOW(),
f_record_year = null, f_record_year = null,
...@@ -292,6 +302,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -292,6 +302,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_pallet_device_binding update t_pallet_device_binding
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="trayId != null">f_tray_id = #{trayId},</if> <if test="trayId != null">f_tray_id = #{trayId},</if>
<if test="storeyCode != null">f_storey_code = #{storeyCode},</if>
<if test="deviceCode != null">f_device_code = #{deviceCode},</if> <if test="deviceCode != null">f_device_code = #{deviceCode},</if>
<if test="deviceCode == null">f_device_code = null,</if> <if test="deviceCode == null">f_device_code = null,</if>
<if test="row != null">f_row = #{row},</if> <if test="row != null">f_row = #{row},</if>
...@@ -357,6 +368,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -357,6 +368,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<foreach collection="palletDeviceBindingList" item="item" index="index" separator=";"> <foreach collection="palletDeviceBindingList" item="item" index="index" separator=";">
UPDATE t_pallet_device_binding UPDATE t_pallet_device_binding
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
f_storey_code = null,
f_unbinding_time = null, f_unbinding_time = null,
f_status = null, f_status = null,
f_binding_time = NOW(), f_binding_time = NOW(),
...@@ -394,6 +406,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -394,6 +406,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="unbindAllDevice" parameterType="long"> <update id="unbindAllDevice" parameterType="long">
update t_pallet_device_binding update t_pallet_device_binding
set f_device_code = null, set f_device_code = null,
f_storey_code = null,
f_status = null, f_status = null,
f_unbinding_time = NOW(), f_unbinding_time = NOW(),
f_status = '1', f_status = '1',
......
...@@ -3,10 +3,11 @@ ...@@ -3,10 +3,11 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.PalletDeviceUploadHistoryMapper"> <mapper namespace="com.zehong.system.mapper.PalletDeviceUploadHistoryMapper">
<resultMap type="PalletDeviceUploadHistory" id="PalletDeviceUploadHistoryResult"> <resultMap type="PalletDeviceUploadHistory" id="PalletDeviceUploadHistoryResult">
<result property="id" column="f_id" /> <result property="id" column="f_id" />
<result property="trayId" column="f_tray_id" /> <result property="trayId" column="f_tray_id" />
<result property="storeyCode" column="f_storey_code" />
<result property="deviceCode" column="f_device_code" /> <result property="deviceCode" column="f_device_code" />
<result property="row" column="f_row" /> <result property="row" column="f_row" />
<result property="col" column="f_col" /> <result property="col" column="f_col" />
...@@ -45,6 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -45,6 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectPalletDeviceUploadHistoryVo"> <sql id="selectPalletDeviceUploadHistoryVo">
select palDeviceBinding.f_id, select palDeviceBinding.f_id,
palDeviceBinding.f_tray_id, palDeviceBinding.f_tray_id,
palDeviceBinding.f_storey_code,
trayInfo.f_tray_code as trayCode, trayInfo.f_tray_code as trayCode,
palDeviceBinding.f_device_code, palDeviceBinding.f_device_code,
palDeviceBinding.f_row, palDeviceBinding.f_row,
...@@ -88,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -88,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="trayCode != null and trayCode != ''"> and trayInfo.f_tray_code like concat('%',#{trayCode},'%') </if> <if test="trayCode != null and trayCode != ''"> and trayInfo.f_tray_code like concat('%',#{trayCode},'%') </if>
</where> </where>
</select> </select>
<select id="selectPalletDeviceUploadHistoryById" parameterType="Long" resultMap="PalletDeviceUploadHistoryResult"> <select id="selectPalletDeviceUploadHistoryById" parameterType="Long" resultMap="PalletDeviceUploadHistoryResult">
<include refid="selectPalletDeviceUploadHistoryVo"/> <include refid="selectPalletDeviceUploadHistoryVo"/>
where palDeviceBinding.f_id = #{id} where palDeviceBinding.f_id = #{id}
...@@ -98,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -98,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into t_pallet_device_upload_history insert into t_pallet_device_upload_history
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
f_tray_id, f_tray_id,
f_storey_code,
f_device_code, f_device_code,
f_row, f_row,
f_col, f_col,
...@@ -134,6 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -134,6 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
#{item.trayId}, #{item.trayId},
#{item.storeyCode},
#{item.deviceCode}, #{item.deviceCode},
#{item.row}, #{item.row},
#{item.col}, #{item.col},
...@@ -172,6 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -172,6 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into t_pallet_device_upload_history insert into t_pallet_device_upload_history
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="trayId != null">f_tray_id,</if> <if test="trayId != null">f_tray_id,</if>
<if test="storeyCode != null">f_storey_code,</if>
<if test="deviceCode != null">f_device_code,</if> <if test="deviceCode != null">f_device_code,</if>
<if test="row != null">f_row,</if> <if test="row != null">f_row,</if>
<if test="col != null">f_col,</if> <if test="col != null">f_col,</if>
...@@ -207,6 +212,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -207,6 +212,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="trayId != null">#{trayId},</if> <if test="trayId != null">#{trayId},</if>
<if test="storeyCode != null">#{storeyCode},</if>
<if test="deviceCode != null">#{deviceCode},</if> <if test="deviceCode != null">#{deviceCode},</if>
<if test="row != null">#{row},</if> <if test="row != null">#{row},</if>
<if test="col != null">#{col},</if> <if test="col != null">#{col},</if>
...@@ -246,6 +252,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -246,6 +252,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_pallet_device_upload_history update t_pallet_device_upload_history
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="trayId != null">f_tray_id = #{trayId},</if> <if test="trayId != null">f_tray_id = #{trayId},</if>
<if test="storeyCode != null">f_storey_code = #{storeyCode},</if>
<if test="deviceCode != null">f_device_code = #{deviceCode},</if> <if test="deviceCode != null">f_device_code = #{deviceCode},</if>
<if test="row != null">f_row = #{row},</if> <if test="row != null">f_row = #{row},</if>
<if test="col != null">f_col = #{col},</if> <if test="col != null">f_col = #{col},</if>
...@@ -288,9 +295,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -288,9 +295,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deletePalletDeviceUploadHistoryByIds" parameterType="String"> <delete id="deletePalletDeviceUploadHistoryByIds" parameterType="String">
delete from t_pallet_device_upload_history where f_id in delete from t_pallet_device_upload_history where f_id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
</mapper> </mapper>
\ No newline at end of file
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
<el-table v-loading="loading" :data="historyList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="historyList" @selection-change="handleSelectionChange">
<el-table-column label="托盘编号" align="center" prop="trayCode" /> <el-table-column label="托盘编号" align="center" prop="trayCode" />
<el-table-column label="绑定层编号" align="center" prop="storeyCode" width="100px" />
<el-table-column label="设备编号" align="center" prop="deviceCode" /> <el-table-column label="设备编号" align="center" prop="deviceCode" />
<el-table-column label="行" align="center" prop="row" /> <el-table-column label="行" align="center" prop="row" />
<el-table-column label="列" align="center" prop="col" /> <el-table-column label="列" align="center" prop="col" />
...@@ -114,44 +115,38 @@ ...@@ -114,44 +115,38 @@
<el-table-column label="写自检状态" align="center" width="150"> <el-table-column label="写自检状态" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.writeSelfCheckStatus === 1" class="write-success">成功</span> <el-tag type="success" v-if="scope.row.writeSelfCheckStatus === 1">成功</el-tag>
<span v-else-if="scope.row.writeSelfCheckStatus === 0" class="write-failed">失败</span> <el-tag type="info" v-if="scope.row.writeSelfCheckStatus === 0">失败</el-tag>
<span v-else class="write-unknown">-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="继电器状态" align="center" width="150"> <el-table-column label="继电器状态" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.relayStatus === 1" class="write-success">初始</span> <el-tag type="info" v-if="scope.row.relayStatus === 1">初始</el-tag>
<span v-else-if="scope.row.relayStatus === 0" class="write-failed">动作</span> <el-tag type="success" v-if="scope.row.relayStatus === 0">动作</el-tag>
<span v-else class="write-unknown">-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="脉冲状态" align="center" width="120"> <el-table-column label="脉冲状态" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.pulseStatus === 1" class="write-success">初始</span> <el-tag type="info" v-if="scope.row.pulseStatus === 1">初始</el-tag>
<span v-else-if="scope.row.pulseStatus === 0" class="write-failed">动作</span> <el-tag type="success" v-if="scope.row.pulseStatus === 0">动作</el-tag>
<span v-else class="write-unknown">-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="模块状态" align="center" width="120"> <el-table-column label="模块状态" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.moduleStatus === 1" class="write-success">正常</span> <el-tag type="success" v-if="scope.row.moduleStatus === 1">正常</el-tag>
<span v-else-if="scope.row.moduleStatus === 0" class="write-failed">异常</span> <el-tag type="info" v-if="scope.row.moduleStatus === 0">异常</el-tag>
<span v-else class="write-unknown">-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="SIM卡状态" align="center" width="150"> <el-table-column label="SIM卡状态" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.simCardStatus === 1" class="write-success">正常</span> <el-tag type="success" v-if="scope.row.simCardStatus === 1">正常</el-tag>
<span v-else-if="scope.row.simCardStatus === 0" class="write-failed">异常</span> <el-tag type="info" v-if="scope.row.simCardStatus === 0">异常</el-tag>
<span v-else class="write-unknown">-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="网络状态" align="center" width="120"> <el-table-column label="网络状态" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.networkStatus === 1" class="write-success">正常</span> <el-tag type="success" v-if="scope.row.networkStatus === 1">正常</el-tag>
<span v-else-if="scope.row.networkStatus === 0" class="write-failed">异常</span> <el-tag type="info" v-if="scope.row.networkStatus === 0">异常</el-tag>
<span v-else class="write-unknown">-</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="调零AD" align="center" prop="adjustmentZeroAd" />--> <!-- <el-table-column label="调零AD" align="center" prop="adjustmentZeroAd" />-->
......
...@@ -58,6 +58,11 @@ ...@@ -58,6 +58,11 @@
<div class="tray-id">{{ scope.row.fTrayCode }}</div> <div class="tray-id">{{ scope.row.fTrayCode }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="绑定层编号" prop="storeyCode" align="center" width="150" fixed="left">
<template slot-scope="scope">
<div class="tray-id">{{ scope.row.storeyCode }}</div>
</template>
</el-table-column>
<el-table-column label="设备编号" prop="deviceCode" align="center" width="150" fixed="left"> <el-table-column label="设备编号" prop="deviceCode" align="center" width="150" fixed="left">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="device-code">{{ scope.row.deviceCode }}</div> <div class="device-code">{{ scope.row.deviceCode }}</div>
......
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