diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmHandleVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmHandleVo.java index 6db5ac2..31816a9 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmHandleVo.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmHandleVo.java @@ -25,7 +25,7 @@ public class AlarmHandleVo{ @ApiModelProperty("告警时间") private Date alarmTime; - @ApiModelProperty("处理方式:0-处理 1-延后 2-误报") + @ApiModelProperty("处理方式:1-延后 2-误报 3-缺陷 4-检修") private Long handleWay; @ApiModelProperty("延后处理时间") diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/HandleQueryVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/HandleQueryVo.java new file mode 100644 index 0000000..6d25b47 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/HandleQueryVo.java @@ -0,0 +1,27 @@ +package com.hnac.hzims.operational.alert.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @author ysj + * @date 2023/03/17 10:02:33 + * @version 4.0.0 + */ +@Data +public class HandleQueryVo { + + @ApiModelProperty("处理人") + private Long handleUser; + + @ApiModelProperty("开始时间") + private Date startTime; + + @ApiModelProperty("结束时间") + private Date endTime; + + @ApiModelProperty("处理类型:0-处理 1-延后 2-误报") + private Long handleWay; +} 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 new file mode 100644 index 0000000..ccf8697 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/NotInsertPowerVo.java @@ -0,0 +1,19 @@ +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 new file mode 100644 index 0000000..2c7c563 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/NotInsertUseVo.java @@ -0,0 +1,18 @@ +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/RainfallVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/RainfallVo.java new file mode 100644 index 0000000..b380446 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/RainfallVo.java @@ -0,0 +1,18 @@ +package com.hnac.hzims.operational.fill.vo; + +import com.hnac.hzims.operational.fill.entity.RainfallEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author ysj + * @date 2023/03/17 14:34:12 + * @version 4.0.0 + */ +@Data +public class RainfallVo extends RainfallEntity { + + @ApiModelProperty("用户名称") + private String userName; + +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/StorageVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/StorageVo.java new file mode 100644 index 0000000..5314068 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/StorageVo.java @@ -0,0 +1,18 @@ +package com.hnac.hzims.operational.fill.vo; + +import com.hnac.hzims.operational.fill.entity.StorageEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author ysj + * @date 2023/03/17 14:34:12 + * @version 4.0.0 + */ +@Data +public class StorageVo extends StorageEntity { + + @ApiModelProperty("用户名称") + private String userName; + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/controller/AlarmHandleController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/controller/AlarmHandleController.java index 7d1764e..bf3612e 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/controller/AlarmHandleController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/controller/AlarmHandleController.java @@ -6,6 +6,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.operational.alert.entity.AlarmHandleEntity; import com.hnac.hzims.operational.alert.service.AlarmHandleService; import com.hnac.hzims.operational.alert.vo.AlarmHandleVo; +import com.hnac.hzims.operational.alert.vo.HandleQueryVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -50,8 +51,8 @@ public class AlarmHandleController extends BladeController { @GetMapping("/list") @ApiOperationSupport(order = 2) @ApiOperation(value = "分页", notes = "传入AlarmHandleEntity") - public R> list(AlarmHandleEntity entity, Query query) { - IPage pages = service.page(Condition.getPage(query), Condition.getQueryWrapper(entity)); + public R> list(HandleQueryVo param, Query query) { + IPage pages = service.pageCondition(query, param); return R.data(pages); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AlarmHandleMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AlarmHandleMapper.java index f6b2cb5..c3fb870 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AlarmHandleMapper.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AlarmHandleMapper.java @@ -1,6 +1,11 @@ package com.hnac.hzims.operational.alert.mapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.hnac.hzims.operational.alert.entity.AlarmHandleEntity; +import com.hnac.hzims.operational.alert.vo.AlarmHandleVo; +import com.hnac.hzims.operational.alert.vo.HandleQueryVo; +import org.apache.ibatis.annotations.Param; +import org.springblade.core.datascope.annotation.UserDataAuth; import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; /** @@ -10,4 +15,6 @@ import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; */ public interface AlarmHandleMapper extends UserDataScopeBaseMapper { + @UserDataAuth + IPage selectHandlePage(IPage page,@Param("param") HandleQueryVo param); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AlarmHandleMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AlarmHandleMapper.xml index 4811e4d..0c0f088 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AlarmHandleMapper.xml +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AlarmHandleMapper.xml @@ -3,4 +3,23 @@ + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/AlarmHandleService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/AlarmHandleService.java index 3e892dd..e5aa2ed 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/AlarmHandleService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/AlarmHandleService.java @@ -1,8 +1,11 @@ package com.hnac.hzims.operational.alert.service; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.hnac.hzims.operational.alert.entity.AlarmHandleEntity; import com.hnac.hzims.operational.alert.vo.AlarmHandleVo; +import com.hnac.hzims.operational.alert.vo.HandleQueryVo; import org.springblade.core.mp.base.BaseService; +import org.springblade.core.mp.support.Query; /** * @author ysj @@ -12,4 +15,6 @@ import org.springblade.core.mp.base.BaseService; public interface AlarmHandleService extends BaseService { boolean execute(AlarmHandleVo param); + + IPage pageCondition(Query query, HandleQueryVo param); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AlarmHandleServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AlarmHandleServiceImpl.java index db0f2d7..950d2ad 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AlarmHandleServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AlarmHandleServiceImpl.java @@ -1,16 +1,21 @@ package com.hnac.hzims.operational.alert.service.impl; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.hnac.hzims.operational.alert.constants.AbnormalAlarmConstant; import com.hnac.hzims.operational.alert.entity.AlarmHandleDetailEntity; import com.hnac.hzims.operational.alert.entity.AlarmHandleEntity; +import com.hnac.hzims.operational.alert.entity.HistoryAbnormalAlarmEntity; import com.hnac.hzims.operational.alert.mapper.AlarmHandleMapper; import com.hnac.hzims.operational.alert.service.AlarmHandleDetailService; import com.hnac.hzims.operational.alert.service.AlarmHandleService; import com.hnac.hzims.operational.alert.vo.AlarmHandleVo; +import com.hnac.hzims.operational.alert.vo.HandleQueryVo; import lombok.RequiredArgsConstructor; 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.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; @@ -46,4 +51,16 @@ public class AlarmHandleServiceImpl extends BaseServiceImpl pageCondition(Query query, HandleQueryVo param) { + IPage pages = this.baseMapper.selectHandlePage(Condition.getPage(query), param); + return pages; + } } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/StAlamRecordServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/StAlamRecordServiceImpl.java index 3d76b07..9dd6aff 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/StAlamRecordServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/StAlamRecordServiceImpl.java @@ -500,6 +500,7 @@ public class StAlamRecordServiceImpl extends BaseServiceImpl { * @param phenomenon * @return */ - boolean startCheck(OperPhenomenonEntity phenomenon); + OperPhenomenonEntity startCheck(OperPhenomenonEntity phenomenon); /** * 甄别缺陷 diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java index f8025da..0311a6d 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java @@ -84,14 +84,14 @@ public class DefectCheckServiceImpl extends BaseServiceImpl> list(QueryVo filter, Query query) { + 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 index 6680137..834e1bd 100644 --- 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 @@ -5,6 +5,7 @@ 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; @@ -57,7 +58,7 @@ public class NotInsertUseController extends BladeController { @GetMapping("/list") @ApiOperationSupport(order = 4) @ApiOperation(value = "分页", notes = "查询条件::startTime,endTime,stationCode") - public R> list(QueryVo filter, Query query) { + 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/RainfallController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/RainfallController.java index 1049856..f00b51a 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/RainfallController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/RainfallController.java @@ -1,6 +1,7 @@ package com.hnac.hzims.operational.fill.controller; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.operational.fill.vo.RainfallVo; import org.springblade.core.mp.support.Query; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.operational.fill.entity.RainfallEntity; @@ -56,7 +57,7 @@ public class RainfallController extends BladeController { @GetMapping("/list") @ApiOperationSupport(order = 4) @ApiOperation(value = "分页", notes = "查询条件::startTime,endTime,stationCode") - public R> list(QueryVo filter, Query query) { + 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/service/NotInsertPowerService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/NotInsertPowerService.java index 0bc1d25..a126cf8 100644 --- 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 @@ -3,6 +3,7 @@ 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; @@ -24,5 +25,5 @@ public interface NotInsertPowerService extends BaseService boolean saveUpdate(NotInsertPowerEntity entity); // 分页查询未接入电站发电量填报数据 - R> pageCondition(QueryVo filter, Query query); + 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 index b073c77..5a52b35 100644 --- 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 @@ -2,6 +2,7 @@ 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; @@ -22,5 +23,5 @@ public interface NotInsertUseService extends BaseService { boolean saveUpdate(NotInsertUseEntity entity); // 分页查询未接入泵站用电量填报数据 - R> pageCondition(QueryVo filter, Query query); + R> pageCondition(QueryVo filter, Query query); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/RainfallService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/RainfallService.java index 9d6e3dd..42bab3f 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/RainfallService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/RainfallService.java @@ -3,6 +3,7 @@ package com.hnac.hzims.operational.fill.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.hnac.hzims.operational.fill.entity.RainfallEntity; 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; @@ -19,7 +20,7 @@ import org.springblade.core.tool.api.R; public interface RainfallService extends BaseService { // 分页查询水利降雨量填报数据 - R> pageCondition(QueryVo filter, Query query); + R> pageCondition(QueryVo filter, Query query); // 新增/修改水利降雨量填报数据 boolean saveUpdate(RainfallEntity entity); 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 index 1198ed9..690f29b 100644 --- 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 @@ -7,7 +7,9 @@ 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; @@ -39,7 +41,7 @@ public class NotInsertPowerServiceImpl extends BaseServiceImpl> pageCondition(QueryVo filter, Query query) { + public R> pageCondition(QueryVo filter, Query query) { QueryWrapper queryWrapper = new QueryWrapper() {{ if(!StringUtil.isEmpty(filter.getStationCode())){ eq("STATION_CODE",filter.getStationCode()); @@ -53,7 +55,8 @@ public class NotInsertPowerServiceImpl extends BaseServiceImpl> pageCondition(QueryVo filter, Query query) { + public R> pageCondition(QueryVo filter, Query query) { QueryWrapper queryWrapper = new QueryWrapper() {{ if(!StringUtil.isEmpty(filter.getStationCode())){ eq("STATION_CODE",filter.getStationCode()); @@ -54,7 +57,8 @@ public class NotInsertUseServiceImpl extends BaseServiceImpl> pageCondition(QueryVo filter, Query query) { + public R> pageCondition(QueryVo filter, Query query) { QueryWrapper queryWrapper = new QueryWrapper() {{ if(!StringUtil.isEmpty(filter.getStationCode())){ eq("STATION_CODE",filter.getStationCode()); @@ -54,7 +57,8 @@ public class RainFallServiceImpl extends BaseServiceImpl { + + 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 new file mode 100644 index 0000000..deb7598 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/NotInsertUseWrapper.java @@ -0,0 +1,36 @@ +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/RainfallWrapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/RainfallWrapper.java new file mode 100644 index 0000000..fea7831 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/RainfallWrapper.java @@ -0,0 +1,36 @@ +package com.hnac.hzims.operational.fill.wrapper; + +import com.hnac.hzims.operational.fill.entity.RainfallEntity; +import com.hnac.hzims.operational.fill.vo.RainfallVo; +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 RainfallWrapper extends BaseEntityWrapper { + + public static RainfallWrapper build() { + return new RainfallWrapper(); + } + + @Override + public RainfallVo entityVO(RainfallEntity entity) { + RainfallVo vo = BeanUtil.copy(entity, RainfallVo.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/StorageWrapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/StorageWrapper.java new file mode 100644 index 0000000..d01f7a5 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/StorageWrapper.java @@ -0,0 +1,36 @@ +package com.hnac.hzims.operational.fill.wrapper; + +import com.hnac.hzims.operational.fill.entity.StorageEntity; +import com.hnac.hzims.operational.fill.vo.StorageVo; +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 StorageWrapper extends BaseEntityWrapper { + + public static StorageWrapper build() { + return new StorageWrapper(); + } + + @Override + public StorageVo entityVO(StorageEntity entity) { + StorageVo vo = BeanUtil.copy(entity, StorageVo.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/main/vo/SoeDataVo.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/vo/SoeDataVo.java index 1458173..8a48b10 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/vo/SoeDataVo.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/vo/SoeDataVo.java @@ -14,6 +14,9 @@ public class SoeDataVo extends SoeData { private int count; + @ApiModelProperty(value = "站点编号") + private String stationCode; + @ApiModelProperty(value = "站点名称") private String stationName; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java index 86b4426..3769fca 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java @@ -506,6 +506,8 @@ public class StationServiceImpl extends BaseServiceImpl types; if(ObjectUtil.isEmpty(type)){ types = HomePageConstant.types; + }else if(HomePageConstant.WATER_CONSERVANCY.equals(type)){ + types = HomePageConstant.waterList; }else{ types = Collections.singletonList(type); }