Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes
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
ximai
mes
Commits
e91e8c56
Commit
e91e8c56
authored
Jun 18, 2026
by
chicheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工序报工合格数为0异常解决
PC外协排产按计划开始时间倒排
parent
3614a628
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
9 deletions
+20
-9
ProFeedbackServiceImpl.java
...om/ximai/mes/pro/service/impl/ProFeedbackServiceImpl.java
+15
-8
ProTaskWorkunitServiceImpl.java
...mes/pro/service/impl/task/ProTaskWorkunitServiceImpl.java
+5
-1
No files found.
mes/src/main/java/com/ximai/mes/pro/service/impl/ProFeedbackServiceImpl.java
View file @
e91e8c56
...
...
@@ -501,17 +501,17 @@ public class ProFeedbackServiceImpl implements IProFeedbackService {
@Override
public
LinkedHashMap
<
String
,
ProFeedbackSplitInfo
>
taskFeedback
(
ProTask
proTask
,
ProFeedback
mainFeedBackVal
)
{
//可分配合格数量
BigDecimal
quantityFeedback
=
DataUtil
.
getNormalData
(
mainFeedBackVal
.
getQuantityQualify
());
BigDecimal
qualifySize
=
DataUtil
.
getNormalData
(
mainFeedBackVal
.
getQuantityQualify
());
BigDecimal
unQualifySize
=
DataUtil
.
getNormalData
(
mainFeedBackVal
.
getQuantityUnqualify
());
BigDecimal
quantityFeedback
=
qualifySize
.
add
(
unQualifySize
);
Date
normalDate
=
DataUtil
.
getNormalData
(
mainFeedBackVal
.
getStartTime
());
mainFeedBackVal
.
setQuantityUnqualify
(
unQualifySize
);
mainFeedBackVal
.
setTaskCode
(
proTask
.
getTaskCode
());
long
diffInSecond
=
(
DateUtils
.
getNowDate
().
getTime
()
-
normalDate
.
getTime
())
/
(
1000
);
long
itemSecond
=
diffInSecond
/
(
quantityFeedback
.
longValue
()
==
0
?
1
:
quantityFeedback
.
longValue
());
long
totalQty
=
quantityFeedback
.
longValue
();
long
itemSecond
=
diffInSecond
/
(
totalQty
==
0
?
1
:
totalQty
);
String
arrangeCode
=
proTask
.
getArrangeCode
();
QueryWrapper
<
ProWorkorder
>
wrapper
=
new
QueryWrapper
<>();
...
...
@@ -542,7 +542,7 @@ public class ProFeedbackServiceImpl implements IProFeedbackService {
mainFeedBackVal
.
setQuantityFeedback
(
quantityFeedback
);
mainFeedBackVal
.
setQuantityQualify
(
qualifySize
);
mainFeedBackVal
.
setQuantityUnqualify
(
unQualifySize
);
mainFeedBackVal
.
setAttr1
(
"工用时"
+
itemSecond
*
(
quantityFeedback
.
longValue
()
==
0
?
1
:
quantityFeedback
.
longValue
()
)
+
"秒"
);
mainFeedBackVal
.
setAttr1
(
"工用时"
+
itemSecond
*
(
totalQty
==
0
?
1
:
totalQty
)
+
"秒"
);
ProFeedbackSplitInfo
feedbackSplitInfo
=
new
ProFeedbackSplitInfo
();
feedbackSplitInfo
.
setQuantityQualify
(
qualifySize
);
...
...
@@ -562,16 +562,16 @@ public class ProFeedbackServiceImpl implements IProFeedbackService {
}
for
(
ProFeedback
proFeedback
:
splitFeedbackWorkorderList
)
{
double
v
=
proFeedback
.
getQuantityFeedback
().
doubleValue
()
/
feedbackQuantityDouble
;
double
splitBase
=
feedbackQuantityDouble
>
0
?
feedbackQuantityDouble
:
1
;
double
v
=
proFeedback
.
getQuantityFeedback
().
doubleValue
()
/
splitBase
;
double
mtimeSecond
=
machineTime
.
doubleValue
()
*
v
;
double
btimeSecond
=
breakTime
.
doubleValue
()
*
v
;
double
mtimeMin
=
mtimeSecond
/
60
;
double
btimeMin
=
btimeSecond
/
60
;
feedBackTimeMap
.
put
(
"mtimeSecond"
,
mtimeSecond
);
feedBackTimeMap
.
put
(
"btimeSecond"
,
btimeSecond
);
// 发送报工
proFeedback
.
setMachineTime
(
DataUtil
.
getNormalData
(
mtimeMin
,
"0"
));
proFeedback
.
setBreakTime
(
DataUtil
.
getNormalData
(
btimeMin
,
"0"
));
proFeedback
.
setMachineTime
(
formatMachineTimeMinutes
(
mtimeMin
));
proFeedback
.
setBreakTime
(
formatMachineTimeMinutes
(
btimeMin
));
// 保存数据
proFeedback
.
setCreateTime
(
new
Date
());
this
.
insertProFeedback
(
proFeedback
);
...
...
@@ -581,6 +581,13 @@ public class ProFeedbackServiceImpl implements IProFeedbackService {
return
feedbackWorkorderMap
;
}
private
String
formatMachineTimeMinutes
(
double
minutes
)
{
if
(
Double
.
isNaN
(
minutes
)
||
Double
.
isInfinite
(
minutes
)
||
minutes
<
0
)
{
return
"0"
;
}
return
DataUtil
.
getNormalData
(
minutes
,
"0"
);
}
private
void
feedbackUnQuantitySplit
(
List
<
ProFeedback
>
splitFeedbackWorkorderList
,
BigDecimal
unQualifySize
)
{
BigDecimal
unQualifySizeVal
=
BigDecimal
.
valueOf
(
unQualifySize
.
doubleValue
());
if
(
unQualifySize
.
doubleValue
()
>
0
)
{
...
...
mes/src/main/java/com/ximai/mes/pro/service/impl/task/ProTaskWorkunitServiceImpl.java
View file @
e91e8c56
...
...
@@ -465,7 +465,11 @@ public class ProTaskWorkunitServiceImpl implements IProTaskWorkunitService {
query
.
gt
(
"ptw.quantity"
,
0
);
query
.
orderByAsc
(
"schedule_start_date"
);
if
(
proTaskWorkunit
.
getWorkunitId
()
!=
null
)
{
query
.
orderByDesc
(
"ptw.schedule_start_date"
);
}
else
{
query
.
orderByAsc
(
"ptw.schedule_start_date"
);
}
List
<
ProTaskWorkunit
>
list
=
proTaskWorkunitService
.
selectTaskWorkUnitJoinTask
(
query
);
return
list
;
}
...
...
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