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
3a79e021
Commit
3a79e021
authored
Nov 09, 2024
by
李驰骋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
看板BUG修复
parent
3d89a915
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
KanbanTaskService.java
.../java/com/ximai/mes/kanban/service/KanbanTaskService.java
+11
-8
No files found.
mes/src/main/java/com/ximai/mes/kanban/service/KanbanTaskService.java
View file @
3a79e021
...
...
@@ -2,6 +2,7 @@ package com.ximai.mes.kanban.service;
import
cn.hutool.core.util.ArrayUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.ximai.common.utils.data.StringUtils
;
import
com.ximai.mes.constant.TaskWorkunitStatusEnum
;
import
com.ximai.mes.kanban.dto.task.TaskStatDto
;
import
com.ximai.mes.pro.domain.ProFeedback
;
...
...
@@ -105,16 +106,15 @@ public class KanbanTaskService {
//工序任务计划结束时间为当月的工序任务单总数
processMonthlyIndexDto
.
setMonthPlanQuantity
(
processMonthlyIndexDto
.
getMonthPlanQuantity
().
add
(
s
.
getQuantity
()));
//获取工序任务计划结束时间为当月 任务状态为完工的工序任务单数量
if
(
s
.
getStatus
().
equals
(
TaskWorkunitStatusEnum
.
FINISHED
.
getStatus
()))
{
processMonthlyIndexDto
.
setActualFinishQuantity
(
processMonthlyIndexDto
.
getActualFinishQuantity
().
add
(
s
.
getQuantityQualify
()));
}
processMonthlyIndexDto
.
setActualFinishQuantity
(
processMonthlyIndexDto
.
getActualFinishQuantity
().
add
(
s
.
getQuantityProduced
()));
//是否存在超期报工
List
<
ProFeedbackDto
>
feedbackList
=
feedbackDtoMap2
.
getOrDefault
(
s
.
getTaskWorkunitId
(),
new
ArrayList
<>());
for
(
ProFeedbackDto
feedbackDto:
feedbackList
){
if
(
feedbackDto
.
getFeedbackTime
().
compareTo
(
s
.
getScheduleEndDate
())>
0
){
//报工时间大于计划结束时间工序任务单数量
(如果工序任务出现多次超期报工 这种只计算1次 )
processMonthlyIndexDto
.
setExpireFinishQuantity
(
processMonthlyIndexDto
.
getExpireFinishQuantity
()
.
add
(
feedbackDto
.
getQuantityQualify
()));
break
;
//报工时间大于计划结束时间工序任务单数量
processMonthlyIndexDto
.
setExpireFinishQuantity
(
processMonthlyIndexDto
.
getExpireFinishQuantity
()
.
add
(
feedbackDto
.
getQuantityQualify
().
add
(
feedbackDto
.
getQuantityUnqualify
())))
;
}
}
if
(
s
.
getActualEndDate
()!=
null
&&
s
.
getActualEndDate
().
compareTo
(
s
.
getScheduleEndDate
())>
0
){
...
...
@@ -156,7 +156,7 @@ public class KanbanTaskService {
feedbackDtoMap1
.
forEach
((
k
,
v
)->{
v
.
forEach
(
s
->{
qualifiedRatioNumerator
.
set
(
qualifiedRatioNumerator
.
get
().
add
(
s
.
getQuantityQualify
()));
qualifiedRatioDenominator
.
set
(
qualifiedRatioDenominator
.
get
().
add
(
s
.
getQuantity
Feedback
(
)));
qualifiedRatioDenominator
.
set
(
qualifiedRatioDenominator
.
get
().
add
(
s
.
getQuantity
Qualify
().
add
(
s
.
getQuantityUnqualify
()
)));
});
});
if
(
qualifiedRatioNumerator
.
get
().
compareTo
(
BigDecimal
.
ZERO
)!=
0
)
{
...
...
@@ -197,7 +197,7 @@ public class KanbanTaskService {
AtomicReference
<
BigDecimal
>
qualifiedRateDenominator
=
new
AtomicReference
<>(
BigDecimal
.
ZERO
);
//当月报工数量
v
.
forEach
(
s
->{
qualifiedRateNumerator
.
set
(
qualifiedRateNumerator
.
get
().
add
(
s
.
getQuantityQualify
()));
qualifiedRateDenominator
.
set
(
qualifiedRateDenominator
.
get
().
add
(
s
.
getQuantity
Feedback
(
)));
qualifiedRateDenominator
.
set
(
qualifiedRateDenominator
.
get
().
add
(
s
.
getQuantity
Qualify
().
add
(
s
.
getQuantityUnqualify
()
)));
});
if
(
qualifiedRateNumerator
.
get
().
compareTo
(
BigDecimal
.
ZERO
)!=
0
)
{
tempLine
.
setQualifiedRate
(
qualifiedRateNumerator
.
get
()
...
...
@@ -214,6 +214,9 @@ public class KanbanTaskService {
//按不合格原因分组
Map
<
String
,
List
<
ProFeedback
>>
feedbackMap
=
feedbackList
.
stream
().
collect
(
Collectors
.
groupingBy
(
s
->
s
.
getAbnormalReason
()));
feedbackMap
.
forEach
((
k
,
v
)->{
if
(
StringUtils
.
isBlank
(
k
)){
return
;
}
TaskStatDto
.
AbnormalCauseStat
tempLine
=
new
TaskStatDto
.
AbnormalCauseStat
();
tempLine
.
setCause
(
k
);
v
.
forEach
(
s
->{
...
...
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