Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-service-soil
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-soil
Commits
52db65ff
Commit
52db65ff
authored
Mar 25, 2021
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
土工平台修改
parent
fa270b41
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
5 deletions
+27
-5
ServerHandler.java
.../java/com/patzn/cloud/service/lims/rcp/ServerHandler.java
+7
-0
SoilExperimentServiceImpl.java
...ice/lims/soil/service/impl/SoilExperimentServiceImpl.java
+20
-5
No files found.
src/main/java/com/patzn/cloud/service/lims/rcp/ServerHandler.java
View file @
52db65ff
...
...
@@ -14,9 +14,13 @@ public class ServerHandler extends ChannelInboundHandlerAdapter {
public
void
channelRead
(
ChannelHandlerContext
ctx
,
Object
msg
)
{
try
{
String
oid
=
ctx
.
channel
().
id
().
asLongText
();
ByteBuf
buf
=
(
ByteBuf
)
msg
;
byte
[]
req
=
new
byte
[
buf
.
readableBytes
()];
buf
.
readBytes
(
req
);
String
body
=
new
String
(
req
,
"UTF-8"
);
if
(!
body
.
contains
(
"PTH"
)){
logger
.
error
(
"天平传输的原始数据为:"
+
body
);
logger
.
error
(
"天平传输的处理数据为:"
+
ConvertHexStrToByteArray
.
balanceTextChangg
(
body
));
InitBalanceMap
mapInit
=
(
InitBalanceMap
)
SpringUtil
.
getBean
(
"initBalanceMap"
);
...
...
@@ -37,6 +41,9 @@ public class ServerHandler extends ChannelInboundHandlerAdapter {
System
.
out
.
println
(
"接收到客户端信息:"
+
msg
.
toString
());
//返回的数据结构
ctx
.
writeAndFlush
(
"OK"
);
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
...
...
src/main/java/com/patzn/cloud/service/lims/soil/service/impl/SoilExperimentServiceImpl.java
View file @
52db65ff
...
...
@@ -340,6 +340,9 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
List
<
SoilItemVO
>
soilItemVOList
=
soilItemService
.
listVOByExpSampleIds
(
sampleIdList
);
Map
<
Long
,
List
<
SoilItemVO
>>
sampleSoilItemVOMap
=
new
HashMap
<>();
for
(
SoilItemVO
soilItemVO:
soilItemVOList
)
{
if
(
sampleSoilItemVOMap
.
containsKey
(
soilItemVO
.
getSampleId
())){
...
...
@@ -353,11 +356,7 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
}
}
SoilEntrust
entrust
=
soilEntrustService
.
getById
(
voList
.
get
(
0
).
getEntrustId
());
logger
.
error
(
"saveExcelOriginalRecord entrust"
);
InputStream
io
=
ossClient
.
download
(
template
.
getObjectKey
());
if
(
null
==
io
){
...
...
@@ -374,6 +373,7 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
logger
.
error
(
"获取证书模板错误"
+
e
.
getMessage
());
e
.
printStackTrace
();
}
Map
<
String
,
String
>
mapReplace
=
new
HashMap
<>();
mapReplace
.
put
(
"#{projectName}"
,
entrust
.
getProjectName
());
mapReplace
.
put
(
"#{client}"
,
entrust
.
getClient
());
...
...
@@ -663,6 +663,12 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
int
xBegin2
=
10
;
int
xBegin3
=
11
;
int
xStep
=
5
;
Map
<
String
,
String
>
siteNoSampleCodeMap
=
new
HashMap
<>();
for
(
SoilExperimentVO
vo:
voList
){
siteNoSampleCodeMap
.
put
(
vo
.
getSiteNo
(),
vo
.
getSampleCode
());
}
for
(
SoilExperimentVO
vo:
voList
)
{
XSSFRow
xssfRow
=
sheetOne
.
getRow
(
beginRow
);
...
...
@@ -907,7 +913,16 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
if
(
null
!=
teshuRow
){
XSSFCell
teshuCell
=
teshuRow
.
getCell
(
config
.
getColumnPlace
());
XSSFCell
teshuCellSampleCode
=
teshuRow
.
getCell
(
1
);
teshuCell
.
setCellFormula
(
"'附录"
+
HSSFWorkbookUtil
.
getJavaValue
(
teshuCellSampleCode
).
toString
()+
"'!B11"
);
String
code
=
HSSFWorkbookUtil
.
getJavaValue
(
teshuCellSampleCode
).
toString
();
String
mapCode
=
siteNoSampleCodeMap
.
get
(
code
);
if
(
StringUtils
.
isNotBlank
(
mapCode
)){
teshuCell
.
setCellFormula
(
"'附录"
+
mapCode
+
"'!B11"
);
}
else
{
teshuCell
.
setCellFormula
(
"'附录"
+
code
+
"'!B11"
);
}
}
}
...
...
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