Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
data-acquisition
Project
Project
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
竹天卫
data-acquisition
Commits
291f1cfa
Commit
291f1cfa
authored
May 08, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
样品分析结果生成二维码
1 上标下标问题 2 json信息拼接成字符串信息 进行展示
parent
828b7aa7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
TMaterialOutQuery.java
...c/acquisition/business/model/query/TMaterialOutQuery.java
+2
-2
TSampleLaboratorysheetServiceImpl.java
...iness/service/impl/TSampleLaboratorysheetServiceImpl.java
+26
-1
No files found.
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/model/query/TMaterialOutQuery.java
View file @
291f1cfa
...
...
@@ -43,13 +43,13 @@ public class TMaterialOutQuery {
private
String
processesName
;
/**
* 材料消耗的类型,包括燃料及动力、润滑察试、配件、工具、火工材料、电力和其它等
* 材料消耗的类型,包括燃料及动力、润滑察试、配件、工具、火工材料、电力和其它等
==== 项目
*/
@ApiModelProperty
(
"材料消耗的类型,包括燃料及动力、润滑察试、配件、工具、火工材料、电力和其它等"
)
private
String
consumeType
;
/**
* 材料消耗日期
* 材料消耗日期
====材料领用日期
*/
@ApiModelProperty
(
"材料消耗日期"
)
private
LocalDateTime
consumeDate
;
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TSampleLaboratorysheetServiceImpl.java
View file @
291f1cfa
...
...
@@ -19,6 +19,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.servlet.http.HttpServletResponse
;
import
java.time.format.DateTimeFormatter
;
/**
* <p>
...
...
@@ -156,9 +157,33 @@ public class TSampleLaboratorysheetServiceImpl extends ServiceImpl<TSampleLabora
if
(
tSampleLaboratorysheet
==
null
)
{
return
R
.
failed
(
"数据不存在,样号:"
+
query
.
getYh
());
}
DateTimeFormatter
df
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
String
content
=
""
;
if
(
tSampleLaboratorysheet
!=
null
){
//上标 下标 ₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉ ⁻
String
yh
=
"样号:"
+(
tSampleLaboratorysheet
.
getYh
()!=
null
?
tSampleLaboratorysheet
.
getYh
():
""
)
+
" \n "
;
content
=
yh
+
"化验室编号:"
+(
tSampleLaboratorysheet
.
getLaboratoryID
()!=
null
?
tSampleLaboratorysheet
.
getLaboratoryID
():
""
)
+
" \n "
+
"CaO:"
+(
tSampleLaboratorysheet
.
getCao
()!=
null
?
tSampleLaboratorysheet
.
getCao
():
""
)
+
" \n "
+
"MgO:"
+(
tSampleLaboratorysheet
.
getMgO
()!=
null
?
tSampleLaboratorysheet
.
getMgO
():
""
)
+
" \n "
+
"SiO₂:"
+(
tSampleLaboratorysheet
.
getSiO2
()!=
null
?
tSampleLaboratorysheet
.
getSiO2
():
""
)
+
" \n "
+
"Al₂O₃:"
+(
tSampleLaboratorysheet
.
getAl2O3
()!=
null
?
tSampleLaboratorysheet
.
getAl2O3
():
""
)
+
" \n "
+
"Fe₂O₃:"
+(
tSampleLaboratorysheet
.
getFe2O3
()!=
null
?
tSampleLaboratorysheet
.
getFe2O3
():
""
)
+
" \n "
+
"K₂O:"
+(
tSampleLaboratorysheet
.
getK2o
()!=
null
?
tSampleLaboratorysheet
.
getK2o
():
""
)
+
" \n "
+
"Na₂O:"
+(
tSampleLaboratorysheet
.
getNa2O
()!=
null
?
tSampleLaboratorysheet
.
getNa2O
():
""
)
+
" \n "
+
"SO₃:"
+(
tSampleLaboratorysheet
.
getSo3
()!=
null
?
tSampleLaboratorysheet
.
getSo3
():
""
)
+
" \n "
+
"Cl⁻:"
+(
tSampleLaboratorysheet
.
getCl
()!=
null
?
tSampleLaboratorysheet
.
getCl
():
""
)
+
" \n "
+
"烧失量:"
+(
tSampleLaboratorysheet
.
getSsl
()!=
null
?
tSampleLaboratorysheet
.
getSsl
():
""
)
+
" \n "
+
"收样时间:"
+(
tSampleLaboratorysheet
.
getSysj
()!=
null
?
df
.
format
(
tSampleLaboratorysheet
.
getSysj
()):
""
)
+
" \n "
+
"化验人:"
+(
tSampleLaboratorysheet
.
getHyr
()!=
null
?
tSampleLaboratorysheet
.
getHyr
():
""
)
+
" \n "
+
"化验时间:"
+(
tSampleLaboratorysheet
.
getHysj
()!=
null
?
df
.
format
(
tSampleLaboratorysheet
.
getHysj
()):
""
);
}
//获取二维码或者记录形式
//先生成二维码并且放到实体中
tSampleLaboratorysheet
.
setQRCode
(
ImageUtil
.
QRCodeGenerator
(
JSON
.
toJSONString
(
tSampleLaboratorysheet
)));
// tSampleLaboratorysheet.setQRCode(ImageUtil.QRCodeGenerator(JSON.toJSONString(tSampleLaboratorysheet)));
tSampleLaboratorysheet
.
setQRCode
(
ImageUtil
.
QRCodeGenerator
(
content
));
//下载图片
ImageUtil
.
getImage
(
ProjectEnum
.
ImageType
.
QR_CODE
.
getValue
(),
tSampleLaboratorysheet
,
response
);
//如果下载失败才会执行return
...
...
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