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
b805f280
Commit
b805f280
authored
Jan 26, 2026
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 解绑时 同步计算 老化这边的标检单上的 合格数量 与 不合格数量
parent
075df140
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
0 deletions
+38
-0
ProductStandardInspectionMapper.java
...zehong/system/mapper/ProductStandardInspectionMapper.java
+2
-0
PalletDeviceBindingServiceImpl.java
...g/system/service/impl/PalletDeviceBindingServiceImpl.java
+32
-0
ProductStandardInspectionMapper.xml
...sources/mapper/system/ProductStandardInspectionMapper.xml
+4
-0
No files found.
zhmes-agecal-system/src/main/java/com/zehong/system/mapper/ProductStandardInspectionMapper.java
View file @
b805f280
...
...
@@ -20,6 +20,8 @@ public interface ProductStandardInspectionMapper
*/
public
ProductStandardInspection
selectProductStandardInspectionById
(
Long
productStandardInspectionId
);
public
ProductStandardInspection
selectByProductStandardInspectionNumber
(
String
productStandardInspectionNumber
);
public
ProductStandardInspection
selectByNumber
(
String
number
);
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/PalletDeviceBindingServiceImpl.java
View file @
b805f280
...
...
@@ -10,6 +10,7 @@ import com.zehong.common.utils.StringUtils;
import
com.zehong.common.utils.http.HttpUtils
;
import
com.zehong.system.domain.*
;
import
com.zehong.system.mapper.PalletDeviceBindingMapper
;
import
com.zehong.system.mapper.ProductStandardInspectionMapper
;
import
com.zehong.system.mapper.TTrayInfoMapper
;
import
com.zehong.system.service.*
;
import
org.springframework.stereotype.Service
;
...
...
@@ -46,6 +47,9 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi
@Resource
private
TTrayInfoMapper
tTrayInfoMapper
;
@Resource
private
ProductStandardInspectionMapper
productStandardInspectionMapper
;
/**
* 查询托盘绑定的设备列
*
...
...
@@ -319,6 +323,34 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi
List
<
PalletDeviceBinding
>
mesDeviceDomains
=
palletDeviceBindings
.
stream
().
filter
(
item
->
item
.
getMotherboardCode
()
!=
null
).
collect
(
Collectors
.
toList
());
if
(
mesDeviceDomains
.
size
()
==
0
)
return
;
String
productStandardInspectionNumber
=
mesDeviceDomains
.
get
(
0
).
getProductStandardInspectionNumber
();
if
(
StringUtils
.
isBlank
(
productStandardInspectionNumber
))
{
throw
new
RuntimeException
(
"产品标准检验编号不能为空"
);
}
ProductStandardInspection
productStandardInspection
=
productStandardInspectionMapper
.
selectByProductStandardInspectionNumber
(
productStandardInspectionNumber
);
if
(
productStandardInspection
==
null
)
{
throw
new
RuntimeException
(
"标检单不存在"
);
}
// 统计合格数量 (1)
long
qualifiedCount
=
mesDeviceDomains
.
stream
()
.
filter
(
device
->
"1"
.
equals
(
device
.
getStandardInspectResult
()))
.
count
();
// 统计不合格数量 (0)
long
unqualifiedCount
=
mesDeviceDomains
.
stream
()
.
filter
(
device
->
"0"
.
equals
(
device
.
getStandardInspectResult
()))
.
count
();
productStandardInspection
.
setQualifiedNum
(
qualifiedCount
+
productStandardInspection
.
getQualifiedNum
());
productStandardInspection
.
setUnQualifiedNum
(
unqualifiedCount
+
productStandardInspection
.
getUnQualifiedNum
());
if
(
productStandardInspection
.
getQualifiedNum
()
>=
productStandardInspection
.
getQuantity
())
{
productStandardInspection
.
setStatus
(
"STANDARD_INSPECTION_COMPLETED"
);
}
productStandardInspectionMapper
.
updateProductStandardInspection
(
productStandardInspection
);
// 20251210 领导说 先 保存所有历史数据
palletDeviceUploadHistoryService
.
batchInsertRealTimeData
(
mesDeviceDomains
);
...
...
zhmes-agecal-system/src/main/resources/mapper/system/ProductStandardInspectionMapper.xml
View file @
b805f280
...
...
@@ -73,6 +73,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include
refid=
"selectProductStandardInspectionVo"
/>
where f_product_standard_inspection_id = #{productStandardInspectionId}
</select>
<select
id=
"selectByProductStandardInspectionNumber"
parameterType=
"string"
resultMap=
"ProductStandardInspectionResult"
>
<include
refid=
"selectProductStandardInspectionVo"
/>
where f_product_standard_inspection_number = #{productStandardInspectionNumber}
</select>
<select
id=
"selectByNumber"
parameterType=
"string"
resultMap=
"ProductStandardInspectionResult"
>
<include
refid=
"selectProductStandardInspectionVo"
/>
where f_product_standard_inspection_number = #{productStandardInspectionNumber}
...
...
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