From 0f77ebc404bf0b432f7668c178d6d171bec7dd16 Mon Sep 17 00:00:00 2001 From: yang_shj Date: Mon, 10 Apr 2023 13:31:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?#=E7=AB=99=E7=82=B9=E5=A1=AB=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/fill/entity/GenerateEntity.java | 30 ++++++++ .../hzims/operational/fill/entity/UseEntity.java | 30 ++++++++ .../hnac/hzims/operational/fill/vo/GenerateVo.java | 18 +++++ .../operational/fill/vo/NotInsertPowerVo.java | 19 ----- .../hzims/operational/fill/vo/NotInsertUseVo.java | 18 ----- .../com/hnac/hzims/operational/fill/vo/UseVo.java | 18 +++++ .../operational/station/entity/StationEntity.java | 9 +-- .../fill/controller/GenerateController.java | 65 +++++++++++++++++ .../fill/controller/InsertPowerController.java | 74 ------------------- .../fill/controller/InsertUseController.java | 69 ------------------ .../fill/controller/NotInsertPowerController.java | 66 ----------------- .../fill/controller/NotInsertUseController.java | 66 ----------------- .../operational/fill/controller/UseController.java | 64 +++++++++++++++++ .../operational/fill/mapper/GenerateMapper.java | 13 ++++ .../operational/fill/mapper/GenerateMapper.xml | 4 ++ .../operational/fill/mapper/InsertPowerMapper.java | 13 ---- .../operational/fill/mapper/InsertPowerMapper.xml | 5 -- .../operational/fill/mapper/InsertUseMapper.java | 13 ---- .../operational/fill/mapper/InsertUseMapper.xml | 5 -- .../fill/mapper/NotInsertPowerMapper.java | 13 ---- .../fill/mapper/NotInsertPowerMapper.xml | 5 -- .../fill/mapper/NotInsertUseMapper.java | 13 ---- .../operational/fill/mapper/NotInsertUseMapper.xml | 5 -- .../hzims/operational/fill/mapper/UseMapper.java | 13 ++++ .../hzims/operational/fill/mapper/UseMapper.xml | 4 ++ .../operational/fill/service/GenerateService.java | 25 +++++++ .../fill/service/InsertPowerService.java | 17 ----- .../operational/fill/service/InsertUseService.java | 18 ----- .../fill/service/NotInsertPowerService.java | 29 -------- .../fill/service/NotInsertUseService.java | 27 ------- .../hzims/operational/fill/service/UseService.java | 23 ++++++ .../fill/service/impl/GenerateServiceImpl.java | 81 +++++++++++++++++++++ .../fill/service/impl/InsertPowerServiceImpl.java | 22 ------ .../fill/service/impl/InsertUseServiceImpl.java | 22 ------ .../service/impl/NotInsertPowerServiceImpl.java | 82 --------------------- .../fill/service/impl/NotInsertUseServiceImpl.java | 84 ---------------------- .../fill/service/impl/UseServiceImpl.java | 81 +++++++++++++++++++++ .../operational/fill/wrapper/GenerateWrapper.java | 36 ++++++++++ .../fill/wrapper/NotInsertPowerWrapper.java | 37 ---------- .../fill/wrapper/NotInsertUseWrapper.java | 36 ---------- .../hzims/operational/fill/wrapper/UseWrapper.java | 36 ++++++++++ 41 files changed, 546 insertions(+), 762 deletions(-) create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/entity/GenerateEntity.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/entity/UseEntity.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/GenerateVo.java delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/NotInsertPowerVo.java delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/NotInsertUseVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/UseVo.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/GenerateController.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/InsertPowerController.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/InsertUseController.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/NotInsertPowerController.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/NotInsertUseController.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/UseController.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/GenerateMapper.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/GenerateMapper.xml delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/InsertPowerMapper.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/InsertPowerMapper.xml delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/InsertUseMapper.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/InsertUseMapper.xml delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/NotInsertPowerMapper.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/NotInsertPowerMapper.xml delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/NotInsertUseMapper.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/NotInsertUseMapper.xml create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/UseMapper.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/UseMapper.xml create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/GenerateService.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/InsertPowerService.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/InsertUseService.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/NotInsertPowerService.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/NotInsertUseService.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/UseService.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/InsertPowerServiceImpl.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/InsertUseServiceImpl.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/NotInsertPowerServiceImpl.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/NotInsertUseServiceImpl.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/UseServiceImpl.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/GenerateWrapper.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/NotInsertPowerWrapper.java delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/NotInsertUseWrapper.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/UseWrapper.java diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/entity/GenerateEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/entity/GenerateEntity.java new file mode 100644 index 0000000..1da1247 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/entity/GenerateEntity.java @@ -0,0 +1,30 @@ +package com.hnac.hzims.operational.fill.entity; + + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springblade.core.tenant.mp.TenantEntity; + +import java.io.Serializable; +import java.math.BigDecimal; + + +@Data +@TableName("hzims_fill_generate") +@ApiModel(value="GenerateEntity", description="保存发电量填报数据对象") +public class GenerateEntity extends TenantEntity implements Serializable { + + @ApiModelProperty("站点编号") + private String stationCode; + + @ApiModelProperty("站点名称") + private String stationName; + + @ApiModelProperty("发电量") + private BigDecimal generate; + + @ApiModelProperty("填报月份") + private String fillDate; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/entity/UseEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/entity/UseEntity.java new file mode 100644 index 0000000..9611d69 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/entity/UseEntity.java @@ -0,0 +1,30 @@ +package com.hnac.hzims.operational.fill.entity; + + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springblade.core.tenant.mp.TenantEntity; + +import java.io.Serializable; +import java.math.BigDecimal; + + +@Data +@TableName("hzims_fill_use") +@ApiModel(value="UseEntity", description="保存用电量填报数据对象") +public class UseEntity extends TenantEntity implements Serializable { + + @ApiModelProperty("站点编号") + private String stationCode; + + @ApiModelProperty("站点名称") + private String stationName; + + @ApiModelProperty("发电量") + private BigDecimal use; + + @ApiModelProperty("填报月份") + private String fillDate; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/GenerateVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/GenerateVo.java new file mode 100644 index 0000000..b15e955 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/GenerateVo.java @@ -0,0 +1,18 @@ +package com.hnac.hzims.operational.fill.vo; + +import com.hnac.hzims.operational.fill.entity.GenerateEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author ysj + * @date 2023/04/10 11:30:33 + * @version 4.0.0 + */ +@Data +public class GenerateVo extends GenerateEntity { + + @ApiModelProperty("用户名称") + private String userName; + +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/NotInsertPowerVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/NotInsertPowerVo.java deleted file mode 100644 index ccf8697..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/NotInsertPowerVo.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.hnac.hzims.operational.fill.vo; - -import com.hnac.hzims.operational.fill.entity.NotInsertPowerEntity; -import com.hnac.hzims.operational.fill.entity.OverEntity; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author ysj - * @date 2023/03/17 14:34:12 - * @version 4.0.0 - */ -@Data -public class NotInsertPowerVo extends NotInsertPowerEntity { - - @ApiModelProperty("用户名称") - private String userName; - -} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/NotInsertUseVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/NotInsertUseVo.java deleted file mode 100644 index 2c7c563..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/NotInsertUseVo.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.hnac.hzims.operational.fill.vo; - -import com.hnac.hzims.operational.fill.entity.NotInsertUseEntity; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author ysj - * @date 2023/03/17 14:34:12 - * @version 4.0.0 - */ -@Data -public class NotInsertUseVo extends NotInsertUseEntity { - - @ApiModelProperty("用户名称") - private String userName; - -} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/UseVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/UseVo.java new file mode 100644 index 0000000..c777be4 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/UseVo.java @@ -0,0 +1,18 @@ +package com.hnac.hzims.operational.fill.vo; + +import com.hnac.hzims.operational.fill.entity.UseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author ysj + * @date 2023/04/10 11:30:33 + * @version 4.0.0 + */ +@Data +public class UseVo extends UseEntity { + + @ApiModelProperty("用户名称") + private String userName; + +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEntity.java index 91ddda9..a00021f 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEntity.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEntity.java @@ -59,7 +59,11 @@ public class StationEntity extends TenantEntity implements Serializable { @JsonSerialize(nullsUsing = NullSerializer.class) private Long refDept; - @ApiModelProperty("数据来源") + @ApiModelProperty("数据来源: 0 - 数据采集 1 - 数据填报") + @QueryField(condition = SqlCondition.EQUAL) + private String dataOrigin; + + @ApiModelProperty("数据采集方式") @QueryField(condition = SqlCondition.EQUAL) private String dataSource; @@ -147,7 +151,4 @@ public class StationEntity extends TenantEntity implements Serializable { @ApiModelProperty("实时画面绑定账号秘钥") private String secretKey; - - @ApiModelProperty("光伏站点配置类型: 0-个体光伏站 1-厂房光伏站") - private Long photovoltaicType; } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/GenerateController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/GenerateController.java new file mode 100644 index 0000000..ea2e873 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/GenerateController.java @@ -0,0 +1,65 @@ +package com.hnac.hzims.operational.fill.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.operational.fill.entity.GenerateEntity; +import com.hnac.hzims.operational.fill.service.GenerateService; +import com.hnac.hzims.operational.fill.vo.GenerateVo; +import com.hnac.hzims.operational.fill.vo.QueryVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.log.annotation.ApiLog; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; + + +/** + * @author ysj + * @date 2023/04/10 11:16:07 + * @version 4.0.0 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/generate") +@Api(value = "发电量填报", tags = "发电量填报") +public class GenerateController extends BladeController { + + private final GenerateService service; + + /** + * 新增 + */ + @PostMapping("/saveOrUpdate") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "新增", notes = "传入InsertPowerEntity对象") + public R saveOrUpdate(@RequestBody GenerateEntity entity) { + return R.status(service.saveUpdate(entity)); + } + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "逻辑删除", notes = "传入id字符串以逗号分隔") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(service.deleteLogic(Func.toLongList(ids))); + } + + /** + * 分页 + */ + @ApiLog + @GetMapping("/list") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "分页", notes = "查询条件::startTime,endTime,stationCode") + public R> list(QueryVo filter, Query query) { + return service.pageCondition(filter, query); + } + +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/InsertPowerController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/InsertPowerController.java deleted file mode 100644 index f9ecfb7..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/InsertPowerController.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.hnac.hzims.operational.fill.controller; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import com.hnac.hzims.operational.fill.entity.InsertPowerEntity; -import com.hnac.hzims.operational.fill.entity.OtherEntity; -import com.hnac.hzims.operational.fill.service.InsertPowerService; -import com.hnac.hzims.operational.fill.service.OtherService; -import com.hnac.hzims.operational.fill.vo.OtherVo; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import lombok.AllArgsConstructor; -import org.springblade.core.boot.ctrl.BladeController; -import org.springblade.core.mp.support.Query; -import org.springblade.core.tool.api.R; -import org.springblade.core.tool.utils.Func; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; - -/** - * @author ysj - * @date 2023/03/09 16:12:22 - * @version 4.0.0 - */ -@RestController -@AllArgsConstructor -@RequestMapping("/insert/power") -@Api(value = "电站填报", tags = "接入电站发电量填报") -public class InsertPowerController extends BladeController { - - private final InsertPowerService service; - - /** - * 新增 - */ - @PostMapping("/save") - @ApiOperationSupport(order = 1) - @ApiOperation(value = "新增", notes = "传入InsertPowerEntity对象") - public R save(@RequestBody InsertPowerEntity entity) { - return R.status(service.save(entity)); - } - - /** - * 删除 - */ - @PostMapping("/remove") - @ApiOperationSupport(order = 2) - @ApiOperation(value = "逻辑删除", notes = "传入id字符串以逗号分隔") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { - return R.status(service.deleteLogic(Func.toLongList(ids))); - } - - /** - * 修改 - */ - @PostMapping("/update") - @ApiOperationSupport(order = 3) - @ApiOperation(value = "修改") - public R update(@Valid @RequestBody InsertPowerEntity entity) { - return R.status(service.updateById(entity)); - } - - /** - * 分页 - *//* - @GetMapping("/list") - @ApiOperationSupport(order = 4) - @ApiOperation(value = "分页", notes = "查询条件:createDept,fileName,startTime,endTime") - public R> list(OtherVo vo, Query query) { - return service.pageCondition(vo, query); - }*/ -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/InsertUseController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/InsertUseController.java deleted file mode 100644 index 8138d3b..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/InsertUseController.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.hnac.hzims.operational.fill.controller; - -import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import com.hnac.hzims.operational.fill.entity.InsertPowerEntity; -import com.hnac.hzims.operational.fill.service.InsertPowerService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import lombok.AllArgsConstructor; -import org.springblade.core.boot.ctrl.BladeController; -import org.springblade.core.tool.api.R; -import org.springblade.core.tool.utils.Func; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; - -/** - * @author ysj - * @date 2023/03/09 16:12:22 - * @version 4.0.0 - */ -@RestController -@AllArgsConstructor -@RequestMapping("/insert/use") -@Api(value = "泵站用电量填报", tags = "接入泵站用电量填报") -public class InsertUseController extends BladeController { - - private final InsertPowerService service; - - /** - * 新增 - */ - @PostMapping("/save") - @ApiOperationSupport(order = 1) - @ApiOperation(value = "新增", notes = "传入InsertPowerEntity对象") - public R save(@RequestBody InsertPowerEntity entity) { - return R.status(service.save(entity)); - } - - /** - * 删除 - */ - @PostMapping("/remove") - @ApiOperationSupport(order = 2) - @ApiOperation(value = "逻辑删除", notes = "传入id字符串以逗号分隔") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { - return R.status(service.deleteLogic(Func.toLongList(ids))); - } - - /** - * 修改 - */ - @PostMapping("/update") - @ApiOperationSupport(order = 3) - @ApiOperation(value = "修改") - public R update(@Valid @RequestBody InsertPowerEntity entity) { - return R.status(service.updateById(entity)); - } - - /** - * 分页 - *//* - @GetMapping("/list") - @ApiOperationSupport(order = 4) - @ApiOperation(value = "分页", notes = "查询条件:createDept,fileName,startTime,endTime") - public R> list(OtherVo vo, Query query) { - return service.pageCondition(vo, query); - }*/ -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/NotInsertPowerController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/NotInsertPowerController.java deleted file mode 100644 index c19f8a3..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/NotInsertPowerController.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.hnac.hzims.operational.fill.controller; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import com.hnac.hzims.operational.fill.entity.NotInsertPowerEntity; -import com.hnac.hzims.operational.fill.entity.RainfallEntity; -import com.hnac.hzims.operational.fill.service.NotInsertPowerService; -import com.hnac.hzims.operational.fill.vo.NotInsertPowerVo; -import com.hnac.hzims.operational.fill.vo.QueryVo; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import lombok.AllArgsConstructor; -import org.springblade.core.boot.ctrl.BladeController; -import org.springblade.core.log.annotation.ApiLog; -import org.springblade.core.mp.support.Query; -import org.springblade.core.tool.api.R; -import org.springblade.core.tool.utils.Func; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; - -/** - * @author ysj - * @date 2023/03/09 16:12:22 - * @version 4.0.0 - */ -@RestController -@AllArgsConstructor -@RequestMapping("/notInsert/power") -@Api(value = "水电站发电量填报", tags = "未接入电站历史发电量填报") -public class NotInsertPowerController extends BladeController { - - private final NotInsertPowerService service; - - /** - * 新增 - */ - @PostMapping("/saveOrUpdate") - @ApiOperationSupport(order = 1) - @ApiOperation(value = "新增", notes = "传入InsertPowerEntity对象") - public R saveOrUpdate(@RequestBody NotInsertPowerEntity entity) { - return R.status(service.saveUpdate(entity)); - } - - /** - * 删除 - */ - @PostMapping("/remove") - @ApiOperationSupport(order = 2) - @ApiOperation(value = "逻辑删除", notes = "传入id字符串以逗号分隔") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { - return R.status(service.deleteLogic(Func.toLongList(ids))); - } - - /** - * 分页 - */ - @ApiLog - @GetMapping("/list") - @ApiOperationSupport(order = 4) - @ApiOperation(value = "分页", notes = "查询条件::startTime,endTime,stationCode") - public R> list(QueryVo filter, Query query) { - return service.pageCondition(filter, query); - } -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/NotInsertUseController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/NotInsertUseController.java deleted file mode 100644 index 4e0615c..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/NotInsertUseController.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.hnac.hzims.operational.fill.controller; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import com.hnac.hzims.operational.fill.entity.NotInsertUseEntity; -import com.hnac.hzims.operational.fill.entity.RainfallEntity; -import com.hnac.hzims.operational.fill.service.NotInsertUseService; -import com.hnac.hzims.operational.fill.vo.NotInsertUseVo; -import com.hnac.hzims.operational.fill.vo.QueryVo; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import lombok.AllArgsConstructor; -import org.springblade.core.boot.ctrl.BladeController; -import org.springblade.core.log.annotation.ApiLog; -import org.springblade.core.mp.support.Query; -import org.springblade.core.tool.api.R; -import org.springblade.core.tool.utils.Func; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; - -/** - * @author ysj - * @date 2023/03/09 16:12:22 - * @version 4.0.0 - */ -@RestController -@AllArgsConstructor -@RequestMapping("/notInsert/use") -@Api(value = "泵站用电量填报", tags = "未接入泵站历史用电量填报") -public class NotInsertUseController extends BladeController { - - private final NotInsertUseService service; - - /** - * 新增 - */ - @PostMapping("/saveOrUpdate") - @ApiOperationSupport(order = 1) - @ApiOperation(value = "新增", notes = "传入InsertPowerEntity对象") - public R saveOrUpdate(@RequestBody NotInsertUseEntity entity) { - return R.status(service.saveUpdate(entity)); - } - - /** - * 删除 - */ - @PostMapping("/remove") - @ApiOperationSupport(order = 2) - @ApiOperation(value = "逻辑删除", notes = "传入id字符串以逗号分隔") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { - return R.status(service.deleteLogic(Func.toLongList(ids))); - } - - /** - * 分页 - */ - @ApiLog - @GetMapping("/list") - @ApiOperationSupport(order = 4) - @ApiOperation(value = "分页", notes = "查询条件::startTime,endTime,stationCode") - public R> list(QueryVo filter, Query query) { - return service.pageCondition(filter, query); - } -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/UseController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/UseController.java new file mode 100644 index 0000000..d8ab1c0 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/UseController.java @@ -0,0 +1,64 @@ +package com.hnac.hzims.operational.fill.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.operational.fill.entity.UseEntity; +import com.hnac.hzims.operational.fill.service.UseService; +import com.hnac.hzims.operational.fill.vo.QueryVo; +import com.hnac.hzims.operational.fill.vo.UseVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.log.annotation.ApiLog; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; + +/** + * @author ysj + * @date 2023/04/10 11:16:07 + * @version 4.0.0 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/use") +@Api(value = "用电量填报", tags = "用电量填报") +public class UseController extends BladeController { + + private final UseService service; + + /** + * 新增 + */ + @PostMapping("/saveOrUpdate") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "新增", notes = "传入InsertPowerEntity对象") + public R saveOrUpdate(@RequestBody UseEntity entity) { + return R.status(service.saveUpdate(entity)); + } + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "逻辑删除", notes = "传入id字符串以逗号分隔") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(service.deleteLogic(Func.toLongList(ids))); + } + + /** + * 分页 + */ + @ApiLog + @GetMapping("/list") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "分页", notes = "查询条件::startTime,endTime,stationCode") + public R> list(QueryVo filter, Query query) { + return service.pageCondition(filter, query); + } + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/GenerateMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/GenerateMapper.java new file mode 100644 index 0000000..c7c9905 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/GenerateMapper.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.operational.fill.mapper; + +import com.hnac.hzims.operational.fill.entity.GenerateEntity; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; + +/** + * @author ysj + * @date 2023/04/10 11:22:14 + * @version 4.0.0 + */ +public interface GenerateMapper extends UserDataScopeBaseMapper { + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/GenerateMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/GenerateMapper.xml new file mode 100644 index 0000000..d937e42 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/GenerateMapper.xml @@ -0,0 +1,4 @@ + + + + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/InsertPowerMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/InsertPowerMapper.java deleted file mode 100644 index cdfbda1..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/InsertPowerMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hnac.hzims.operational.fill.mapper; - -import com.hnac.hzims.operational.fill.entity.InsertPowerEntity; -import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; - -/** - * @author ysj - * @date 2023/03/09 16:12:22 - * @version 4.0.0 - */ -public interface InsertPowerMapper extends UserDataScopeBaseMapper { - -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/InsertPowerMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/InsertPowerMapper.xml deleted file mode 100644 index 16bdc6f..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/InsertPowerMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/InsertUseMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/InsertUseMapper.java deleted file mode 100644 index 347d75b..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/InsertUseMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hnac.hzims.operational.fill.mapper; - -import com.hnac.hzims.operational.fill.entity.InsertUseEntity; -import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; - -/** - * @author ysj - * @date 2023/03/09 16:12:22 - * @version 4.0.0 - */ -public interface InsertUseMapper extends UserDataScopeBaseMapper { - -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/InsertUseMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/InsertUseMapper.xml deleted file mode 100644 index b325207..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/InsertUseMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/NotInsertPowerMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/NotInsertPowerMapper.java deleted file mode 100644 index 97f39f0..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/NotInsertPowerMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hnac.hzims.operational.fill.mapper; - -import com.hnac.hzims.operational.fill.entity.NotInsertPowerEntity; -import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; - -/** - * @author ysj - * @date 2023/03/09 16:12:22 - * @version 4.0.0 - */ -public interface NotInsertPowerMapper extends UserDataScopeBaseMapper { - -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/NotInsertPowerMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/NotInsertPowerMapper.xml deleted file mode 100644 index 9b9758d..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/NotInsertPowerMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/NotInsertUseMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/NotInsertUseMapper.java deleted file mode 100644 index 876157c..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/NotInsertUseMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hnac.hzims.operational.fill.mapper; - -import com.hnac.hzims.operational.fill.entity.NotInsertUseEntity; -import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; - -/** - * @author ysj - * @date 2023/03/09 16:12:22 - * @version 4.0.0 - */ -public interface NotInsertUseMapper extends UserDataScopeBaseMapper { - -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/NotInsertUseMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/NotInsertUseMapper.xml deleted file mode 100644 index b5062bb..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/NotInsertUseMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/UseMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/UseMapper.java new file mode 100644 index 0000000..44f4a8b --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/UseMapper.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.operational.fill.mapper; + +import com.hnac.hzims.operational.fill.entity.UseEntity; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; + +/** + * @author ysj + * @date 2023/04/10 11:22:14 + * @version 4.0.0 + */ +public interface UseMapper extends UserDataScopeBaseMapper { + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/UseMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/UseMapper.xml new file mode 100644 index 0000000..e395e3b --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/UseMapper.xml @@ -0,0 +1,4 @@ + + + + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/GenerateService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/GenerateService.java new file mode 100644 index 0000000..0bd1f45 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/GenerateService.java @@ -0,0 +1,25 @@ +package com.hnac.hzims.operational.fill.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.operational.fill.entity.GenerateEntity; +import com.hnac.hzims.operational.fill.entity.RainfallEntity; +import com.hnac.hzims.operational.fill.vo.GenerateVo; +import com.hnac.hzims.operational.fill.vo.QueryVo; +import com.hnac.hzims.operational.fill.vo.RainfallVo; +import org.springblade.core.mp.base.BaseService; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; + +/** + * @author ysj + * @date 2023/04/10 11:16:07 + * @version 4.0.0 + */ +public interface GenerateService extends BaseService { + + // 分页查询发电量填报数据 + R> pageCondition(QueryVo filter, Query query); + + // 新增/修改发电量填报数据 + boolean saveUpdate(GenerateEntity entity); +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/InsertPowerService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/InsertPowerService.java deleted file mode 100644 index a2a8729..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/InsertPowerService.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.hnac.hzims.operational.fill.service; - -import com.hnac.hzims.operational.fill.entity.InsertPowerEntity; -import org.springblade.core.mp.base.BaseService; - -/** - * @author ysj - * @date 2023/03/09 16:12:22 - * @version 4.0.0 - */ -/** - * 接入电站历史发电量填报 - */ -public interface InsertPowerService extends BaseService { - - -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/InsertUseService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/InsertUseService.java deleted file mode 100644 index 95fd0c3..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/InsertUseService.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.hnac.hzims.operational.fill.service; - -import com.hnac.hzims.operational.fill.entity.InsertUseEntity; -import org.springblade.core.mp.base.BaseService; - -/** - * @author ysj - * @date 2023/03/09 16:12:22 - * @version 4.0.0 - */ - -/** - * 接入电站历史发电量填报 - */ -public interface InsertUseService extends BaseService { - - -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/NotInsertPowerService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/NotInsertPowerService.java deleted file mode 100644 index a126cf8..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/NotInsertPowerService.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.hnac.hzims.operational.fill.service; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.hnac.hzims.operational.fill.entity.InsertPowerEntity; -import com.hnac.hzims.operational.fill.entity.NotInsertPowerEntity; -import com.hnac.hzims.operational.fill.vo.NotInsertPowerVo; -import com.hnac.hzims.operational.fill.vo.QueryVo; -import org.springblade.core.mp.base.BaseService; -import org.springblade.core.mp.support.Query; -import org.springblade.core.tool.api.R; - -/** - * @author ysj - * @date 2023/03/09 16:12:22 - * @version 4.0.0 - */ - -/** - * 接入电站历史发电量填报 - */ -public interface NotInsertPowerService extends BaseService { - - - // 新增/修改未接入电站发电量填报数据 - boolean saveUpdate(NotInsertPowerEntity entity); - - // 分页查询未接入电站发电量填报数据 - R> pageCondition(QueryVo filter, Query query); -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/NotInsertUseService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/NotInsertUseService.java deleted file mode 100644 index 5a52b35..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/NotInsertUseService.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.hnac.hzims.operational.fill.service; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.hnac.hzims.operational.fill.entity.NotInsertUseEntity; -import com.hnac.hzims.operational.fill.vo.NotInsertUseVo; -import com.hnac.hzims.operational.fill.vo.QueryVo; -import org.springblade.core.mp.base.BaseService; -import org.springblade.core.mp.support.Query; -import org.springblade.core.tool.api.R; - -/** - * @author ysj - * @date 2023/03/09 16:12:22 - * @version 4.0.0 - */ - -/** - * 接入电站历史发电量填报 - */ -public interface NotInsertUseService extends BaseService { - - // 新增/修改未接入泵站用电量填报数据 - boolean saveUpdate(NotInsertUseEntity entity); - - // 分页查询未接入泵站用电量填报数据 - R> pageCondition(QueryVo filter, Query query); -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/UseService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/UseService.java new file mode 100644 index 0000000..e25c60e --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/UseService.java @@ -0,0 +1,23 @@ +package com.hnac.hzims.operational.fill.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.operational.fill.entity.UseEntity; +import com.hnac.hzims.operational.fill.vo.QueryVo; +import com.hnac.hzims.operational.fill.vo.UseVo; +import org.springblade.core.mp.base.BaseService; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; + +/** + * @author ysj + * @date 2023/04/10 11:16:07 + * @version 4.0.0 + */ +public interface UseService extends BaseService { + + // 分页查询用电量填报数据 + R> pageCondition(QueryVo filter, Query query); + + // 新增/修改用电量填报数据 + boolean saveUpdate(UseEntity entity); +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java new file mode 100644 index 0000000..1d1e2ae --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java @@ -0,0 +1,81 @@ +package com.hnac.hzims.operational.fill.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.operational.fill.entity.GenerateEntity; +import com.hnac.hzims.operational.fill.mapper.GenerateMapper; +import com.hnac.hzims.operational.fill.service.GenerateService; +import com.hnac.hzims.operational.fill.vo.GenerateVo; +import com.hnac.hzims.operational.fill.vo.QueryVo; +import com.hnac.hzims.operational.fill.wrapper.GenerateWrapper; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.ObjectUtil; +import org.springblade.core.tool.utils.StringUtil; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author ysj + * @date 2023/04/10 11:16:07 + * @version 4.0.0 + */ +@Slf4j +@Service +@AllArgsConstructor +public class GenerateServiceImpl extends BaseServiceImpl implements GenerateService { + + /** + * 分页查询发电量填报数据 + * @param filter + * @param query + * @return + */ + @Override + public R> pageCondition(QueryVo filter, Query query) { + QueryWrapper queryWrapper = new QueryWrapper() {{ + if(!StringUtil.isEmpty(filter.getStationCode())){ + eq("STATION_CODE",filter.getStationCode()); + } + if(!ObjectUtil.isEmpty(filter.getStartTime())){ + ge("FILL_DATE",filter.getStartTime()); + } + if(!ObjectUtil.isEmpty(filter.getEndTime())){ + le("FILL_DATE",filter.getEndTime()); + } + orderByDesc("create_time"); + }}; + IPage pages = super.page(Condition.getPage(query), queryWrapper); + List list = GenerateWrapper.build().listVO(pages.getRecords()); + return R.data(pages.setRecords(list)); + } + + /** + * 新增/修改发电量填报数据 + * @param entity + * @return + */ + @Override + public boolean saveUpdate(GenerateEntity entity) { + // 查询是否存在历史记录 + GenerateEntity history = this.getOne(new LambdaQueryWrapper(){{ + eq(GenerateEntity::getStationCode, entity.getStationCode()); + eq(GenerateEntity::getFillDate,entity.getFillDate()); + }}); + if(ObjectUtil.isNotEmpty(history) && (ObjectUtil.isEmpty(entity.getId()) || !entity.getId().equals(history.getId()))){ + throw new ServiceException("日期已经存在填报数据!"); + } + if(ObjectUtil.isEmpty(history)){ + return this.save(entity); + } + return this.updateById(entity); + } + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/InsertPowerServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/InsertPowerServiceImpl.java deleted file mode 100644 index 11717d9..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/InsertPowerServiceImpl.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.hnac.hzims.operational.fill.service.impl; - -import com.hnac.hzims.operational.fill.entity.InsertPowerEntity; -import com.hnac.hzims.operational.fill.mapper.InsertPowerMapper; -import com.hnac.hzims.operational.fill.service.InsertPowerService; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springblade.core.mp.base.BaseServiceImpl; -import org.springframework.stereotype.Service; - -/** - * @author ysj - * @date 2023/03/09 16:12:22 - * @version 4.0.0 - */ -@Slf4j -@Service -@AllArgsConstructor -public class InsertPowerServiceImpl extends BaseServiceImpl implements InsertPowerService { - - -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/InsertUseServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/InsertUseServiceImpl.java deleted file mode 100644 index 0a079c7..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/InsertUseServiceImpl.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.hnac.hzims.operational.fill.service.impl; - -import com.hnac.hzims.operational.fill.entity.InsertUseEntity; -import com.hnac.hzims.operational.fill.mapper.InsertUseMapper; -import com.hnac.hzims.operational.fill.service.InsertUseService; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springblade.core.mp.base.BaseServiceImpl; -import org.springframework.stereotype.Service; - -/** - * @author ysj - * @date 2023/03/09 16:12:22 - * @version 4.0.0 - */ -@Slf4j -@Service -@AllArgsConstructor -public class InsertUseServiceImpl extends BaseServiceImpl implements InsertUseService { - - -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/NotInsertPowerServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/NotInsertPowerServiceImpl.java deleted file mode 100644 index 690f29b..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/NotInsertPowerServiceImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.hnac.hzims.operational.fill.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.hnac.hzims.operational.fill.entity.NotInsertPowerEntity; -import com.hnac.hzims.operational.fill.entity.RainfallEntity; -import com.hnac.hzims.operational.fill.mapper.NotInsertPowerMapper; -import com.hnac.hzims.operational.fill.service.NotInsertPowerService; -import com.hnac.hzims.operational.fill.vo.NotInsertPowerVo; -import com.hnac.hzims.operational.fill.vo.QueryVo; -import com.hnac.hzims.operational.fill.wrapper.NotInsertPowerWrapper; -import com.hnac.hzims.operational.fill.wrapper.OverWrapper; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springblade.core.log.exception.ServiceException; -import org.springblade.core.mp.base.BaseServiceImpl; -import org.springblade.core.mp.support.Condition; -import org.springblade.core.mp.support.Query; -import org.springblade.core.tool.api.R; -import org.springblade.core.tool.utils.ObjectUtil; -import org.springblade.core.tool.utils.StringUtil; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * @author ysj - * @date 2023/03/09 16:12:22 - * @version 4.0.0 - */ -@Slf4j -@Service -@AllArgsConstructor -public class NotInsertPowerServiceImpl extends BaseServiceImpl implements NotInsertPowerService { - - /** - * 分页查询未接入电站发电量填报数据 - * @param filter - * @param query - * @return - */ - @Override - public R> pageCondition(QueryVo filter, Query query) { - QueryWrapper queryWrapper = new QueryWrapper() {{ - if(!StringUtil.isEmpty(filter.getStationCode())){ - eq("STATION_CODE",filter.getStationCode()); - } - if(!ObjectUtil.isEmpty(filter.getStartTime())){ - ge("FILL_DATE",filter.getStartTime()); - } - if(!ObjectUtil.isEmpty(filter.getEndTime())){ - le("FILL_DATE",filter.getEndTime()); - } - orderByDesc("create_time"); - }}; - IPage pages = super.page(Condition.getPage(query), queryWrapper); - List list = NotInsertPowerWrapper.build().listVO(pages.getRecords()); - return R.data(pages.setRecords(list)); - } - - /** - * 新增/修改未接入电站发电量填报数据 - * @param entity - * @return - */ - @Override - public boolean saveUpdate(NotInsertPowerEntity entity) { - // 查询是否存在历史记录 - NotInsertPowerEntity history = this.getOne(new LambdaQueryWrapper(){{ - eq(NotInsertPowerEntity::getStationCode, entity.getStationCode()); - eq(NotInsertPowerEntity::getFillDate,entity.getFillDate()); - }}); - if(ObjectUtil.isNotEmpty(history) && (ObjectUtil.isEmpty(entity.getId()) || !entity.getId().equals(history.getId()))){ - throw new ServiceException("日期已经存在填报数据!"); - } - if(ObjectUtil.isEmpty(history)){ - return this.save(entity); - } - return this.updateById(entity); - } -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/NotInsertUseServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/NotInsertUseServiceImpl.java deleted file mode 100644 index d9584e6..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/NotInsertUseServiceImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.hnac.hzims.operational.fill.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.hnac.hzims.operational.fill.entity.NotInsertUseEntity; -import com.hnac.hzims.operational.fill.entity.RainfallEntity; -import com.hnac.hzims.operational.fill.mapper.NotInsertUseMapper; -import com.hnac.hzims.operational.fill.service.NotInsertUseService; -import com.hnac.hzims.operational.fill.vo.NotInsertUseVo; -import com.hnac.hzims.operational.fill.vo.QueryVo; -import com.hnac.hzims.operational.fill.wrapper.NotInsertPowerWrapper; -import com.hnac.hzims.operational.fill.wrapper.NotInsertUseWrapper; -import com.hnac.hzims.operational.fill.wrapper.OverWrapper; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springblade.core.log.exception.ServiceException; -import org.springblade.core.mp.base.BaseServiceImpl; -import org.springblade.core.mp.support.Condition; -import org.springblade.core.mp.support.Query; -import org.springblade.core.tool.api.R; -import org.springblade.core.tool.utils.ObjectUtil; -import org.springblade.core.tool.utils.StringUtil; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * @author ysj - * @date 2023/03/09 16:12:22 - * @version 4.0.0 - */ -@Slf4j -@Service -@AllArgsConstructor -public class NotInsertUseServiceImpl extends BaseServiceImpl implements NotInsertUseService { - - - /** - * 分页查询未接入泵站用电量填报数据 - * @param filter - * @param query - * @return - */ - @Override - public R> pageCondition(QueryVo filter, Query query) { - QueryWrapper queryWrapper = new QueryWrapper() {{ - if(!StringUtil.isEmpty(filter.getStationCode())){ - eq("STATION_CODE",filter.getStationCode()); - } - if(!ObjectUtil.isEmpty(filter.getStartTime())){ - ge("FILL_DATE",filter.getStartTime()); - } - if(!ObjectUtil.isEmpty(filter.getEndTime())){ - le("FILL_DATE",filter.getEndTime()); - } - orderByDesc("create_time"); - }}; - IPage pages = super.page(Condition.getPage(query), queryWrapper); - List list = NotInsertUseWrapper.build().listVO(pages.getRecords()); - return R.data(pages.setRecords(list)); - } - - /** - * 新增/修改未接入泵站用电量填报数据 - * @param entity - * @return - */ - @Override - public boolean saveUpdate(NotInsertUseEntity entity) { - // 查询是否存在历史记录 - NotInsertUseEntity history = this.getOne(new LambdaQueryWrapper(){{ - eq(NotInsertUseEntity::getStationCode, entity.getStationCode()); - eq(NotInsertUseEntity::getFillDate,entity.getFillDate()); - }}); - if(ObjectUtil.isNotEmpty(history) && (ObjectUtil.isEmpty(entity.getId()) || !entity.getId().equals(history.getId()))){ - throw new ServiceException("日期已经存在填报数据!"); - } - if(ObjectUtil.isEmpty(history)){ - return this.save(entity); - } - return this.updateById(entity); - } -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/UseServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/UseServiceImpl.java new file mode 100644 index 0000000..5093822 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/UseServiceImpl.java @@ -0,0 +1,81 @@ +package com.hnac.hzims.operational.fill.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.operational.fill.entity.UseEntity; +import com.hnac.hzims.operational.fill.mapper.UseMapper; +import com.hnac.hzims.operational.fill.service.UseService; +import com.hnac.hzims.operational.fill.vo.QueryVo; +import com.hnac.hzims.operational.fill.vo.UseVo; +import com.hnac.hzims.operational.fill.wrapper.UseWrapper; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.ObjectUtil; +import org.springblade.core.tool.utils.StringUtil; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author ysj + * @date 2023/04/10 11:16:07 + * @version 4.0.0 + */ +@Slf4j +@Service +@AllArgsConstructor +public class UseServiceImpl extends BaseServiceImpl implements UseService { + + /** + * 分页查询用电量填报数据 + * @param filter + * @param query + * @return + */ + @Override + public R> pageCondition(QueryVo filter, Query query) { + QueryWrapper queryWrapper = new QueryWrapper() {{ + if(!StringUtil.isEmpty(filter.getStationCode())){ + eq("STATION_CODE",filter.getStationCode()); + } + if(!ObjectUtil.isEmpty(filter.getStartTime())){ + ge("FILL_DATE",filter.getStartTime()); + } + if(!ObjectUtil.isEmpty(filter.getEndTime())){ + le("FILL_DATE",filter.getEndTime()); + } + orderByDesc("create_time"); + }}; + IPage pages = super.page(Condition.getPage(query), queryWrapper); + List list = UseWrapper.build().listVO(pages.getRecords()); + return R.data(pages.setRecords(list)); + } + + /** + * 新增/修改用电量填报数据 + * @param entity + * @return + */ + @Override + public boolean saveUpdate(UseEntity entity) { + // 查询是否存在历史记录 + UseEntity history = this.getOne(new LambdaQueryWrapper(){{ + eq(UseEntity::getStationCode, entity.getStationCode()); + eq(UseEntity::getFillDate,entity.getFillDate()); + }}); + if(ObjectUtil.isNotEmpty(history) && (ObjectUtil.isEmpty(entity.getId()) || !entity.getId().equals(history.getId()))){ + throw new ServiceException("日期已经存在填报数据!"); + } + if(ObjectUtil.isEmpty(history)){ + return this.save(entity); + } + return this.updateById(entity); + } + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/GenerateWrapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/GenerateWrapper.java new file mode 100644 index 0000000..a61aaa7 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/GenerateWrapper.java @@ -0,0 +1,36 @@ +package com.hnac.hzims.operational.fill.wrapper; + +import com.hnac.hzims.operational.fill.entity.GenerateEntity; +import com.hnac.hzims.operational.fill.vo.GenerateVo; +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; +import org.springblade.core.tool.utils.ObjectUtil; +import org.springblade.system.user.cache.UserCache; +import org.springblade.system.user.entity.User; + +import java.util.Optional; + +/** + * @author ysj + * @date 2023/04/10 11:34:12 + * @version 4.0.0 + */ +public class GenerateWrapper extends BaseEntityWrapper { + + public static GenerateWrapper build() { + return new GenerateWrapper(); + } + + @Override + public GenerateVo entityVO(GenerateEntity entity) { + GenerateVo vo = BeanUtil.copy(entity, GenerateVo.class); + User createUser = UserCache.getUser(entity.getCreateUser()); + if(ObjectUtil.isEmpty(createUser)){ + return vo; + } + assert vo != null; + vo.setUserName(Optional.ofNullable(createUser.getName()).orElse(null)); + return vo; + } + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/NotInsertPowerWrapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/NotInsertPowerWrapper.java deleted file mode 100644 index 1dd60e9..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/NotInsertPowerWrapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.hnac.hzims.operational.fill.wrapper; - -import com.hnac.hzims.operational.fill.entity.NotInsertPowerEntity; -import com.hnac.hzims.operational.fill.vo.NotInsertPowerVo; -import com.hnac.hzims.operational.fill.vo.OverVo; -import org.springblade.core.mp.support.BaseEntityWrapper; -import org.springblade.core.tool.utils.BeanUtil; -import org.springblade.core.tool.utils.ObjectUtil; -import org.springblade.system.user.cache.UserCache; -import org.springblade.system.user.entity.User; - -import java.util.Optional; - -/** - * @author ysj - * @date 2023/03/17 14:34:12 - * @version 4.0.0 - */ -public class NotInsertPowerWrapper extends BaseEntityWrapper { - - public static NotInsertPowerWrapper build() { - return new NotInsertPowerWrapper(); - } - - @Override - public NotInsertPowerVo entityVO(NotInsertPowerEntity entity) { - NotInsertPowerVo vo = BeanUtil.copy(entity, NotInsertPowerVo.class); - User createUser = UserCache.getUser(entity.getCreateUser()); - if(ObjectUtil.isEmpty(createUser)){ - return vo; - } - assert vo != null; - vo.setUserName(Optional.ofNullable(createUser.getName()).orElse(null)); - return vo; - } - -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/NotInsertUseWrapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/NotInsertUseWrapper.java deleted file mode 100644 index deb7598..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/NotInsertUseWrapper.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.hnac.hzims.operational.fill.wrapper; - -import com.hnac.hzims.operational.fill.entity.NotInsertUseEntity; -import com.hnac.hzims.operational.fill.vo.NotInsertUseVo; -import org.springblade.core.mp.support.BaseEntityWrapper; -import org.springblade.core.tool.utils.BeanUtil; -import org.springblade.core.tool.utils.ObjectUtil; -import org.springblade.system.user.cache.UserCache; -import org.springblade.system.user.entity.User; - -import java.util.Optional; - -/** - * @author ysj - * @date 2023/03/17 14:34:12 - * @version 4.0.0 - */ -public class NotInsertUseWrapper extends BaseEntityWrapper { - - public static NotInsertUseWrapper build() { - return new NotInsertUseWrapper(); - } - - @Override - public NotInsertUseVo entityVO(NotInsertUseEntity entity) { - NotInsertUseVo vo = BeanUtil.copy(entity, NotInsertUseVo.class); - User createUser = UserCache.getUser(entity.getCreateUser()); - if(ObjectUtil.isEmpty(createUser)){ - return vo; - } - assert vo != null; - vo.setUserName(Optional.ofNullable(createUser.getName()).orElse(null)); - return vo; - } - -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/UseWrapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/UseWrapper.java new file mode 100644 index 0000000..d8f53b6 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/UseWrapper.java @@ -0,0 +1,36 @@ +package com.hnac.hzims.operational.fill.wrapper; + +import com.hnac.hzims.operational.fill.entity.UseEntity; +import com.hnac.hzims.operational.fill.vo.UseVo; +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; +import org.springblade.core.tool.utils.ObjectUtil; +import org.springblade.system.user.cache.UserCache; +import org.springblade.system.user.entity.User; + +import java.util.Optional; + +/** + * @author ysj + * @date 2023/04/10 11:34:12 + * @version 4.0.0 + */ +public class UseWrapper extends BaseEntityWrapper { + + public static UseWrapper build() { + return new UseWrapper(); + } + + @Override + public UseVo entityVO(UseEntity entity) { + UseVo vo = BeanUtil.copy(entity, UseVo.class); + User createUser = UserCache.getUser(entity.getCreateUser()); + if(ObjectUtil.isEmpty(createUser)){ + return vo; + } + assert vo != null; + vo.setUserName(Optional.ofNullable(createUser.getName()).orElse(null)); + return vo; + } + +} From 58bb1aae5fea7dd05f31299a97e7d62e7a8d8bff Mon Sep 17 00:00:00 2001 From: yang_shj Date: Mon, 10 Apr 2023 13:38:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?#=E7=AB=99=E7=82=B9=E5=A1=AB=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hnac/hzims/operational/main/vo/PhotovoltaicSubordinateVo.java | 3 --- .../hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java | 4 ---- 2 files changed, 7 deletions(-) diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/PhotovoltaicSubordinateVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/PhotovoltaicSubordinateVo.java index 4dd253a..cec6fd2 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/PhotovoltaicSubordinateVo.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/PhotovoltaicSubordinateVo.java @@ -31,9 +31,6 @@ public class PhotovoltaicSubordinateVo { @ApiModelProperty(value = "地市名称") private String areaName; - @ApiModelProperty(value = "光伏站点类型:0-个体光伏站 1-厂房光伏站") - private Long type; - @ApiModelProperty("经度(东经)") @JsonSerialize(nullsUsing = NullSerializer.class) private Float lgtd; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java index b12c294..ff2ea0d 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java @@ -847,10 +847,6 @@ public class PhotovoltaicServiceImpl implements PhotovoltaicService { subordinate.setAreaName(R.getData().getName()); } } - // 站点类型 - if (HomePageConstant.STATION.equals(entry.getKey().getDeptCategory())) { - subordinate.setType(entry.getValue().get(0).getPhotovoltaicType()); - } // 获取实时天气 Map nowWeather = this.weatherService.getNowWeather(Collections.singletonList(station.getCode())); if (MapUtils.isNotEmpty(nowWeather)) {