Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
a9be3e64
Commit
a9be3e64
authored
Dec 06, 2022
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复现场物联监控屏-消防水源单位不统一bug
parent
81fee096
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
ConfigureController.java
...m/yeejoin/equipmanage/controller/ConfigureController.java
+17
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/ConfigureController.java
View file @
a9be3e64
...
@@ -25,6 +25,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -25,6 +25,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.math.BigDecimal
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -212,7 +213,22 @@ public class ConfigureController extends AbstractBaseController {
...
@@ -212,7 +213,22 @@ public class ConfigureController extends AbstractBaseController {
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
String
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
return
CommonResponseUtil
.
success
(
fireFightingSystemMapper
.
getWaterInfo
(
page
,
bizOrgCode
,
null
));
Page
<
Map
<
String
,
Object
>>
waterInfo
=
fireFightingSystemMapper
.
getWaterInfo
(
page
,
bizOrgCode
,
null
);
Map
<
String
,
Object
>
unit
=
fireFightingSystemMapper
.
getWaterlevelUnit
();
if
(
"CM"
.
equals
(
unit
.
get
(
"unit"
))
||
"cm"
.
equals
(
unit
.
get
(
"unit"
))
||
"厘米"
.
equals
(
unit
.
get
(
"unit"
))){
for
(
Map
<
String
,
Object
>
record
:
waterInfo
.
getRecords
())
{
BigDecimal
divide
=
new
BigDecimal
(
100
);
if
(!
ObjectUtils
.
isEmpty
(
record
.
get
(
"nowLevel"
))
&&
!
"--"
.
equals
(
record
.
get
(
"nowLevel"
))){
BigDecimal
nowLevel
=
new
BigDecimal
(
String
.
valueOf
(
record
.
get
(
"nowLevel"
)));
record
.
put
(
"nowLevel"
,
nowLevel
.
divide
(
divide
,
2
,
BigDecimal
.
ROUND_HALF_UP
));
}
if
(!
ObjectUtils
.
isEmpty
(
record
.
get
(
"levelAbs"
))
&&
!
"--"
.
equals
(
record
.
get
(
"nowLevel"
))){
BigDecimal
levelAbs
=
new
BigDecimal
(
String
.
valueOf
(
record
.
get
(
"levelAbs"
)));
record
.
put
(
"levelAbs"
,
levelAbs
.
divide
(
divide
,
2
,
BigDecimal
.
ROUND_HALF_UP
));
}
}
}
return
CommonResponseUtil
.
success
(
waterInfo
);
}
}
@PersonIdentify
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
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