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
5a521427
Commit
5a521427
authored
Jul 27, 2021
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生成pdf逻辑修改;
parent
0818cf5d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
12 deletions
+31
-12
OriginalRecordController.java
...ervice/lims/hmhj/controller/OriginalRecordController.java
+1
-1
EntrustReportServiceImpl.java
...vice/lims/hmhj/service/impl/EntrustReportServiceImpl.java
+2
-3
EntrustServiceImpl.java
...ud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
+26
-6
EntrustMapper.xml
src/main/resources/mapper/hmhj/EntrustMapper.xml
+2
-2
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/controller/OriginalRecordController.java
View file @
5a521427
...
@@ -58,7 +58,7 @@ public class OriginalRecordController extends ServiceController {
...
@@ -58,7 +58,7 @@ public class OriginalRecordController extends ServiceController {
@PostMapping
(
"/pageVO"
)
@PostMapping
(
"/pageVO"
)
public
RestResult
<
Page
<
OriginalRecordVO
>>
getPageVO
(
OriginalRecordVO
originalRecordVO
)
{
public
RestResult
<
Page
<
OriginalRecordVO
>>
getPageVO
(
OriginalRecordVO
originalRecordVO
)
{
// 数据检测只能当前人看
// 数据检测只能当前人看
if
(
StringUtils
.
isNotBlank
(
originalRecordVO
.
getSource
())
&&
"test
"
.
equalsIgnoreCase
(
originalRecordVO
.
getSource
()))
{
if
(
"TEST
"
.
equalsIgnoreCase
(
originalRecordVO
.
getSource
()))
{
originalRecordVO
.
setTesterId
(
getAccount
().
getUserId
());
originalRecordVO
.
setTesterId
(
getAccount
().
getUserId
());
}
}
return
success
(
originalRecordService
.
pageVO
(
getPage
(),
originalRecordVO
));
return
success
(
originalRecordService
.
pageVO
(
getPage
(),
originalRecordVO
));
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustReportServiceImpl.java
View file @
5a521427
...
@@ -4,9 +4,7 @@ import com.baomidou.mybatisplus.mapper.Condition;
...
@@ -4,9 +4,7 @@ import com.baomidou.mybatisplus.mapper.Condition;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.toolkit.ArrayUtils
;
import
com.baomidou.mybatisplus.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.toolkit.StringUtils
;
import
com.patzn.cloud.commons.api.RestAssert
;
import
com.patzn.cloud.commons.api.RestAssert
;
import
com.patzn.cloud.commons.controller.Account
;
import
com.patzn.cloud.commons.controller.Account
;
import
com.patzn.cloud.commons.service.impl.BaseServiceImpl
;
import
com.patzn.cloud.commons.service.impl.BaseServiceImpl
;
...
@@ -243,7 +241,8 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
...
@@ -243,7 +241,8 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
EntrustReportStatusEnum
reportStatusEnum
=
EntrustFlowUtils
.
getReportStatus
(
toFlowStatus
);
EntrustReportStatusEnum
reportStatusEnum
=
EntrustFlowUtils
.
getReportStatus
(
toFlowStatus
);
// 若从批准往后提交,则生成报告
// 若从批准往后提交,则生成报告
if
(
fromFlowStatus
==
EntrustFlowEnum
.
REPORT_ALLOW
)
{
// change : 下一步是签发或者发放时,生成pdf
if
(
toFlowStatus
==
EntrustFlowEnum
.
REPORT_ISSUE
||
toFlowStatus
==
EntrustFlowEnum
.
REPORT_SEND
)
{
//转化PDF
//转化PDF
executor1
.
execute
(()
->
changeExcelReportToPdf
(
ids
));
executor1
.
execute
(()
->
changeExcelReportToPdf
(
ids
));
}
}
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
View file @
5a521427
...
@@ -139,8 +139,8 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -139,8 +139,8 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
public
void
initSampleCode
(
EntrustSample
sample
)
{
public
void
initSampleCode
(
EntrustSample
sample
)
{
// 样品类型
// 样品类型
\名称
String
category
=
sample
.
getCategory
();
String
category
=
sample
.
getCategory
()
,
sampleName
=
sample
.
getName
()
;
RestAssert
.
fail
(
StringUtils
.
isBlank
(
category
),
"样品类型不能为空"
);
RestAssert
.
fail
(
StringUtils
.
isBlank
(
category
),
"样品类型不能为空"
);
String
parentCategory
=
""
;
String
parentCategory
=
""
;
if
(
StringUtils
.
isNotBlank
(
category
))
{
if
(
StringUtils
.
isNotBlank
(
category
))
{
...
@@ -149,6 +149,11 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -149,6 +149,11 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
parentCategory
=
chemicalCategory
.
getName
();
parentCategory
=
chemicalCategory
.
getName
();
}
}
// 判断槽号不能为空
if
(
"散样"
.
equals
(
parentCategory
))
{
RestAssert
.
fail
(
StringUtils
.
isBlank
(
sample
.
getSlotNo
()),
"样品槽号为空"
);
}
Account
account
=
LoginHelper
.
getAccount
();
Account
account
=
LoginHelper
.
getAccount
();
int
codeTypeNo
=
0
;
int
codeTypeNo
=
0
;
List
<
SysOrg
>
orgList
=
sysOrgClient
.
getListByUserId
(
account
.
getUserId
()).
getData
();
List
<
SysOrg
>
orgList
=
sysOrgClient
.
getListByUserId
(
account
.
getUserId
()).
getData
();
...
@@ -170,7 +175,13 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -170,7 +175,13 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
codeType
=
CodeTypeEnum
.
SAMPLE_YFL_CODE
;
codeType
=
CodeTypeEnum
.
SAMPLE_YFL_CODE
;
break
;
break
;
case
"散样"
:
case
"散样"
:
codeType
=
CodeTypeEnum
.
BULK_SAMPLE_CODE
;
if
(
"原铝散样"
.
equals
(
sampleName
))
{
codeType
=
CodeTypeEnum
.
AL_BULK_SAMPLE_CODE
;
}
else
if
(
"原铝重取"
.
equals
(
sampleName
))
{
codeType
=
CodeTypeEnum
.
AL_RETAKE_SAMPLE_CODE
;
}
else
if
(
"电解质散样"
.
equals
(
sampleName
))
{
codeType
=
CodeTypeEnum
.
ELECT_BULK_SAMPLE_CODE
;
}
break
;
break
;
default
:
default
:
codeType
=
CodeTypeEnum
.
SAMPLE_CODE
;
codeType
=
CodeTypeEnum
.
SAMPLE_CODE
;
...
@@ -207,10 +218,9 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -207,10 +218,9 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
thirdCode
=
sampleCode
.
replace
(
"A"
,
"C"
).
replace
(
replaceStr
,
"HY"
);
thirdCode
=
sampleCode
.
replace
(
"A"
,
"C"
).
replace
(
replaceStr
,
"HY"
);
sampleCode
=
sampleCode
.
replace
(
replaceStr
,
inspectNo
);
sampleCode
=
sampleCode
.
replace
(
replaceStr
,
inspectNo
);
}
}
// 散样样品编号处理
//
原铝
散样样品编号处理
else
if
(
CodeTypeEnum
.
BULK_SAMPLE_CODE
==
codeType
)
{
else
if
(
CodeTypeEnum
.
AL_
BULK_SAMPLE_CODE
==
codeType
)
{
// 替换槽号CH
// 替换槽号CH
RestAssert
.
fail
(
StringUtils
.
isBlank
(
sample
.
getSlotNo
()),
"样品槽号为空"
);
sampleCode
=
sampleCode
.
replace
(
"CH"
,
sample
.
getSlotNo
());
sampleCode
=
sampleCode
.
replace
(
"CH"
,
sample
.
getSlotNo
());
// 根据当前系统时间获取班次
// 根据当前系统时间获取班次
LocalTime
now
=
LocalTime
.
now
();
LocalTime
now
=
LocalTime
.
now
();
...
@@ -228,6 +238,16 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -228,6 +238,16 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
// 替换班次BC
// 替换班次BC
sampleCode
=
sampleCode
.
replace
(
"BC"
,
clazz
);
sampleCode
=
sampleCode
.
replace
(
"BC"
,
clazz
);
}
}
// 电解质散样样品编号处理
else
if
(
CodeTypeEnum
.
ELECT_BULK_SAMPLE_CODE
==
codeType
)
{
// 替换槽号CH
sampleCode
=
sampleCode
.
replace
(
"CH"
,
sample
.
getSlotNo
());
}
//原铝重取样品编号处理
else
if
(
CodeTypeEnum
.
AL_RETAKE_SAMPLE_CODE
==
codeType
)
{
// 替换槽号CH
sampleCode
=
sampleCode
.
replace
(
"CH"
,
sample
.
getSlotNo
());
}
}
}
if
(
StringUtils
.
isNotBlank
(
sampleCode
))
{
if
(
StringUtils
.
isNotBlank
(
sampleCode
))
{
...
...
src/main/resources/mapper/hmhj/EntrustMapper.xml
View file @
5a521427
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
FROM entrust_sample
FROM entrust_sample
WHERE deleted = 0
WHERE deleted = 0
AND entrust_id = #{entrustId}
AND entrust_id = #{entrustId}
ORDER BY
code DESC
ORDER BY
order_by asc
</select>
</select>
<select
id=
"selectEntrustSampleReceive"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustVO"
>
<select
id=
"selectEntrustSampleReceive"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustVO"
>
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
<if
test=
"null != vo.uid"
>
<if
test=
"null != vo.uid"
>
AND e.uid = #{vo.uid}
AND e.uid = #{vo.uid}
</if>
</if>
order by e.
entrust_time desc
order by e.
ctime DESC
</select>
</select>
<!--查询委托历史数据-->
<!--查询委托历史数据-->
...
...
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