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
4ee877ff
Commit
4ee877ff
authored
Mar 14, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024/03/14 调整文件删除
parent
8c782c98
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
0 deletions
+61
-0
CommonConstant.java
.../java/com/baosight/hpjx/core/constant/CommonConstant.java
+9
-0
ServiceHPSC002.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
+17
-0
ServiceHPSC002A.java
...java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002A.java
+18
-0
ServiceHPSC006.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
+17
-0
No files found.
src/main/java/com/baosight/hpjx/core/constant/CommonConstant.java
View file @
4ee877ff
...
@@ -58,4 +58,13 @@ public class CommonConstant {
...
@@ -58,4 +58,13 @@ public class CommonConstant {
public
static
final
String
ROOT
=
"root"
;
public
static
final
String
ROOT
=
"root"
;
}
}
public
static
class
ProjectEnv
{
public
static
final
String
RUN
=
"run"
;
public
static
final
String
DEV
=
"dev"
;
}
}
}
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
View file @
4ee877ff
...
@@ -12,11 +12,13 @@ import com.baosight.hpjx.hp.pz.tools.HPPZTools;
...
@@ -12,11 +12,13 @@ import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import
com.baosight.hpjx.hp.sc.domain.*
;
import
com.baosight.hpjx.hp.sc.domain.*
;
import
com.baosight.hpjx.hp.sc.tools.HPSCTools
;
import
com.baosight.hpjx.hp.sc.tools.HPSCTools
;
import
com.baosight.hpjx.util.*
;
import
com.baosight.hpjx.util.*
;
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
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.soa.XServiceManager
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
...
@@ -758,8 +760,23 @@ public class ServiceHPSC002 extends ServiceBase {
...
@@ -758,8 +760,23 @@ public class ServiceHPSC002 extends ServiceBase {
if
(
list
.
size
()
>
0
)
{
if
(
list
.
size
()
>
0
)
{
for
(
HPDS002
hpds002:
list
)
{
for
(
HPDS002
hpds002:
list
)
{
String
realPath
=
hpds002
.
getRealPath
();
String
realPath
=
hpds002
.
getRealPath
();
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
ProjectEnv
.
RUN
))
{
EiInfo
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"data"
,
realPath
+
"-"
+
0
);
eiInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0105"
);
//调用接口
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
if
(
outInfo
.
getStatus
()
==
EiConstant
.
STATUS_FAILURE
){
LogUtils
.
setDetailMsg
(
outInfo
,
new
Throwable
(),
"查询部件类型失败"
);
outInfo
.
setMsg
(
"失败"
);
}
}
else
{
FileUtils
.
deleteFile
(
realPath
);
FileUtils
.
deleteFile
(
realPath
);
}
}
}
this
.
dao
.
delete
(
HPDS002
.
DELETE
,
map
);
this
.
dao
.
delete
(
HPDS002
.
DELETE
,
map
);
}
}
}
}
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002A.java
View file @
4ee877ff
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
service
;
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
service
;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.ds.domain.HPDS002
;
import
com.baosight.hpjx.hp.ds.domain.HPDS002
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002
;
...
@@ -9,10 +10,12 @@ import com.baosight.hpjx.hp.sc.domain.HPSC006;
...
@@ -9,10 +10,12 @@ import com.baosight.hpjx.hp.sc.domain.HPSC006;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.FileUtils
;
import
com.baosight.hpjx.util.FileUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.iplat4j.core.ProjectInfo
;
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
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.soa.XServiceManager
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.io.File
;
import
java.io.File
;
...
@@ -137,7 +140,22 @@ public class ServiceHPSC002A extends ServiceEPBase {
...
@@ -137,7 +140,22 @@ public class ServiceHPSC002A extends ServiceEPBase {
List
<
HPDS002
>
list
=
this
.
dao
.
query
(
HPDS002
.
QUERY
,
map
);
List
<
HPDS002
>
list
=
this
.
dao
.
query
(
HPDS002
.
QUERY
,
map
);
if
(
list
.
size
()
>
0
)
{
if
(
list
.
size
()
>
0
)
{
String
realPath
=
list
.
get
(
0
).
getRealPath
();
String
realPath
=
list
.
get
(
0
).
getRealPath
();
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
ProjectEnv
.
RUN
))
{
EiInfo
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"data"
,
realPath
+
"-"
+
0
);
eiInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0105"
);
//调用接口
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
if
(
outInfo
.
getStatus
()
==
EiConstant
.
STATUS_FAILURE
){
LogUtils
.
setDetailMsg
(
outInfo
,
new
Throwable
(),
"查询部件类型失败"
);
outInfo
.
setMsg
(
"失败"
);
}
}
else
{
FileUtils
.
deleteFile
(
realPath
);
FileUtils
.
deleteFile
(
realPath
);
}
this
.
dao
.
delete
(
HPDS002
.
DELETE
,
map
);
this
.
dao
.
delete
(
HPDS002
.
DELETE
,
map
);
}
}
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
View file @
4ee877ff
...
@@ -17,11 +17,13 @@ import com.baosight.hpjx.hp.sc.tools.HPSCTools;
...
@@ -17,11 +17,13 @@ import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import
com.baosight.hpjx.hp.xs.domain.Org
;
import
com.baosight.hpjx.hp.xs.domain.Org
;
import
com.baosight.hpjx.hp.xs.tools.HPXSTools
;
import
com.baosight.hpjx.hp.xs.tools.HPXSTools
;
import
com.baosight.hpjx.util.*
;
import
com.baosight.hpjx.util.*
;
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
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.soa.XServiceManager
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -326,8 +328,23 @@ public class ServiceHPSC006 extends ServiceBase {
...
@@ -326,8 +328,23 @@ public class ServiceHPSC006 extends ServiceBase {
if
(
list
.
size
()
>
0
)
{
if
(
list
.
size
()
>
0
)
{
for
(
HPDS002
hpds002:
list
)
{
for
(
HPDS002
hpds002:
list
)
{
String
realPath
=
hpds002
.
getRealPath
();
String
realPath
=
hpds002
.
getRealPath
();
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
ProjectEnv
.
RUN
))
{
EiInfo
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"data"
,
realPath
+
"-"
+
0
);
eiInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0105"
);
//调用接口
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
if
(
outInfo
.
getStatus
()
==
EiConstant
.
STATUS_FAILURE
){
LogUtils
.
setDetailMsg
(
outInfo
,
new
Throwable
(),
"查询部件类型失败"
);
outInfo
.
setMsg
(
"失败"
);
}
}
else
{
FileUtils
.
deleteFile
(
realPath
);
FileUtils
.
deleteFile
(
realPath
);
}
}
}
this
.
dao
.
delete
(
HPDS002
.
DELETE
,
map
);
this
.
dao
.
delete
(
HPDS002
.
DELETE
,
map
);
}
}
}
}
...
...
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