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
882a223a
Commit
882a223a
authored
Aug 05, 2022
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
改bug
parent
0396fa89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
ConfigureController.java
...m/yeejoin/equipmanage/controller/ConfigureController.java
+20
-3
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 @
882a223a
...
@@ -14,6 +14,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -14,6 +14,7 @@ import io.swagger.annotations.ApiOperation;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
@@ -22,6 +23,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...
@@ -22,6 +23,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -173,7 +175,22 @@ public class ConfigureController extends AbstractBaseController {
...
@@ -173,7 +175,22 @@ public class ConfigureController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
null
);
return
CommonResponseUtil
.
success
(
null
);
}
}
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
return
CommonResponseUtil
.
success
(
fireFightingSystemMapper
.
getFireCarInfoByWL
(
page
,
bizOrgCode
));
Page
<
Map
<
String
,
Object
>>
fireCarInfoByWL
=
fireFightingSystemMapper
.
getFireCarInfoByWL
(
page
,
bizOrgCode
);
if
(!
CollectionUtils
.
isEmpty
(
fireCarInfoByWL
.
getRecords
()))
{
List
<
Map
<
String
,
Object
>>
records
=
fireCarInfoByWL
.
getRecords
();
records
.
forEach
(
item
->
{
if
(
item
.
containsKey
(
"carStateDate"
)
&&
!
ObjectUtils
.
isEmpty
(
item
.
get
(
"carStateDate"
)))
{
try
{
Date
carStateDate
=
DateUtils
.
dateParse
(
item
.
get
(
"carStateDate"
).
toString
(),
"yyyy-MM-dd'T'HH:mm:ss"
);
String
s
=
DateUtils
.
dateFormat
(
carStateDate
,
DateUtils
.
DATE_TIME_PATTERN
);
item
.
put
(
"carStateDate"
,
s
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
});
}
return
CommonResponseUtil
.
success
(
fireCarInfoByWL
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -242,7 +259,7 @@ public class ConfigureController extends AbstractBaseController {
...
@@ -242,7 +259,7 @@ public class ConfigureController extends AbstractBaseController {
item
.
put
(
"unNormalNum"
,
(
Integer
)
item
.
get
(
"startAndStopNum"
)
<=
1
?
0
:
1
);
item
.
put
(
"unNormalNum"
,
(
Integer
)
item
.
get
(
"startAndStopNum"
)
<=
1
?
0
:
1
);
Map
<
String
,
String
>
stateMap
=
fireFightingSystemMapper
.
queryPressureNowStateBySpecificId
((
Long
)
item
.
get
(
"id"
));
Map
<
String
,
String
>
stateMap
=
fireFightingSystemMapper
.
queryPressureNowStateBySpecificId
((
Long
)
item
.
get
(
"id"
));
if
(!
ObjectUtils
.
isEmpty
(
stateMap
)
&&
stateMap
.
containsKey
(
"update_date"
)
&&
stateMap
.
containsKey
(
"equipment_index_name"
))
{
if
(!
ObjectUtils
.
isEmpty
(
stateMap
)
&&
stateMap
.
containsKey
(
"update_date"
)
&&
stateMap
.
containsKey
(
"equipment_index_name"
))
{
item
.
put
(
"update_time"
,
stateMap
.
get
(
"update"
));
item
.
put
(
"update_time"
,
stateMap
.
get
(
"update
_date
"
));
item
.
put
(
"equipment_index_name"
,
stateMap
.
get
(
"equipment_index_name"
));
item
.
put
(
"equipment_index_name"
,
stateMap
.
get
(
"equipment_index_name"
));
}
}
return
item
;
return
item
;
...
@@ -303,7 +320,7 @@ public class ConfigureController extends AbstractBaseController {
...
@@ -303,7 +320,7 @@ public class ConfigureController extends AbstractBaseController {
item
.
put
(
"unNormalNum"
,
(
Integer
)
item
.
get
(
"startAndStopNum"
)
<=
1
?
0
:
1
);
item
.
put
(
"unNormalNum"
,
(
Integer
)
item
.
get
(
"startAndStopNum"
)
<=
1
?
0
:
1
);
Map
<
String
,
String
>
stateMap
=
fireFightingSystemMapper
.
queryPressureNowStateBySpecificId
((
Long
)
item
.
get
(
"id"
));
Map
<
String
,
String
>
stateMap
=
fireFightingSystemMapper
.
queryPressureNowStateBySpecificId
((
Long
)
item
.
get
(
"id"
));
if
(!
ObjectUtils
.
isEmpty
(
stateMap
)
&&
stateMap
.
containsKey
(
"update_date"
)
&&
stateMap
.
containsKey
(
"equipment_index_name"
))
{
if
(!
ObjectUtils
.
isEmpty
(
stateMap
)
&&
stateMap
.
containsKey
(
"update_date"
)
&&
stateMap
.
containsKey
(
"equipment_index_name"
))
{
item
.
put
(
"update_time"
,
stateMap
.
get
(
"update"
));
item
.
put
(
"update_time"
,
stateMap
.
get
(
"update
_date
"
));
item
.
put
(
"equipment_index_name"
,
stateMap
.
get
(
"equipment_index_name"
));
item
.
put
(
"equipment_index_name"
,
stateMap
.
get
(
"equipment_index_name"
));
}
}
return
item
;
return
item
;
...
...
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