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
2d420d25
Commit
2d420d25
authored
Apr 28, 2022
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
样品处理逻辑修改
parent
39100e1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
19 deletions
+13
-19
EntrustServiceImpl.java
...ud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
+13
-19
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
View file @
2d420d25
...
@@ -982,17 +982,25 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -982,17 +982,25 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
RestAssert
.
fail
(
null
==
nextStatus
,
String
.
format
(
"编号为【%s】的委托,未配置下一流程状态信息!"
,
entrust
.
getCode
()));
RestAssert
.
fail
(
null
==
nextStatus
,
String
.
format
(
"编号为【%s】的委托,未配置下一流程状态信息!"
,
entrust
.
getCode
()));
// 当前委托状态
// 当前委托状态
EntrustStatusEnum
status
=
entrust
.
getStatus
();
EntrustStatusEnum
status
=
entrust
.
getStatus
();
// 是否特殊需求
boolean
isSpecAsk
=
null
!=
entrust
.
getSpecialAsk
()
&&
(
"是"
.
equals
(
entrust
.
getSpecialAsk
()));
// 是否需要修改样品和检测项目(由于报告处只会修改部分样品)
// 是否需要修改样品和检测项目(由于报告处只会修改部分样品)
boolean
isUpdateSampleInfo
=
nextFlowValue
<
9
||
nextFlowValue
>
13
;
boolean
isUpdateSampleInfo
=
nextFlowValue
<
9
||
nextFlowValue
>
13
;
// 处理样品以及检测项目的流程状态
// 处理样品以及检测项目的流程状态
if
(!
isUpdateSampleInfo
)
{
if
(!
isUpdateSampleInfo
)
{
return
true
;
return
true
;
}
}
// 修改样品信息及其样品附属信息
entrustSampleService
.
updateSampleNextFlowInfo
(
entrust
,
nextFlowStatus
,
account
);
// 修改委托状态信息
entrust
.
setStatus
(
nextStatus
);
entrust
.
setProgress
(
nextStatus
);
entrust
.
setFlowStatus
(
nextFlowStatus
.
getName
());
updateById
(
entrust
);
// 若为特殊需求,必须要走评审
// 若为特殊需求,必须要走评审
String
uri
=
""
;
String
uri
=
""
;
// 是否特殊需求
boolean
isSpecAsk
=
null
!=
entrust
.
getSpecialAsk
()
&&
(
"是"
.
equals
(
entrust
.
getSpecialAsk
()));
List
<
Long
>
sendUidList
=
new
ArrayList
<>();
List
<
Long
>
sendUidList
=
new
ArrayList
<>();
if
(
isSpecAsk
||
nextStatus
==
EntrustStatusEnum
.
CHECK
)
{
if
(
isSpecAsk
||
nextStatus
==
EntrustStatusEnum
.
CHECK
)
{
uri
=
"/hmhj/entrust_manage/entrust_review"
;
uri
=
"/hmhj/entrust_manage/entrust_review"
;
...
@@ -1008,13 +1016,6 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -1008,13 +1016,6 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
uri
=
"/hmhj/quality_manage/quality_decide"
;
uri
=
"/hmhj/quality_manage/quality_decide"
;
}
}
entrustSampleService
.
updateSampleNextFlowInfo
(
entrust
,
nextFlowStatus
,
account
);
entrust
.
setStatus
(
nextStatus
);
entrust
.
setProgress
(
nextStatus
);
entrust
.
setFlowStatus
(
nextFlowStatus
.
getName
());
updateById
(
entrust
);
String
remark
=
"提交至"
+
nextFlowStatus
.
getDisplay
(),
String
remark
=
"提交至"
+
nextFlowStatus
.
getDisplay
(),
title
=
String
.
format
(
"新的%s任务!"
,
nextFlowStatus
.
getDisplay
()),
title
=
String
.
format
(
"新的%s任务!"
,
nextFlowStatus
.
getDisplay
()),
content
=
String
.
format
(
"有%s提交过来,请及时%s"
,
EntrustFlowEnum
.
convert
(
flowStatus
).
getDisplay
(),
nextFlowStatus
.
getDisplay
());
content
=
String
.
format
(
"有%s提交过来,请及时%s"
,
EntrustFlowEnum
.
convert
(
flowStatus
).
getDisplay
(),
nextFlowStatus
.
getDisplay
());
...
@@ -1562,6 +1563,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -1562,6 +1563,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
List
<
Long
>
specialIds
=
new
ArrayList
<>(),
normalIds
=
new
ArrayList
<>();
List
<
Long
>
specialIds
=
new
ArrayList
<>(),
normalIds
=
new
ArrayList
<>();
List
<
Long
>
sendUserIdList
=
new
ArrayList
<>();
List
<
Long
>
sendUserIdList
=
new
ArrayList
<>();
for
(
Entrust
entrust
:
entrustList
)
{
for
(
Entrust
entrust
:
entrustList
)
{
RestAssert
.
fail
(!
Objects
.
equals
(
entrust
.
getFlowStatus
(),
EntrustFlowEnum
.
DRAFT
.
name
()),
"只能提交草稿状态的委托!"
);
List
<
EntrustSample
>
sampleList
=
entrustSampleService
.
getByEntrustId
(
entrust
.
getId
());
List
<
EntrustSample
>
sampleList
=
entrustSampleService
.
getByEntrustId
(
entrust
.
getId
());
RestAssert
.
fail
(
CollectionUtils
.
isEmpty
(
sampleList
),
String
.
format
(
"委托编号为的【%s】样品为空!"
,
entrust
.
getCode
()));
RestAssert
.
fail
(
CollectionUtils
.
isEmpty
(
sampleList
),
String
.
format
(
"委托编号为的【%s】样品为空!"
,
entrust
.
getCode
()));
// 若存在任何一个样品的编号为空,那么需要自动生成其编号
// 若存在任何一个样品的编号为空,那么需要自动生成其编号
...
@@ -1573,16 +1575,6 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -1573,16 +1575,6 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
}
}
entrustSampleService
.
updateBatchById
(
sampleList
);
entrustSampleService
.
updateBatchById
(
sampleList
);
// if (sampleList.stream().anyMatch(t -> StringUtils.isBlank(t.getCode()))) {
// for (EntrustSample sample : sampleList) {
// handleSampleCode(entrust, sample);
// if (StringUtils.isNotBlank(sample.getCode())) {
// RestAssert.fail(entrustSampleService.isRepeatSampleCode(sample), String.format("样品编号【%s】重复!", sample.getCode()));
// }
// }
// entrustSampleService.updateBatchById(sampleList);
// }
if
(
"是"
.
equals
(
entrust
.
getSpecialAsk
()))
{
if
(
"是"
.
equals
(
entrust
.
getSpecialAsk
()))
{
specialIds
.
add
(
entrust
.
getId
());
specialIds
.
add
(
entrust
.
getId
());
}
else
{
}
else
{
...
@@ -1598,6 +1590,8 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -1598,6 +1590,8 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
}
}
}
}
}
}
// 更新委托,发送消息
Entrust
updateModel
=
new
Entrust
();
Entrust
updateModel
=
new
Entrust
();
if
(
CollectionUtils
.
isNotEmpty
(
specialIds
))
{
if
(
CollectionUtils
.
isNotEmpty
(
specialIds
))
{
updateModel
.
setStatus
(
EntrustStatusEnum
.
CHECK
);
updateModel
.
setStatus
(
EntrustStatusEnum
.
CHECK
);
...
...
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