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
c54d2839
Commit
c54d2839
authored
Jan 10, 2022
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增行未带入公式问题修改;
parent
692e01ea
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
3 deletions
+58
-3
EntrustController.java
...cloud/service/lims/hmhj/controller/EntrustController.java
+7
-0
SingleSheetMoreItemOperation.java
...vice/lims/hmhj/original/SingleSheetMoreItemOperation.java
+21
-3
IEntrustService.java
...atzn/cloud/service/lims/hmhj/service/IEntrustService.java
+2
-0
EntrustServiceImpl.java
...ud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
+6
-0
20220110新增字段.sql
src/test/java/resources/db_sql/hmhj/v172/20220110新增字段.sql
+22
-0
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/controller/EntrustController.java
View file @
c54d2839
...
...
@@ -974,4 +974,11 @@ public class EntrustController extends ServiceController {
}
return
success
(
userInfoService
.
getUserOrgNames
(
getAccount
()).
stream
().
anyMatch
(
t
->
t
.
contains
(
"化验"
)
&&
!
t
.
contains
(
"净化化验"
)));
}
@ApiOperation
(
"确认生成复检委托"
)
@RequestMapping
(
value
=
"/confirm_recheck"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
public
RestResult
<
Boolean
>
confirmRecheck
(
@RequestBody
EntrustDTO
entrustDTO
)
{
return
success
(
entrustService
.
confirmRecheck
(
entrustDTO
,
getAccount
()));
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/original/SingleSheetMoreItemOperation.java
View file @
c54d2839
...
...
@@ -10,9 +10,7 @@ import org.apache.poi.ss.usermodel.FormulaEvaluator;
import
org.apache.poi.ss.util.CellRangeAddress
;
import
org.apache.poi.xssf.usermodel.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
public
class
SingleSheetMoreItemOperation
implements
Operation
{
...
...
@@ -79,6 +77,8 @@ public class SingleSheetMoreItemOperation implements Operation {
int
sampleMergerNum
=
template
.
getSampleMergerNum
();
int
templateSampleNum
=
template
.
getTemplateSampleNum
();
int
insertRow
=
beginRow
+
sampleMergerNum
*
templateSampleNum
;
int
newRowIndex
=
insertRow
;
XSSFRow
hideRow
=
sheetOne
.
getRow
(
beginRow
-
1
);
XSSFRow
zeroRow
=
sheetOne
.
getRow
(
beginRow
);
int
lastCellNum
=
zeroRow
.
getLastCellNum
();
...
...
@@ -92,6 +92,12 @@ public class SingleSheetMoreItemOperation implements Operation {
XSSFCellStyle
cellStyle
=
zeroRow
.
getCell
(
j
).
getCellStyle
();
XSSFCell
xssfCell
=
row
.
createCell
(
j
);
xssfCell
.
setCellStyle
(
cellStyle
);
// 根据标题行处理公式
// 若标题(Si%等等)为空,那么不进行处理,如若不为空,再根据是否存在公式进行处理
String
title
=
hideRow
.
getCell
(
j
).
getStringCellValue
();
if
(
StringUtils
.
isNotBlank
(
title
))
{
xssfCell
.
setCellFormula
(
getCellFormula
(
title
.
trim
(),
newRowIndex
+
m
));
}
}
insertRow
++;
...
...
@@ -233,4 +239,15 @@ public class SingleSheetMoreItemOperation implements Operation {
}
}
}
private
String
getCellFormula
(
String
key
,
int
rowIndex
)
{
Optional
<
OriginalTemplateConfig
>
optional
=
this
.
configList
.
stream
().
filter
(
t
->
Objects
.
equals
(
key
,
t
.
getAttributeName
())).
findAny
();
if
(
optional
.
isPresent
())
{
String
formula
=
optional
.
get
().
getFormula
();
if
(
StringUtils
.
isNotBlank
(
formula
))
{
return
OriginalUtil
.
initFormula
(
formula
,
rowIndex
);
}
}
return
null
;
}
}
\ No newline at end of file
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IEntrustService.java
View file @
c54d2839
...
...
@@ -117,4 +117,6 @@ public interface IEntrustService extends IBaseService<Entrust> {
boolean
saveOrUpdateToSubmit
(
EntrustDTO
entrustDTO
,
Account
account
);
Page
<
EntrustVO
>
getPageReportProduct
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
);
Boolean
confirmRecheck
(
EntrustDTO
entrustDTO
,
Account
account
);
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
View file @
c54d2839
...
...
@@ -417,6 +417,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
}
sampleItem
.
setEntrustSampleId
(
sample
.
getId
());
sampleItem
.
setEntrustId
(
entrust
.
getId
());
saveEntrustSampleItemList
.
add
(
sampleItem
);
}
}
...
...
@@ -1606,4 +1607,9 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
}
@Override
public
Boolean
confirmRecheck
(
EntrustDTO
entrustDTO
,
Account
account
)
{
return
null
;
}
}
src/test/java/resources/db_sql/hmhj/v172/20220110新增字段.sql
0 → 100644
View file @
c54d2839
/** created by meazty on 2022/1/10 13:45 **/
/** created by meazty on 2022/1/10 13:45 **/
-- 合同检测项目 --
ALTER
TABLE
"public"
.
"contract_sample_item"
ADD
COLUMN
"recheck_id"
int8
;
COMMENT
ON
COLUMN
"public"
.
"contract_sample_item"
.
"recheck_id"
IS
'复检检测项目ID'
;
-- 委托样品 --
ALTER
TABLE
"public"
.
"entrust_sample"
ADD
COLUMN
"recheck_code"
varchar
(
64
)
COLLATE
"pg_catalog"
.
"default"
;
COMMENT
ON
COLUMN
"public"
.
"entrust_sample"
.
"recheck_code"
IS
'复检样品编号'
;
ALTER
TABLE
"public"
.
"entrust_sample_item"
ADD
COLUMN
"recheck_id"
int8
,
ADD
COLUMN
"entrust_id"
int8
;
COMMENT
ON
COLUMN
"public"
.
"entrust_sample_item"
.
"recheck_id"
IS
'复检检测项目ID'
;
COMMENT
ON
COLUMN
"public"
.
"entrust_sample_item"
.
"entrust_id"
IS
'委托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