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
3022540f
Commit
3022540f
authored
Mar 22, 2022
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
原始记录 压片生成
parent
52f8bf7e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
24 deletions
+24
-24
SingleSheetMoreTabletOperation.java
...ce/lims/hmhj/original/SingleSheetMoreTabletOperation.java
+10
-15
EntrustSampleItemServiceImpl.java
.../lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
+2
-2
EntrustSamplePrepareServiceImpl.java
...ms/hmhj/service/impl/EntrustSamplePrepareServiceImpl.java
+11
-6
EntrustSampleServiceImpl.java
...vice/lims/hmhj/service/impl/EntrustSampleServiceImpl.java
+1
-1
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/original/SingleSheetMoreTabletOperation.java
View file @
3022540f
...
...
@@ -60,8 +60,12 @@ public class SingleSheetMoreTabletOperation implements Operation {
int
insertRow
=
beginRow
+
sampleMergerNum
*
templateSampleNum
;
XSSFRow
zeroRow
=
sheetOne
.
getRow
(
beginRow
);
int
lastCellNum
=
zeroRow
.
getLastCellNum
();
int
insertCount
=
voList
.
size
()
-
templateSampleNum
;
// 处理检测项目-按照样品区分检测项目
Map
<
String
,
List
<
EntrustSampleItemVO
>>
dataMap
=
new
LinkedHashMap
<>();
voList
.
forEach
(
t
->
{
MapMergeUtils
.
getorCreateMapArrayList
(
t
.
getSampleCode
(),
dataMap
,
t
);
});
int
insertCount
=
dataMap
.
size
()
-
templateSampleNum
;
for
(
int
m
=
0
;
m
<
insertCount
;
m
++)
{
for
(
int
i
=
0
;
i
<
sampleMergerNum
;
i
++)
{
sheetOne
.
shiftRows
(
insertRow
,
sheetOne
.
getLastRowNum
(),
1
,
true
,
false
);
...
...
@@ -78,18 +82,8 @@ public class SingleSheetMoreTabletOperation implements Operation {
}
int
sn
=
1
;
Map
<
String
,
List
<
EntrustSampleItemVO
>>
dataMap
=
new
LinkedHashMap
<>();
voList
.
forEach
(
t
->
{
MapMergeUtils
.
getorCreateMapArrayList
(
t
.
getSampleCode
(),
dataMap
,
t
);
});
Map
<
String
,
List
<
EntrustSampleItemVO
>>
sampleItemMap
=
new
LinkedHashMap
<>();
dataMap
.
entrySet
().
stream
()
.
sorted
(
Map
.
Entry
.
comparingByKey
())
.
forEachOrdered
(
x
->
sampleItemMap
.
put
(
x
.
getKey
(),
x
.
getValue
()));
for
(
Map
.
Entry
<
String
,
List
<
EntrustSampleItemVO
>>
entry
:
sampleItemMap
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
List
<
EntrustSampleItemVO
>>
entry
:
dataMap
.
entrySet
())
{
String
sampleCode
=
entry
.
getKey
();
XSSFRow
xssfRowS
=
sheetOne
.
getRow
(
beginRow
);
XSSFRow
xssfRowE
=
sheetOne
.
getRow
(
beginRow
+
1
);
...
...
@@ -144,8 +138,9 @@ public class SingleSheetMoreTabletOperation implements Operation {
}
}
}
}
else
if
(
Objects
.
equals
(
config
.
getDataAttribute
(),
"sampleCode"
))
{
cellS
.
setCellValue
(
getValueFillZero
(
sampleCode
));
}
else
{
for
(
EntrustSampleItemVO
itemVO
:
itemVOList
)
{
List
<
Map
<
String
,
String
>>
dataMapList
=
itemVO
.
getCollectionDataList
();
if
(
CollectionUtils
.
isEmpty
(
dataMapList
))
{
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
View file @
3022540f
...
...
@@ -890,9 +890,9 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
List
<
LmsOriginalRecordInfo
>
records
=
new
ArrayList
<>();
// 采集类型 0-无需采集; 1-文件采集-会带委托编号;2-盒子采集-不带委托编号
if
(
template
.
getCollectionType
()
==
1
)
{
records
=
originalRecordInfoService
.
list
(
Condition
.
create
().
in
(
"sample_num"
,
numSet
).
in
(
"contract_code"
,
entrustCodes
));
records
=
originalRecordInfoService
.
list
(
Condition
.
create
().
in
(
"sample_num"
,
numSet
).
in
(
"contract_code"
,
entrustCodes
)
.
orderBy
(
"ctime"
)
);
}
else
if
(
template
.
getCollectionType
()
==
2
)
{
records
=
originalRecordInfoService
.
list
(
Condition
.
create
().
in
(
"sample_num"
,
numSet
));
records
=
originalRecordInfoService
.
list
(
Condition
.
create
().
in
(
"sample_num"
,
numSet
)
.
orderBy
(
"ctime"
)
);
}
/* 按照样品编号和项目分开,来存放采集到的数据 record的data */
HashMap
<
String
,
List
<
String
>>
mapByNumItemName
=
new
HashMap
<>();
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSamplePrepareServiceImpl.java
View file @
3022540f
...
...
@@ -226,21 +226,27 @@ public class EntrustSamplePrepareServiceImpl extends BaseServiceImpl<EntrustSamp
EntrustSample
entrustSample
=
entrustSampleService
.
getById
(
prepareList
.
get
(
0
).
getEntrustSampleId
());
Entrust
entrust
=
entrustService
.
getById
(
entrustSample
.
getEntrustId
());
List
<
EntrustSample
>
notSampleList
=
entrustSampleService
.
list
(
Condition
.
create
().
eq
(
"entrust_id"
,
entrust
.
getId
()).
notIn
(
"id"
,
sampleIdsList
));
// 查询还处于未接受状态的样品数据
List
<
EntrustSample
>
notSampleList
=
entrustSampleService
.
list
(
Condition
.
create
()
.
eq
(
"entrust_id"
,
entrust
.
getId
())
.
eq
(
"status"
,
EntrustSampleStatusEnum
.
RECEIVE
)
.
notIn
(
"id"
,
sampleIdsList
));
// 查询未接收的样品数据
List
<
Long
>
notOkSampleIds
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
notSampleList
))
{
notOkSampleIds
=
notSampleList
.
stream
().
map
(
EntrustSample:
:
getId
).
collect
(
Collectors
.
toList
());
}
// ==
EntrustSamplePrepare
prepare
=
new
EntrustSamplePrepare
();
prepare
.
setStatus
(
EntrustSamplePrepareStatusEnum
.
TEST
);
prepare
.
setStatus
(
EntrustSamplePrepareStatusEnum
.
TEST
);
prepare
.
setProgress
(
EntrustSamplePrepareStatusEnum
.
TEST
);
super
.
update
(
prepare
,
Condition
.
create
().
in
(
"id"
,
ids
));
// ==
List
<
EntrustSamplePrepareStatusEnum
>
statusNotOkList
=
new
ArrayList
<>();
statusNotOkList
.
add
(
EntrustSamplePrepareStatusEnum
.
RECEIVE
);
statusNotOkList
.
add
(
EntrustSamplePrepareStatusEnum
.
RECEIVE_OK
);
List
<
EntrustSamplePrepare
>
preparesNotOkList
=
super
.
list
(
Condition
.
create
().
in
(
"id"
,
sampleIdsList
).
in
(
"status"
,
statusNotOkList
));
List
<
Long
>
notSampleIds
=
preparesNotOkList
.
stream
().
map
(
EntrustSamplePrepare:
:
getEntrustSampleId
).
collect
(
Collectors
.
toList
());
...
...
@@ -275,7 +281,6 @@ public class EntrustSamplePrepareServiceImpl extends BaseServiceImpl<EntrustSamp
entrustRecordService
.
record
(
new
Long
[]{
entrust
.
getId
()},
"样品接收"
,
"任务分配"
,
0
,
account
,
"提交至任务分配"
);
}
}
return
true
;
}
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleServiceImpl.java
View file @
3022540f
...
...
@@ -404,7 +404,7 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
}
else
if
(
nextFlowStatus
==
EntrustFlowEnum
.
ALLOT
)
{
sampleStatus
=
EntrustSampleStatusEnum
.
TEST
;
itemStatus
=
EntrustSampleItemStatusEnum
.
ALLOT
;
entrustSamplePrepareService
.
addOrUpdateToSetStatus
(
sampleIds
,
EntrustSamplePrepareStatusEnum
.
RECEIVE_OK
);
entrustSamplePrepareService
.
addOrUpdateToSetStatus
(
sampleIds
,
EntrustSamplePrepareStatusEnum
.
TEST
);
}
else
if
(
nextFlowStatus
==
EntrustFlowEnum
.
TEST
)
{
sampleStatus
=
EntrustSampleStatusEnum
.
TEST
;
itemStatus
=
EntrustSampleItemStatusEnum
.
TEST
;
...
...
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