Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-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
hg-smart
Commits
ea701e14
Commit
ea701e14
authored
Aug 08, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产环境无法删除S3的附件,暂时注释生产删除附件逻辑
parent
88101e12
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
104 deletions
+26
-104
ServiceHGSC003B.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC003B.java
+2
-41
ServiceHGSC004B.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC004B.java
+2
-41
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+22
-22
No files found.
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC003B.java
View file @
ea701e14
...
@@ -5,6 +5,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
...
@@ -5,6 +5,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
import
com.baosight.hggp.core.tools.EDTools
;
import
com.baosight.hggp.core.tools.EDTools
;
import
com.baosight.hggp.hg.ds.domain.HGDS002
;
import
com.baosight.hggp.hg.ds.domain.HGDS002
;
import
com.baosight.hggp.hg.sc.domain.HGSC099
;
import
com.baosight.hggp.hg.sc.domain.HGSC099
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.util.FileUtils
;
import
com.baosight.hggp.util.FileUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.hggp.util.contants.ACConstants
;
...
@@ -109,7 +110,7 @@ public class ServiceHGSC003B extends ServiceEPBase {
...
@@ -109,7 +110,7 @@ public class ServiceHGSC003B extends ServiceEPBase {
hgsc099
.
fromMap
(
resultRows
.
get
(
i
));
hgsc099
.
fromMap
(
resultRows
.
get
(
i
));
DaoUtils
.
update
(
HGSC099
.
DELETE
,
hgsc099
);
DaoUtils
.
update
(
HGSC099
.
DELETE
,
hgsc099
);
if
(!
hgsc099
.
getDocId
().
isEmpty
())
{
if
(!
hgsc099
.
getDocId
().
isEmpty
())
{
this
.
delectDoc
(
hgsc099
.
getDocId
());
HGSCTools
.
THGSC099
.
delectDoc
(
hgsc099
.
getDocId
());
}
}
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
...
@@ -120,44 +121,4 @@ public class ServiceHGSC003B extends ServiceEPBase {
...
@@ -120,44 +121,4 @@ public class ServiceHGSC003B extends ServiceEPBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
* 删除文件
* @param docId 文件ID
*/
public
void
delectDoc
(
String
docId
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"docId"
,
docId
);
List
<
HGDS002
>
list
=
this
.
dao
.
query
(
HGDS002
.
QUERY
,
map
);
if
(
list
.
size
()
>
0
)
{
String
realPath
=
list
.
get
(
0
).
getRealPath
();
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
projectEnv
.
RUN
))
{
EiInfo
queryInfo
=
new
EiInfo
();
queryInfo
.
set
(
HGSC099
.
FIELD_doc_id
,
list
.
get
(
0
).
getDocId
());
//获取文档信息
queryInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0102"
);
EiInfo
docInfo
=
XServiceManager
.
call
(
queryInfo
);
//数据库
Map
docInfoMap
=
docInfo
.
getMap
(
"docMap"
);
if
(
docInfoMap
.
size
()
>
0
)
{
EiInfo
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"data"
,
docInfoMap
.
get
(
"url"
)+
"-"
+
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
);
}
this
.
dao
.
delete
(
HGDS002
.
DELETE
,
map
);
}
}
}
}
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC004B.java
View file @
ea701e14
...
@@ -6,6 +6,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
...
@@ -6,6 +6,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
import
com.baosight.hggp.core.tools.EDTools
;
import
com.baosight.hggp.core.tools.EDTools
;
import
com.baosight.hggp.hg.ds.domain.HGDS002
;
import
com.baosight.hggp.hg.ds.domain.HGDS002
;
import
com.baosight.hggp.hg.sc.domain.HGSC099
;
import
com.baosight.hggp.hg.sc.domain.HGSC099
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.sj.domain.HGSJ003
;
import
com.baosight.hggp.hg.sj.domain.HGSJ003
;
import
com.baosight.hggp.util.FileUtils
;
import
com.baosight.hggp.util.FileUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.LogUtils
;
...
@@ -109,7 +110,7 @@ public class ServiceHGSC004B extends ServiceEPBase {
...
@@ -109,7 +110,7 @@ public class ServiceHGSC004B extends ServiceEPBase {
hgsc099
.
fromMap
(
resultRows
.
get
(
i
));
hgsc099
.
fromMap
(
resultRows
.
get
(
i
));
DaoUtils
.
update
(
HGSC099
.
DELETE
,
hgsc099
);
DaoUtils
.
update
(
HGSC099
.
DELETE
,
hgsc099
);
if
(!
hgsc099
.
getDocId
().
isEmpty
())
{
if
(!
hgsc099
.
getDocId
().
isEmpty
())
{
this
.
delectDoc
(
hgsc099
.
getDocId
());
HGSCTools
.
THGSC099
.
delectDoc
(
hgsc099
.
getDocId
());
}
}
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
...
@@ -120,44 +121,4 @@ public class ServiceHGSC004B extends ServiceEPBase {
...
@@ -120,44 +121,4 @@ public class ServiceHGSC004B extends ServiceEPBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
* 删除文件
* @param docId 文件ID
*/
public
void
delectDoc
(
String
docId
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"docId"
,
docId
);
List
<
HGDS002
>
list
=
this
.
dao
.
query
(
HGDS002
.
QUERY
,
map
);
if
(
list
.
size
()
>
0
)
{
String
realPath
=
list
.
get
(
0
).
getRealPath
();
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
projectEnv
.
RUN
))
{
EiInfo
queryInfo
=
new
EiInfo
();
queryInfo
.
set
(
HGSC099
.
FIELD_doc_id
,
list
.
get
(
0
).
getDocId
());
//获取文档信息
queryInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0102"
);
EiInfo
docInfo
=
XServiceManager
.
call
(
queryInfo
);
//数据库
Map
docInfoMap
=
docInfo
.
getMap
(
"docMap"
);
if
(
docInfoMap
.
size
()
>
0
)
{
EiInfo
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"data"
,
docInfoMap
.
get
(
"url"
)+
"-"
+
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
);
}
this
.
dao
.
delete
(
HGDS002
.
DELETE
,
map
);
}
}
}
}
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
ea701e14
...
@@ -1321,29 +1321,29 @@ public class HGSCTools {
...
@@ -1321,29 +1321,29 @@ public class HGSCTools {
String
realPath
=
list
.
get
(
0
).
getRealPath
();
String
realPath
=
list
.
get
(
0
).
getRealPath
();
// 项目环境
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
projectEnv
.
RUN
))
{
//
if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo
queryInfo
=
new
EiInfo
();
//
EiInfo queryInfo = new EiInfo();
queryInfo
.
set
(
HGSC099
.
FIELD_doc_id
,
list
.
get
(
0
).
getDocId
());
//
queryInfo.set(HGSC099.FIELD_doc_id,list.get(0).getDocId());
//获取文档信息
//
//获取文档信息
queryInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0102"
);
//
queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo
docInfo
=
XServiceManager
.
call
(
queryInfo
);
//
EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库
//
//数据库
Map
docInfoMap
=
docInfo
.
getMap
(
"docMap"
);
//
Map docInfoMap = docInfo.getMap("docMap");
if
(
docInfoMap
.
size
()
>
0
)
{
//
if (docInfoMap.size() > 0) {
EiInfo
eiInfo
=
new
EiInfo
();
//
EiInfo eiInfo = new EiInfo();
eiInfo
.
set
(
"data"
,
docInfoMap
.
get
(
"url"
)+
"-"
+
0
);
//
eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0105"
);
//
eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口
//
//调用接口
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//
EiInfo outInfo = XServiceManager.call(eiInfo);
//
if
(
outInfo
.
getStatus
()
==
EiConstant
.
STATUS_FAILURE
){
//
if(outInfo.getStatus() == EiConstant.STATUS_FAILURE){
LogUtils
.
setDetailMsg
(
outInfo
,
new
Throwable
(),
"查询部件类型失败"
);
//
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo
.
setMsg
(
"失败"
);
//
outInfo.setMsg("失败");
}
//
}
}
//
}
}
else
{
//
}else {
FileUtils
.
deleteFile
(
realPath
);
FileUtils
.
deleteFile
(
realPath
);
}
//
}
DaoBase
.
getInstance
().
delete
(
HGDS002
.
DELETE
,
map
);
DaoBase
.
getInstance
().
delete
(
HGDS002
.
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