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
2037ac40
Commit
2037ac40
authored
May 08, 2021
by
renchao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.203.232.171:8888/zhutianwei/data-acquisition
parents
f46bda85
291f1cfa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
7 deletions
+38
-7
TMaterialOutQuery.java
...c/acquisition/business/model/query/TMaterialOutQuery.java
+2
-2
TSafeTroubleServiceImpl.java
...sition/business/service/impl/TSafeTroubleServiceImpl.java
+10
-4
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 @
2037ac40
...
@@ -43,13 +43,13 @@ public class TMaterialOutQuery {
...
@@ -43,13 +43,13 @@ public class TMaterialOutQuery {
private
String
processesName
;
private
String
processesName
;
/**
/**
* 材料消耗的类型,包括燃料及动力、润滑察试、配件、工具、火工材料、电力和其它等
* 材料消耗的类型,包括燃料及动力、润滑察试、配件、工具、火工材料、电力和其它等
==== 项目
*/
*/
@ApiModelProperty
(
"材料消耗的类型,包括燃料及动力、润滑察试、配件、工具、火工材料、电力和其它等"
)
@ApiModelProperty
(
"材料消耗的类型,包括燃料及动力、润滑察试、配件、工具、火工材料、电力和其它等"
)
private
String
consumeType
;
private
String
consumeType
;
/**
/**
* 材料消耗日期
* 材料消耗日期
====材料领用日期
*/
*/
@ApiModelProperty
(
"材料消耗日期"
)
@ApiModelProperty
(
"材料消耗日期"
)
private
LocalDateTime
consumeDate
;
private
LocalDateTime
consumeDate
;
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TSafeTroubleServiceImpl.java
View file @
2037ac40
...
@@ -80,8 +80,11 @@ public class TSafeTroubleServiceImpl extends ServiceImpl<TSafeTroubleMapper, TSa
...
@@ -80,8 +80,11 @@ public class TSafeTroubleServiceImpl extends ServiceImpl<TSafeTroubleMapper, TSa
safeTroubleMapper
.
insert
(
safeTrouble
);
safeTroubleMapper
.
insert
(
safeTrouble
);
//保存隐患图片
//保存隐患图片
List
<
MultipartFile
>
photos
=
((
MultipartHttpServletRequest
)
request
).
getFiles
(
"photos"
);
List
<
MultipartFile
>
photos
=
((
MultipartHttpServletRequest
)
request
).
getFiles
(
"photos"
);
return
saveImg
(
TSafeTroubleImg
.
ImgType
.
YH
,
safeTrouble
.
getUid
(),
photos
);
if
(
photos
!=
null
&&
photos
.
size
()
>
0
)
{
return
saveImg
(
TSafeTroubleImg
.
ImgType
.
YH
,
safeTrouble
.
getUid
(),
photos
);
}
return
R
.
ok
();
}
}
...
@@ -100,8 +103,11 @@ public class TSafeTroubleServiceImpl extends ServiceImpl<TSafeTroubleMapper, TSa
...
@@ -100,8 +103,11 @@ public class TSafeTroubleServiceImpl extends ServiceImpl<TSafeTroubleMapper, TSa
safeTroubleMapper
.
updateById
(
safeTrouble
);
safeTroubleMapper
.
updateById
(
safeTrouble
);
//保存隐患图片
//保存隐患图片
List
<
MultipartFile
>
photos
=
((
MultipartHttpServletRequest
)
request
).
getFiles
(
"photos"
);
List
<
MultipartFile
>
photos
=
((
MultipartHttpServletRequest
)
request
).
getFiles
(
"photos"
);
return
saveImg
(
TSafeTroubleImg
.
ImgType
.
ZG
,
safeTrouble
.
getUid
(),
photos
);
if
(
photos
!=
null
&&
photos
.
size
()
>
0
)
{
return
saveImg
(
TSafeTroubleImg
.
ImgType
.
ZG
,
safeTrouble
.
getUid
(),
photos
);
}
return
R
.
ok
();
}
}
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TSampleLaboratorysheetServiceImpl.java
View file @
2037ac40
...
@@ -19,6 +19,7 @@ import org.springframework.stereotype.Service;
...
@@ -19,6 +19,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.time.format.DateTimeFormatter
;
/**
/**
* <p>
* <p>
...
@@ -156,9 +157,33 @@ public class TSampleLaboratorysheetServiceImpl extends ServiceImpl<TSampleLabora
...
@@ -156,9 +157,33 @@ public class TSampleLaboratorysheetServiceImpl extends ServiceImpl<TSampleLabora
if
(
tSampleLaboratorysheet
==
null
)
{
if
(
tSampleLaboratorysheet
==
null
)
{
return
R
.
failed
(
"数据不存在,样号:"
+
query
.
getYh
());
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
);
ImageUtil
.
getImage
(
ProjectEnum
.
ImageType
.
QR_CODE
.
getValue
(),
tSampleLaboratorysheet
,
response
);
//如果下载失败才会执行return
//如果下载失败才会执行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