12 changed files with 367 additions and 14 deletions
@ -0,0 +1,110 @@ |
|||||
|
package com.kms.yg.res.controller; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.kms.common.utils.BaseEntityUtils; |
||||
|
import com.kms.system.service.SysDeptService; |
||||
|
import com.kms.system.service.SysXzqhService; |
||||
|
|
||||
|
import com.kms.yg.res.domain.BsSgcResQqhj; |
||||
|
import com.kms.yg.res.service.BsSgcResQqhjService; |
||||
|
import com.shuili.common.annotation.Log; |
||||
|
import com.shuili.common.core.controller.BaseController; |
||||
|
import com.shuili.common.core.domain.AjaxResult; |
||||
|
import com.shuili.common.core.domain.SearchParam; |
||||
|
import com.shuili.common.enums.BusinessType; |
||||
|
import com.shuili.common.utils.poi.ExcelUtil; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 水闸确权划界Controller |
||||
|
* |
||||
|
* @author kms |
||||
|
* @date 2024-01-16 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/res/qqhj") |
||||
|
@Api(tags = "水闸确权划界") |
||||
|
public class BsSgcResQqhjController extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private BsSgcResQqhjService bsSgcResQqhjService; |
||||
|
|
||||
|
@Autowired |
||||
|
private SysXzqhService sysXzqhService; |
||||
|
|
||||
|
@Autowired |
||||
|
private SysDeptService sysDeptService; |
||||
|
|
||||
|
/** |
||||
|
* 查询水闸确权划界列表 |
||||
|
*/ |
||||
|
@PostMapping("/list") |
||||
|
@ApiOperation("水闸确权划界列表") |
||||
|
public IPage list(@RequestBody SearchParam<BsSgcResQqhj> sp) |
||||
|
{ |
||||
|
return bsSgcResQqhjService.selectPage(sp); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出水闸确权划界列表 |
||||
|
*/ |
||||
|
@Log(title = "水闸确权划界导出", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
@ApiOperation("水闸确权划界导出") |
||||
|
public AjaxResult export(@RequestBody BsSgcResQqhj bsSgcResQqhj) |
||||
|
{ |
||||
|
List<BsSgcResQqhj> list = bsSgcResQqhjService.listByIds(bsSgcResQqhj.getIds()); |
||||
|
ExcelUtil<BsSgcResQqhj> util = new ExcelUtil<>(BsSgcResQqhj.class); |
||||
|
return util.exportExcel(list, "qqhj"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取水闸确权划界详细信息 |
||||
|
*/ |
||||
|
@ApiOperation(" 水闸确权划界详情") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
public AjaxResult getInfo(@PathVariable("id") String id) |
||||
|
{ |
||||
|
return AjaxResult.success(bsSgcResQqhjService.getById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增水闸确权划界 |
||||
|
*/ |
||||
|
@Log(title = "水闸确权划界新增", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
@ApiOperation("水闸确权划界新增") |
||||
|
public AjaxResult add(@RequestBody BsSgcResQqhj bsSgcResQqhj) |
||||
|
{ |
||||
|
BaseEntityUtils.preInsert(bsSgcResQqhj); |
||||
|
return toAjax(bsSgcResQqhjService.save(bsSgcResQqhj)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改水闸确权划界 |
||||
|
*/ |
||||
|
@ApiOperation("水闸确权划界修改") |
||||
|
@Log(title = "水闸确权划界修改", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody BsSgcResQqhj bsSgcResQqhj) |
||||
|
{ |
||||
|
return toAjax(bsSgcResQqhjService.updateById(bsSgcResQqhj)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除水闸确权划界 |
||||
|
*/ |
||||
|
@ApiOperation("水闸确权划界删除") |
||||
|
@Log(title = "水闸确权划界删除", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{ids}") |
||||
|
public AjaxResult remove(@PathVariable String[] ids) |
||||
|
{ |
||||
|
return toAjax(bsSgcResQqhjService.removeByIds(Arrays.asList(ids))); |
||||
|
} |
||||
|
} |
@ -0,0 +1,117 @@ |
|||||
|
package com.kms.yg.res.domain; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.shuili.common.annotation.Excel; |
||||
|
import com.shuili.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 水闸确权划界对象 bs_sgc_df_qqhj |
||||
|
* |
||||
|
* @author kms |
||||
|
* @date 2024-01-16 |
||||
|
*/ |
||||
|
@TableName("bs_sgc_df_qqhj_v2") |
||||
|
@Data |
||||
|
@ApiModel("水闸确权划界") |
||||
|
public class BsSgcResQqhj extends BaseEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
|
||||
|
|
||||
|
@TableField(exist = false) |
||||
|
private String engScal; |
||||
|
|
||||
|
/** 工程功能 */ |
||||
|
@Excel(name = "工程功能") |
||||
|
@ApiModelProperty("工程功能") |
||||
|
private String engineeringFunctions; |
||||
|
|
||||
|
/** 土地用途 */ |
||||
|
@Excel(name = "土地用途") |
||||
|
@ApiModelProperty("土地用途") |
||||
|
private String landUse; |
||||
|
|
||||
|
/** 限制条件 */ |
||||
|
@Excel(name = "限制条件") |
||||
|
@ApiModelProperty("限制条件") |
||||
|
private String limitations; |
||||
|
|
||||
|
/** 产权所有者 */ |
||||
|
@Excel(name = "产权所有者") |
||||
|
@ApiModelProperty("产权所有者") |
||||
|
private String propertyOwner; |
||||
|
|
||||
|
/** 所有者权力 |
||||
|
|
||||
|
及义务 */ |
||||
|
@Excel(name = "所有者权力及义务") |
||||
|
@ApiModelProperty("所有者权力及义务") |
||||
|
private String ownerRights; |
||||
|
|
||||
|
/** 有效期 */ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
@ApiModelProperty("有效期") |
||||
|
private Date periodValidity; |
||||
|
|
||||
|
/** 产权证书 */ |
||||
|
@Excel(name = "产权证书") |
||||
|
@ApiModelProperty("产权证书") |
||||
|
private String certificateTitle; |
||||
|
|
||||
|
/** 管理范围 */ |
||||
|
@Excel(name = "管理范围") |
||||
|
@ApiModelProperty("管理范围") |
||||
|
private String managementScope; |
||||
|
|
||||
|
/** 保护范围 */ |
||||
|
@Excel(name = "保护范围") |
||||
|
@ApiModelProperty("保护范围") |
||||
|
private String protectScope; |
||||
|
|
||||
|
/** $column.columnComment */ |
||||
|
@Excel(name = "保护范围") |
||||
|
@ApiModelProperty("保护范围") |
||||
|
private String createUid; |
||||
|
|
||||
|
/** $column.columnComment */ |
||||
|
@Excel(name = "保护范围") |
||||
|
@ApiModelProperty("保护范围") |
||||
|
private String updateUid; |
||||
|
|
||||
|
/** $column.columnComment */ |
||||
|
@Excel(name = "保护范围") |
||||
|
@ApiModelProperty("保护范围") |
||||
|
private String owerDept; |
||||
|
|
||||
|
/** $column.columnComment */ |
||||
|
@Excel(name = "保护范围") |
||||
|
@ApiModelProperty("保护范围") |
||||
|
private String relation; |
||||
|
|
||||
|
@TableField(exist = false) |
||||
|
private String resName; |
||||
|
@TableField(exist = false) |
||||
|
private String resType; |
||||
|
|
||||
|
private String resCode; |
||||
|
|
||||
|
@TableField(exist = false) |
||||
|
private String adcd; |
||||
|
|
||||
|
private String pointLatitudeLongitudeList; |
||||
|
private String lineLatitudeLongitudeList; |
||||
|
private String allLatitudeLongitudeList; |
||||
|
private String pointLatitudeLongitudeListV2; |
||||
|
private String lineLatitudeLongitudeListV2; |
||||
|
private String allLatitudeLongitudeListV2; |
||||
|
|
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
package com.kms.yg.res.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.kms.yg.df.domain.BsSgcDfQqhj; |
||||
|
import com.kms.yg.res.domain.BsSgcResQqhj; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 水闸确权划界Mapper接口 |
||||
|
* |
||||
|
* @author kms |
||||
|
* @date 2024-01-16 |
||||
|
*/ |
||||
|
@Repository |
||||
|
public interface BsSgcResQqhjMapper extends BaseMapper<BsSgcResQqhj> { |
||||
|
|
||||
|
List<BsSgcResQqhj> getList(@Param("id") String id, |
||||
|
@Param("resName") String resName, |
||||
|
@Param("resType") String resType, |
||||
|
@Param("resCode") String resCode, |
||||
|
@Param("adcd") String adcd, |
||||
|
@Param("orderBy") String orderBy, |
||||
|
@Param("pageNum") int pageNum, |
||||
|
@Param("pageSize") int pageSize); |
||||
|
|
||||
|
} |
@ -0,0 +1,50 @@ |
|||||
|
package com.kms.yg.res.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.kms.system.service.SysXzqhService; |
||||
|
import com.kms.yg.df.domain.BsSgcDfQqhj; |
||||
|
import com.kms.yg.df.mapper.BsSgcDfQqhjMapper; |
||||
|
import com.kms.yg.res.domain.BsSgcResQqhj; |
||||
|
import com.kms.yg.res.mapper.BsSgcResQqhjMapper; |
||||
|
import com.shuili.common.core.domain.SearchParam; |
||||
|
import com.shuili.common.core.service.BaseService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 水闸确权划界Service接口 |
||||
|
* |
||||
|
* @author kms |
||||
|
* @date 2024-01-16 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BsSgcResQqhjService extends BaseService<BsSgcResQqhjMapper, BsSgcResQqhj> { |
||||
|
|
||||
|
@Autowired |
||||
|
private BsSgcResQqhjMapper bsSgcResQqhjMapper; |
||||
|
|
||||
|
@Autowired |
||||
|
private SysXzqhService sysXzqhService; |
||||
|
|
||||
|
public IPage selectPage(SearchParam<BsSgcResQqhj> sp) { |
||||
|
|
||||
|
BsSgcResQqhj data = sp.getData(); |
||||
|
|
||||
|
Map<String, Object> params = sp.getParams(); |
||||
|
|
||||
|
|
||||
|
List<BsSgcResQqhj> list = bsSgcResQqhjMapper.getList(data.getId(),data.getResName(),data.getResType(),data.getResCode(), |
||||
|
sysXzqhService.getSubString(data.getAdcd()),(String) params.get("orderBy"), sp.getPageNum(), sp.getPageSize()); |
||||
|
|
||||
|
Page<BsSgcResQqhj> page = new Page<>(); |
||||
|
|
||||
|
page.setRecords(list); |
||||
|
page.setTotal(list.size()); |
||||
|
|
||||
|
return page; |
||||
|
} |
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
<?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.kms.yg.res.mapper.BsSgcResQqhjMapper"> |
||||
|
|
||||
|
<sql id="info"> |
||||
|
select sj.RES_NAME, |
||||
|
sj.RES_CODE, |
||||
|
sj.RES_TYPE, |
||||
|
sq.* |
||||
|
from bs_sgc_df_qqhj_v2 sq |
||||
|
left join att_res_base sj on sq.res_code = sj.RES_CODE |
||||
|
</sql> |
||||
|
|
||||
|
|
||||
|
<resultMap type="BsSgcResQqhj" id="BsSgcResQqhj"> |
||||
|
<id property="id" column="id" /> |
||||
|
<result property="resName" column="res_name"/> |
||||
|
<result property="resCode" column="res_code"/> |
||||
|
<result property="resType" column="res_type"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
<select id="getList" resultMap="BsSgcResQqhj"> |
||||
|
<bind name="pageNum" value="(pageNum-1)*pageSize"></bind> |
||||
|
<include refid="info"></include> |
||||
|
<where> |
||||
|
<if test="resName!=null and resName!=''"> |
||||
|
and RES_NAME like concat('%',#{resName},'%') |
||||
|
</if> |
||||
|
<if test="resCode!=null and resCode!=''"> |
||||
|
and sj.res_code=#{resCode} |
||||
|
</if> |
||||
|
<if test="resType!=null and resType!=''"> |
||||
|
and sj.RES_TYPE=#{resType} |
||||
|
</if> |
||||
|
<include refid="com.kms.system.mapper.SysXzqhMapper.xzqhCondition"></include> |
||||
|
</where> |
||||
|
order by ${orderBy} desc LIMIT #{pageNum},#{pageSize}; |
||||
|
</select> |
||||
|
</mapper> |
Loading…
Reference in new issue