From e1a420e5bec060dbd1c4d576ce8658e67e069f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=AD=94=E4=BB=99=7E?= <13068499+willowhh@user.noreply.gitee.com> Date: Thu, 19 Dec 2024 10:39:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=B0=B4=E6=88=B7=E5=92=8C=E5=8F=96?= =?UTF-8?q?=E6=B0=B4=E5=8F=A3=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NgInformationWaterIntakeController.java | 110 +++++++++++++++ .../NgInformationWaterUserController.java | 104 ++++++++++++++ .../deviceModel/mapper/DeviceModelMapper.java | 2 + .../domain/InformationWaterUser.java | 72 ++++++++++ .../domain/NgInformationWaterIntake.java | 93 +++++++++++++ .../domain/NgInformationWaterUser.java | 69 +++++++++ .../NgInformationWaterIntakeMapper.java | 61 ++++++++ .../mapper/NgInformationWaterUserMapper.java | 65 +++++++++ .../INgInformationWaterIntakeService.java | 61 ++++++++ .../INgInformationWaterUserService.java | 63 +++++++++ .../IUserConsumptionDetailsService.java | 2 + .../NgInformationWaterIntakeServiceImpl.java | 96 +++++++++++++ .../NgInformationWaterIntakeMapper.xml | 131 ++++++++++++++++++ .../NgInformationWaterUserMapper.xml | 111 +++++++++++++++ 14 files changed, 1040 insertions(+) create mode 100644 fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/NgInformationWaterIntakeController.java create mode 100644 fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/NgInformationWaterUserController.java create mode 100644 fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/InformationWaterUser.java create mode 100644 fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgInformationWaterIntake.java create mode 100644 fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgInformationWaterUser.java create mode 100644 fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/mapper/NgInformationWaterIntakeMapper.java create mode 100644 fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/mapper/NgInformationWaterUserMapper.java create mode 100644 fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/INgInformationWaterIntakeService.java create mode 100644 fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/INgInformationWaterUserService.java create mode 100644 fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/impl/NgInformationWaterIntakeServiceImpl.java create mode 100644 fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgInformationWaterIntakeMapper.xml create mode 100644 fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgInformationWaterUserMapper.xml diff --git a/fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/NgInformationWaterIntakeController.java b/fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/NgInformationWaterIntakeController.java new file mode 100644 index 0000000..94a4d12 --- /dev/null +++ b/fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/NgInformationWaterIntakeController.java @@ -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 list = ngInformationWaterIntakeService.selectNgInformationWaterIntakeList(ngInformationWaterIntake); + return getDataTable(list); + } + + /** + * 导出取水口信息列表 + */ + @ApiOperation("导出取水口信息列表") + @PreAuthorize("@ss.hasPermi('rechargecard:intake:export')") + @PostMapping("/export") + public void export(HttpServletResponse response, NgInformationWaterIntake ngInformationWaterIntake) + { + List list = ngInformationWaterIntakeService.selectNgInformationWaterIntakeList(ngInformationWaterIntake); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/NgInformationWaterUserController.java b/fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/NgInformationWaterUserController.java new file mode 100644 index 0000000..eeac9bb --- /dev/null +++ b/fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/NgInformationWaterUserController.java @@ -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 list = ngInformationWaterUserService.selectNgInformationWaterUserList(ngInformationWaterUser); + return getDataTable(list); + } + + /** + * 导出用水户信息列表 + */ + @ApiOperation("导出用水户信息列表") + @PreAuthorize("@ss.hasPermi('iot:user:export')") + @PostMapping("/export") + public void export(HttpServletResponse response, NgInformationWaterUser ngInformationWaterUser) + { + List list = ngInformationWaterUserService.selectNgInformationWaterUserList(ngInformationWaterUser); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceModel/mapper/DeviceModelMapper.java b/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceModel/mapper/DeviceModelMapper.java index 7b80fd7..22fde93 100644 --- a/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceModel/mapper/DeviceModelMapper.java +++ b/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceModel/mapper/DeviceModelMapper.java @@ -2,6 +2,7 @@ package com.fastbee.deviceModel.mapper; import java.util.List; import com.fastbee.deviceModel.domain.DeviceModel; +import org.apache.ibatis.annotations.Mapper; /** * 设备型号Mapper接口 @@ -9,6 +10,7 @@ import com.fastbee.deviceModel.domain.DeviceModel; * @author kerwincui * @date 2024-12-17 */ +@Mapper public interface DeviceModelMapper { /** diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/InformationWaterUser.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/InformationWaterUser.java new file mode 100644 index 0000000..0228611 --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/InformationWaterUser.java @@ -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; + +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgInformationWaterIntake.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgInformationWaterIntake.java new file mode 100644 index 0000000..e023bf1 --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgInformationWaterIntake.java @@ -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; + +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgInformationWaterUser.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgInformationWaterUser.java new file mode 100644 index 0000000..c25c50b --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgInformationWaterUser.java @@ -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; + +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/mapper/NgInformationWaterIntakeMapper.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/mapper/NgInformationWaterIntakeMapper.java new file mode 100644 index 0000000..37b0c59 --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/mapper/NgInformationWaterIntakeMapper.java @@ -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 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); +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/mapper/NgInformationWaterUserMapper.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/mapper/NgInformationWaterUserMapper.java new file mode 100644 index 0000000..5c4d1ff --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/mapper/NgInformationWaterUserMapper.java @@ -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 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); +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/INgInformationWaterIntakeService.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/INgInformationWaterIntakeService.java new file mode 100644 index 0000000..385314d --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/INgInformationWaterIntakeService.java @@ -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 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); +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/INgInformationWaterUserService.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/INgInformationWaterUserService.java new file mode 100644 index 0000000..e437f26 --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/INgInformationWaterUserService.java @@ -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 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); +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/IUserConsumptionDetailsService.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/IUserConsumptionDetailsService.java index 6ddf9b0..c1805eb 100644 --- a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/IUserConsumptionDetailsService.java +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/IUserConsumptionDetailsService.java @@ -2,6 +2,7 @@ package com.fastbee.rechargecard.service; import java.util.List; import com.fastbee.rechargecard.domain.UserConsumptionDetails; +import org.springframework.stereotype.Service; /** * 用户充值卡账单明细记录Service接口 @@ -9,6 +10,7 @@ import com.fastbee.rechargecard.domain.UserConsumptionDetails; * @author kerwincui * @date 2024-12-18 */ + public interface IUserConsumptionDetailsService { /** diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/impl/NgInformationWaterIntakeServiceImpl.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/impl/NgInformationWaterIntakeServiceImpl.java new file mode 100644 index 0000000..ae0e731 --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/impl/NgInformationWaterIntakeServiceImpl.java @@ -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 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); + } +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgInformationWaterIntakeMapper.xml b/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgInformationWaterIntakeMapper.xml new file mode 100644 index 0000000..ae84a90 --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgInformationWaterIntakeMapper.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into ng_information_water_intake + + 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, + + + #{wellId}, + #{deviceCode}, + #{location}, + #{constructionDate}, + #{maintenanceStatus}, + #{lastMaintenanceDate}, + #{waterQuality}, + #{waterExtractionVolume}, + #{type}, + #{responsiblePerson}, + #{contactInformation}, + #{parameter}, + #{remark}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + + + + + update ng_information_water_intake + + well_id = #{wellId}, + device_code = #{deviceCode}, + location = #{location}, + construction_date = #{constructionDate}, + maintenance_status = #{maintenanceStatus}, + last_maintenance_date = #{lastMaintenanceDate}, + water_quality = #{waterQuality}, + water_extraction_volume = #{waterExtractionVolume}, + type = #{type}, + responsible_person = #{responsiblePerson}, + contact_information = #{contactInformation}, + parameter = #{parameter}, + remark = #{remark}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + + where intake_id = #{intakeId} + + + + delete from ng_information_water_intake where intake_id = #{intakeId} + + + + delete from ng_information_water_intake where intake_id in + + #{intakeId} + + + \ No newline at end of file diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgInformationWaterUserMapper.xml b/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgInformationWaterUserMapper.xml new file mode 100644 index 0000000..63eb5c4 --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgInformationWaterUserMapper.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into ng_information_water_user + + name, + account, + water_consumption, + water_consumptionIndex, + warning_status, + irrigated_area, + belonging_gegion, + contact_information, + remark, + create_time, + create_by, + update_time, + update_by, + + + #{name}, + #{account}, + #{waterConsumption}, + #{waterConsumptionindex}, + #{warningStatus}, + #{irrigatedArea}, + #{belongingGegion}, + #{contactInformation}, + #{remark}, + #{createTime}, + #{createBy}, + #{updateTime}, + #{updateBy}, + + + + + update ng_information_water_user + + name = #{name}, + account = #{account}, + water_consumption = #{waterConsumption}, + water_consumptionIndex = #{waterConsumptionindex}, + warning_status = #{warningStatus}, + irrigated_area = #{irrigatedArea}, + belonging_gegion = #{belongingGegion}, + contact_information = #{contactInformation}, + remark = #{remark}, + create_time = #{createTime}, + create_by = #{createBy}, + update_time = #{updateTime}, + update_by = #{updateBy}, + + where water_user_id = #{waterUserId} + + + + delete from ng_information_water_user where water_user_id = #{waterUserId} + + + + delete from ng_information_water_user where water_user_id in + + #{waterUserId} + + + \ No newline at end of file