Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
750c8576
Commit
750c8576
authored
Apr 23, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_upgrade' of
http://172.16.10.76/station/YeeAmosFireAutoSysRoot
into dev_upgrade
parents
7eae0b3f
6a7da135
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
8 deletions
+54
-8
DateUtil.java
...va/com/yeejoin/amos/fas/core/common/request/DateUtil.java
+20
-7
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+10
-0
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+11
-0
IView3dService.java
...ejoin/amos/fas/business/service/intfc/IView3dService.java
+11
-0
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+2
-1
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/core/common/request/DateUtil.java
View file @
750c8576
...
...
@@ -6,14 +6,9 @@ import java.text.ParsePosition;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.GregorianCalendar
;
import
java.util.List
;
import
java.util.Locale
;
import
java.util.Random
;
import
java.util.*
;
import
com.google.gson.JsonObject
;
import
org.apache.commons.lang.StringUtils
;
/**
...
...
@@ -1339,4 +1334,21 @@ public class DateUtil {
return
day
+
"天"
+
hour
+
"小时"
+
min
+
"分钟"
+
sen
+
"秒"
;
}
public
static
Map
<
String
,
Object
>
dayComparePrecise
(
Date
fromDate
,
Date
toDate
){
Map
<
String
,
Object
>
param
=
new
LinkedHashMap
<>();
Calendar
from
=
Calendar
.
getInstance
();
from
.
setTime
(
fromDate
);
Calendar
to
=
Calendar
.
getInstance
();
to
.
setTime
(
toDate
);
int
fromYear
=
from
.
get
(
Calendar
.
YEAR
);
int
fromDay
=
from
.
get
(
Calendar
.
DAY_OF_YEAR
);
int
toYear
=
to
.
get
(
Calendar
.
YEAR
);
int
toDay
=
to
.
get
(
Calendar
.
DAY_OF_YEAR
);
int
year
=
toYear
-
fromYear
;
int
day
=
toDay
-
fromDay
;
param
.
put
(
"year"
,
year
);
param
.
put
(
"day"
,
day
);
return
param
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
750c8576
...
...
@@ -111,4 +111,14 @@ public class View3dController extends BaseController {
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
view3dService
.
getSafetyIndexDetail
(
type
,
orgCode
));
}
@ApiOperation
(
value
=
"查询上线的年日"
,
notes
=
"查询上线年日:10年101"
)
@GetMapping
(
value
=
"/online/date"
)
public
CommonResponse
getSystemOnlineDate
(){
//TODO: 多机构暂时不支持
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
view3dService
.
getSystemOnlineDate
(
orgCode
));
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
750c8576
...
...
@@ -8,6 +8,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
com.alibaba.fastjson.JSONObject
;
import
com.itextpdf.text.pdf.PdfStructTreeController.returnType
;
import
java.math.BigDecimal
;
import
java.util.*
;
...
...
@@ -36,6 +37,7 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -72,6 +74,8 @@ public class View3dServiceImpl implements IView3dService {
private
PatrolMapper
patrolMapper
;
@Autowired
private
IRiskLevelDao
iRiskLevelDao
;
@Value
(
"${param.system.online.date}"
)
private
String
onLineDate
;
...
...
@@ -327,4 +331,11 @@ public class View3dServiceImpl implements IView3dService {
public
List
<
HashMap
<
String
,
Object
>>
getSafetyIndexWeek
(
String
orgCode
)
{
return
view3dMapper
.
getSafetyIndexWeek
(
orgCode
);
}
@Override
public
Map
<
String
,
Object
>
getSystemOnlineDate
(
String
orgCode
)
{
Date
beginDate
=
DateUtil
.
formatDate
(
onLineDate
,
DateUtil
.
DATE_DEFAULT_FORMAT
);
Date
now
=
DateUtil
.
getNow
();
return
DateUtil
.
dayComparePrecise
(
beginDate
,
now
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IView3dService.java
View file @
750c8576
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.fas.business.bo.BindPointBo
;
import
com.yeejoin.amos.fas.business.vo.SafetyIndexDetailVo
;
import
com.yeejoin.amos.fas.business.vo.TodaySafetyIndexVo
;
...
...
@@ -67,4 +68,14 @@ public interface IView3dService {
*/
List
<
HashMap
<
String
,
Object
>>
getSafetyIndexWeek
(
String
orgCode
);
/**
* 查询上线日期时间
* @return eg:10年3月2天
*/
/**
* 查询上线日期时间
* @param orgCode :登录机构
* @return eg:10年3月2天
*/
Map
<
String
,
Object
>
getSystemOnlineDate
(
String
orgCode
);
}
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
750c8576
...
...
@@ -36,7 +36,8 @@ logging.level.com.yeejoin.amos.fas.business.dao.mapper=debug
#liquibase
spring.liquibase.change-log
=
classpath:/db/changelog/changelog-master.xml
spring.liquibase.enabled
=
false
spring.liquibase.enabled
=
true
param.system.online.date
=
2020-02-12
visual.fegin.name
=
maas-visual
spring.http.multipart.maxFileSize
=
10480000
...
...
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