城镇亩均确权详细信息
This commit is contained in:
parent
42011de122
commit
6680df8ef0
@ -0,0 +1,110 @@
|
||||
package com.fastbee.data.controller.userRecharge;
|
||||
|
||||
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.rechargecard.domain.NgUrbanMuRights;
|
||||
import com.fastbee.rechargecard.service.INgUrbanMuRightsService;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 城镇亩均确权Controller
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/rechargecard/rights")
|
||||
@Api(tags = "城镇亩均确权")
|
||||
public class NgUrbanMuRightsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private INgUrbanMuRightsService ngUrbanMuRightsService;
|
||||
|
||||
/**
|
||||
* 查询城镇亩均确权列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:rights:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询城镇亩均确权列表")
|
||||
public TableDataInfo list(NgUrbanMuRights ngUrbanMuRights)
|
||||
{
|
||||
startPage();
|
||||
List<NgUrbanMuRights> list = ngUrbanMuRightsService.selectNgUrbanMuRightsList(ngUrbanMuRights);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出城镇亩均确权列表
|
||||
*/
|
||||
@ApiOperation("导出城镇亩均确权列表")
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:rights:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, NgUrbanMuRights ngUrbanMuRights)
|
||||
{
|
||||
List<NgUrbanMuRights> list = ngUrbanMuRightsService.selectNgUrbanMuRightsList(ngUrbanMuRights);
|
||||
ExcelUtil<NgUrbanMuRights> util = new ExcelUtil<NgUrbanMuRights>(NgUrbanMuRights.class);
|
||||
util.exportExcel(response, list, "城镇亩均确权数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取城镇亩均确权详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:rights:query')")
|
||||
@GetMapping(value = "/{muRightsId}")
|
||||
@ApiOperation("获取城镇亩均确权详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("muRightsId") Long muRightsId)
|
||||
{
|
||||
return success(ngUrbanMuRightsService.selectNgUrbanMuRightsByMuRightsId(muRightsId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增城镇亩均确权
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:rights:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增城镇亩均确权")
|
||||
public AjaxResult add(@RequestBody NgUrbanMuRights ngUrbanMuRights)
|
||||
{
|
||||
return toAjax(ngUrbanMuRightsService.insertNgUrbanMuRights(ngUrbanMuRights));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改城镇亩均确权
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:rights:edit')")
|
||||
@PutMapping
|
||||
@ApiOperation("修改城镇亩均确权")
|
||||
public AjaxResult edit(@RequestBody NgUrbanMuRights ngUrbanMuRights)
|
||||
{
|
||||
return toAjax(ngUrbanMuRightsService.updateNgUrbanMuRights(ngUrbanMuRights));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除城镇亩均确权
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:rights:remove')")
|
||||
@DeleteMapping("/{muRightsIds}")
|
||||
@ApiOperation("删除城镇亩均确权")
|
||||
public AjaxResult remove(@PathVariable Long[] muRightsIds)
|
||||
{
|
||||
return toAjax(ngUrbanMuRightsService.deleteNgUrbanMuRightsByMuRightsIds(muRightsIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.fastbee.rechargecard.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 城镇亩均确权对象 ng_urban_mu_rights
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-19
|
||||
*/
|
||||
@ApiModel(value = "NgUrbanMuRights",description = "城镇亩均确权 ng_urban_mu_rights")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class NgUrbanMuRights extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long muRightsId;
|
||||
|
||||
/** 年度 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "年度", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty("年度")
|
||||
private Date year;
|
||||
|
||||
/** 用水量 */
|
||||
@Excel(name = "用水量")
|
||||
@ApiModelProperty("用水量")
|
||||
private BigDecimal water;
|
||||
|
||||
/** 行政区域(县) */
|
||||
@Excel(name = "行政区域(县)")
|
||||
@ApiModelProperty("行政区域(县)")
|
||||
private String administrative;
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.fastbee.rechargecard.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.rechargecard.domain.NgUrbanMuRights;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 城镇亩均确权Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-19
|
||||
*/
|
||||
@Mapper
|
||||
public interface NgUrbanMuRightsMapper
|
||||
{
|
||||
/**
|
||||
* 查询城镇亩均确权
|
||||
*
|
||||
* @param muRightsId 城镇亩均确权主键
|
||||
* @return 城镇亩均确权
|
||||
*/
|
||||
public NgUrbanMuRights selectNgUrbanMuRightsByMuRightsId(Long muRightsId);
|
||||
|
||||
/**
|
||||
* 查询城镇亩均确权列表
|
||||
*
|
||||
* @param ngUrbanMuRights 城镇亩均确权
|
||||
* @return 城镇亩均确权集合
|
||||
*/
|
||||
public List<NgUrbanMuRights> selectNgUrbanMuRightsList(NgUrbanMuRights ngUrbanMuRights);
|
||||
|
||||
/**
|
||||
* 新增城镇亩均确权
|
||||
*
|
||||
* @param ngUrbanMuRights 城镇亩均确权
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNgUrbanMuRights(NgUrbanMuRights ngUrbanMuRights);
|
||||
|
||||
/**
|
||||
* 修改城镇亩均确权
|
||||
*
|
||||
* @param ngUrbanMuRights 城镇亩均确权
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNgUrbanMuRights(NgUrbanMuRights ngUrbanMuRights);
|
||||
|
||||
/**
|
||||
* 删除城镇亩均确权
|
||||
*
|
||||
* @param muRightsId 城镇亩均确权主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNgUrbanMuRightsByMuRightsId(Long muRightsId);
|
||||
|
||||
/**
|
||||
* 批量删除城镇亩均确权
|
||||
*
|
||||
* @param muRightsIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNgUrbanMuRightsByMuRightsIds(Long[] muRightsIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.fastbee.rechargecard.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.rechargecard.domain.NgUrbanMuRights;
|
||||
|
||||
/**
|
||||
* 城镇亩均确权Service接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-19
|
||||
*/
|
||||
public interface INgUrbanMuRightsService
|
||||
{
|
||||
/**
|
||||
* 查询城镇亩均确权
|
||||
*
|
||||
* @param muRightsId 城镇亩均确权主键
|
||||
* @return 城镇亩均确权
|
||||
*/
|
||||
public NgUrbanMuRights selectNgUrbanMuRightsByMuRightsId(Long muRightsId);
|
||||
|
||||
/**
|
||||
* 查询城镇亩均确权列表
|
||||
*
|
||||
* @param ngUrbanMuRights 城镇亩均确权
|
||||
* @return 城镇亩均确权集合
|
||||
*/
|
||||
public List<NgUrbanMuRights> selectNgUrbanMuRightsList(NgUrbanMuRights ngUrbanMuRights);
|
||||
|
||||
/**
|
||||
* 新增城镇亩均确权
|
||||
*
|
||||
* @param ngUrbanMuRights 城镇亩均确权
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNgUrbanMuRights(NgUrbanMuRights ngUrbanMuRights);
|
||||
|
||||
/**
|
||||
* 修改城镇亩均确权
|
||||
*
|
||||
* @param ngUrbanMuRights 城镇亩均确权
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNgUrbanMuRights(NgUrbanMuRights ngUrbanMuRights);
|
||||
|
||||
/**
|
||||
* 批量删除城镇亩均确权
|
||||
*
|
||||
* @param muRightsIds 需要删除的城镇亩均确权主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNgUrbanMuRightsByMuRightsIds(Long[] muRightsIds);
|
||||
|
||||
/**
|
||||
* 删除城镇亩均确权信息
|
||||
*
|
||||
* @param muRightsId 城镇亩均确权主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNgUrbanMuRightsByMuRightsId(Long muRightsId);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.fastbee.rechargecard.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.rechargecard.mapper.NgUrbanMuRightsMapper;
|
||||
import com.fastbee.rechargecard.domain.NgUrbanMuRights;
|
||||
import com.fastbee.rechargecard.service.INgUrbanMuRightsService;
|
||||
|
||||
/**
|
||||
* 城镇亩均确权Service业务层处理
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-19
|
||||
*/
|
||||
@Service
|
||||
public class NgUrbanMuRightsServiceImpl implements INgUrbanMuRightsService
|
||||
{
|
||||
@Autowired
|
||||
private NgUrbanMuRightsMapper ngUrbanMuRightsMapper;
|
||||
|
||||
/**
|
||||
* 查询城镇亩均确权
|
||||
*
|
||||
* @param muRightsId 城镇亩均确权主键
|
||||
* @return 城镇亩均确权
|
||||
*/
|
||||
@Override
|
||||
public NgUrbanMuRights selectNgUrbanMuRightsByMuRightsId(Long muRightsId)
|
||||
{
|
||||
return ngUrbanMuRightsMapper.selectNgUrbanMuRightsByMuRightsId(muRightsId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询城镇亩均确权列表
|
||||
*
|
||||
* @param ngUrbanMuRights 城镇亩均确权
|
||||
* @return 城镇亩均确权
|
||||
*/
|
||||
@Override
|
||||
public List<NgUrbanMuRights> selectNgUrbanMuRightsList(NgUrbanMuRights ngUrbanMuRights)
|
||||
{
|
||||
return ngUrbanMuRightsMapper.selectNgUrbanMuRightsList(ngUrbanMuRights);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增城镇亩均确权
|
||||
*
|
||||
* @param ngUrbanMuRights 城镇亩均确权
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertNgUrbanMuRights(NgUrbanMuRights ngUrbanMuRights)
|
||||
{
|
||||
ngUrbanMuRights.setCreateTime(DateUtils.getNowDate());
|
||||
return ngUrbanMuRightsMapper.insertNgUrbanMuRights(ngUrbanMuRights);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改城镇亩均确权
|
||||
*
|
||||
* @param ngUrbanMuRights 城镇亩均确权
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateNgUrbanMuRights(NgUrbanMuRights ngUrbanMuRights)
|
||||
{
|
||||
ngUrbanMuRights.setUpdateTime(DateUtils.getNowDate());
|
||||
return ngUrbanMuRightsMapper.updateNgUrbanMuRights(ngUrbanMuRights);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除城镇亩均确权
|
||||
*
|
||||
* @param muRightsIds 需要删除的城镇亩均确权主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteNgUrbanMuRightsByMuRightsIds(Long[] muRightsIds)
|
||||
{
|
||||
return ngUrbanMuRightsMapper.deleteNgUrbanMuRightsByMuRightsIds(muRightsIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除城镇亩均确权信息
|
||||
*
|
||||
* @param muRightsId 城镇亩均确权主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteNgUrbanMuRightsByMuRightsId(Long muRightsId)
|
||||
{
|
||||
return ngUrbanMuRightsMapper.deleteNgUrbanMuRightsByMuRightsId(muRightsId);
|
||||
}
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
<?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.rechargecard.mapper.NgUrbanMuRightsMapper">
|
||||
|
||||
<resultMap type="NgUrbanMuRights" id="NgUrbanMuRightsResult">
|
||||
<result property="muRightsId" column="mu_rights_id" />
|
||||
<result property="year" column="year" />
|
||||
<result property="water" column="water" />
|
||||
<result property="administrative" column="administrative" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNgUrbanMuRightsVo">
|
||||
select mu_rights_id, year, water, administrative, remark, create_time, update_time, create_by, update_by from ng_urban_mu_rights
|
||||
</sql>
|
||||
|
||||
<select id="selectNgUrbanMuRightsList" parameterType="NgUrbanMuRights" resultMap="NgUrbanMuRightsResult">
|
||||
<include refid="selectNgUrbanMuRightsVo"/>
|
||||
<where>
|
||||
<if test="year != null "> and year = #{year}</if>
|
||||
<if test="water != null "> and water = #{water}</if>
|
||||
<if test="administrative != null and administrative != ''"> and administrative = #{administrative}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectNgUrbanMuRightsByMuRightsId" parameterType="Long" resultMap="NgUrbanMuRightsResult">
|
||||
<include refid="selectNgUrbanMuRightsVo"/>
|
||||
where mu_rights_id = #{muRightsId}
|
||||
</select>
|
||||
|
||||
<insert id="insertNgUrbanMuRights" parameterType="NgUrbanMuRights" useGeneratedKeys="true" keyProperty="muRightsId">
|
||||
insert into ng_urban_mu_rights
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="year != null">year,</if>
|
||||
<if test="water != null">water,</if>
|
||||
<if test="administrative != null">administrative,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="year != null">#{year},</if>
|
||||
<if test="water != null">#{water},</if>
|
||||
<if test="administrative != null">#{administrative},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateNgUrbanMuRights" parameterType="NgUrbanMuRights">
|
||||
update ng_urban_mu_rights
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="year != null">year = #{year},</if>
|
||||
<if test="water != null">water = #{water},</if>
|
||||
<if test="administrative != null">administrative = #{administrative},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where mu_rights_id = #{muRightsId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteNgUrbanMuRightsByMuRightsId" parameterType="Long">
|
||||
delete from ng_urban_mu_rights where mu_rights_id = #{muRightsId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteNgUrbanMuRightsByMuRightsIds" parameterType="String">
|
||||
delete from ng_urban_mu_rights where mu_rights_id in
|
||||
<foreach item="muRightsId" collection="array" open="(" separator="," close=")">
|
||||
#{muRightsId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user