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
def67647
Commit
def67647
authored
Mar 19, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检测报告 优化
parent
7d9c3fe8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
633 additions
and
460 deletions
+633
-460
ReportController.java
.../wise/sc/cement/business/controller/ReportController.java
+11
-8
EntrustReport.java
...java/cn/wise/sc/cement/business/entity/EntrustReport.java
+2
-2
SampleCheckMapper.java
.../cn/wise/sc/cement/business/mapper/SampleCheckMapper.java
+3
-3
EntrustMapper.xml
...a/cn/wise/sc/cement/business/mapper/xml/EntrustMapper.xml
+1
-17
SampleCheckMapper.xml
.../wise/sc/cement/business/mapper/xml/SampleCheckMapper.xml
+1
-2
ElementKey.java
...ain/java/cn/wise/sc/cement/business/model/ElementKey.java
+9
-8
ElementReport.java
.../java/cn/wise/sc/cement/business/model/ElementReport.java
+3
-29
IndustrialReport.java
...va/cn/wise/sc/cement/business/model/IndustrialReport.java
+13
-42
TenElementReport.java
...cn/wise/sc/cement/business/model/vo/TenElementReport.java
+37
-0
IEntrustService.java
...a/cn/wise/sc/cement/business/service/IEntrustService.java
+1
-9
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+220
-125
report_new.ftl
cement-business/src/main/resources/templates/report_new.ftl
+332
-215
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/ReportController.java
View file @
def67647
...
...
@@ -4,11 +4,11 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.wise.sc.cement.business.entity.EntityEnclosure
;
import
cn.wise.sc.cement.business.entity.Sample
;
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.EntrustVo
;
import
cn.wise.sc.cement.business.model.vo.TenElementReport
;
import
cn.wise.sc.cement.business.service.IEntityEnclosureService
;
import
cn.wise.sc.cement.business.service.IEntrustService
;
import
cn.wise.sc.cement.business.util.WordUtil
;
...
...
@@ -21,7 +21,6 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.Assert
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -34,7 +33,6 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.IOException
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* @description: 报告管理
...
...
@@ -106,15 +104,20 @@ public class ReportController {
//十元素1导出
List
<
TenElementReport
>
list1
=
iEntrustService
.
getTen1List
(
entrustId
);
beanParams
.
put
(
"list1"
,
list1
);
//工艺性能
//物理性能
//颗粒分析
//煤的工业分析
List
<
IndustrialReport
>
list3
=
iEntrustService
.
getIndustrialList
(
entrustId
);
beanParams
.
put
(
"list3"
,
list3
);
//事项-----不用处理
//十元素2导出
List
<
TenElementReport
>
list2
=
iEntrustService
.
getTen2List
(
entrustId
);
beanParams
.
put
(
"list2"
,
list2
);
//化学工业导出
List
<
IndustrialReport
>
list3
=
iEntrustService
.
getSampleIndustrialCheck
(
entrustId
);
beanParams
.
put
(
"list3"
,
list3
);
//品质-----不用处理
WordUtil
.
writeWordReport
(
rts
.
getProjectName
()
+
"(报告)"
,
"report_new.ftl"
,
beanParams
,
response
,
FileExt
.
EXCL
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/entity/EntrustReport.java
View file @
def67647
...
...
@@ -6,8 +6,8 @@ import java.util.Date;
/**
* @description: 委托报告
* @author:
qh
* @create: 202
0-09-25 20:36
* @author:
ztw
* @create: 202
1-3-19
**/
@Data
public
class
EntrustReport
{
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/SampleCheckMapper.java
View file @
def67647
...
...
@@ -2,7 +2,7 @@ package cn.wise.sc.cement.business.mapper;
import
cn.wise.sc.cement.business.entity.SampleCheck
;
import
cn.wise.sc.cement.business.model.IndustrialReport
;
import
cn.wise.sc.cement.business.model.
Ten
ElementReport
;
import
cn.wise.sc.cement.business.model.ElementReport
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -20,12 +20,12 @@ import java.util.Set;
public
interface
SampleCheckMapper
extends
BaseMapper
<
SampleCheck
>
{
/**
* 获取样品
十元素1
检测结果
* 获取样品检测结果
*
* @param entrustId 项目id
* @return SixElementReport
*/
List
<
Ten
ElementReport
>
getSampleElementCheck
(
@Param
(
"entrustId"
)
Integer
entrustId
,
@Param
(
"teamNames"
)
Set
<
String
>
teamNames
);
List
<
ElementReport
>
getSampleElementCheck
(
@Param
(
"entrustId"
)
Integer
entrustId
,
@Param
(
"teamNames"
)
Set
<
String
>
teamNames
);
/**
* 获取样品工业检测结果
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/EntrustMapper.xml
View file @
def67647
...
...
@@ -330,20 +330,6 @@
</where>
</sql>
<!-- <select id="getReportDetail" resultType="cn.wise.sc.cement.business.entity.EntrustReport">
SELECT e.id,e.project_name,e.send_name,e.client_id,e.entrust_code,e.project_type,sscct.* FROM entrust e
RIGHT JOIN
(SELECT id,entrust_id,team_ids,method_numbers,name,scct.check_id,
scct.equipment_name,scct.user_id,create_time as send_time,scct.equipment_id FROM sample s
RIGHT JOIN
(SELECT check_id,equipment_name,sample_id,user_id,equipment_id FROM sample_check_team sct
RIGHT JOIN
(SELECT entrust_id,id FROM sample_check WHERE entrust_id = #{entrustId}) sc
ON sct.check_id = sc.id ) scct
ON s.id = scct.sample_id) sscct
ON sscct.entrust_id = e.id
WHERE e.id IS NOT NULL
</select>-->
<select
id=
"getReportDetail"
resultType=
"cn.wise.sc.cement.business.entity.EntrustReport"
>
SELECT e.id,e.project_name,e.send_name,e.client_id,e.entrust_code,e.project_type,s_tab.*
...
...
@@ -356,7 +342,7 @@
RIGHT JOIN(
SELECT sd.id,sd.check_id,sd.sample_id,sd.user_id,
sde.equipment_id,sde.equipment_name FROM sample_distribution sd
left JOIN sample_distribution_equipment sde ON sde.distribution_id = sd.id where sd.entrust_id =
90
left JOIN sample_distribution_equipment sde ON sde.distribution_id = sd.id where sd.entrust_id =
#{entrustId}
)sd_tab
ON s.id = sd_tab.sample_id
) s_tab
...
...
@@ -381,8 +367,6 @@
<select
id=
"getSampleReturnHandlePage"
resultType=
"cn.wise.sc.cement.business.model.vo.SampleReturnHandleVo"
>
select t.id as id, e.id as entrustId, e.entrust_code as entrustCode,p.id as projectId, p.name as projectName, p.code as projectCode,
e.client_id as clientId, c.name as clientName, e.is_urgent as isUrgent, e.project_type as projectType,
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/SampleCheckMapper.xml
View file @
def67647
...
...
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.wise.sc.cement.business.mapper.SampleCheckMapper"
>
<select
id=
"getSampleElementCheck"
resultType=
"cn.wise.sc.cement.business.model.
Ten
ElementReport"
>
<select
id=
"getSampleElementCheck"
resultType=
"cn.wise.sc.cement.business.model.ElementReport"
>
select s.id,s.name as sampleName,s.sample_form as sampleForm,s.sample_code as sampleCode,s.weight as weight,
s.weight_type as weightType,s.cement_code as cementCode,
t.name as teamName,IF(ISNULL(sdc.last_result),'—',sdc.last_result) as lastResult
...
...
@@ -19,7 +19,6 @@
</select>
<select
id=
"getSampleIndustrialCheck"
resultType=
"cn.wise.sc.cement.business.model.IndustrialReport"
>
SELECT * FROM (SELECT count_results,entrust_id,team_group_name,sct.sample_id FROM sample_check sc
LEFT JOIN
(SELECT check_id,sample_id FROM sample_check_team) sct
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/
Ten
ElementKey.java
→
cement-business/src/main/java/cn/wise/sc/cement/business/model/ElementKey.java
View file @
def67647
package
cn
.
wise
.
sc
.
cement
.
business
.
model
;
/**
* @description:
十元素
检测结果中的key
* @author:
qh
* @create: 202
0-10-15 14:03
* @description: 检测结果中的key
* @author:
ztw
* @create: 202
1-3-19
**/
public
enum
Ten
ElementKey
{
public
enum
ElementKey
{
//十元素key
LOI
(
"L.O.I"
),
...
...
@@ -23,14 +23,15 @@ public enum TenElementKey {
TiO2
(
"TiO<sub>2</sub>"
),
MnO
(
"MnO"
),
//煤的工业分析key
Gyfx
(
"工业分析"
),
Stad
(
"St,ad"
),
Km
(
"可磨"
)
;
private
String
key
;
Ten
ElementKey
(
String
key
)
{
ElementKey
(
String
key
)
{
this
.
key
=
key
;
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/
Ten
ElementReport.java
→
cement-business/src/main/java/cn/wise/sc/cement/business/model/ElementReport.java
View file @
def67647
package
cn
.
wise
.
sc
.
cement
.
business
.
model
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.apache.commons.lang3.StringUtils
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* @description:
十元素
检测报告
* @description:
样品
检测报告
* @author: ztw
* @create: 202
0-10-15 12:24
* @create: 202
1-3-19
**/
@Data
public
class
Ten
ElementReport
implements
Serializable
{
public
class
ElementReport
implements
Serializable
{
private
static
final
long
serialVersionUID
=
42L
;
/**
* 样品id
*/
...
...
@@ -62,25 +57,4 @@ public class TenElementReport implements Serializable {
*/
private
String
lastResult
;
//下面为十元素1 十元素2共有的
private
String
loi
=
""
;
private
String
sio2
=
""
;
private
String
fe2o3
=
""
;
private
String
cao
=
""
;
private
String
mgo
=
""
;
private
String
k2o
=
""
;
private
String
na2o
=
""
;
private
String
so3
=
""
;
private
String
cl
=
""
;
//下面为十元素1
private
String
al2o3AndTio2
=
""
;
private
String
fsio2
=
""
;
//下面为十元素2
private
String
al2o3
=
""
;
private
String
tio2
=
""
;
private
String
mno
=
""
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/IndustrialReport.java
View file @
def67647
...
...
@@ -4,52 +4,23 @@ import lombok.Data;
import
java.io.Serializable
;
/**
* @description: 工业分析报告
* @description:
煤的
工业分析报告
* @author: qh
* @create: 202
0-10-16 14:06
* @create: 202
1-3-19
**/
@Data
public
class
IndustrialReport
implements
Serializable
{
public
class
IndustrialReport
extends
ElementReport
implements
Serializable
{
private
static
final
long
serialVersionUID
=
42L
;
/**
* 样品名称
*/
private
String
sampleName
;
/**
* 来样状态
*/
private
String
sampleForm
;
/**
* 来样编号
*/
private
String
sampleCode
;
/**
* 样品重量
*/
private
String
weight
;
/**
* 本所编号
*/
private
String
cementCode
;
/**
* 校核数据
*/
private
String
countResults
;
//下面是工业特性得检测项
private
String
mad
;
private
String
aad
;
private
String
vad
;
private
String
mjkg
;
private
String
jz
;
private
String
qnetstad
;
private
String
stad
;
//下面是煤的工业分析检测项
private
String
mad
=
""
;
private
String
aad
=
""
;
private
String
vad
=
""
;
private
String
qnetadmjkg
=
""
;
private
String
jztx
=
""
;
private
String
stad
=
""
;
private
String
clad
=
""
;
private
String
hgi
=
""
;
private
String
cyl
=
""
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/TenElementReport.java
0 → 100644
View file @
def67647
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
TenElementReport
extends
ElementReport
implements
Serializable
{
private
static
final
long
serialVersionUID
=
42L
;
//下面为十元素1 十元素2共有的
private
String
loi
=
""
;
private
String
sio2
=
""
;
private
String
fe2o3
=
""
;
private
String
cao
=
""
;
private
String
mgo
=
""
;
private
String
k2o
=
""
;
private
String
na2o
=
""
;
private
String
so3
=
""
;
private
String
cl
=
""
;
//下面为十元素1
private
String
al2o3AndTio2
=
""
;
private
String
fsio2
=
""
;
//下面为十元素2
private
String
al2o3
=
""
;
private
String
tio2
=
""
;
private
String
mno
=
""
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEntrustService.java
View file @
def67647
...
...
@@ -142,15 +142,7 @@ public interface IEntrustService extends IService<Entrust> {
List
<
TenElementReport
>
getTen2List
(
Integer
entrustId
);
/**
* 查询工业特性
*
* @param entrustId 委托id
* @return 工业特征
*/
List
<
IndustrialReport
>
getSampleIndustrialCheck
(
Integer
entrustId
);
List
<
IndustrialReport
>
getIndustrialList
(
Integer
entrustId
);
//质量管理
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
def67647
This diff is collapsed.
Click to expand it.
cement-business/src/main/resources/templates/report_new.ftl
View file @
def67647
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