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
f5e76a8f
Commit
f5e76a8f
authored
Jan 14, 2025
by
温志超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新生产排产BUG
parent
5b683e6f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
11 deletions
+25
-11
ProTaskVo.java
mes/src/main/java/com/ximai/mes/pro/domain/vo/ProTaskVo.java
+8
-0
ProTaskServiceImpl.java
...m/ximai/mes/pro/service/impl/task/ProTaskServiceImpl.java
+17
-11
No files found.
mes/src/main/java/com/ximai/mes/pro/domain/vo/ProTaskVo.java
View file @
f5e76a8f
...
@@ -5,6 +5,7 @@ import com.ximai.common.annotation.Excel;
...
@@ -5,6 +5,7 @@ import com.ximai.common.annotation.Excel;
import
com.ximai.common.core.domain.BaseEntity
;
import
com.ximai.common.core.domain.BaseEntity
;
import
com.ximai.mes.pro.domain.task.ProTaskWorkunit
;
import
com.ximai.mes.pro.domain.task.ProTaskWorkunit
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
...
@@ -270,6 +271,13 @@ public class ProTaskVo extends BaseEntity {
...
@@ -270,6 +271,13 @@ public class ProTaskVo extends BaseEntity {
*/
*/
private
Long
idx
;
private
Long
idx
;
@ApiModelProperty
(
"标准工时"
)
private
BigDecimal
stdWorkingTime
;
/**
* 工时单位
*/
private
String
stdWorkingTimeUom
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
ProTaskWorkunit
taskWorkunit
;
private
ProTaskWorkunit
taskWorkunit
;
...
...
mes/src/main/java/com/ximai/mes/pro/service/impl/task/ProTaskServiceImpl.java
View file @
f5e76a8f
...
@@ -1205,7 +1205,7 @@ public class ProTaskServiceImpl implements IProTaskService {
...
@@ -1205,7 +1205,7 @@ public class ProTaskServiceImpl implements IProTaskService {
calPlanWorkunitQuery
.
orderByAsc
(
"start_date"
);
calPlanWorkunitQuery
.
orderByAsc
(
"start_date"
);
//查询可用工作日历
//查询可用工作日历
List
<
CalPlanWorkunit
>
list
=
calPlanWorkunitService
.
selectListWithSchedule
(
calPlanWorkunitQuery
);
List
<
CalPlanWorkunit
>
list
=
calPlanWorkunitService
.
selectListWithSchedule
(
calPlanWorkunitQuery
);
if
(
insertTaskWorkunit
.
getStdWorkingTime
()
!=
null
&&
insertTaskWorkunit
.
getStdWorkingTime
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
&&
insertTaskWorkunit
.
getStdWorkingTimeUom
()
!=
null
&&
list
.
size
()
<
1
){
if
(
insertTaskWorkunit
.
getStdWorkingTime
()
!=
null
&&
insertTaskWorkunit
.
getStdWorkingTime
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
&&
insertTaskWorkunit
.
getStdWorkingTimeUom
()
!=
null
){
Long
endData
=
0L
;
Long
endData
=
0L
;
if
(
insertTaskWorkunit
.
getStdWorkingTimeUom
().
equals
(
"HOUR"
)){
if
(
insertTaskWorkunit
.
getStdWorkingTimeUom
().
equals
(
"HOUR"
)){
endData
=
insertTaskWorkunit
.
getStdWorkingTime
().
multiply
(
new
BigDecimal
(
1000
*
60
*
60
)).
multiply
(
splitQuantityConst
).
longValue
();
endData
=
insertTaskWorkunit
.
getStdWorkingTime
().
multiply
(
new
BigDecimal
(
1000
*
60
*
60
)).
multiply
(
splitQuantityConst
).
longValue
();
...
@@ -1214,19 +1214,25 @@ public class ProTaskServiceImpl implements IProTaskService {
...
@@ -1214,19 +1214,25 @@ public class ProTaskServiceImpl implements IProTaskService {
}
else
if
(
insertTaskWorkunit
.
getStdWorkingTimeUom
().
equals
(
"SECOND"
)){
}
else
if
(
insertTaskWorkunit
.
getStdWorkingTimeUom
().
equals
(
"SECOND"
)){
endData
=
insertTaskWorkunit
.
getStdWorkingTime
().
multiply
(
new
BigDecimal
(
1000
)).
multiply
(
splitQuantityConst
).
longValue
();
endData
=
insertTaskWorkunit
.
getStdWorkingTime
().
multiply
(
new
BigDecimal
(
1000
)).
multiply
(
splitQuantityConst
).
longValue
();
}
}
insertTaskWorkunit
.
setScheduleStartDate
(
list
.
get
(
0
).
getStartDate
());
if
(
endData
!=
0
){
if
(
endData
!=
0
){
for
(
CalPlanWorkunit
calPlanWorkunit
:
list
){
if
(
list
.
size
()
>
0
){
if
((
calPlanWorkunit
.
getEndDate
().
getTime
()
-
calPlanWorkunit
.
getStartDate
().
getTime
())
>
endData
){
insertTaskWorkunit
.
setScheduleStartDate
(
list
.
get
(
0
).
getStartDate
());
insertTaskWorkunit
.
setScheduleEndDate
(
new
Date
(
calPlanWorkunit
.
getStartDate
().
getTime
()
+
endData
));
for
(
CalPlanWorkunit
calPlanWorkunit
:
list
){
}
else
{
if
((
calPlanWorkunit
.
getEndDate
().
getTime
()
-
calPlanWorkunit
.
getStartDate
().
getTime
())
>
endData
){
endData
=
endData
-
(
calPlanWorkunit
.
getEndDate
().
getTime
()
-
calPlanWorkunit
.
getStartDate
().
getTime
());
insertTaskWorkunit
.
setScheduleEndDate
(
new
Date
(
calPlanWorkunit
.
getStartDate
().
getTime
()
+
endData
));
}
else
{
endData
=
endData
-
(
calPlanWorkunit
.
getEndDate
().
getTime
()
-
calPlanWorkunit
.
getStartDate
().
getTime
());
}
}
}
if
(
endData
>
0
){
//不够用
insertTaskWorkunit
.
setScheduleEndDate
(
new
Date
(
list
.
get
(
list
.
size
()
-
1
).
getEndDate
().
getTime
()
+
endData
));
}
}
else
{
insertTaskWorkunit
.
setScheduleEndDate
(
new
Date
(
insertTaskWorkunit
.
getScheduleStartDate
().
getTime
()
+
endData
));
}
}
if
(
endData
>
0
){
//不够用
insertTaskWorkunit
.
setScheduleEndDate
(
new
Date
(
list
.
get
(
list
.
size
()
-
1
).
getEndDate
().
getTime
()
+
endData
));
}
}
else
{
}
else
{
insertTaskWorkunit
.
setScheduleEndDate
(
insertTaskWorkunit
.
getScheduleStartDate
());
insertTaskWorkunit
.
setScheduleEndDate
(
insertTaskWorkunit
.
getScheduleStartDate
());
}
}
...
...
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