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
767210b9
Commit
767210b9
authored
1 year ago
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:1.代码提交
parent
accfedad
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
368 additions
and
137 deletions
+368
-137
pom.xml
jeecg-boot-base-core/pom.xml
+6
-0
EntityUtil.java
...-core/src/main/java/org/jeecg/common/util/EntityUtil.java
+6
-0
pom.xml
jeecg-module-system/jeecg-system-biz/pom.xml
+5
-0
LightRailController.java
...modules/subwayNetwork/controller/LightRailController.java
+25
-6
SubwaySectionController.java
...les/subwayNetwork/controller/SubwaySectionController.java
+11
-21
TrainStationController.java
...ules/subwayNetwork/controller/TrainStationController.java
+28
-13
SubwaySectionEditDTO.java
...jeecg/modules/subwayNetwork/dto/SubwaySectionEditDTO.java
+14
-0
SubwaySectionQueryDTO.java
...eecg/modules/subwayNetwork/dto/SubwaySectionQueryDTO.java
+3
-6
TrainStationEditDTO.java
.../jeecg/modules/subwayNetwork/dto/TrainStationEditDTO.java
+42
-0
SubwaySection.java
...org/jeecg/modules/subwayNetwork/entity/SubwaySection.java
+32
-29
TrainStation.java
.../org/jeecg/modules/subwayNetwork/entity/TrainStation.java
+9
-13
SubwaySectionMapper.java
...ecg/modules/subwayNetwork/mapper/SubwaySectionMapper.java
+4
-0
LightRailMapper.xml
...eecg/modules/subwayNetwork/mapper/xml/LightRailMapper.xml
+1
-1
SubwaySectionMapper.xml
.../modules/subwayNetwork/mapper/xml/SubwaySectionMapper.xml
+18
-0
TrainStationMapper.xml
...g/modules/subwayNetwork/mapper/xml/TrainStationMapper.xml
+11
-25
ISubwaySectionService.java
.../modules/subwayNetwork/service/ISubwaySectionService.java
+6
-0
ITrainStationService.java
...g/modules/subwayNetwork/service/ITrainStationService.java
+3
-0
SubwaySectionServiceImpl.java
.../subwayNetwork/service/impl/SubwaySectionServiceImpl.java
+43
-1
TrainStationServiceImpl.java
...s/subwayNetwork/service/impl/TrainStationServiceImpl.java
+33
-1
SubwaySectionVO.java
...a/org/jeecg/modules/subwayNetwork/vo/SubwaySectionVO.java
+47
-0
TrainStationVO.java
...va/org/jeecg/modules/subwayNetwork/vo/TrainStationVO.java
+15
-15
application-prod.yml
...eecg-system-start/src/main/resources/application-prod.yml
+2
-2
application-test.yml
...eecg-system-start/src/main/resources/application-test.yml
+3
-3
pom.xml
pom.xml
+1
-1
No files found.
jeecg-boot-base-core/pom.xml
View file @
767210b9
...
@@ -78,6 +78,12 @@
...
@@ -78,6 +78,12 @@
<artifactId>
micrometer-registry-prometheus
</artifactId>
<artifactId>
micrometer-registry-prometheus
</artifactId>
</dependency>
</dependency>
<!-- <dependency>-->
<!-- <groupId>cn.hutool</groupId>-->
<!-- <artifactId>hutool-extra</artifactId>-->
<!-- <version>${hutool.version}</version>-->
<!-- </dependency>-->
<!-- commons -->
<!-- commons -->
<dependency>
<dependency>
<groupId>
commons-io
</groupId>
<groupId>
commons-io
</groupId>
...
...
This diff is collapsed.
Click to expand it.
jeecg-boot-base-core/src/main/java/org/jeecg/common/util/EntityUtil.java
0 → 100644
View file @
767210b9
package
org
.
jeecg
.
common
.
util
;
public
class
EntityUtil
{
// public static <T> t
}
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/pom.xml
View file @
767210b9
...
@@ -11,6 +11,11 @@
...
@@ -11,6 +11,11 @@
<artifactId>
jeecg-system-biz
</artifactId>
<artifactId>
jeecg-system-biz
</artifactId>
<dependencies>
<dependencies>
<dependency>
<groupId>
io.github.biezhi
</groupId>
<artifactId>
TinyPinyin
</artifactId>
<version>
2.0.3.RELEASE
</version>
</dependency>
<dependency>
<dependency>
<groupId>
org.jeecgframework.boot
</groupId>
<groupId>
org.jeecgframework.boot
</groupId>
<artifactId>
jeecg-system-local-api
</artifactId>
<artifactId>
jeecg-system-local-api
</artifactId>
...
...
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/controller/LightRailController.java
View file @
767210b9
package
org
.
jeecg
.
modules
.
subwayNetwork
.
controller
;
package
org
.
jeecg
.
modules
.
subwayNetwork
.
controller
;
import
java.util.
Arrays
;
import
java.util.
*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
org.apache.shiro.SecurityUtils
;
import
org.jeecg.common.api.dto.PageSearch
;
import
org.jeecg.common.api.dto.PageSearch
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.system.query.QueryGenerator
;
import
org.jeecg.common.system.query.QueryGenerator
;
import
org.jeecg.common.system.vo.LoginUser
;
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.service.ILightRailService
;
import
org.jeecg.modules.subwayNetwork.service.ILightRailService
;
...
@@ -41,11 +43,6 @@ public class LightRailController extends JeecgController<LightRail, ILightRailSe
...
@@ -41,11 +43,6 @@ public class LightRailController extends JeecgController<LightRail, ILightRailSe
@Autowired
@Autowired
private
ILightRailService
lightRailService
;
private
ILightRailService
lightRailService
;
/**
* 分页列表查询
*
* @return
*/
@AutoLog
(
value
=
"线路车站-轻轨线路-分页列表查询"
)
@AutoLog
(
value
=
"线路车站-轻轨线路-分页列表查询"
)
@ApiOperation
(
value
=
"线路车站-轻轨线路-分页列表查询"
,
notes
=
"线路车站-轻轨线路-分页列表查询"
)
@ApiOperation
(
value
=
"线路车站-轻轨线路-分页列表查询"
,
notes
=
"线路车站-轻轨线路-分页列表查询"
)
@PostMapping
(
value
=
"/list"
)
@PostMapping
(
value
=
"/list"
)
...
@@ -60,7 +57,13 @@ public class LightRailController extends JeecgController<LightRail, ILightRailSe
...
@@ -60,7 +57,13 @@ public class LightRailController extends JeecgController<LightRail, ILightRailSe
@ApiOperation
(
value
=
"线路车站-轻轨线路-编辑"
,
notes
=
"线路车站-轻轨线路-编辑"
)
@ApiOperation
(
value
=
"线路车站-轻轨线路-编辑"
,
notes
=
"线路车站-轻轨线路-编辑"
)
@PostMapping
(
value
=
"/edit"
)
@PostMapping
(
value
=
"/edit"
)
public
Result
<
String
>
edit
(
@RequestBody
LightRail
lightRail
)
{
public
Result
<
String
>
edit
(
@RequestBody
LightRail
lightRail
)
{
//获取当前用户
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// lightRail.setUpdateBy(sysUser.getUsername());
lightRail
.
setUpdateTime
(
new
Date
());
if
(
ObjectUtil
.
isEmpty
(
lightRail
.
getId
()))
{
if
(
ObjectUtil
.
isEmpty
(
lightRail
.
getId
()))
{
// lightRail.setCreateBy(sysUser.getUsername());
lightRail
.
setCreateTime
(
new
Date
());
lightRailService
.
save
(
lightRail
);
lightRailService
.
save
(
lightRail
);
}
else
{
}
else
{
lightRailService
.
updateById
(
lightRail
);
lightRailService
.
updateById
(
lightRail
);
...
@@ -114,4 +117,20 @@ public class LightRailController extends JeecgController<LightRail, ILightRailSe
...
@@ -114,4 +117,20 @@ public class LightRailController extends JeecgController<LightRail, ILightRailSe
return
Result
.
OK
(
lightRail
);
return
Result
.
OK
(
lightRail
);
}
}
@AutoLog
(
value
=
"线路车站-轻轨线路-获取全部线路"
)
@ApiOperation
(
value
=
"线路车站-轻轨线路-获取全部线路"
,
notes
=
"线路车站-轻轨线路-获取全部线路"
)
@GetMapping
(
value
=
"/listAll"
)
public
Result
<
List
<
Map
<
String
,
Object
>>>
listAll
()
{
List
<
LightRail
>
pageList
=
lightRailService
.
list
();
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
for
(
LightRail
lightRail
:
pageList
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"label"
,
lightRail
.
getRailLineName
());
map
.
put
(
"value"
,
lightRail
.
getId
()
);
list
.
add
(
map
);
}
return
Result
.
OK
(
list
);
}
}
}
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/controller/SubwaySectionController.java
View file @
767210b9
...
@@ -4,9 +4,11 @@ import java.util.Arrays;
...
@@ -4,9 +4,11 @@ import java.util.Arrays;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
org.jeecg.common.api.dto.PageSearch
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.system.query.QueryGenerator
;
import
org.jeecg.common.system.query.QueryGenerator
;
import
org.jeecg.modules.subwayNetwork.dto.SubwaySectionEditDTO
;
import
org.jeecg.modules.subwayNetwork.dto.SubwaySectionEditDTO
;
import
org.jeecg.modules.subwayNetwork.dto.SubwaySectionQueryDTO
;
import
org.jeecg.modules.subwayNetwork.entity.SubwaySection
;
import
org.jeecg.modules.subwayNetwork.entity.SubwaySection
;
import
org.jeecg.modules.subwayNetwork.service.ISubwaySectionService
;
import
org.jeecg.modules.subwayNetwork.service.ISubwaySectionService
;
...
@@ -16,6 +18,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -16,6 +18,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.jeecg.common.system.base.controller.JeecgController
;
import
org.jeecg.common.system.base.controller.JeecgController
;
import
org.jeecg.modules.subwayNetwork.vo.SubwaySectionVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.ModelAndView
;
...
@@ -40,14 +43,9 @@ public class SubwaySectionController extends JeecgController<SubwaySection, ISub
...
@@ -40,14 +43,9 @@ public class SubwaySectionController extends JeecgController<SubwaySection, ISub
@AutoLog
(
value
=
"线路车站-地铁区间-分页列表查询"
)
@AutoLog
(
value
=
"线路车站-地铁区间-分页列表查询"
)
@ApiOperation
(
value
=
"线路车站-地铁区间-分页列表查询"
,
notes
=
"线路车站-地铁区间-分页列表查询"
)
@ApiOperation
(
value
=
"线路车站-地铁区间-分页列表查询"
,
notes
=
"线路车站-地铁区间-分页列表查询"
)
@GetMapping
(
value
=
"/list"
)
@PostMapping
(
value
=
"/list"
)
public
Result
<
IPage
<
SubwaySection
>>
queryPageList
(
SubwaySection
subwaySection
,
public
Result
<
IPage
<
SubwaySectionVO
>>
queryPageList
(
@RequestBody
PageSearch
<
SubwaySectionQueryDTO
>
dto
)
{
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
IPage
<
SubwaySectionVO
>
pageList
=
subwaySectionService
.
queryPageList
(
dto
);
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
QueryWrapper
<
SubwaySection
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
subwaySection
,
req
.
getParameterMap
());
Page
<
SubwaySection
>
page
=
new
Page
<
SubwaySection
>(
pageNo
,
pageSize
);
IPage
<
SubwaySection
>
pageList
=
subwaySectionService
.
page
(
page
,
queryWrapper
);
return
Result
.
OK
(
pageList
);
return
Result
.
OK
(
pageList
);
}
}
...
@@ -56,13 +54,16 @@ public class SubwaySectionController extends JeecgController<SubwaySection, ISub
...
@@ -56,13 +54,16 @@ public class SubwaySectionController extends JeecgController<SubwaySection, ISub
@ApiOperation
(
value
=
"线路车站-地铁区间-编辑"
,
notes
=
"线路车站-地铁区间-编辑"
)
@ApiOperation
(
value
=
"线路车站-地铁区间-编辑"
,
notes
=
"线路车站-地铁区间-编辑"
)
@PostMapping
(
value
=
"/edit"
)
@PostMapping
(
value
=
"/edit"
)
public
Result
<
String
>
edit
(
@RequestBody
SubwaySectionEditDTO
dto
)
{
public
Result
<
String
>
edit
(
@RequestBody
SubwaySectionEditDTO
dto
)
{
subwaySectionService
.
edit
(
dto
);
subwaySectionService
.
edit
(
dto
);
return
Result
.
OK
(
"编辑成功!"
);
return
Result
.
OK
(
"编辑成功!"
);
}
}
@AutoLog
(
value
=
"线路车站-地铁区间-通过id删除"
)
@AutoLog
(
value
=
"线路车站-地铁区间-通过id删除"
)
@ApiOperation
(
value
=
"线路车站-地铁区间-通过id删除"
,
notes
=
"线路车站-地铁区间-通过id删除"
)
@ApiOperation
(
value
=
"线路车站-地铁区间-通过id删除"
,
notes
=
"线路车站-地铁区间-通过id删除"
)
@
Delete
Mapping
(
value
=
"/delete"
)
@
Get
Mapping
(
value
=
"/delete"
)
public
Result
<
String
>
delete
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
public
Result
<
String
>
delete
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
subwaySectionService
.
removeById
(
id
);
subwaySectionService
.
removeById
(
id
);
return
Result
.
OK
(
"删除成功!"
);
return
Result
.
OK
(
"删除成功!"
);
...
@@ -70,21 +71,10 @@ public class SubwaySectionController extends JeecgController<SubwaySection, ISub
...
@@ -70,21 +71,10 @@ public class SubwaySectionController extends JeecgController<SubwaySection, ISub
@AutoLog
(
value
=
"线路车站-地铁区间-批量删除"
)
@AutoLog
(
value
=
"线路车站-地铁区间-批量删除"
)
@ApiOperation
(
value
=
"线路车站-地铁区间-批量删除"
,
notes
=
"线路车站-地铁区间-批量删除"
)
@ApiOperation
(
value
=
"线路车站-地铁区间-批量删除"
,
notes
=
"线路车站-地铁区间-批量删除"
)
@
Delete
Mapping
(
value
=
"/deleteBatch"
)
@
Get
Mapping
(
value
=
"/deleteBatch"
)
public
Result
<
String
>
deleteBatch
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
)
{
public
Result
<
String
>
deleteBatch
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
)
{
this
.
subwaySectionService
.
removeByIds
(
Arrays
.
asList
(
ids
.
split
(
","
)));
this
.
subwaySectionService
.
removeByIds
(
Arrays
.
asList
(
ids
.
split
(
","
)));
return
Result
.
OK
(
"批量删除成功!"
);
return
Result
.
OK
(
"批量删除成功!"
);
}
}
//@AutoLog(value = "线路车站-地铁区间-通过id查询")
@ApiOperation
(
value
=
"线路车站-地铁区间-通过id查询"
,
notes
=
"线路车站-地铁区间-通过id查询"
)
@GetMapping
(
value
=
"/queryById"
)
public
Result
<
SubwaySection
>
queryById
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
SubwaySection
subwaySection
=
subwaySectionService
.
getById
(
id
);
if
(
subwaySection
==
null
)
{
return
Result
.
error
(
"未找到对应数据"
);
}
return
Result
.
OK
(
subwaySection
);
}
}
}
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/controller/TrainStationController.java
View file @
767210b9
package
org
.
jeecg
.
modules
.
subwayNetwork
.
controller
;
package
org
.
jeecg
.
modules
.
subwayNetwork
.
controller
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -8,14 +9,16 @@ import org.jeecg.common.api.dto.PageSearch;
...
@@ -8,14 +9,16 @@ import org.jeecg.common.api.dto.PageSearch;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.aspect.annotation.AutoLog
;
import
org.jeecg.common.aspect.annotation.AutoLog
;
import
org.jeecg.common.system.base.controller.JeecgController
;
import
org.jeecg.common.system.base.controller.JeecgController
;
import
org.jeecg.modules.subwayNetwork.dto.TrainStationEditDTO
;
import
org.jeecg.modules.subwayNetwork.dto.TrainStationQueryDTO
;
import
org.jeecg.modules.subwayNetwork.dto.TrainStationQueryDTO
;
import
org.jeecg.modules.subwayNetwork.entity.LightRail
;
import
org.jeecg.modules.subwayNetwork.entity.TrainStation
;
import
org.jeecg.modules.subwayNetwork.entity.TrainStation
;
import
org.jeecg.modules.subwayNetwork.service.ITrainStationService
;
import
org.jeecg.modules.subwayNetwork.service.ITrainStationService
;
import
org.jeecg.modules.subwayNetwork.vo.TrainStationVO
;
import
org.jeecg.modules.subwayNetwork.vo.TrainStationVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.
Arrays
;
import
java.util.
*
;
/**
/**
* @Description: 线路车站-地铁站
* @Description: 线路车站-地铁站
...
@@ -33,32 +36,27 @@ public class TrainStationController extends JeecgController<TrainStation, ITrain
...
@@ -33,32 +36,27 @@ public class TrainStationController extends JeecgController<TrainStation, ITrain
@AutoLog
(
value
=
"线路车站-地铁站-分页列表查询"
)
@AutoLog
(
value
=
"线路车站-地铁站-分页列表查询"
)
@ApiOperation
(
value
=
"线路车站-地铁站-分页列表查询"
,
notes
=
"线路车站-地铁站-分页列表查询"
)
@ApiOperation
(
value
=
"线路车站-地铁站-分页列表查询"
,
notes
=
"线路车站-地铁站-分页列表查询"
)
@
Ge
tMapping
(
value
=
"/list"
)
@
Pos
tMapping
(
value
=
"/list"
)
public
Result
<
IPage
<
TrainStationVO
>>
queryPageList
(
@RequestBody
PageSearch
<
TrainStationQueryDTO
>
dto
)
{
public
Result
<
IPage
<
TrainStationVO
>>
queryPageList
(
@RequestBody
PageSearch
<
TrainStationQueryDTO
>
dto
)
{
IPage
<
TrainStationVO
>
pageList
=
trainStationService
.
queryPageList
(
dto
);
IPage
<
TrainStationVO
>
pageList
=
trainStationService
.
queryPageList
(
dto
);
return
Result
.
OK
(
pageList
);
return
Result
.
OK
(
pageList
);
}
}
@AutoLog
(
value
=
"线路车站-地铁站-添加"
)
@ApiOperation
(
value
=
"线路车站-地铁站-添加"
,
notes
=
"线路车站-地铁站-添加"
)
@PostMapping
(
value
=
"/add"
)
public
Result
<
String
>
add
(
@RequestBody
TrainStation
trainStation
)
{
trainStationService
.
save
(
trainStation
);
return
Result
.
OK
(
"添加成功!"
);
}
@AutoLog
(
value
=
"线路车站-地铁站-编辑"
)
@AutoLog
(
value
=
"线路车站-地铁站-编辑"
)
@ApiOperation
(
value
=
"线路车站-地铁站-编辑"
,
notes
=
"线路车站-地铁站-编辑"
)
@ApiOperation
(
value
=
"线路车站-地铁站-编辑"
,
notes
=
"线路车站-地铁站-编辑"
)
@PostMapping
(
value
=
"/edit"
)
@PostMapping
(
value
=
"/edit"
)
public
Result
<
String
>
edit
(
@RequestBody
TrainStation
trainStation
)
{
public
Result
<
String
>
edit
(
@RequestBody
TrainStationEditDTO
dto
)
{
trainStationService
.
updateById
(
trainStation
);
trainStationService
.
edit
(
dto
);
return
Result
.
OK
(
"编辑成功!"
);
return
Result
.
OK
(
"编辑成功!"
);
}
}
@AutoLog
(
value
=
"线路车站-地铁站-通过id删除"
)
@AutoLog
(
value
=
"线路车站-地铁站-通过id删除"
)
@ApiOperation
(
value
=
"线路车站-地铁站-通过id删除"
,
notes
=
"线路车站-地铁站-通过id删除"
)
@ApiOperation
(
value
=
"线路车站-地铁站-通过id删除"
,
notes
=
"线路车站-地铁站-通过id删除"
)
@
Delete
Mapping
(
value
=
"/delete"
)
@
Get
Mapping
(
value
=
"/delete"
)
public
Result
<
String
>
delete
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
public
Result
<
String
>
delete
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
trainStationService
.
removeById
(
id
);
trainStationService
.
removeById
(
id
);
return
Result
.
OK
(
"删除成功!"
);
return
Result
.
OK
(
"删除成功!"
);
...
@@ -67,11 +65,28 @@ public class TrainStationController extends JeecgController<TrainStation, ITrain
...
@@ -67,11 +65,28 @@ public class TrainStationController extends JeecgController<TrainStation, ITrain
@AutoLog
(
value
=
"线路车站-地铁站-批量删除"
)
@AutoLog
(
value
=
"线路车站-地铁站-批量删除"
)
@ApiOperation
(
value
=
"线路车站-地铁站-批量删除"
,
notes
=
"线路车站-地铁站-批量删除"
)
@ApiOperation
(
value
=
"线路车站-地铁站-批量删除"
,
notes
=
"线路车站-地铁站-批量删除"
)
@
Delete
Mapping
(
value
=
"/deleteBatch"
)
@
Get
Mapping
(
value
=
"/deleteBatch"
)
public
Result
<
String
>
deleteBatch
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
)
{
public
Result
<
String
>
deleteBatch
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
)
{
this
.
trainStationService
.
removeByIds
(
Arrays
.
asList
(
ids
.
split
(
","
)));
this
.
trainStationService
.
removeByIds
(
Arrays
.
asList
(
ids
.
split
(
","
)));
return
Result
.
OK
(
"批量删除成功!"
);
return
Result
.
OK
(
"批量删除成功!"
);
}
}
@AutoLog
(
value
=
"线路车站-地铁站-获取全部车站"
)
@ApiOperation
(
value
=
"线路车站-地铁站-获取全部车站"
,
notes
=
"线路车站-地铁站-获取全部车站"
)
@GetMapping
(
value
=
"/listAll"
)
public
Result
<
List
<
Map
<
String
,
Object
>>>
listAll
()
{
List
<
TrainStation
>
pageList
=
trainStationService
.
list
();
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
for
(
TrainStation
trainStation
:
pageList
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"label"
,
trainStation
.
getStationName
());
map
.
put
(
"value"
,
trainStation
.
getId
());
map
.
put
(
"lightRailId"
,
trainStation
.
getLightRailId
());
list
.
add
(
map
);
}
return
Result
.
OK
(
list
);
}
}
}
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/dto/SubwaySectionEditDTO.java
View file @
767210b9
package
org
.
jeecg
.
modules
.
subwayNetwork
.
dto
;
package
org
.
jeecg
.
modules
.
subwayNetwork
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
org.jeecgframework.poi.excel.annotation.Excel
;
@Data
@Data
@ApiModel
(
value
=
"SubwaySectionEditDTO编辑"
)
@ApiModel
(
value
=
"SubwaySectionEditDTO编辑"
)
public
class
SubwaySectionEditDTO
{
public
class
SubwaySectionEditDTO
{
private
String
id
;
@ApiModelProperty
(
value
=
"轻轨线路ID"
)
private
String
lightRailId
;
@ApiModelProperty
(
value
=
"起始车站Id"
)
private
String
startTrainStationId
;
@ApiModelProperty
(
value
=
"结束车站Id"
)
private
String
endTrainStationId
;
@ApiModelProperty
(
value
=
"区间名"
)
private
String
sectionName
;
}
}
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/dto/SubwaySectionDTO.java
→
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/dto/SubwaySection
Query
DTO.java
View file @
767210b9
...
@@ -3,14 +3,11 @@ package org.jeecg.modules.subwayNetwork.dto;
...
@@ -3,14 +3,11 @@ package org.jeecg.modules.subwayNetwork.dto;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
org.jeecgframework.poi.excel.annotation.Excel
;
@Data
@Data
@ApiModel
(
value
=
"区间DTO"
)
@ApiModel
(
value
=
"区间DTO"
)
public
class
SubwaySectionDTO
{
public
class
SubwaySectionQueryDTO
{
@ApiModelProperty
(
value
=
"区间名"
)
@ApiModelProperty
(
value
=
"线路id"
)
private
String
sectionName
;
private
java
.
lang
.
String
railId
;
}
}
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/dto/TrainStationEditDTO.java
0 → 100644
View file @
767210b9
package
org
.
jeecg
.
modules
.
subwayNetwork
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
@Data
@ApiModel
(
value
=
"地铁站编辑DTO"
)
public
class
TrainStationEditDTO
{
@ApiModelProperty
(
value
=
"id"
)
private
String
id
;
@ApiModelProperty
(
value
=
"轻轨线路ID"
)
private
String
lightRailId
;
@ApiModelProperty
(
value
=
"车站名"
)
private
String
stationName
;
@ApiModelProperty
(
value
=
"车站编码"
)
private
String
stationCode
;
@ApiModelProperty
(
value
=
"线别Code"
)
private
String
lineAliasCode
;
@ApiModelProperty
(
value
=
"起始里程"
)
private
BigDecimal
startingMileage
;
@ApiModelProperty
(
value
=
"中心里程"
)
private
BigDecimal
centerMileage
;
@ApiModelProperty
(
value
=
"结束里程"
)
private
BigDecimal
endMileage
;
@ApiModelProperty
(
value
=
"序号"
)
private
Integer
seq
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
}
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/entity/SubwaySection.java
View file @
767210b9
package
org
.
jeecg
.
modules
.
subwayNetwork
.
entity
;
package
org
.
jeecg
.
modules
.
subwayNetwork
.
entity
;
import
java.io.Serializable
;
import
java.io.UnsupportedEncodingException
;
import
java.util.Date
;
import
java.math.BigDecimal
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
lombok.Data
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.jeecgframework.poi.excel.annotation.Excel
;
import
org.jeecg.common.aspect.annotation.Dict
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
org.jeecgframework.poi.excel.annotation.Excel
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
/**
* @Description: 线路车站-地铁区间
* @Description: 线路车站-地铁区间
* @Author: jeecg-boot
* @Author: jeecg-boot
* @Date:
2023-06-15
* @Date: 2023-06-15
* @Version: V1.0
* @Version: V1.0
*/
*/
@Data
@Data
@TableName
(
"t_sn_subway_section"
)
@TableName
(
"t_sn_subway_section"
)
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
@ApiModel
(
value
=
"t_sn_subway_section对象"
,
description
=
"线路车站-地铁区间"
)
@ApiModel
(
value
=
"t_sn_subway_section对象"
,
description
=
"线路车站-地铁区间"
)
public
class
SubwaySection
implements
Serializable
{
public
class
SubwaySection
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**主键*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ApiModelProperty
(
value
=
"主键"
)
@ApiModelProperty
(
value
=
"主键"
)
private
java
.
lang
.
String
id
;
private
java
.
lang
.
String
id
;
/**创建人*/
@ApiModelProperty
(
value
=
"创建人"
)
@ApiModelProperty
(
value
=
"创建人"
)
private
java
.
lang
.
String
createBy
;
private
java
.
lang
.
String
createBy
;
/**创建日期*/
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"创建日期"
)
@ApiModelProperty
(
value
=
"创建日期"
)
private
java
.
util
.
Date
createTime
;
private
java
.
util
.
Date
createTime
;
/**更新人*/
@ApiModelProperty
(
value
=
"更新人"
)
@ApiModelProperty
(
value
=
"更新人"
)
private
java
.
lang
.
String
updateBy
;
private
java
.
lang
.
String
updateBy
;
/**更新日期*/
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"更新日期"
)
@ApiModelProperty
(
value
=
"更新日期"
)
private
java
.
util
.
Date
updateTime
;
private
java
.
util
.
Date
updateTime
;
/**区间名*/
@Excel
(
name
=
"区间名"
,
width
=
15
)
@Excel
(
name
=
"区间名"
,
width
=
15
)
@ApiModelProperty
(
value
=
"区间名"
)
@ApiModelProperty
(
value
=
"区间名"
)
private
java
.
lang
.
String
sectionName
;
private
java
.
lang
.
String
sectionName
;
/**区间code*/
@Excel
(
name
=
"区间code"
,
width
=
15
)
@Excel
(
name
=
"区间code"
,
width
=
15
)
@ApiModelProperty
(
value
=
"区间code"
)
@ApiModelProperty
(
value
=
"区间code"
)
private
java
.
lang
.
String
sectionCode
;
private
java
.
lang
.
String
sectionCode
;
/**线路id*/
@Excel
(
name
=
"线路id"
,
width
=
15
)
@Excel
(
name
=
"线路id"
,
width
=
15
)
@ApiModelProperty
(
value
=
"线路id"
)
@ApiModelProperty
(
value
=
"轻轨线路ID"
)
private
java
.
lang
.
String
railId
;
private
String
lightRailId
;
@ApiModelProperty
(
value
=
"起始车站Id"
)
private
String
startTrainStationId
;
@ApiModelProperty
(
value
=
"结束车站Id"
)
private
String
endTrainStationId
;
}
}
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/entity/TrainStation.java
View file @
767210b9
...
@@ -71,34 +71,30 @@ public class TrainStation implements Serializable {
...
@@ -71,34 +71,30 @@ public class TrainStation implements Serializable {
@ApiModelProperty
(
value
=
"车站编码"
)
@ApiModelProperty
(
value
=
"车站编码"
)
private
String
stationCode
;
private
String
stationCode
;
@Excel
(
name
=
"线别"
,
width
=
15
)
@Excel
(
name
=
"线别"
,
width
=
15
)
@ApiModelProperty
(
value
=
"线别"
)
@ApiModelProperty
(
value
=
"线别
Code
"
)
private
String
lineAlias
;
private
String
lineAlias
Code
;
@Excel
(
name
=
"起始里程前缀"
,
width
=
15
)
@ApiModelProperty
(
value
=
"起始里程前缀"
)
private
String
startingMileagePrefix
;
@Excel
(
name
=
"起始里程"
,
width
=
15
)
@Excel
(
name
=
"起始里程"
,
width
=
15
)
@ApiModelProperty
(
value
=
"起始里程"
)
@ApiModelProperty
(
value
=
"起始里程"
)
private
BigDecimal
startingMileage
;
private
BigDecimal
startingMileage
;
@Excel
(
name
=
"中心里程前缀"
,
width
=
15
)
@ApiModelProperty
(
value
=
"中心里程前缀"
)
private
String
centerMileagePrefix
;
@Excel
(
name
=
"中心里程"
,
width
=
15
)
@Excel
(
name
=
"中心里程"
,
width
=
15
)
@ApiModelProperty
(
value
=
"中心里程"
)
@ApiModelProperty
(
value
=
"中心里程"
)
private
BigDecimal
centerMileage
;
private
BigDecimal
centerMileage
;
@Excel
(
name
=
"结束里程前缀"
,
width
=
15
)
@ApiModelProperty
(
value
=
"结束里程前缀"
)
private
String
endMileagePrefix
;
@Excel
(
name
=
"结束里程"
,
width
=
15
)
@Excel
(
name
=
"结束里程"
,
width
=
15
)
@ApiModelProperty
(
value
=
"结束里程"
)
@ApiModelProperty
(
value
=
"结束里程"
)
private
BigDecimal
endMileage
;
private
BigDecimal
endMileage
;
@ApiModelProperty
(
value
=
"序号"
)
@ApiModelProperty
(
value
=
"序号"
)
private
Integer
seq
;
private
Integer
seq
;
@ApiModelProperty
(
value
=
"站长度(m)"
)
private
BigDecimal
length
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
}
}
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/mapper/SubwaySectionMapper.java
View file @
767210b9
package
org
.
jeecg
.
modules
.
subwayNetwork
.
mapper
;
package
org
.
jeecg
.
modules
.
subwayNetwork
.
mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.jeecg.modules.subwayNetwork.dto.SubwaySectionQueryDTO
;
import
org.jeecg.modules.subwayNetwork.entity.SubwaySection
;
import
org.jeecg.modules.subwayNetwork.entity.SubwaySection
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.jeecg.modules.subwayNetwork.vo.SubwaySectionVO
;
/**
/**
* @Description: 线路车站-地铁区间
* @Description: 线路车站-地铁区间
...
@@ -11,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -11,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
*/
public
interface
SubwaySectionMapper
extends
BaseMapper
<
SubwaySection
>
{
public
interface
SubwaySectionMapper
extends
BaseMapper
<
SubwaySection
>
{
IPage
<
SubwaySectionVO
>
queryPageList
(
IPage
<
SubwaySectionVO
>
page
,
SubwaySectionQueryDTO
query
);
}
}
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/mapper/xml/LightRailMapper.xml
View file @
767210b9
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
ifnull(sum(t3.end_mileage),0) lineMileage
ifnull(sum(t3.end_mileage),0) lineMileage
FROM
FROM
t_sn_light_rail t1
t_sn_light_rail t1
LEFT JOIN t_sn_subway_section t2 ON t1.id = t2.rail_id
LEFT JOIN t_sn_subway_section t2 ON t1.id = t2.
light_
rail_id
LEFT JOIN t_sn_train_station t3 ON t1.id = t3.light_rail_id
LEFT JOIN t_sn_train_station t3 ON t1.id = t3.light_rail_id
<where>
<where>
<if
test=
"query.railLineName != null and query.railLineName != ''"
>
<if
test=
"query.railLineName != null and query.railLineName != ''"
>
...
...
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/mapper/xml/SubwaySectionMapper.xml
View file @
767210b9
...
@@ -2,4 +2,22 @@
...
@@ -2,4 +2,22 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"org.jeecg.modules.subwayNetwork.mapper.SubwaySectionMapper"
>
<mapper
namespace=
"org.jeecg.modules.subwayNetwork.mapper.SubwaySectionMapper"
>
<select
id=
"queryPageList"
resultType=
"org.jeecg.modules.subwayNetwork.vo.SubwaySectionVO"
>
SELECT
t1.id,
t1.create_by,
t1.create_time,
t1.section_name,
t2.rail_line_name light_rail_name,
t1.light_rail_id,
t1.start_train_station_id,
t1.end_train_station_id
FROM
t_sn_subway_section t1 LEFT JOIN t_sn_light_rail t2 ON t1.light_rail_id = t2.id
<where>
<if
test=
"query.sectionName != null and query.sectionName != ''"
>
AND t1.section_name like concat('%',#{query.sectionName},'%')
</if>
</where>
</select>
</mapper>
</mapper>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/mapper/xml/TrainStationMapper.xml
View file @
767210b9
...
@@ -4,38 +4,24 @@
...
@@ -4,38 +4,24 @@
<select
id=
"queryPageList"
resultType=
"org.jeecg.modules.subwayNetwork.vo.TrainStationVO"
>
<select
id=
"queryPageList"
resultType=
"org.jeecg.modules.subwayNetwork.vo.TrainStationVO"
>
SELECT
SELECT
t1.center_mileage,
t1.center_mileage_prefix,
t1.create_by,
t1.create_time,
t1.end_mileage,
t1.end_mileage_prefix,
t1.id,
t1.id,
t1.station_name,
t1.station_code,
t1.light_rail_id,
t1.light_rail_id,
t1.line_alias,
t2.rail_line_name light_rail_name,
t1.line_alias_code,
t1.starting_mileage,
t1.starting_mileage,
t1.starting_mileage_prefix,
t1.station_code,
t1.station_name,
t1.update_by,
t1.update_time,
t1.center_mileage,
t1.center_mileage,
t1.
center_mileage_prefix
,
t1.
end_mileage
,
t1.create_by,
t1.create_by,
t1.create_time,
t1.create_time,
t1.end_mileage,
t1.end_mileage_prefix,
t1.id,
t1.light_rail_id,
t1.line_alias,
t1.starting_mileage,
t1.starting_mileage_prefix,
t1.station_code,
t1.station_name,
t1.update_by,
t1.update_by,
t1.update_time
t1.update_time,
FROM
t1.length,
t_sn_train_station t1
t1.seq,
t1.remark
FROM t_sn_train_station t1
LEFT JOIN t_sn_light_rail t2 ON t1.light_rail_id = t2.id
<where>
<where>
<if
test=
"query.stationName !=null and query.stationName!=''"
>
<if
test=
"query.stationName !=null and query.stationName!=''"
>
AND t1.station_name like concat('%',#{query.stationName},'%')
AND t1.station_name like concat('%',#{query.stationName},'%')
...
...
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/service/ISubwaySectionService.java
View file @
767210b9
package
org
.
jeecg
.
modules
.
subwayNetwork
.
service
;
package
org
.
jeecg
.
modules
.
subwayNetwork
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.jeecg.common.api.dto.PageSearch
;
import
org.jeecg.modules.subwayNetwork.dto.SubwaySectionEditDTO
;
import
org.jeecg.modules.subwayNetwork.dto.SubwaySectionEditDTO
;
import
org.jeecg.modules.subwayNetwork.dto.SubwaySectionQueryDTO
;
import
org.jeecg.modules.subwayNetwork.entity.SubwaySection
;
import
org.jeecg.modules.subwayNetwork.entity.SubwaySection
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.jeecg.modules.subwayNetwork.vo.SubwaySectionVO
;
/**
/**
* @Description: 线路车站-地铁区间
* @Description: 线路车站-地铁区间
...
@@ -13,4 +17,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -13,4 +17,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
public
interface
ISubwaySectionService
extends
IService
<
SubwaySection
>
{
public
interface
ISubwaySectionService
extends
IService
<
SubwaySection
>
{
void
edit
(
SubwaySectionEditDTO
dto
);
void
edit
(
SubwaySectionEditDTO
dto
);
IPage
<
SubwaySectionVO
>
queryPageList
(
PageSearch
<
SubwaySectionQueryDTO
>
dto
);
}
}
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/service/ITrainStationService.java
View file @
767210b9
...
@@ -3,6 +3,7 @@ package org.jeecg.modules.subwayNetwork.service;
...
@@ -3,6 +3,7 @@ package org.jeecg.modules.subwayNetwork.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.jeecg.common.api.dto.PageSearch
;
import
org.jeecg.common.api.dto.PageSearch
;
import
org.jeecg.modules.subwayNetwork.dto.TrainStationEditDTO
;
import
org.jeecg.modules.subwayNetwork.dto.TrainStationQueryDTO
;
import
org.jeecg.modules.subwayNetwork.dto.TrainStationQueryDTO
;
import
org.jeecg.modules.subwayNetwork.entity.TrainStation
;
import
org.jeecg.modules.subwayNetwork.entity.TrainStation
;
import
org.jeecg.modules.subwayNetwork.vo.TrainStationVO
;
import
org.jeecg.modules.subwayNetwork.vo.TrainStationVO
;
...
@@ -17,4 +18,6 @@ public interface ITrainStationService extends IService<TrainStation> {
...
@@ -17,4 +18,6 @@ public interface ITrainStationService extends IService<TrainStation> {
IPage
<
TrainStationVO
>
queryPageList
(
PageSearch
<
TrainStationQueryDTO
>
dto
);
IPage
<
TrainStationVO
>
queryPageList
(
PageSearch
<
TrainStationQueryDTO
>
dto
);
void
edit
(
TrainStationEditDTO
dto
);
}
}
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/service/impl/SubwaySectionServiceImpl.java
View file @
767210b9
package
org
.
jeecg
.
modules
.
subwayNetwork
.
service
.
impl
;
package
org
.
jeecg
.
modules
.
subwayNetwork
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.jeecg.common.api.dto.PageSearch
;
import
org.jeecg.modules.subwayNetwork.dto.SubwaySectionEditDTO
;
import
org.jeecg.modules.subwayNetwork.dto.SubwaySectionEditDTO
;
import
org.jeecg.modules.subwayNetwork.dto.SubwaySectionQueryDTO
;
import
org.jeecg.modules.subwayNetwork.entity.LightRail
;
import
org.jeecg.modules.subwayNetwork.entity.SubwaySection
;
import
org.jeecg.modules.subwayNetwork.entity.SubwaySection
;
import
org.jeecg.modules.subwayNetwork.entity.TrainStation
;
import
org.jeecg.modules.subwayNetwork.mapper.LightRailMapper
;
import
org.jeecg.modules.subwayNetwork.mapper.SubwaySectionMapper
;
import
org.jeecg.modules.subwayNetwork.mapper.SubwaySectionMapper
;
import
org.jeecg.modules.subwayNetwork.mapper.TrainStationMapper
;
import
org.jeecg.modules.subwayNetwork.service.ISubwaySectionService
;
import
org.jeecg.modules.subwayNetwork.service.ISubwaySectionService
;
import
org.jeecg.modules.subwayNetwork.vo.LightRailQueryVO
;
import
org.jeecg.modules.subwayNetwork.vo.SubwaySectionVO
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
/**
* @Description: 线路车站-地铁区间
* @Description: 线路车站-地铁区间
* @Author: jeecg-boot
* @Author: jeecg-boot
* @Date:
2023-06-15
* @Date: 2023-06-15
* @Version: V1.0
* @Version: V1.0
*/
*/
@Service
@Service
public
class
SubwaySectionServiceImpl
extends
ServiceImpl
<
SubwaySectionMapper
,
SubwaySection
>
implements
ISubwaySectionService
{
public
class
SubwaySectionServiceImpl
extends
ServiceImpl
<
SubwaySectionMapper
,
SubwaySection
>
implements
ISubwaySectionService
{
@Resource
private
LightRailMapper
lightRailMapper
;
@Resource
private
TrainStationMapper
trainStationMapper
;
@Override
@Override
public
void
edit
(
SubwaySectionEditDTO
dto
)
{
public
void
edit
(
SubwaySectionEditDTO
dto
)
{
SubwaySection
subwaySection
=
BeanUtil
.
copyProperties
(
dto
,
SubwaySection
.
class
);
if
(
ObjectUtil
.
isEmpty
(
dto
.
getId
()))
{
this
.
save
(
subwaySection
);
}
else
{
this
.
updateById
(
subwaySection
);
}
}
@Override
public
IPage
<
SubwaySectionVO
>
queryPageList
(
PageSearch
<
SubwaySectionQueryDTO
>
dto
)
{
// 分页查询
IPage
<
SubwaySectionVO
>
page
=
new
Page
<>(
dto
.
getPageNo
(),
dto
.
getPageSize
());
page
=
this
.
baseMapper
.
queryPageList
(
page
,
dto
.
getQuery
());
return
page
;
}
}
}
}
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/service/impl/TrainStationServiceImpl.java
View file @
767210b9
package
org
.
jeecg
.
modules
.
subwayNetwork
.
service
.
impl
;
package
org
.
jeecg
.
modules
.
subwayNetwork
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.jeecg.common.api.dto.PageSearch
;
import
org.jeecg.common.api.dto.PageSearch
;
import
org.jeecg.modules.subwayNetwork.dto.TrainStationEditDTO
;
import
org.jeecg.modules.subwayNetwork.dto.TrainStationQueryDTO
;
import
org.jeecg.modules.subwayNetwork.dto.TrainStationQueryDTO
;
import
org.jeecg.modules.subwayNetwork.mapper.TrainStationMapper
;
import
org.jeecg.modules.subwayNetwork.mapper.TrainStationMapper
;
import
org.jeecg.modules.subwayNetwork.service.ITrainStationService
;
import
org.jeecg.modules.subwayNetwork.service.ITrainStationService
;
...
@@ -12,6 +17,8 @@ import org.jeecg.modules.subwayNetwork.vo.TrainStationVO;
...
@@ -12,6 +17,8 @@ import org.jeecg.modules.subwayNetwork.vo.TrainStationVO;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
java.math.BigDecimal
;
/**
/**
* @Description: 线路车站-地铁站
* @Description: 线路车站-地铁站
* @Author: jeecg-boot
* @Author: jeecg-boot
...
@@ -24,6 +31,31 @@ public class TrainStationServiceImpl extends ServiceImpl<TrainStationMapper, Tra
...
@@ -24,6 +31,31 @@ public class TrainStationServiceImpl extends ServiceImpl<TrainStationMapper, Tra
@Override
@Override
public
IPage
<
TrainStationVO
>
queryPageList
(
PageSearch
<
TrainStationQueryDTO
>
dto
)
{
public
IPage
<
TrainStationVO
>
queryPageList
(
PageSearch
<
TrainStationQueryDTO
>
dto
)
{
IPage
<
LightRailQueryVO
>
page
=
new
Page
<>(
dto
.
getPageNo
(),
dto
.
getPageSize
());
IPage
<
LightRailQueryVO
>
page
=
new
Page
<>(
dto
.
getPageNo
(),
dto
.
getPageSize
());
return
this
.
baseMapper
.
queryPageList
(
page
,
dto
.
getQuery
());
return
this
.
baseMapper
.
queryPageList
(
page
,
dto
.
getQuery
());
}
@Override
public
void
edit
(
TrainStationEditDTO
dto
)
{
// 1.计算当前线路下面有多少个站台
Long
count
=
this
.
lambdaQuery
()
.
eq
(
TrainStation:
:
getLightRailId
,
dto
.
getLightRailId
())
.
count
();
// 2.计算站长度:终点里程-起始里程
BigDecimal
length
=
dto
.
getEndMileage
().
subtract
(
dto
.
getStartingMileage
());
// 3.通过id判断是保存还是修改
if
(
ObjectUtil
.
isEmpty
(
dto
.
getId
()))
{
TrainStation
trainStation
=
BeanUtil
.
copyProperties
(
dto
,
TrainStation
.
class
);
trainStation
.
setLength
(
length
);
trainStation
.
setSeq
(
count
.
intValue
()
+
1
);
this
.
save
(
trainStation
);
}
else
{
TrainStation
trainStation
=
BeanUtil
.
copyProperties
(
dto
,
TrainStation
.
class
);
trainStation
.
setLength
(
length
);
trainStation
.
setSeq
(
count
.
intValue
()
+
1
);
this
.
updateById
(
trainStation
);
}
}
}
}
}
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/vo/SubwaySectionVO.java
View file @
767210b9
package
org
.
jeecg
.
modules
.
subwayNetwork
.
vo
;
package
org
.
jeecg
.
modules
.
subwayNetwork
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
org.jeecgframework.poi.excel.annotation.Excel
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
@Data
@ApiModel
(
value
=
"区间VO"
)
@ApiModel
(
value
=
"区间VO"
)
public
class
SubwaySectionVO
{
public
class
SubwaySectionVO
{
@ApiModelProperty
(
value
=
"主键"
)
private
String
id
;
@ApiModelProperty
(
value
=
"创建人"
)
private
String
createBy
;
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"创建日期"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"更新人"
)
private
String
updateBy
;
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"更新日期"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"轻轨线路ID"
)
private
String
lightRailId
;
@ApiModelProperty
(
value
=
"轻轨线路名称"
)
private
String
lightRailName
;
@ApiModelProperty
(
value
=
"起始车站Id"
)
private
String
startTrainStationId
;
@ApiModelProperty
(
value
=
"结束车站Id"
)
private
String
endTrainStationId
;
@ApiModelProperty
(
value
=
"区间名"
)
private
String
sectionName
;
@ApiModelProperty
(
value
=
"区间里程"
)
private
BigDecimal
sectionMileage
;
@ApiModelProperty
(
value
=
"车站数量"
)
private
Integer
trainStationNum
;
}
}
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/vo/TrainStationVO.java
View file @
767210b9
package
org
.
jeecg
.
modules
.
subwayNetwork
.
vo
;
package
org
.
jeecg
.
modules
.
subwayNetwork
.
vo
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
org.jeecgframework.poi.excel.annotation.Excel
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -35,33 +32,36 @@ public class TrainStationVO {
...
@@ -35,33 +32,36 @@ public class TrainStationVO {
@ApiModelProperty
(
value
=
"更新日期"
)
@ApiModelProperty
(
value
=
"更新日期"
)
private
Date
updateTime
;
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"轻轨线路I
D
"
)
@ApiModelProperty
(
value
=
"轻轨线路I
d
"
)
private
String
lightRailId
;
private
String
lightRailId
;
@ApiModelProperty
(
value
=
"轻轨线路名称"
)
private
String
lightRailName
;
@ApiModelProperty
(
value
=
"车站名"
)
@ApiModelProperty
(
value
=
"车站名"
)
private
String
stationName
;
private
String
stationName
;
@ApiModelProperty
(
value
=
"车站编码"
)
@ApiModelProperty
(
value
=
"车站编码"
)
private
String
stationCode
;
private
String
stationCode
;
@ApiModelProperty
(
value
=
"线别"
)
@ApiModelProperty
(
value
=
"线别Code"
)
private
String
lineAlias
;
private
String
lineAliasCode
;
@ApiModelProperty
(
value
=
"起始里程前缀"
)
private
String
startingMileagePrefix
;
@ApiModelProperty
(
value
=
"起始里程"
)
@ApiModelProperty
(
value
=
"起始里程"
)
private
BigDecimal
startingMileage
;
private
BigDecimal
startingMileage
;
@ApiModelProperty
(
value
=
"中心里程前缀"
)
private
String
centerMileagePrefix
;
@ApiModelProperty
(
value
=
"中心里程"
)
@ApiModelProperty
(
value
=
"中心里程"
)
private
BigDecimal
centerMileage
;
private
BigDecimal
centerMileage
;
@ApiModelProperty
(
value
=
"结束里程前缀"
)
private
String
endMileagePrefix
;
@ApiModelProperty
(
value
=
"结束里程"
)
@ApiModelProperty
(
value
=
"结束里程"
)
private
BigDecimal
endMileage
;
private
BigDecimal
endMileage
;
@ApiModelProperty
(
value
=
"站台长度"
)
private
BigDecimal
length
;
@ApiModelProperty
(
value
=
"顺序"
)
private
Integer
seq
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
}
}
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml
View file @
767210b9
server
:
server
:
port
:
8080
port
:
16888
tomcat
:
tomcat
:
max-swallow-size
:
-1
max-swallow-size
:
-1
error
:
error
:
...
@@ -7,7 +7,7 @@ server:
...
@@ -7,7 +7,7 @@ server:
include-stacktrace
:
ALWAYS
include-stacktrace
:
ALWAYS
include-message
:
ALWAYS
include-message
:
ALWAYS
servlet
:
servlet
:
context-path
:
/
jeecg-boot
context-path
:
/
hzsomms/api
compression
:
compression
:
enabled
:
true
enabled
:
true
min-response-size
:
1024
min-response-size
:
1024
...
...
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-start/src/main/resources/application-test.yml
View file @
767210b9
...
@@ -131,7 +131,7 @@ spring:
...
@@ -131,7 +131,7 @@ spring:
connectionProperties
:
druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
connectionProperties
:
druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource
:
datasource
:
master
:
master
:
url
:
jdbc:mysql://
47.94.207.62
:3306/hzsomms2?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull
url
:
jdbc:mysql://
127.0.0.1
:3306/hzsomms2?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull
username
:
root
username
:
root
password
:
superAdmin&321
password
:
superAdmin&321
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.jdbc.Driver
...
@@ -144,7 +144,7 @@ spring:
...
@@ -144,7 +144,7 @@ spring:
#redis 配置
#redis 配置
redis
:
redis
:
database
:
0
database
:
0
host
:
47.94.207.62
host
:
127.0.0.1
lettuce
:
lettuce
:
pool
:
pool
:
max-active
:
8
#最大连接数据库连接数,设 0 为没有限制
max-active
:
8
#最大连接数据库连接数,设 0 为没有限制
...
@@ -257,7 +257,7 @@ knife4j:
...
@@ -257,7 +257,7 @@ knife4j:
#开启生产环境屏蔽
#开启生产环境屏蔽
production
:
false
production
:
false
basic
:
basic
:
enable
:
tru
e
enable
:
fals
e
username
:
jeecg
username
:
jeecg
password
:
jeecg1314
password
:
jeecg1314
#第三方登录
#第三方登录
...
...
This diff is collapsed.
Click to expand it.
pom.xml
View file @
767210b9
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<ojdbc6.version>
11.2.0.3
</ojdbc6.version>
<ojdbc6.version>
11.2.0.3
</ojdbc6.version>
<sqljdbc4.version>
4.0
</sqljdbc4.version>
<sqljdbc4.version>
4.0
</sqljdbc4.version>
<mysql-connector-java.version>
8.0.27
</mysql-connector-java.version>
<mysql-connector-java.version>
8.0.27
</mysql-connector-java.version>
<hutool.version>
5.
3.8
</hutool.version>
<hutool.version>
5.
8.20
</hutool.version>
<!-- 持久层 -->
<!-- 持久层 -->
<mybatis-plus.version>
3.5.1
</mybatis-plus.version>
<mybatis-plus.version>
3.5.1
</mybatis-plus.version>
...
...
This diff is collapsed.
Click to expand it.
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