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
e38697c3
Commit
e38697c3
authored
Oct 27, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-10-27 驾驶舱数据同步
parent
7f70d060
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
1 deletions
+50
-1
HPBI003.xml
src/main/java/com/baosight/hpjx/hp/bi/sql/HPBI003.xml
+1
-1
ServiceHPSB002.java
.../java/com/baosight/hpjx/hp/sb/service/ServiceHPSB002.java
+16
-0
HPSB002.xml
src/main/java/com/baosight/hpjx/hp/sb/sql/HPSB002.xml
+33
-0
No files found.
src/main/java/com/baosight/hpjx/hp/bi/sql/HPBI003.xml
View file @
e38697c3
...
@@ -191,7 +191,7 @@
...
@@ -191,7 +191,7 @@
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
left(REGISTER_DATE, 4) = left(#date#, 4)
left(REGISTER_DATE, 4) = left(#date#, 4)
and REGISTER_DATE
<
= #dat
a
#
and REGISTER_DATE
<
= #dat
e
#
</isNotEmpty>
</isNotEmpty>
) as YGL,
) as YGL,
0 as JHCL,
0 as JHCL,
...
...
src/main/java/com/baosight/hpjx/hp/sb/service/ServiceHPSB002.java
View file @
e38697c3
...
@@ -2,10 +2,12 @@ package com.baosight.hpjx.hp.sb.service;
...
@@ -2,10 +2,12 @@ package com.baosight.hpjx.hp.sb.service;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.core.dao.DaoBase
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.sb.domain.HPSB002
;
import
com.baosight.hpjx.hp.sb.domain.HPSB002
;
import
com.baosight.hpjx.hp.sb.domain.HPSB003
;
import
com.baosight.hpjx.hp.sb.domain.HPSB003
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.hpjx.util.ErrorCodeUtils
;
import
com.baosight.hpjx.util.ErrorCodeUtils
;
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
;
...
@@ -14,6 +16,7 @@ import com.baosight.iplat4j.core.exception.PlatException;
...
@@ -14,6 +16,7 @@ import com.baosight.iplat4j.core.exception.PlatException;
import
com.baosight.iplat4j.core.resource.I18nMessages
;
import
com.baosight.iplat4j.core.resource.I18nMessages
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
...
@@ -91,6 +94,7 @@ public class ServiceHPSB002 extends ServiceBase {
...
@@ -91,6 +94,7 @@ public class ServiceHPSB002 extends ServiceBase {
* 修改操作.
* 修改操作.
*/
*/
@OperationLogAnnotation
(
operModul
=
"设备日志"
,
operType
=
"修改"
,
operDesc
=
"修改"
)
@OperationLogAnnotation
(
operModul
=
"设备日志"
,
operType
=
"修改"
,
operDesc
=
"修改"
)
@Override
public
EiInfo
update
(
EiInfo
inInfo
)
{
public
EiInfo
update
(
EiInfo
inInfo
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
try
{
try
{
...
@@ -161,4 +165,16 @@ public class ServiceHPSB002 extends ServiceBase {
...
@@ -161,4 +165,16 @@ public class ServiceHPSB002 extends ServiceBase {
return
inInfo
;
return
inInfo
;
}
}
public
EiInfo
insertHgSb010
(
EiInfo
inInfo
)
{
Map
map
=
new
HashMap
<>();
map
.
put
(
"maxDate"
,
DateUtils
.
formatShort
(
DateUtils
.
shortDate
()));
List
<
HPSB002
>
hpsb002s
=
DaoBase
.
getInstance
().
query
(
"HPSB002.queryMaxDate"
,
map
);
if
(
CollectionUtils
.
isNotEmpty
(
hpsb002s
))
{
for
(
HPSB002
hpsb002:
hpsb002s
)
{
DaoUtils
.
insert
(
"HPSB002.insertHgSb010"
,
hpsb002
);
}
}
return
inInfo
;
}
}
}
src/main/java/com/baosight/hpjx/hp/sb/sql/HPSB002.xml
View file @
e38697c3
...
@@ -193,5 +193,37 @@
...
@@ -193,5 +193,37 @@
SUBSTR(CREATED_TIME,1,8)
<
DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 30 day),'%Y%m%d')
SUBSTR(CREATED_TIME,1,8)
<
DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 30 day),'%Y%m%d')
</delete>
</delete>
<select
id=
"queryMaxDate"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sb.domain.HPSB002"
>
SELECT
FILE_NAME as "fileName",
<!-- 文件名 -->
EQUIPMENT_TYPE as "equipmentType",
<!-- 设备状态 -->
EQUIPMENT_CODE as "equipmentCode",
<!-- 设备编码 -->
LOG_INIVALUE as "logInivalue",
<!-- 初始类容 -->
LOG_VALUE as "logValue",
<!-- 日志类容 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建人名称 -->
CREATED_TIME as "createdTime"
<!-- 创建时间 -->
FROM ${hpjxSchema}.T_HPSB002 WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"maxDate"
>
CREATED_TIME in (select max(CREATED_TIME) from ${hpjxSchema}.T_HPSB002 where 1=1 and left(CREATED_TIME,8) = #maxDate#)
</isNotEmpty>
</select>
<insert
id=
"insertHgSb010"
>
INSERT INTO hggp.HGSB010 (
ACCOUNT_CODE,
FILE_NAME,
<!-- 文件名 -->
EQUIPMENT_TYPE,
<!-- 设备状态 -->
EQUIPMENT_CODE,
<!-- 设备编码 -->
LOG_INIVALUE,
<!-- 初始类容 -->
LOG_VALUE,
<!-- 日志类容 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME
<!-- 创建时间 -->
)
VALUES (#accountCode#, #fileName#, #equipmentType#, #equipmentCode#, #logInivalue#, #logValue#
, #createdBy#, #createdName#, #createdTime#)
</insert>
</sqlMap>
</sqlMap>
\ No newline at end of file
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