河流站点基本信息管理接口

This commit is contained in:
mi9688 2024-10-22 17:41:24 +08:00
parent 2698e9ff29
commit 226370792b
7 changed files with 765 additions and 1 deletions

View File

@ -0,0 +1,122 @@
package com.fastbee.data.controller.gis;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.fastbee.common.annotation.Log;
import com.fastbee.common.core.controller.BaseController;
import com.fastbee.common.core.domain.AjaxResult;
import com.fastbee.common.enums.BusinessType;
import com.fastbee.ggroup.domain.GRiverInfo;
import com.fastbee.ggroup.service.IGRiverInfoService;
import com.fastbee.common.utils.poi.ExcelUtil;
import com.fastbee.common.core.page.TableDataInfo;
/**
* 河流基础信息Controller
*
* @author kerwincui
* @date 2024-10-22
*/
@RestController
@RequestMapping("/gis/river/info")
@Api(tags = "河流基础信息")
public class GRiverInfoController extends BaseController
{
@Autowired
private IGRiverInfoService gRiverInfoService;
/**
* 查询河流基础信息列表
*/
@PreAuthorize("@ss.hasPermi('ggroup:info:list')")
@GetMapping("/list")
@ApiOperation("查询河流基础信息列表")
public TableDataInfo list(GRiverInfo gRiverInfo)
{
startPage();
List<GRiverInfo> list = gRiverInfoService.selectGRiverInfoList(gRiverInfo);
return getDataTable(list);
}
/**
* 根据站点id获取河流基本信息
*/
@PreAuthorize("@ss.hasPermi('ggroup:info:list')")
@GetMapping("/byStationId/{stationId}")
@ApiOperation("根据站点id获取河流基本信息")
public AjaxResult listByStationId(@PathVariable("stationId") Long stationId){
GRiverInfo gRiverInfo = new GRiverInfo();
gRiverInfo.setSiteId(stationId);
List<GRiverInfo> list = gRiverInfoService.selectGRiverInfoList(gRiverInfo);
return success(!list.isEmpty()?list.get(0):null);
}
/**
* 导出河流基础信息列表
*/
@ApiOperation("导出河流基础信息列表")
@PreAuthorize("@ss.hasPermi('ggroup:info:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, GRiverInfo gRiverInfo)
{
List<GRiverInfo> list = gRiverInfoService.selectGRiverInfoList(gRiverInfo);
ExcelUtil<GRiverInfo> util = new ExcelUtil<GRiverInfo>(GRiverInfo.class);
util.exportExcel(response, list, "河流基础信息数据");
}
/**
* 河流基础信息详细信息
*/
@PreAuthorize("@ss.hasPermi('ggroup:info:query')")
@GetMapping(value = "/{id}")
@ApiOperation("获取河流基础信息详细信息")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(gRiverInfoService.selectGRiverInfoById(id));
}
/**
* 新增河流基础信息
*/
@PreAuthorize("@ss.hasPermi('ggroup:info:add')")
@PostMapping
@ApiOperation("新增河流基础信息")
public AjaxResult add(@RequestBody GRiverInfo gRiverInfo)
{
return toAjax(gRiverInfoService.insertGRiverInfo(gRiverInfo));
}
/**
* 修改河流基础信息
*/
@PreAuthorize("@ss.hasPermi('ggroup:info:edit')")
@PutMapping
@ApiOperation("修改河流基础信息")
public AjaxResult edit(@RequestBody GRiverInfo gRiverInfo)
{
return toAjax(gRiverInfoService.updateGRiverInfo(gRiverInfo));
}
/**
* 删除河流基础信息
*/
@PreAuthorize("@ss.hasPermi('ggroup:info:remove')")
@DeleteMapping("/{ids}")
@ApiOperation("删除河流基础信息")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(gRiverInfoService.deleteGRiverInfoByIds(ids));
}
}

View File

