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
8cfe2516
Commit
8cfe2516
authored
Dec 09, 2022
by
zhengjuzi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目全景监控统计图
parent
51ef7f2c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
315 additions
and
5 deletions
+315
-5
ProjectMapper.java
...eejoin/amos/boot/module/ugp/api/mapper/ProjectMapper.java
+17
-0
ProjectMapper.xml
...odule-ugp-api/src/main/resources/mapper/ProjectMapper.xml
+197
-0
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+34
-0
ProjectServiceImpl.java
.../boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
+67
-5
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/ProjectMapper.java
View file @
8cfe2516
...
...
@@ -29,4 +29,21 @@ public interface ProjectMapper extends BaseMapper<Project> {
ProjectDto
getDetail
(
Long
sequenceNbr
);
//项目模糊筛选
IPage
<
ProjectDto
>
queryProjectPage
(
IPage
<
ProjectDto
>
page
,
Project
project
,
String
roleName
,
String
companyId
,
Set
<
String
>
codes
);
List
<
String
>
projectScheduleSuperviseName
(
Long
companyId
);
List
<
String
>
projectScheduleSuperviseNum
(
Long
companyId
);
List
<
String
>
projectScheduleInspectionName
(
Long
companyId
);
List
<
String
>
projectScheduleInspectionNum
(
Long
companyId
);
String
projectBuiltDept
(
Long
companyId
);
String
projectUnderConstructionDept
(
Long
companyId
);
String
projectBuiltUnit
(
Long
companyId
);
String
projectUnderConstructionUnit
(
Long
companyId
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/ProjectMapper.xml
View file @
8cfe2516
...
...
@@ -47,4 +47,201 @@
</where>
order by rec_date desc
</select>
<select
id=
"projectScheduleSuperviseName"
resultType=
"String"
>
select tz_ugp_project.name from
(select q.project_id, (q.num - w.num) as num
from
(select tz_ugp_weld.project_id, count(*) as num from tz_ugp_weld where
tz_ugp_weld.project_id in
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where supervise_dept_id = #{companyId}))
GROUP BY
tz_ugp_weld.project_id) as q left JOIN
(select tz_ugp_weld.project_id, count(*) as num from tz_ugp_weld where
tz_ugp_weld.project_id in
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where supervise_dept_id = #{companyId}))
and tz_ugp_weld.`status` = 0
GROUP BY
tz_ugp_weld.project_id) as w
on q.project_id = w.project_id) as l
left JOIN tz_ugp_project on l.project_id = tz_ugp_project.sequence_nbr
</select>
<select
id=
"projectScheduleSuperviseNum"
resultType=
"String"
>
select format((l.num/(tz_ugp_project.length/10))*100,0) as scheludel from
(select q.project_id, (q.num - w.num) as num
from
(select tz_ugp_weld.project_id, count(*) as num from tz_ugp_weld where
tz_ugp_weld.project_id in
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where supervise_dept_id = #{companyId}))
GROUP BY
tz_ugp_weld.project_id) as q left JOIN
(select tz_ugp_weld.project_id, count(*) as num from tz_ugp_weld where
tz_ugp_weld.project_id in
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where supervise_dept_id = #{companyId}))
and tz_ugp_weld.`status` = 0
GROUP BY
tz_ugp_weld.project_id) as w
on q.project_id = w.project_id) as l
left JOIN tz_ugp_project on l.project_id = tz_ugp_project.sequence_nbr
</select>
<select
id=
"projectScheduleInspectionName"
resultType=
"String"
>
select tz_ugp_project.name from
(select q.project_id, (q.num - w.num) as num
from
(select tz_ugp_weld.project_id, count(*) as num from tz_ugp_weld where
tz_ugp_weld.project_id in
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where inspection_unit_id = #{companyId}))
GROUP BY
tz_ugp_weld.project_id) as q left JOIN
(select tz_ugp_weld.project_id, count(*) as num from tz_ugp_weld where
tz_ugp_weld.project_id in
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where inspection_unit_id = #{companyId}))
and tz_ugp_weld.`status` = 0
GROUP BY
tz_ugp_weld.project_id) as w
on q.project_id = w.project_id) as l
left JOIN tz_ugp_project on l.project_id = tz_ugp_project.sequence_nbr
</select>
<select
id=
"projectScheduleInspectionNum"
resultType=
"String"
>
select format((l.num/(tz_ugp_project.length/10))*100,0) as scheludel from
(select q.project_id, (q.num - w.num) as num
from
(select tz_ugp_weld.project_id, count(*) as num from tz_ugp_weld where
tz_ugp_weld.project_id in
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where inspection_unit_id = #{companyId}))
GROUP BY
tz_ugp_weld.project_id) as q left JOIN
(select tz_ugp_weld.project_id, count(*) as num from tz_ugp_weld where
tz_ugp_weld.project_id in
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where inspection_unit_id = #{companyId}))
and tz_ugp_weld.`status` = 0
GROUP BY
tz_ugp_weld.project_id) as w
on q.project_id = w.project_id) as l
left JOIN tz_ugp_project on l.project_id = tz_ugp_project.sequence_nbr
</select>
<select
id=
"projectBuiltDept"
resultType=
"String"
>
select count(*)
from
(select tz_ugp_project.name ,format((l.num/(tz_ugp_project.length/10))*100,0) as scheludel from
(select q.project_id, (q.num - w.num) as num
from
(select tz_ugp_weld.project_id, count(*) as num from tz_ugp_weld where
tz_ugp_weld.project_id in
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where supervise_dept_id = #{companyId}))
GROUP BY
tz_ugp_weld.project_id) as q left JOIN
(select tz_ugp_weld.project_id, count(*) as num from tz_ugp_weld where
tz_ugp_weld.project_id in
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where supervise_dept_id = #{companyId}))
and tz_ugp_weld.`status` = 0
GROUP BY
tz_ugp_weld.project_id) as w
on q.project_id = w.project_id) as l
left JOIN tz_ugp_project on l.project_id = tz_ugp_project.sequence_nbr) as o
where o.scheludel = 100;
</select>
<select
id=
"projectUnderConstructionDept"
resultType=
"String"
>
select count(*)
from
(select tz_ugp_project.name ,format((l.num/(tz_ugp_project.length/10))*100,0) as scheludel from
(select q.project_id, (q.num - w.num) as num
from
(select tz_ugp_weld.project_id, count(*) as num from tz_ugp_weld where
tz_ugp_weld.project_id in
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where supervise_dept_id = #{companyId}))
GROUP BY
tz_ugp_weld.project_id) as q left JOIN
(select tz_ugp_weld.project_id, count(*) as num from tz_ugp_weld where
tz_ugp_weld.project_id in
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where supervise_dept_id = #{companyId}))
and tz_ugp_weld.`status` = 0
GROUP BY
tz_ugp_weld.project_id) as w
on q.project_id = w.project_id) as l
left JOIN tz_ugp_project on l.project_id = tz_ugp_project.sequence_nbr) as o
where o.scheludel != 100;
</select>
<select
id=
"projectBuiltUnit"
resultType=
"String"
>
select count(*)
from
(select tz_ugp_project.name ,format((l.num/(tz_ugp_project.length/10))*100,0) as scheludel from
(select q.project_id, (q.num - w.num) as num
from
(select tz_ugp_weld.project_id, count(*) as num from tz_ugp_weld where
tz_ugp_weld.project_id in
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where inspection_unit_id = #{companyId}))
GROUP BY
tz_ugp_weld.project_id) as q left JOIN
(select tz_ugp_weld.project_id, count(*) as num from tz_ugp_weld where
tz_ugp_weld.project_id in
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where inspection_unit_id = #{companyId}))
and tz_ugp_weld.`status` = 0
GROUP BY
tz_ugp_weld.project_id) as w
on q.project_id = w.project_id) as l
left JOIN tz_ugp_project on l.project_id = tz_ugp_project.sequence_nbr) as o
where o.scheludel = 100;
</select>
<select
id=
"projectUnderConstructionUnit"
resultType=
"String"
>
select count(*)
from
(select tz_ugp_project.name ,format((l.num/(tz_ugp_project.length/10))*100,0) as scheludel from
(select q.project_id, (q.num - w.num) as num
from
(select tz_ugp_weld.project_id, count(*) as num from tz_ugp_weld where
tz_ugp_weld.project_id in
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where inspection_unit_id = #{companyId}))
GROUP BY
tz_ugp_weld.project_id) as q left JOIN
(select tz_ugp_weld.project_id, count(*) as num from tz_ugp_weld where
tz_ugp_weld.project_id in
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where inspection_unit_id = #{companyId}))
and tz_ugp_weld.`status` = 0
GROUP BY
tz_ugp_weld.project_id) as w
on q.project_id = w.project_id) as l
left JOIN tz_ugp_project on l.project_id = tz_ugp_project.sequence_nbr) as o
where o.scheludel != 100;
</select>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
8cfe2516
...
...
@@ -398,6 +398,40 @@ public class ProjectController extends BaseController {
/**
* 项目进度
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"项目进度"
,
notes
=
"项目进度"
)
@GetMapping
(
value
=
"/projectSchedule"
)
public
ResponseModel
<
Map
<
String
,
List
<
String
>>>
projectSchedule
(){
return
ResponseHelper
.
buildResponse
(
projectServiceImpl
.
projectSchedule
());
}
/**
* 项目概况
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"项目概况"
,
notes
=
"项目概况"
)
@GetMapping
(
value
=
"/projectOverview"
)
public
ResponseModel
<
List
<
Map
<
String
,
String
>>>
projectOverview
(){
return
ResponseHelper
.
buildResponse
(
projectServiceImpl
.
projectOverview
());
}
/**
* 当前辖区的在建项目
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"当前辖区的在建项目"
,
notes
=
"当前辖区的在建项目"
)
@GetMapping
(
value
=
"/projectInProgress"
)
public
ResponseModel
<
Long
>
projectInProgress
(){
return
ResponseHelper
.
buildResponse
(
projectServiceImpl
.
projectInProgress
());
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
View file @
8cfe2516
...
...
@@ -22,10 +22,7 @@ import org.springframework.stereotype.Service;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.*
;
/**
* 项目信息表服务实现类
...
...
@@ -351,7 +348,71 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
}
@BusinessIdentify
public
Map
<
String
,
List
<
String
>>
projectSchedule
()
{
Map
<
String
,
List
<
String
>>
map
=
new
HashMap
<>();
ReginParams
ReginParams
=
orgService
.
getReginParams
();
String
companyType
=
ReginParams
.
getBusinessInfo
().
getCompanyType
();
Long
companyId
=
ReginParams
.
getBusinessInfo
().
getCompanySequenceNbr
();
if
(
OrgEnum
.
监察部门
.
getKey
().
equals
(
companyType
))
{
List
<
String
>
strings1
=
projectMapper
.
projectScheduleSuperviseName
(
companyId
);
map
.
put
(
"axisData"
,
strings1
);
List
<
String
>
strings2
=
projectMapper
.
projectScheduleSuperviseNum
(
companyId
);
map
.
put
(
"seriesData"
,
strings2
);
return
map
;
}
else
if
(
OrgEnum
.
监检机构
.
getKey
().
equals
(
companyType
))
{
List
<
String
>
strings1
=
projectMapper
.
projectScheduleInspectionName
(
companyId
);
map
.
put
(
"axisData"
,
strings1
);
List
<
String
>
strings2
=
projectMapper
.
projectScheduleInspectionNum
(
companyId
);
map
.
put
(
"seriesData"
,
strings2
);
return
map
;
}
return
null
;
}
public
List
<
Map
<
String
,
String
>>
projectOverview
()
{
List
<
Map
<
String
,
String
>>
list
=
new
LinkedList
<>();
ReginParams
ReginParams
=
orgService
.
getReginParams
();
String
companyType
=
ReginParams
.
getBusinessInfo
().
getCompanyType
();
Long
companyId
=
ReginParams
.
getBusinessInfo
().
getCompanySequenceNbr
();
if
(
OrgEnum
.
监察部门
.
getKey
().
equals
(
companyType
))
{
Map
<
String
,
String
>
map1
=
new
HashMap
<>();
Map
<
String
,
String
>
map2
=
new
HashMap
<>();
String
aLong1
=
projectMapper
.
projectBuiltDept
(
companyId
);
String
aLong2
=
projectMapper
.
projectUnderConstructionDept
(
companyId
);
map1
.
put
(
"name"
,
"已建"
);
map1
.
put
(
"value"
,
aLong1
);
map2
.
put
(
"name"
,
"在建"
);
map2
.
put
(
"value"
,
aLong2
);
list
.
add
(
map1
);
list
.
add
(
map2
);
return
list
;
}
else
if
(
OrgEnum
.
监检机构
.
getKey
().
equals
(
companyType
))
{
Map
<
String
,
String
>
map1
=
new
HashMap
<>();
Map
<
String
,
String
>
map2
=
new
HashMap
<>();
String
aLong1
=
projectMapper
.
projectBuiltUnit
(
companyId
);
String
aLong2
=
projectMapper
.
projectUnderConstructionUnit
(
companyId
);
map1
.
put
(
"name"
,
"已建"
);
map1
.
put
(
"value"
,
aLong1
);
map2
.
put
(
"name"
,
"在建"
);
map2
.
put
(
"value"
,
aLong2
);
list
.
add
(
map1
);
list
.
add
(
map2
);
return
list
;
}
return
null
;
}
public
Long
projectInProgress
()
{
List
<
Map
<
String
,
String
>>
list
=
new
LinkedList
<>();
ReginParams
ReginParams
=
orgService
.
getReginParams
();
String
companyType
=
ReginParams
.
getBusinessInfo
().
getCompanyType
();
Long
companyId
=
ReginParams
.
getBusinessInfo
().
getCompanySequenceNbr
();
if
(
OrgEnum
.
监察部门
.
getKey
().
equals
(
companyType
))
{
return
Long
.
parseLong
(
projectMapper
.
projectUnderConstructionDept
(
companyId
));
}
else
if
(
OrgEnum
.
监检机构
.
getKey
().
equals
(
companyType
))
{
return
Long
.
parseLong
(
projectMapper
.
projectUnderConstructionUnit
(
companyId
));
}
return
null
;
}
}
\ 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