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
a7d72f97
Commit
a7d72f97
authored
Dec 03, 2025
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 解绑界面 判断异常设备状态 除了设备状态 再 加上 时间运行状态 写时间状态 实时AD状态 标定状态
2 实时数据界面 查询 调整。 3 提交绑定 判断 已绑定的 和 刚绑定的 时候有重复。
parent
a968586c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
1 deletion
+44
-1
PalletDeviceBindingMapper.java
...a/com/zehong/system/mapper/PalletDeviceBindingMapper.java
+2
-0
PalletDeviceBindingServiceImpl.java
...g/system/service/impl/PalletDeviceBindingServiceImpl.java
+29
-0
PalletDeviceBindingMapper.xml
...ain/resources/mapper/system/PalletDeviceBindingMapper.xml
+9
-1
TrayBinding.vue
zhmes-agecal-web/src/views/screen/components/TrayBinding.vue
+4
-0
No files found.
zhmes-agecal-system/src/main/java/com/zehong/system/mapper/PalletDeviceBindingMapper.java
View file @
a7d72f97
...
...
@@ -60,6 +60,8 @@ public interface PalletDeviceBindingMapper
public
int
batchInsertPalletDeviceBinding
(
@Param
(
"palletDeviceBindingList"
)
List
<
PalletDeviceBinding
>
palletDeviceBindingList
);
public
int
checkRepeat
(
@Param
(
"validDeviceCodes"
)
List
<
String
>
validDeviceCodes
);
/**
* 修改托盘绑定的设备列
*
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/PalletDeviceBindingServiceImpl.java
View file @
a7d72f97
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.utils.DateUtils
;
...
...
@@ -123,6 +124,20 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi
*/
@Override
public
List
<
PalletDeviceBinding
>
batchInsertPalletDeviceBinding
(
List
<
PalletDeviceBinding
>
palletDeviceBindingList
)
{
check
(
palletDeviceBindingList
);
// 获取所有不为空的 deviceCode
List
<
String
>
validDeviceCodes
=
palletDeviceBindingList
.
stream
()
.
filter
(
item
->
StringUtils
.
isNotBlank
(
item
.
getDeviceCode
()))
.
map
(
PalletDeviceBinding:
:
getDeviceCode
)
.
collect
(
Collectors
.
toList
());
int
i1
=
palletDeviceBindingMapper
.
checkRepeat
(
validDeviceCodes
);
if
(
i1
>
0
)
{
throw
new
RuntimeException
(
"有重复绑定设备码"
);
}
palletDeviceBindingList
.
forEach
(
palletDeviceBinding
->
{
palletDeviceBinding
.
setUpdateTime
(
DateUtils
.
getNowDate
());
palletDeviceBinding
.
setCreateTime
(
DateUtils
.
getNowDate
());
...
...
@@ -142,6 +157,7 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi
@Override
public
int
batchUpdateDeviceCode
(
List
<
PalletDeviceBinding
>
palletDeviceBindingList
)
{
check
(
palletDeviceBindingList
);
palletDeviceBindingList
.
forEach
(
palletDeviceBinding
->
{
palletDeviceBinding
.
setStatus
(
"1"
);
palletDeviceBinding
.
setUpdateTime
(
DateUtils
.
getNowDate
());
...
...
@@ -152,6 +168,19 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi
return
palletDeviceBindingMapper
.
batchUpdateDeviceCode
(
palletDeviceBindingList
);
}
private
void
check
(
List
<
PalletDeviceBinding
>
palletDeviceBindingList
)
{
if
(
palletDeviceBindingList
==
null
||
palletDeviceBindingList
.
size
()
==
0
)
{
throw
new
RuntimeException
(
"数据不能为空"
);
}
boolean
b
=
palletDeviceBindingList
.
stream
().
allMatch
(
item
->
StringUtils
.
isBlank
(
item
.
getDeviceCode
()));
if
(
b
)
{
throw
new
RuntimeException
(
"不能所有设备号都为空!!!"
);
}
}
@Override
public
int
batchUpdateDeviceCodeAndUnbindingTime
(
List
<
PalletDeviceBinding
>
palletDeviceBindingList
)
{
palletDeviceBindingList
.
forEach
(
palletDeviceBinding
->
{
...
...
zhmes-agecal-system/src/main/resources/mapper/system/PalletDeviceBindingMapper.xml
View file @
a7d72f97
...
...
@@ -90,7 +90,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include
refid=
"selectPalletDeviceBindingVo"
/>
<where>
<if
test=
"trayId != null "
>
and palDeviceBinding.f_tray_id = #{trayId}
</if>
<if
test=
"deviceCode != null and deviceCode != ''"
>
and palDeviceBinding.f_device_code = #{deviceCode}
</if>
<if
test=
"deviceCode != null and deviceCode != ''"
>
and palDeviceBinding.f_device_code like concat('%',#{deviceCode},'%')
</if>
<if
test=
"fTrayCode != null and fTrayCode != ''"
>
and trayInfo.f_tray_code like concat('%',#{fTrayCode},'%')
</if>
<if
test=
"row != null "
>
and palDeviceBinding.f_row = #{row}
</if>
<if
test=
"col != null "
>
and palDeviceBinding.f_col = #{col}
</if>
<if
test=
"index != null "
>
and palDeviceBinding.f_index = #{index}
</if>
...
...
@@ -155,6 +156,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select
id=
"checkRepeat"
parameterType=
"list"
resultType=
"int"
>
select count(1) from t_pallet_device_binding palDeviceBinding
where palDeviceBinding.f_device_code in
<foreach
item=
"item"
collection=
"validDeviceCodes"
index=
"index"
separator=
","
>
#{item}
</foreach>
</select>
<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,
f_create_time,f_status)
...
...
zhmes-agecal-web/src/views/screen/components/TrayBinding.vue
View file @
a7d72f97
...
...
@@ -278,6 +278,10 @@ export default {
if
(
this
.
trayStatus
===
'3'
)
{
this
.
abnormalCount
=
this
.
devices
.
filter
(
d
=>
d
.
deviceCode
&&
d
.
status
!==
'1'
&&
d
.
realTimeStatus
===
'0'
&&
d
.
calibrationConcentrationStatus
!==
'4'
&&
d
.
writeTimeStatus
===
'0'
&&
d
.
runTimeStatus
===
'0'
).
length
;
this
.
initialAbnormalCount
=
this
.
abnormalCount
;
}
...
...
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