Browse Source

#告警处理

zhongwei
yang_shj 2 years ago
parent
commit
f1193f1cac
  1. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmHandleVo.java
  2. 27
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/HandleQueryVo.java
  3. 19
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/NotInsertPowerVo.java
  4. 18
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/NotInsertUseVo.java
  5. 18
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/RainfallVo.java
  6. 18
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/vo/StorageVo.java
  7. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/controller/AlarmHandleController.java
  8. 7
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AlarmHandleMapper.java
  9. 19
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AlarmHandleMapper.xml
  10. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/AlarmHandleService.java
  11. 17
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AlarmHandleServiceImpl.java
  12. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/StAlamRecordServiceImpl.java
  13. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/IDefectCheckService.java
  14. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java
  15. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/NotInsertPowerController.java
  16. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/NotInsertUseController.java
  17. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/RainfallController.java
  18. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/NotInsertPowerService.java
  19. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/NotInsertUseService.java
  20. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/RainfallService.java
  21. 7
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/NotInsertPowerServiceImpl.java
  22. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/NotInsertUseServiceImpl.java
  23. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/RainFallServiceImpl.java
  24. 11
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/StorageServiceImpl.java
  25. 37
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/NotInsertPowerWrapper.java
  26. 36
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/NotInsertUseWrapper.java
  27. 36
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/RainfallWrapper.java
  28. 36
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/StorageWrapper.java
  29. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/vo/SoeDataVo.java
  30. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

2
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("告警时间") @ApiModelProperty("告警时间")
private Date alarmTime; private Date alarmTime;
@ApiModelProperty("处理方式:0-处理 1-延后 2-误报") @ApiModelProperty("处理方式:1-延后 2-误报 3-缺陷 4-检修")
private Long handleWay; private Long handleWay;
@ApiModelProperty("延后处理时间") @ApiModelProperty("延后处理时间")

27
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;
}

19
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;
}

18
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;
}

18
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;
}

18
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;
}

5
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.entity.AlarmHandleEntity;
import com.hnac.hzims.operational.alert.service.AlarmHandleService; import com.hnac.hzims.operational.alert.service.AlarmHandleService;
import com.hnac.hzims.operational.alert.vo.AlarmHandleVo; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
@ -50,8 +51,8 @@ public class AlarmHandleController extends BladeController {
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入AlarmHandleEntity") @ApiOperation(value = "分页", notes = "传入AlarmHandleEntity")
public R<IPage<AlarmHandleEntity>> list(AlarmHandleEntity entity, Query query) { public R<IPage<AlarmHandleVo>> list(HandleQueryVo param, Query query) {
IPage<AlarmHandleEntity> pages = service.page(Condition.getPage(query), Condition.getQueryWrapper(entity)); IPage<AlarmHandleVo> pages = service.pageCondition(query, param);
return R.data(pages); return R.data(pages);
} }

7
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; 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.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; import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
/** /**
@ -10,4 +15,6 @@ import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
*/ */
public interface AlarmHandleMapper extends UserDataScopeBaseMapper<AlarmHandleEntity> { public interface AlarmHandleMapper extends UserDataScopeBaseMapper<AlarmHandleEntity> {
@UserDataAuth
IPage<AlarmHandleVo> selectHandlePage(IPage<Object> page,@Param("param") HandleQueryVo param);
} }

19
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AlarmHandleMapper.xml

@ -3,4 +3,23 @@
<mapper namespace="com.hnac.hzims.operational.alert.mapper.AlarmHandleMapper"> <mapper namespace="com.hnac.hzims.operational.alert.mapper.AlarmHandleMapper">
<select id="selectHandlePage" resultType="com.hnac.hzims.operational.alert.vo.AlarmHandleVo">
select * from hzims_alarm_handle h left join hzims_alarm_handle_detail d
on h.detail_id = d.id
<where>
h.is_deleted = 0
<if test="param.handleUser != null">
and h.create_user = #{param.handleUser}
</if>
<if test="param.startTime != null">
and h.create_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null">
and h.create_time &lt;= #{param.endTime}
</if>
<if test="param.handleWay != null">
and h.handle_way = #{param.handleWay}
</if>
</where>
</select>
</mapper> </mapper>

5
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; 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.entity.AlarmHandleEntity;
import com.hnac.hzims.operational.alert.vo.AlarmHandleVo; 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.base.BaseService;
import org.springblade.core.mp.support.Query;
/** /**
* @author ysj * @author ysj
@ -12,4 +15,6 @@ import org.springblade.core.mp.base.BaseService;
public interface AlarmHandleService extends BaseService<AlarmHandleEntity> { public interface AlarmHandleService extends BaseService<AlarmHandleEntity> {
boolean execute(AlarmHandleVo param); boolean execute(AlarmHandleVo param);
IPage<AlarmHandleVo> pageCondition(Query query, HandleQueryVo param);
} }

17
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; 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.constants.AbnormalAlarmConstant;
import com.hnac.hzims.operational.alert.entity.AlarmHandleDetailEntity; import com.hnac.hzims.operational.alert.entity.AlarmHandleDetailEntity;
import com.hnac.hzims.operational.alert.entity.AlarmHandleEntity; 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.mapper.AlarmHandleMapper;
import com.hnac.hzims.operational.alert.service.AlarmHandleDetailService; import com.hnac.hzims.operational.alert.service.AlarmHandleDetailService;
import com.hnac.hzims.operational.alert.service.AlarmHandleService; import com.hnac.hzims.operational.alert.service.AlarmHandleService;
import com.hnac.hzims.operational.alert.vo.AlarmHandleVo; import com.hnac.hzims.operational.alert.vo.AlarmHandleVo;
import com.hnac.hzims.operational.alert.vo.HandleQueryVo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException; import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl; 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.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -46,4 +51,16 @@ public class AlarmHandleServiceImpl extends BaseServiceImpl<AlarmHandleMapper, A
BeanUtils.copyProperties(param,entity); BeanUtils.copyProperties(param,entity);
return this.save(entity); return this.save(entity);
} }
/**
* 分页
* @param query
* @param param
* @return
*/
@Override
public IPage<AlarmHandleVo> pageCondition(Query query, HandleQueryVo param) {
IPage<AlarmHandleVo> pages = this.baseMapper.selectHandlePage(Condition.getPage(query), param);
return pages;
}
} }

