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
0a860fb3
Commit
0a860fb3
authored
Nov 23, 2022
by
wanglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
当为监检机构登录时 获取所有项目的质量监检信息
parent
c219a9ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
17 deletions
+42
-17
InstallationQualityMapper.xml
...i/src/main/resources/mapper/InstallationQualityMapper.xml
+13
-10
InstallationQualityImpl.java
.../module/ugp/biz/service/impl/InstallationQualityImpl.java
+29
-7
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/InstallationQualityMapper.xml
View file @
0a860fb3
...
...
@@ -19,9 +19,9 @@
</association>
</resultMap>
...
...
@@ -50,13 +50,16 @@
qy.is_delete =0
and
pt.is_delete=0
<if
test=
"name !='' and name != null"
>
and
pt.name like concat( '%',#{name},'%')
</if>
<if
test=
"projectIds != null and projectIds.size > 0"
>
and qy.project_id in
<foreach
collection=
"projectIds"
separator=
","
item=
"item"
close=
")"
open=
"("
index=
"index"
>
<if
test=
"dto !=null"
>
<if
test=
"dto.name !='' and dto.name != null"
>
and
pt.name like concat( '%',#{dto.name},'%')
</if>
</if>
<if
test=
"projectId != null and projectId.size > 0"
>
and qy.project_id in
<foreach
collection=
"projectId"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/InstallationQualityImpl.java
View file @
0a860fb3
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrFormDto
;
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.StageEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.PercentOfPassDto
;
...
...
@@ -11,7 +12,9 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.Project;
import
com.yeejoin.amos.boot.module.ugp.api.entity.QualityInfo
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Weld
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.IInstallationQualityMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IInstallationQualityService
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
jdk.nashorn.internal.runtime.logging.Logger
;
import
lombok.extern.log4j.Log4j
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -27,6 +30,7 @@ import java.util.ArrayList;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.regex.Pattern
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
...
...
@@ -42,29 +46,47 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
@Resource
private
IInstallationQualityMapper
mapper
;
@Autowired
private
ProjectMapper
projectMapper
;
@Resource
private
WeldServiceImpl
weldService
;
@Resource
private
OrgUsrServiceImpl
orgUsrService
;
@Autowired
OrgServiceImpl
orgService
;
@Autowired
ProjectResourceServiceImpl
projectResourceService
;
static
final
String
监检
=
"WzNVBO"
;
//分页查询项目质量监检信息
@Override
@BusinessIdentify
public
Page
<
PercentOfPassDto
>
find
(
int
current
,
int
size
,
PercentOfPassDto
pd
)
{
Page
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
Set
<
String
>
projectIds
=
new
HashSet
<>();
for
(
Project
project:
projectResourceService
.
getProjectList
()){
projectIds
.
add
(
String
.
valueOf
(
project
.
getSequenceNbr
()));
}
if
(
ValidationUtil
.
isEmpty
(
projectIds
)){
return
page
;
Long
companySequenceNbr
=
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanySequenceNbr
();
OrgUsr
orgUsrById
=
orgService
.
getOrgUsrById
(
String
.
valueOf
(
companySequenceNbr
));
if
(
Pattern
.
matches
(
orgUsrById
.
getBizOrgCode
(),
监检
)){
List
<
Project
>
projects
=
projectMapper
.
selectList
(
null
);
for
(
Project
i:
projects
){
projectIds
.
add
(
String
.
valueOf
(
i
.
getSequenceNbr
()));
}
page
=
mapper
.
findss
(
page
,
pd
,
projectIds
);
}
else
{
for
(
Project
project
:
projectResourceService
.
getProjectList
())
{
projectIds
.
add
(
String
.
valueOf
(
project
.
getSequenceNbr
()));
}
if
(
ValidationUtil
.
isEmpty
(
projectIds
))
{
return
page
;
}
page
=
mapper
.
findss
(
page
,
pd
,
projectIds
);
}
page
=
mapper
.
findss
(
page
,
pd
,
projectIds
);
List
<
QualityInfo
>
qfList
=
page
.
getRecords
();
List
<
PercentOfPassDto
>
list
=
new
ArrayList
<>
(
);
...
...
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