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
2ad7a194
Commit
2ad7a194
authored
Oct 11, 2021
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改批样样品编码被修改问题;
修改导出没有显示牌号问题; 修改部分报告没有判级问题;
parent
2d32de78
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
17 deletions
+54
-17
EntrustReportServiceImpl.java
...vice/lims/hmhj/service/impl/EntrustReportServiceImpl.java
+5
-1
EntrustSampleItemServiceImpl.java
.../lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
+1
-1
EntrustSampleServiceImpl.java
...vice/lims/hmhj/service/impl/EntrustSampleServiceImpl.java
+48
-15
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustReportServiceImpl.java
View file @
2ad7a194
...
...
@@ -523,7 +523,8 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
EntrustSample
sample
=
new
EntrustSample
();
BeanUtils
.
copyProperties
(
sampleModel
,
sample
);
sample
.
setCode
(
sampleCode
).
setOrderBy
(
99
).
setCtime
(
new
Date
()).
setLtime
(
new
Date
()).
setUid
(
account
.
getUserId
())
.
setLid
(
account
.
getUserId
()).
setType
(
2
).
setId
(
IdWorker
.
getId
());
.
setStatus
(
EntrustSampleStatusEnum
.
REPORT_SEND
).
setProgress
(
EntrustSampleStatusEnum
.
REPORT_SEND
)
.
setFirstCode
(
sampleCode
).
setLid
(
null
).
setLtime
(
null
).
setType
(
2
).
setId
(
IdWorker
.
getId
());
sampleList
.
add
(
sample
);
EntrustSampleVO
sampleVO
=
new
EntrustSampleVO
();
...
...
@@ -862,6 +863,9 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
// 若从签收或批准往前驳回,则删除的PDF文件
if
(
fromFlowStatus
==
EntrustFlowEnum
.
REPORT_ISSUE
||
fromFlowStatus
==
EntrustFlowEnum
.
REPORT_SEND
||
fromFlowStatus
==
EntrustFlowEnum
.
QUALITY_INSPECT
)
{
// 删除生成的批样记录
entrustSampleService
.
remove
(
Condition
.
create
().
eq
(
"entrust_id"
,
entrust
.
getId
()).
eq
(
"type"
,
2
));
// 文件删除
executor1
.
execute
(()
->
deleteReportPdf
(
ids
));
}
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
View file @
2ad7a194
...
...
@@ -1223,7 +1223,7 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
// 默认开始行为:5,单元格序号为:-1
int
startRow
=
5
,
sampleCodePos
=
-
1
,
sampleBrandPos
=
-
1
;
flag:
for
(
int
i
=
5
;
i
<
rowNum
;
i
++)
{
for
(
int
i
=
1
;
i
<
rowNum
;
i
++)
{
startRow
=
i
;
XSSFRow
xssfRow
=
sheet
.
getRow
(
i
);
for
(
int
j
=
0
;
j
<
xssfRow
.
getLastCellNum
();
j
++)
{
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleServiceImpl.java
View file @
2ad7a194
...
...
@@ -455,20 +455,23 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
// 若为质量判定,判断需要判级
boolean
isRequireJudgeGrading
=
isRequireJudgeGrading
(
entrust
.
getId
());
for
(
EntrustSample
sample
:
sampleList
)
{
String
firstCode
=
sample
.
getFirstCode
(),
secondCode
=
sample
.
getSecondCode
(),
thirdCode
=
sample
.
getThirdCode
();
String
sampleCode
=
firstCode
;
if
(
2
==
whichLevel
)
{
sampleCode
=
StringUtils
.
isNotBlank
(
secondCode
)
?
secondCode
:
firstCode
;
}
else
if
(
3
==
whichLevel
)
{
sampleCode
=
StringUtils
.
isNotBlank
(
thirdCode
)
?
thirdCode
:
(
StringUtils
.
isNotBlank
(
secondCode
)
?
secondCode
:
firstCode
);
}
sample
.
setCode
(
sampleCode
);
sample
.
setStatus
(
sampleStatus
).
setProgress
(
sampleStatus
);
// 不需要判级,直接跳入电子档案或者下一节点为质量判定
if
((!
isRequireJudgeGrading
&&
nextFlowStatus
==
EntrustFlowEnum
.
QUALITY_JUDGE
)
||
nextFlowStatus
==
EntrustFlowEnum
.
ARCHIVES
)
{
sample
.
setJudgeProgress
(
2
).
setJudgeStatus
(
2
);
// 排除批样样品编号
if
(
2
!=
sample
.
getType
())
{
String
firstCode
=
sample
.
getFirstCode
(),
secondCode
=
sample
.
getSecondCode
(),
thirdCode
=
sample
.
getThirdCode
();
String
sampleCode
=
firstCode
;
if
(
2
==
whichLevel
)
{
sampleCode
=
StringUtils
.
isNotBlank
(
secondCode
)
?
secondCode
:
firstCode
;
}
else
if
(
3
==
whichLevel
)
{
sampleCode
=
StringUtils
.
isNotBlank
(
thirdCode
)
?
thirdCode
:
(
StringUtils
.
isNotBlank
(
secondCode
)
?
secondCode
:
firstCode
);
}
sample
.
setCode
(
sampleCode
);
sample
.
setStatus
(
sampleStatus
).
setProgress
(
sampleStatus
);
// 不需要判级,直接跳入电子档案或者下一节点为质量判定
if
((!
isRequireJudgeGrading
&&
nextFlowStatus
==
EntrustFlowEnum
.
QUALITY_JUDGE
)
||
nextFlowStatus
==
EntrustFlowEnum
.
ARCHIVES
)
{
sample
.
setJudgeProgress
(
2
).
setJudgeStatus
(
2
);
}
}
}
// update(updateSample, Condition.create().eq("entrust_id", entrust.getId()));
...
...
@@ -1766,7 +1769,7 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
}
else
if
(
2
==
level
)
{
fromFiled
=
" COALESCE(second_code,first_code) "
;
}
return
baseMapper
.
updateForSet
(
String
.
format
(
"code=%s"
,
fromFiled
),
new
EntityWrapper
<
EntrustSample
>().
eq
(
"entrust_id"
,
entrustId
))
>
0
;
return
baseMapper
.
updateForSet
(
String
.
format
(
"code=%s"
,
fromFiled
),
new
EntityWrapper
<
EntrustSample
>().
eq
(
"entrust_id"
,
entrustId
)
.
eq
(
"type"
,
0
)
)
>
0
;
}
@Override
...
...
@@ -1952,6 +1955,25 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
return
page
.
setRecords
(
baseMapper
.
selectSampleIndex
(
page
,
sampleIndexVO
));
}
private
String
getCellValue
(
XSSFRow
xssfRow
,
int
cellIndex
)
{
XSSFCell
cell
=
xssfRow
.
getCell
(
cellIndex
);
String
value
=
HSSFWorkbookUtil
.
getJavaValue
(
cell
).
toString
();
return
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isBlank
(
value
)
?
""
:
value
.
trim
();
}
private
int
getCellIndex
(
XSSFSheet
sheet
,
String
cellName
)
{
for
(
int
i
=
0
;
i
<
sheet
.
getLastRowNum
();
i
++)
{
XSSFRow
row
=
sheet
.
getRow
(
i
);
for
(
int
j
=
0
;
j
<
row
.
getLastCellNum
();
j
++)
{
if
(
getCellValue
(
row
,
j
).
equals
(
cellName
))
{
return
j
;
}
}
}
return
-
1
;
}
@Override
public
void
exportSampleIndex
(
Long
entrustId
,
Account
account
,
HttpServletResponse
response
)
{
RestAssert
.
fail
(
null
==
entrustId
,
"请选择要导出的委托"
);
...
...
@@ -1997,6 +2019,8 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
int
sampleMergerNum
=
template
.
getSampleMergerNum
();
int
templateSampleNum
=
template
.
getTemplateSampleNum
();
// 特殊处理牌号问题
int
brandIndex
=
getCellIndex
(
sheetOne
,
"牌号"
);
if
(
templateSampleNum
>=
sampleVOList
.
size
())
{
Integer
beginRow
=
template
.
getSampleBeginRow
();
...
...
@@ -2020,6 +2044,9 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
String
value
=
StringHandleUtils
.
getFieldValue
(
config
.
getDataAttribute
(),
vo
);
cell
.
setCellValue
(
value
);
}
if
(
brandIndex
>
-
1
)
{
xssfRow
.
getCell
(
brandIndex
).
setCellValue
(
vo
.
getSampleGrading
());
}
beginRow
+=
sampleMergerNum
;
}
...
...
@@ -2051,6 +2078,9 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
String
value
=
StringHandleUtils
.
getFieldValue
(
config
.
getDataAttribute
(),
vo
);
cell
.
setCellValue
(
value
);
}
if
(
brandIndex
>
-
1
)
{
xssfRow
.
getCell
(
brandIndex
).
setCellValue
(
vo
.
getSampleGrading
());
}
beginRow
+=
sampleMergerNum
;
}
}
...
...
@@ -2091,6 +2121,9 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
cell
.
setCellValue
(
StringHandleUtils
.
getFieldValue
(
config
.
getDataAttribute
(),
vo
));
}
}
if
(
brandIndex
>
-
1
)
{
xssfRow
.
getCell
(
brandIndex
).
setCellValue
(
vo
.
getSampleGrading
());
}
beginRow
+=
sampleMergerNum
;
sn
++;
...
...
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