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
ab1f5566
Commit
ab1f5566
authored
Jul 05, 2023
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:1.代码提交
parent
9cdfe589
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
284 additions
and
56 deletions
+284
-56
SwitchManagementController.java
...es/deviceAsset/controller/SwitchManagementController.java
+0
-34
SwitchManagementQueryDTO.java
...ecg/modules/deviceAsset/dto/SwitchManagementQueryDTO.java
+0
-2
SwitchManagement.java
...rg/jeecg/modules/deviceAsset/entity/SwitchManagement.java
+1
-1
SwitchManagementMapper.xml
...modules/deviceAsset/mapper/xml/SwitchManagementMapper.xml
+5
-1
SwitchManagementQueryVO.java
...jeecg/modules/deviceAsset/vo/SwitchManagementQueryVO.java
+19
-1
LightAliasController.java
...odules/subwayNetwork/controller/LightAliasController.java
+13
-9
SubwaySectionController.java
...les/subwayNetwork/controller/SubwaySectionController.java
+19
-1
SectionStationMap.java
...jeecg/modules/subwayNetwork/entity/SectionStationMap.java
+61
-0
LineAliasMapper.java
...g/jeecg/modules/subwayNetwork/mapper/LineAliasMapper.java
+5
-0
SectionStationMapMapper.java
...modules/subwayNetwork/mapper/SectionStationMapMapper.java
+12
-0
LineAliasMapper.xml
...eecg/modules/subwayNetwork/mapper/xml/LineAliasMapper.xml
+12
-0
SectionStationMapMapper.xml
...ules/subwayNetwork/mapper/xml/SectionStationMapMapper.xml
+5
-0
ILineAliasService.java
...eecg/modules/subwayNetwork/service/ILineAliasService.java
+6
-0
LightAliasServiceImpl.java
...les/subwayNetwork/service/impl/LightAliasServiceImpl.java
+9
-1
SubwaySectionServiceImpl.java
.../subwayNetwork/service/impl/SubwaySectionServiceImpl.java
+42
-0
TrainStationServiceImpl.java
...s/subwayNetwork/service/impl/TrainStationServiceImpl.java
+2
-1
SectionStationMapVO.java
...g/jeecg/modules/subwayNetwork/vo/SectionStationMapVO.java
+29
-0
pom.xml
jeecg-module-system/jeecg-system-start/pom.xml
+4
-4
CodeGenerate.java
...rt/src/main/java/org/jeecg/codegenerate/CodeGenerate.java
+37
-0
application-dev.yml
...jeecg-system-start/src/main/resources/application-dev.yml
+3
-1
No files found.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/controller/SwitchManagementController.java
View file @
ab1f5566
...
...
@@ -87,38 +87,4 @@ public class SwitchManagementController extends JeecgController<SwitchManagement
return
Result
.
OK
(
"批量删除成功!"
);
}
// /**
// * 通过id查询
// *
// * @param id
// * @return
// */
// @AutoLog(value = "线路车站-轻轨线路-通过id查询")
// @ApiOperation(value = "线路车站-轻轨线路-通过id查询", notes = "线路车站-轻轨线路-通过id查询")
// @GetMapping(value = "/queryById")
// public Result<LightRail> queryById(@RequestParam(name = "id", required = true) String id) {
// LightRail lightRail = lightRailService.getById(id);
// if (lightRail == null) {
// return Result.error("未找到对应数据");
// }
// 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);
// }
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/dto/SwitchManagementQueryDTO.java
View file @
ab1f5566
...
...
@@ -11,6 +11,4 @@ public class SwitchManagementQueryDTO {
@ApiModelProperty
(
value
=
"线路name"
)
private
String
railLineName
;
@ApiModelProperty
(
value
=
"状态"
)
private
String
status
;
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/entity/SwitchManagement.java
View file @
ab1f5566
...
...
@@ -69,7 +69,7 @@ public class SwitchManagement implements Serializable {
private
BigDecimal
byroadEndMileage
;
@ApiModelProperty
(
value
=
"区间车站mapId"
)
private
String
byroadTrainStation
Id
;
private
String
sectionStationMap
Id
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
...
...
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/mapper/xml/SwitchManagementMapper.xml
View file @
ab1f5566
...
...
@@ -4,6 +4,10 @@
<select
id=
"queryPageList"
resultType=
"org.jeecg.modules.deviceAsset.vo.SwitchManagementQueryVO"
>
SELECT * FROM t_da_switch_management
SELECT
t1.*,
t2.*
FROM
t_da_switch_management t1 LEFT JOIN t_sn_section_station_map t2 ON t1.section_station_map_id = t2.id
</select>
</mapper>
\ No newline at end of file
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/vo/SwitchManagementQueryVO.java
View file @
ab1f5566
...
...
@@ -59,7 +59,25 @@ public class SwitchManagementQueryVO {
private
BigDecimal
byroadEndMileage
;
@ApiModelProperty
(
value
=
"区间车站mapId"
)
private
String
byroadTrainStationId
;
private
String
sectionStationMapId
;
@ApiModelProperty
(
value
=
"线路id"
)
private
String
lightRailId
;
@ApiModelProperty
(
value
=
"线路名称"
)
private
String
lightRailName
;
@ApiModelProperty
(
value
=
"区间id"
)
private
String
sectionId
;
@ApiModelProperty
(
value
=
"区间名称"
)
private
String
sectionName
;
@ApiModelProperty
(
value
=
"车站id"
)
private
String
stationId
;
@ApiModelProperty
(
value
=
"车站名称"
)
private
String
stationName
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
...
...
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/controller/LightAliasController.java
View file @
ab1f5566
...
...
@@ -6,20 +6,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.jeecg.common.api.dto.PageSearch
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.aspect.annotation.AutoLog
;
import
org.jeecg.common.system.base.controller.JeecgController
;
import
org.jeecg.modules.deviceAsset.dto.SwitchManagementQueryDTO
;
import
org.jeecg.modules.deviceAsset.vo.SwitchManagementQueryVO
;
import
org.jeecg.modules.subwayNetwork.dto.LightRailQueryDTO
;
import
org.jeecg.modules.subwayNetwork.dto.LineAliasQueryDTO
;
import
org.jeecg.modules.subwayNetwork.entity.LightRail
;
import
org.jeecg.modules.subwayNetwork.entity.LineAlias
;
import
org.jeecg.modules.subwayNetwork.service.ILightRailService
;
import
org.jeecg.modules.subwayNetwork.service.ILineAliasService
;
import
org.jeecg.modules.subwayNetwork.vo.LightAliasQueryVO
;
import
org.jeecg.modules.subwayNetwork.vo.
LightRailQuery
VO
;
import
org.jeecg.modules.subwayNetwork.vo.
SectionStationMap
VO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -100,10 +94,20 @@ public class LightAliasController extends JeecgController<LineAlias, ILineAliasS
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
for
(
LineAlias
alias
:
records
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"label"
,
alias
.
getLineAliasCode
());
map
.
put
(
"value"
,
alias
.
getLineAliasName
());
map
.
put
(
"label"
,
alias
.
getLineAliasName
());
map
.
put
(
"code"
,
alias
.
getLineAliasCode
());
map
.
put
(
"value"
,
alias
.
getId
());
list
.
add
(
map
);
}
return
Result
.
OK
(
list
);
}
@AutoLog
(
value
=
"线路车站-线别管理-获取区间车站映射"
)
@ApiOperation
(
value
=
"线路车站-线别管理-获取区间车站映射"
,
notes
=
"线路车站-线别管理-获取区间车站映射"
)
@GetMapping
(
value
=
"/getSectionStation"
)
public
Result
<
List
<
SectionStationMapVO
>>
getSectionStation
()
{
return
Result
.
OK
(
lineAliasService
.
getSectionStation
());
}
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/controller/SubwaySectionController.java
View file @
ab1f5566
package
org
.
jeecg
.
modules
.
subwayNetwork
.
controller
;
import
java.util.
Arrays
;
import
java.util.
*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -9,6 +9,7 @@ import org.jeecg.common.api.vo.Result;
import
org.jeecg.common.system.query.QueryGenerator
;
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.service.ISubwaySectionService
;
...
...
@@ -77,4 +78,21 @@ public class SubwaySectionController extends JeecgController<SubwaySection, ISub
return
Result
.
OK
(
"批量删除成功!"
);
}
@AutoLog
(
value
=
"线路车站-轻轨线路-获取全部线路"
)
@ApiOperation
(
value
=
"线路车站-轻轨线路-获取全部线路"
,
notes
=
"线路车站-轻轨线路-获取全部线路"
)
@GetMapping
(
value
=
"/listAll"
)
public
Result
<
List
<
Map
<
String
,
Object
>>>
listAll
()
{
List
<
SubwaySection
>
subwaySections
=
subwaySectionService
.
list
();
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
for
(
SubwaySection
subwaySection
:
subwaySections
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"label"
,
subwaySection
.
getSectionName
());
map
.
put
(
"value"
,
subwaySection
.
getId
());
map
.
put
(
"parentId"
,
subwaySection
.
getLightRailId
());
list
.
add
(
map
);
}
return
Result
.
OK
(
list
);
}
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/entity/SectionStationMap.java
0 → 100644
View file @
ab1f5566
package
org
.
jeecg
.
modules
.
subwayNetwork
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
@Data
@TableName
(
"t_sn_section_station_map"
)
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@ApiModel
(
value
=
"t_sn_section_station_map对象"
,
description
=
"线路车站-区间线路关联"
)
public
class
SectionStationMap
{
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@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
sectionId
;
@ApiModelProperty
(
value
=
"区间名称"
)
private
String
sectionName
;
@ApiModelProperty
(
value
=
"车站id"
)
private
String
stationId
;
@ApiModelProperty
(
value
=
"车站名称"
)
private
String
stationName
;
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/mapper/LineAliasMapper.java
View file @
ab1f5566
...
...
@@ -6,7 +6,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
org.jeecg.modules.subwayNetwork.dto.LineAliasQueryDTO
;
import
org.jeecg.modules.subwayNetwork.entity.LineAlias
;
import
org.jeecg.modules.subwayNetwork.vo.LightAliasQueryVO
;
import
org.jeecg.modules.subwayNetwork.vo.SectionStationMapVO
;
import
java.util.List
;
public
interface
LineAliasMapper
extends
BaseMapper
<
LineAlias
>
{
IPage
<
LightAliasQueryVO
>
queryPageList
(
Page
<
LightAliasQueryVO
>
pageData
,
LineAliasQueryDTO
dto
);
List
<
SectionStationMapVO
>
getSectionStation
();
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/mapper/SectionStationMapMapper.java
0 → 100644
View file @
ab1f5566
package
org
.
jeecg
.
modules
.
subwayNetwork
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.jeecg.modules.subwayNetwork.entity.SectionStationMap
;
/**
* @Description: 线路车站-区间线路关联
*/
public
interface
SectionStationMapMapper
extends
BaseMapper
<
SectionStationMap
>
{
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/mapper/xml/LineAliasMapper.xml
View file @
ab1f5566
...
...
@@ -5,4 +5,16 @@
<select
id=
"queryPageList"
resultType=
"org.jeecg.modules.subwayNetwork.vo.LightAliasQueryVO"
>
select * from t_sn_line_alias
</select>
<select
id=
"getSectionStation"
resultType=
"org.jeecg.modules.subwayNetwork.vo.SectionStationMapVO"
>
SELECT
id,
light_rail_id,
light_rail_name,
section_name ,
section_id ,
station_id,
station_name
FROM
t_sn_section_station_map
</select>
</mapper>
\ No newline at end of file
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/mapper/xml/SectionStationMapMapper.xml
0 → 100644
View file @
ab1f5566
<?xml version="1.0" encoding="UTF-8"?>
<!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.SectionStationMapMapper"
>
</mapper>
\ No newline at end of file
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/service/ILineAliasService.java
View file @
ab1f5566
...
...
@@ -5,7 +5,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.jeecg.modules.subwayNetwork.dto.LineAliasQueryDTO
;
import
org.jeecg.modules.subwayNetwork.entity.LineAlias
;
import
org.jeecg.modules.subwayNetwork.entity.SectionStationMap
;
import
org.jeecg.modules.subwayNetwork.vo.LightAliasQueryVO
;
import
org.jeecg.modules.subwayNetwork.vo.SectionStationMapVO
;
import
java.util.List
;
/**
* @Description: 线路车站-线别管理
...
...
@@ -14,4 +18,6 @@ import org.jeecg.modules.subwayNetwork.vo.LightAliasQueryVO;
public
interface
ILineAliasService
extends
IService
<
LineAlias
>
{
IPage
<
LightAliasQueryVO
>
queryPageList
(
Page
<
LightAliasQueryVO
>
pageData
,
LineAliasQueryDTO
dto
);
List
<
SectionStationMapVO
>
getSectionStation
();
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/service/impl/LightAliasServiceImpl.java
View file @
ab1f5566
...
...
@@ -8,8 +8,11 @@ import org.jeecg.modules.subwayNetwork.entity.LineAlias;
import
org.jeecg.modules.subwayNetwork.mapper.LineAliasMapper
;
import
org.jeecg.modules.subwayNetwork.service.ILineAliasService
;
import
org.jeecg.modules.subwayNetwork.vo.LightAliasQueryVO
;
import
org.jeecg.modules.subwayNetwork.vo.SectionStationMapVO
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @Description: 线路车站-轻轨线路
* @Author: jeecg-boot
...
...
@@ -21,6 +24,11 @@ public class LightAliasServiceImpl extends ServiceImpl<LineAliasMapper, LineAlia
@Override
public
IPage
<
LightAliasQueryVO
>
queryPageList
(
Page
<
LightAliasQueryVO
>
pageData
,
LineAliasQueryDTO
dto
)
{
return
this
.
baseMapper
.
queryPageList
(
pageData
,
dto
);
return
this
.
baseMapper
.
queryPageList
(
pageData
,
dto
);
}
@Override
public
List
<
SectionStationMapVO
>
getSectionStation
()
{
return
this
.
baseMapper
.
getSectionStation
();
}
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/service/impl/SubwaySectionServiceImpl.java
View file @
ab1f5566
...
...
@@ -2,6 +2,7 @@ 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.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -9,8 +10,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
org.jeecg.common.api.dto.PageSearch
;
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.SectionStationMap
;
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.SectionStationMapMapper
;
import
org.jeecg.modules.subwayNetwork.mapper.SubwaySectionMapper
;
import
org.jeecg.modules.subwayNetwork.mapper.TrainStationMapper
;
import
org.jeecg.modules.subwayNetwork.service.ISubwaySectionService
;
...
...
@@ -19,6 +24,8 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @Description: 线路车站-地铁区间
...
...
@@ -30,9 +37,14 @@ import java.math.BigDecimal;
public
class
SubwaySectionServiceImpl
extends
ServiceImpl
<
SubwaySectionMapper
,
SubwaySection
>
implements
ISubwaySectionService
{
@Resource
private
LightRailMapper
lightRailMapper
;
@Resource
private
TrainStationMapper
trainStationMapper
;
@Resource
private
SectionStationMapMapper
sectionStationMapMapper
;
@Override
public
void
edit
(
SubwaySectionEditDTO
dto
)
{
...
...
@@ -43,6 +55,36 @@ public class SubwaySectionServiceImpl extends ServiceImpl<SubwaySectionMapper, S
this
.
updateById
(
subwaySection
);
}
// 先删除
LambdaQueryWrapper
<
SectionStationMap
>
ssmQueryWrapper
=
new
LambdaQueryWrapper
<>();
ssmQueryWrapper
.
eq
(
SectionStationMap:
:
getSectionId
,
subwaySection
.
getId
());
sectionStationMapMapper
.
delete
(
ssmQueryWrapper
);
// 查询这个区间的车站
TrainStation
startTrainStation
=
trainStationMapper
.
selectById
(
subwaySection
.
getStartTrainStationId
());
TrainStation
endTrainStation
=
trainStationMapper
.
selectById
(
subwaySection
.
getEndTrainStationId
());
QueryWrapper
<
TrainStation
>
tsQueryWrapper
=
new
QueryWrapper
<>();
tsQueryWrapper
.
select
(
"DISTINCT line_alias_code line_alias_code"
,
"id"
,
"station_name"
);
tsQueryWrapper
.
lambda
().
ge
(
TrainStation:
:
getSeq
,
startTrainStation
.
getSeq
())
.
le
(
TrainStation:
:
getSeq
,
endTrainStation
.
getSeq
())
.
eq
(
TrainStation:
:
getLightRailId
,
subwaySection
.
getLightRailId
());
List
<
TrainStation
>
trainStations
=
trainStationMapper
.
selectList
(
tsQueryWrapper
);
LightRail
lightRail
=
lightRailMapper
.
selectById
(
subwaySection
.
getLightRailId
());
// 后新增
for
(
TrainStation
trainStation
:
trainStations
)
{
SectionStationMap
sectionStationMap
=
new
SectionStationMap
();
sectionStationMap
.
setLightRailId
(
lightRail
.
getId
());
// 车站id
sectionStationMap
.
setLightRailName
(
lightRail
.
getRailLineName
());
// 车站名称
sectionStationMap
.
setSectionId
(
subwaySection
.
getId
());
sectionStationMap
.
setSectionName
(
subwaySection
.
getSectionName
());
sectionStationMap
.
setStationId
(
trainStation
.
getId
());
sectionStationMap
.
setStationName
(
trainStation
.
getStationName
());
sectionStationMapMapper
.
insert
(
sectionStationMap
);
}
}
@Override
...
...
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/service/impl/TrainStationServiceImpl.java
View file @
ab1f5566
...
...
@@ -43,7 +43,6 @@ public class TrainStationServiceImpl extends ServiceImpl<TrainStationMapper, Tra
// 2.通过id判断是保存还是修改
if
(
ObjectUtil
.
isEmpty
(
dto
.
getId
()))
{
//
Integer
seq
=
1
;
TrainStation
exist
=
this
.
lambdaQuery
().
eq
(
TrainStation:
:
getLightRailId
,
dto
.
getLightRailId
())
.
eq
(
TrainStation:
:
getStationName
,
dto
.
getStationName
())
...
...
@@ -69,6 +68,8 @@ public class TrainStationServiceImpl extends ServiceImpl<TrainStationMapper, Tra
trainStation
.
setLength
(
length
);
this
.
updateById
(
trainStation
);
}
}
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/vo/SectionStationMapVO.java
0 → 100644
View file @
ab1f5566
package
org
.
jeecg
.
modules
.
subwayNetwork
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"线路区间车站映射VO"
)
public
class
SectionStationMapVO
{
private
String
id
;
@ApiModelProperty
(
value
=
"线路id"
)
private
String
lightRailId
;
@ApiModelProperty
(
value
=
"线路名称"
)
private
String
lightRailName
;
@ApiModelProperty
(
value
=
"区间id"
)
private
String
sectionId
;
@ApiModelProperty
(
value
=
"区间名称"
)
private
String
sectionName
;
@ApiModelProperty
(
value
=
"车站id"
)
private
String
stationId
;
@ApiModelProperty
(
value
=
"车站名称"
)
private
String
stationName
;
}
jeecg-module-system/jeecg-system-start/pom.xml
View file @
ab1f5566
...
...
@@ -18,11 +18,11 @@
<artifactId>
jeecg-system-biz
</artifactId>
<version>
${jeecgboot.version}
</version>
</dependency>
<!-- DEMO 示例模块 -->
<dependency>
<groupId>
org.jeecgframework.boot
</groupId>
<artifactId>
jeecg-module-demo
</artifactId>
<version>
${jeecgboot.version}
</version>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-generator
</artifactId>
<version>
3.5.1
</version>
</dependency>
</dependencies>
...
...
jeecg-module-system/jeecg-system-start/src/main/java/org/jeecg/codegenerate/CodeGenerate.java
0 → 100644
View file @
ab1f5566
package
org
.
jeecg
.
codegenerate
;
import
java.math.BigDecimal
;
public
class
CodeGenerate
{
public
static
void
main
(
String
[]
args
)
{
BigDecimal
divide
=
new
BigDecimal
(
128
).
divide
(
new
BigDecimal
(
2.58
),
6
,
BigDecimal
.
ROUND_HALF_UP
);
System
.
out
.
println
(
"divide.setScale(0,BigDecimal.ROUND_UP).intValue() = "
+
divide
.
setScale
(
0
,
BigDecimal
.
ROUND_UP
).
intValue
());
// 数据源
// DataSourceConfig.Builder dataSourceConfig = new DataSourceConfig.Builder("jdbc:mysql://47.94.207.62:3306/hzsomms?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull",
// "root",
// "superAdmin&321")
// .dbQuery(new MySqlQuery())
// .schema("mybatis-plus")
// .typeConvert(new MySqlTypeConvert())
// .keyWordsHandler(new MySqlKeyWordsHandler())
// .build();
//
//
// // 全局配置
// GlobalConfig globalConfig = new GlobalConfig.Builder()
// .fileOverride()
// .outputDir("/opt/baomidou")
// .author("baomidou")
// .enableKotlin()
// .enableSwagger()
// .dateType(DateType.TIME_PACK)1
// .commentDate("yyyy-MM-dd")
// .build();
//
// FastAutoGenerator.create(dataSourceConfig)
// .execute();
}
}
jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml
View file @
ab1f5566
...
...
@@ -167,9 +167,11 @@ mybatis-plus:
table-underline
:
true
configuration
:
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
#
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
log-impl
:
org.apache.ibatis.logging.stdout.StdOutImpl
# 返回类型为Map,显示null对应的字段
call-setters-on-nulls
:
true
# 驼峰
map-underscore-to-camel-case
:
true
#jeecg专用配置
minidao
:
base-package
:
org.jeecg.modules.jmreport.*
...
...
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