@ -0,0 +1,196 @@
package com.fastbee.ggroup.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fastbee.common.annotation.Excel;
import com.fastbee.common.core.domain.BaseEntity;
/**
* 河流基础信息对象 g_river_info
*
* @author kerwincui
* @date 2024-10-22
*/
@ApiModel(value = "GRiverInfo",description = "河流基础信息 g_river_info")
@Data
@EqualsAndHashCode(callSuper = true)
public class GRiverInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 河流名称 */
@Excel(name = "河流名称")
@ApiModelProperty("河流名称")
private String name;
/** 河流编码 */
@Excel(name = "河流编码")
@ApiModelProperty("河流编码")
private String code;
/** 河流长度(千米) */
@Excel(name = "河流长度", readConverterExp = "千=米")
@ApiModelProperty("河流长度")
private Long length;
/** 河流流域面积(平方千米) */
@Excel(name = "河流流域面积", readConverterExp = "平=方千米")
@ApiModelProperty("河流流域面积")
private Long area;
/** 流经镇/街道 */
@Excel(name = "流经镇/街道")
@ApiModelProperty("流经镇/街道")
private String towns;
/** 起点纬度 */
@Excel(name = "起点纬度")
@ApiModelProperty("起点纬度")
private Long startLatitude;
/** 起点经度 */
@Excel(name = "起点经度")
@ApiModelProperty("起点经度")
private Long startLongitude;
/** 起点地点 */
@Excel(name = "起点地点")
@ApiModelProperty("起点地点")
private String startLocation;
/** 终点纬度 */
@Excel(name = "终点纬度")
@ApiModelProperty("终点纬度")
private Long endLatitude;
/** 终点经度 */
@Excel(name = "终点经度")
@ApiModelProperty("终点经度")
private Long endLongitude;
/** 终点地点 */
@Excel(name = "终点地点")
@ApiModelProperty("终点地点")
private String endLocation;
/** 排污口数量 */
@Excel(name = "排污口数量")
@ApiModelProperty("排污口数量")
private Long pollutionDrainageNumber;
/** 涉水工程和设施数量 */
@Excel(name = "涉水工程和设施数量")
@ApiModelProperty("涉水工程和设施数量")
private Long waterRelatedProjectsAndFacilitiesNumber;
/** 跨河穿河临河建筑物数量 */
@Excel(name = "跨河穿河临河建筑物数量")
@ApiModelProperty("跨河穿河临河建筑物数量")
private Long spannedCrossedNearbyBuildingsNumber;
/** 设计标准[重现期] */
@Excel(name = "设计标准[重现期]")
@ApiModelProperty("设计标准[重现期]")
private Long designStandardRecurrencePeriod;
/** 河长姓名 */
@Excel(name = "河长姓名")
@ApiModelProperty("河长姓名")
private String riverSupervisorName;
/** 河长职务 */
@Excel(name = "河长职务")
@ApiModelProperty("河长职务")
private String riverSupervisorPosition;
/** 河长电话 */
@Excel(name = "河长电话")
@ApiModelProperty("河长电话")
private String riverSupervisorPhone;
/** 联系单位:区水利局 */
@Excel(name = "联系单位:区水利局")
@ApiModelProperty("联系单位:区水利局")
private String contactUnit;
/** 单位联系人姓名 */
@Excel(name = "单位联系人姓名")
@ApiModelProperty("单位联系人姓名")
private String unitContactPersonName;
/** 单位联系人电话 */
@Excel(name = "单位联系人电话")
@ApiModelProperty("单位联系人电话")
private String unitContactPersonPhone;
/** 联系人姓名 */
@Excel(name = "联系人姓名")
@ApiModelProperty("联系人姓名")
private String contactPersonName;
/** 联系人电话 */
@Excel(name = "联系人电话")
@ApiModelProperty("联系人电话")
private String contactPersonPhone;
/** 防汛物资 */
@Excel(name = "防汛物资")
@ApiModelProperty("防汛物资")
private String floodPreventionMaterials;
/** 行政责任人姓名 */
@Excel(name = "行政责任人姓名")
@ApiModelProperty("行政责任人姓名")
private String adminPersonName;
/** 行政责任人职位 */
@Excel(name = "行政责任人职位")
@ApiModelProperty("行政责任人职位")
private String adminPersonPosition;
/** 行政责任人电话 */
@Excel(name = "行政责任人电话")
@ApiModelProperty("行政责任人电话")
private String adminPersonPhone;
/** 技术责任人姓名 */
@Excel(name = "技术责任人姓名")
@ApiModelProperty("技术责任人姓名")
private String techPersonName;
/** 技术责任人职位 */
@Excel(name = "技术责任人职位")
@ApiModelProperty("技术责任人职位")
private String techPersonPosition;
/** 技术负责人电话 */
@Excel(name = "技术负责人电话")
@ApiModelProperty("技术负责人电话")
private String techPersonPhone;
/** 创建人 */
@Excel(name = "创建人")
@ApiModelProperty("创建人")
private String createdBy;
/** 更新人 */
@Excel(name = "更新人")
@ApiModelProperty("更新人")
private String updatedBy;
/** 删除标志0存在2删除 */
private Integer delFlag;
/** 关联的站点id */
@Excel(name = "关联的站点id")
@ApiModelProperty("关联的站点id")
private Long siteId;
}

