Commit 615ffb2d authored by hkl's avatar hkl

feat:1.线路bug

parent ff1e352b
...@@ -60,6 +60,10 @@ public class RailManagement implements Serializable { ...@@ -60,6 +60,10 @@ public class RailManagement implements Serializable {
@TableField("unit_code") @TableField("unit_code")
private String unitCode; private String unitCode;
@ApiModelProperty("线路id")
@TableField("light_rail_id")
private String lightRailId;
@ApiModelProperty("区间id") @ApiModelProperty("区间id")
@TableField("section_id") @TableField("section_id")
private String sectionId; private String sectionId;
......
...@@ -5,28 +5,26 @@ ...@@ -5,28 +5,26 @@
<select id="queryPageList" resultType="org.jeecg.modules.deviceAsset.vo.RailManagementVO"> <select id="queryPageList" resultType="org.jeecg.modules.deviceAsset.vo.RailManagementVO">
SELECT SELECT
t1.*, t1.*,
t2.light_rail_name, t3.rail_line_name light_rail_name,
t2.light_rail_id,
t2.section_name, t2.section_name,
( SELECT line_alias_name FROM t_sn_line_alias WHERE id = t1.line_alias_id LIMIT 1 ) line_alias_name ( SELECT line_alias_name FROM t_sn_line_alias WHERE id = t1.line_alias_id LIMIT 1 ) line_alias_name
FROM FROM
t_da_rail_management t1 t_da_rail_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
LEFT JOIN t_sn_light_rail t3 ON t2.light_rail_id = t3.id LEFT JOIN t_sn_light_rail t3 ON t1.light_rail_id = t3.id
<where> where t3.status = 1
<if test="dto.railCode != null and dto.railCode != ''"> <if test="dto.railCode != null and dto.railCode != ''">
AND t1.rail_code like concat('%',#{dto.railCode},'%') AND t1.rail_code like concat('%',#{dto.railCode},'%')
</if> </if>
<if test="dto.sectionId != null and dto.sectionId != ''"> <if test="dto.sectionId != null and dto.sectionId != ''">
AND t1.section_id = #{dto.sectionId} AND t1.section_id = #{dto.sectionId}
</if> </if>
<if test="dto.lightRailId != null and dto.lightRailId != ''"> <if test="dto.lightRailId != null and dto.lightRailId != ''">
AND t2.light_rail_id = #{dto.lightRailId} AND t1.light_rail_id = #{dto.lightRailId}
</if> </if>
<if test="dto.lineAliasId != null and dto.lineAliasId != ''"> <if test="dto.lineAliasId != null and dto.lineAliasId != ''">
AND t1.line_alias_id = #{dto.lineAliasId} AND t1.line_alias_id = #{dto.lineAliasId}
</if> </if>
</where>
</select> </select>
<select id="getLineSpecialRail" resultType="java.util.Map"> <select id="getLineSpecialRail" resultType="java.util.Map">
SELECT SELECT
......
...@@ -57,6 +57,7 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper, ...@@ -57,6 +57,7 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper,
@Override @Override
public void edit(RailManagement railManagement) { public void edit(RailManagement railManagement) {
if (ObjectUtil.isEmpty(railManagement.getId())) { if (ObjectUtil.isEmpty(railManagement.getId())) {
railManagement.setId(UUIDGenerator.generate());
String utilCode = UnitCodeUtil.railUnitCodeUtil(railManagement.getLineAliasId()); String utilCode = UnitCodeUtil.railUnitCodeUtil(railManagement.getLineAliasId());
railManagement.setUnitCode(utilCode); railManagement.setUnitCode(utilCode);
...@@ -91,6 +92,7 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper, ...@@ -91,6 +92,7 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper,
railManagement.setRailCode(railCode); railManagement.setRailCode(railCode);
String unitCode = "SXXGG" + UnitCodeUtil.supplementZero(4, i + 1); String unitCode = "SXXGG" + UnitCodeUtil.supplementZero(4, i + 1);
railManagement.setUnitCode(unitCode); railManagement.setUnitCode(unitCode);
railManagement.setLightRailId(lightRailId);
railManagement.setRailOrderNum(i + 1); railManagement.setRailOrderNum(i + 1);
railManagement.setCreateBy("系统生成"); railManagement.setCreateBy("系统生成");
railManagement.setUpdateBy("系统生成"); railManagement.setUpdateBy("系统生成");
...@@ -110,6 +112,7 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper, ...@@ -110,6 +112,7 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper,
railManagement.setRailCode(railCode); railManagement.setRailCode(railCode);
String unitCode = "DXXGG" + UnitCodeUtil.supplementZero(4, i + 1); String unitCode = "DXXGG" + UnitCodeUtil.supplementZero(4, i + 1);
railManagement.setUnitCode(unitCode); railManagement.setUnitCode(unitCode);
railManagement.setLightRailId(lightRailId);
railManagement.setRailOrderNum(i + 1); railManagement.setRailOrderNum(i + 1);
railManagement.setCreateBy("系统生成"); railManagement.setCreateBy("系统生成");
railManagement.setUpdateBy("系统生成"); railManagement.setUpdateBy("系统生成");
......
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