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
28f87ae7
Commit
28f87ae7
authored
Aug 19, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-08-16 安全记录APP附件上传调整
parent
7cadec6f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
1 deletions
+35
-1
ServiceHPSB008.java
.../java/com/baosight/hpjx/hp/sb/service/ServiceHPSB008.java
+14
-1
HPSBTools.java
src/main/java/com/baosight/hpjx/hp/sb/tools/HPSBTools.java
+21
-0
No files found.
src/main/java/com/baosight/hpjx/hp/sb/service/ServiceHPSB008.java
View file @
28f87ae7
...
...
@@ -4,6 +4,7 @@ import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.utils.Iplat4jUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.sb.domain.HPSB003
;
import
com.baosight.hpjx.hp.sb.domain.HPSB008
;
...
...
@@ -103,9 +104,21 @@ public class ServiceHPSB008 extends ServiceEPBase {
public
EiInfo
appSave
(
EiInfo
inInfo
)
{
try
{
Map
resultMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
,
EiConstant
.
resultBlock
);
HPSB008
hpsb008
=
HPSBTools
.
Hpsb008
.
add
(
resultMap
);
String
docId
=
MapUtils
.
getString
(
resultMap
,
HPSB099
.
FIELD_DOC_ID
);
String
docVideoId
=
MapUtils
.
getString
(
resultMap
,
HPSB099
.
FIELD_DOC_VIDEO_ID
);
HPSB008
hpsb008
=
new
HPSB008
();
hpsb008
.
fromMap
(
resultMap
);
if
(
hpsb008
.
getId
()
==
null
||
hpsb008
.
getId
()
==
0
)
{
this
.
add
(
hpsb008
);
}
else
{
this
.
modify
(
hpsb008
);
List
<
HPSB099
>
hpsb099List
=
HPSBTools
.
Hpsb099
.
getMatId
(
hpsb008
.
getId
());
if
(
hpsb099List
.
size
()
>
0
)
{
for
(
HPSB099
hpsb099
:
hpsb099List
)
{
Iplat4jUtils
.
deleteFileByDocId
(
hpsb099
.
getDocId
());
}
}
}
if
(
StringUtils
.
isNotEmpty
(
docId
))
{
String
[]
docIds
=
docId
.
split
(
","
);
for
(
String
docIdStr
:
docIds
){
...
...
src/main/java/com/baosight/hpjx/hp/sb/tools/HPSBTools.java
View file @
28f87ae7
...
...
@@ -164,4 +164,25 @@ public class HPSBTools {
return
hpsb008
;
}
}
public
static
class
Hpsb099
{
public
static
HPSB099
getId
(
Long
id
)
{
AssertUtils
.
isNull
(
id
,
"附件清单不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
HPSB099
.
FIELD_DOC_ID
,
id
);
List
<
HPSB099
>
results
=
DaoBase
.
getInstance
().
query
(
HPSB099
.
QUERY
,
queryMap
);
AssertUtils
.
isEmpty
(
results
,
"附件清单不存在"
);
return
results
.
get
(
0
);
}
public
static
List
<
HPSB099
>
getMatId
(
Long
matId
)
{
AssertUtils
.
isNull
(
matId
,
"附件清单上级ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
HPSB099
.
FIELD_MAT_ID
,
matId
);
List
<
HPSB099
>
results
=
DaoBase
.
getInstance
().
query
(
HPSB099
.
QUERY
,
queryMap
);
AssertUtils
.
isEmpty
(
results
,
"附件清单不存在"
);
return
results
;
}
}
}
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