1.grouping修改group。
2.groupingName修改groupName。
3.表ard_route_grouping修改ard_route_group。
4.upPath修改path。
5.
| | |
| | | */ |
| | | @Api(tags = "分组管理") |
| | | @RestController |
| | | @RequestMapping("/route/grouping") |
| | | @RequestMapping("/route/group") |
| | | public class ArdRouteGroupController extends BaseController { |
| | | |
| | | @Autowired |
| | |
| | | try { |
| | | Map<String, Integer> result = ardRouteGroupService.deleteArdRouteGroupByIds(ids); |
| | | if (!result.isEmpty()) { |
| | | return AjaxResult.success("删除成功:分组删除" + result.get("groupingCount") + ",航线删除" + result.get("informationCount")); |
| | | return AjaxResult.success("删除成功:分组删除" + result.get("groupCount") + ",航线删除" + result.get("infoCount")); |
| | | } else { |
| | | return AjaxResult.success("没有删除分组信息。"); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("修改航线分组ID") |
| | | @Log(title = "航线(kmz)", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/updateGroupId/{id}/{GroupId}") |
| | | @PutMapping("/updateGroupId/{id}/{groupId}") |
| | | public AjaxResult updateGroupId(@PathVariable("id") String id, |
| | | @PathVariable("GroupId") String GroupId) { |
| | | return toAjax(ardRouteInfoService.updateRouteInfomationGroupId(id,GroupId)); |
| | | @PathVariable("groupId") String groupId) { |
| | | return toAjax(ardRouteInfoService.updateRouteInfomationGroupId(id,groupId)); |
| | | } |
| | | |
| | | /** |
| | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 分组对象 ard_route_grouping |
| | | * 分组对象 ard_route_group |
| | | * |
| | | * @author xia |
| | | * @date 2025-10-18 |
| | |
| | | |
| | | /** 分组名称 */ |
| | | @Excel(name = "分组名称") |
| | | private String groupingName; |
| | | private String groupName; |
| | | |
| | | /** 序列号 */ |
| | | @Excel(name = "序列号") |
| | |
| | | /** |
| | | * 根据所属分组ID,删除信息 |
| | | * |
| | | * @param GroupIds 所属文件夹ID |
| | | * @param groupIds 所属文件夹ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteRouteInforByGroupIds(String[] GroupIds); |
| | | public int deleteRouteInforByGroupIds(String[] groupIds); |
| | | |
| | | /** |
| | | * 查询航线(kmz)列表 |
| | | * |
| | | * @param GroupId 所属分组ID |
| | | * @param groupId 所属分组ID |
| | | * @return 航线(kmz)集合 |
| | | */ |
| | | public List<ArdRouteInfo> selectArdRouteInfoByGroupId(String GroupId); |
| | | public List<ArdRouteInfo> selectArdRouteInfoByGroupId(String groupId); |
| | | |
| | | /** |
| | | * 修改航线分组ID |
| | | * |
| | | * @param id ID |
| | | * @param GroupId 分组ID |
| | | * @param groupId 分组ID |
| | | * @return 结果 |
| | | */ |
| | | public int updateRouteInforGroupId(@Param("id") String id, @Param("GroupId")String GroupId); |
| | | public int updateRouteInforGroupId(@Param("id") String id, @Param("groupId")String groupId); |
| | | |
| | | } |
| | |
| | | * 修改航线分组ID |
| | | * |
| | | * @param id ID |
| | | * @param GroupId 分组ID |
| | | * @param groupId 分组ID |
| | | * @return 结果 |
| | | */ |
| | | public int updateRouteInfomationGroupId(String id,String GroupId); |
| | | public int updateRouteInfomationGroupId(String id,String groupId); |
| | | |
| | | /** |
| | | * 判断行点是否在禁飞区 |
| | |
| | | @DataScope(deptAlias = "d", userAlias = "u") |
| | | public List<ArdRouteGroup> selectArdRouteGroupList(ArdRouteGroup ardRouteGroup) { |
| | | List<ArdRouteGroup> list = ardRouteGroupMapper.selectArdRouteGroupList(ardRouteGroup); |
| | | for (ArdRouteGroup routeGrouping : list) { |
| | | routeGrouping.setArdRouteInfoLS(ardRouteInfoMapper.selectArdRouteInfoByGroupId(routeGrouping.getId())); |
| | | for (ArdRouteGroup routeGroup : list) { |
| | | routeGroup.setArdRouteInfoLS(ardRouteInfoMapper.selectArdRouteInfoByGroupId(routeGroup.getId())); |
| | | } |
| | | return list; |
| | | } |
| | |
| | | try { |
| | | // 先删除航线信息 |
| | | int informationCount = ardRouteInfoMapper.deleteRouteInforByGroupIds(ids); |
| | | result.put("informationCount", informationCount); |
| | | result.put("infoCount", informationCount); |
| | | |
| | | // 再删除分组 |
| | | int groupingCount = ardRouteGroupMapper.deleteArdRouteGroupByIds(ids); |
| | | result.put("groupingCount", groupingCount); |
| | | int groupCount = ardRouteGroupMapper.deleteArdRouteGroupByIds(ids); |
| | | result.put("groupCount", groupCount); |
| | | |
| | | return result; |
| | | } catch (Exception e) { |
| | |
| | | * 修改航线分组ID |
| | | * |
| | | * @param id ID |
| | | * @param GroupId 分组ID |
| | | * @param groupId 分组ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateRouteInfomationGroupId(String id, String GroupId) { |
| | | return ardRouteInfoMapper.updateRouteInforGroupId(id, GroupId); |
| | | public int updateRouteInfomationGroupId(String id, String groupId) { |
| | | return ardRouteInfoMapper.updateRouteInforGroupId(id, groupId); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | <resultMap type="ArdRouteGroup" id="ArdRouteGroupResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="groupingName" column="grouping_name" /> |
| | | <result property="groupName" column="group_name" /> |
| | | <result property="serialNumber" column="serial_number" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | |
| | | |
| | | <sql id="selectArdRouteGroupVo"> |
| | | select id, |
| | | grouping_name, |
| | | group_name, |
| | | serial_number, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | | update_time |
| | | from ard_route_grouping |
| | | from ard_route_group |
| | | </sql> |
| | | |
| | | <select id="selectArdRouteGroupList" parameterType="ArdRouteGroup" resultMap="ArdRouteGroupResult"> |
| | | <include refid="selectArdRouteGroupVo"/> |
| | | <where> |
| | | <if test="groupingName != null and groupingName != ''"> and grouping_name like concat('%', #{groupingName}, '%')</if> |
| | | <if test="groupName != null and groupName != ''"> and group_name like concat('%', #{groupName}, '%')</if> |
| | | <if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if> |
| | | <if test="createTime != null "> and create_time = #{createTime}</if> |
| | | <if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if> |
| | |
| | | </select> |
| | | |
| | | <insert id="insertArdRouteGroup" parameterType="ArdRouteGroup"> |
| | | insert into ard_route_grouping |
| | | insert into ard_route_group |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="groupingName != null">grouping_name,</if> |
| | | <if test="groupName != null">group_name,</if> |
| | | <if test="serialNumber != null">serial_number,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="groupingName != null">#{groupingName},</if> |
| | | <if test="groupName != null">#{groupName},</if> |
| | | <if test="serialNumber != null">#{serialNumber},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | |
| | | </insert> |
| | | |
| | | <update id="updateArdRouteGroup" parameterType="ArdRouteGroup"> |
| | | update ard_route_grouping |
| | | update ard_route_group |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="groupingName != null">grouping_name = #{groupingName},</if> |
| | | <if test="groupName != null">group_name = #{groupName},</if> |
| | | <if test="serialNumber != null">serial_number = #{serialNumber},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | |
| | | </update> |
| | | |
| | | <delete id="deleteArdRouteGroupById" parameterType="String"> |
| | | delete from ard_route_grouping where id = #{id} |
| | | delete from ard_route_group where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteArdRouteGroupByIds" parameterType="String"> |
| | | delete from ard_route_grouping where id in |
| | | delete from ard_route_group where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | |
| | | <resultMap type="ArdRouteInfo" id="ArdRouteInfoResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="name" column="name" /> |
| | | <result property="upPath" column="up_path" /> |
| | | <result property="GroupId" column="grouping_id" /> |
| | | <result property="path" column="path" /> |
| | | <result property="groupId" column="group_id" /> |
| | | <result property="type" column="type" /> |
| | | <result property="aircraft" column="aircraft" /> |
| | | <result property="payload" column="payload" /> |
| | |
| | | <sql id="selectArdRouteInfoVo"> |
| | | select id, |
| | | name, |
| | | up_path, |
| | | grouping_id, |
| | | path, |
| | | group_id, |
| | | type, |
| | | aircraft, |
| | | payload, |
| | |
| | | <if test="aircraft != null and aircraft != ''"> and aircraft = #{aircraft}</if> |
| | | <if test="payload != null and payload != ''"> and payload = #{payload}</if> |
| | | <if test="type != null and type != ''"> and type = #{type}</if> |
| | | <if test="upPath != null and upPath != ''"> and up_path = #{upPath}</if> |
| | | <if test="path != null and path != ''"> and path = #{path}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="name != null">name,</if> |
| | | <if test="upPath != null">up_path,</if> |
| | | <if test="GroupId != null">grouping_id,</if> |
| | | <if test="path != null">path,</if> |
| | | <if test="GroupId != null">group_id,</if> |
| | | <if test="type != null">type,</if> |
| | | <if test="aircraft != null">aircraft,</if> |
| | | <if test="payload != null">payload,</if> |
| | |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="name != null">#{name},</if> |
| | | <if test="upPath != null">#{upPath},</if> |
| | | <if test="path != null">#{path},</if> |
| | | <if test="GroupId != null">#{GroupId},</if> |
| | | <if test="type != null">#{type},</if> |
| | | <if test="aircraft != null">#{aircraft},</if> |
| | |
| | | update ard_route_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="name != null">name = #{name},</if> |
| | | <if test="upPath != null">up_path = #{upPath},</if> |
| | | <if test="path != null">path = #{path},</if> |
| | | <if test="type != null">type = #{type},</if> |
| | | <if test="aircraft != null">aircraft = #{aircraft},</if> |
| | | <if test="payload != null">payload = #{payload},</if> |
| | |
| | | </select> |
| | | |
| | | <delete id="deleteRouteInforByGroupIds" parameterType="String"> |
| | | delete from ard_route_info where grouping_id in |
| | | <foreach item="groupingIId" collection="array" open="(" separator="," close=")"> |
| | | #{groupingIId} |
| | | delete from ard_route_info where group_id in |
| | | <foreach item="groupId" collection="array" open="(" separator="," close=")"> |
| | | #{groupId} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <select id="selectArdRouteInfoByGroupId" parameterType="String" resultMap="ArdRouteInfoResult"> |
| | | select id,name,up_path,grouping_id,type,aircraft,payload,read_only,create_by,create_time,update_by,update_time from ard_route_info |
| | | select id,name,path,group_id,type,aircraft,payload,read_only,create_by,create_time,update_by,update_time from ard_route_info |
| | | <where> |
| | | <if test="GroupId != null "> and grouping_id = #{GroupId}</if> |
| | | <if test="groupId != null "> and group_id = #{groupId}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <update id="updateRouteInforGroupId"> |
| | | update ard_route_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="GroupId != null">grouping_id = #{GroupId},</if> |
| | | <if test="groupId != null">group_id = #{groupId},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |