Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
indicators
Overview
Overview
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
zhangkb
indicators
Commits
9f95096e
Commit
9f95096e
authored
Jul 29, 2020
by
张祺
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改审批通过生成数据的方法
parent
263a7b93
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
16 deletions
+14
-16
TaskServiceImpl.java
...le/indicators/service/dataenter/impl/TaskServiceImpl.java
+14
-16
No files found.
src/main/java/com/keymobile/indicators/service/dataenter/impl/TaskServiceImpl.java
View file @
9f95096e
...
...
@@ -21,10 +21,7 @@ import com.keymobile.indicators.service.dataenter.TaskRuleService;
import
com.keymobile.indicators.service.dataenter.TaskService
;
import
com.keymobile.indicators.service.hytobacco.BaseIndDataService
;
import
com.keymobile.indicators.service.hytobacco.IndicatorsRelService
;
import
com.keymobile.indicators.utils.DateUtils
;
import
com.keymobile.indicators.utils.IdWorker
;
import
com.keymobile.indicators.utils.LogManager
;
import
com.keymobile.indicators.utils.SystemUserUtil
;
import
com.keymobile.indicators.utils.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -410,24 +407,19 @@ public class TaskServiceImpl implements TaskService {
if
(
task
.
getNeedLast
()
!=
null
)
{
needLast
=
task
.
getNeedLast
();
}
//同期值Map
Map
<
String
,
String
>
lastDataMap
=
new
HashMap
<>();
//本期值Map
Map
<
String
,
String
>
dataMap
=
new
HashMap
<>();
for
(
TaskIndValue
value
:
values
)
{
IndicatorsData
data
=
new
IndicatorsData
();
data
.
setBatchNo
(
task
.
getId
());
data
.
setDataType
(
"double"
);
data
.
setDim2
(
vt
);
data
.
setDim1
(
value
.
getObjId
());
data
.
setIndId
(
value
.
getIndId
());
data
.
setIndDesc
(
value
.
getIndName
());
data
.
setType
(
"1"
);
data
.
setValue
(
value
.
getIndValue
());
data
.
setUnit
(
value
.
getIndUnit
());
data
.
setDim1Desc
(
value
.
getObjName
());
datas
.
add
(
data
);
lastDataMap
.
put
(
value
.
getIndId
(),
value
.
getIndLastValue
());
dataMap
.
put
(
value
.
getIndId
(),
value
.
getIndValue
());
generateIndData
(
task
,
vt
,
lastVt
,
value
,
needLast
,
datas
);
}
TaskRuleGroupObj
groupObj
=
taskRuleObjMapper
.
getById
(
task
.
getGroupId
());
List
<
TaskIndicator
>
needSumInds
=
new
ArrayList
<>();
for
(
TaskIndicator
taskIndicator
:
inds
)
{
if
(
StringUtils
.
isNotBlank
(
taskIndicator
.
getIndFormula
()))
{
needSumInds
.
add
(
taskIndicator
);
...
...
@@ -472,6 +464,12 @@ public class TaskServiceImpl implements TaskService {
value
.
setObjName
(
model
.
getName
());
value
.
setObjType
(
groupObj
.
getObjType
());
value
.
setTaskId
(
task
.
getId
());
if
(
needLast
)
{
String
oldValue
=
CalculateUtils
.
calculateFormula
(
indicator
.
getIndFormula
(),
lastDataMap
);
value
.
setIndLastValue
(
oldValue
);
}
String
nowValue
=
CalculateUtils
.
calculateFormula
(
indicator
.
getIndFormula
(),
dataMap
);
value
.
setIndValue
(
nowValue
);
newValues
.
add
(
value
);
generateIndData
(
task
,
vt
,
lastVt
,
value
,
needLast
,
datas
);
...
...
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