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
479a3332
Commit
479a3332
authored
Jun 27, 2022
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
石油焦编号,在提交时判断问题;
parent
5ceb20e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
EntrustServiceImpl.java
...ud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
+6
-3
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
View file @
479a3332
...
@@ -455,7 +455,10 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -455,7 +455,10 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
sample
.
setEntrustId
(
entrust
.
getId
());
sample
.
setEntrustId
(
entrust
.
getId
());
// 只有在提交时,才初始化样品编号
// 只有在提交时,才初始化样品编号
if
(
isSubmit
)
{
if
(
isSubmit
)
{
if
(
StringUtils
.
isBlank
(
sample
.
getCode
()))
{
// 判断是否样品为空时,需要考虑是否进场物资
// 若为进场物资,需要考虑是否为采样样品
// 若为采样样品,需要赋值采样样品编号
if
(
StringUtils
.
isBlank
(
sample
.
getCode
())
||
Objects
.
nonNull
(
sample
.
getSamplingId
()))
{
handleSampleCode
(
entrust
,
sample
);
handleSampleCode
(
entrust
,
sample
);
}
}
if
(
StringUtils
.
isNotBlank
(
sample
.
getCode
()))
{
if
(
StringUtils
.
isNotBlank
(
sample
.
getCode
()))
{
...
@@ -687,7 +690,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -687,7 +690,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
sample
.
setId
(
IdWorker
.
getId
());
sample
.
setId
(
IdWorker
.
getId
());
}
}
if
(
isSubmit
)
{
if
(
isSubmit
)
{
if
(
StringUtils
.
isBlank
(
sample
.
getCode
()))
{
if
(
StringUtils
.
isBlank
(
sample
.
getCode
())
||
Objects
.
nonNull
(
sample
.
getSamplingId
())
)
{
handleSampleCode
(
entrust
,
sample
);
handleSampleCode
(
entrust
,
sample
);
}
}
if
(
StringUtils
.
isNotBlank
(
sample
.
getCode
()))
{
if
(
StringUtils
.
isNotBlank
(
sample
.
getCode
()))
{
...
@@ -1598,7 +1601,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -1598,7 +1601,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
RestAssert
.
fail
(
CollectionUtils
.
isEmpty
(
sampleList
),
String
.
format
(
"委托编号为的【%s】样品为空!"
,
entrust
.
getCode
()));
RestAssert
.
fail
(
CollectionUtils
.
isEmpty
(
sampleList
),
String
.
format
(
"委托编号为的【%s】样品为空!"
,
entrust
.
getCode
()));
// 若存在任何一个样品的编号为空,那么需要自动生成其编号
// 若存在任何一个样品的编号为空,那么需要自动生成其编号
for
(
EntrustSample
sample
:
sampleList
)
{
for
(
EntrustSample
sample
:
sampleList
)
{
if
(
StringUtils
.
isBlank
(
sample
.
getCode
()))
{
if
(
StringUtils
.
isBlank
(
sample
.
getCode
())
||
Objects
.
nonNull
(
sample
.
getSamplingId
())
)
{
handleSampleCode
(
entrust
,
sample
);
handleSampleCode
(
entrust
,
sample
);
}
}
RestAssert
.
fail
(
entrustSampleService
.
isRepeatSampleCode
(
sample
),
String
.
format
(
"样品编号【%s】重复!"
,
sample
.
getCode
()));
RestAssert
.
fail
(
entrustSampleService
.
isRepeatSampleCode
(
sample
),
String
.
format
(
"样品编号【%s】重复!"
,
sample
.
getCode
()));
...
...
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