1
hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/StAlamRecordServiceImpl.java

@ -500,6 +500,7 @@ public class StAlamRecordServiceImpl extends BaseServiceImpl<StAlarmRecordMapper
iter.setStationName(stationEntity.getName()); iter.setStationName(stationEntity.getName());
iter.setServeType(stationEntity.getServeType()); iter.setServeType(stationEntity.getServeType());
} }
iter.setStationCode(iter.getStationCode());
iter.setContent(iter.getSoeExplain()); iter.setContent(iter.getSoeExplain());
iter.setType(iter.getSoeType()); iter.setType(iter.getSoeType());
iter.setSoeType(array[Integer.valueOf(iter.getSoeType())]); iter.setSoeType(array[Integer.valueOf(iter.getSoeType())]);

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/IDefectCheckService.java

@ -15,7 +15,7 @@ public interface IDefectCheckService extends BaseService<OperPhenomenonEntity> {
* @param phenomenon * @param phenomenon
* @return * @return
*/ */
boolean startCheck(OperPhenomenonEntity phenomenon); OperPhenomenonEntity startCheck(OperPhenomenonEntity phenomenon);
/** /**
* 甄别缺陷 * 甄别缺陷

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java

@ -84,14 +84,14 @@ public class DefectCheckServiceImpl extends BaseServiceImpl<OperPhenomenonMapper
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean startCheck(OperPhenomenonEntity entity) { public OperPhenomenonEntity startCheck(OperPhenomenonEntity entity) {
// 步骤1.保存现象 // 步骤1.保存现象
if(!this.savePhenomenon(entity)){ if(!this.savePhenomenon(entity)){
return false; throw new ServiceException("保存现象失败!");
} }
// 步骤2.开启缺陷流程 // 步骤2.开启缺陷流程
this.startDefectCheck(entity); this.startDefectCheck(entity);
return true; return entity;
} }
/** /**

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/NotInsertPowerController.java

@ -5,6 +5,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.operational.fill.entity.NotInsertPowerEntity; import com.hnac.hzims.operational.fill.entity.NotInsertPowerEntity;
import com.hnac.hzims.operational.fill.entity.RainfallEntity; import com.hnac.hzims.operational.fill.entity.RainfallEntity;
import com.hnac.hzims.operational.fill.service.NotInsertPowerService; 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.vo.QueryVo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -57,7 +58,7 @@ public class NotInsertPowerController extends BladeController {
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@ApiOperation(value = "分页", notes = "查询条件::startTime,endTime,stationCode") @ApiOperation(value = "分页", notes = "查询条件::startTime,endTime,stationCode")
public R<IPage<NotInsertPowerEntity>> list(QueryVo filter, Query query) { public R<IPage<NotInsertPowerVo>> list(QueryVo filter, Query query) {
return service.pageCondition(filter, query); return service.pageCondition(filter, query);
} }
} }

3
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.NotInsertUseEntity;
import com.hnac.hzims.operational.fill.entity.RainfallEntity; import com.hnac.hzims.operational.fill.entity.RainfallEntity;
import com.hnac.hzims.operational.fill.service.NotInsertUseService; 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.vo.QueryVo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -57,7 +58,7 @@ public class NotInsertUseController extends BladeController {
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@ApiOperation(value = "分页", notes = "查询条件::startTime,endTime,stationCode") @ApiOperation(value = "分页", notes = "查询条件::startTime,endTime,stationCode")
public R<IPage<NotInsertUseEntity>> list(QueryVo filter, Query query) { public R<IPage<NotInsertUseVo>> list(QueryVo filter, Query query) {
return service.pageCondition(filter, query); return service.pageCondition(filter, query);
} }
} }

3
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; package com.hnac.hzims.operational.fill.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.operational.fill.vo.RainfallVo;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.operational.fill.entity.RainfallEntity; import com.hnac.hzims.operational.fill.entity.RainfallEntity;
@ -56,7 +57,7 @@ public class RainfallController extends BladeController {
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@ApiOperation(value = "分页", notes = "查询条件::startTime,endTime,stationCode") @ApiOperation(value = "分页", notes = "查询条件::startTime,endTime,stationCode")
public R<IPage<RainfallEntity>> list(QueryVo filter, Query query) { public R<IPage<RainfallVo>> list(QueryVo filter, Query query) {
return service.pageCondition(filter, query); return service.pageCondition(filter, query);
} }
} }

3
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.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.operational.fill.entity.InsertPowerEntity; import com.hnac.hzims.operational.fill.entity.InsertPowerEntity;
import com.hnac.hzims.operational.fill.entity.NotInsertPowerEntity; 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 com.hnac.hzims.operational.fill.vo.QueryVo;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
@ -24,5 +25,5 @@ public interface NotInsertPowerService extends BaseService<NotInsertPowerEntity>
boolean saveUpdate(NotInsertPowerEntity entity); boolean saveUpdate(NotInsertPowerEntity entity);
// 分页查询未接入电站发电量填报数据 // 分页查询未接入电站发电量填报数据
R<IPage<NotInsertPowerEntity>> pageCondition(QueryVo filter, Query query); R<IPage<NotInsertPowerVo>> pageCondition(QueryVo filter, Query query);
} }

3
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.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.operational.fill.entity.NotInsertUseEntity; 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 com.hnac.hzims.operational.fill.vo.QueryVo;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
@ -22,5 +23,5 @@ public interface NotInsertUseService extends BaseService<NotInsertUseEntity> {
boolean saveUpdate(NotInsertUseEntity entity); boolean saveUpdate(NotInsertUseEntity entity);
// 分页查询未接入泵站用电量填报数据 // 分页查询未接入泵站用电量填报数据
R<IPage<NotInsertUseEntity>> pageCondition(QueryVo filter, Query query); R<IPage<NotInsertUseVo>> pageCondition(QueryVo filter, Query query);
} }

3
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.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.operational.fill.entity.RainfallEntity; import com.hnac.hzims.operational.fill.entity.RainfallEntity;
import com.hnac.hzims.operational.fill.vo.QueryVo; 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.base.BaseService;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
@ -19,7 +20,7 @@ import org.springblade.core.tool.api.R;
public interface RainfallService extends BaseService<RainfallEntity> { public interface RainfallService extends BaseService<RainfallEntity> {
// 分页查询水利降雨量填报数据 // 分页查询水利降雨量填报数据
R<IPage<RainfallEntity>> pageCondition(QueryVo filter, Query query); R<IPage<RainfallVo>> pageCondition(QueryVo filter, Query query);
// 新增/修改水利降雨量填报数据 // 新增/修改水利降雨量填报数据
boolean saveUpdate(RainfallEntity entity); boolean saveUpdate(RainfallEntity entity);

7
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.entity.RainfallEntity;
import com.hnac.hzims.operational.fill.mapper.NotInsertPowerMapper; import com.hnac.hzims.operational.fill.mapper.NotInsertPowerMapper;
import com.hnac.hzims.operational.fill.service.NotInsertPowerService; 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.vo.QueryVo;
import com.hnac.hzims.operational.fill.wrapper.NotInsertPowerWrapper;
import com.hnac.hzims.operational.fill.wrapper.OverWrapper; import com.hnac.hzims.operational.fill.wrapper.OverWrapper;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -39,7 +41,7 @@ public class NotInsertPowerServiceImpl extends BaseServiceImpl<NotInsertPowerMap
* @return * @return
*/ */
@Override @Override
public R<IPage<NotInsertPowerEntity>> pageCondition(QueryVo filter, Query query) { public R<IPage<NotInsertPowerVo>> pageCondition(QueryVo filter, Query query) {
QueryWrapper<NotInsertPowerEntity> queryWrapper = new QueryWrapper<NotInsertPowerEntity>() {{ QueryWrapper<NotInsertPowerEntity> queryWrapper = new QueryWrapper<NotInsertPowerEntity>() {{
if(!StringUtil.isEmpty(filter.getStationCode())){ if(!StringUtil.isEmpty(filter.getStationCode())){
eq("STATION_CODE",filter.getStationCode()); eq("STATION_CODE",filter.getStationCode());
@ -53,7 +55,8 @@ public class NotInsertPowerServiceImpl extends BaseServiceImpl<NotInsertPowerMap
orderByDesc("create_time"); orderByDesc("create_time");
}}; }};
IPage pages = super.page(Condition.getPage(query), queryWrapper); IPage pages = super.page(Condition.getPage(query), queryWrapper);
return R.data(pages.setRecords(pages.getRecords())); List list = NotInsertPowerWrapper.build().listVO(pages.getRecords());
return R.data(pages.setRecords(list));
} }
/** /**

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/NotInsertUseServiceImpl.java

@ -7,7 +7,10 @@ import com.hnac.hzims.operational.fill.entity.NotInsertUseEntity;
import com.hnac.hzims.operational.fill.entity.RainfallEntity; import com.hnac.hzims.operational.fill.entity.RainfallEntity;
import com.hnac.hzims.operational.fill.mapper.NotInsertUseMapper; import com.hnac.hzims.operational.fill.mapper.NotInsertUseMapper;
import com.hnac.hzims.operational.fill.service.NotInsertUseService; 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.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 com.hnac.hzims.operational.fill.wrapper.OverWrapper;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -40,7 +43,7 @@ public class NotInsertUseServiceImpl extends BaseServiceImpl<NotInsertUseMapper,
* @return * @return
*/ */
@Override @Override
public R<IPage<NotInsertUseEntity>> pageCondition(QueryVo filter, Query query) { public R<IPage<NotInsertUseVo>> pageCondition(QueryVo filter, Query query) {
QueryWrapper<NotInsertUseEntity> queryWrapper = new QueryWrapper<NotInsertUseEntity>() {{ QueryWrapper<NotInsertUseEntity> queryWrapper = new QueryWrapper<NotInsertUseEntity>() {{
if(!StringUtil.isEmpty(filter.getStationCode())){ if(!StringUtil.isEmpty(filter.getStationCode())){
eq("STATION_CODE",filter.getStationCode()); eq("STATION_CODE",filter.getStationCode());
@ -54,7 +57,8 @@ public class NotInsertUseServiceImpl extends BaseServiceImpl<NotInsertUseMapper,
orderByDesc("create_time"); orderByDesc("create_time");
}}; }};
IPage pages = super.page(Condition.getPage(query), queryWrapper); IPage pages = super.page(Condition.getPage(query), queryWrapper);
return R.data(pages.setRecords(pages.getRecords())); List list = NotInsertUseWrapper.build().listVO(pages.getRecords());
return R.data(pages.setRecords(list));
} }
/** /**

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/RainFallServiceImpl.java

@ -8,7 +8,10 @@ import com.hnac.hzims.operational.fill.entity.StorageEntity;
import com.hnac.hzims.operational.fill.mapper.RainfallMapper; import com.hnac.hzims.operational.fill.mapper.RainfallMapper;
import com.hnac.hzims.operational.fill.service.RainfallService; import com.hnac.hzims.operational.fill.service.RainfallService;
import com.hnac.hzims.operational.fill.vo.QueryVo; import com.hnac.hzims.operational.fill.vo.QueryVo;
import com.hnac.hzims.operational.fill.vo.RainfallVo;
import com.hnac.hzims.operational.fill.wrapper.OverWrapper; import com.hnac.hzims.operational.fill.wrapper.OverWrapper;
import com.hnac.hzims.operational.fill.wrapper.RainfallWrapper;
import com.hnac.hzims.operational.fill.wrapper.StorageWrapper;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException; import org.springblade.core.log.exception.ServiceException;
@ -40,7 +43,7 @@ public class RainFallServiceImpl extends BaseServiceImpl<RainfallMapper, Rainfal
* @return * @return
*/ */
@Override @Override
public R<IPage<RainfallEntity>> pageCondition(QueryVo filter, Query query) { public R<IPage<RainfallVo>> pageCondition(QueryVo filter, Query query) {
QueryWrapper<RainfallEntity> queryWrapper = new QueryWrapper<RainfallEntity>() {{ QueryWrapper<RainfallEntity> queryWrapper = new QueryWrapper<RainfallEntity>() {{
if(!StringUtil.isEmpty(filter.getStationCode())){ if(!StringUtil.isEmpty(filter.getStationCode())){
eq("STATION_CODE",filter.getStationCode()); eq("STATION_CODE",filter.getStationCode());
@ -54,7 +57,8 @@ public class RainFallServiceImpl extends BaseServiceImpl<RainfallMapper, Rainfal
orderByDesc("create_time"); orderByDesc("create_time");
}}; }};
IPage pages = super.page(Condition.getPage(query), queryWrapper); IPage pages = super.page(Condition.getPage(query), queryWrapper);
return R.data(pages.setRecords(pages.getRecords())); List list = RainfallWrapper.build().listVO(pages.getRecords());
return R.data(pages.setRecords(list));
} }
/** /**

11
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/StorageServiceImpl.java

@ -3,16 +3,13 @@ package com.hnac.hzims.operational.fill.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.fdp.entity.FdpTaskEntity;
import com.hnac.hzims.operational.fill.entity.OverEntity;
import com.hnac.hzims.operational.fill.entity.StorageEntity; import com.hnac.hzims.operational.fill.entity.StorageEntity;
import com.hnac.hzims.operational.fill.mapper.StorageMapper; import com.hnac.hzims.operational.fill.mapper.StorageMapper;
import com.hnac.hzims.operational.fill.service.StorageService; import com.hnac.hzims.operational.fill.service.StorageService;
import com.hnac.hzims.operational.fill.vo.QueryVo; import com.hnac.hzims.operational.fill.vo.QueryVo;
import com.hnac.hzims.operational.fill.wrapper.OverWrapper; import com.hnac.hzims.operational.fill.wrapper.StorageWrapper;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.bytebuddy.asm.Advice;
import org.springblade.core.log.exception.ServiceException; import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
@ -24,10 +21,7 @@ import org.springblade.core.tool.utils.StringUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Optional;
/** /**
* @author ysj * @author ysj
@ -63,7 +57,8 @@ public class StorageServiceImpl extends BaseServiceImpl<StorageMapper, StorageEn
orderByDesc("create_time"); orderByDesc("create_time");
}}; }};
IPage pages = super.page(Condition.getPage(query), queryWrapper); IPage pages = super.page(Condition.getPage(query), queryWrapper);
return R.data(pages.setRecords(pages.getRecords())); List list = StorageWrapper.build().listVO(pages.getRecords());
return R.data(pages.setRecords(list));
} }
/** /**

37
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/NotInsertPowerWrapper.java

@ -0,0 +1,37 @@
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<NotInsertPowerEntity, NotInsertPowerVo> {
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;
}
}

36
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<NotInsertUseEntity, NotInsertUseVo> {
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;
}
}

36
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<RainfallEntity, RainfallVo> {
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;
}
}

36
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<StorageEntity, StorageVo> {
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;
}
}

3
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; private int count;
@ApiModelProperty(value = "站点编号")
private String stationCode;
@ApiModelProperty(value = "站点名称") @ApiModelProperty(value = "站点名称")
private String stationName; private String stationName;

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

@ -506,6 +506,8 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
List<Integer> types; List<Integer> types;
if(ObjectUtil.isEmpty(type)){ if(ObjectUtil.isEmpty(type)){
types = HomePageConstant.types; types = HomePageConstant.types;
}else if(HomePageConstant.WATER_CONSERVANCY.equals(type)){
types = HomePageConstant.waterList;
}else{ }else{
types = Collections.singletonList(type); types = Collections.singletonList(type);
} }

Loading…
Cancel
Save