Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
5d266b60
Commit
5d266b60
authored
Nov 30, 2022
by
3533457856@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【弹窗统计】优化质量问题弹窗统计
检验责任单位及监检状态 通过项目id获取焊口智能监验信息 通过项目id获取焊口编码
parent
539b4825
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
218 additions
and
11 deletions
+218
-11
WeldDto.java
...ava/com/yeejoin/amos/boot/module/ugp/api/dto/WeldDto.java
+11
-0
WeldVerifyDto.java
...m/yeejoin/amos/boot/module/ugp/api/dto/WeldVerifyDto.java
+41
-0
QualityProblemMapper.java
...amos/boot/module/ugp/api/mapper/QualityProblemMapper.java
+2
-1
QualityProblemMapper.xml
...gp-api/src/main/resources/mapper/QualityProblemMapper.xml
+13
-6
WeldController.java
...n/amos/boot/module/ugp/biz/controller/WeldController.java
+32
-0
QualityProblemServiceImpl.java
...odule/ugp/biz/service/impl/QualityProblemServiceImpl.java
+7
-1
WeldServiceImpl.java
...mos/boot/module/ugp/biz/service/impl/WeldServiceImpl.java
+112
-3
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/WeldDto.java
View file @
5d266b60
...
...
@@ -50,6 +50,17 @@ public class WeldDto extends BaseDto {
private
Date
codingDate
;
@ApiModelProperty
(
value
=
"监察单位"
)
private
String
superviseDept
;
@ApiModelProperty
(
value
=
"检验检测单位"
)
private
String
insDep
;
@ApiModelProperty
(
value
=
"检验检测单位负责人"
)
private
String
insPerson
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/WeldVerifyDto.java
0 → 100644
View file @
5d266b60
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
@Data
//@EqualsAndHashCode(callSuper = true)
@ApiModel
(
value
=
"WeldVerifyDto"
,
description
=
"焊口智能监验信息"
)
public
class
WeldVerifyDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"设备名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"设备编号"
)
private
String
code
;
@ApiModelProperty
(
value
=
"安装区域"
)
private
String
installRegion
;
@ApiModelProperty
(
value
=
"工艺校验"
)
private
String
craftStatus
=
"未校验"
;
@ApiModelProperty
(
value
=
"耐压校验"
)
private
String
voltageStatus
=
"未校验"
;
@ApiModelProperty
(
value
=
"敷设校验"
)
private
String
layStatus
=
"未校验"
;
@ApiModelProperty
(
value
=
"定位校验"
)
private
String
locationStatus
=
"未校验"
;
@ApiModelProperty
(
value
=
"探伤校验"
)
private
String
flawStatus
=
"未校验"
;
@ApiModelProperty
(
value
=
"管沟校验"
)
private
String
pipeDitchStatus
=
"未校验"
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/QualityProblemMapper.java
View file @
5d266b60
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.yeejoin.amos.boot.module.ugp.api.dto.QualityProblemDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.QualityProblem
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
feign.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
...
...
@@ -23,5 +24,5 @@ public interface QualityProblemMapper extends BaseMapper<QualityProblem> {
QualityProblemDto
getInfoBySequenceNbr
(
String
sequenceNbr
);
List
<
Map
<
String
,
String
>>
qualityProblemStatistics
();
List
<
Map
<
String
,
String
>>
qualityProblemStatistics
(
@Param
(
"ids"
)
Set
<
String
>
ids
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/QualityProblemMapper.xml
View file @
5d266b60
...
...
@@ -68,14 +68,21 @@
WHERE qi.sequence_nbr = #{sequenceNbr}
</select>
<select
id=
"qualityProblemStatistics"
resultType=
"java.util.Hash
Map"
>
<select
id=
"qualityProblemStatistics"
parameterType=
"java.util.Set"
resultType=
"java.util.
Map"
>
SELECT
generate_stage AS name
,
count(1) AS
value
qi.generate_stage AS `name`
,
count(1) AS
`value`
FROM
tz_ugp_quality_problem
GROUP BY
generate_stage
tz_ugp_quality_problem AS qi
<where>
<if
test=
"ids != null and ids.size > 0"
>
and qi.project_id in
<foreach
collection=
"ids"
index=
"index"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</where>
GROUP BY qi.generate_stage
</select>
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/WeldController.java
View file @
5d266b60
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.ugp.biz.controller;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WeldVerifyDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Weld
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper
;
...
...
@@ -169,4 +170,35 @@ public class WeldController extends BaseController {
return
ResponseHelper
.
buildResponse
(
weldServiceImpl
.
getCode
(
sequenceNbr
,
number
));
}
/**
* 通过项目id获取焊口编码
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查看焊口编码"
,
notes
=
"查看焊口编码"
)
@GetMapping
(
value
=
"/lookCode"
)
public
ResponseModel
<
List
<
Weld
>>
lookCode
(
String
projectId
)
{
return
ResponseHelper
.
buildResponse
(
weldServiceImpl
.
lookCode
(
projectId
));
}
/**
* 通过项目id获取焊口智能监验信息
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊口智能监验信息"
,
notes
=
"焊口智能监验信息"
)
@GetMapping
(
value
=
"/selectStatus"
)
public
ResponseModel
<
WeldVerifyDto
>
selectStage
(
Long
projectId
,
String
code
)
{
return
ResponseHelper
.
buildResponse
(
weldServiceImpl
.
selectStatus
(
projectId
,
code
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊口智能监验信息"
,
notes
=
"焊口智能监验信息"
)
@GetMapping
(
value
=
"/selectDept"
)
public
ResponseModel
<
WeldDto
>
selectDept
(
String
projectId
){
return
ResponseHelper
.
buildResponse
(
weldServiceImpl
.
selectDept
(
projectId
));
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/QualityProblemServiceImpl.java
View file @
5d266b60
...
...
@@ -170,7 +170,12 @@ public class QualityProblemServiceImpl extends BaseService<QualityProblemDto,Qua
return
qualityProblemDto
;
}
public
List
<
Map
<
String
,
String
>>
qualityProblemStatistics
()
{
return
qualityProblemMapper
.
qualityProblemStatistics
();
Set
<
String
>
projectIds
=
new
HashSet
<>();
for
(
Project
project:
projectResourceService
.
getProjectList
()){
projectIds
.
add
(
String
.
valueOf
(
project
.
getSequenceNbr
()));
}
return
qualityProblemMapper
.
qualityProblemStatistics
(
projectIds
);
}
}
\ No newline at end of file
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/WeldServiceImpl.java
View file @
5d266b60
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectInitiationEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.StageEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.WeldCodeEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.WeldMethodEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.OrgUsrDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectInitiationDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Weld
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WeldVerifyDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.*
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.VerifyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.WeldMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProjectInitiationService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IWeldService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.*
;
...
...
@@ -46,6 +54,13 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements
SuperviseRuleMapper
superviseRuleMapper
;
@Autowired
ProjectResourceServiceImpl
projectResourceService
;
@Autowired
VerifyMapper
verifyMapper
;
@Autowired
ProjectInitiationServiceImpl
projectInitiationService
;
@Autowired
OrgUsrServiceImpl
orgUsrServiceImpl
;
// Logger logger = LoggerFactory.getLogger(WeldServiceImpl.class);
...
...
@@ -209,7 +224,100 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements
return
weldMapper
.
select
(
projectId
);
}
/**
* 通过项目id获取焊口编码
*/
public
List
<
Weld
>
lookCode
(
String
projectId
){
LambdaQueryWrapper
<
Weld
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Weld:
:
getProjectId
,
projectId
);
List
<
Weld
>
weldList
=
weldMapper
.
selectList
(
wrapper
);
return
weldList
;
}
/**
* 通过项目id获取焊口智能监验信息
*/
public
WeldVerifyDto
selectStatus
(
Long
projectId
,
String
code
){
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Project:
:
getSequenceNbr
,
projectId
);
Project
project
=
projectMapper
.
selectOne
(
wrapper
);
WeldVerifyDto
weldVerifyDtos
=
new
WeldVerifyDto
();
weldVerifyDtos
.
setName
(
project
.
getName
());
weldVerifyDtos
.
setCode
(
project
.
getCode
());
weldVerifyDtos
.
setInstallRegion
(
project
.
getInstallRegion
());
LambdaQueryWrapper
<
Verify
>
wrapper1
=
new
LambdaQueryWrapper
<>();
wrapper1
.
eq
(
Verify:
:
getProjectId
,
projectId
)
.
eq
(
Verify:
:
getCode
,
code
)
.
groupBy
(
Verify:
:
getStage
)
.
orderByDesc
(
Verify:
:
getRecDate
);
List
<
Verify
>
verifyList
=
verifyMapper
.
selectList
(
wrapper1
);
for
(
Verify
verify
:
verifyList
){
if
(
"1"
.
equals
(
verify
.
getStatus
())){
if
(
StageEnum
.
定位
.
getStage
().
equals
(
verify
.
getStage
())){
weldVerifyDtos
.
setLocationStatus
(
"合格"
);
}
if
(
StageEnum
.
管道耐压
.
getStage
().
equals
(
verify
.
getStage
())){
weldVerifyDtos
.
setVoltageStatus
(
"合格"
);
}
if
(
StageEnum
.
敷设质量
.
getStage
().
equals
(
verify
.
getStage
())){
weldVerifyDtos
.
setLayStatus
(
"合格"
);
}
if
(
StageEnum
.
焊接工艺
.
getStage
().
equals
(
verify
.
getStage
())){
weldVerifyDtos
.
setCraftStatus
(
"合格"
);
}
}
else
if
(
"0"
.
equals
(
verify
.
getStatus
())){
if
(
StageEnum
.
定位
.
getStage
().
equals
(
verify
.
getStage
())){
weldVerifyDtos
.
setLocationStatus
(
"不合格"
);
}
if
(
StageEnum
.
管道耐压
.
getStage
().
equals
(
verify
.
getStage
())){
weldVerifyDtos
.
setVoltageStatus
(
"不合格"
);
}
if
(
StageEnum
.
敷设质量
.
getStage
().
equals
(
verify
.
getStage
())){
weldVerifyDtos
.
setLayStatus
(
"不合格"
);
}
if
(
StageEnum
.
焊接工艺
.
getStage
().
equals
(
verify
.
getStage
())){
weldVerifyDtos
.
setCraftStatus
(
"不合格"
);
}
}
}
return
weldVerifyDtos
;
}
/**
* 检验责任单位及监检状态
*/
public
WeldDto
selectDept
(
String
projectId
){
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
Project
project
=
projectMapper
.
selectOne
(
wrapper
.
eq
(
Project:
:
getSequenceNbr
,
projectId
));
LambdaQueryWrapper
<
SuperviseRule
>
wrapper1
=
new
LambdaQueryWrapper
<>();
WeldDto
weldDtos
=
new
WeldDto
();
if
(!
ValidationUtil
.
isEmpty
(
project
.
getInstallRegionCode
())){
SuperviseRule
superviseRule
=
superviseRuleMapper
.
selectOne
(
wrapper1
.
eq
(
SuperviseRule:
:
getAdminRegionCode
,
project
.
getInstallRegionCode
()));
// LambdaQueryWrapper<OrgUsr> orgUsrLambdaQueryWrapper = new LambdaQueryWrapper<>();
OrgUsr
orgUsr
=
orgService
.
getOrgUsrById
(
String
.
valueOf
(
superviseRule
.
getSuperviseDeptId
()));
weldDtos
.
setSuperviseDept
(
orgUsr
.
getBizOrgName
());
}
LambdaQueryWrapper
<
ProjectInitiation
>
wrapper2
=
new
LambdaQueryWrapper
<>();
wrapper2
.
eq
(
ProjectInitiation:
:
getInstanceId
,
project
.
getInstanceId
())
.
groupBy
(
ProjectInitiation:
:
getTaskName
)
.
orderByDesc
(
ProjectInitiation:
:
getRecDate
);
List
<
ProjectInitiation
>
projectInitiations
=
projectInitiationService
.
list
(
wrapper2
);
for
(
ProjectInitiation
projectInitiation:
projectInitiations
){
if
(
ProjectInitiationEnum
.
监检员分配
.
getName
().
equals
(
projectInitiation
.
getTaskName
())){
String
context
=
projectInitiation
.
getContext
();
JSONObject
jsonObject
=
(
JSONObject
)
JSONObject
.
parse
(
context
);
weldDtos
.
setInsPerson
(
jsonObject
.
getString
(
"insPerson"
));
}
if
(
ProjectInitiationEnum
.
监检科室分配
.
getName
().
equals
(
projectInitiation
.
getTaskName
())){
String
contexts
=
projectInitiation
.
getContext
();
JSONObject
jsonObject
=
(
JSONObject
)
JSONObject
.
parse
(
contexts
);
weldDtos
.
setInsDep
(
jsonObject
.
getString
(
"insDep"
));
}
}
return
weldDtos
;
}
}
\ No newline at end of file
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