Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
4 years ago
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检测报告 优化
parent
7d9c3fe8
Expand all
Hide 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;
...
@@ -4,11 +4,11 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.wise.sc.cement.business.entity.EntityEnclosure
;
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.model.*
;
import
cn.wise.sc.cement.business.enumation.FileExt
;
import
cn.wise.sc.cement.business.enumation.FileExt
;
import
cn.wise.sc.cement.business.model.query.SampleHandleEnclosureQuery
;
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.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.IEntityEnclosureService
;
import
cn.wise.sc.cement.business.service.IEntrustService
;
import
cn.wise.sc.cement.business.service.IEntrustService
;
import
cn.wise.sc.cement.business.util.WordUtil
;
import
cn.wise.sc.cement.business.util.WordUtil
;
...
@@ -21,7 +21,6 @@ import io.swagger.annotations.ApiOperation;
...
@@ -21,7 +21,6 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
@@ -34,7 +33,6 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -34,7 +33,6 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
/**
* @description: 报告管理
* @description: 报告管理
...
@@ -106,15 +104,20 @@ public class ReportController {
...
@@ -106,15 +104,20 @@ public class ReportController {
//十元素1导出
//十元素1导出
List
<
TenElementReport
>
list1
=
iEntrustService
.
getTen1List
(
entrustId
);
List
<
TenElementReport
>
list1
=
iEntrustService
.
getTen1List
(
entrustId
);
beanParams
.
put
(
"list1"
,
list1
);
beanParams
.
put
(
"list1"
,
list1
);
//工艺性能
//物理性能
//颗粒分析
//煤的工业分析
List
<
IndustrialReport
>
list3
=
iEntrustService
.
getIndustrialList
(
entrustId
);
beanParams
.
put
(
"list3"
,
list3
);
//事项-----不用处理
//十元素2导出
//十元素2导出
List
<
TenElementReport
>
list2
=
iEntrustService
.
getTen2List
(
entrustId
);
List
<
TenElementReport
>
list2
=
iEntrustService
.
getTen2List
(
entrustId
);
beanParams
.
put
(
"list2"
,
list2
);
beanParams
.
put
(
"list2"
,
list2
);
//品质-----不用处理
//化学工业导出
List
<
IndustrialReport
>
list3
=
iEntrustService
.
getSampleIndustrialCheck
(
entrustId
);
beanParams
.
put
(
"list3"
,
list3
);
WordUtil
.
writeWordReport
(
rts
.
getProjectName
()
+
"(报告)"
,
"report_new.ftl"
,
WordUtil
.
writeWordReport
(
rts
.
getProjectName
()
+
"(报告)"
,
"report_new.ftl"
,
beanParams
,
response
,
FileExt
.
EXCL
);
beanParams
,
response
,
FileExt
.
EXCL
);
...
...
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/entity/EntrustReport.java
View file @
def67647
...
@@ -6,8 +6,8 @@ import java.util.Date;
...
@@ -6,8 +6,8 @@ import java.util.Date;
/**
/**
* @description: 委托报告
* @description: 委托报告
* @author:
qh
* @author:
ztw
* @create: 202
0-09-25 20:36
* @create: 202
1-3-19
**/
**/
@Data
@Data
public
class
EntrustReport
{
public
class
EntrustReport
{
...
...
This diff is collapsed.
Click to expand it.
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;
...
@@ -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.entity.SampleCheck
;
import
cn.wise.sc.cement.business.model.IndustrialReport
;
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
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -20,12 +20,12 @@ import java.util.Set;
...
@@ -20,12 +20,12 @@ import java.util.Set;
public
interface
SampleCheckMapper
extends
BaseMapper
<
SampleCheck
>
{
public
interface
SampleCheckMapper
extends
BaseMapper
<
SampleCheck
>
{
/**
/**
* 获取样品
十元素1
检测结果
* 获取样品检测结果
*
*
* @param entrustId 项目id
* @param entrustId 项目id
* @return SixElementReport
* @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
);
/**
/**
* 获取样品工业检测结果
* 获取样品工业检测结果
...
...
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/EntrustMapper.xml
View file @
def67647
...
@@ -330,20 +330,6 @@
...
@@ -330,20 +330,6 @@
</where>
</where>
</sql>
</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
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.*
SELECT e.id,e.project_name,e.send_name,e.client_id,e.entrust_code,e.project_type,s_tab.*
...
@@ -356,7 +342,7 @@
...
@@ -356,7 +342,7 @@
RIGHT JOIN(
RIGHT JOIN(
SELECT sd.id,sd.check_id,sd.sample_id,sd.user_id,
SELECT sd.id,sd.check_id,sd.sample_id,sd.user_id,
sde.equipment_id,sde.equipment_name FROM sample_distribution sd
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
)sd_tab
ON s.id = sd_tab.sample_id
ON s.id = sd_tab.sample_id
) s_tab
) s_tab
...
@@ -381,8 +367,6 @@
...
@@ -381,8 +367,6 @@
<select
id=
"getSampleReturnHandlePage"
resultType=
"cn.wise.sc.cement.business.model.vo.SampleReturnHandleVo"
>
<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,
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,
e.client_id as clientId, c.name as clientName, e.is_urgent as isUrgent, e.project_type as projectType,
...
...
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/SampleCheckMapper.xml
View file @
def67647
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!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"
>
<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,
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,
s.weight_type as weightType,s.cement_code as cementCode,
t.name as teamName,IF(ISNULL(sdc.last_result),'—',sdc.last_result) as lastResult
t.name as teamName,IF(ISNULL(sdc.last_result),'—',sdc.last_result) as lastResult
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
</select>
</select>
<select
id=
"getSampleIndustrialCheck"
resultType=
"cn.wise.sc.cement.business.model.IndustrialReport"
>
<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
SELECT * FROM (SELECT count_results,entrust_id,team_group_name,sct.sample_id FROM sample_check sc
LEFT JOIN
LEFT JOIN
(SELECT check_id,sample_id FROM sample_check_team) sct
(SELECT check_id,sample_id FROM sample_check_team) sct
...
...
This diff is collapsed.
Click to expand it.
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
;
package
cn
.
wise
.
sc
.
cement
.
business
.
model
;
/**
/**
* @description:
十元素
检测结果中的key
* @description: 检测结果中的key
* @author:
qh
* @author:
ztw
* @create: 202
0-10-15 14:03
* @create: 202
1-3-19
**/
**/
public
enum
Ten
ElementKey
{
public
enum
ElementKey
{
//十元素key
//十元素key
LOI
(
"L.O.I"
),
LOI
(
"L.O.I"
),
...
@@ -23,14 +23,15 @@ public enum TenElementKey {
...
@@ -23,14 +23,15 @@ public enum TenElementKey {
TiO2
(
"TiO<sub>2</sub>"
),
TiO2
(
"TiO<sub>2</sub>"
),
MnO
(
"MnO"
),
MnO
(
"MnO"
),
//煤的工业分析key
Gyfx
(
"工业分析"
),
Stad
(
"St,ad"
),
Km
(
"可磨"
)
;
;
private
String
key
;
private
String
key
;
Ten
ElementKey
(
String
key
)
{
ElementKey
(
String
key
)
{
this
.
key
=
key
;
this
.
key
=
key
;
}
}
...
...
This diff is collapsed.
Click to expand it.
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
;
package
cn
.
wise
.
sc
.
cement
.
business
.
model
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.commons.lang3.StringUtils
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
/**
* @description:
十元素
检测报告
* @description:
样品
检测报告
* @author: ztw
* @author: ztw
* @create: 202
0-10-15 12:24
* @create: 202
1-3-19
**/
**/
@Data
@Data
public
class
Ten
ElementReport
implements
Serializable
{
public
class
ElementReport
implements
Serializable
{
private
static
final
long
serialVersionUID
=
42L
;
private
static
final
long
serialVersionUID
=
42L
;
/**
/**
* 样品id
* 样品id
*/
*/
...
@@ -62,25 +57,4 @@ public class TenElementReport implements Serializable {
...
@@ -62,25 +57,4 @@ public class TenElementReport implements Serializable {
*/
*/
private
String
lastResult
;
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
=
""
;
}
}
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/model/IndustrialReport.java
View file @
def67647
...
@@ -4,52 +4,23 @@ import lombok.Data;
...
@@ -4,52 +4,23 @@ import lombok.Data;
import
java.io.Serializable
;
import
java.io.Serializable
;
/**
/**
* @description: 工业分析报告
* @description:
煤的
工业分析报告
* @author: qh
* @author: qh
* @create: 202
0-10-16 14:06
* @create: 202
1-3-19
**/
**/
@Data
@Data
public
class
IndustrialReport
implements
Serializable
{
public
class
IndustrialReport
extends
ElementReport
implements
Serializable
{
private
static
final
long
serialVersionUID
=
42L
;
private
static
final
long
serialVersionUID
=
42L
;
/**
//下面是煤的工业分析检测项
* 样品名称
private
String
mad
=
""
;
*/
private
String
aad
=
""
;
private
String
sampleName
;
private
String
vad
=
""
;
private
String
qnetadmjkg
=
""
;
/**
private
String
jztx
=
""
;
* 来样状态
private
String
stad
=
""
;
*/
private
String
clad
=
""
;
private
String
sampleForm
;
private
String
hgi
=
""
;
private
String
cyl
=
""
;
/**
* 来样编号
*/
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
;
}
}
This diff is collapsed.
Click to expand it.
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
=
""
;
}
This diff is collapsed.
Click to expand it.
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> {
...
@@ -142,15 +142,7 @@ public interface IEntrustService extends IService<Entrust> {
List
<
TenElementReport
>
getTen2List
(
Integer
entrustId
);
List
<
TenElementReport
>
getTen2List
(
Integer
entrustId
);
List
<
IndustrialReport
>
getIndustrialList
(
Integer
entrustId
);
/**
* 查询工业特性
*
* @param entrustId 委托id
* @return 工业特征
*/
List
<
IndustrialReport
>
getSampleIndustrialCheck
(
Integer
entrustId
);
//质量管理
//质量管理
...
...
This diff is collapsed.
Click to expand it.
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