Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zhmes-agecal
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
zhmes-agecal
Commits
858fc493
Commit
858fc493
authored
Jun 29, 2025
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 托盘列表 和 托盘绑定设备 关联跳转及 设备和托盘绑定数据功能实现中;
parent
5bf63fbd
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1429 additions
and
246 deletions
+1429
-246
PalletDeviceBindingController.java
...b/controller/equipment/PalletDeviceBindingController.java
+121
-0
AllCommandHandler.java
.../src/main/java/com/zehong/web/task/AllCommandHandler.java
+1
-1
PalletDeviceBinding.java
...in/java/com/zehong/system/domain/PalletDeviceBinding.java
+149
-0
PalletDeviceBindingMapper.java
...a/com/zehong/system/mapper/PalletDeviceBindingMapper.java
+66
-0
IPalletDeviceBindingService.java
...om/zehong/system/service/IPalletDeviceBindingService.java
+64
-0
PalletDeviceBindingServiceImpl.java
...g/system/service/impl/PalletDeviceBindingServiceImpl.java
+119
-0
PalletDeviceBindingMapper.xml
...ain/resources/mapper/system/PalletDeviceBindingMapper.xml
+116
-0
binding.js
zhmes-agecal-web/src/api/palletDeviceBinding/binding.js
+80
-0
AgingCabinetBoard.vue
...cal-web/src/views/screen/components/AgingCabinetBoard.vue
+40
-39
AgingLayer.vue
zhmes-agecal-web/src/views/screen/components/AgingLayer.vue
+1
-1
TrayBinding.vue
zhmes-agecal-web/src/views/screen/components/TrayBinding.vue
+433
-165
TrayInformation.vue
...gecal-web/src/views/screen/components/TrayInformation.vue
+232
-35
index.vue
zhmes-agecal-web/src/views/screen/index.vue
+7
-5
No files found.
zhmes-agecal-admin/src/main/java/com/zehong/web/controller/equipment/PalletDeviceBindingController.java
0 → 100644
View file @
858fc493
package
com
.
zehong
.
web
.
controller
.
equipment
;
import
java.util.List
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.PalletDeviceBinding
;
import
com.zehong.system.service.IPalletDeviceBindingService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 托盘绑定的设备列Controller
*
* @author zehong
* @date 2025-06-29
*/
@RestController
@RequestMapping
(
"/palletDevice/binding"
)
public
class
PalletDeviceBindingController
extends
BaseController
{
@Autowired
private
IPalletDeviceBindingService
palletDeviceBindingService
;
/**
* 查询托盘绑定的设备列列表
*/
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
PalletDeviceBinding
palletDeviceBinding
)
{
startPage
();
List
<
PalletDeviceBinding
>
list
=
palletDeviceBindingService
.
selectPalletDeviceBindingList
(
palletDeviceBinding
);
return
getDataTable
(
list
);
}
/**
* 获取所有托盘绑定的设备列列表
*/
@GetMapping
(
"/getAll"
)
public
AjaxResult
getAll
(
PalletDeviceBinding
palletDeviceBinding
)
{
return
AjaxResult
.
success
(
palletDeviceBindingService
.
selectPalletDeviceBindingList
(
palletDeviceBinding
));
}
/**
* 导出托盘绑定的设备列列表
*/
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
PalletDeviceBinding
palletDeviceBinding
)
{
List
<
PalletDeviceBinding
>
list
=
palletDeviceBindingService
.
selectPalletDeviceBindingList
(
palletDeviceBinding
);
ExcelUtil
<
PalletDeviceBinding
>
util
=
new
ExcelUtil
<
PalletDeviceBinding
>(
PalletDeviceBinding
.
class
);
return
util
.
exportExcel
(
list
,
"托盘绑定的设备列数据"
);
}
/**
* 获取托盘绑定的设备列详细信息
*/
@GetMapping
(
value
=
"/{palletDeviceBindingId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"palletDeviceBindingId"
)
Long
palletDeviceBindingId
)
{
return
AjaxResult
.
success
(
palletDeviceBindingService
.
selectPalletDeviceBindingById
(
palletDeviceBindingId
));
}
/**
* 新增托盘绑定的设备列
*/
@PostMapping
public
AjaxResult
add
(
@RequestBody
PalletDeviceBinding
palletDeviceBinding
)
{
return
toAjax
(
palletDeviceBindingService
.
insertPalletDeviceBinding
(
palletDeviceBinding
));
}
/**
* 批量新增托盘绑定的设备列
* @param palletDeviceBindings p
* @return l
*/
@PostMapping
(
"/batchAdd"
)
public
AjaxResult
batchAdd
(
@RequestBody
List
<
PalletDeviceBinding
>
palletDeviceBindings
){
return
toAjax
(
palletDeviceBindingService
.
batchInsertPalletDeviceBinding
(
palletDeviceBindings
));
}
/**
* 批量更新托盘绑定的设备列
* @param palletDeviceBindings p
* @return r
*/
@PostMapping
(
"/batchUpdateDeviceCode"
)
public
AjaxResult
batchUpdateDeviceCode
(
@RequestBody
List
<
PalletDeviceBinding
>
palletDeviceBindings
)
{
return
toAjax
(
palletDeviceBindingService
.
batchUpdateDeviceCode
(
palletDeviceBindings
));
}
/**
* 修改托盘绑定的设备列
*/
@PutMapping
public
AjaxResult
edit
(
@RequestBody
PalletDeviceBinding
palletDeviceBinding
)
{
return
toAjax
(
palletDeviceBindingService
.
updatePalletDeviceBinding
(
palletDeviceBinding
));
}
/**
* 删除托盘绑定的设备列
*/
@DeleteMapping
(
"/{palletDeviceBindingIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
palletDeviceBindingIds
)
{
return
toAjax
(
palletDeviceBindingService
.
deletePalletDeviceBindingByIds
(
palletDeviceBindingIds
));
}
}
zhmes-agecal-admin/src/main/java/com/zehong/web/task/AllCommandHandler.java
View file @
858fc493
...
...
@@ -4,9 +4,9 @@ import com.serotonin.modbus4j.ModbusMaster;
import
com.serotonin.modbus4j.exception.ErrorResponseException
;
import
com.serotonin.modbus4j.exception.ModbusInitException
;
import
com.serotonin.modbus4j.exception.ModbusTransportException
;
import
com.zehong.framework.modbus4j.Modbus4jUtils
;
import
com.zehong.system.domain.TEquipmentAlarmData
;
import
com.zehong.system.domain.TStoreyInfo
;
import
com.zehong.system.modbus.util.Modbus4jUtils
;
import
com.zehong.system.service.ITEquipmentAlarmDataService
;
import
com.zehong.system.service.ITStoreyInfoService
;
import
org.quartz.SchedulerException
;
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/domain/PalletDeviceBinding.java
0 → 100644
View file @
858fc493
package
com
.
zehong
.
system
.
domain
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
/**
* 托盘绑定的设备列对象 t_pallet_device_binding
*
* @author zehong
* @date 2025-06-29
*/
public
class
PalletDeviceBinding
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 托盘id */
private
Long
palletDeviceBindingId
;
/** 托盘id */
@Excel
(
name
=
"托盘id"
)
private
Long
trayId
;
/** 绑定的设备编号 */
@Excel
(
name
=
"绑定的设备编号"
)
private
String
deviceCode
;
/** 行 */
@Excel
(
name
=
"行"
)
private
Integer
row
;
/** 列 */
@Excel
(
name
=
"列"
)
private
Integer
col
;
/**
* 第几个
*/
private
Integer
index
;
/** 绑定时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"绑定时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
bindingTime
;
/** 解绑时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"解绑时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
unbindingTime
;
private
String
status
;
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
void
setPalletDeviceBindingId
(
Long
palletDeviceBindingId
)
{
this
.
palletDeviceBindingId
=
palletDeviceBindingId
;
}
public
Long
getPalletDeviceBindingId
()
{
return
palletDeviceBindingId
;
}
public
void
setTrayId
(
Long
trayId
)
{
this
.
trayId
=
trayId
;
}
public
Long
getTrayId
()
{
return
trayId
;
}
public
void
setDeviceCode
(
String
deviceCode
)
{
this
.
deviceCode
=
deviceCode
;
}
public
String
getDeviceCode
()
{
return
deviceCode
;
}
public
void
setRow
(
Integer
row
)
{
this
.
row
=
row
;
}
public
Integer
getRow
()
{
return
row
;
}
public
void
setCol
(
Integer
col
)
{
this
.
col
=
col
;
}
public
Integer
getCol
()
{
return
col
;
}
public
void
setBindingTime
(
Date
bindingTime
)
{
this
.
bindingTime
=
bindingTime
;
}
public
Integer
getIndex
()
{
return
index
;
}
public
void
setIndex
(
Integer
index
)
{
this
.
index
=
index
;
}
public
Date
getBindingTime
()
{
return
bindingTime
;
}
public
void
setUnbindingTime
(
Date
unbindingTime
)
{
this
.
unbindingTime
=
unbindingTime
;
}
public
Date
getUnbindingTime
()
{
return
unbindingTime
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"palletDeviceBindingId"
,
getPalletDeviceBindingId
())
.
append
(
"trayId"
,
getTrayId
())
.
append
(
"deviceCode"
,
getDeviceCode
())
.
append
(
"row"
,
getRow
())
.
append
(
"col"
,
getCol
())
.
append
(
"bindingTime"
,
getBindingTime
())
.
append
(
"unbindingTime"
,
getUnbindingTime
())
.
append
(
"createTime"
,
getCreateTime
())
.
toString
();
}
}
zhmes-agecal-system/src/main/java/com/zehong/system/mapper/PalletDeviceBindingMapper.java
0 → 100644
View file @
858fc493
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.PalletDeviceBinding
;
import
org.apache.ibatis.annotations.Param
;
/**
* 托盘绑定的设备列Mapper接口
*
* @author zehong
* @date 2025-06-29
*/
public
interface
PalletDeviceBindingMapper
{
/**
* 查询托盘绑定的设备列
*
* @param palletDeviceBindingId 托盘绑定的设备列ID
* @return 托盘绑定的设备列
*/
public
PalletDeviceBinding
selectPalletDeviceBindingById
(
Long
palletDeviceBindingId
);
/**
* 查询托盘绑定的设备列列表
*
* @param palletDeviceBinding 托盘绑定的设备列
* @return 托盘绑定的设备列集合
*/
public
List
<
PalletDeviceBinding
>
selectPalletDeviceBindingList
(
PalletDeviceBinding
palletDeviceBinding
);
/**
* 新增托盘绑定的设备列
*
* @param palletDeviceBinding 托盘绑定的设备列
* @return 结果
*/
public
int
insertPalletDeviceBinding
(
PalletDeviceBinding
palletDeviceBinding
);
public
int
batchInsertPalletDeviceBinding
(
@Param
(
"palletDeviceBindingList"
)
List
<
PalletDeviceBinding
>
palletDeviceBindingList
);
/**
* 修改托盘绑定的设备列
*
* @param palletDeviceBinding 托盘绑定的设备列
* @return 结果
*/
public
int
updatePalletDeviceBinding
(
PalletDeviceBinding
palletDeviceBinding
);
public
int
batchUpdateDeviceCode
(
@Param
(
"palletDeviceBindingList"
)
List
<
PalletDeviceBinding
>
palletDeviceBindingList
);
/**
* 删除托盘绑定的设备列
*
* @param palletDeviceBindingId 托盘绑定的设备列ID
* @return 结果
*/
public
int
deletePalletDeviceBindingById
(
Long
palletDeviceBindingId
);
/**
* 批量删除托盘绑定的设备列
*
* @param palletDeviceBindingIds 需要删除的数据ID
* @return 结果
*/
public
int
deletePalletDeviceBindingByIds
(
Long
[]
palletDeviceBindingIds
);
}
zhmes-agecal-system/src/main/java/com/zehong/system/service/IPalletDeviceBindingService.java
0 → 100644
View file @
858fc493
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.PalletDeviceBinding
;
/**
* 托盘绑定的设备列Service接口
*
* @author zehong
* @date 2025-06-29
*/
public
interface
IPalletDeviceBindingService
{
/**
* 查询托盘绑定的设备列
*
* @param palletDeviceBindingId 托盘绑定的设备列ID
* @return 托盘绑定的设备列
*/
public
PalletDeviceBinding
selectPalletDeviceBindingById
(
Long
palletDeviceBindingId
);
/**
* 查询托盘绑定的设备列列表
*
* @param palletDeviceBinding 托盘绑定的设备列
* @return 托盘绑定的设备列集合
*/
public
List
<
PalletDeviceBinding
>
selectPalletDeviceBindingList
(
PalletDeviceBinding
palletDeviceBinding
);
/**
* 新增托盘绑定的设备列
*
* @param palletDeviceBinding 托盘绑定的设备列
* @return 结果
*/
public
int
insertPalletDeviceBinding
(
PalletDeviceBinding
palletDeviceBinding
);
public
int
batchInsertPalletDeviceBinding
(
List
<
PalletDeviceBinding
>
palletDeviceBindingList
);
public
int
batchUpdateDeviceCode
(
List
<
PalletDeviceBinding
>
palletDeviceBindingList
);
/**
* 修改托盘绑定的设备列
*
* @param palletDeviceBinding 托盘绑定的设备列
* @return 结果
*/
public
int
updatePalletDeviceBinding
(
PalletDeviceBinding
palletDeviceBinding
);
/**
* 批量删除托盘绑定的设备列
*
* @param palletDeviceBindingIds 需要删除的托盘绑定的设备列ID
* @return 结果
*/
public
int
deletePalletDeviceBindingByIds
(
Long
[]
palletDeviceBindingIds
);
/**
* 删除托盘绑定的设备列信息
*
* @param palletDeviceBindingId 托盘绑定的设备列ID
* @return 结果
*/
public
int
deletePalletDeviceBindingById
(
Long
palletDeviceBindingId
);
}
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/PalletDeviceBindingServiceImpl.java
0 → 100644
View file @
858fc493
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.PalletDeviceBindingMapper
;
import
com.zehong.system.domain.PalletDeviceBinding
;
import
com.zehong.system.service.IPalletDeviceBindingService
;
import
javax.annotation.Resource
;
/**
* 托盘绑定的设备列Service业务层处理
*
* @author zehong
* @date 2025-06-29
*/
@Service
public
class
PalletDeviceBindingServiceImpl
implements
IPalletDeviceBindingService
{
@Resource
private
PalletDeviceBindingMapper
palletDeviceBindingMapper
;
/**
* 查询托盘绑定的设备列
*
* @param palletDeviceBindingId 托盘绑定的设备列ID
* @return 托盘绑定的设备列
*/
@Override
public
PalletDeviceBinding
selectPalletDeviceBindingById
(
Long
palletDeviceBindingId
)
{
return
palletDeviceBindingMapper
.
selectPalletDeviceBindingById
(
palletDeviceBindingId
);
}
/**
* 查询托盘绑定的设备列列表
*
* @param palletDeviceBinding 托盘绑定的设备列
* @return 托盘绑定的设备列
*/
@Override
public
List
<
PalletDeviceBinding
>
selectPalletDeviceBindingList
(
PalletDeviceBinding
palletDeviceBinding
)
{
return
palletDeviceBindingMapper
.
selectPalletDeviceBindingList
(
palletDeviceBinding
);
}
/**
* 新增托盘绑定的设备列
*
* @param palletDeviceBinding 托盘绑定的设备列
* @return 结果
*/
@Override
public
int
insertPalletDeviceBinding
(
PalletDeviceBinding
palletDeviceBinding
)
{
palletDeviceBinding
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
palletDeviceBindingMapper
.
insertPalletDeviceBinding
(
palletDeviceBinding
);
}
/**
* 批量添加托盘绑定的设备列
*
* @param palletDeviceBindingList 托盘绑定的设备列
* @return 结果
*/
@Override
public
int
batchInsertPalletDeviceBinding
(
List
<
PalletDeviceBinding
>
palletDeviceBindingList
)
{
palletDeviceBindingList
.
forEach
(
palletDeviceBinding
->
{
palletDeviceBinding
.
setUpdateTime
(
DateUtils
.
getNowDate
());
palletDeviceBinding
.
setCreateTime
(
DateUtils
.
getNowDate
());
});
return
palletDeviceBindingMapper
.
batchInsertPalletDeviceBinding
(
palletDeviceBindingList
);
}
@Override
public
int
batchUpdateDeviceCode
(
List
<
PalletDeviceBinding
>
palletDeviceBindingList
)
{
palletDeviceBindingList
.
forEach
(
palletDeviceBinding
->
{
palletDeviceBinding
.
setUpdateTime
(
DateUtils
.
getNowDate
());
});
return
palletDeviceBindingMapper
.
batchUpdateDeviceCode
(
palletDeviceBindingList
);
}
/**
* 修改托盘绑定的设备列
*
* @param palletDeviceBinding 托盘绑定的设备列
* @return 结果
*/
@Override
public
int
updatePalletDeviceBinding
(
PalletDeviceBinding
palletDeviceBinding
)
{
return
palletDeviceBindingMapper
.
updatePalletDeviceBinding
(
palletDeviceBinding
);
}
/**
* 批量删除托盘绑定的设备列
*
* @param palletDeviceBindingIds 需要删除的托盘绑定的设备列ID
* @return 结果
*/
@Override
public
int
deletePalletDeviceBindingByIds
(
Long
[]
palletDeviceBindingIds
)
{
return
palletDeviceBindingMapper
.
deletePalletDeviceBindingByIds
(
palletDeviceBindingIds
);
}
/**
* 删除托盘绑定的设备列信息
*
* @param palletDeviceBindingId 托盘绑定的设备列ID
* @return 结果
*/
@Override
public
int
deletePalletDeviceBindingById
(
Long
palletDeviceBindingId
)
{
return
palletDeviceBindingMapper
.
deletePalletDeviceBindingById
(
palletDeviceBindingId
);
}
}
zhmes-agecal-system/src/main/resources/mapper/system/PalletDeviceBindingMapper.xml
0 → 100644
View file @
858fc493
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.PalletDeviceBindingMapper"
>
<resultMap
type=
"PalletDeviceBinding"
id=
"PalletDeviceBindingResult"
>
<result
property=
"palletDeviceBindingId"
column=
"f_pallet_device_binding_id"
/>
<result
property=
"trayId"
column=
"f_tray_id"
/>
<result
property=
"deviceCode"
column=
"f_device_code"
/>
<result
property=
"row"
column=
"f_row"
/>
<result
property=
"col"
column=
"f_col"
/>
<result
property=
"index"
column=
"f_index"
/>
<result
property=
"bindingTime"
column=
"f_binding_time"
/>
<result
property=
"unbindingTime"
column=
"f_unbinding_time"
/>
<result
property=
"createTime"
column=
"f_create_time"
/>
<result
property=
"status"
column=
"f_status"
/>
</resultMap>
<sql
id=
"selectPalletDeviceBindingVo"
>
select f_pallet_device_binding_id, f_tray_id, f_device_code, f_row, f_col, f_index,f_binding_time, f_unbinding_time, f_create_time,f_status from t_pallet_device_binding
</sql>
<select
id=
"selectPalletDeviceBindingList"
parameterType=
"PalletDeviceBinding"
resultMap=
"PalletDeviceBindingResult"
>
<include
refid=
"selectPalletDeviceBindingVo"
/>
<where>
<if
test=
"trayId != null "
>
and f_tray_id = #{trayId}
</if>
<if
test=
"deviceCode != null and deviceCode != ''"
>
and f_device_code = #{deviceCode}
</if>
<if
test=
"row != null "
>
and f_row = #{row}
</if>
<if
test=
"col != null "
>
and f_col = #{col}
</if>
<if
test=
"index != null "
>
and f_index = #{index}
</if>
<if
test=
"bindingTime != null "
>
and f_binding_time = #{bindingTime}
</if>
<if
test=
"unbindingTime != null "
>
and f_unbinding_time = #{unbindingTime}
</if>
<if
test=
"createTime != null "
>
and f_create_time = #{createTime}
</if>
<if
test=
"status != null "
>
and f_status = #{status}
</if>
</where>
</select>
<select
id=
"selectPalletDeviceBindingById"
parameterType=
"Long"
resultMap=
"PalletDeviceBindingResult"
>
<include
refid=
"selectPalletDeviceBindingVo"
/>
where f_pallet_device_binding_id = #{palletDeviceBindingId}
</select>
<insert
id=
"batchInsertPalletDeviceBinding"
parameterType=
"list"
>
insert into t_pallet_device_binding (f_tray_id, f_device_code,f_row,f_col,f_index,f_binding_time,f_unbinding_time,
f_create_time,f_status)
values
<foreach
collection=
"palletDeviceBindingList"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.trayId}, #{item.deviceCode}, #{item.row}, #{item.col}, #{item.index},#{item.bindingTime},
#{item.unbindingTime},#{item.createTime},#{item.status}
)
</foreach>
</insert>
<insert
id=
"insertPalletDeviceBinding"
parameterType=
"PalletDeviceBinding"
useGeneratedKeys=
"true"
keyProperty=
"palletDeviceBindingId"
>
insert into t_pallet_device_binding
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"trayId != null"
>
f_tray_id,
</if>
<if
test=
"deviceCode != null"
>
f_device_code,
</if>
<if
test=
"row != null"
>
f_row,
</if>
<if
test=
"col != null"
>
f_col,
</if>
<if
test=
"index != null"
>
f_index,
</if>
<if
test=
"bindingTime != null"
>
f_binding_time,
</if>
<if
test=
"unbindingTime != null"
>
f_unbinding_time,
</if>
<if
test=
"createTime != null"
>
f_create_time,
</if>
<if
test=
"status != null"
>
f_status,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"trayId != null"
>
#{trayId},
</if>
<if
test=
"deviceCode != null"
>
#{deviceCode},
</if>
<if
test=
"row != null"
>
#{row},
</if>
<if
test=
"col != null"
>
#{col},
</if>
<if
test=
"index != null"
>
#{index},
</if>
<if
test=
"bindingTime != null"
>
#{bindingTime},
</if>
<if
test=
"unbindingTime != null"
>
#{unbindingTime},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"status != null"
>
#{status},
</if>
</trim>
</insert>
<update
id=
"updatePalletDeviceBinding"
parameterType=
"PalletDeviceBinding"
>
update t_pallet_device_binding
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"trayId != null"
>
f_tray_id = #{trayId},
</if>
<if
test=
"deviceCode != null"
>
f_device_code = #{deviceCode},
</if>
<if
test=
"row != null"
>
f_row = #{row},
</if>
<if
test=
"col != null"
>
f_col = #{col},
</if>
<if
test=
"index != null"
>
f_index = #{index},
</if>
<if
test=
"bindingTime != null"
>
f_binding_time = #{bindingTime},
</if>
<if
test=
"unbindingTime != null"
>
f_unbinding_time = #{unbindingTime},
</if>
<if
test=
"createTime != null"
>
f_create_time = #{createTime},
</if>
<if
test=
"status != null"
>
f_status = #{status},
</if>
</trim>
where f_pallet_device_binding_id = #{palletDeviceBindingId}
</update>
<update
id=
"batchUpdateDeviceCode"
parameterType=
"list"
>
<foreach
collection=
"palletDeviceBindingList"
item=
"item"
index=
"index"
separator=
";"
>
UPDATE t_pallet_device_binding
<set>
f_device_code = #{item.deviceCode}
</set>
WHERE f_pallet_device_binding_id = #{item.palletDeviceBindingId}
</foreach>
</update>
<delete
id=
"deletePalletDeviceBindingById"
parameterType=
"Long"
>
delete from t_pallet_device_binding where f_pallet_device_binding_id = #{palletDeviceBindingId}
</delete>
<delete
id=
"deletePalletDeviceBindingByIds"
parameterType=
"String"
>
delete from t_pallet_device_binding where f_pallet_device_binding_id in
<foreach
item=
"palletDeviceBindingId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{palletDeviceBindingId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
zhmes-agecal-web/src/api/palletDeviceBinding/binding.js
0 → 100644
View file @
858fc493
import
request
from
'@/utils/request'
// 查询托盘绑定的设备列列表
export
function
listBinding
(
query
)
{
return
request
({
url
:
'/palletDevice/binding/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询托盘绑定的设备列列表
export
function
getAllBinding
(
query
)
{
return
request
({
url
:
'/palletDevice/binding/getAll'
,
method
:
'get'
,
params
:
query
})
}
// 查询托盘绑定的设备列详细
export
function
getBinding
(
palletDeviceBindingId
)
{
return
request
({
url
:
'/palletDevice/binding/'
+
palletDeviceBindingId
,
method
:
'get'
})
}
// 新增托盘绑定的设备列
export
function
addBinding
(
data
)
{
return
request
({
url
:
'/palletDevice/binding'
,
method
:
'post'
,
data
:
data
})
}
// 批量新增托盘绑定的设备列
export
function
batchAdd
(
data
)
{
return
request
({
url
:
'/palletDevice/binding/batchAdd'
,
method
:
'post'
,
data
:
data
})
}
// 修改托盘绑定的设备列
export
function
updateBinding
(
data
)
{
return
request
({
url
:
'/palletDevice/binding'
,
method
:
'put'
,
data
:
data
})
}
// 修改托盘绑定的设备列
export
function
batchUpdateDeviceCode
(
data
)
{
return
request
({
url
:
'/palletDevice/binding/batchUpdateDeviceCode'
,
method
:
'post'
,
data
:
data
})
}
// 删除托盘绑定的设备列
export
function
delBinding
(
palletDeviceBindingId
)
{
return
request
({
url
:
'/palletDevice/binding/'
+
palletDeviceBindingId
,
method
:
'delete'
})
}
// 导出托盘绑定的设备列
export
function
exportBinding
(
query
)
{
return
request
({
url
:
'/palletDevice/binding/export'
,
method
:
'get'
,
params
:
query
})
}
zhmes-agecal-web/src/views/screen/components/AgingCabinetBoard.vue
View file @
858fc493
...
...
@@ -59,43 +59,43 @@ export default {
return
{
// 示例数据格式,实际从后端获取
cabinets
:
[
//
{ id: 1, deviceStatus: '1' },
//
{ id: 2, deviceStatus: '2' },
//
{ id: 3, deviceStatus: '0' },
//
{ id: 4, deviceStatus: '0' },
//
{ id: 5, deviceStatus: '0' },
//
{ id: 6, deviceStatus: '0' },
//
{ id: 7, deviceStatus: '0' },
//
{ id: 8, deviceStatus: '0' },
//
{ id: 9, deviceStatus: '0' },
//
{ id: 10, deviceStatus: '0' },
//
{ id: 11, deviceStatus: '0' },
//
{ id: 12, deviceStatus: '0' },
//
{ id: 13, deviceStatus: '0' },
//
{ id: 14, deviceStatus: '0' },
//
{ id: 15, deviceStatus: '0' },
//
{ id: 16, deviceStatus: '0' },
//
{ id: 17, deviceStatus: '0' },
//
{ id: 18, deviceStatus: '0' },
//
{ id: 19, deviceStatus: '0' },
//
{ id: 20, deviceStatus: '0' },
//
{ id: 21, deviceStatus: '0' },
//
{ id: 22, deviceStatus: '0' },
//
{ id: 23, deviceStatus: '0' },
//
{ id: 24, deviceStatus: '0' },
//
{ id: 25, deviceStatus: '0' },
//
{ id: 26, deviceStatus: '0' },
//
{ id: 27, deviceStatus: '0' },
//
{ id: 28, deviceStatus: '0' },
//
{ id: 29, deviceStatus: '0' },
//
{ id: 30, deviceStatus: '0' },
//
{ id: 31, deviceStatus: '0' },
//
{ id: 32, deviceStatus: '0' },
//
{ id: 33, deviceStatus: '0' },
//
{ id: 34, deviceStatus: '0' },
//
{ id: 35, deviceStatus: '0' },
//
{ id: 36, deviceStatus: '0' },
//
...共36个
{
id
:
1
,
deviceStatus
:
'1'
},
{
id
:
2
,
deviceStatus
:
'2'
},
{
id
:
3
,
deviceStatus
:
'0'
},
{
id
:
4
,
deviceStatus
:
'0'
},
{
id
:
5
,
deviceStatus
:
'0'
},
{
id
:
6
,
deviceStatus
:
'0'
},
{
id
:
7
,
deviceStatus
:
'0'
},
{
id
:
8
,
deviceStatus
:
'0'
},
{
id
:
9
,
deviceStatus
:
'0'
},
{
id
:
10
,
deviceStatus
:
'0'
},
{
id
:
11
,
deviceStatus
:
'0'
},
{
id
:
12
,
deviceStatus
:
'0'
},
{
id
:
13
,
deviceStatus
:
'0'
},
{
id
:
14
,
deviceStatus
:
'0'
},
{
id
:
15
,
deviceStatus
:
'0'
},
{
id
:
16
,
deviceStatus
:
'0'
},
{
id
:
17
,
deviceStatus
:
'0'
},
{
id
:
18
,
deviceStatus
:
'0'
},
{
id
:
19
,
deviceStatus
:
'0'
},
{
id
:
20
,
deviceStatus
:
'0'
},
{
id
:
21
,
deviceStatus
:
'0'
},
{
id
:
22
,
deviceStatus
:
'0'
},
{
id
:
23
,
deviceStatus
:
'0'
},
{
id
:
24
,
deviceStatus
:
'0'
},
{
id
:
25
,
deviceStatus
:
'0'
},
{
id
:
26
,
deviceStatus
:
'0'
},
{
id
:
27
,
deviceStatus
:
'0'
},
{
id
:
28
,
deviceStatus
:
'0'
},
{
id
:
29
,
deviceStatus
:
'0'
},
{
id
:
30
,
deviceStatus
:
'0'
},
{
id
:
31
,
deviceStatus
:
'0'
},
{
id
:
32
,
deviceStatus
:
'0'
},
{
id
:
33
,
deviceStatus
:
'0'
},
{
id
:
34
,
deviceStatus
:
'0'
},
{
id
:
35
,
deviceStatus
:
'0'
},
{
id
:
36
,
deviceStatus
:
'0'
},
//...共36个
],
// 状态对应的颜色类名
statusMap
:
{
...
...
@@ -118,12 +118,13 @@ export default {
}
},
mounted
()
{
this
.
testAgingCabinetAndPowerCheck
();
//
this.testAgingCabinetAndPowerCheck();
},
methods
:
{
handleCardClick
(
item
)
{
// 触发事件传递 cabinetId 给父组件
this
.
$emit
(
'cabinet-click'
,
item
);
// 3 是 AgingLayer 组件的索引
this
.
$emit
(
'cabinet-click'
,
item
,
3
);
},
getTooltipContent
(
item
)
{
switch
(
item
.
deviceStatus
)
{
...
...
zhmes-agecal-web/src/views/screen/components/AgingLayer.vue
View file @
858fc493
...
...
@@ -226,7 +226,7 @@ export default {
// 返回老化柜看板
goBack
()
{
this
.
$emit
(
'go-back'
);
this
.
$emit
(
'go-back'
,
0
);
},
// 选择层
...
...
zhmes-agecal-web/src/views/screen/components/TrayBinding.vue
View file @
858fc493
This diff is collapsed.
Click to expand it.
zhmes-agecal-web/src/views/screen/components/TrayInformation.vue
View file @
858fc493
This diff is collapsed.
Click to expand it.
zhmes-agecal-web/src/views/screen/index.vue
View file @
858fc493
...
...
@@ -79,7 +79,8 @@ export default {
{
icon
:
'📷'
,
text
:
'老化柜看板'
,
component
:
'AgingCabinetBoard'
},
{
icon
:
'📊'
,
text
:
'托盘信息'
,
component
:
'TrayInformation'
},
{
icon
:
'📦'
,
text
:
'实时数据'
,
component
:
'RealTimeData'
},
{
icon
:
'🔍'
,
text
:
'老化层详情'
,
component
:
'AgingLayer'
}
// 新增菜单项
{
icon
:
'🔍'
,
text
:
'老化层详情'
,
component
:
'AgingLayer'
},
// 新增菜单项,
{
icon
:
'🔍'
,
text
:
'托盘与设备绑定'
,
component
:
'TrayBinding'
}
// 新增菜单项
],
modbusDeviceData
:
null
// 存储传递的柜子ID
}
...
...
@@ -92,16 +93,17 @@ export default {
},
methods
:
{
// 处理返回事件
handleGoBack
()
{
handleGoBack
(
selectedMenu
)
{
// 返回老化柜看板(菜单索引 0)
this
.
selectedMenu
=
0
;
// 返回托盘信息列表 菜单索引 3
this
.
selectedMenu
=
selectedMenu
;
this
.
modbusDeviceData
=
null
;
},
// 接收从 AgingCabinetBoard 传递的柜子ID
handleCabinetClick
(
modbusDeviceData
)
{
handleCabinetClick
(
modbusDeviceData
,
selectedMenu
)
{
this
.
modbusDeviceData
=
modbusDeviceData
;
// 切换到 AgingLayer 组件(对应菜单索引 3)
this
.
selectedMenu
=
3
;
this
.
selectedMenu
=
selectedMenu
;
},
selectMenu
(
index
)
{
// if(index === 3) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment