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
64168ce1
Commit
64168ce1
authored
Oct 16, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.203.232.171:8888/zhutianwei/tianjin-cement
parents
42aa1c3e
5366470d
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
3046 additions
and
535 deletions
+3046
-535
EntrustController.java
...wise/sc/cement/business/controller/EntrustController.java
+440
-406
NormProductionController.java
.../cement/business/controller/NormProductionController.java
+5
-4
ReportController.java
.../wise/sc/cement/business/controller/ReportController.java
+3
-2
NormProductionStatistics.java
...e/sc/cement/business/entity/NormProductionStatistics.java
+2
-0
FileExt.java
...c/main/java/cn/wise/sc/cement/business/model/FileExt.java
+23
-0
NonStandardValueVo.java
.../wise/sc/cement/business/model/vo/NonStandardValueVo.java
+1
-1
NormProductionVo.java
...cn/wise/sc/cement/business/model/vo/NormProductionVo.java
+6
-0
ProductionVo.java
...ava/cn/wise/sc/cement/business/model/vo/ProductionVo.java
+2
-0
SampleDistributionTeamVo.java
...sc/cement/business/model/vo/SampleDistributionTeamVo.java
+0
-10
IEntrustService.java
...a/cn/wise/sc/cement/business/service/IEntrustService.java
+1
-0
INormProductionService.java
...se/sc/cement/business/service/INormProductionService.java
+12
-2
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+92
-0
NonStandardValueServiceImpl.java
...nt/business/service/impl/NonStandardValueServiceImpl.java
+1
-1
NormProductionServiceImpl.java
...ment/business/service/impl/NormProductionServiceImpl.java
+21
-6
WordUtil.java
...c/main/java/cn/wise/sc/cement/business/util/WordUtil.java
+4
-2
entrust.ftl
cement-business/src/main/resources/templates/entrust.ftl
+0
-101
entrust2.ftl
cement-business/src/main/resources/templates/entrust2.ftl
+2433
-0
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/EntrustController.java
View file @
64168ce1
...
@@ -2,10 +2,13 @@ package cn.wise.sc.cement.business.controller;
...
@@ -2,10 +2,13 @@ package cn.wise.sc.cement.business.controller;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.FileExt
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.ReportDetailVo
;
import
cn.wise.sc.cement.business.model.ReportDetailVo
;
import
cn.wise.sc.cement.business.model.query.*
;
import
cn.wise.sc.cement.business.model.query.*
;
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.SampleDistributionTeamVo
;
import
cn.wise.sc.cement.business.model.vo.SampleVo
;
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
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -19,8 +22,11 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -19,8 +22,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* <p>
* <p>
...
@@ -30,7 +36,7 @@ import java.util.Map;
...
@@ -30,7 +36,7 @@ import java.util.Map;
* @author ztw
* @author ztw
* @since 2020-08-24
* @since 2020-08-24
*/
*/
@Api
(
tags
=
"委托管理"
)
@Api
(
tags
=
"委托管理"
)
@RestController
@RestController
@RequestMapping
(
"/business/entrust"
)
@RequestMapping
(
"/business/entrust"
)
public
class
EntrustController
{
public
class
EntrustController
{
...
@@ -84,8 +90,8 @@ public class EntrustController {
...
@@ -84,8 +90,8 @@ public class EntrustController {
public
BaseResponse
setTopping
(
Integer
id
)
{
public
BaseResponse
setTopping
(
Integer
id
)
{
try
{
try
{
return
entrustService
.
setTopping
(
id
);
return
entrustService
.
setTopping
(
id
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"置顶取消置顶{}"
,
e
);
log
.
debug
(
"置顶取消置顶{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
...
@@ -95,19 +101,19 @@ public class EntrustController {
...
@@ -95,19 +101,19 @@ public class EntrustController {
public
BaseResponse
create
(
@RequestBody
EntrustQuery
query
)
{
public
BaseResponse
create
(
@RequestBody
EntrustQuery
query
)
{
try
{
try
{
return
entrustService
.
create
(
query
);
return
entrustService
.
create
(
query
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"新增委托{}"
,
e
);
log
.
debug
(
"新增委托{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@ApiOperation
(
value
=
"委托详情"
)
@ApiOperation
(
value
=
"委托详情"
)
@GetMapping
(
"/{id}"
)
@GetMapping
(
"/{id}"
)
public
BaseResponse
getDtail
(
@PathVariable
Integer
id
)
{
public
BaseResponse
getDtail
(
@PathVariable
Integer
id
)
{
try
{
try
{
return
entrustService
.
getDtail
(
id
);
return
entrustService
.
getDtail
(
id
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"委托详情{}"
,
e
);
log
.
debug
(
"委托详情{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
...
@@ -117,8 +123,10 @@ public class EntrustController {
...
@@ -117,8 +123,10 @@ public class EntrustController {
@ApiOperation
(
"导出委托单"
)
@ApiOperation
(
"导出委托单"
)
public
void
getReportDetail
(
@PathVariable
(
"entrustId"
)
Integer
entrustId
,
public
void
getReportDetail
(
@PathVariable
(
"entrustId"
)
Integer
entrustId
,
HttpServletResponse
response
)
{
HttpServletResponse
response
)
{
// ReportDetailVo rts = iEntrustService.getReportDetail(entrustId);
EntrustVo
entrustVo
=
entrustService
.
getDetailCapacity
(
entrustId
).
getData
();
EntrustVo
entrustVo
=
entrustService
.
getDtail
(
entrustId
).
getData
();
if
(
entrustVo
==
null
){
return
;
}
Map
<
String
,
Object
>
beanParams
=
new
HashMap
<>(
7
);
Map
<
String
,
Object
>
beanParams
=
new
HashMap
<>(
7
);
beanParams
.
put
(
"clientName"
,
entrustVo
.
getClientName
());
beanParams
.
put
(
"clientName"
,
entrustVo
.
getClientName
());
beanParams
.
put
(
"entrustCode"
,
entrustVo
.
getEntrustCode
());
beanParams
.
put
(
"entrustCode"
,
entrustVo
.
getEntrustCode
());
...
@@ -128,18 +136,30 @@ public class EntrustController {
...
@@ -128,18 +136,30 @@ public class EntrustController {
beanParams
.
put
(
"projectName"
,
entrustVo
.
getProjectName
());
beanParams
.
put
(
"projectName"
,
entrustVo
.
getProjectName
());
beanParams
.
put
(
"sampleNum"
,
entrustVo
.
getSampleNum
());
beanParams
.
put
(
"sampleNum"
,
entrustVo
.
getSampleNum
());
WordUtil
.
writeWordReport
(
entrustVo
.
getProjectName
()
+
"(委托单)"
,
"entrust.ftl"
,
//获取委托单样品列表(不包含平行样)
beanParams
,
response
);
List
<
SampleVo
>
sampleList
=
new
ArrayList
<>(
entrustVo
.
getSampleList
().
size
());
entrustVo
.
getSampleList
()
.
stream
()
.
filter
(
arg
->
arg
.
getIsParallel
()
==
0
)
.
forEach
(
arg
->
{
List
<
SampleDistributionTeamVo
>
teamVoList
=
arg
.
getSampleDistributionTeamVoList
();
arg
.
setTeamName
(
getTeamName
(
teamVoList
));
sampleList
.
add
(
arg
);
});
beanParams
.
put
(
"list"
,
sampleList
);
WordUtil
.
writeWordReport
(
entrustVo
.
getProjectName
()
+
"(委托单)"
,
"entrust2.ftl"
,
beanParams
,
response
,
FileExt
.
DOC
);
}
}
@ApiOperation
(
value
=
"获取样品表里最大的本所编号"
)
@ApiOperation
(
value
=
"获取样品表里最大的本所编号"
)
@GetMapping
(
"/getMaxCementCode"
)
@GetMapping
(
"/getMaxCementCode"
)
public
BaseResponse
getMaxCementCode
()
{
public
BaseResponse
getMaxCementCode
()
{
try
{
try
{
return
entrustService
.
getMaxCementCode
();
return
entrustService
.
getMaxCementCode
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取样品表里最大的本所编号{}"
,
e
);
log
.
debug
(
"获取样品表里最大的本所编号{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
...
@@ -149,8 +169,8 @@ public class EntrustController {
...
@@ -149,8 +169,8 @@ public class EntrustController {
public
BaseResponse
approval
(
@RequestBody
ApprovalQuery
query
)
{
public
BaseResponse
approval
(
@RequestBody
ApprovalQuery
query
)
{
try
{
try
{
return
entrustService
.
approval
(
query
);
return
entrustService
.
approval
(
query
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"委托评审{}"
,
e
);
log
.
debug
(
"委托评审{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
...
@@ -160,8 +180,8 @@ public class EntrustController {
...
@@ -160,8 +180,8 @@ public class EntrustController {
public
BaseResponse
handle
(
@RequestBody
HandleQuery
query
)
{
public
BaseResponse
handle
(
@RequestBody
HandleQuery
query
)
{
try
{
try
{
return
entrustService
.
handle
(
query
);
return
entrustService
.
handle
(
query
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"发送样品处理任务{}"
,
e
);
log
.
debug
(
"发送样品处理任务{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
...
@@ -173,7 +193,7 @@ public class EntrustController {
...
@@ -173,7 +193,7 @@ public class EntrustController {
@GetMapping
(
"/getSampleHandlePage"
)
@GetMapping
(
"/getSampleHandlePage"
)
public
BaseResponse
getSampleHandlePage
(
PageQuery
pageQuery
,
String
projectCode
)
{
public
BaseResponse
getSampleHandlePage
(
PageQuery
pageQuery
,
String
projectCode
)
{
try
{
try
{
return
entrustService
.
getSampleHandlePage
(
pageQuery
,
projectCode
);
return
entrustService
.
getSampleHandlePage
(
pageQuery
,
projectCode
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"样品处理任务分页{}"
,
e
);
log
.
debug
(
"样品处理任务分页{}"
,
e
);
}
}
...
@@ -196,8 +216,8 @@ public class EntrustController {
...
@@ -196,8 +216,8 @@ public class EntrustController {
public
BaseResponse
acceptHandle
(
@RequestBody
Integer
[]
ids
)
{
public
BaseResponse
acceptHandle
(
@RequestBody
Integer
[]
ids
)
{
try
{
try
{
return
entrustService
.
acceptHandle
(
ids
);
return
entrustService
.
acceptHandle
(
ids
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"接受样品处理任务{}"
,
e
);
log
.
debug
(
"接受样品处理任务{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
...
@@ -218,19 +238,19 @@ public class EntrustController {
...
@@ -218,19 +238,19 @@ public class EntrustController {
public
BaseResponse
uploadEnclosureCL
(
SampleHandleEnclosureQuery
query
)
{
public
BaseResponse
uploadEnclosureCL
(
SampleHandleEnclosureQuery
query
)
{
try
{
try
{
return
entrustService
.
uploadEnclosureCL
(
query
);
return
entrustService
.
uploadEnclosureCL
(
query
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"样品处理数据上传附件{}"
,
e
);
log
.
debug
(
"样品处理数据上传附件{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@ApiOperation
(
value
=
"样品处理详情"
)
@ApiOperation
(
value
=
"样品处理详情"
)
@GetMapping
(
"/getHandleDtail/{id}"
)
@GetMapping
(
"/getHandleDtail/{id}"
)
public
BaseResponse
getHandleDtail
(
@PathVariable
Integer
id
)
{
public
BaseResponse
getHandleDtail
(
@PathVariable
Integer
id
)
{
try
{
try
{
return
entrustService
.
getHandleDtail
(
id
);
return
entrustService
.
getHandleDtail
(
id
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"样品处理详情{}"
,
e
);
log
.
debug
(
"样品处理详情{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
...
@@ -240,8 +260,8 @@ public class EntrustController {
...
@@ -240,8 +260,8 @@ public class EntrustController {
public
BaseResponse
finishHandle
(
@RequestBody
Integer
[]
ids
)
{
public
BaseResponse
finishHandle
(
@RequestBody
Integer
[]
ids
)
{
try
{
try
{
return
entrustService
.
finishHandle
(
ids
);
return
entrustService
.
finishHandle
(
ids
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"完成样品处理任务{}"
,
e
);
log
.
debug
(
"完成样品处理任务{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
...
@@ -251,8 +271,8 @@ public class EntrustController {
...
@@ -251,8 +271,8 @@ public class EntrustController {
public
BaseResponse
distribution
(
@RequestBody
DistributionQuery
query
)
{
public
BaseResponse
distribution
(
@RequestBody
DistributionQuery
query
)
{
try
{
try
{
return
entrustService
.
distribution
(
query
);
return
entrustService
.
distribution
(
query
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"派发检测项目任务{}"
,
e
);
log
.
debug
(
"派发检测项目任务{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
...
@@ -275,35 +295,37 @@ public class EntrustController {
...
@@ -275,35 +295,37 @@ public class EntrustController {
@ApiOperation
(
value
=
"检测通知单详情"
)
@ApiOperation
(
value
=
"检测通知单详情"
)
@GetMapping
(
"/getSampleDistributionList/{id}"
)
@GetMapping
(
"/getSampleDistributionList/{id}"
)
public
BaseResponse
getSampleDistributionList
(
@PathVariable
Integer
id
)
{
public
BaseResponse
getSampleDistributionList
(
@PathVariable
Integer
id
)
{
try
{
try
{
return
entrustService
.
getSampleDistributionList
(
id
);
return
entrustService
.
getSampleDistributionList
(
id
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"检测通知单详情{}"
,
e
);
log
.
debug
(
"检测通知单详情{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@ApiOperation
(
value
=
"详情-基本信息"
)
@ApiOperation
(
value
=
"详情-基本信息"
)
@GetMapping
(
"/getBaseDtail/{id}"
)
@GetMapping
(
"/getBaseDtail/{id}"
)
public
BaseResponse
getBaseDtail
(
@PathVariable
Integer
id
)
{
public
BaseResponse
getBaseDtail
(
@PathVariable
Integer
id
)
{
try
{
try
{
return
entrustService
.
getBaseDtail
(
id
);
return
entrustService
.
getBaseDtail
(
id
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"详情-基本信息{}"
,
e
);
log
.
debug
(
"详情-基本信息{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@ApiOperation
(
value
=
"详情-样品处理信息"
)
@ApiOperation
(
value
=
"详情-样品处理信息"
)
@GetMapping
(
"/getSampleHandleDtail/{id}"
)
@GetMapping
(
"/getSampleHandleDtail/{id}"
)
public
BaseResponse
getSampleHandleDtail
(
@PathVariable
Integer
id
)
{
public
BaseResponse
getSampleHandleDtail
(
@PathVariable
Integer
id
)
{
try
{
try
{
return
entrustService
.
getSampleHandleDtail
(
id
);
return
entrustService
.
getSampleHandleDtail
(
id
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"详情-样品处理信息{}"
,
e
);
log
.
debug
(
"详情-样品处理信息{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@ApiOperation
(
value
=
"详情-样品处理信息-附件列表"
)
@ApiOperation
(
value
=
"详情-样品处理信息-附件列表"
)
@GetMapping
(
"/getSampleHandleDtailEnclosureList"
)
@GetMapping
(
"/getSampleHandleDtailEnclosureList"
)
public
BaseResponse
getSampleHandleDtailEnclosureList
(
Integer
sampleHandleId
)
{
public
BaseResponse
getSampleHandleDtailEnclosureList
(
Integer
sampleHandleId
)
{
...
@@ -314,13 +336,14 @@ public class EntrustController {
...
@@ -314,13 +336,14 @@ public class EntrustController {
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@ApiOperation
(
value
=
"详情-检测任务信息"
)
@ApiOperation
(
value
=
"详情-检测任务信息"
)
@GetMapping
(
"/getSampleCheckDtail/{id}"
)
@GetMapping
(
"/getSampleCheckDtail/{id}"
)
public
BaseResponse
getSampleCheckDtail
(
@PathVariable
Integer
id
)
{
public
BaseResponse
getSampleCheckDtail
(
@PathVariable
Integer
id
)
{
try
{
try
{
return
entrustService
.
getSampleCheckDtail
(
id
);
return
entrustService
.
getSampleCheckDtail
(
id
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"详情-检测任务信息{}"
,
e
);
log
.
debug
(
"详情-检测任务信息{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
...
@@ -331,8 +354,8 @@ public class EntrustController {
...
@@ -331,8 +354,8 @@ public class EntrustController {
public
BaseResponse
acceptDistribution
(
@RequestBody
Integer
[]
ids
)
{
public
BaseResponse
acceptDistribution
(
@RequestBody
Integer
[]
ids
)
{
try
{
try
{
return
entrustService
.
acceptDistribution
(
ids
);
return
entrustService
.
acceptDistribution
(
ids
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"接受检测项目任务{}"
,
e
);
log
.
debug
(
"接受检测项目任务{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
...
@@ -342,8 +365,8 @@ public class EntrustController {
...
@@ -342,8 +365,8 @@ public class EntrustController {
public
BaseResponse
uploadEnclosurePF
(
SampleDistributionEnclosureQuery
query
)
{
public
BaseResponse
uploadEnclosurePF
(
SampleDistributionEnclosureQuery
query
)
{
try
{
try
{
return
entrustService
.
uploadEnclosurePF
(
query
);
return
entrustService
.
uploadEnclosurePF
(
query
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"检测项目上传附件{}"
,
e
);
log
.
debug
(
"检测项目上传附件{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
...
@@ -354,8 +377,8 @@ public class EntrustController {
...
@@ -354,8 +377,8 @@ public class EntrustController {
public
BaseResponse
finishDistribution
(
@RequestBody
Integer
[]
ids
)
{
public
BaseResponse
finishDistribution
(
@RequestBody
Integer
[]
ids
)
{
try
{
try
{
return
entrustService
.
finishDistribution
(
ids
);
return
entrustService
.
finishDistribution
(
ids
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"完成检测项目任务{}"
,
e
);
log
.
debug
(
"完成检测项目任务{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
...
@@ -383,33 +406,33 @@ public class EntrustController {
...
@@ -383,33 +406,33 @@ public class EntrustController {
@ApiOperation
(
value
=
"数据校核详情列表"
)
@ApiOperation
(
value
=
"数据校核详情列表"
)
@GetMapping
(
"/getCheckList/{id}"
)
@GetMapping
(
"/getCheckList/{id}"
)
public
BaseResponse
getCheckList
(
@PathVariable
Integer
id
)
{
public
BaseResponse
getCheckList
(
@PathVariable
Integer
id
)
{
try
{
try
{
return
entrustService
.
getCheckList
(
id
);
return
entrustService
.
getCheckList
(
id
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"数据校核详情列表{}"
,
e
);
log
.
debug
(
"数据校核详情列表{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@ApiOperation
(
value
=
"样品检测项校核详情"
)
@ApiOperation
(
value
=
"样品检测项校核详情"
)
@GetMapping
(
"/getCheckDetail"
)
@GetMapping
(
"/getCheckDetail"
)
public
BaseResponse
getCheckDetail
(
String
cementCode
)
{
public
BaseResponse
getCheckDetail
(
String
cementCode
)
{
try
{
try
{
return
entrustService
.
getCheckDetail
(
cementCode
);
return
entrustService
.
getCheckDetail
(
cementCode
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"样品检测项校核详情{}"
,
e
);
log
.
debug
(
"样品检测项校核详情{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@ApiOperation
(
value
=
"查询任务检测附件信息"
)
@ApiOperation
(
value
=
"查询任务检测附件信息"
)
@GetMapping
(
"/getEnclosureList"
)
@GetMapping
(
"/getEnclosureList"
)
public
BaseResponse
getEnclosureList
(
Integer
sampleId
,
Integer
teamGroupId
,
Integer
userId
)
{
public
BaseResponse
getEnclosureList
(
Integer
sampleId
,
Integer
teamGroupId
,
Integer
userId
)
{
try
{
try
{
return
entrustService
.
getEnclosureList
(
sampleId
,
teamGroupId
,
userId
);
return
entrustService
.
getEnclosureList
(
sampleId
,
teamGroupId
,
userId
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"查询任务检测附件信息{}"
,
e
);
log
.
debug
(
"查询任务检测附件信息{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
...
@@ -419,8 +442,8 @@ public class EntrustController {
...
@@ -419,8 +442,8 @@ public class EntrustController {
public
BaseResponse
checkCount
(
@RequestBody
CheckCountQuery
query
)
{
public
BaseResponse
checkCount
(
@RequestBody
CheckCountQuery
query
)
{
try
{
try
{
return
entrustService
.
checkCount
(
query
);
return
entrustService
.
checkCount
(
query
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"校核计算{}"
,
e
);
log
.
debug
(
"校核计算{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
...
@@ -431,14 +454,25 @@ public class EntrustController {
...
@@ -431,14 +454,25 @@ public class EntrustController {
public
BaseResponse
check
(
@RequestBody
CheckQuery
query
)
{
public
BaseResponse
check
(
@RequestBody
CheckQuery
query
)
{
try
{
try
{
return
entrustService
.
check
(
query
);
return
entrustService
.
check
(
query
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"数据校核{}"
,
e
);
log
.
debug
(
"数据校核{}"
,
e
);
}
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
private
String
getTeamName
(
List
<
SampleDistributionTeamVo
>
teamVos
)
{
if
(
teamVos
.
size
()
==
0
)
{
return
""
;
}
StringBuffer
rts
=
new
StringBuffer
();
teamVos
.
forEach
(
arg
->
{
rts
.
append
(
arg
.
getTeamName
()).
append
(
"、"
);
});
return
rts
.
substring
(
0
,
rts
.
toString
().
length
()
-
1
);
}
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/controller/NormProductionController.java
View file @
64168ce1
...
@@ -89,7 +89,7 @@ public class NormProductionController {
...
@@ -89,7 +89,7 @@ public class NormProductionController {
@GetMapping
(
"/statistics"
)
@GetMapping
(
"/statistics"
)
@ApiOperation
(
"标准产值统计"
)
@ApiOperation
(
"标准产值统计"
)
public
BaseResponse
<
Page
<
NormProductionStatistics
>>
normProductionStatistics
(
String
start
,
String
end
,
String
name
,
PageQuery
pageQuery
)
{
public
BaseResponse
<
Page
<
NormProductionStatistics
>>
normProductionStatistics
(
String
start
,
String
end
,
String
name
,
Integer
groupId
,
PageQuery
pageQuery
)
{
Long
startTime
=
null
;
Long
startTime
=
null
;
Long
endTime
=
null
;
Long
endTime
=
null
;
...
@@ -97,9 +97,10 @@ public class NormProductionController {
...
@@ -97,9 +97,10 @@ public class NormProductionController {
startTime
=
DateUtil
.
parseDate
(
start
).
getTime
();
startTime
=
DateUtil
.
parseDate
(
start
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
getTime
();
}
}
//将list拆分成分页
//将list拆分成分页
BaseResponse
<
List
<
NormProductionStatistics
>>
baseResponse
=
iNormProductionService
BaseResponse
<
List
<
NormProductionStatistics
>>
baseResponse
=
iNormProductionService
.
normProductionStatistics
(
startTime
,
endTime
,
name
);
.
normProductionStatistics
(
startTime
,
endTime
,
name
,
groupId
);
if
(
baseResponse
.
getCode
()
==
200
)
{
if
(
baseResponse
.
getCode
()
==
200
)
{
List
<
NormProductionStatistics
>
data
=
baseResponse
.
getData
();
List
<
NormProductionStatistics
>
data
=
baseResponse
.
getData
();
if
(
data
.
size
()
!=
0
)
{
if
(
data
.
size
()
!=
0
)
{
...
@@ -147,14 +148,14 @@ public class NormProductionController {
...
@@ -147,14 +148,14 @@ public class NormProductionController {
@PostMapping
(
"/export/statistics"
)
@PostMapping
(
"/export/statistics"
)
@ApiOperation
(
"导出标准产值列表"
)
@ApiOperation
(
"导出标准产值列表"
)
public
void
exportNormProductionStatistics
(
String
start
,
String
end
,
String
name
,
HttpServletResponse
response
)
{
public
void
exportNormProductionStatistics
(
String
start
,
String
end
,
String
name
,
Integer
groupId
,
HttpServletResponse
response
)
{
Long
startTime
=
null
;
Long
startTime
=
null
;
Long
endTime
=
null
;
Long
endTime
=
null
;
if
(
StrUtil
.
isNotBlank
(
start
)
&&
StrUtil
.
isNotBlank
(
end
))
{
if
(
StrUtil
.
isNotBlank
(
start
)
&&
StrUtil
.
isNotBlank
(
end
))
{
startTime
=
DateUtil
.
parseDate
(
start
).
getTime
();
startTime
=
DateUtil
.
parseDate
(
start
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
getTime
();
}
}
iNormProductionService
.
exportNormProductionStatistics
(
startTime
,
endTime
,
name
,
response
);
iNormProductionService
.
exportNormProductionStatistics
(
startTime
,
endTime
,
name
,
groupId
,
response
);
}
}
@PostMapping
(
"/export/statistics/detail"
)
@PostMapping
(
"/export/statistics/detail"
)
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/ReportController.java
View file @
64168ce1
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.FileExt
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.ReportDetailVo
;
import
cn.wise.sc.cement.business.model.ReportDetailVo
;
import
cn.wise.sc.cement.business.model.SixElementKey
;
import
cn.wise.sc.cement.business.model.SixElementKey
;
...
@@ -111,8 +112,8 @@ public class ReportController {
...
@@ -111,8 +112,8 @@ public class ReportController {
beanParams
.
put
(
"list1"
,
al2o3AndTio2List
);
beanParams
.
put
(
"list1"
,
al2o3AndTio2List
);
beanParams
.
put
(
"list2"
,
al2o3SplitTio2List
);
beanParams
.
put
(
"list2"
,
al2o3SplitTio2List
);
WordUtil
.
writeWordReport
(
rts
.
getProjectName
()
+
"(报告)
.xls
"
,
"report.ftl"
,
WordUtil
.
writeWordReport
(
rts
.
getProjectName
()
+
"(报告)"
,
"report.ftl"
,
beanParams
,
response
);
beanParams
,
response
,
FileExt
.
EXCL
);
}
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/entity/NormProductionStatistics.java
View file @
64168ce1
...
@@ -30,4 +30,6 @@ public class NormProductionStatistics implements Serializable {
...
@@ -30,4 +30,6 @@ public class NormProductionStatistics implements Serializable {
private
Integer
coefficient
;
private
Integer
coefficient
;
private
Integer
groupId
;
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/FileExt.java
0 → 100644
View file @
64168ce1
package
cn
.
wise
.
sc
.
cement
.
business
.
model
;
/**
* @description: 文件扩展名
* @author: qh
* @create: 2020-10-16 13:40
**/
public
enum
FileExt
{
//office后缀名
DOC
(
".doc"
),
EXCL
(
".xls"
);
private
String
name
;
FileExt
(
String
name
){
this
.
name
=
name
;
}
public
String
getName
()
{
return
name
;
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/NonStandardValueVo.java
View file @
64168ce1
...
@@ -50,5 +50,5 @@ public class NonStandardValueVo {
...
@@ -50,5 +50,5 @@ public class NonStandardValueVo {
private
Integer
userId
;
private
Integer
userId
;
@ApiModelProperty
(
"部门"
)
@ApiModelProperty
(
"部门"
)
private
String
groups
;
private
Integer
groups
;
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/NormProductionVo.java
View file @
64168ce1
...
@@ -91,4 +91,10 @@ public class NormProductionVo {
...
@@ -91,4 +91,10 @@ public class NormProductionVo {
@ApiModelProperty
(
"检测组名字"
)
@ApiModelProperty
(
"检测组名字"
)
private
String
assessName
;
private
String
assessName
;
/**
* 部门id
*/
@ApiModelProperty
(
"部门id"
)
private
Integer
groupId
;
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/ProductionVo.java
View file @
64168ce1
...
@@ -36,4 +36,6 @@ public class ProductionVo implements Serializable {
...
@@ -36,4 +36,6 @@ public class ProductionVo implements Serializable {
private
Double
nonProductionValue
=
0
D
;
private
Double
nonProductionValue
=
0
D
;
@ApiModelProperty
(
"总产值"
)
@ApiModelProperty
(
"总产值"
)
private
Double
productionTotalValue
=
0
D
;
private
Double
productionTotalValue
=
0
D
;
@ApiModelProperty
(
"部门id"
)
private
Integer
groupId
;
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/SampleDistributionTeamVo.java
View file @
64168ce1
...
@@ -3,7 +3,6 @@ package cn.wise.sc.cement.business.model.vo;
...
@@ -3,7 +3,6 @@ package cn.wise.sc.cement.business.model.vo;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
* @description:
* @description:
* @author: ztw
* @author: ztw
...
@@ -49,13 +48,4 @@ public class SampleDistributionTeamVo {
...
@@ -49,13 +48,4 @@ public class SampleDistributionTeamVo {
@ApiModelProperty
(
"扩展名"
)
@ApiModelProperty
(
"扩展名"
)
private
String
extName
;
private
String
extName
;
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEntrustService.java
View file @
64168ce1
...
@@ -35,6 +35,7 @@ public interface IEntrustService extends IService<Entrust> {
...
@@ -35,6 +35,7 @@ public interface IEntrustService extends IService<Entrust> {
BaseResponse
<
Entrust
>
create
(
EntrustQuery
query
);
BaseResponse
<
Entrust
>
create
(
EntrustQuery
query
);
BaseResponse
<
EntrustVo
>
getDtail
(
Integer
id
);
BaseResponse
<
EntrustVo
>
getDtail
(
Integer
id
);
BaseResponse
<
EntrustVo
>
getDetailCapacity
(
Integer
id
);
BaseResponse
<
String
>
getMaxCementCode
();
BaseResponse
<
String
>
getMaxCementCode
();
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/INormProductionService.java
View file @
64168ce1
...
@@ -59,9 +59,10 @@ public interface INormProductionService extends IService<NormProduction> {
...
@@ -59,9 +59,10 @@ public interface INormProductionService extends IService<NormProduction> {
*
*
* @param start 开始时间
* @param start 开始时间
* @param end 结束时间
* @param end 结束时间
* @param groupId 部门id
* @return BaseResponse
* @return BaseResponse
*/
*/
BaseResponse
<
List
<
NormProductionStatistics
>>
normProductionStatistics
(
Long
start
,
Long
end
,
String
name
);
BaseResponse
<
List
<
NormProductionStatistics
>>
normProductionStatistics
(
Long
start
,
Long
end
,
String
name
,
Integer
groupId
);
/**
/**
* 标准产值统计 单人详情
* 标准产值统计 单人详情
...
@@ -74,6 +75,14 @@ public interface INormProductionService extends IService<NormProduction> {
...
@@ -74,6 +75,14 @@ public interface INormProductionService extends IService<NormProduction> {
List
<
NormProduction
.
NormProductionDetail
>
normProductionDetails
(
Integer
userId
,
List
<
NormProduction
.
NormProductionDetail
>
normProductionDetails
(
Integer
userId
,
Long
start
,
Long
end
);
Long
start
,
Long
end
);
/**
* 总产值统计
*
* @param name 用户
* @param start 开始时间
* @param end 结束时间
* @return 详细信息
*/
List
<
ProductionVo
>
production
(
String
name
,
Long
start
,
Long
end
);
List
<
ProductionVo
>
production
(
String
name
,
Long
start
,
Long
end
);
/**
/**
...
@@ -81,9 +90,10 @@ public interface INormProductionService extends IService<NormProduction> {
...
@@ -81,9 +90,10 @@ public interface INormProductionService extends IService<NormProduction> {
* @param start 开始时间
* @param start 开始时间
* @param end 结束时间
* @param end 结束时间
* @param name 人员名字
* @param name 人员名字
* @param groupId 部门id
* @param response 响应体
* @param response 响应体
*/
*/
void
exportNormProductionStatistics
(
Long
start
,
Long
end
,
String
name
,
HttpServletResponse
response
);
void
exportNormProductionStatistics
(
Long
start
,
Long
end
,
String
name
,
Integer
groupId
,
HttpServletResponse
response
);
/**
/**
* 导出标准统计详情
* 导出标准统计详情
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
64168ce1
...
@@ -391,6 +391,98 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -391,6 +391,98 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
return
BaseResponse
.
okData
(
entrustVo
);
return
BaseResponse
.
okData
(
entrustVo
);
}
}
@Override
public
BaseResponse
<
EntrustVo
>
getDetailCapacity
(
Integer
id
)
{
if
(
id
==
null
)
{
return
BaseResponse
.
errorMsg
(
"参数错误"
);
}
EntrustVo
entrustVo
=
entrustMapper
.
getDetail
(
id
);
if
(
entrustVo
.
getStatus
()
!=
0
)
{
QueryWrapper
<
Sample
>
sampleWrapper
=
new
QueryWrapper
<>();
sampleWrapper
.
eq
(
"entrust_id"
,
entrustVo
.
getId
());
sampleWrapper
.
orderByAsc
(
"id"
);
List
<
Sample
>
sampleList
=
sampleService
.
list
(
sampleWrapper
);
List
<
SampleVo
>
sampleVoList
=
new
ArrayList
<>();
List
<
SampleVo
>
sampleHandleVoList
=
new
ArrayList
<>();
if
(
sampleList
!=
null
&&
sampleList
.
size
()
>
0
)
{
for
(
Sample
sample
:
sampleList
)
{
SampleVo
sampleVo
=
new
SampleVo
();
BeanUtils
.
copyProperties
(
sample
,
sampleVo
);
String
teamIds
=
sample
.
getTeamIds
();
String
teamName
=
""
;
List
<
SampleDistributionTeamVo
>
sampleNoDistributionTeamVoList
=
new
ArrayList
<>();
if
(
teamIds
!=
null
)
{
String
[]
teamIdS
=
teamIds
.
split
(
"、"
);
for
(
String
teamId
:
teamIdS
)
{
TeamVo
teamVo
=
teamMapper
.
getDetail
(
Integer
.
valueOf
(
teamId
));
if
(
teamVo
!=
null
&&
"1"
.
equals
(
teamVo
.
getQualifications
()))
{
teamName
=
teamName
.
equals
(
""
)
?
teamVo
.
getName
()
:
(
teamName
+
"、"
+
teamVo
.
getName
());
SampleDistributionTeamVo
distributionTeamVo
=
new
SampleDistributionTeamVo
();
distributionTeamVo
.
setTeamGroupId
(
teamVo
.
getGroupId
());
distributionTeamVo
.
setTeamGroupName
(
teamVo
.
getGroupName
());
distributionTeamVo
.
setTeamId
(
teamVo
.
getId
());
distributionTeamVo
.
setTeamName
(
teamVo
.
getName
());
sampleNoDistributionTeamVoList
.
add
(
distributionTeamVo
);
}
}
}
sampleVo
.
setTeamName
(
teamName
);
//评审人员可以查看所有的检测项内容
List
<
SampleDistributionTeamVo
>
sampleDistributionTeamVoList
=
distributionMapper
.
getDistributionTeamList
(
sample
.
getId
(),
null
);
if
(
sampleDistributionTeamVoList
!=
null
&&
sampleDistributionTeamVoList
.
size
()
>
0
)
{
sampleVo
.
setSampleDistributionTeamVoList
(
sampleDistributionTeamVoList
);
}
else
{
sampleVo
.
setSampleDistributionTeamVoList
(
sampleNoDistributionTeamVoList
);
}
sampleVoList
.
add
(
sampleVo
);
//样品处理列表只展示
if
(
sample
.
getIsParallel
()
==
1
)
{
if
(
sample
.
getCementCode
().
equals
(
sample
.
getParallelCode
()))
{
sampleHandleVoList
.
add
(
sampleVo
);
}
}
else
{
sampleHandleVoList
.
add
(
sampleVo
);
}
}
}
entrustVo
.
setSampleList
(
sampleVoList
);
//样品列表(展示平行样样品)
entrustVo
.
setSampleHandleList
(
sampleHandleVoList
);
//处理样品列表(不展示平行样样品)
}
else
{
QueryWrapper
<
SampleTmp
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"entrust_id"
,
entrustVo
.
getId
());
List
<
SampleTmp
>
sampleTmpList
=
sampleTmpService
.
list
(
queryWrapper
);
List
<
SampleTmpVo
>
sampleTmpVoList
=
new
ArrayList
<>();
if
(
sampleTmpList
!=
null
&&
sampleTmpList
.
size
()
>
0
)
{
for
(
SampleTmp
sampleTmp
:
sampleTmpList
)
{
SampleTmpVo
sampleTmpVo
=
new
SampleTmpVo
();
BeanUtils
.
copyProperties
(
sampleTmp
,
sampleTmpVo
);
String
teamIds
=
sampleTmp
.
getTeamIds
();
String
teamName
=
""
;
if
(
teamIds
!=
null
)
{
String
[]
teamIdS
=
teamIds
.
split
(
"、"
);
for
(
String
teamId
:
teamIdS
)
{
Team
team
=
teamMapper
.
selectById
(
Integer
.
valueOf
(
teamId
));
if
(
team
!=
null
&&
"1"
.
equals
(
team
.
getQualifications
()))
{
team
.
getName
();
teamName
=
teamName
.
equals
(
""
)
?
team
.
getName
()
:
(
teamName
+
"、"
+
team
.
getName
());
}
}
}
sampleTmpVo
.
setTeamName
(
teamName
);
sampleTmpVoList
.
add
(
sampleTmpVo
);
}
}
entrustVo
.
setSampleTmpList
(
sampleTmpVoList
);
}
LoginUser
loginUser
=
userService
.
getLoginUser
();
if
(
loginUser
==
null
)
{
return
BaseResponse
.
errorMsg
(
"请登录账号"
);
}
userMessageService
.
checkMessage
(
loginUser
.
getId
(),
id
,
SysUserMessage
.
MessageType
.
ENTRUST
);
return
BaseResponse
.
okData
(
entrustVo
);
}
/**
/**
* 详情-基本信息
* 详情-基本信息
*
*
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NonStandardValueServiceImpl.java
View file @
64168ce1
...
@@ -83,7 +83,7 @@ public class NonStandardValueServiceImpl extends ServiceImpl<NonStandardValueMap
...
@@ -83,7 +83,7 @@ public class NonStandardValueServiceImpl extends ServiceImpl<NonStandardValueMap
finalNonStandardValue
.
setUserId
(
nonStandardValue
.
getUserId
());
finalNonStandardValue
.
setUserId
(
nonStandardValue
.
getUserId
());
finalNonStandardValue
.
setName
(
nonStandardValue
.
getName
());
finalNonStandardValue
.
setName
(
nonStandardValue
.
getName
());
finalNonStandardValue
.
setAccount
(
nonStandardValue
.
getAccount
());
finalNonStandardValue
.
setAccount
(
nonStandardValue
.
getAccount
());
finalNonStandardValue
.
setGroups
(
nonStandardValue
.
get
Id
());
finalNonStandardValue
.
setGroups
(
nonStandardValue
.
get
Groups
());
Integer
newId
=
finalNonStandardValue
.
getId
()+
1
;
Integer
newId
=
finalNonStandardValue
.
getId
()+
1
;
finalNonStandardValue
.
setId
(
newId
);
finalNonStandardValue
.
setId
(
newId
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NormProductionServiceImpl.java
View file @
64168ce1
...
@@ -234,7 +234,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
...
@@ -234,7 +234,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
}
}
@Override
@Override
public
BaseResponse
<
List
<
NormProductionStatistics
>>
normProductionStatistics
(
Long
start
,
Long
end
,
String
name
)
{
public
BaseResponse
<
List
<
NormProductionStatistics
>>
normProductionStatistics
(
Long
start
,
Long
end
,
String
name
,
Integer
groupId
)
{
//统计分样处理的详情
//统计分样处理的详情
List
<
NormProduction
.
NormProductionDetail
>
normProductionDetails
=
List
<
NormProduction
.
NormProductionDetail
>
normProductionDetails
=
...
@@ -288,6 +288,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
...
@@ -288,6 +288,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
productionStatistics
.
setSex
(
sysUser
.
getSex
()
==
0
?
"女"
:
"男"
);
productionStatistics
.
setSex
(
sysUser
.
getSex
()
==
0
?
"女"
:
"男"
);
productionStatistics
.
setUserId
(
sysUser
.
getId
()
+
""
);
productionStatistics
.
setUserId
(
sysUser
.
getId
()
+
""
);
productionStatistics
.
setUserName
(
sysUser
.
getName
());
productionStatistics
.
setUserName
(
sysUser
.
getName
());
productionStatistics
.
setGroupId
(
sysUser
.
getGroupId
());
SysPost
sysPost
=
sysPosts
.
stream
()
SysPost
sysPost
=
sysPosts
.
stream
()
.
filter
(
arg
->
arg
.
getId
().
intValue
()
==
sysUser
.
getPostId
()).
.
filter
(
arg
->
arg
.
getId
().
intValue
()
==
sysUser
.
getPostId
()).
...
@@ -301,6 +302,13 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
...
@@ -301,6 +302,13 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
List
<
NormProductionStatistics
>
collect
=
rts
.
stream
().
filter
(
arg
->
arg
.
getUserName
().
contains
(
name
)).
collect
(
Collectors
.
toList
());
List
<
NormProductionStatistics
>
collect
=
rts
.
stream
().
filter
(
arg
->
arg
.
getUserName
().
contains
(
name
)).
collect
(
Collectors
.
toList
());
return
BaseResponse
.
okData
(
collect
);
return
BaseResponse
.
okData
(
collect
);
}
}
//过滤部门id
if
(
groupId
!=
null
){
List
<
NormProductionStatistics
>
collect
=
rts
.
stream
().
filter
(
arg
->
arg
.
getGroupId
().
equals
(
groupId
)).
collect
(
Collectors
.
toList
());
return
BaseResponse
.
okData
(
collect
);
}
return
BaseResponse
.
okData
(
rts
);
return
BaseResponse
.
okData
(
rts
);
}
}
...
@@ -361,6 +369,10 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
...
@@ -361,6 +369,10 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
.
filter
(
opt
->
opt
.
getId
().
intValue
()
==
arg
.
getUserId
())
.
filter
(
opt
->
opt
.
getId
().
intValue
()
==
arg
.
getUserId
())
.
findFirst
()
.
findFirst
()
.
ifPresent
(
sysUser
->
arg
.
setUserName
(
sysUser
.
getName
())));
.
ifPresent
(
sysUser
->
arg
.
setUserName
(
sysUser
.
getName
())));
rts
.
forEach
(
arg
->
users
.
stream
()
.
filter
(
opt
->
opt
.
getId
().
intValue
()
==
arg
.
getUserId
())
.
findFirst
()
.
ifPresent
(
sysUser
->
arg
.
setGroupId
(
sysUser
.
getGroupId
())));
return
rts
;
return
rts
;
}
}
...
@@ -382,7 +394,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
...
@@ -382,7 +394,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
//非标准产值
//非标准产值
List
<
NonStandardValue
>
nonStandardValues
=
iNonStandardValueService
.
nonValue
(
startDate
,
endDate
,
group
).
getData
();
List
<
NonStandardValue
>
nonStandardValues
=
iNonStandardValueService
.
nonValue
(
startDate
,
endDate
,
group
).
getData
();
//标准产值
//标准产值
List
<
NormProductionStatistics
>
productionStatistics
=
this
.
normProductionStatistics
(
start
,
end
,
name
).
getData
();
List
<
NormProductionStatistics
>
productionStatistics
=
this
.
normProductionStatistics
(
start
,
end
,
name
,
group
).
getData
();
//以userId找关系
//以userId找关系
Set
<
String
>
userIds
=
new
HashSet
<>();
Set
<
String
>
userIds
=
new
HashSet
<>();
nonStandardValues
.
forEach
(
arg
->
userIds
.
add
(
arg
.
getUserId
()
+
""
));
nonStandardValues
.
forEach
(
arg
->
userIds
.
add
(
arg
.
getUserId
()
+
""
));
...
@@ -424,6 +436,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
...
@@ -424,6 +436,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
arg
.
setUserName
(
opt
.
getName
());
arg
.
setUserName
(
opt
.
getName
());
arg
.
setAccount
(
opt
.
getUsername
());
arg
.
setAccount
(
opt
.
getUsername
());
arg
.
setPositionId
(
opt
.
getPostId
());
arg
.
setPositionId
(
opt
.
getPostId
());
arg
.
setGroupId
(
opt
.
getGroupId
());
});
});
//关联职务
//关联职务
sysPosts
.
stream
().
filter
(
opt
->
arg
.
getPositionId
().
intValue
()
==
opt
.
getId
())
sysPosts
.
stream
().
filter
(
opt
->
arg
.
getPositionId
().
intValue
()
==
opt
.
getId
())
...
@@ -443,12 +456,12 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
...
@@ -443,12 +456,12 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
@Override
@Override
public
void
exportNormProductionStatistics
(
Long
start
,
Long
end
,
String
name
,
HttpServletResponse
response
)
{
public
void
exportNormProductionStatistics
(
Long
start
,
Long
end
,
String
name
,
Integer
groupId
,
HttpServletResponse
response
)
{
BaseResponse
<
List
<
NormProductionStatistics
>>
listBaseResponse
=
normProductionStatistics
(
start
,
end
,
name
);
BaseResponse
<
List
<
NormProductionStatistics
>>
listBaseResponse
=
normProductionStatistics
(
start
,
end
,
name
,
groupId
);
if
(
listBaseResponse
.
getCode
()
==
200
)
{
if
(
listBaseResponse
.
getCode
()
==
200
)
{
List
<
NormProductionStatistics
>
data
=
listBaseResponse
.
getData
();
List
<
NormProductionStatistics
>
data
=
listBaseResponse
.
getData
();
if
(
CollectionUtil
.
isNotEmpty
(
data
))
{
if
(
CollectionUtil
.
isNotEmpty
(
data
))
{
String
[]
headers
=
new
String
[
8
];
String
[]
headers
=
new
String
[
9
];
headers
[
0
]
=
"用户编号"
;
headers
[
0
]
=
"用户编号"
;
headers
[
1
]
=
"用户名"
;
headers
[
1
]
=
"用户名"
;
headers
[
2
]
=
"账号"
;
headers
[
2
]
=
"账号"
;
...
@@ -457,10 +470,11 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
...
@@ -457,10 +470,11 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
headers
[
5
]
=
"统计时间"
;
headers
[
5
]
=
"统计时间"
;
headers
[
6
]
=
"检测项目数"
;
headers
[
6
]
=
"检测项目数"
;
headers
[
7
]
=
"产值绩效"
;
headers
[
7
]
=
"产值绩效"
;
headers
[
8
]
=
"部门id"
;
List
<
Object
[]>
exportData
=
new
ArrayList
<>(
data
.
size
());
List
<
Object
[]>
exportData
=
new
ArrayList
<>(
data
.
size
());
for
(
NormProductionStatistics
productionStatistics
:
data
)
{
for
(
NormProductionStatistics
productionStatistics
:
data
)
{
Object
[]
objs
=
new
Object
[
8
];
Object
[]
objs
=
new
Object
[
9
];
objs
[
0
]
=
productionStatistics
.
getUserId
();
objs
[
0
]
=
productionStatistics
.
getUserId
();
objs
[
1
]
=
productionStatistics
.
getUserName
();
objs
[
1
]
=
productionStatistics
.
getUserName
();
objs
[
2
]
=
productionStatistics
.
getAccount
();
objs
[
2
]
=
productionStatistics
.
getAccount
();
...
@@ -469,6 +483,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
...
@@ -469,6 +483,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
objs
[
5
]
=
productionStatistics
.
getTime
();
objs
[
5
]
=
productionStatistics
.
getTime
();
objs
[
6
]
=
productionStatistics
.
getCount
();
objs
[
6
]
=
productionStatistics
.
getCount
();
objs
[
7
]
=
productionStatistics
.
getCoefficient
();
objs
[
7
]
=
productionStatistics
.
getCoefficient
();
objs
[
8
]
=
productionStatistics
.
getGroupId
();
exportData
.
add
(
objs
);
exportData
.
add
(
objs
);
}
}
ExcelUtil
.
excelExport
(
ExcelUtil
.
excelExport
(
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/util/WordUtil.java
View file @
64168ce1
package
cn
.
wise
.
sc
.
cement
.
business
.
util
;
package
cn
.
wise
.
sc
.
cement
.
business
.
util
;
import
cn.wise.sc.cement.business.model.FileExt
;
import
freemarker.template.Configuration
;
import
freemarker.template.Configuration
;
import
freemarker.template.Template
;
import
freemarker.template.Template
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -45,7 +46,8 @@ public class WordUtil {
...
@@ -45,7 +46,8 @@ public class WordUtil {
String
templeName
,
String
templeName
,
String
templateFileName
,
String
templateFileName
,
Map
<
String
,
Object
>
beanParams
,
Map
<
String
,
Object
>
beanParams
,
HttpServletResponse
response
)
{
HttpServletResponse
response
,
FileExt
fileExt
)
{
Writer
out
=
null
;
Writer
out
=
null
;
File
file
=
null
;
File
file
=
null
;
try
{
try
{
...
@@ -74,7 +76,7 @@ public class WordUtil {
...
@@ -74,7 +76,7 @@ public class WordUtil {
response
.
setCharacterEncoding
(
StandardCharsets
.
UTF_8
.
toString
());
response
.
setCharacterEncoding
(
StandardCharsets
.
UTF_8
.
toString
());
response
.
setContentType
(
"application/octet-stream"
);
response
.
setContentType
(
"application/octet-stream"
);
templeName
=
new
String
((
templeName
).
getBytes
(
StandardCharsets
.
UTF_8
),
StandardCharsets
.
ISO_8859_1
);
templeName
=
new
String
((
templeName
).
getBytes
(
StandardCharsets
.
UTF_8
),
StandardCharsets
.
ISO_8859_1
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
templeName
+
".xls"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
templeName
+
fileExt
.
getName
()
);
outputStream
.
write
(
buffer
);
outputStream
.
write
(
buffer
);
outputStream
.
flush
();
outputStream
.
flush
();
outputStream
.
close
();
outputStream
.
close
();
...
...
cement-business/src/main/resources/templates/entrust.ftl
deleted
100644 → 0
View file @
42aa1c3e
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook
xmlns=
"urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o=
"urn:schemas-microsoft-com:office:office"
xmlns:x=
"urn:schemas-microsoft-com:office:excel"
xmlns:ss=
"urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html=
"http://www.w3.org/TR/REC-html40"
>
<DocumentProperties
xmlns=
"urn:schemas-microsoft-com:office:office"
>
<Version>
16.00
</Version>
</DocumentProperties>
<OfficeDocumentSettings
xmlns=
"urn:schemas-microsoft-com:office:office"
>
<AllowPNG/>
</OfficeDocumentSettings>
<ExcelWorkbook
xmlns=
"urn:schemas-microsoft-com:office:excel"
>
<WindowHeight>
12650
</WindowHeight>
<WindowWidth>
22260
</WindowWidth>
<WindowTopX>
32767
</WindowTopX>
<WindowTopY>
32767
</WindowTopY>
<ProtectStructure>
False
</ProtectStructure>
<ProtectWindows>
False
</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style
ss:ID=
"Default"
ss:Name=
"Normal"
>
<Alignment
ss:Vertical=
"Bottom"
/>
<Borders/>
<Font
ss:FontName=
"等线"
x:CharSet=
"134"
ss:Size=
"11"
ss:Color=
"#000000"
/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
<Style
ss:ID=
"s63"
>
<Alignment
ss:Horizontal=
"Center"
ss:Vertical=
"Bottom"
/>
<Font
ss:FontName=
"等线"
x:CharSet=
"134"
ss:Size=
"11"
ss:Color=
"#000000"
ss:Bold=
"1"
/>
</Style>
<Style
ss:ID=
"s64"
>
<Font
ss:FontName=
"等线"
x:CharSet=
"134"
ss:Size=
"11"
ss:Color=
"#000000"
/>
</Style>
</Styles>
<Worksheet
ss:Name=
"Sheet1"
>
<Table
ss:ExpandedColumnCount=
"2"
ss:ExpandedRowCount=
"8"
x:FullColumns=
"1"
x:FullRows=
"1"
ss:DefaultColumnWidth=
"52"
ss:DefaultRowHeight=
"14"
>
<Column
ss:AutoFitWidth=
"0"
ss:Width=
"116.5"
/>
<Column
ss:AutoFitWidth=
"0"
ss:Width=
"117"
/>
<Row>
<Cell
ss:MergeAcross=
"1"
ss:StyleID=
"s63"
><Data
ss:Type=
"String"
>
中国水泥发展中心物化检测所检测委托单
</Data></Cell>
</Row>
<Row>
<Cell><Data
ss:Type=
"String"
>
委托单位
</Data></Cell>
<Cell
ss:StyleID=
"s64"
><Data
ss:Type=
"String"
>
${clientName}
</Data></Cell>
</Row>
<Row>
<Cell><Data
ss:Type=
"String"
>
委托编号
</Data></Cell>
<Cell
ss:StyleID=
"s64"
><Data
ss:Type=
"String"
>
${entrustCode}
</Data></Cell>
</Row>
<Row>
<Cell><Data
ss:Type=
"String"
>
委托人
</Data></Cell>
<Cell
ss:StyleID=
"s64"
><Data
ss:Type=
"String"
>
${userName}
</Data></Cell>
</Row>
<Row>
<Cell><Data
ss:Type=
"String"
>
电话
</Data></Cell>
<Cell
ss:StyleID=
"s64"
><Data
ss:Type=
"String"
>
${userPhone}
</Data></Cell>
</Row>
<Row>
<Cell><Data
ss:Type=
"String"
>
传真
</Data></Cell>
<Cell
ss:StyleID=
"s64"
><Data
ss:Type=
"String"
>
${userFax}
</Data></Cell>
</Row>
<Row>
<Cell><Data
ss:Type=
"String"
>
项目名称
</Data></Cell>
<Cell
ss:StyleID=
"s64"
><Data
ss:Type=
"String"
>
${projectName}
</Data></Cell>
</Row>
<Row>
<Cell><Data
ss:Type=
"String"
>
样品数量
</Data></Cell>
<Cell
ss:StyleID=
"s64"
><Data
ss:Type=
"String"
>
${sampleNum}
</Data></Cell>
</Row>
</Table>
<WorksheetOptions
xmlns=
"urn:schemas-microsoft-com:office:excel"
>
<PageSetup>
<Header
x:Margin=
"0.3"
/>
<Footer
x:Margin=
"0.3"
/>
<PageMargins
x:Bottom=
"0.75"
x:Left=
"0.7"
x:Right=
"0.7"
x:Top=
"0.75"
/>
</PageSetup>
<Print>
<ValidPrinterInfo/>
<PaperSizeIndex>
9
</PaperSizeIndex>
<HorizontalResolution>
600
</HorizontalResolution>
<VerticalResolution>
600
</VerticalResolution>
</Print>
<Selected/>
<Panes>
<Pane>
<Number>
3
</Number>
<ActiveRow>
9
</ActiveRow>
<ActiveCol>
4
</ActiveCol>
</Pane>
</Panes>
<ProtectObjects>
False
</ProtectObjects>
<ProtectScenarios>
False
</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
</Workbook>
cement-business/src/main/resources/templates/entrust2.ftl
0 → 100644
View file @
64168ce1
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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