Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
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
竹天卫
tianjin-cement
Commits
9654f86c
Commit
9654f86c
authored
Mar 22, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检测报告完成
parent
533d6841
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
391 additions
and
542 deletions
+391
-542
ReportController.java
.../wise/sc/cement/business/controller/ReportController.java
+6
-14
WeiXinController.java
.../wise/sc/cement/business/controller/WeiXinController.java
+4
-4
ElementKey.java
...ain/java/cn/wise/sc/cement/business/model/ElementKey.java
+12
-1
GrainReport.java
...java/cn/wise/sc/cement/business/model/vo/GrainReport.java
+32
-0
PhysicsReport.java
...va/cn/wise/sc/cement/business/model/vo/PhysicsReport.java
+28
-0
IEntrustService.java
...a/cn/wise/sc/cement/business/service/IEntrustService.java
+5
-0
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+127
-13
report_new.ftl
cement-business/src/main/resources/templates/report_new.ftl
+177
-510
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/ReportController.java
View file @
9654f86c
...
...
@@ -7,10 +7,7 @@ import cn.wise.sc.cement.business.entity.EntityEnclosure;
import
cn.wise.sc.cement.business.model.*
;
import
cn.wise.sc.cement.business.enumation.FileExt
;
import
cn.wise.sc.cement.business.model.query.SampleHandleEnclosureQuery
;
import
cn.wise.sc.cement.business.model.vo.CraftReport
;
import
cn.wise.sc.cement.business.model.vo.EntrustVo
;
import
cn.wise.sc.cement.business.model.vo.IndustrialReport
;
import
cn.wise.sc.cement.business.model.vo.TenElementReport
;
import
cn.wise.sc.cement.business.model.vo.*
;
import
cn.wise.sc.cement.business.service.IEntityEnclosureService
;
import
cn.wise.sc.cement.business.service.IEntrustService
;
import
cn.wise.sc.cement.business.util.WordUtil
;
...
...
@@ -83,7 +80,7 @@ public class ReportController {
response
.
getWriter
().
write
(
"需要的数据不全!"
);
return
;
}
Map
<
String
,
Object
>
beanParams
=
new
HashMap
<>(
10
);
Map
<
String
,
Object
>
beanParams
=
new
HashMap
<>(
22
);
beanParams
.
put
(
"sendName"
,
rts
.
getSendName
());
beanParams
.
put
(
"sender"
,
rts
.
getSender
());
beanParams
.
put
(
"sendDate"
,
rts
.
getSendDate
());
...
...
@@ -115,17 +112,12 @@ public class ReportController {
//工艺性能
List
<
CraftReport
>
list4
=
iEntrustService
.
getCraftList
(
entrustId
);
beanParams
.
put
(
"list4"
,
list4
);
//物理性能
List
<
PhysicsReport
>
list5
=
iEntrustService
.
getPhysicsList
(
entrustId
);
beanParams
.
put
(
"list5"
,
list5
);
//颗粒分析
List
<
GrainReport
>
list6
=
iEntrustService
.
getGrainList
(
entrustId
);
beanParams
.
put
(
"list6"
,
list6
);
//事项-----不用处理
//品质-----不用处理
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/WeiXinController.java
View file @
9654f86c
...
...
@@ -40,9 +40,9 @@ public class WeiXinController {
log
.
debug
(
"============================================="
);
try
{
//测试服务器
//
return weiXinService.getTestToken(code);
return
weiXinService
.
getTestToken
(
code
);
//正式服务器
return
weiXinService
.
getToken
(
code
,
"APP"
);
//
return weiXinService.getToken(code, "APP");
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取登录token{}"
,
e
);
}
...
...
@@ -54,9 +54,9 @@ public class WeiXinController {
public
BaseResponse
getPCToken
(
String
code
)
{
try
{
//测试服务器
//
return weiXinService.getTestToken(code);
return
weiXinService
.
getTestToken
(
code
);
//正式服务器
return
weiXinService
.
getToken
(
code
,
"PC"
);
//
return weiXinService.getToken(code, "PC");
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取登录token{}"
,
e
);
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/ElementKey.java
View file @
9654f86c
...
...
@@ -37,8 +37,19 @@ public enum ElementKey {
//易烧性 直接取游离钙的结果
FCaO1350
(
"fCaO 1350"
),
FCaO1400
(
"fCaO 1400"
),
FCaO1450
(
"fCaO 1450"
)
FCaO1450
(
"fCaO 1450"
)
,
//物理性能key
Xd45um
(
"45μm细度"
),
Xd80um
(
"80μm细度"
),
Xd200um
(
"200μm细度"
),
Bbmj
(
"比表面积"
),
Md
(
"密度"
),
Sxzs
(
"塑性指数"
),
Sf
(
"水分"
),
//颗粒分析key
Jgldfx
(
"激光粒度分析"
),
;
private
String
key
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/GrainReport.java
0 → 100644
View file @
9654f86c
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
vo
;
import
cn.wise.sc.cement.business.model.ElementReport
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @description: 颗粒分析报告
* @author: ztw
* @create: 2021-3-19
**/
@Data
public
class
GrainReport
extends
ElementReport
implements
Serializable
{
private
static
final
long
serialVersionUID
=
42L
;
//下面是物理性能析检测项
private
String
jzmc
=
""
;
private
String
jzzsl
=
""
;
private
String
yqzjjzrq
=
""
;
private
String
zgb
=
""
;
private
String
csbgl
=
""
;
private
String
d10
=
""
;
private
String
d50
=
""
;
private
String
d90
=
""
;
private
String
bmjjyljd
=
""
;
private
String
tzlj
=
""
;
private
String
jyxxsn
=
""
;
private
String
ljfbbt
=
""
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/PhysicsReport.java
0 → 100644
View file @
9654f86c
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
vo
;
import
cn.wise.sc.cement.business.model.ElementReport
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @description: 物理性能报告
* @author: ztw
* @create: 2021-3-19
**/
@Data
public
class
PhysicsReport
extends
ElementReport
implements
Serializable
{
private
static
final
long
serialVersionUID
=
42L
;
//下面是物理性能析检测项
private
String
xd45um
=
""
;
private
String
xd80um
=
""
;
private
String
xd200um
=
""
;
private
String
bbmj
=
""
;
private
String
md
=
""
;
private
String
sxzs_yx
=
""
;
private
String
sxzs_sx
=
""
;
private
String
sxzs_sxzs
=
""
;
private
String
hsl
=
""
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEntrustService.java
View file @
9654f86c
...
...
@@ -146,6 +146,11 @@ public interface IEntrustService extends IService<Entrust> {
List
<
CraftReport
>
getCraftList
(
Integer
entrustId
);
List
<
PhysicsReport
>
getPhysicsList
(
Integer
entrustId
);
List
<
GrainReport
>
getGrainList
(
Integer
entrustId
);
//质量管理
BaseResponse
<
IPage
<
EntrustVo
>>
getQualityPage
(
PageQuery
pageQuery
,
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
9654f86c
...
...
@@ -5121,7 +5121,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
/**
* 获取
煤的
工艺性能的检测信息
* 获取工艺性能的检测信息
* @param entrustId 委托id
* @return
*/
...
...
@@ -5213,36 +5213,150 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
/**
*
特殊处理的检测项最终结果拆分显示
* @param
lastResult
*
获取物理性能的检测信息
* @param
entrustId 委托id
* @return
*/
private
Map
<
String
,
String
>
splitLastResult
(
String
lastResult
){
Map
<
String
,
String
>
map
=
new
HashMap
<>();
if
(
StringUtils
.
isNotBlank
(
lastResult
)){
String
[]
str
=
lastResult
.
split
(
"\n"
);
for
(
String
str2
:
str
){
String
[]
ele
=
str2
.
trim
().
split
(
"="
);
map
.
put
(
ele
[
0
],
ele
[
1
]);
@Override
public
List
<
PhysicsReport
>
getPhysicsList
(
Integer
entrustId
)
{
List
<
PhysicsReport
>
newList
=
null
;
List
<
ElementReport
>
list
=
getSamplePhysicsElementCheck
(
entrustId
);
if
(
list
!=
null
&&
list
.
size
()
>
0
){
newList
=
new
ArrayList
<>();
}
Map
<
Integer
,
List
<
ElementReport
>>
groupBySample
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
ElementReport:
:
getId
,
Collectors
.
toList
()));
for
(
Map
.
Entry
<
Integer
,
List
<
ElementReport
>>
entry
:
groupBySample
.
entrySet
()){
ElementReport
first
=
entry
.
getValue
().
get
(
0
);
PhysicsReport
report
=
new
PhysicsReport
();
BeanUtils
.
copyProperties
(
first
,
report
);
Map
<
String
,
ElementReport
>
reportMap
=
entry
.
getValue
().
stream
().
collect
(
Collectors
.
toMap
(
ElementReport:
:
getTeamName
,
item
->
item
));
report
.
setXd45um
(
reportMap
.
get
(
ElementKey
.
Xd45um
.
getKey
())==
null
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
reportMap
.
get
(
ElementKey
.
Xd45um
.
getKey
()).
getLastResult
())
?
"—"
:
reportMap
.
get
(
ElementKey
.
Xd45um
.
getKey
()).
getLastResult
());
report
.
setXd80um
(
reportMap
.
get
(
ElementKey
.
Xd80um
.
getKey
())==
null
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
reportMap
.
get
(
ElementKey
.
Xd80um
.
getKey
()).
getLastResult
())
?
"—"
:
reportMap
.
get
(
ElementKey
.
Xd80um
.
getKey
()).
getLastResult
());
report
.
setXd200um
(
reportMap
.
get
(
ElementKey
.
Xd200um
.
getKey
())==
null
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
reportMap
.
get
(
ElementKey
.
Xd200um
.
getKey
()).
getLastResult
())
?
"—"
:
reportMap
.
get
(
ElementKey
.
Xd200um
.
getKey
()).
getLastResult
());
report
.
setBbmj
(
reportMap
.
get
(
ElementKey
.
Bbmj
.
getKey
())==
null
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
reportMap
.
get
(
ElementKey
.
Bbmj
.
getKey
()).
getLastResult
())
?
"—"
:
reportMap
.
get
(
ElementKey
.
Bbmj
.
getKey
()).
getLastResult
());
report
.
setMd
(
reportMap
.
get
(
ElementKey
.
Md
.
getKey
())==
null
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
reportMap
.
get
(
ElementKey
.
Md
.
getKey
()).
getLastResult
())
?
"—"
:
reportMap
.
get
(
ElementKey
.
Md
.
getKey
()).
getLastResult
());
//塑性指数结果拆分
String
sxzsLastResult
=
reportMap
.
get
(
ElementKey
.
Sxzs
.
getKey
())==
null
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
reportMap
.
get
(
ElementKey
.
Sxzs
.
getKey
()).
getLastResult
())?
""
:
reportMap
.
get
(
ElementKey
.
Sxzs
.
getKey
()).
getLastResult
();
if
(
StringUtils
.
isNotBlank
(
sxzsLastResult
)
&&
sxzsLastResult
.
contains
(
"="
)){
Map
<
String
,
String
>
sxzsMap
=
splitLastResult
(
sxzsLastResult
);
report
.
setSxzs_yx
(
sxzsMap
==
null
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
sxzsMap
.
get
(
"液限"
))
?
"—"
:
sxzsMap
.
get
(
"液限"
));
report
.
setSxzs_sx
(
sxzsMap
==
null
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
sxzsMap
.
get
(
"塑限"
))
?
"—"
:
sxzsMap
.
get
(
"塑限"
));
report
.
setSxzs_sxzs
(
sxzsMap
==
null
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
sxzsMap
.
get
(
"塑性指数"
))
?
"—"
:
sxzsMap
.
get
(
"塑性指数"
));
}
else
{
report
.
setSxzs_yx
(
"—"
);
report
.
setSxzs_sx
(
"—"
);
report
.
setSxzs_sxzs
(
"—"
);
}
return
map
;
report
.
setHsl
(
reportMap
.
get
(
ElementKey
.
Sf
.
getKey
())==
null
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
reportMap
.
get
(
ElementKey
.
Sf
.
getKey
()).
getLastResult
())
?
"—"
:
reportMap
.
get
(
ElementKey
.
Sf
.
getKey
()).
getLastResult
());
newList
.
add
(
report
);
}
//将样品重量换算成kg
if
(
newList
!=
null
){
newList
.
stream
().
forEach
(
arg
->{
arg
.
setWeight
(
Sample
.
weight2Kg
(
arg
.
getWeight
(),
arg
.
getWeightType
()));
});
}
return
newList
;
}
//获取物理性能的检测项检测信息
private
List
<
ElementReport
>
getSamplePhysicsElementCheck
(
Integer
entrustId
)
{
Set
<
String
>
list
=
new
HashSet
<>(
7
);
list
.
add
(
"45μm细度"
);
list
.
add
(
"80μm细度"
);
list
.
add
(
"200μm细度"
);
list
.
add
(
"比表面积"
);
list
.
add
(
"密度"
);
list
.
add
(
"塑性指数"
);
list
.
add
(
"水分"
);
return
sampleCheckMapper
.
getSampleElementCheck
(
entrustId
,
list
);
}
/**
* 获取颗粒分析的检测信息
* @param entrustId 委托id
* @return
*/
@Override
public
List
<
GrainReport
>
getGrainList
(
Integer
entrustId
)
{
List
<
GrainReport
>
newList
=
null
;
List
<
ElementReport
>
list
=
getSampleGrainElementCheck
(
entrustId
);
if
(
list
!=
null
&&
list
.
size
()
>
0
){
newList
=
new
ArrayList
<>();
}
Map
<
Integer
,
List
<
ElementReport
>>
groupBySample
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
ElementReport:
:
getId
,
Collectors
.
toList
()));
for
(
Map
.
Entry
<
Integer
,
List
<
ElementReport
>>
entry
:
groupBySample
.
entrySet
()){
ElementReport
first
=
entry
.
getValue
().
get
(
0
);
GrainReport
report
=
new
GrainReport
();
BeanUtils
.
copyProperties
(
first
,
report
);
Map
<
String
,
ElementReport
>
reportMap
=
entry
.
getValue
().
stream
().
collect
(
Collectors
.
toMap
(
ElementReport:
:
getTeamName
,
item
->
item
));
report
.
setJzmc
(
"—"
);
report
.
setJzzsl
(
"—"
);
report
.
setYqzjjzrq
(
"—"
);
report
.
setZgb
(
"—"
);
report
.
setCsbgl
(
"—"
);
//激光粒度分析结果拆分
String
jgldrfxLastResult
=
reportMap
.
get
(
ElementKey
.
Jgldfx
.
getKey
())==
null
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
reportMap
.
get
(
ElementKey
.
Jgldfx
.
getKey
()).
getLastResult
())?
""
:
reportMap
.
get
(
ElementKey
.
Jgldfx
.
getKey
()).
getLastResult
();
if
(
StringUtils
.
isNotBlank
(
jgldrfxLastResult
)
&&
jgldrfxLastResult
.
contains
(
"="
)){
Map
<
String
,
String
>
jgldrfxMap
=
splitLastResult
(
jgldrfxLastResult
);
report
.
setD10
(
jgldrfxMap
==
null
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
jgldrfxMap
.
get
(
"D10"
))
?
"—"
:
jgldrfxMap
.
get
(
"D10"
));
report
.
setD50
(
jgldrfxMap
==
null
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
jgldrfxMap
.
get
(
"D50"
))
?
"—"
:
jgldrfxMap
.
get
(
"D50"
));
report
.
setD90
(
jgldrfxMap
==
null
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
jgldrfxMap
.
get
(
"D90"
))
?
"—"
:
jgldrfxMap
.
get
(
"D90"
));
}
else
{
report
.
setD10
(
"—"
);
report
.
setD50
(
"—"
);
report
.
setD90
(
"—"
);
}
report
.
setBmjjyljd
(
"—"
);
report
.
setTzlj
(
"—"
);
report
.
setJyxxsn
(
"—"
);
report
.
setLjfbbt
(
"—"
);
newList
.
add
(
report
);
}
//将样品重量换算成kg
if
(
newList
!=
null
){
newList
.
stream
().
forEach
(
arg
->{
arg
.
setWeight
(
Sample
.
weight2Kg
(
arg
.
getWeight
(),
arg
.
getWeightType
()));
});
}
return
newList
;
}
//获取颗粒分析的检测项检测信息
private
List
<
ElementReport
>
getSampleGrainElementCheck
(
Integer
entrustId
)
{
Set
<
String
>
list
=
new
HashSet
<>(
1
);
list
.
add
(
"激光粒度分析"
);
return
sampleCheckMapper
.
getSampleElementCheck
(
entrustId
,
list
);
}
/**
* 特殊处理的检测项最终结果拆分显示
* @param lastResult
* @return
*/
private
Map
<
String
,
String
>
splitLastResult
(
String
lastResult
){
Map
<
String
,
String
>
map
=
new
HashMap
<>();
if
(
StringUtils
.
isNotBlank
(
lastResult
)){
String
[]
str
=
lastResult
.
split
(
"\n"
);
for
(
String
str2
:
str
){
String
[]
ele
=
str2
.
trim
().
split
(
"="
);
map
.
put
(
ele
[
0
],
ele
[
1
]);
}
}
return
map
;
}
//***********************************质量控制************************************
/**
...
...
cement-business/src/main/resources/templates/report_new.ftl
View file @
9654f86c
This diff is collapsed.
Click to expand it.
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