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
7e0891ad
Commit
7e0891ad
authored
Oct 11, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-10-10 文档入库领用返回ID
parent
3ce4fabb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
31 deletions
+18
-31
ServiceHGBG001.java
.../java/com/baosight/hggp/hg/bg/service/ServiceHGBG001.java
+4
-0
ServiceHGBG002.java
.../java/com/baosight/hggp/hg/bg/service/ServiceHGBG002.java
+1
-8
ServiceHGBG002A.java
...java/com/baosight/hggp/hg/bg/service/ServiceHGBG002A.java
+4
-8
ServiceHGBG003.java
.../java/com/baosight/hggp/hg/bg/service/ServiceHGBG003.java
+1
-7
ServiceHGBG003A.java
...java/com/baosight/hggp/hg/bg/service/ServiceHGBG003A.java
+4
-8
ServiceHGBG004.java
.../java/com/baosight/hggp/hg/bg/service/ServiceHGBG004.java
+4
-0
No files found.
src/main/java/com/baosight/hggp/hg/bg/service/ServiceHGBG001.java
View file @
7e0891ad
...
...
@@ -14,6 +14,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -56,6 +57,7 @@ public class ServiceHGBG001 extends ServiceEPBase {
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 写入数据
List
<
HGBG001
>
hgbg001s
=
new
ArrayList
<>();
for
(
Map
resultRow
:
resultRows
)
{
HGBG001
hpbg001
=
new
HGBG001
();
hpbg001
.
fromMap
(
resultRow
);
...
...
@@ -64,7 +66,9 @@ public class ServiceHGBG001 extends ServiceEPBase {
}
else
{
this
.
modify
(
hpbg001
);
}
hgbg001s
.
add
(
hpbg001
);
}
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
setRows
(
hgbg001s
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/baosight/hggp/hg/bg/service/ServiceHGBG002.java
View file @
7e0891ad
...
...
@@ -57,15 +57,8 @@ public class ServiceHGBG002 extends ServiceEPBase {
List
<
Long
>
ids
=
ObjectUtils
.
listEpKey
(
resultRows
,
HGBG002
.
FIELD_ID
);
List
<
HGBG002A
>
hgbg002AList
=
HGBGTools
.
HgBg002a
.
getByParentId
(
ids
);
for
(
HGBG002
hgbg002:
resultRows
)
{
hgbg002
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
if
(
hgbg002
.
getId
()
==
null
||
hgbg002
.
getId
()
==
0
)
{
continue
;
}
List
<
HGBG002A
>
hgbg002As
=
hgbg002AList
.
stream
().
filter
(
hgbg002a1
->
hgbg002a1
.
getParentId
().
equals
(
hgbg002
.
getId
())
&&
hgbg002a1
.
getStatus
().
equals
(
ReviewStatusEnum
.
SUBMITTED
.
getCode
())).
collect
(
Collectors
.
toList
());
AssertUtils
.
isTrue
(
hgbg002As
.
size
()>
0
,
"数据已提交,无法删除!"
);
DaoUtils
.
update
(
HGBG002
.
DELETE
,
hgbg002
);
hgbg002As
=
hgbg002AList
.
stream
().
filter
(
hgbg002a1
->
hgbg002a1
.
getParentId
().
equals
(
hgbg002
.
getId
())).
collect
(
Collectors
.
toList
());
List
<
HGBG002A
>
hgbg002As
=
hgbg002AList
.
stream
().
filter
(
hgbg002a1
->
hgbg002a1
.
getParentId
().
equals
(
hgbg002
.
getId
())).
collect
(
Collectors
.
toList
());
hgbg002As
.
forEach
(
hgbg002a
->
DaoUtils
.
update
(
HGBG002A
.
DELETE
,
hgbg002a
));
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
src/main/java/com/baosight/hggp/hg/bg/service/ServiceHGBG002A.java
View file @
7e0891ad
...
...
@@ -5,7 +5,6 @@ import com.baosight.hggp.common.DdynamicEnum;
import
com.baosight.hggp.common.ReviewStatusEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.bg.domain.HGBG001
;
import
com.baosight.hggp.hg.bg.domain.HGBG002
;
import
com.baosight.hggp.hg.bg.domain.HGBG002A
;
import
com.baosight.hggp.hg.bg.tools.HGBGTools
;
...
...
@@ -54,17 +53,14 @@ public class ServiceHGBG002A extends ServiceEPBase {
@Override
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
(
);
List
<
Long
>
ids
=
ObjectUtils
.
list
Key
(
resultRows
,
HGBG002
.
FIELD
_ID
);
List
<
HGBG002A
>
resultRows
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGBG002A
.
class
);
List
<
Long
>
ids
=
ObjectUtils
.
list
EpKey
(
resultRows
,
HGBG002A
.
FIELD_PARENT
_ID
);
if
(
Objects
.
nonNull
(
ids
))
{
HGBG002
hgbg002
=
HGBGTools
.
HgBg002
.
get
(
ids
.
get
(
0
));
HGBG002
hgbg002
=
HGBGTools
.
HgBg002
.
get
(
resultRows
.
get
(
0
).
getParentId
(
));
AssertUtils
.
isTrue
(
hgbg002
.
getStatus
().
equals
(
ReviewStatusEnum
.
SUBMITTED
.
getCode
()),
"数据已提交,无法删除!"
);
}
for
(
Map
resultRow:
resultRows
)
{
HGBG002A
hpbg002a
=
new
HGBG002A
();
hpbg002a
.
fromMap
(
resultRow
);
hpbg002a
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
for
(
HGBG002A
hpbg002a:
resultRows
)
{
DaoUtils
.
update
(
HGBG002A
.
DELETE
,
hpbg002a
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
src/main/java/com/baosight/hggp/hg/bg/service/ServiceHGBG003.java
View file @
7e0891ad
...
...
@@ -55,14 +55,8 @@ public class ServiceHGBG003 extends ServiceEPBase {
List
<
HGBG003A
>
hpbg003AList
=
HGBGTools
.
HgBg003a
.
getByParentId
(
ids
);
for
(
HGBG003
hpbg003:
resultRows
)
{
hpbg003
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
if
(
hpbg003
.
getId
()
==
null
||
hpbg003
.
getId
()
==
0
)
{
continue
;
}
List
<
HGBG003A
>
hpbg003As
=
hpbg003AList
.
stream
().
filter
(
hpbg003a1
->
hpbg003a1
.
getParentId
().
equals
(
hpbg003
.
getId
())
&&
hpbg003a1
.
getStatus
().
equals
(
ReviewStatusEnum
.
SUBMITTED
.
getCode
())).
collect
(
Collectors
.
toList
());
AssertUtils
.
isTrue
(
hpbg003As
.
size
()>
0
,
"数据已提交,无法删除!"
);
DaoUtils
.
update
(
HGBG003
.
DELETE
,
hpbg003
);
hpbg003As
=
hpbg003AList
.
stream
().
filter
(
hpbg003a1
->
hpbg003a1
.
getParentId
().
equals
(
hpbg003
.
getId
())).
collect
(
Collectors
.
toList
());
List
<
HGBG003A
>
hpbg003As
=
hpbg003AList
.
stream
().
filter
(
hpbg003a1
->
hpbg003a1
.
getParentId
().
equals
(
hpbg003
.
getId
())).
collect
(
Collectors
.
toList
());
hpbg003As
.
forEach
(
hpbg003a
->
DaoUtils
.
update
(
HGBG003A
.
DELETE
,
hpbg003a
));
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
src/main/java/com/baosight/hggp/hg/bg/service/ServiceHGBG003A.java
View file @
7e0891ad
...
...
@@ -54,17 +54,13 @@ public class ServiceHGBG003A extends ServiceEPBase {
@Override
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
(
);
List
<
Long
>
ids
=
ObjectUtils
.
list
Key
(
resultRows
,
HGBG003
.
FIELD
_ID
);
List
<
HGBG003A
>
resultRows
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGBG003A
.
class
);
List
<
Long
>
ids
=
ObjectUtils
.
list
EpKey
(
resultRows
,
HGBG003A
.
FIELD_PARENT
_ID
);
if
(
Objects
.
nonNull
(
ids
))
{
HGBG003
hgbg003
=
HGBGTools
.
HgBg003
.
get
(
ids
.
get
(
0
));
HGBG003
hgbg003
=
HGBGTools
.
HgBg003
.
get
(
resultRows
.
get
(
0
).
getParentId
(
));
AssertUtils
.
isTrue
(
hgbg003
.
getStatus
().
equals
(
ReviewStatusEnum
.
SUBMITTED
.
getCode
()),
"数据已提交,无法删除!"
);
}
for
(
Map
resultRow:
resultRows
)
{
HGBG003A
hpbg003a
=
new
HGBG003A
();
hpbg003a
.
fromMap
(
resultRow
);
hpbg003a
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
for
(
HGBG003A
hpbg003a:
resultRows
)
{
DaoUtils
.
update
(
HGBG003A
.
DELETE
,
hpbg003a
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
src/main/java/com/baosight/hggp/hg/bg/service/ServiceHGBG004.java
View file @
7e0891ad
...
...
@@ -15,6 +15,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -59,6 +60,7 @@ public class ServiceHGBG004 extends ServiceEPBase {
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 写入数据
List
<
HGBG004
>
hgbg004s
=
new
ArrayList
<>();
for
(
Map
resultRow
:
resultRows
)
{
HGBG004
hpbg004
=
new
HGBG004
();
hpbg004
.
fromMap
(
resultRow
);
...
...
@@ -67,7 +69,9 @@ public class ServiceHGBG004 extends ServiceEPBase {
}
else
{
this
.
modify
(
hpbg004
);
}
hgbg004s
.
add
(
hpbg004
);
}
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
setRows
(
hgbg004s
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
...
...
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