Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
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
platform
hp-smart
Commits
2c5ab4db
Commit
2c5ab4db
authored
Apr 07, 2024
by
wancheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app代码优化
parent
88191fb9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
ServiceHPMT001.java
.../java/com/baosight/hpjx/hp/mt/service/ServiceHPMT001.java
+8
-2
ServiceHPMT002.java
.../java/com/baosight/hpjx/hp/mt/service/ServiceHPMT002.java
+15
-2
No files found.
src/main/java/com/baosight/hpjx/hp/mt/service/ServiceHPMT001.java
View file @
2c5ab4db
...
@@ -103,7 +103,10 @@ public class ServiceHPMT001 extends ServiceBase {
...
@@ -103,7 +103,10 @@ public class ServiceHPMT001 extends ServiceBase {
resultMap
.
put
(
"actualWt_s_qoq"
,
0
);
//实际环比
resultMap
.
put
(
"actualWt_s_qoq"
,
0
);
//实际环比
}
else
{
}
else
{
resultMap
.
put
(
"actualWt_s"
,
row4
.
get
(
0
).
get
(
"actualWt"
));
resultMap
.
put
(
"actualWt_s"
,
row4
.
get
(
0
).
get
(
"actualWt"
));
BigDecimal
actualWt
=
(
BigDecimal
)
row2
.
get
(
0
).
get
(
"actualWt"
);
BigDecimal
actualWt
=
BigDecimal
.
ZERO
;
if
(
row2
.
get
(
0
).
get
(
"actualWt"
)!=
null
){
actualWt
=
(
BigDecimal
)
row2
.
get
(
0
).
get
(
"actualWt"
);
}
BigDecimal
actualWt2
=
(
BigDecimal
)
row4
.
get
(
0
).
get
(
"actualWt"
);
BigDecimal
actualWt2
=
(
BigDecimal
)
row4
.
get
(
0
).
get
(
"actualWt"
);
resultMap
.
put
(
"actualWt_s_qoq"
,
actualWt
.
subtract
(
actualWt2
).
divide
(
actualWt2
,
BigDecimal
.
ROUND_UP
).
resultMap
.
put
(
"actualWt_s_qoq"
,
actualWt
.
subtract
(
actualWt2
).
divide
(
actualWt2
,
BigDecimal
.
ROUND_UP
).
multiply
(
new
BigDecimal
(
100
)).
doubleValue
());
multiply
(
new
BigDecimal
(
100
)).
doubleValue
());
...
@@ -124,7 +127,10 @@ public class ServiceHPMT001 extends ServiceBase {
...
@@ -124,7 +127,10 @@ public class ServiceHPMT001 extends ServiceBase {
resultMap
.
put
(
"actualWt_h_yoy"
,
0
);
//实际同比
resultMap
.
put
(
"actualWt_h_yoy"
,
0
);
//实际同比
}
else
{
}
else
{
resultMap
.
put
(
"actualWt_h"
,
row6
.
get
(
0
).
get
(
"actualWt"
));
resultMap
.
put
(
"actualWt_h"
,
row6
.
get
(
0
).
get
(
"actualWt"
));
BigDecimal
actualWt
=
(
BigDecimal
)
row2
.
get
(
0
).
get
(
"actualWt"
);
BigDecimal
actualWt
=
BigDecimal
.
ZERO
;
if
(
row2
.
get
(
0
).
get
(
"actualWt"
)!=
null
){
actualWt
=
(
BigDecimal
)
row2
.
get
(
0
).
get
(
"actualWt"
);
}
BigDecimal
actualWt2
=
(
BigDecimal
)
row6
.
get
(
0
).
get
(
"actualWt"
);
BigDecimal
actualWt2
=
(
BigDecimal
)
row6
.
get
(
0
).
get
(
"actualWt"
);
resultMap
.
put
(
"actualWt_h_yoy"
,
actualWt
.
subtract
(
actualWt2
).
divide
(
actualWt2
,
BigDecimal
.
ROUND_UP
).
resultMap
.
put
(
"actualWt_h_yoy"
,
actualWt
.
subtract
(
actualWt2
).
divide
(
actualWt2
,
BigDecimal
.
ROUND_UP
).
multiply
(
new
BigDecimal
(
100
)).
doubleValue
());
multiply
(
new
BigDecimal
(
100
)).
doubleValue
());
...
...
src/main/java/com/baosight/hpjx/hp/mt/service/ServiceHPMT002.java
View file @
2c5ab4db
...
@@ -22,6 +22,7 @@ import com.baosight.hpjx.hp.zl.domain.HPZL001A;
...
@@ -22,6 +22,7 @@ import com.baosight.hpjx.hp.zl.domain.HPZL001A;
import
com.baosight.hpjx.util.*
;
import
com.baosight.hpjx.util.*
;
import
com.baosight.iplat4j.common.ed.domain.TEDCM01
;
import
com.baosight.iplat4j.common.ed.domain.TEDCM01
;
import
com.baosight.iplat4j.core.ProjectInfo
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
...
@@ -196,7 +197,14 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -196,7 +197,14 @@ public class ServiceHPMT002 extends ServiceBase {
Map
Map
=
new
HashMap
();
Map
Map
=
new
HashMap
();
Map
.
put
(
"checkId"
,
id
);
Map
.
put
(
"checkId"
,
id
);
Map
.
put
(
"docType"
,
1
);
Map
.
put
(
"docType"
,
1
);
List
<
HPZL001A
>
docIdlist
=
this
.
dao
.
query
(
"HPZL001A.queryRun"
,
Map
);
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
List
<
HPZL001A
>
docIdlist
=
new
ArrayList
<>();
if
(
projectEnv
.
equals
(
"run"
)){
docIdlist
=
this
.
dao
.
query
(
"HPZL001A.queryRun"
,
Map
);
}
else
{
docIdlist
=
this
.
dao
.
query
(
"HPZL001A.queryDev"
,
Map
);
}
List
<
String
>
imgList
=
new
ArrayList
<>();
List
<
String
>
imgList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
docIdlist
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
docIdlist
.
size
();
i
++)
{
HPZL001A
hpzl001A
=
docIdlist
.
get
(
i
);
HPZL001A
hpzl001A
=
docIdlist
.
get
(
i
);
...
@@ -207,7 +215,12 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -207,7 +215,12 @@ public class ServiceHPMT002 extends ServiceBase {
Map
Map2
=
new
HashMap
();
Map
Map2
=
new
HashMap
();
Map2
.
put
(
"checkId"
,
id
);
Map2
.
put
(
"checkId"
,
id
);
Map2
.
put
(
"docType"
,
2
);
Map2
.
put
(
"docType"
,
2
);
List
<
HPZL001A
>
docIdlist2
=
this
.
dao
.
query
(
"HPZL001A.queryRun"
,
Map2
);
List
<
HPZL001A
>
docIdlist2
=
new
ArrayList
<>();
if
(
projectEnv
.
equals
(
"run"
)){
docIdlist2
=
this
.
dao
.
query
(
"HPZL001A.queryRun"
,
Map2
);
}
else
{
docIdlist2
=
this
.
dao
.
query
(
"HPZL001A.queryDev"
,
Map2
);
}
List
<
String
>
imgList2
=
new
ArrayList
<>();
List
<
String
>
imgList2
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
docIdlist2
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
docIdlist2
.
size
();
i
++)
{
HPZL001A
hpzl001A
=
docIdlist2
.
get
(
i
);
HPZL001A
hpzl001A
=
docIdlist2
.
get
(
i
);
...
...
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