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
2548f57c
Commit
2548f57c
authored
Sep 28, 2020
by
qinhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
质量控制--列表and查看详情
parent
cee99472
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
379 additions
and
110 deletions
+379
-110
QualityController.java
...wise/sc/cement/business/controller/QualityController.java
+25
-16
ReportController.java
.../wise/sc/cement/business/controller/ReportController.java
+1
-1
QualityDetail.java
...java/cn/wise/sc/cement/business/entity/QualityDetail.java
+47
-0
EntrustMapper.java
...java/cn/wise/sc/cement/business/mapper/EntrustMapper.java
+3
-0
EntrustMapper.xml
...a/cn/wise/sc/cement/business/mapper/xml/EntrustMapper.xml
+13
-1
QualityDetailVo.java
.../cn/wise/sc/cement/business/model/vo/QualityDetailVo.java
+45
-0
IEntrustService.java
...a/cn/wise/sc/cement/business/service/IEntrustService.java
+44
-35
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+201
-57
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/QualityController.java
View file @
2548f57c
...
@@ -3,18 +3,21 @@ package cn.wise.sc.cement.business.controller;
...
@@ -3,18 +3,21 @@ package cn.wise.sc.cement.business.controller;
import
cn.wise.sc.cement.business.entity.EntrustReport
;
import
cn.wise.sc.cement.business.entity.EntrustReport
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.vo.EntrustVo
;
import
cn.wise.sc.cement.business.model.vo.QualityDetailVo
;
import
cn.wise.sc.cement.business.service.IEntrustService
;
import
cn.wise.sc.cement.business.service.IEntrustService
;
import
cn.wise.sc.cement.business.util.PageUtil
;
import
cn.wise.sc.cement.business.util.PageUtil
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
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.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
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -36,21 +39,27 @@ public class QualityController {
...
@@ -36,21 +39,27 @@ public class QualityController {
this
.
iEntrustService
=
iEntrustService
;
this
.
iEntrustService
=
iEntrustService
;
}
}
@ApiOperation
(
value
=
"质量检测分页列表"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"开始日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"结束日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"clientId"
,
value
=
"委托单位id"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"projectName"
,
value
=
"项目名称"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"projectCode"
,
value
=
"项目编号"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@GetMapping
(
"/getPage"
)
public
BaseResponse
<
IPage
<
EntrustVo
>>
page
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
clientId
,
String
projectName
,
String
projectCode
)
{
return
iEntrustService
.
getQualityPage
(
pageQuery
,
startDate
,
endDate
,
clientId
,
projectName
,
projectCode
);
}
@GetMapping
(
"/{entrustId}"
)
@GetMapping
(
"/{entrustId}"
)
@ApiOperation
(
"获取报告详情"
)
@ApiOperation
(
"获取质量详情"
)
public
BaseResponse
<
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
EntrustReport
>>
getReportDetail
(
@PathVariable
(
"entrustId"
)
Integer
entrustId
,
PageQuery
pageQuery
)
{
public
BaseResponse
<
QualityDetailVo
>
getReportDetail
(
@PathVariable
(
"entrustId"
)
Integer
entrustId
)
{
List
<
EntrustReport
>
entrustReports
=
iEntrustService
.
getReportDetail
(
entrustId
);
return
BaseResponse
.
okData
(
iEntrustService
.
getQualityDetail
(
entrustId
));
if
(
entrustReports
.
size
()
!=
0
)
{
//过滤 id==null 和 projectType != '常规项目'
List
<
EntrustReport
>
list
=
entrustReports
.
stream
()
.
filter
(
arg
->
arg
.
getId
()
!=
null
&&
"质量控制"
.
equals
(
arg
.
getProjectType
()))
.
collect
(
Collectors
.
toList
());
Page
<
EntrustReport
>
rts
=
PageUtil
.
listConvertToPage
(
list
,
pageQuery
);
return
BaseResponse
.
okData
(
rts
);
}
return
BaseResponse
.
errorMsg
(
"没找到相关数据!"
);
}
}
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/controller/ReportController.java
View file @
2548f57c
...
@@ -40,7 +40,7 @@ public class ReportController {
...
@@ -40,7 +40,7 @@ public class ReportController {
this
.
iEntrustService
=
iEntrustService
;
this
.
iEntrustService
=
iEntrustService
;
}
}
@ApiOperation
(
value
=
"
委托
分页列表"
)
@ApiOperation
(
value
=
"
报告
分页列表"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"开始日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"开始日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"结束日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"结束日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/entity/QualityDetail.java
0 → 100644
View file @
2548f57c
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @description: 质量检测详情
* @author: qh
* @create: 2020-09-28 14:01
**/
@Data
@ApiModel
(
"质量检测详情实体"
)
public
class
QualityDetail
implements
Serializable
{
private
static
final
long
serialVersionUID
=
42L
;
@ApiModelProperty
(
"样品名字"
)
private
String
sampleName
;
@ApiModelProperty
(
"检测数据"
)
private
String
inputResult
;
@ApiModelProperty
(
"检测组名字"
)
private
String
teamGroupName
;
@ApiModelProperty
(
"项目编号"
)
private
String
entrustCode
;
@ApiModelProperty
(
"项目名字"
)
private
String
projectName
;
@ApiModelProperty
(
"委托人名字"
)
private
String
sendName
;
@ApiModelProperty
(
"委托人电话"
)
private
String
sendPhone
;
@ApiModelProperty
(
"样品id"
)
private
Integer
sampleId
;
@ApiModelProperty
(
"项目id"
)
private
Integer
entrustId
;
@ApiModelProperty
(
"检测组id"
)
private
Integer
teamGroupId
;
@ApiModelProperty
(
"用户id"
)
private
Integer
userId
;
@ApiModelProperty
(
"样品数量"
)
private
Integer
sampleNum
;
private
Integer
clientId
;
private
String
userName
;
private
String
clientName
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/EntrustMapper.java
View file @
2548f57c
...
@@ -2,6 +2,7 @@ package cn.wise.sc.cement.business.mapper;
...
@@ -2,6 +2,7 @@ package cn.wise.sc.cement.business.mapper;
import
cn.wise.sc.cement.business.entity.Entrust
;
import
cn.wise.sc.cement.business.entity.Entrust
;
import
cn.wise.sc.cement.business.entity.EntrustReport
;
import
cn.wise.sc.cement.business.entity.EntrustReport
;
import
cn.wise.sc.cement.business.entity.QualityDetail
;
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.ProjectVo
;
import
cn.wise.sc.cement.business.model.vo.ProjectVo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
@@ -38,4 +39,6 @@ public interface EntrustMapper extends BaseMapper<Entrust> {
...
@@ -38,4 +39,6 @@ public interface EntrustMapper extends BaseMapper<Entrust> {
List
<
EntrustReport
>
getReportDetail
(
@Param
(
"entrustId"
)
Integer
entrustId
);
List
<
EntrustReport
>
getReportDetail
(
@Param
(
"entrustId"
)
Integer
entrustId
);
List
<
QualityDetail
>
getQualityDetail
(
@Param
(
"entrustId"
)
Integer
entrustId
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/EntrustMapper.xml
View file @
2548f57c
...
@@ -154,7 +154,6 @@
...
@@ -154,7 +154,6 @@
order by e.update_time desc
order by e.update_time desc
</select>
</select>
<!--数据校核分页列表-->
<!--数据校核分页列表-->
<select
id=
"getCheckPage"
resultType=
"cn.wise.sc.cement.business.model.vo.EntrustVo"
>
<select
id=
"getCheckPage"
resultType=
"cn.wise.sc.cement.business.model.vo.EntrustVo"
>
select e.*, p.name as projectName, c.name as clientName, su.name as userName,
select e.*, p.name as projectName, c.name as clientName, su.name as userName,
...
@@ -193,6 +192,19 @@
...
@@ -193,6 +192,19 @@
ON sscct.entrust_id = e.id AND e.id = #{entrustId}
ON sscct.entrust_id = e.id AND e.id = #{entrustId}
</select>
</select>
<select
id=
"getQualityDetail"
resultType=
"cn.wise.sc.cement.business.entity.QualityDetail"
>
SELECT s.sample_name,esscct.* FROM (SELECT sscct.*,client_id,entrust_code,project_name,sample_num,send_name,send_phone FROM entrust e
RIGHT JOIN
(SELECT sct.input_result,sample_id,entrust_id,team_group_name,team_group_id,user_id FROM sample_check sc
RIGHT JOIN
(SELECT * FROM sample_check_team) sct
ON sct.check_id = sc.id WHERE sc.entrust_id = #{entrustId}) sscct
ON e.id = sscct.entrust_id) esscct
LEFT JOIN
(SELECT name as sample_name,id FROM sample) s
ON esscct.sample_id = s.id
</select>
<sql
id=
"checkWhere"
>
<sql
id=
"checkWhere"
>
<where>
<where>
and e.is_delete = 1 and e.status >= 6
and e.is_delete = 1 and e.status >= 6
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/QualityDetailVo.java
0 → 100644
View file @
2548f57c
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @description: 质量检测详情Vo
* @author: qh
* @create: 2020-09-28 14:55
**/
@Data
public
class
QualityDetailVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
42L
;
private
String
projectName
;
private
String
clientName
;
private
String
entrustCode
;
private
Integer
sampleNum
;
private
String
sendName
;
private
String
sendPhone
;
List
<
QualityTeamGroup
>
qualityTeamGroups
=
new
ArrayList
<>();
@Data
public
static
class
QualityTeamGroup
{
private
String
teamGroupName
;
private
List
<
QualitySample
>
qualitySamples
=
new
ArrayList
<>();
}
@Data
public
static
class
QualitySample
{
private
String
sampleName
;
private
List
<
SampleOriginal
>
sampleOriginals
=
new
ArrayList
<>();
}
@Data
public
static
class
SampleOriginal
{
private
String
cementCode
;
private
String
userName
;
private
String
teamValues
;
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEntrustService.java
View file @
2548f57c
...
@@ -16,7 +16,7 @@ import java.util.Map;
...
@@ -16,7 +16,7 @@ import java.util.Map;
/**
/**
* <p>
* <p>
*
服务类
* 服务类
* </p>
* </p>
*
*
* @author ztw
* @author ztw
...
@@ -24,66 +24,75 @@ import java.util.Map;
...
@@ -24,66 +24,75 @@ import java.util.Map;
*/
*/
public
interface
IEntrustService
extends
IService
<
Entrust
>
{
public
interface
IEntrustService
extends
IService
<
Entrust
>
{
BaseResponse
<
IPage
<
EntrustVo
>>
getPage
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
status
,
BaseResponse
<
IPage
<
EntrustVo
>>
getPage
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
status
,
Integer
clientId
,
String
projectName
,
String
projectCode
);
Integer
clientId
,
String
projectName
,
String
projectCode
);
BaseResponse
<
String
>
setTopping
(
Integer
id
);
BaseResponse
<
String
>
setTopping
(
Integer
id
);
BaseResponse
<
Entrust
>
create
(
EntrustQuery
query
);
BaseResponse
<
Entrust
>
create
(
EntrustQuery
query
);
BaseResponse
<
EntrustVo
>
getDtail
(
Integer
id
);
BaseResponse
<
EntrustVo
>
getDtail
(
Integer
id
);
BaseResponse
<
String
>
getMaxCementCode
();
BaseResponse
<
String
>
getMaxCementCode
();
BaseResponse
<
String
>
approval
(
ApprovalQuery
query
);
BaseResponse
<
String
>
approval
(
ApprovalQuery
query
);
BaseResponse
<
String
>
handle
(
HandleQuery
query
);
BaseResponse
<
String
>
handle
(
HandleQuery
query
);
BaseResponse
<
IPage
<
EntrustVo
>>
getSampleHandlePage
(
PageQuery
pageQuery
,
String
projectCode
);
BaseResponse
<
IPage
<
EntrustVo
>>
getSampleHandlePage
(
PageQuery
pageQuery
,
String
projectCode
);
BaseResponse
<
Map
<
String
,
Object
>>
getSampleHandleList
(
Integer
id
);
BaseResponse
<
Map
<
String
,
Object
>>
getSampleHandleList
(
Integer
id
);
BaseResponse
<
String
>
acceptHandle
(
Integer
[]
ids
);
BaseResponse
<
String
>
acceptHandle
(
Integer
[]
ids
);
BaseResponse
<
List
<
SampleHandleEnclosureVo
>>
getSampleHandleEnclosureList
(
Integer
sampleHandleId
);
BaseResponse
<
List
<
SampleHandleEnclosureVo
>>
getSampleHandleEnclosureList
(
Integer
sampleHandleId
);
BaseResponse
<
SampleHandleEnclosure
>
uploadEnclosureCL
(
SampleHandleEnclosureQuery
query
);
BaseResponse
<
SampleHandleEnclosure
>
uploadEnclosureCL
(
SampleHandleEnclosureQuery
query
);
BaseResponse
<
SampleHandleVo
>
getHandleDtail
(
Integer
id
);
BaseResponse
<
SampleHandleVo
>
getHandleDtail
(
Integer
id
);
BaseResponse
<
String
>
finishHandle
(
Integer
[]
ids
);
BaseResponse
<
String
>
finishHandle
(
Integer
[]
ids
);
BaseResponse
<
String
>
distribution
(
DistributionQuery
query
);
BaseResponse
<
String
>
distribution
(
DistributionQuery
query
);
BaseResponse
<
IPage
<
EntrustVo
>>
getSampleDistributionPage
(
PageQuery
pageQuery
,
String
projectName
,
BaseResponse
<
IPage
<
EntrustVo
>>
getSampleDistributionPage
(
PageQuery
pageQuery
,
String
projectName
,
String
projectCode
);
String
projectCode
);
BaseResponse
<
Map
<
String
,
Object
>>
getSampleDistributionList
(
Integer
id
);
BaseResponse
<
Map
<
String
,
Object
>>
getSampleDistributionList
(
Integer
id
);
BaseResponse
<
String
>
acceptDistribution
(
Integer
[]
ids
);
BaseResponse
<
String
>
acceptDistribution
(
Integer
[]
ids
);
BaseResponse
<
SampleDistribution
>
uploadEnclosurePF
(
SampleDistributionEnclosureQuery
query
);
BaseResponse
<
SampleDistribution
>
uploadEnclosurePF
(
SampleDistributionEnclosureQuery
query
);
BaseResponse
<
String
>
finishDistribution
(
Integer
[]
ids
);
BaseResponse
<
String
>
finishDistribution
(
Integer
[]
ids
);
BaseResponse
<
IPage
<
EntrustVo
>>
getCheckPage
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
status
,
BaseResponse
<
IPage
<
EntrustVo
>>
getCheckPage
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
status
,
Integer
clientId
,
String
projectName
,
String
projectCode
);
Integer
clientId
,
String
projectName
,
String
projectCode
);
BaseResponse
<
Map
<
String
,
Object
>>
getCheckList
(
Integer
id
);
BaseResponse
<
Map
<
String
,
Object
>>
getCheckList
(
Integer
id
);
BaseResponse
<
List
<
SampleCheckVo
>>
getCheckDetail
(
String
cementCode
);
BaseResponse
<
List
<
SampleCheckVo
>>
getCheckDetail
(
String
cementCode
);
BaseResponse
<
List
<
SampleDistribution
>>
getEnclosureList
(
Integer
sampleId
,
Integer
teamGroupId
,
Integer
userId
);
BaseResponse
<
List
<
SampleDistribution
>>
getEnclosureList
(
Integer
sampleId
,
Integer
teamGroupId
,
Integer
userId
);
BaseResponse
<
Map
<
String
,
String
>>
checkCount
(
Integer
teamGroupId
,
Integer
isParallel
,
BaseResponse
<
Map
<
String
,
String
>>
checkCount
(
Integer
teamGroupId
,
Integer
isParallel
,
Map
<
String
,
Object
>
mainResult
,
Map
<
String
,
Object
>
mainResult
,
Map
<
String
,
Object
>
secondaryResult
);
Map
<
String
,
Object
>
secondaryResult
);
BaseResponse
<
String
>
check
(
CheckQuery
query
);
BaseResponse
<
String
>
check
(
CheckQuery
query
);
BaseResponse
<
IPage
<
EntrustVo
>>
getReportPage
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
clientId
,
String
projectName
,
String
projectCode
);
BaseResponse
<
IPage
<
EntrustVo
>>
getReportPage
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
clientId
,
String
projectName
,
String
projectCode
);
BaseResponse
<
Boolean
>
deleteById
(
Integer
id
);
BaseResponse
<
Boolean
>
deleteById
(
Integer
id
);
List
<
EntrustReport
>
getReportDetail
(
Integer
entrustId
);
List
<
EntrustReport
>
getReportDetail
(
Integer
entrustId
);
BaseResponse
<
IPage
<
EntrustVo
>>
getQualityPage
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
clientId
,
String
projectName
,
String
projectCode
);
QualityDetailVo
getQualityDetail
(
Integer
entrustId
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
2548f57c
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