Commit 1b7860ed authored by hkl's avatar hkl

feat:1.更新线路管理

parent e646b49b
......@@ -12,8 +12,8 @@ import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.checkData.equipmentCheckData.dto.RailWearRecordDTO;
import org.jeecg.modules.checkData.equipmentCheckData.entity.RailWearRecord;
import org.jeecg.modules.checkData.equipmentCheckData.service.IRailWearRecordService;
import org.jeecg.modules.checkData.equipmentCheckData.vo.RailWearRecordDetailVO;
import org.jeecg.modules.checkData.equipmentCheckData.vo.RailWearRecordVO;
import org.jeecg.modules.checkData.equipmentCheckData.vo.UseTurnoutRecordCheckDetailVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
......@@ -47,8 +47,8 @@ public class RailWearRecordController extends JeecgController<RailWearRecord, IR
@AutoLog(value = "检查数据-设备检查记录数据-钢轨伤损情况检查详情页面")
@ApiOperation(value = "检查数据-设备检查记录数据-钢轨伤损情况检查详情页面", notes = "检查数据-设备检查记录数据-钢轨伤损情况检查详情页面")
@GetMapping(value = "/getDetail")
public Result<UseTurnoutRecordCheckDetailVO> getDetail(@ApiParam("id") String id) {
UseTurnoutRecordCheckDetailVO data = this.service.getDetail(id);
public Result<RailWearRecordDetailVO> getDetail(@ApiParam("id") String id) {
RailWearRecordDetailVO data = this.service.getDetail(id);
return Result.OK(data);
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.checkData.equipmentCheckData.dto.RailWearRecordDTO;
import org.jeecg.modules.checkData.equipmentCheckData.entity.RailWearRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.checkData.equipmentCheckData.vo.RailWearRecordDetailVO;
import org.jeecg.modules.checkData.equipmentCheckData.vo.RailWearRecordVO;
import org.jeecg.modules.checkData.equipmentCheckData.vo.UseTurnoutRecordCheckDetailVO;
......@@ -19,5 +20,5 @@ public interface RailWearRecordMapper extends BaseMapper<RailWearRecord> {
Page<RailWearRecordVO> queryPageList(Page<RailWearRecordVO> pageData, RailWearRecordDTO dto);
UseTurnoutRecordCheckDetailVO getDetail(String id);
RailWearRecordDetailVO getDetail(String id);
}
......@@ -28,7 +28,7 @@
WHERE t1.del_flag = '0'
</select>
<select id="getDetail"
resultType="org.jeecg.modules.checkData.equipmentCheckData.vo.UseTurnoutRecordCheckDetailVO">
resultType="org.jeecg.modules.checkData.equipmentCheckData.vo.RailWearRecordDetailVO">
SELECT
t1.id,
t1.left_femoral_apparatus_code,
......
package org.jeecg.modules.checkData.equipmentCheckData.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.checkData.equipmentCheckData.dto.RailWearRecordDTO;
import org.jeecg.modules.checkData.equipmentCheckData.entity.RailWearRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.checkData.equipmentCheckData.vo.RailWearRecordDetailVO;
import org.jeecg.modules.checkData.equipmentCheckData.vo.RailWearRecordVO;
import org.jeecg.modules.checkData.equipmentCheckData.vo.UseTurnoutRecordCheckDetailVO;
/**
* <p>
......@@ -19,5 +19,5 @@ public interface IRailWearRecordService extends IService<RailWearRecord> {
Page<RailWearRecordVO> queryPageList(Page<RailWearRecordVO> pageData, RailWearRecordDTO dto);
UseTurnoutRecordCheckDetailVO getDetail(String id);
RailWearRecordDetailVO getDetail(String id);
}
......@@ -6,6 +6,7 @@ import org.jeecg.modules.checkData.equipmentCheckData.entity.RailWearRecord;
import org.jeecg.modules.checkData.equipmentCheckData.mapper.RailWearRecordMapper;
import org.jeecg.modules.checkData.equipmentCheckData.service.IRailWearRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.checkData.equipmentCheckData.vo.RailWearRecordDetailVO;
import org.jeecg.modules.checkData.equipmentCheckData.vo.RailWearRecordVO;
import org.jeecg.modules.checkData.equipmentCheckData.vo.UseTurnoutRecordCheckDetailVO;
import org.springframework.stereotype.Service;
......@@ -27,7 +28,7 @@ public class RailWearRecordServiceImpl extends ServiceImpl<RailWearRecordMapper,
}
@Override
public UseTurnoutRecordCheckDetailVO getDetail(String id) {
public RailWearRecordDetailVO getDetail(String id) {
return this.baseMapper.getDetail(id);
}
}
......@@ -7,7 +7,8 @@
"HY": "",
"QZ": "",
"YH": "",
"HZ": ""
"HZ": "",
"overLimitRecord": ""
},
"side": {
"checkName": "侧面消磨",
......@@ -16,6 +17,7 @@
"HY": "",
"QZ": "",
"YH": "",
"HZ": ""
"HZ": "",
"overLimitRecord": ""
}
}
\ No newline at end of file
[
{
"checkName": "滑床板",
"qualified": 1,
"notQualified": "",
"isQualified":"",
"notes": "",
"sort": 1
},
{
"checkName": "顶铁",
"qualified": 1,
"notQualified": "",
"isQualified":"",
"notes": "",
"sort": 2
}
]
\ No newline at end of file
[
{
"checkName": "接头螺栓",
"qualified": 1,
"notQualified": "",
"isQualified":"",
"notes": "",
"sort": 1
},
{
"checkName": "护轨螺栓",
"qualified": 1,
"notQualified": "",
"isQualified":"",
"notes": "",
"sort": 2
}
]
\ No newline at end of file
......@@ -72,6 +72,18 @@
"value8": "",
"value9": ""
},
"operator": {
"checkName": "操作者",
"value1": "",
"value2": "",
"value3": "",
"value4": "",
"value5": "",
"value6": "",
"value7": "",
"value8": "",
"value9": ""
},
"rightThigh": {
"checkName": "右股",
"value1": "",
......@@ -83,5 +95,17 @@
"value7": "",
"value8": "",
"value9": ""
},
"mileage": {
"checkName": "里程",
"value1": "",
"value2": "",
"value3": "",
"value4": "",
"value5": "",
"value6": "",
"value7": "",
"value8": "",
"value9": ""
}
}
\ No newline at end of file
......@@ -72,6 +72,18 @@
"value8": "",
"value9": ""
},
"operator": {
"checkName": "操作者",
"value1": "",
"value2": "",
"value3": "",
"value4": "",
"value5": "",
"value6": "",
"value7": "",
"value8": "",
"value9": ""
},
"leftThigh": {
"checkName": "左股",
"value1": "",
......@@ -83,5 +95,17 @@
"value7": "",
"value8": "",
"value9": ""
},
"mileage": {
"checkName": "里程",
"value1": "",
"value2": "",
"value3": "",
"value4": "",
"value5": "",
"value6": "",
"value7": "",
"value8": "",
"value9": ""
}
}
\ No newline at end of file
......@@ -22,12 +22,6 @@ public class RailWearRecordDetailVO {
@ApiModelProperty("主键")
private String id;
// @ApiModelProperty("线别Id")
// private String lineAliasId;
//
// @ApiModelProperty("线别名称")
// private String lineAliasName;
@ApiModelProperty("左股仪器编码")
private String leftFemoralApparatusCode;
......
......@@ -13,7 +13,6 @@ import org.jeecg.modules.subwayNetwork.dto.LineAliasQueryDTO;
import org.jeecg.modules.subwayNetwork.entity.LineAlias;
import org.jeecg.modules.subwayNetwork.service.ILineAliasService;
import org.jeecg.modules.subwayNetwork.vo.LightAliasQueryVO;
import org.jeecg.modules.subwayNetwork.vo.SectionStationMapVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
......@@ -97,17 +96,10 @@ public class LightAliasController extends JeecgController<LineAlias, ILineAliasS
map.put("label", alias.getLineAliasName());
map.put("code", alias.getLineAliasCode());
map.put("value", alias.getId());
map.put("type", alias.getType());
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());
}
}
......@@ -83,7 +83,7 @@ public class TrainStationController extends JeecgController<TrainStation, ITrain
Map<String, Object> map = new HashMap<>();
map.put("label", trainStation.getStationName());
map.put("value", trainStation.getId());
map.put("lineAliasCode", trainStation.getLineAliasCode());
map.put("lineAliasCode", trainStation.getLineAliasId());
map.put("lightRailId", trainStation.getLightRailId());
list.add(map);
}
......
......@@ -8,12 +8,7 @@ import lombok.Data;
@ApiModel(value = "线路DTO")
public class LineAliasQueryDTO {
@ApiModelProperty(value = "线别Code")
private String lineAliasCode;
@ApiModelProperty(value = "线别名称")
private String lineAliasName;
@ApiModelProperty(value = "备注")
private String remark;
}
......@@ -22,6 +22,9 @@ public class SubwaySectionEditDTO {
@ApiModelProperty(value = "区间名")
private String sectionName;
@ApiModelProperty("所属线别id")
private String lineAliasId;
@ApiModelProperty(value = "备注")
private String remark;
}
......@@ -7,7 +7,11 @@ import lombok.Data;
@Data
@ApiModel(value = "区间DTO")
public class SubwaySectionQueryDTO {
@ApiModelProperty(value = "区间名")
private String sectionName;
@ApiModelProperty(value = "线别id")
private String lineAliasId;
}
......@@ -18,4 +18,7 @@ public class TrainStationQueryDTO {
@ApiModelProperty(value = "车站名")
private String stationName;
@ApiModelProperty(value = "线别id")
private String lineAliasId;
}
......@@ -30,20 +30,17 @@ import lombok.experimental.Accessors;
public class LightRail implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
private String id;
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
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 java.util.Date createTime;
private Date createTime;
@ApiModelProperty(value = "更新人")
private String updateBy;
......
......@@ -44,6 +44,9 @@ public class LineAlias {
@ApiModelProperty(value = "线别名称")
private String lineAliasName;
@ApiModelProperty(value = "类型")
private Integer type;
@ApiModelProperty(value = "备注")
private String remark;
......
......@@ -11,6 +11,7 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
@Data
......@@ -57,5 +58,21 @@ public class SectionStationMap {
@ApiModelProperty(value = "车站名称")
private String stationName;
@ApiModelProperty("所属线别id")
private String stationLineAliasId;
@ApiModelProperty("所属线别名称")
private String stationLineAliasName;
@ApiModelProperty(value = "起始里程")
private BigDecimal stationStartingMileage;
@ApiModelProperty(value = "中心里程")
private BigDecimal stationCenterMileage;
@ApiModelProperty(value = "结束里程")
private BigDecimal stationEndMileage;
}
......@@ -49,19 +49,15 @@ public class SubwaySection implements Serializable {
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
@Excel(name = "区间名", width = 15)
@ApiModelProperty(value = "区间名")
private java.lang.String sectionName;
@Excel(name = "区间code", width = 15)
@ApiModelProperty(value = "区间code")
private java.lang.String sectionCode;
@Excel(name = "线路id", width = 15)
@ApiModelProperty(value = "轻轨线路ID")
private String lightRailId;
@Excel(name = "轻轨线路Name", width = 15)
@ApiModelProperty(value = "轻轨线路Name")
private String lightRailName;
......@@ -71,6 +67,15 @@ public class SubwaySection implements Serializable {
@ApiModelProperty(value = "结束车站Id")
private String endTrainStationId;
@ApiModelProperty("所属线别id")
private String lineAliasId;
@ApiModelProperty(value = "区间起始里程")
private BigDecimal sectionStartingMileage;
@ApiModelProperty(value = "区间结束里程")
private BigDecimal sectionEndMileage;
@ApiModelProperty(value = "备注")
private String remark;
}
......@@ -59,33 +59,21 @@ public class TrainStation implements Serializable {
@ApiModelProperty(value = "更新日期")
private Date updateTime;
@Excel(name = "轻轨线路ID", width = 15)
@ApiModelProperty(value = "轻轨线路ID")
private String lightRailId;
@Excel(name = "车站名", width = 15)
@ApiModelProperty(value = "车站名")
private String stationName;
@Excel(name = "车站编码", width = 15)
@ApiModelProperty(value = "车站编码")
private String stationCode;
@ApiModelProperty("所属线别id")
private String lineAliasId;
@Excel(name = "线别", width = 15)
@ApiModelProperty(value = "线别Code")
private String lineAliasCode;
@Excel(name = "起始里程", width = 15)
@ApiModelProperty(value = "起始里程")
private BigDecimal startingMileage;
@Excel(name = "中心里程", width = 15)
@ApiModelProperty(value = "中心里程")
private BigDecimal centerMileage;
@Excel(name = "结束里程", width = 15)
@ApiModelProperty(value = "结束里程")
private BigDecimal endMileage;
......
......@@ -13,5 +13,4 @@ import java.util.List;
public interface LineAliasMapper extends BaseMapper<LineAlias> {
IPage<LightAliasQueryVO> queryPageList(Page<LightAliasQueryVO> pageData, LineAliasQueryDTO dto);
List<SectionStationMapVO> getSectionStation();
}
......@@ -14,7 +14,8 @@
t1.update_time,
(SELECT count(1) FROM t_sn_subway_section WHERE light_rail_id = t1.id ) subwaySectionNum,
(SELECT count( DISTINCT station_name) FROM t_sn_train_station WHERE light_rail_id = t1.id ) trainStationNum,
(SELECT max(end_mileage) FROM t_sn_train_station WHERE light_rail_id = t1.id ) lineMileage
(SELECT max(end_mileage) FROM t_sn_train_station WHERE light_rail_id = t1.id AND line_alias_id = '1' ) upLineMileage,
(SELECT max(end_mileage) FROM t_sn_train_station WHERE light_rail_id = t1.id AND line_alias_id = '2' ) downLineMileage
FROM
t_sn_light_rail t1
<where>
......@@ -25,7 +26,6 @@
AND t1.status = #{query.status}
</if>
</where>
GROUP BY t1.id
</select>
<select id="getSectionStation" resultType="org.jeecg.modules.subwayNetwork.vo.SectionStationMapVO">
SELECT
......
......@@ -3,18 +3,14 @@
<mapper namespace="org.jeecg.modules.subwayNetwork.mapper.LineAliasMapper">
<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 t1.* from t_sn_line_alias t1
<where>
<if test="dto.lineAliasName != null and dto.lineAliasName != ''">
AND t1.line_alias_name like concat('%',#{dto.lineAliasName},'%')
</if>
</where>
ORDER BY create_time
</select>
</mapper>
\ No newline at end of file
......@@ -12,6 +12,10 @@
t1.light_rail_id,
t1.start_train_station_id,
t1.end_train_station_id,
t1.line_alias_id,
(SELECT line_alias_name FROM t_sn_line_alias WHERE id = t1.line_alias_id limit 1) line_alias_name,
t1.section_starting_mileage,
t1.section_end_mileage,
t1.remark
FROM
t_sn_subway_section t1 LEFT JOIN t_sn_light_rail t2 ON t1.light_rail_id = t2.id
......@@ -19,6 +23,9 @@
<if test="query.sectionName != null and query.sectionName != ''">
AND t1.section_name like concat('%',#{query.sectionName},'%')
</if>
<if test="query.lineAliasId !=null and query.lineAliasId!=''">
AND t1.line_alias_id = #{query.lineAliasId}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
......@@ -6,10 +6,10 @@
SELECT
t1.id,
t1.station_name,
t1.station_code,
t1.light_rail_id,
t2.rail_line_name light_rail_name,
t1.line_alias_code,
t1.line_alias_id,
(SELECT line_alias_name FROM t_sn_line_alias WHERE id = t1.line_alias_id limit 1) line_alias_name,
t1.starting_mileage,
t1.center_mileage,
t1.end_mileage,
......@@ -26,6 +26,9 @@
<if test="query.stationName !=null and query.stationName!=''">
AND t1.station_name like concat('%',#{query.stationName},'%')
</if>
<if test="query.lineAliasId !=null and query.lineAliasId!=''">
AND t1.line_alias_id = #{query.lineAliasId}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
......@@ -5,11 +5,7 @@ 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: 线路车站-线别管理
......@@ -19,5 +15,4 @@ public interface ILineAliasService extends IService<LineAlias> {
IPage<LightAliasQueryVO> queryPageList(Page<LightAliasQueryVO> pageData, LineAliasQueryDTO dto);
List<SectionStationMapVO> getSectionStation();
}
......@@ -8,11 +8,8 @@ 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
......@@ -27,8 +24,4 @@ public class LightAliasServiceImpl extends ServiceImpl<LineAliasMapper, LineAlia
return this.baseMapper.queryPageList(pageData, dto);
}
@Override
public List<SectionStationMapVO> getSectionStation() {
return this.baseMapper.getSectionStation();
}
}
......@@ -67,8 +67,8 @@ public class SubwaySectionServiceImpl extends ServiceImpl<SubwaySectionMapper, S
TrainStation startTrainStation = trainStationMapper.selectById(subwaySection.getStartTrainStationId());
TrainStation endTrainStation = trainStationMapper.selectById(subwaySection.getEndTrainStationId());
QueryWrapper<TrainStation> tsQueryWrapper = new QueryWrapper<>();
tsQueryWrapper.select("DISTINCT station_name station_name", "id");
tsQueryWrapper.lambda().ge(TrainStation::getSeq, startTrainStation.getSeq())
.eq(TrainStation::getLineAliasId, dto.getLineAliasId())
.le(TrainStation::getSeq, endTrainStation.getSeq())
.eq(TrainStation::getLightRailId, subwaySection.getLightRailId());
List<TrainStation> trainStations = trainStationMapper.selectList(tsQueryWrapper);
......@@ -80,10 +80,10 @@ public class SubwaySectionServiceImpl extends ServiceImpl<SubwaySectionMapper, S
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());
sectionStationMap.setSectionId(subwaySection.getId());// 区间id
sectionStationMap.setSectionName(subwaySection.getSectionName()); // 区间名称
sectionStationMap.setStationId(trainStation.getId()); // 车站id
sectionStationMap.setStationName(trainStation.getStationName()); // 车站名称
sectionStationMapMapper.insert(sectionStationMap);
}
......
......@@ -42,6 +42,9 @@ public class LightAliasQueryVO {
@ApiModelProperty(value = "线别名称")
private String lineAliasName;
@ApiModelProperty(value = "类型 1-基础线别 2-其他线别")
private Integer type;
@ApiModelProperty(value = "备注")
private String remark;
}
......@@ -33,10 +33,10 @@ public class LightRailQueryVO {
private Date updateTime;
@ApiModelProperty(value = "线路名称")
private java.lang.String railLineName;
private String railLineName;
@ApiModelProperty(value = "线路code")
private java.lang.String railLineCode;
private String railLineCode;
@ApiModelProperty(value = "状态")
private Integer status;
......@@ -47,6 +47,9 @@ public class LightRailQueryVO {
@ApiModelProperty(value = "车站数量")
private Integer trainStationNum;
@ApiModelProperty(value = "线路里程")
private BigDecimal lineMileage;
@ApiModelProperty(value = "上行线路里程")
private BigDecimal upLineMileage;
@ApiModelProperty(value = "下线路里程")
private BigDecimal downLineMileage;
}
......@@ -53,6 +53,18 @@ public class SubwaySectionVO {
@ApiModelProperty(value = "车站数量")
private Integer trainStationNum;
@ApiModelProperty("所属线别id")
private String lineAliasId;
@ApiModelProperty("所属线别名称")
private String lineAliasName;
@ApiModelProperty(value = "区间起始里程")
private BigDecimal sectionStartingMileage;
@ApiModelProperty(value = "区间结束里程")
private BigDecimal sectionEndMileage;
@ApiModelProperty(value = "备注")
private String remark;
......
......@@ -41,11 +41,11 @@ public class TrainStationVO {
@ApiModelProperty(value = "车站名")
private String stationName;
@ApiModelProperty(value = "车站编码")
private String stationCode;
@ApiModelProperty(value = "线别id")
private String lineAliasId;
@ApiModelProperty(value = "线别Code")
private String lineAliasCode;
@ApiModelProperty(value = "线别Name")
private String lineAliasName;
@ApiModelProperty(value = "起始里程")
private BigDecimal startingMileage;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment