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
16be9bf5
Commit
16be9bf5
authored
Dec 14, 2022
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目监控地图统计接口修改
parent
8a96560c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
19 deletions
+42
-19
ProjectMapper.java
...eejoin/amos/boot/module/ugp/api/mapper/ProjectMapper.java
+8
-0
ProjectMapper.xml
...odule-ugp-api/src/main/resources/mapper/ProjectMapper.xml
+25
-0
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+1
-1
ProjectServiceImpl.java
.../boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
+8
-18
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 @
16be9bf5
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.Equipment;
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.Equipment;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
import
java.util.List
;
...
@@ -46,4 +47,11 @@ public interface ProjectMapper extends BaseMapper<Project> {
...
@@ -46,4 +47,11 @@ public interface ProjectMapper extends BaseMapper<Project> {
String
projectBuiltUnit
(
Long
companyId
);
String
projectBuiltUnit
(
Long
companyId
);
String
projectUnderConstructionUnit
(
Long
companyId
);
String
projectUnderConstructionUnit
(
Long
companyId
);
/**
* 获取当前登陆人所在单位下的项目情况(已完成、未完成)
* @param projectIds
* @return
*/
List
<
Map
<
String
,
String
>>
getProjectComplete
(
@Param
(
"projectIds"
)
Set
<
Long
>
projectIds
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/ProjectMapper.xml
View file @
16be9bf5
...
@@ -244,4 +244,29 @@
...
@@ -244,4 +244,29 @@
where o.scheludel != 100;
where o.scheludel != 100;
</select>
</select>
<select
id=
"getProjectComplete"
resultType=
"java.util.Map"
>
SELECT
a.完成情况 AS name,
COUNT(1) AS value
FROM (SELECT
a.name,
a.进度,
case WHEN a.进度>1 THEN '已完成' ELSE '未完成' END AS 完成情况
FROM (SELECT
up.name,
ifNull((weldNum/(length/10)),0) AS 进度
FROM tz_ugp_project AS up
LEFT JOIN (SELECT project_id,count(1) AS weldNum FROM tz_ugp_weld GROUP BY project_id) AS uw ON uw.project_id = up.sequence_nbr
<where>
<if
test=
"projectIds!=null and projectIds.size>0"
>
and up.sequence_nbr in
<foreach
collection=
"projectIds"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</where>
) AS a) AS a
GROUP BY a.完成情况
</select>
</mapper>
</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 @
16be9bf5
...
@@ -405,7 +405,7 @@ public class ProjectController extends BaseController {
...
@@ -405,7 +405,7 @@ public class ProjectController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"项目进度"
,
notes
=
"项目进度"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"项目进度"
,
notes
=
"项目进度"
)
@GetMapping
(
value
=
"/projectSchedule"
)
@GetMapping
(
value
=
"/projectSchedule"
)
public
ResponseModel
<
Map
<
String
,
List
<
String
>>>
projectSchedule
(){
public
ResponseModel
<
List
<
Map
<
String
,
String
>>>
projectSchedule
(){
return
ResponseHelper
.
buildResponse
(
projectServiceImpl
.
projectSchedule
());
return
ResponseHelper
.
buildResponse
(
projectServiceImpl
.
projectSchedule
());
}
}
...
...
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 @
16be9bf5
...
@@ -351,25 +351,15 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -351,25 +351,15 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
@BusinessIdentify
@BusinessIdentify
public
Map
<
String
,
List
<
String
>>
projectSchedule
()
{
public
List
<
Map
<
String
,
String
>>
projectSchedule
()
{
Map
<
String
,
List
<
String
>>
map
=
new
HashMap
<>();
List
<
Project
>
projectList
=
projectResourceService
.
getProjectList
();
ReginParams
ReginParams
=
orgService
.
getReginParams
();
Set
<
Long
>
projectIds
=
new
HashSet
<>();
String
companyType
=
ReginParams
.
getBusinessInfo
().
getCompanyType
();
if
(!
ValidationUtil
.
isEmpty
(
projectList
)){
Long
companyId
=
ReginParams
.
getBusinessInfo
().
getCompanySequenceNbr
();
for
(
Project
project
:
projectList
){
if
(
OrgEnum
.
监察部门
.
getKey
().
equals
(
companyType
))
{
projectIds
.
add
(
project
.
getSequenceNbr
());
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
;
}
return
projectMapper
.
getProjectComplete
(
projectIds
);
}
}
public
List
<
Map
<
String
,
String
>>
projectOverview
()
{
public
List
<
Map
<
String
,
String
>>
projectOverview
()
{
...
...
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