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
337db081
Commit
337db081
authored
May 06, 2022
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
委托样品编号去除空格
parent
6731583e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
EntrustServiceImpl.java
...ud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
+8
-9
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
View file @
337db081
...
...
@@ -44,6 +44,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.*
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.Executor
;
import
java.util.stream.Collectors
;
...
...
@@ -409,15 +410,14 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
// 保存并提交委托时使用
dto
.
setId
(
entrust
.
getId
());
// ==
if
(
CollectionUtils
.
isNotEmpty
(
sampleDTOList
))
{
// 先对样品进行处理
Set
<
String
>
sampleNames
=
new
HashSet
<>(),
sampleCodes
=
new
HashSet
<>(),
sampleSlots
=
new
HashSet
<>();
for
(
EntrustSampleDTO
sampleDTO
:
sampleDTOList
)
{
String
sname
=
sampleDTO
.
getName
(),
scode
=
sampleDTO
.
getCode
(),
slotNo
=
sampleDTO
.
getSlotNo
();
sampleNames
.
add
(
sname
);
RestAssert
.
fail
(
StringUtils
.
isNotBlank
(
scode
)
&&
sampleCodes
.
contains
(
scode
),
String
.
format
(
"样品编号【%s】重复!"
,
scode
));
RestAssert
.
fail
(
StringUtils
.
isNotBlank
(
slotNo
)
&&
sampleSlots
.
contains
(
slotNo
),
String
.
format
(
"样品槽号【%s】重复!"
,
scode
));
sampleNames
.
add
(
sname
);
sampleCodes
.
add
(
scode
);
sampleSlots
.
add
(
slotNo
);
}
...
...
@@ -439,6 +439,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
handleSampleCode
(
entrust
,
sample
);
}
if
(
StringUtils
.
isNotBlank
(
sample
.
getCode
()))
{
sample
.
setCode
(
sample
.
getCode
().
trim
());
RestAssert
.
fail
(
entrustSampleService
.
isRepeatSampleCode
(
sample
),
String
.
format
(
"样品编号【%s】重复!"
,
sample
.
getCode
()));
}
}
...
...
@@ -479,7 +480,6 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
// 更新备样entrust_id字段
entrustSampleBackupService
.
updateEntrustId
(
entrust
.
getId
(),
contractSampleIds
);
}
return
true
;
}
...
...
@@ -638,10 +638,10 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
for
(
EntrustSampleDTO
sampleDTO
:
sampleList
)
{
String
sname
=
sampleDTO
.
getName
(),
scode
=
sampleDTO
.
getCode
(),
slotNo
=
sampleDTO
.
getSlotNo
();
RestAssert
.
fail
(
StringUtils
.
isBlank
(
sname
),
"样品名称不能为空"
);
sampleNames
.
add
(
sname
);
RestAssert
.
fail
(
StringUtils
.
isNotBlank
(
scode
)
&&
sampleCodes
.
contains
(
scode
),
String
.
format
(
"样品编号【%s】重复!"
,
scode
));
sampleCodes
.
add
(
scode
);
RestAssert
.
fail
(
StringUtils
.
isNotBlank
(
slotNo
)
&&
sampleSlots
.
contains
(
slotNo
),
String
.
format
(
"样品槽号【%s】重复!"
,
slotNo
));
sampleNames
.
add
(
sname
);
sampleCodes
.
add
(
scode
);
sampleSlots
.
add
(
slotNo
);
}
...
...
@@ -671,6 +671,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
handleSampleCode
(
entrust
,
sample
);
}
if
(
StringUtils
.
isNotBlank
(
sample
.
getCode
()))
{
sample
.
setCode
(
sample
.
getCode
().
trim
());
RestAssert
.
fail
(
entrustSampleService
.
isRepeatSampleCode
(
sample
),
String
.
format
(
"样品编号【%s】重复!"
,
sample
.
getCode
()));
}
}
...
...
@@ -716,11 +717,9 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
entrustSampleItemService
.
updateItemComposeJudgeByEntrustId
(
entrust
.
getId
());
executor1
.
execute
(
new
Runnable
()
{
@Override
public
void
run
()
{
CompletableFuture
.
runAsync
(()
->
{
// 委托费用
calTotalFee
(
entrust
.
getId
());
}
});
return
true
;
...
...
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