Commit 615ffb2d authored by hkl's avatar hkl

feat:1.线路bug

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