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
228f24c9
Commit
228f24c9
authored
Oct 12, 2021
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改报告发放时间为空问题;
parent
2ad7a194
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
13 deletions
+26
-13
EntrustReportServiceImpl.java
...vice/lims/hmhj/service/impl/EntrustReportServiceImpl.java
+25
-12
application-local.yml
src/main/resources/application-local.yml
+1
-1
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustReportServiceImpl.java
View file @
228f24c9
...
@@ -141,8 +141,8 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
...
@@ -141,8 +141,8 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
public
void
downloadExcel
(
Long
id
,
HttpServletResponse
response
)
{
public
void
downloadExcel
(
Long
id
,
HttpServletResponse
response
)
{
RestAssert
.
fail
(
null
==
id
,
"报告编号为空"
);
RestAssert
.
fail
(
null
==
id
,
"报告编号为空"
);
EntrustReport
report
=
getById
(
id
);
EntrustReport
report
=
getById
(
id
);
RestAssert
.
fail
(
StringUtils
.
isEmpty
(
report
.
getObjectKey
()),
"报告objectKey为空"
);
RestAssert
.
fail
(
StringUtils
.
isEmpty
(
report
.
getO
therO
bjectKey
()),
"报告objectKey为空"
);
ossClient
.
download
(
report
.
getObjectKey
(),
report
.
getSampleName
()
+
".xlsx"
,
response
);
ossClient
.
download
(
report
.
getO
therO
bjectKey
(),
report
.
getSampleName
()
+
".xlsx"
,
response
);
}
}
...
@@ -437,23 +437,20 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
...
@@ -437,23 +437,20 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
// 若从批准往后提交,则生成报告
// 若从批准往后提交,则生成报告
// 转化PDF
// 转化PDF
executor1
.
execute
(()
->
changeExcelReportToPdf
(
ids
));
executor1
.
execute
(()
->
changeExcelReportToPdf
(
ids
));
// 若为发放
// 若为发放
记录相关信息
if
(
toFlowStatus
==
EntrustFlowEnum
.
REPORT_SEND
)
{
if
(
toFlowStatus
==
EntrustFlowEnum
.
REPORT_SEND
)
{
generateNewReportFlow
(
entrust
.
getId
());
generateNewReportFlow
(
entrust
.
getId
());
}
}
// 记录 签发人、发放人、质检审核人
recordReportHandler
(
fromFlowStatus
,
account
,
entrustReport
);
}
else
if
(
toFlowStatus
==
EntrustFlowEnum
.
QUALITY_JUDGE
||
toFlowStatus
==
EntrustFlowEnum
.
ARCHIVES
)
{
}
else
if
(
toFlowStatus
==
EntrustFlowEnum
.
QUALITY_JUDGE
||
toFlowStatus
==
EntrustFlowEnum
.
ARCHIVES
)
{
// 归档前置条件为已判定
// 归档前置条件为已判定
entrust
.
setStatus
(
EntrustStatusEnum
.
QUALITY_CHECK
);
entrust
.
setStatus
(
EntrustStatusEnum
.
QUALITY_CHECK
);
// 更改样品编码显示形式,由三级变为一级
// 更改样品编码显示形式,由三级变为一级
entrustSampleService
.
updateSampleCodeByEntrustId
(
entrust
.
getId
(),
1
);
entrustSampleService
.
updateSampleCodeByEntrustId
(
entrust
.
getId
(),
1
);
//
// 记录 签发人、发放人、质检审核人
if
(
fromFlowStatus
==
EntrustFlowEnum
.
REPORT_ISSUE
)
{
recordReportHandler
(
fromFlowStatus
,
account
,
entrustReport
);
entrustReport
.
setReportIssuer
(
account
.
getUserName
()).
setReportIssuerId
(
account
.
getUserId
()).
setReportIssueTime
(
new
Date
());
}
else
if
(
fromFlowStatus
==
EntrustFlowEnum
.
REPORT_SEND
)
{
entrustReport
.
setReportSender
(
account
.
getUserName
()).
setReportSenderId
(
account
.
getUserId
()).
setReportSendTime
(
new
Date
());
}
else
if
(
fromFlowStatus
==
EntrustFlowEnum
.
QUALITY_INSPECT
)
{
entrustReport
.
setQualityInspector
(
account
.
getUserName
()).
setQualityInspectorId
(
account
.
getUserId
()).
setQualityInspectTime
(
new
Date
());
}
// 若提交至 -> 质量判定,那么需要更改委托状态
// 若提交至 -> 质量判定,那么需要更改委托状态
if
(
toFlowStatus
==
EntrustFlowEnum
.
QUALITY_JUDGE
)
{
if
(
toFlowStatus
==
EntrustFlowEnum
.
QUALITY_JUDGE
)
{
// 若不需要质量判定,直接进入电子档案流程
// 若不需要质量判定,直接进入电子档案流程
...
@@ -495,6 +492,22 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
...
@@ -495,6 +492,22 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
return
entrustSampleItemService
.
updateQualityJudgeFlow
(
sampleIds
.
toArray
(
new
Long
[
sampleIds
.
size
()]),
account
);
return
entrustSampleItemService
.
updateQualityJudgeFlow
(
sampleIds
.
toArray
(
new
Long
[
sampleIds
.
size
()]),
account
);
}
}
/**
* 记录签发人、发放人、记录审核人
* @param fromFlowStatus
* @param account
* @param entrustReport
*/
private
void
recordReportHandler
(
EntrustFlowEnum
fromFlowStatus
,
Account
account
,
EntrustReport
entrustReport
)
{
if
(
fromFlowStatus
==
EntrustFlowEnum
.
REPORT_ISSUE
)
{
entrustReport
.
setReportIssuer
(
account
.
getUserName
()).
setReportIssuerId
(
account
.
getUserId
()).
setReportIssueTime
(
new
Date
());
}
else
if
(
fromFlowStatus
==
EntrustFlowEnum
.
REPORT_SEND
)
{
entrustReport
.
setReportSender
(
account
.
getUserName
()).
setReportSenderId
(
account
.
getUserId
()).
setReportSendTime
(
new
Date
());
}
else
if
(
fromFlowStatus
==
EntrustFlowEnum
.
QUALITY_INSPECT
)
{
entrustReport
.
setQualityInspector
(
account
.
getUserName
()).
setQualityInspectorId
(
account
.
getUserId
()).
setQualityInspectTime
(
new
Date
());
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
protected
void
generateNewReportFlow
(
Long
entrustId
)
{
protected
void
generateNewReportFlow
(
Long
entrustId
)
{
...
@@ -864,7 +877,7 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
...
@@ -864,7 +877,7 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
// 若从签收或批准往前驳回,则删除的PDF文件
// 若从签收或批准往前驳回,则删除的PDF文件
if
(
fromFlowStatus
==
EntrustFlowEnum
.
REPORT_ISSUE
||
fromFlowStatus
==
EntrustFlowEnum
.
REPORT_SEND
||
fromFlowStatus
==
EntrustFlowEnum
.
QUALITY_INSPECT
)
{
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
));
entrustSampleService
.
remove
(
Condition
.
create
().
eq
(
"entrust_id"
,
entrust
.
getId
()).
eq
(
"type"
,
2
));
// 文件删除
// 文件删除
executor1
.
execute
(()
->
deleteReportPdf
(
ids
));
executor1
.
execute
(()
->
deleteReportPdf
(
ids
));
}
}
...
...
src/main/resources/application-local.yml
View file @
228f24c9
...
@@ -50,7 +50,7 @@ spring:
...
@@ -50,7 +50,7 @@ spring:
data
:
data
:
mongodb
:
mongodb
:
# uri: mongodb://hmuser:hj564Aq@meazty.fun:27017/lims
# uri: mongodb://hmuser:hj564Aq@meazty.fun:27017/lims
uri
:
mongodb://mongo:Mong$6358#@meazty.fun:27
017
/lims
uri
:
mongodb://mongo:Mong$6358#@meazty.fun:27
154
/lims
grid-fs-database
:
lims
grid-fs-database
:
lims
# Mongodb GridFS 存储
# Mongodb GridFS 存储
...
...
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