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
93814ef6
Commit
93814ef6
authored
Oct 26, 2022
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理原铝重取添加多个的情况;
parent
c5c848bd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
EntrustSampleItemServiceImpl.java
.../lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
+6
-5
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
View file @
93814ef6
...
...
@@ -1478,6 +1478,9 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
log
(
"数据为空,不发送!"
);
return
;
}
// 获取编号集
List
<
String
>
sampleCodeList
=
sampleList
.
stream
().
map
(
EntrustSample:
:
getCode
).
collect
(
Collectors
.
toList
());
logger
.
error
(
"sample code is : {}"
,
sampleCodeList
);
//
EntrustSample
sample
=
sampleList
.
get
(
0
);
String
sampleName
=
sample
.
getName
();
...
...
@@ -1496,7 +1499,6 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
if
(
Objects
.
equals
(
ylname
,
sampleName
))
{
// 当为原铝时,判断是否存在重取,如果存在重取,需要在重取时触发,也就是下个条件下触发,如果不存在重取,那么直接发
// == 若存在,那么需要在重取阶段处理(重取样品,报告发送再处理)
List
<
String
>
sampleCodeList
=
sampleList
.
stream
().
map
(
EntrustSample:
:
getCode
).
collect
(
Collectors
.
toList
());
if
(
itemComparisonService
.
isExistCompareData
(
sampleCodeList
))
{
log
(
"存在需要重取的样品,需要重取时再发送!"
);
return
;
...
...
@@ -1513,10 +1515,8 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
//Y2201086159C1
//Y2112052110C2
//测试环境中,原铝重取可能并不是同一天生成的,"Y" + DateUtils.dateTransfer(sample.getCtime(), "yyMMdd") + "-" + sample.getSlotNo().trim();
List
<
String
>
sampleCodes
=
getSampleCodes
(
sampleList
);
logger
.
error
(
"sample code is : {}"
,
sampleCodes
);
//根据样品编号,查询出委托id
List
<
Long
>
entrustIds
=
entrustSampleService
.
getEntrustIdsBySampleCodes
(
sampleCode
s
);
List
<
Long
>
entrustIds
=
entrustSampleService
.
getEntrustIdsBySampleCodes
(
sampleCode
List
);
logger
.
error
(
"entrust id is : {}"
,
entrustIds
);
// 基本上不可能为空的
...
...
@@ -1535,7 +1535,8 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
dataList
.
forEach
(
t
->
{
// 根据有无ID判断是属于哪一种数据来源
Object
oid
=
t
.
get
(
"id"
),
obrand
=
t
.
get
(
"brand"
);
if
(
Objects
.
nonNull
(
oid
)
&&
Objects
.
isNull
(
obrand
))
{
logger
.
error
(
"循环处理牌号:样品id:{},牌号:{}"
,
oid
,
obrand
);
if
(
Objects
.
nonNull
(
oid
)
&&
(
Objects
.
isNull
(
obrand
)
||
StringUtils
.
isBlank
(
obrand
.
toString
())))
{
Long
sampleId
=
Long
.
valueOf
(
oid
.
toString
());
t
.
put
(
"brand"
,
sampleBrandMap
.
get
(
sampleId
));
t
.
remove
(
"id"
);
...
...
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