用水户和取水口信息
This commit is contained in:
parent
9c6a8dc3e6
commit
e1a420e5be
@ -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.NgInformationWaterIntake;
|
||||||
|
import com.fastbee.rechargecard.service.INgInformationWaterIntakeService;
|
||||||
|
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||||
|
import com.fastbee.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取水口信息Controller
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-12-19
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/rechargecard/intake")
|
||||||
|
@Api(tags = "取水口信息")
|
||||||
|
public class NgInformationWaterIntakeController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private INgInformationWaterIntakeService ngInformationWaterIntakeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询取水口信息列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('rechargecard:intake:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
@ApiOperation("查询取水口信息列表")
|
||||||
|
public TableDataInfo list(NgInformationWaterIntake ngInformationWaterIntake)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<NgInformationWaterIntake> list = ngInformationWaterIntakeService.selectNgInformationWaterIntakeList(ngInformationWaterIntake);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出取水口信息列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("导出取水口信息列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('rechargecard:intake:export')")
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, NgInformationWaterIntake ngInformationWaterIntake)
|
||||||
|
{
|
||||||
|
List<NgInformationWaterIntake> list = ngInformationWaterIntakeService.selectNgInformationWaterIntakeList(ngInformationWaterIntake);
|
||||||
|
ExcelUtil<NgInformationWaterIntake> util = new ExcelUtil<NgInformationWaterIntake>(NgInformationWaterIntake.class);
|
||||||
|
util.exportExcel(response, list, "取水口信息数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取取水口信息详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('rechargecard:intake:query')")
|
||||||
|
@GetMapping(value = "/{intakeId}")
|
||||||
|
@ApiOperation("获取取水口信息详细信息")
|
||||||
|
public AjaxResult getInfo(@PathVariable("intakeId") Long intakeId)
|
||||||
|
{
|
||||||
|
return success(ngInformationWaterIntakeService.selectNgInformationWaterIntakeByIntakeId(intakeId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增取水口信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('rechargecard:intake:add')")
|
||||||
|
@PostMapping
|
||||||
|
@ApiOperation("新增取水口信息")
|
||||||
|
public AjaxResult add(@RequestBody NgInformationWaterIntake ngInformationWaterIntake)
|
||||||
|
{
|
||||||
|
return toAjax(ngInformationWaterIntakeService.insertNgInformationWaterIntake(ngInformationWaterIntake));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改取水口信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('rechargecard:intake:edit')")
|
||||||
|
@PutMapping
|
||||||
|
@ApiOperation("修改取水口信息")
|
||||||
|
public AjaxResult edit(@RequestBody NgInformationWaterIntake ngInformationWaterIntake)
|
||||||
|
{
|
||||||
|
return toAjax(ngInformationWaterIntakeService.updateNgInformationWaterIntake(ngInformationWaterIntake));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除取水口信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('rechargecard:intake:remove')")
|
||||||
|
@DeleteMapping("/{intakeIds}")
|
||||||
|
@ApiOperation("删除取水口信息")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] intakeIds)
|
||||||
|
{
|
||||||
|
return toAjax(ngInformationWaterIntakeService.deleteNgInformationWaterIntakeByIntakeIds(intakeIds));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,104 @@
|
|||||||
|
package com.fastbee.data.controller.userRecharge;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fastbee.common.core.controller.BaseController;
|
||||||
|
import com.fastbee.common.core.domain.AjaxResult;
|
||||||
|
import com.fastbee.common.core.page.TableDataInfo;
|
||||||
|
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||||
|
import com.fastbee.rechargecard.domain.NgInformationWaterUser;
|
||||||
|
import com.fastbee.rechargecard.service.INgInformationWaterUserService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.fastbee.common.utils.PageUtils.startPage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用水户信息Controller
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-12-19
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/ng/user")
|
||||||
|
@Api(tags = "用水户信息")
|
||||||
|
public class NgInformationWaterUserController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private INgInformationWaterUserService ngInformationWaterUserService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用水户信息列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('iot:user:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
@ApiOperation("查询用水户信息列表")
|
||||||
|
public TableDataInfo list(NgInformationWaterUser ngInformationWaterUser)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<NgInformationWaterUser> list = ngInformationWaterUserService.selectNgInformationWaterUserList(ngInformationWaterUser);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出用水户信息列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("导出用水户信息列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('iot:user:export')")
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, NgInformationWaterUser ngInformationWaterUser)
|
||||||
|
{
|
||||||
|
List<NgInformationWaterUser> list = ngInformationWaterUserService.selectNgInformationWaterUserList(ngInformationWaterUser);
|
||||||
|
ExcelUtil<NgInformationWaterUser> util = new ExcelUtil<NgInformationWaterUser>(NgInformationWaterUser.class);
|
||||||
|
util.exportExcel(response, list, "用水户信息数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用水户信息详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('iot:user:query')")
|
||||||
|
@GetMapping(value = "/{waterUserId}")
|
||||||
|
@ApiOperation("获取用水户信息详细信息")
|
||||||
|
public AjaxResult getInfo(@PathVariable("waterUserId") Long waterUserId)
|
||||||
|
{
|
||||||
|
return success(ngInformationWaterUserService.selectNgInformationWaterUserByWaterUserId(waterUserId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用水户信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('iot:user:add')")
|
||||||
|
@PostMapping
|
||||||
|
@ApiOperation("新增用水户信息")
|
||||||
|
public AjaxResult add(@RequestBody NgInformationWaterUser ngInformationWaterUser)
|
||||||
|
{
|
||||||
|
return toAjax(ngInformationWaterUserService.insertNgInformationWaterUser(ngInformationWaterUser));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用水户信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('iot:user:edit')")
|
||||||
|
@PutMapping
|
||||||
|
@ApiOperation("修改用水户信息")
|
||||||
|
public AjaxResult edit(@RequestBody NgInformationWaterUser ngInformationWaterUser)
|
||||||
|
{
|
||||||
|
return toAjax(ngInformationWaterUserService.updateNgInformationWaterUser(ngInformationWaterUser));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用水户信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('iot:user:remove')")
|
||||||
|
@DeleteMapping("/{waterUserIds}")
|
||||||
|
@ApiOperation("删除用水户信息")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] waterUserIds)
|
||||||
|
{
|
||||||
|
return toAjax(ngInformationWaterUserService.deleteNgInformationWaterUserByWaterUserIds(waterUserIds));
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,7 @@ package com.fastbee.deviceModel.mapper;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.fastbee.deviceModel.domain.DeviceModel;
|
import com.fastbee.deviceModel.domain.DeviceModel;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备型号Mapper接口
|
* 设备型号Mapper接口
|
||||||
@ -9,6 +10,7 @@ import com.fastbee.deviceModel.domain.DeviceModel;
|
|||||||
* @author kerwincui
|
* @author kerwincui
|
||||||
* @date 2024-12-17
|
* @date 2024-12-17
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface DeviceModelMapper
|
public interface DeviceModelMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -0,0 +1,72 @@
|
|||||||
|
package com.fastbee.rechargecard.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import com.github.yulichang.annotation.Table;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用水户信息对象 information_water_user
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-12-19
|
||||||
|
*/
|
||||||
|
@ApiModel(value = "InformationWaterUser",description = "用水户信息 information_water_user")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("ng_information_water_user")
|
||||||
|
public class InformationWaterUser extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long waterUserId;
|
||||||
|
|
||||||
|
/** 用水户名称 */
|
||||||
|
@Excel(name = "用水户名称")
|
||||||
|
@ApiModelProperty("用水户名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 用水户账号 */
|
||||||
|
@Excel(name = "用水户账号")
|
||||||
|
@ApiModelProperty("用水户账号")
|
||||||
|
private Long account;
|
||||||
|
|
||||||
|
/** 年用水量 */
|
||||||
|
@Excel(name = "年用水量")
|
||||||
|
@ApiModelProperty("年用水量")
|
||||||
|
private BigDecimal waterConsumption;
|
||||||
|
|
||||||
|
/** 年度用水指标 */
|
||||||
|
@Excel(name = "年度用水指标")
|
||||||
|
@ApiModelProperty("年度用水指标")
|
||||||
|
private BigDecimal waterConsumptionindex;
|
||||||
|
|
||||||
|
/** 流量预警状态 */
|
||||||
|
@Excel(name = "流量预警状态")
|
||||||
|
@ApiModelProperty("流量预警状态")
|
||||||
|
private Long warningStatus;
|
||||||
|
|
||||||
|
/** 灌溉面积 */
|
||||||
|
@Excel(name = "灌溉面积")
|
||||||
|
@ApiModelProperty("灌溉面积")
|
||||||
|
private BigDecimal irrigatedArea;
|
||||||
|
|
||||||
|
/** 所属区域 */
|
||||||
|
@Excel(name = "所属区域")
|
||||||
|
@ApiModelProperty("所属区域")
|
||||||
|
private String belongingGegion;
|
||||||
|
|
||||||
|
/** 联系方式 */
|
||||||
|
@Excel(name = "联系方式")
|
||||||
|
@ApiModelProperty("联系方式")
|
||||||
|
private String contactInformation;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
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_information_water_intake
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-12-19
|
||||||
|
*/
|
||||||
|
@ApiModel(value = "NgInformationWaterIntake",description = "取水口信息 ng_information_water_intake")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class NgInformationWaterIntake extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long intakeId;
|
||||||
|
|
||||||
|
/** 取水口编号 */
|
||||||
|
@Excel(name = "取水口编号")
|
||||||
|
@ApiModelProperty("取水口编号")
|
||||||
|
private String wellId;
|
||||||
|
|
||||||
|
/** 设备编号 */
|
||||||
|
@Excel(name = "设备编号")
|
||||||
|
@ApiModelProperty("设备编号")
|
||||||
|
private String deviceCode;
|
||||||
|
|
||||||
|
/** 位置 */
|
||||||
|
@Excel(name = "位置")
|
||||||
|
@ApiModelProperty("位置")
|
||||||
|
private String location;
|
||||||
|
|
||||||
|
/** 建造日期 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "建造日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
@ApiModelProperty("建造日期")
|
||||||
|
private Date constructionDate;
|
||||||
|
|
||||||
|
/** 维护状态 */
|
||||||
|
@Excel(name = "维护状态")
|
||||||
|
@ApiModelProperty("维护状态")
|
||||||
|
private Long maintenanceStatus;
|
||||||
|
|
||||||
|
/** 上次维护日期 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "上次维护日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
@ApiModelProperty("上次维护日期")
|
||||||
|
private Date lastMaintenanceDate;
|
||||||
|
|
||||||
|
/** 水质 */
|
||||||
|
@Excel(name = "水质")
|
||||||
|
@ApiModelProperty("水质")
|
||||||
|
private String waterQuality;
|
||||||
|
|
||||||
|
/** 取水量 */
|
||||||
|
@Excel(name = "取水量")
|
||||||
|
@ApiModelProperty("取水量")
|
||||||
|
private BigDecimal waterExtractionVolume;
|
||||||
|
|
||||||
|
/** 类型 */
|
||||||
|
@Excel(name = "类型")
|
||||||
|
@ApiModelProperty("类型")
|
||||||
|
private Long type;
|
||||||
|
|
||||||
|
/** 负责人 */
|
||||||
|
@Excel(name = "负责人")
|
||||||
|
@ApiModelProperty("负责人")
|
||||||
|
private String responsiblePerson;
|
||||||
|
|
||||||
|
/** 联系电话 */
|
||||||
|
@Excel(name = "联系电话")
|
||||||
|
@ApiModelProperty("联系电话")
|
||||||
|
private String contactInformation;
|
||||||
|
|
||||||
|
/** 取水口参数 */
|
||||||
|
@Excel(name = "取水口参数")
|
||||||
|
@ApiModelProperty("取水口参数")
|
||||||
|
private String parameter;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.fastbee.rechargecard.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
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_information_water_user
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-12-19
|
||||||
|
*/
|
||||||
|
@ApiModel(value = "NgInformationWaterUser",description = "用水户信息 ng_information_water_user")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class NgInformationWaterUser extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long waterUserId;
|
||||||
|
|
||||||
|
/** 用水户名称 */
|
||||||
|
@Excel(name = "用水户名称")
|
||||||
|
@ApiModelProperty("用水户名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 用水户账号 */
|
||||||
|
@Excel(name = "用水户账号")
|
||||||
|
@ApiModelProperty("用水户账号")
|
||||||
|
private String account;
|
||||||
|
|
||||||
|
/** 年用水量 */
|
||||||
|
@Excel(name = "年用水量")
|
||||||
|
@ApiModelProperty("年用水量")
|
||||||
|
private BigDecimal waterConsumption;
|
||||||
|
|
||||||
|
/** 年度用水指标 */
|
||||||
|
@Excel(name = "年度用水指标")
|
||||||
|
@ApiModelProperty("年度用水指标")
|
||||||
|
private BigDecimal waterConsumptionindex;
|
||||||
|
|
||||||
|
/** 流量预警状态 */
|
||||||
|
@Excel(name = "流量预警状态")
|
||||||
|
@ApiModelProperty("流量预警状态")
|
||||||
|
private Long warningStatus;
|
||||||
|
|
||||||
|
/** 灌溉面积 */
|
||||||
|
@Excel(name = "灌溉面积")
|
||||||
|
@ApiModelProperty("灌溉面积")
|
||||||
|
private BigDecimal irrigatedArea;
|
||||||
|
|
||||||
|
/** 所属区域 */
|
||||||
|
@Excel(name = "所属区域")
|
||||||
|
@ApiModelProperty("所属区域")
|
||||||
|
private String belongingGegion;
|
||||||
|
|
||||||
|
/** 联系方式 */
|
||||||
|
@Excel(name = "联系方式")
|
||||||
|
@ApiModelProperty("联系方式")
|
||||||
|
private String contactInformation;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.fastbee.rechargecard.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.fastbee.rechargecard.domain.NgInformationWaterIntake;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取水口信息Mapper接口
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-12-19
|
||||||
|
*/
|
||||||
|
public interface NgInformationWaterIntakeMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询取水口信息
|
||||||
|
*
|
||||||
|
* @param intakeId 取水口信息主键
|
||||||
|
* @return 取水口信息
|
||||||
|
*/
|
||||||
|
public NgInformationWaterIntake selectNgInformationWaterIntakeByIntakeId(Long intakeId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询取水口信息列表
|
||||||
|
*
|
||||||
|
* @param ngInformationWaterIntake 取水口信息
|
||||||
|
* @return 取水口信息集合
|
||||||
|
*/
|
||||||
|
public List<NgInformationWaterIntake> selectNgInformationWaterIntakeList(NgInformationWaterIntake ngInformationWaterIntake);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增取水口信息
|
||||||
|
*
|
||||||
|
* @param ngInformationWaterIntake 取水口信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertNgInformationWaterIntake(NgInformationWaterIntake ngInformationWaterIntake);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改取水口信息
|
||||||
|
*
|
||||||
|
* @param ngInformationWaterIntake 取水口信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateNgInformationWaterIntake(NgInformationWaterIntake ngInformationWaterIntake);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除取水口信息
|
||||||
|
*
|
||||||
|
* @param intakeId 取水口信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNgInformationWaterIntakeByIntakeId(Long intakeId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除取水口信息
|
||||||
|
*
|
||||||
|
* @param intakeIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNgInformationWaterIntakeByIntakeIds(Long[] intakeIds);
|
||||||
|
}
|
@ -0,0 +1,65 @@
|
|||||||
|
package com.fastbee.rechargecard.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fastbee.rechargecard.domain.NgInformationWaterUser;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用水户信息Mapper接口
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-12-19
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface NgInformationWaterUserMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询用水户信息
|
||||||
|
*
|
||||||
|
* @param waterUserId 用水户信息主键
|
||||||
|
* @return 用水户信息
|
||||||
|
*/
|
||||||
|
public NgInformationWaterUser selectNgInformationWaterUserByWaterUserId(Long waterUserId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用水户信息列表
|
||||||
|
*
|
||||||
|
* @param ngInformationWaterUser 用水户信息
|
||||||
|
* @return 用水户信息集合
|
||||||
|
*/
|
||||||
|
public List<NgInformationWaterUser> selectNgInformationWaterUserList(NgInformationWaterUser ngInformationWaterUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用水户信息
|
||||||
|
*
|
||||||
|
* @param ngInformationWaterUser 用水户信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertNgInformationWaterUser(NgInformationWaterUser ngInformationWaterUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用水户信息
|
||||||
|
*
|
||||||
|
* @param ngInformationWaterUser 用水户信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateNgInformationWaterUser(NgInformationWaterUser ngInformationWaterUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用水户信息
|
||||||
|
*
|
||||||
|
* @param waterUserId 用水户信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNgInformationWaterUserByWaterUserId(Long waterUserId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除用水户信息
|
||||||
|
*
|
||||||
|
* @param waterUserIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNgInformationWaterUserByWaterUserIds(Long[] waterUserIds);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.fastbee.rechargecard.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.fastbee.rechargecard.domain.NgInformationWaterIntake;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取水口信息Service接口
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-12-19
|
||||||
|
*/
|
||||||
|
public interface INgInformationWaterIntakeService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询取水口信息
|
||||||
|
*
|
||||||
|
* @param intakeId 取水口信息主键
|
||||||
|
* @return 取水口信息
|
||||||
|
*/
|
||||||
|
public NgInformationWaterIntake selectNgInformationWaterIntakeByIntakeId(Long intakeId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询取水口信息列表
|
||||||
|
*
|
||||||
|
* @param ngInformationWaterIntake 取水口信息
|
||||||
|
* @return 取水口信息集合
|
||||||
|
*/
|
||||||
|
public List<NgInformationWaterIntake> selectNgInformationWaterIntakeList(NgInformationWaterIntake ngInformationWaterIntake);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增取水口信息
|
||||||
|
*
|
||||||
|
* @param ngInformationWaterIntake 取水口信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertNgInformationWaterIntake(NgInformationWaterIntake ngInformationWaterIntake);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改取水口信息
|
||||||
|
*
|
||||||
|
* @param ngInformationWaterIntake 取水口信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateNgInformationWaterIntake(NgInformationWaterIntake ngInformationWaterIntake);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除取水口信息
|
||||||
|
*
|
||||||
|
* @param intakeIds 需要删除的取水口信息主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNgInformationWaterIntakeByIntakeIds(Long[] intakeIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除取水口信息信息
|
||||||
|
*
|
||||||
|
* @param intakeId 取水口信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNgInformationWaterIntakeByIntakeId(Long intakeId);
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.fastbee.rechargecard.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fastbee.rechargecard.domain.NgInformationWaterUser;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用水户信息Service接口
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-12-19
|
||||||
|
*/
|
||||||
|
public interface INgInformationWaterUserService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询用水户信息
|
||||||
|
*
|
||||||
|
* @param waterUserId 用水户信息主键
|
||||||
|
* @return 用水户信息
|
||||||
|
*/
|
||||||
|
public NgInformationWaterUser selectNgInformationWaterUserByWaterUserId(Long waterUserId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用水户信息列表
|
||||||
|
*
|
||||||
|
* @param ngInformationWaterUser 用水户信息
|
||||||
|
* @return 用水户信息集合
|
||||||
|
*/
|
||||||
|
public List<NgInformationWaterUser> selectNgInformationWaterUserList(NgInformationWaterUser ngInformationWaterUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用水户信息
|
||||||
|
*
|
||||||
|
* @param ngInformationWaterUser 用水户信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertNgInformationWaterUser(NgInformationWaterUser ngInformationWaterUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用水户信息
|
||||||
|
*
|
||||||
|
* @param ngInformationWaterUser 用水户信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateNgInformationWaterUser(NgInformationWaterUser ngInformationWaterUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除用水户信息
|
||||||
|
*
|
||||||
|
* @param waterUserIds 需要删除的用水户信息主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNgInformationWaterUserByWaterUserIds(Long[] waterUserIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用水户信息信息
|
||||||
|
*
|
||||||
|
* @param waterUserId 用水户信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNgInformationWaterUserByWaterUserId(Long waterUserId);
|
||||||
|
}
|
@ -2,6 +2,7 @@ package com.fastbee.rechargecard.service;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.fastbee.rechargecard.domain.UserConsumptionDetails;
|
import com.fastbee.rechargecard.domain.UserConsumptionDetails;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户充值卡账单明细记录Service接口
|
* 用户充值卡账单明细记录Service接口
|
||||||
@ -9,6 +10,7 @@ import com.fastbee.rechargecard.domain.UserConsumptionDetails;
|
|||||||
* @author kerwincui
|
* @author kerwincui
|
||||||
* @date 2024-12-18
|
* @date 2024-12-18
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public interface IUserConsumptionDetailsService
|
public interface IUserConsumptionDetailsService
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -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.NgInformationWaterIntakeMapper;
|
||||||
|
import com.fastbee.rechargecard.domain.NgInformationWaterIntake;
|
||||||
|
import com.fastbee.rechargecard.service.INgInformationWaterIntakeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取水口信息Service业务层处理
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-12-19
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class NgInformationWaterIntakeServiceImpl implements INgInformationWaterIntakeService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private NgInformationWaterIntakeMapper ngInformationWaterIntakeMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询取水口信息
|
||||||
|
*
|
||||||
|
* @param intakeId 取水口信息主键
|
||||||
|
* @return 取水口信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public NgInformationWaterIntake selectNgInformationWaterIntakeByIntakeId(Long intakeId)
|
||||||
|
{
|
||||||
|
return ngInformationWaterIntakeMapper.selectNgInformationWaterIntakeByIntakeId(intakeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询取水口信息列表
|
||||||
|
*
|
||||||
|
* @param ngInformationWaterIntake 取水口信息
|
||||||
|
* @return 取水口信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<NgInformationWaterIntake> selectNgInformationWaterIntakeList(NgInformationWaterIntake ngInformationWaterIntake)
|
||||||
|
{
|
||||||
|
return ngInformationWaterIntakeMapper.selectNgInformationWaterIntakeList(ngInformationWaterIntake);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增取水口信息
|
||||||
|
*
|
||||||
|
* @param ngInformationWaterIntake 取水口信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertNgInformationWaterIntake(NgInformationWaterIntake ngInformationWaterIntake)
|
||||||
|
{
|
||||||
|
ngInformationWaterIntake.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return ngInformationWaterIntakeMapper.insertNgInformationWaterIntake(ngInformationWaterIntake);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改取水口信息
|
||||||
|
*
|
||||||
|
* @param ngInformationWaterIntake 取水口信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateNgInformationWaterIntake(NgInformationWaterIntake ngInformationWaterIntake)
|
||||||
|
{
|
||||||
|
ngInformationWaterIntake.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return ngInformationWaterIntakeMapper.updateNgInformationWaterIntake(ngInformationWaterIntake);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除取水口信息
|
||||||
|
*
|
||||||
|
* @param intakeIds 需要删除的取水口信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteNgInformationWaterIntakeByIntakeIds(Long[] intakeIds)
|
||||||
|
{
|
||||||
|
return ngInformationWaterIntakeMapper.deleteNgInformationWaterIntakeByIntakeIds(intakeIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除取水口信息信息
|
||||||
|
*
|
||||||
|
* @param intakeId 取水口信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteNgInformationWaterIntakeByIntakeId(Long intakeId)
|
||||||
|
{
|
||||||
|
return ngInformationWaterIntakeMapper.deleteNgInformationWaterIntakeByIntakeId(intakeId);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,131 @@
|
|||||||
|
<?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.NgInformationWaterIntakeMapper">
|
||||||
|
|
||||||
|
<resultMap type="NgInformationWaterIntake" id="NgInformationWaterIntakeResult">
|
||||||
|
<result property="intakeId" column="intake_id" />
|
||||||
|
<result property="wellId" column="well_id" />
|
||||||
|
<result property="deviceCode" column="device_code" />
|
||||||
|
<result property="location" column="location" />
|
||||||
|
<result property="constructionDate" column="construction_date" />
|
||||||
|
<result property="maintenanceStatus" column="maintenance_status" />
|
||||||
|
<result property="lastMaintenanceDate" column="last_maintenance_date" />
|
||||||
|
<result property="waterQuality" column="water_quality" />
|
||||||
|
<result property="waterExtractionVolume" column="water_extraction_volume" />
|
||||||
|
<result property="type" column="type" />
|
||||||
|
<result property="responsiblePerson" column="responsible_person" />
|
||||||
|
<result property="contactInformation" column="contact_information" />
|
||||||
|
<result property="parameter" column="parameter" />
|
||||||
|
<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="selectNgInformationWaterIntakeVo">
|
||||||
|
select intake_id, well_id, device_code, location, construction_date, maintenance_status, last_maintenance_date, water_quality, water_extraction_volume, type, responsible_person, contact_information, parameter, remark, create_time, update_time, create_by, update_by from ng_information_water_intake
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectNgInformationWaterIntakeList" parameterType="NgInformationWaterIntake" resultMap="NgInformationWaterIntakeResult">
|
||||||
|
<include refid="selectNgInformationWaterIntakeVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="wellId != null and wellId != ''"> and well_id = #{wellId}</if>
|
||||||
|
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
|
||||||
|
<if test="location != null and location != ''"> and location = #{location}</if>
|
||||||
|
<if test="constructionDate != null "> and construction_date = #{constructionDate}</if>
|
||||||
|
<if test="maintenanceStatus != null "> and maintenance_status = #{maintenanceStatus}</if>
|
||||||
|
<if test="lastMaintenanceDate != null "> and last_maintenance_date = #{lastMaintenanceDate}</if>
|
||||||
|
<if test="waterQuality != null and waterQuality != ''"> and water_quality = #{waterQuality}</if>
|
||||||
|
<if test="waterExtractionVolume != null "> and water_extraction_volume = #{waterExtractionVolume}</if>
|
||||||
|
<if test="type != null "> and type = #{type}</if>
|
||||||
|
<if test="responsiblePerson != null and responsiblePerson != ''"> and responsible_person = #{responsiblePerson}</if>
|
||||||
|
<if test="contactInformation != null and contactInformation != ''"> and contact_information = #{contactInformation}</if>
|
||||||
|
<if test="parameter != null and parameter != ''"> and parameter = #{parameter}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectNgInformationWaterIntakeByIntakeId" parameterType="Long" resultMap="NgInformationWaterIntakeResult">
|
||||||
|
<include refid="selectNgInformationWaterIntakeVo"/>
|
||||||
|
where intake_id = #{intakeId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertNgInformationWaterIntake" parameterType="NgInformationWaterIntake" useGeneratedKeys="true" keyProperty="intakeId">
|
||||||
|
insert into ng_information_water_intake
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="wellId != null">well_id,</if>
|
||||||
|
<if test="deviceCode != null">device_code,</if>
|
||||||
|
<if test="location != null">location,</if>
|
||||||
|
<if test="constructionDate != null">construction_date,</if>
|
||||||
|
<if test="maintenanceStatus != null">maintenance_status,</if>
|
||||||
|
<if test="lastMaintenanceDate != null">last_maintenance_date,</if>
|
||||||
|
<if test="waterQuality != null">water_quality,</if>
|
||||||
|
<if test="waterExtractionVolume != null">water_extraction_volume,</if>
|
||||||
|
<if test="type != null">type,</if>
|
||||||
|
<if test="responsiblePerson != null">responsible_person,</if>
|
||||||
|
<if test="contactInformation != null">contact_information,</if>
|
||||||
|
<if test="parameter != null">parameter,</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="wellId != null">#{wellId},</if>
|
||||||
|
<if test="deviceCode != null">#{deviceCode},</if>
|
||||||
|
<if test="location != null">#{location},</if>
|
||||||
|
<if test="constructionDate != null">#{constructionDate},</if>
|
||||||
|
<if test="maintenanceStatus != null">#{maintenanceStatus},</if>
|
||||||
|
<if test="lastMaintenanceDate != null">#{lastMaintenanceDate},</if>
|
||||||
|
<if test="waterQuality != null">#{waterQuality},</if>
|
||||||
|
<if test="waterExtractionVolume != null">#{waterExtractionVolume},</if>
|
||||||
|
<if test="type != null">#{type},</if>
|
||||||
|
<if test="responsiblePerson != null">#{responsiblePerson},</if>
|
||||||
|
<if test="contactInformation != null">#{contactInformation},</if>
|
||||||
|
<if test="parameter != null">#{parameter},</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="updateNgInformationWaterIntake" parameterType="NgInformationWaterIntake">
|
||||||
|
update ng_information_water_intake
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="wellId != null">well_id = #{wellId},</if>
|
||||||
|
<if test="deviceCode != null">device_code = #{deviceCode},</if>
|
||||||
|
<if test="location != null">location = #{location},</if>
|
||||||
|
<if test="constructionDate != null">construction_date = #{constructionDate},</if>
|
||||||
|
<if test="maintenanceStatus != null">maintenance_status = #{maintenanceStatus},</if>
|
||||||
|
<if test="lastMaintenanceDate != null">last_maintenance_date = #{lastMaintenanceDate},</if>
|
||||||
|
<if test="waterQuality != null">water_quality = #{waterQuality},</if>
|
||||||
|
<if test="waterExtractionVolume != null">water_extraction_volume = #{waterExtractionVolume},</if>
|
||||||
|
<if test="type != null">type = #{type},</if>
|
||||||
|
<if test="responsiblePerson != null">responsible_person = #{responsiblePerson},</if>
|
||||||
|
<if test="contactInformation != null">contact_information = #{contactInformation},</if>
|
||||||
|
<if test="parameter != null">parameter = #{parameter},</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 intake_id = #{intakeId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteNgInformationWaterIntakeByIntakeId" parameterType="Long">
|
||||||
|
delete from ng_information_water_intake where intake_id = #{intakeId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteNgInformationWaterIntakeByIntakeIds" parameterType="String">
|
||||||
|
delete from ng_information_water_intake where intake_id in
|
||||||
|
<foreach item="intakeId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{intakeId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -0,0 +1,111 @@
|
|||||||
|
<?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.NgInformationWaterUserMapper">
|
||||||
|
|
||||||
|
<resultMap type="NgInformationWaterUser" id="NgInformationWaterUserResult">
|
||||||
|
<result property="waterUserId" column="water_user_id" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
<result property="account" column="account" />
|
||||||
|
<result property="waterConsumption" column="water_consumption" />
|
||||||
|
<result property="waterConsumptionindex" column="water_consumptionIndex" />
|
||||||
|
<result property="warningStatus" column="warning_status" />
|
||||||
|
<result property="irrigatedArea" column="irrigated_area" />
|
||||||
|
<result property="belongingGegion" column="belonging_gegion" />
|
||||||
|
<result property="contactInformation" column="contact_information" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectNgInformationWaterUserVo">
|
||||||
|
select water_user_id, name, account, water_consumption, water_consumptionIndex, warning_status, irrigated_area, belonging_gegion, contact_information, remark, create_time, create_by, update_time, update_by from ng_information_water_user
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectNgInformationWaterUserList" parameterType="NgInformationWaterUser" resultMap="NgInformationWaterUserResult">
|
||||||
|
<include refid="selectNgInformationWaterUserVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
|
<if test="account != null and account != ''"> and account = #{account}</if>
|
||||||
|
<if test="waterConsumption != null "> and water_consumption = #{waterConsumption}</if>
|
||||||
|
<if test="waterConsumptionindex != null "> and water_consumptionIndex = #{waterConsumptionindex}</if>
|
||||||
|
<if test="warningStatus != null "> and warning_status = #{warningStatus}</if>
|
||||||
|
<if test="irrigatedArea != null "> and irrigated_area = #{irrigatedArea}</if>
|
||||||
|
<if test="belongingGegion != null and belongingGegion != ''"> and belonging_gegion = #{belongingGegion}</if>
|
||||||
|
<if test="contactInformation != null and contactInformation != ''"> and contact_information = #{contactInformation}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectNgInformationWaterUserByWaterUserId" parameterType="Long" resultMap="NgInformationWaterUserResult">
|
||||||
|
<include refid="selectNgInformationWaterUserVo"/>
|
||||||
|
where water_user_id = #{waterUserId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertNgInformationWaterUser" parameterType="NgInformationWaterUser" useGeneratedKeys="true" keyProperty="waterUserId">
|
||||||
|
insert into ng_information_water_user
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">name,</if>
|
||||||
|
<if test="account != null">account,</if>
|
||||||
|
<if test="waterConsumption != null">water_consumption,</if>
|
||||||
|
<if test="waterConsumptionindex != null">water_consumptionIndex,</if>
|
||||||
|
<if test="warningStatus != null">warning_status,</if>
|
||||||
|
<if test="irrigatedArea != null">irrigated_area,</if>
|
||||||
|
<if test="belongingGegion != null">belonging_gegion,</if>
|
||||||
|
<if test="contactInformation != null">contact_information,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">#{name},</if>
|
||||||
|
<if test="account != null">#{account},</if>
|
||||||
|
<if test="waterConsumption != null">#{waterConsumption},</if>
|
||||||
|
<if test="waterConsumptionindex != null">#{waterConsumptionindex},</if>
|
||||||
|
<if test="warningStatus != null">#{warningStatus},</if>
|
||||||
|
<if test="irrigatedArea != null">#{irrigatedArea},</if>
|
||||||
|
<if test="belongingGegion != null">#{belongingGegion},</if>
|
||||||
|
<if test="contactInformation != null">#{contactInformation},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateNgInformationWaterUser" parameterType="NgInformationWaterUser">
|
||||||
|
update ng_information_water_user
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="name != null">name = #{name},</if>
|
||||||
|
<if test="account != null">account = #{account},</if>
|
||||||
|
<if test="waterConsumption != null">water_consumption = #{waterConsumption},</if>
|
||||||
|
<if test="waterConsumptionindex != null">water_consumptionIndex = #{waterConsumptionindex},</if>
|
||||||
|
<if test="warningStatus != null">warning_status = #{warningStatus},</if>
|
||||||
|
<if test="irrigatedArea != null">irrigated_area = #{irrigatedArea},</if>
|
||||||
|
<if test="belongingGegion != null">belonging_gegion = #{belongingGegion},</if>
|
||||||
|
<if test="contactInformation != null">contact_information = #{contactInformation},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
</trim>
|
||||||
|
where water_user_id = #{waterUserId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteNgInformationWaterUserByWaterUserId" parameterType="Long">
|
||||||
|
delete from ng_information_water_user where water_user_id = #{waterUserId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteNgInformationWaterUserByWaterUserIds" parameterType="String">
|
||||||
|
delete from ng_information_water_user where water_user_id in
|
||||||
|
<foreach item="waterUserId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{waterUserId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user