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
c9bca976
Commit
c9bca976
authored
Feb 25, 2022
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报告编制撤回;
parent
b0cab846
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
18 deletions
+28
-18
EntrustSampleServiceImpl.java
...vice/lims/hmhj/service/impl/EntrustSampleServiceImpl.java
+3
-0
EntrustServiceImpl.java
...ud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
+13
-5
OriginalTemplateItemMapper.xml
...main/resources/mapper/hmhj/OriginalTemplateItemMapper.xml
+12
-13
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleServiceImpl.java
View file @
c9bca976
...
...
@@ -1066,6 +1066,9 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
Integer
beginRow
=
sysFileTemplate
.
getSampleBeginRow
();
int
insertRow
=
beginRow
+
sampleMergerNum
*
templateSampleNum
;
XSSFRow
zeroRow
=
sheetOne
.
getRow
(
beginRow
);
if
(
null
==
zeroRow
)
{
continue
;
}
XSSFCellStyle
cellStyle
=
zeroRow
.
getCell
(
0
).
getCellStyle
();
int
lastCellNum
=
zeroRow
.
getLastCellNum
();
int
insertCount
=
sampleVOList
.
size
()
-
templateSampleNum
;
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
View file @
c9bca976
...
...
@@ -94,7 +94,6 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
@Autowired
private
UserInfoServiceImpl
userInfoService
;
@Autowired
private
Executor
executor1
;
...
...
@@ -119,6 +118,9 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
@Autowired
private
IOriginalRecordService
originalRecordService
;
@Autowired
private
IEntrustReportRelSampleService
entrustReportRelSampleService
;
@Override
public
Page
<
Entrust
>
page
(
Page
<
Entrust
>
page
,
Entrust
entrust
)
{
...
...
@@ -1527,7 +1529,8 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
EntrustStatusEnum
prevStatus
=
EntrustFlowUtils
.
getStatus
(
prevFlow
);
EntrustSampleStatusEnum
prevSampleStatus
=
EntrustFlowUtils
.
getSampleStatus
(
prevFlow
);
EntrustSampleItemStatusEnum
prevItemStatus
=
EntrustFlowUtils
.
getItemStatus
(
prevFlow
);
// 2.重置委托,样品,检测项目各个数据
// 2.重置委托,样品,检测项目,样品报告关联各个数据
// 2.1.重置委托
entrust
.
setProgress
(
prevStatus
).
setStatus
(
prevStatus
).
setFlowStatus
(
prevFlow
.
getName
());
updateById
(
entrust
);
//
...
...
@@ -1535,23 +1538,28 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
if
(
CollectionUtils
.
isEmpty
(
samples
))
{
continue
;
}
// 2.2.重置样品
EntrustSample
sample
=
new
EntrustSample
();
sample
.
setStatus
(
prevSampleStatus
).
setProgress
(
prevSampleStatus
);
entrustSampleService
.
update
(
sample
,
Condition
.
create
().
eq
(
"entrust_id"
,
entrust
.
getId
()));
List
<
Long
>
sampleIds
=
samples
.
stream
().
map
(
EntrustSample:
:
getId
).
collect
(
Collectors
.
toList
());
// 2.3.重置检测项目
EntrustSampleItem
item
=
new
EntrustSampleItem
();
item
.
setStatus
(
prevItemStatus
).
setProgress
(
prevItemStatus
);
entrustSampleItemService
.
update
(
item
,
Condition
.
create
().
in
(
"entrust_sample_id"
,
sampleIds
));
// 3.日志
// 2.4.重置样品报告关联
Wrapper
<
EntrustReportRelSample
>
wrapper
=
Condition
.
wrapper
();
entrustReportRelSampleService
.
remove
(
wrapper
.
in
(
"sample_id"
,
sampleIds
));
// 2.5.重置委托日志
entrustRecordService
.
record
(
ids
,
EntrustFlowEnum
.
REPORT_MAKE
.
getDisplay
(),
prevFlow
.
getDisplay
(),
1
,
account
,
reason
);
//
4.
消息
//
2.6.发送
消息
List
<
EntrustSampleItem
>
items
=
entrustSampleItemService
.
getListByEntrustId
(
entrust
.
getId
());
if
(
CollectionUtils
.
isNotEmpty
(
items
))
{
lmsMsgService
.
sendMsg
(
"/hmhj/test_manage/test_input"
,
"有委托从报告编制退回过来,请及时处理"
,
"新的(报告编制退回)数据录入任务!"
,
account
,
items
.
stream
().
map
(
EntrustSampleItem:
:
getTesterId
).
collect
(
Collectors
.
toList
()));
}
}
//
4
.删除报告
//
3
.删除报告
EntrustReport
report
=
new
EntrustReport
();
report
.
setDeleted
(
1
);
return
entrustReportService
.
update
(
report
,
Condition
.
create
().
in
(
"entrust_id"
,
ids
));
...
...
src/main/resources/mapper/hmhj/OriginalTemplateItemMapper.xml
View file @
c9bca976
...
...
@@ -5,21 +5,20 @@
<select
id=
"listIdsByItems"
resultType=
"java.lang.Long"
>
select ot.id from original_template ot
where ot.deleted = 0 and (
<foreach
collection=
"sampleItemList"
index=
"index"
item=
"sampleItem"
separator=
"or"
open=
"("
close=
")"
>
(
exists (
select 1 from original_template_item oti where oti.deleted = 0 and oti.template_id = ot.id
and oti.type = 'sample' and oti.name = #{sampleItem.name}
)
and exists (
select 1 from original_template_item oi where oi.deleted = 0 and oi.template_id = ot.id
and oi.type = 'item' and oi.name in
<foreach
collection=
"sampleItem.itemList"
index=
"ix"
item=
"item"
separator=
","
open=
"("
close=
")"
>
<foreach
collection=
"sampleItemList"
index=
"index"
item=
"sampleItem"
separator=
"or"
open=
"("
close=
")"
>
exists (
select 1 from original_template_item oti where oti.deleted = 0 and oti.template_id = ot.id
and oti.type = 'sample' and(oti.name is null or oti.name = #{sampleItem.name})
)
and exists (
select 1 from original_template_item oi where oi.deleted = 0 and oi.template_id = ot.id
and oi.type = 'item' and ( oi.name is null or oi.name in
<foreach
collection=
"sampleItem.itemList"
index=
"ix"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
)
</foreach>
)
</foreach>
)
</foreach>
)
</select>
</mapper>
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