View File

@ -0,0 +1,61 @@
package com.fastbee.ggroup.mapper;
import java.util.List;
import com.fastbee.ggroup.domain.GRiverInfo;
/**
* 河流基础信息Mapper接口
*
* @author kerwincui
* @date 2024-10-22
*/
public interface GRiverInfoMapper
{
/**
* 查询河流基础信息
*
* @param id 河流基础信息主键
* @return 河流基础信息
*/
public GRiverInfo selectGRiverInfoById(Long id);
/**
* 查询河流基础信息列表
*
* @param gRiverInfo 河流基础信息
* @return 河流基础信息集合
*/
public List<GRiverInfo> selectGRiverInfoList(GRiverInfo gRiverInfo);
/**
* 新增河流基础信息
*
* @param gRiverInfo 河流基础信息
* @return 结果
*/
public int insertGRiverInfo(GRiverInfo gRiverInfo);
/**
* 修改河流基础信息
*
* @param gRiverInfo 河流基础信息
* @return 结果
*/
public int updateGRiverInfo(GRiverInfo gRiverInfo);
/**
* 删除河流基础信息
*
* @param id 河流基础信息主键
* @return 结果
*/
public int deleteGRiverInfoById(Long id);
/**
* 批量删除河流基础信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteGRiverInfoByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.fastbee.ggroup.service;
import java.util.List;
import com.fastbee.ggroup.domain.GRiverInfo;
/**
* 河流基础信息Service接口
*
* @author kerwincui
* @date 2024-10-22
*/
public interface IGRiverInfoService
{
/**
* 查询河流基础信息
*
* @param id 河流基础信息主键
* @return 河流基础信息
*/
public GRiverInfo selectGRiverInfoById(Long id);
/**
* 查询河流基础信息列表
*
* @param gRiverInfo 河流基础信息
* @return 河流基础信息集合
*/
public List<GRiverInfo> selectGRiverInfoList(GRiverInfo gRiverInfo);
/**
* 新增河流基础信息
*
* @param gRiverInfo 河流基础信息
* @return 结果
*/
public int insertGRiverInfo(GRiverInfo gRiverInfo);
/**
* 修改河流基础信息
*
* @param gRiverInfo 河流基础信息
* @return 结果
*/
public int updateGRiverInfo(GRiverInfo gRiverInfo);
/**
* 批量删除河流基础信息
*
* @param ids 需要删除的河流基础信息主键集合
* @return 结果
*/
public int deleteGRiverInfoByIds(Long[] ids);
/**
* 删除河流基础信息信息
*
* @param id 河流基础信息主键
* @return 结果
*/
public int deleteGRiverInfoById(Long id);
}

View File

@ -0,0 +1,96 @@
package com.fastbee.ggroup.service.impl;
import java.util.List;
import com.fastbee.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fastbee.ggroup.mapper.GRiverInfoMapper;
import com.fastbee.ggroup.domain.GRiverInfo;
import com.fastbee.ggroup.service.IGRiverInfoService;
/**
* 河流基础信息Service业务层处理
*
* @author kerwincui
* @date 2024-10-22
*/
@Service
public class GRiverInfoServiceImpl implements IGRiverInfoService
{
@Autowired
private GRiverInfoMapper gRiverInfoMapper;
/**
* 查询河流基础信息
*
* @param id 河流基础信息主键
* @return 河流基础信息
*/
@Override
public GRiverInfo selectGRiverInfoById(Long id)
{
return gRiverInfoMapper.selectGRiverInfoById(id);
}
/**
* 查询河流基础信息列表
*
* @param gRiverInfo 河流基础信息
* @return 河流基础信息
*/
@Override
public List<GRiverInfo> selectGRiverInfoList(GRiverInfo gRiverInfo)
{
return gRiverInfoMapper.selectGRiverInfoList(gRiverInfo);
}
/**
* 新增河流基础信息
*
* @param gRiverInfo 河流基础信息
* @return 结果
*/
@Override
public int insertGRiverInfo(GRiverInfo gRiverInfo)
{
gRiverInfo.setCreateTime(DateUtils.getNowDate());
return gRiverInfoMapper.insertGRiverInfo(gRiverInfo);
}
/**
* 修改河流基础信息
*
* @param gRiverInfo 河流基础信息
* @return 结果
*/
@Override
public int updateGRiverInfo(GRiverInfo gRiverInfo)
{
gRiverInfo.setUpdateTime(DateUtils.getNowDate());
return gRiverInfoMapper.updateGRiverInfo(gRiverInfo);
}
/**
* 批量删除河流基础信息
*
* @param ids 需要删除的河流基础信息主键
* @return 结果
*/
@Override
public int deleteGRiverInfoByIds(Long[] ids)
{
return gRiverInfoMapper.deleteGRiverInfoByIds(ids);
}
/**
* 删除河流基础信息信息
*
* @param id 河流基础信息主键
* @return 结果
*/
@Override
public int deleteGRiverInfoById(Long id)
{
return gRiverInfoMapper.deleteGRiverInfoById(id);
}
}

View File

@ -0,0 +1,228 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fastbee.ggroup.mapper.GRiverInfoMapper">
<resultMap type="GRiverInfo" id="GRiverInfoResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="code" column="code" />
<result property="length" column="length" />
<result property="area" column="area" />
<result property="towns" column="towns" />
<result property="startLatitude" column="start_latitude" />
<result property="startLongitude" column="start_longitude" />
<result property="startLocation" column="start_location" />
<result property="endLatitude" column="end_latitude" />
<result property="endLongitude" column="end_longitude" />
<result property="endLocation" column="end_location" />
<result property="pollutionDrainageNumber" column="pollution_drainage_number" />
<result property="waterRelatedProjectsAndFacilitiesNumber" column="water_related_projects_and_facilities_number" />
<result property="spannedCrossedNearbyBuildingsNumber" column="spanned_crossed_nearby_buildings_number" />
<result property="designStandardRecurrencePeriod" column="design_standard_recurrence_period" />
<result property="riverSupervisorName" column="river_supervisor_name" />
<result property="riverSupervisorPosition" column="river_supervisor_position" />
<result property="riverSupervisorPhone" column="river_supervisor_phone" />
<result property="contactUnit" column="contact_unit" />
<result property="unitContactPersonName" column="unit_contact_person_name" />
<result property="unitContactPersonPhone" column="unit_contact_person_phone" />
<result property="contactPersonName" column="contact_person_name" />
<result property="contactPersonPhone" column="contact_person_phone" />
<result property="floodPreventionMaterials" column="flood_prevention_materials" />
<result property="adminPersonName" column="admin_person_name" />
<result property="adminPersonPosition" column="admin_person_position" />
<result property="adminPersonPhone" column="admin_person_phone" />
<result property="techPersonName" column="tech_person_name" />
<result property="techPersonPosition" column="tech_person_position" />
<result property="techPersonPhone" column="tech_person_phone" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="createdBy" column="created_by" />
<result property="updatedBy" column="updated_by" />
<result property="delFlag" column="del_flag" />
<result property="siteId" column="site_id" />
</resultMap>
<sql id="selectGRiverInfoVo">
select id, name, code, length, area, towns, start_latitude, start_longitude, start_location, end_latitude, end_longitude, end_location, pollution_drainage_number, water_related_projects_and_facilities_number, spanned_crossed_nearby_buildings_number, design_standard_recurrence_period, river_supervisor_name, river_supervisor_position, river_supervisor_phone, contact_unit, unit_contact_person_name, unit_contact_person_phone, contact_person_name, contact_person_phone, flood_prevention_materials, admin_person_name, admin_person_position, admin_person_phone, tech_person_name, tech_person_position, tech_person_phone, create_time, update_time, created_by, updated_by, del_flag, site_id from g_river_info
</sql>
<select id="selectGRiverInfoList" parameterType="GRiverInfo" resultMap="GRiverInfoResult">
<include refid="selectGRiverInfoVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="code != null and code != ''"> and code = #{code}</if>
<if test="length != null "> and length = #{length}</if>
<if test="area != null "> and area = #{area}</if>
<if test="towns != null and towns != ''"> and towns = #{towns}</if>
<if test="startLatitude != null "> and start_latitude = #{startLatitude}</if>
<if test="startLongitude != null "> and start_longitude = #{startLongitude}</if>
<if test="startLocation != null and startLocation != ''"> and start_location = #{startLocation}</if>
<if test="endLatitude != null "> and end_latitude = #{endLatitude}</if>
<if test="endLongitude != null "> and end_longitude = #{endLongitude}</if>
<if test="endLocation != null and endLocation != ''"> and end_location = #{endLocation}</if>
<if test="pollutionDrainageNumber != null "> and pollution_drainage_number = #{pollutionDrainageNumber}</if>
<if test="waterRelatedProjectsAndFacilitiesNumber != null "> and water_related_projects_and_facilities_number = #{waterRelatedProjectsAndFacilitiesNumber}</if>
<if test="spannedCrossedNearbyBuildingsNumber != null "> and spanned_crossed_nearby_buildings_number = #{spannedCrossedNearbyBuildingsNumber}</if>
<if test="designStandardRecurrencePeriod != null "> and design_standard_recurrence_period = #{designStandardRecurrencePeriod}</if>
<if test="riverSupervisorName != null and riverSupervisorName != ''"> and river_supervisor_name like concat('%', #{riverSupervisorName}, '%')</if>
<if test="riverSupervisorPosition != null and riverSupervisorPosition != ''"> and river_supervisor_position = #{riverSupervisorPosition}</if>
<if test="riverSupervisorPhone != null and riverSupervisorPhone != ''"> and river_supervisor_phone = #{riverSupervisorPhone}</if>
<if test="contactUnit != null and contactUnit != ''"> and contact_unit = #{contactUnit}</if>
<if test="unitContactPersonName != null and unitContactPersonName != ''"> and unit_contact_person_name like concat('%', #{unitContactPersonName}, '%')</if>
<if test="unitContactPersonPhone != null and unitContactPersonPhone != ''"> and unit_contact_person_phone = #{unitContactPersonPhone}</if>
<if test="contactPersonName != null and contactPersonName != ''"> and contact_person_name like concat('%', #{contactPersonName}, '%')</if>
<if test="contactPersonPhone != null and contactPersonPhone != ''"> and contact_person_phone = #{contactPersonPhone}</if>
<if test="floodPreventionMaterials != null and floodPreventionMaterials != ''"> and flood_prevention_materials = #{floodPreventionMaterials}</if>
<if test="adminPersonName != null and adminPersonName != ''"> and admin_person_name like concat('%', #{adminPersonName}, '%')</if>
<if test="adminPersonPosition != null and adminPersonPosition != ''"> and admin_person_position = #{adminPersonPosition}</if>
<if test="adminPersonPhone != null and adminPersonPhone != ''"> and admin_person_phone = #{adminPersonPhone}</if>
<if test="techPersonName != null and techPersonName != ''"> and tech_person_name like concat('%', #{techPersonName}, '%')</if>
<if test="techPersonPosition != null and techPersonPosition != ''"> and tech_person_position = #{techPersonPosition}</if>
<if test="techPersonPhone != null and techPersonPhone != ''"> and tech_person_phone = #{techPersonPhone}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
<if test="siteId != null "> and site_id = #{siteId}</if>
</where>
</select>
<select id="selectGRiverInfoById" parameterType="Long" resultMap="GRiverInfoResult">
<include refid="selectGRiverInfoVo"/>
where id = #{id}
</select>
<insert id="insertGRiverInfo" parameterType="GRiverInfo" useGeneratedKeys="true" keyProperty="id">
insert into g_river_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="code != null">code,</if>
<if test="length != null">length,</if>
<if test="area != null">area,</if>
<if test="towns != null">towns,</if>
<if test="startLatitude != null">start_latitude,</if>
<if test="startLongitude != null">start_longitude,</if>
<if test="startLocation != null">start_location,</if>
<if test="endLatitude != null">end_latitude,</if>
<if test="endLongitude != null">end_longitude,</if>
<if test="endLocation != null">end_location,</if>
<if test="pollutionDrainageNumber != null">pollution_drainage_number,</if>
<if test="waterRelatedProjectsAndFacilitiesNumber != null">water_related_projects_and_facilities_number,</if>
<if test="spannedCrossedNearbyBuildingsNumber != null">spanned_crossed_nearby_buildings_number,</if>
<if test="designStandardRecurrencePeriod != null">design_standard_recurrence_period,</if>
<if test="riverSupervisorName != null">river_supervisor_name,</if>
<if test="riverSupervisorPosition != null">river_supervisor_position,</if>
<if test="riverSupervisorPhone != null">river_supervisor_phone,</if>
<if test="contactUnit != null">contact_unit,</if>
<if test="unitContactPersonName != null">unit_contact_person_name,</if>
<if test="unitContactPersonPhone != null">unit_contact_person_phone,</if>
<if test="contactPersonName != null">contact_person_name,</if>
<if test="contactPersonPhone != null">contact_person_phone,</if>
<if test="floodPreventionMaterials != null">flood_prevention_materials,</if>
<if test="adminPersonName != null">admin_person_name,</if>
<if test="adminPersonPosition != null">admin_person_position,</if>
<if test="adminPersonPhone != null">admin_person_phone,</if>
<if test="techPersonName != null">tech_person_name,</if>
<if test="techPersonPosition != null">tech_person_position,</if>
<if test="techPersonPhone != null">tech_person_phone,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="createdBy != null">created_by,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="delFlag != null">del_flag,</if>
<if test="siteId != null">site_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="code != null">#{code},</if>
<if test="length != null">#{length},</if>
<if test="area != null">#{area},</if>
<if test="towns != null">#{towns},</if>
<if test="startLatitude != null">#{startLatitude},</if>
<if test="startLongitude != null">#{startLongitude},</if>
<if test="startLocation != null">#{startLocation},</if>
<if test="endLatitude != null">#{endLatitude},</if>
<if test="endLongitude != null">#{endLongitude},</if>
<if test="endLocation != null">#{endLocation},</if>
<if test="pollutionDrainageNumber != null">#{pollutionDrainageNumber},</if>
<if test="waterRelatedProjectsAndFacilitiesNumber != null">#{waterRelatedProjectsAndFacilitiesNumber},</if>
<if test="spannedCrossedNearbyBuildingsNumber != null">#{spannedCrossedNearbyBuildingsNumber},</if>
<if test="designStandardRecurrencePeriod != null">#{designStandardRecurrencePeriod},</if>
<if test="riverSupervisorName != null">#{riverSupervisorName},</if>
<if test="riverSupervisorPosition != null">#{riverSupervisorPosition},</if>
<if test="riverSupervisorPhone != null">#{riverSupervisorPhone},</if>
<if test="contactUnit != null">#{contactUnit},</if>
<if test="unitContactPersonName != null">#{unitContactPersonName},</if>
<if test="unitContactPersonPhone != null">#{unitContactPersonPhone},</if>
<if test="contactPersonName != null">#{contactPersonName},</if>
<if test="contactPersonPhone != null">#{contactPersonPhone},</if>
<if test="floodPreventionMaterials != null">#{floodPreventionMaterials},</if>
<if test="adminPersonName != null">#{adminPersonName},</if>
<if test="adminPersonPosition != null">#{adminPersonPosition},</if>
<if test="adminPersonPhone != null">#{adminPersonPhone},</if>
<if test="techPersonName != null">#{techPersonName},</if>
<if test="techPersonPosition != null">#{techPersonPosition},</if>
<if test="techPersonPhone != null">#{techPersonPhone},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="siteId != null">#{siteId},</if>
</trim>
</insert>
<update id="updateGRiverInfo" parameterType="GRiverInfo">
update g_river_info
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="code != null">code = #{code},</if>
<if test="length != null">length = #{length},</if>
<if test="area != null">area = #{area},</if>
<if test="towns != null">towns = #{towns},</if>
<if test="startLatitude != null">start_latitude = #{startLatitude},</if>
<if test="startLongitude != null">start_longitude = #{startLongitude},</if>
<if test="startLocation != null">start_location = #{startLocation},</if>
<if test="endLatitude != null">end_latitude = #{endLatitude},</if>
<if test="endLongitude != null">end_longitude = #{endLongitude},</if>
<if test="endLocation != null">end_location = #{endLocation},</if>
<if test="pollutionDrainageNumber != null">pollution_drainage_number = #{pollutionDrainageNumber},</if>
<if test="waterRelatedProjectsAndFacilitiesNumber != null">water_related_projects_and_facilities_number = #{waterRelatedProjectsAndFacilitiesNumber},</if>
<if test="spannedCrossedNearbyBuildingsNumber != null">spanned_crossed_nearby_buildings_number = #{spannedCrossedNearbyBuildingsNumber},</if>
<if test="designStandardRecurrencePeriod != null">design_standard_recurrence_period = #{designStandardRecurrencePeriod},</if>
<if test="riverSupervisorName != null">river_supervisor_name = #{riverSupervisorName},</if>
<if test="riverSupervisorPosition != null">river_supervisor_position = #{riverSupervisorPosition},</if>
<if test="riverSupervisorPhone != null">river_supervisor_phone = #{riverSupervisorPhone},</if>
<if test="contactUnit != null">contact_unit = #{contactUnit},</if>
<if test="unitContactPersonName != null">unit_contact_person_name = #{unitContactPersonName},</if>
<if test="unitContactPersonPhone != null">unit_contact_person_phone = #{unitContactPersonPhone},</if>
<if test="contactPersonName != null">contact_person_name = #{contactPersonName},</if>
<if test="contactPersonPhone != null">contact_person_phone = #{contactPersonPhone},</if>
<if test="floodPreventionMaterials != null">flood_prevention_materials = #{floodPreventionMaterials},</if>
<if test="adminPersonName != null">admin_person_name = #{adminPersonName},</if>
<if test="adminPersonPosition != null">admin_person_position = #{adminPersonPosition},</if>
<if test="adminPersonPhone != null">admin_person_phone = #{adminPersonPhone},</if>
<if test="techPersonName != null">tech_person_name = #{techPersonName},</if>
<if test="techPersonPosition != null">tech_person_position = #{techPersonPosition},</if>
<if test="techPersonPhone != null">tech_person_phone = #{techPersonPhone},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="siteId != null">site_id = #{siteId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteGRiverInfoById" parameterType="Long">
delete from g_river_info where id = #{id}
</delete>
<delete id="deleteGRiverInfoByIds" parameterType="String">
delete from g_river_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -176,7 +176,7 @@ public class ProjectServiceImpl implements IProjectService
//查询所有子一级项目列表 //查询所有子一级项目列表
projectList = new LambdaQueryChainWrapper<>(projectMapper) projectList = new LambdaQueryChainWrapper<>(projectMapper)
.select(Project::getProjectId, Project::getProjectName) .select(Project::getProjectId, Project::getProjectName)
.in(Project::getParentId, ProjectHolder.getProjectInfo().getProjectIdList()) .in(!ProjectHolder.getProjectInfo().getProjectIdList().isEmpty(),Project::getParentId, ProjectHolder.getProjectInfo().getProjectIdList())
.list(); .list();
} }
return projectList; return projectList;