Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-service-hmhj
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
wangweidong
patzn-cloud-service-hmhj
Commits
f34e1195
Commit
f34e1195
authored
Jun 10, 2021
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
霍煤鸿骏优化
parent
b2d4cd79
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
133 additions
and
0 deletions
+133
-0
IEntrustReportService.java
...loud/service/lims/hmhj/service/IEntrustReportService.java
+12
-0
EntrustReportServiceImpl.java
...vice/lims/hmhj/service/impl/EntrustReportServiceImpl.java
+121
-0
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IEntrustReportService.java
View file @
f34e1195
...
...
@@ -28,11 +28,23 @@ public interface IEntrustReportService extends IBaseService<EntrustReport> {
boolean
submitReportCheck
(
Long
[]
ids
,
Account
account
);
boolean
submitFromAllowToSend
(
Long
[]
ids
,
Account
account
);
boolean
submitFromAllowToIssue
(
Long
[]
ids
,
Account
account
);
boolean
submitFromSendToJudge
(
Long
[]
ids
,
Account
account
);
boolean
submitReportIssue
(
Long
[]
ids
,
Account
account
);
boolean
backReportCheck
(
Long
[]
ids
,
String
reason
,
Account
account
);
boolean
backReportIssue
(
Long
[]
ids
,
String
reason
,
Account
account
);
boolean
backFromReportSendToAllow
(
Long
[]
ids
,
String
reason
,
Account
account
);
boolean
backFromReportAllowToCheck
(
Long
[]
ids
,
String
reason
,
Account
account
);
boolean
backFromReportIssueToAllow
(
Long
[]
ids
,
String
reason
,
Account
account
);
Page
<
EntrustReport
>
pageStatus
(
Page
<
EntrustReport
>
page
,
List
<
EntrustReportStatusEnum
>
reportStatusList
,
EntrustReport
entrustReport
);
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustReportServiceImpl.java
View file @
f34e1195
...
...
@@ -140,6 +140,67 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要提交的报告"
);
EntrustReport
report
=
new
EntrustReport
();
report
.
setStatus
(
EntrustReportStatusEnum
.
ALLOW
);
report
.
setProgress
(
EntrustReportStatusEnum
.
ALLOW
);
List
<
EntrustReportRelSample
>
relSamples
=
entrustReportRelSampleService
.
list
(
Condition
.
create
().
in
(
"report_id"
,
ids
));
if
(
CollectionUtils
.
isNotEmpty
(
relSamples
)){
List
<
Long
>
sampleIds
=
relSamples
.
stream
().
map
(
s
->{
return
s
.
getSampleId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
sampleIds
)){
EntrustSample
sample
=
new
EntrustSample
();
sample
.
setStatus
(
EntrustSampleStatusEnum
.
REPORT_ALLOW
);
sample
.
setProgress
(
EntrustSampleStatusEnum
.
REPORT_ALLOW
);
entrustSampleService
.
update
(
sample
,
Condition
.
create
().
in
(
"id"
,
sampleIds
));
}
}
return
super
.
update
(
report
,
Condition
.
create
().
in
(
"id"
,
ids
));
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
submitFromAllowToSend
(
Long
[]
ids
,
Account
account
)
{
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要提交的报告"
);
EntrustReport
report
=
new
EntrustReport
();
report
.
setStatus
(
EntrustReportStatusEnum
.
SEND
);
report
.
setProgress
(
EntrustReportStatusEnum
.
SEND
);
List
<
EntrustReportRelSample
>
relSamples
=
entrustReportRelSampleService
.
list
(
Condition
.
create
().
in
(
"report_id"
,
ids
));
if
(
CollectionUtils
.
isNotEmpty
(
relSamples
)){
List
<
Long
>
sampleIds
=
relSamples
.
stream
().
map
(
s
->{
return
s
.
getSampleId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
sampleIds
)){
EntrustSample
sample
=
new
EntrustSample
();
sample
.
setStatus
(
EntrustSampleStatusEnum
.
REPORT_SEND
);
sample
.
setProgress
(
EntrustSampleStatusEnum
.
REPORT_SEND
);
entrustSampleService
.
update
(
sample
,
Condition
.
create
().
in
(
"id"
,
sampleIds
));
}
}
return
super
.
update
(
report
,
Condition
.
create
().
in
(
"id"
,
ids
));
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
submitFromAllowToIssue
(
Long
[]
ids
,
Account
account
)
{
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要提交的报告"
);
EntrustReport
report
=
new
EntrustReport
();
report
.
setStatus
(
EntrustReportStatusEnum
.
ISSUE
);
report
.
setProgress
(
EntrustReportStatusEnum
.
ISSUE
);
...
...
@@ -164,6 +225,35 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
submitFromSendToJudge
(
Long
[]
ids
,
Account
account
)
{
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要提交的报告"
);
EntrustReport
report
=
new
EntrustReport
();
report
.
setStatus
(
EntrustReportStatusEnum
.
END
);
report
.
setProgress
(
EntrustReportStatusEnum
.
END
);
List
<
EntrustReportRelSample
>
relSamples
=
entrustReportRelSampleService
.
list
(
Condition
.
create
().
in
(
"report_id"
,
ids
));
if
(
CollectionUtils
.
isNotEmpty
(
relSamples
)){
List
<
Long
>
sampleIds
=
relSamples
.
stream
().
map
(
s
->{
return
s
.
getSampleId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
sampleIds
)){
EntrustSample
sample
=
new
EntrustSample
();
sample
.
setStatus
(
EntrustSampleStatusEnum
.
END
);
sample
.
setProgress
(
EntrustSampleStatusEnum
.
END
);
entrustSampleService
.
update
(
sample
,
Condition
.
create
().
in
(
"id"
,
sampleIds
));
}
}
return
super
.
update
(
report
,
Condition
.
create
().
in
(
"id"
,
ids
));
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
submitReportIssue
(
Long
[]
ids
,
Account
account
)
{
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要提交的报告"
);
...
...
@@ -209,6 +299,37 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
}
@Override
public
boolean
backFromReportSendToAllow
(
Long
[]
ids
,
String
reason
,
Account
account
)
{
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要退回的报告"
);
EntrustReport
report
=
new
EntrustReport
();
report
.
setStatus
(
EntrustReportStatusEnum
.
ALLOW
);
report
.
setProgress
(
EntrustReportStatusEnum
.
BACK_SEND
);
return
super
.
update
(
report
,
Condition
.
create
().
in
(
"id"
,
ids
));
}
@Override
public
boolean
backFromReportAllowToCheck
(
Long
[]
ids
,
String
reason
,
Account
account
)
{
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要退回的报告"
);
EntrustReport
report
=
new
EntrustReport
();
report
.
setStatus
(
EntrustReportStatusEnum
.
CHECK
);
report
.
setProgress
(
EntrustReportStatusEnum
.
BACK_ALLOW
);
return
super
.
update
(
report
,
Condition
.
create
().
in
(
"id"
,
ids
));
}
@Override
public
boolean
backFromReportIssueToAllow
(
Long
[]
ids
,
String
reason
,
Account
account
)
{
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要退回的报告"
);
EntrustReport
report
=
new
EntrustReport
();
report
.
setStatus
(
EntrustReportStatusEnum
.
ALLOW
);
report
.
setProgress
(
EntrustReportStatusEnum
.
BACK_ISSUE
);
return
super
.
update
(
report
,
Condition
.
create
().
in
(
"id"
,
ids
));
}
}
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