Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
H
hzsomms
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
ZTGK
hzsomms
Commits
134f2d14
Commit
134f2d14
authored
Mar 14, 2024
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:1.首页代码提交
parent
d3301b9c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
111 additions
and
6 deletions
+111
-6
HomePageController.java
...jeecg/modules/homePage/controller/HomePageController.java
+10
-3
HomePageFace.java
...in/java/org/jeecg/modules/homePage/face/HomePageFace.java
+8
-0
HomePageFaceImpl.java
...rg/jeecg/modules/homePage/face/impl/HomePageFaceImpl.java
+8
-2
HomeSearchInfoVO.java
.../java/org/jeecg/modules/homePage/vo/HomeSearchInfoVO.java
+36
-0
LightRailMapper.java
...g/jeecg/modules/subwayNetwork/mapper/LightRailMapper.java
+2
-0
LightRailMapper.xml
...eecg/modules/subwayNetwork/mapper/xml/LightRailMapper.xml
+38
-1
ILightRailService.java
...eecg/modules/subwayNetwork/service/ILightRailService.java
+3
-0
LightRailServiceImpl.java
...ules/subwayNetwork/service/impl/LightRailServiceImpl.java
+6
-0
No files found.
jeecg-module-system/src/main/java/org/jeecg/modules/homePage/controller/HomePageController.java
View file @
134f2d14
...
@@ -8,11 +8,11 @@ import org.jeecg.modules.homePage.dto.DiseaseDTO;
...
@@ -8,11 +8,11 @@ import org.jeecg.modules.homePage.dto.DiseaseDTO;
import
org.jeecg.modules.homePage.face.HomePageFace
;
import
org.jeecg.modules.homePage.face.HomePageFace
;
import
org.jeecg.modules.homePage.vo.DiseaseVO
;
import
org.jeecg.modules.homePage.vo.DiseaseVO
;
import
org.jeecg.modules.homePage.vo.ToDoVO
;
import
org.jeecg.modules.homePage.vo.ToDoVO
;
import
org.jeecg.modules.homePage.vo.HomeSearchInfoVO
;
import
org.jeecg.modules.subwayNetwork.vo.SectionStationNode
;
import
org.jeecg.modules.subwayNetwork.vo.SectionStationNode
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -31,8 +31,15 @@ public class HomePageController {
...
@@ -31,8 +31,15 @@ public class HomePageController {
@Resource
@Resource
private
HomePageFace
homePageFace
;
private
HomePageFace
homePageFace
;
@AutoLog
(
value
=
"首页-获取线路下面所有的(区间-站点)树"
)
@AutoLog
(
value
=
"首页-获取检索信息"
)
@ApiOperation
(
value
=
"首页-获取线路下面所有的(区间-站点)树"
,
notes
=
"首页-获取线路下面所有的(区间-站点)树"
)
@ApiOperation
(
value
=
"首页-获取检索信息"
,
notes
=
"首页-获取检索信息"
)
@GetMapping
(
value
=
"/searchInfo"
)
public
Result
<
List
<
HomeSearchInfoVO
>>
searchInfo
(
String
query
)
{
return
Result
.
OK
(
homePageFace
.
searchInfo
(
query
));
}
@AutoLog
(
value
=
"首页-获取线路下面所有的(区间-站点)树-弃用"
)
@ApiOperation
(
value
=
"首页-获取线路下面所有的(区间-站点)树-弃用"
,
notes
=
"首页-获取线路下面所有的(区间-站点)树"
)
@GetMapping
(
value
=
"/getTree"
)
@GetMapping
(
value
=
"/getTree"
)
public
Result
<
List
<
SectionStationNode
>>
getTree
()
{
public
Result
<
List
<
SectionStationNode
>>
getTree
()
{
return
Result
.
OK
(
homePageFace
.
getTree
());
return
Result
.
OK
(
homePageFace
.
getTree
());
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/homePage/face/HomePageFace.java
View file @
134f2d14
...
@@ -4,6 +4,7 @@ package org.jeecg.modules.homePage.face;
...
@@ -4,6 +4,7 @@ package org.jeecg.modules.homePage.face;
import
org.jeecg.modules.homePage.dto.DiseaseDTO
;
import
org.jeecg.modules.homePage.dto.DiseaseDTO
;
import
org.jeecg.modules.homePage.vo.DiseaseVO
;
import
org.jeecg.modules.homePage.vo.DiseaseVO
;
import
org.jeecg.modules.homePage.vo.ToDoVO
;
import
org.jeecg.modules.homePage.vo.ToDoVO
;
import
org.jeecg.modules.homePage.vo.HomeSearchInfoVO
;
import
org.jeecg.modules.subwayNetwork.vo.SectionStationNode
;
import
org.jeecg.modules.subwayNetwork.vo.SectionStationNode
;
import
java.util.List
;
import
java.util.List
;
...
@@ -24,4 +25,11 @@ public interface HomePageFace {
...
@@ -24,4 +25,11 @@ public interface HomePageFace {
ToDoVO
todoList
();
ToDoVO
todoList
();
List
<
DiseaseVO
>
diseaseList
(
DiseaseDTO
dto
);
List
<
DiseaseVO
>
diseaseList
(
DiseaseDTO
dto
);
/**
* 获取车站信息
*
* @return
*/
List
<
HomeSearchInfoVO
>
searchInfo
(
String
query
);
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/homePage/face/impl/HomePageFaceImpl.java
View file @
134f2d14
...
@@ -2,7 +2,6 @@ package org.jeecg.modules.homePage.face.impl;
...
@@ -2,7 +2,6 @@ package org.jeecg.modules.homePage.face.impl;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
io.swagger.models.auth.In
;
import
org.jeecg.modules.checkData.service.IMovementRecordsMasterService
;
import
org.jeecg.modules.checkData.service.IMovementRecordsMasterService
;
import
org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch
;
import
org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch
;
import
org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchService
;
import
org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchService
;
...
@@ -13,12 +12,12 @@ import org.jeecg.modules.homePage.vo.ToDoDetailVO;
...
@@ -13,12 +12,12 @@ import org.jeecg.modules.homePage.vo.ToDoDetailVO;
import
org.jeecg.modules.homePage.vo.ToDoVO
;
import
org.jeecg.modules.homePage.vo.ToDoVO
;
import
org.jeecg.modules.maintenanceWork.service.IWorkBatchService
;
import
org.jeecg.modules.maintenanceWork.service.IWorkBatchService
;
import
org.jeecg.modules.subwayNetwork.service.ILightRailService
;
import
org.jeecg.modules.subwayNetwork.service.ILightRailService
;
import
org.jeecg.modules.homePage.vo.HomeSearchInfoVO
;
import
org.jeecg.modules.subwayNetwork.vo.SectionStationNode
;
import
org.jeecg.modules.subwayNetwork.vo.SectionStationNode
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -110,6 +109,13 @@ public class HomePageFaceImpl implements HomePageFace {
...
@@ -110,6 +109,13 @@ public class HomePageFaceImpl implements HomePageFace {
return
records
;
return
records
;
}
}
@Override
public
List
<
HomeSearchInfoVO
>
searchInfo
(
String
query
)
{
List
<
HomeSearchInfoVO
>
voList
=
lightRailService
.
searchInfo
(
query
);
return
voList
;
}
/**
/**
* 条件过滤
* 条件过滤
*
*
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/homePage/vo/HomeSearchInfoVO.java
0 → 100644
View file @
134f2d14
package
org
.
jeecg
.
modules
.
homePage
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
@Data
@ApiModel
(
value
=
"首页检索信息"
)
public
class
HomeSearchInfoVO
{
@ApiModelProperty
(
value
=
"id"
)
private
String
id
;
@ApiModelProperty
(
value
=
"标签"
)
private
String
label
;
@ApiModelProperty
(
value
=
"类型:1-车站 2-区间"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"线别id"
)
private
String
lineAliasId
;
@ApiModelProperty
(
value
=
"线别code【冠号】"
)
private
String
lineAliasCode
;
@ApiModelProperty
(
value
=
"起始里程"
)
private
BigDecimal
startMileage
;
@ApiModelProperty
(
value
=
"中心里程"
)
private
BigDecimal
centerMileage
;
@ApiModelProperty
(
value
=
"结束里程"
)
private
BigDecimal
endMileage
;
}
jeecg-module-system/src/main/java/org/jeecg/modules/subwayNetwork/mapper/LightRailMapper.java
View file @
134f2d14
package
org
.
jeecg
.
modules
.
subwayNetwork
.
mapper
;
package
org
.
jeecg
.
modules
.
subwayNetwork
.
mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.jeecg.modules.homePage.vo.HomeSearchInfoVO
;
import
org.jeecg.modules.subwayNetwork.dto.LightRailQueryDTO
;
import
org.jeecg.modules.subwayNetwork.dto.LightRailQueryDTO
;
import
org.jeecg.modules.subwayNetwork.entity.LightRail
;
import
org.jeecg.modules.subwayNetwork.entity.LightRail
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
@@ -22,4 +23,5 @@ public interface LightRailMapper extends BaseMapper<LightRail> {
...
@@ -22,4 +23,5 @@ public interface LightRailMapper extends BaseMapper<LightRail> {
List
<
SectionStationNode
>
getTreeLightRailList
();
List
<
SectionStationNode
>
getTreeLightRailList
();
List
<
HomeSearchInfoVO
>
searchInfo
(
String
query
);
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/subwayNetwork/mapper/xml/LightRailMapper.xml
View file @
134f2d14
...
@@ -75,5 +75,42 @@
...
@@ -75,5 +75,42 @@
t_sn_light_rail
t_sn_light_rail
-->
-->
</select>
</select>
<select
id=
"searchInfo"
resultType=
"org.jeecg.modules.homePage.vo.HomeSearchInfoVO"
>
SELECT * FROM
(
SELECT
CONCAT(tr.id,"-",ta.id,"-",ts.id) id,
CONCAT(tr.rail_line_name,"-",ta.line_alias_name,"-",ts.station_name) label,
1 type,
ts.id lineAliasId,
ta.line_alias_code lineAliasCode,
ts.starting_mileage startMileage,
ts.center_mileage centerMileage,
ts.end_mileage endMileage
FROM
t_sn_train_station ts
LEFT JOIN t_sn_line_alias ta ON ts.line_alias_id = ta.id
LEFT JOIN t_sn_light_rail tr ON ts.light_rail_id = tr.id
UNION ALL
SELECT
CONCAT(tr.id,"-",ta.id,"-",ts.id) id,
CONCAT(tr.rail_line_name,"-",ta.line_alias_name,"-",ts.section_name) label,
2 type,
ts.id lineAliasId,
ta.line_alias_name lineAliasCode,
ts.section_starting_mileage startMileage,
TRUNCATE((ts.section_end_mileage + ts.section_starting_mileage) / 2, 3) centerMileage,
ts.section_end_mileage endMileage
FROM
t_sn_subway_section ts
LEFT JOIN t_sn_line_alias ta ON ts.line_alias_id = ta.id
LEFT JOIN t_sn_light_rail tr ON ts.light_rail_id = tr.id
) t
WHERE 1=1
<if
test=
"query != null and query != ''"
>
AND t.label LIKE concat('%',#{query},'%')
</if>
ORDER BY label
</select>
</mapper>
</mapper>
\ No newline at end of file
jeecg-module-system/src/main/java/org/jeecg/modules/subwayNetwork/service/ILightRailService.java
View file @
134f2d14
...
@@ -2,6 +2,7 @@ package org.jeecg.modules.subwayNetwork.service;
...
@@ -2,6 +2,7 @@ package org.jeecg.modules.subwayNetwork.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.jeecg.common.api.dto.PageSearch
;
import
org.jeecg.common.api.dto.PageSearch
;
import
org.jeecg.modules.homePage.vo.HomeSearchInfoVO
;
import
org.jeecg.modules.subwayNetwork.dto.LightRailQueryDTO
;
import
org.jeecg.modules.subwayNetwork.dto.LightRailQueryDTO
;
import
org.jeecg.modules.subwayNetwork.entity.LightRail
;
import
org.jeecg.modules.subwayNetwork.entity.LightRail
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
...
@@ -31,4 +32,6 @@ public interface ILightRailService extends IService<LightRail> {
...
@@ -31,4 +32,6 @@ public interface ILightRailService extends IService<LightRail> {
List
<
SectionStationMapVO
>
getSectionStation
();
List
<
SectionStationMapVO
>
getSectionStation
();
List
<
SectionStationNode
>
getTree
();
List
<
SectionStationNode
>
getTree
();
List
<
HomeSearchInfoVO
>
searchInfo
(
String
query
);
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/subwayNetwork/service/impl/LightRailServiceImpl.java
View file @
134f2d14
...
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.jeecg.common.api.dto.PageSearch
;
import
org.jeecg.common.api.dto.PageSearch
;
import
org.jeecg.modules.homePage.vo.HomeSearchInfoVO
;
import
org.jeecg.modules.subwayNetwork.dto.LightRailQueryDTO
;
import
org.jeecg.modules.subwayNetwork.dto.LightRailQueryDTO
;
import
org.jeecg.modules.subwayNetwork.entity.LightRail
;
import
org.jeecg.modules.subwayNetwork.entity.LightRail
;
import
org.jeecg.modules.subwayNetwork.entity.LineAlias
;
import
org.jeecg.modules.subwayNetwork.entity.LineAlias
;
...
@@ -351,4 +352,9 @@ public class LightRailServiceImpl extends ServiceImpl<LightRailMapper, LightRail
...
@@ -351,4 +352,9 @@ public class LightRailServiceImpl extends ServiceImpl<LightRailMapper, LightRail
*/
*/
return
lightRailList
;
return
lightRailList
;
}
}
@Override
public
List
<
HomeSearchInfoVO
>
searchInfo
(
String
query
)
{
return
this
.
baseMapper
.
searchInfo
(
query
);
}
}
}
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