Browse Source

路段搜索数据

develop
wangsixiang 11 months ago
parent
commit
5b5074ba38
  1. 6
      zc-business/src/main/java/com/zc/business/controller/DcRoadSectionController.java
  2. 2
      zc-business/src/main/java/com/zc/business/mapper/DcRoadSectionMapper.java
  3. 1
      zc-business/src/main/java/com/zc/business/service/IDcRoadSectionService.java
  4. 5
      zc-business/src/main/java/com/zc/business/service/impl/DcRoadSectionServiceImpl.java
  5. 6
      zc-business/src/main/resources/mapper/business/DcRoadSectionMapper.xml

6
zc-business/src/main/java/com/zc/business/controller/DcRoadSectionController.java

@ -50,6 +50,12 @@ public class DcRoadSectionController extends BaseController
List<DcRoadSection> list = dcRoadSectionService.selectDcRoadSectionList(dcRoadSection);
return getDataTable(list);
}
//查询全路段名称与id
@GetMapping("/listName")
public AjaxResult listRoadName()
{
return AjaxResult.success(dcRoadSectionService.selectName());
}
/**
* 查询辖区路段列表(不分页)
*/

2
zc-business/src/main/java/com/zc/business/mapper/DcRoadSectionMapper.java

@ -28,7 +28,7 @@ public interface DcRoadSectionMapper
* @return 辖区路段集合
*/
List<DcRoadSection> selectDcRoadSectionList(DcRoadSection dcRoadSection);
List<DcRoadSection> selectName();
/**
* 新增辖区路段
*

1
zc-business/src/main/java/com/zc/business/service/IDcRoadSectionService.java

@ -28,6 +28,7 @@ public interface IDcRoadSectionService
*/
List<DcRoadSection> selectDcRoadSectionList(DcRoadSection dcRoadSection);
List<DcRoadSection> selectDcRoadSectionListAll(DcRoadSection dcRoadSection);
List<DcRoadSection> selectName();
/**
* 新增辖区路段
*

5
zc-business/src/main/java/com/zc/business/service/impl/DcRoadSectionServiceImpl.java

@ -93,6 +93,11 @@ public class DcRoadSectionServiceImpl implements IDcRoadSectionService
return dcRoadSectionMapper.selectDcRoadSectionList(dcRoadSection);
}
@Override
public List<DcRoadSection> selectName() {
return dcRoadSectionMapper.selectName();
}
/**
* 新增辖区路段
*

6
zc-business/src/main/resources/mapper/business/DcRoadSectionMapper.xml

@ -32,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDcRoadSectionList" parameterType="DcRoadSection" resultMap="DcRoadSectionResult">
<include refid="selectDcRoadSectionVo"/>
<where>
<if test="id != null "> and section.id = #{id}</if>
<if test="deptId != null "> and section.dept_id = #{deptId}</if>
<if test="roadId != null "> and section.road_id = #{roadId}</if>
<if test="startStakeMark != null and startStakeMark != ''
@ -56,7 +57,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="roadCode != null and roadCode != ''"> and section.road_code = #{roadCode}</if>
</where>
</select>
<select id="selectName" resultType="com.zc.business.domain.DcRoadSection">
select id,section_name from dc_road_section
</select>
<select id="selectDcRoadSectionById" parameterType="Long" resultMap="DcRoadSectionResult">
<include refid="selectDcRoadSectionVo"/>
where section.id = #{id}
@ -77,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+CAST(SUBSTRING_INDEX(stake_mark, '+', -1) AS UNSIGNED) stakeMark from dc_stake_mark where stake_mark!='222'
</select>
<update id="updateStakeMarkRecord">
update dc_stake_mark set section_id=#{sectionId} where stake_mark=#{stakeMark}
</update>

Loading…
Cancel
Save