haungxing
2 years ago
39 changed files with 1605 additions and 447 deletions
@ -0,0 +1,21 @@
|
||||
package com.hnac.hzims.operational.main.vo; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author ysj |
||||
* @date 2023/04/03 16:57:22 |
||||
* @version 4.0.0 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "光伏站点设备状态对象") |
||||
public class PhotovoltaicDeviceStateVo { |
||||
|
||||
@ApiModelProperty(value = "设备装态 : 0 - 离线 1 - 在线 2 - 故障") |
||||
private Integer state; |
||||
|
||||
@ApiModelProperty(value = "数量") |
||||
private Integer count; |
||||
} |
@ -0,0 +1,31 @@
|
||||
package com.hnac.hzims.operational.main.vo; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||
import com.hnac.hzims.hzimsweather.response.weather.Daily; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
import java.time.LocalDateTime; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author ysj |
||||
* @date 2023/03/29 15:14:34 |
||||
* @version 4.0.0 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "水利站点首页对象") |
||||
public class PhotovoltaicLoadGenerateVo { |
||||
|
||||
@ApiModelProperty(value = "周期") |
||||
private String period; |
||||
|
||||
@ApiModelProperty(value = "数据值") |
||||
private Float value; |
||||
|
||||
} |
@ -0,0 +1,31 @@
|
||||
package com.hnac.hzims.operational.main.vo; |
||||
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author ysj |
||||
* @date 2023/04/04 09:28:34 |
||||
* @version 4.0.0 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "发电量数据") |
||||
public class PhotovoltaicLoadVo { |
||||
|
||||
@ApiModelProperty(value = "机构ID") |
||||
private Long deptId; |
||||
|
||||
@ApiModelProperty(value = "站点编码") |
||||
private String code; |
||||
|
||||
@ApiModelProperty(value = "站点名称") |
||||
private String name; |
||||
|
||||
@ApiModelProperty(value = "实时功率") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Double load; |
||||
} |
@ -0,0 +1,75 @@
|
||||
package com.hnac.hzims.operational.main.vo; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||
import com.hnac.hzims.hzimsweather.response.weather.Daily; |
||||
import com.hnac.hzims.hzimsweather.response.weather.Now; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
import java.time.LocalDateTime; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author ysj |
||||
* @date 2023/03/29 15:14:34 |
||||
* @version 4.0.0 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "光伏站点首页对象") |
||||
public class PhotovoltaicStationAppVo { |
||||
|
||||
@ApiModelProperty(value = "机构Id") |
||||
private Long deptId; |
||||
|
||||
@ApiModelProperty(value = "机构名称") |
||||
private String deptName; |
||||
|
||||
@ApiModelProperty(value = "站点编码") |
||||
private String stationCode; |
||||
|
||||
@ApiModelProperty(value = "地址") |
||||
private String address; |
||||
|
||||
@ApiModelProperty(value = "总发电负荷") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Double load; |
||||
|
||||
@ApiModelProperty(value = "日发电量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Double generateDay; |
||||
|
||||
@ApiModelProperty(value = "月发电量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Double generateMon; |
||||
|
||||
@ApiModelProperty(value = "总发电量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Double generate; |
||||
|
||||
@ApiModelProperty(value = "天气") |
||||
private Now now; |
||||
|
||||
@ApiModelProperty(value = "站点收益") |
||||
private Double income; |
||||
|
||||
@ApiModelProperty(value = "co2减排: kg") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Double co2; |
||||
|
||||
@ApiModelProperty(value = "节约标准煤减排: kt") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Double tec; |
||||
|
||||
@ApiModelProperty(value = "减少森林砍伐:1kwh = 0.000553") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Double deforest; |
||||
|
||||
@ApiModelProperty(value = "减少森林砍伐:1kwh = 0.000553") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private List<PhotovoltaicDeviceStateVo> deviceState; |
||||
} |
@ -0,0 +1,91 @@
|
||||
package com.hnac.hzims.operational.main.vo; |
||||
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||
import com.hnac.hzims.hzimsweather.response.weather.Now; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author ysj |
||||
* @date 2023/03/24 09:58:57 |
||||
* @version 4.0.0 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "发电量数据") |
||||
public class PhotovoltaicSubordinateAppVo { |
||||
|
||||
@ApiModelProperty(value = "机构ID") |
||||
private Long deptId; |
||||
|
||||
@ApiModelProperty(value = "机构名称") |
||||
private String deptName; |
||||
|
||||
@ApiModelProperty(value = "天气") |
||||
private Now now; |
||||
|
||||
@ApiModelProperty(value = "地址") |
||||
private String address; |
||||
|
||||
@ApiModelProperty(value = "容量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Double capacity; |
||||
|
||||
@ApiModelProperty(value = "今日发电量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Double generateDay; |
||||
|
||||
@ApiModelProperty(value = "实时功率") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Double load; |
||||
|
||||
@ApiModelProperty(value = "站点实时功率列表") |
||||
private List<PhotovoltaicLoadVo> stationLoads; |
||||
|
||||
@ApiModelProperty(value = "日常任务数量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Integer maintenanceCount; |
||||
|
||||
@ApiModelProperty(value = "日常任务完成数量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Integer maintenanceFinishCount; |
||||
|
||||
@ApiModelProperty(value = "缺陷任务数量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Integer defectCount; |
||||
|
||||
@ApiModelProperty(value = "缺陷任务完成数量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Integer defectFinishCount; |
||||
|
||||
@ApiModelProperty(value = "检修任务数量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Integer overhaulCount; |
||||
|
||||
@ApiModelProperty(value = "检修任务完成数量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Integer overhaulFinishCount; |
||||
|
||||
@ApiModelProperty(value = "操作票任务数量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Integer operateCount; |
||||
|
||||
@ApiModelProperty(value = "操作票任务完成数量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Integer operateFinishCount; |
||||
|
||||
@ApiModelProperty(value = "操作票任务数量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Integer workCount; |
||||
|
||||
@ApiModelProperty(value = "操作票任务完成数量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Integer workFinishCount; |
||||
|
||||
@ApiModelProperty(value = "排序") |
||||
private Integer sort; |
||||
} |
@ -0,0 +1,29 @@
|
||||
package com.hnac.hzims.middle.systemlog.config; |
||||
|
||||
import com.hnac.hzims.middle.systemlog.task.SyslogTimerTask; |
||||
import org.springframework.context.annotation.Bean; |
||||
import org.springframework.context.annotation.Configuration; |
||||
|
||||
import java.util.Timer; |
||||
|
||||
/** |
||||
* @Author WL |
||||
* @Version v1.0 |
||||
* @Serial 1.0 |
||||
* @Date 2023/4/8 14:15 |
||||
*/ |
||||
@Configuration |
||||
public class SysLogConfig { |
||||
|
||||
@Bean |
||||
public void syslogTimer() { |
||||
//1.创建一个timer实例
|
||||
Timer timer = new Timer(); |
||||
//2.创建一个SyslogTimerTask实例
|
||||
SyslogTimerTask myTimeTask = new SyslogTimerTask(); |
||||
//3.通过timer定时定频率调用SyslogTimerTask的业务逻辑
|
||||
// 即 第一次执行是在当前时间的两秒之后,之后每隔30秒钟执行一次
|
||||
timer.schedule(myTimeTask,2000L,30000L); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,21 @@
|
||||
package com.hnac.hzims.middle.systemlog.controller; |
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
/** |
||||
* <p> |
||||
* 操作日志统计数据 前端控制器 |
||||
* </p> |
||||
* |
||||
* @author dfy |
||||
* @since 2023-04-08 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/systemlog/statistics") |
||||
public class StatisticsController { |
||||
|
||||
} |
||||
|
@ -0,0 +1,70 @@
|
||||
package com.hnac.hzims.middle.systemlog.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import java.time.LocalDateTime; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import java.io.Serializable; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
|
||||
/** |
||||
* <p> |
||||
* 操作日志统计数据 |
||||
* </p> |
||||
* |
||||
* @author dfy |
||||
* @since 2023-04-08 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@Accessors(chain = true) |
||||
@TableName("hzims_statistics") |
||||
public class Statistics implements Serializable { |
||||
|
||||
private static final long serialVersionUID=1L; |
||||
|
||||
/** |
||||
* 编号 |
||||
*/ |
||||
@TableField("id") |
||||
private Long id; |
||||
|
||||
/** |
||||
* 统计日期 |
||||
*/ |
||||
@TableField("date_calculated") |
||||
private String dateCalculated; |
||||
|
||||
/** |
||||
* 操作模块统计 |
||||
*/ |
||||
@TableField("title_num") |
||||
private Integer titleNum; |
||||
|
||||
/** |
||||
* 功能模块统计 |
||||
*/ |
||||
@TableField("module_name_num") |
||||
private Integer moduleNameNum; |
||||
|
||||
/** |
||||
* 请求路径统计 |
||||
*/ |
||||
@TableField("path_num") |
||||
private Integer pathNum; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
@TableField("create_time") |
||||
private LocalDateTime createTime; |
||||
|
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
@TableField("update_time") |
||||
private LocalDateTime updateTime; |
||||
|
||||
|
||||
} |
@ -0,0 +1,16 @@
|
||||
package com.hnac.hzims.middle.systemlog.mapper; |
||||
|
||||
import com.hnac.hzims.middle.systemlog.entity.Statistics; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* <p> |
||||
* 操作日志统计数据 Mapper 接口 |
||||
* </p> |
||||
* |
||||
* @author dfy |
||||
* @since 2023-04-08 |
||||
*/ |
||||
public interface StatisticsMapper extends BaseMapper<Statistics> { |
||||
|
||||
} |
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.hnac.hzims.middle.systemlog.mapper.StatisticsMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,20 @@
|
||||
package com.hnac.hzims.middle.systemlog.service; |
||||
|
||||
import com.hnac.hzims.middle.systemlog.entity.Statistics; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* <p> |
||||
* 操作日志统计数据 服务类 |
||||
* </p> |
||||
* |
||||
* @author dfy |
||||
* @since 2023-04-08 |
||||
*/ |
||||
public interface StatisticsService extends IService<Statistics> { |
||||
|
||||
/** |
||||
* 保存统计的数据 |
||||
*/ |
||||
void saveCountStatistics(); |
||||
} |
@ -0,0 +1,34 @@
|
||||
package com.hnac.hzims.middle.systemlog.service.impl; |
||||
|
||||
import com.hnac.hzims.middle.systemlog.entity.Statistics; |
||||
import com.hnac.hzims.middle.systemlog.mapper.StatisticsMapper; |
||||
import com.hnac.hzims.middle.systemlog.service.StatisticsService; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import com.hnac.hzims.middle.systemlog.service.SysLogService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* <p> |
||||
* 操作日志统计数据 服务实现类 |
||||
* </p> |
||||
* |
||||
* @author dfy |
||||
* @since 2023-04-08 |
||||
*/ |
||||
@Service |
||||
public class StatisticsServiceImpl extends ServiceImpl<StatisticsMapper, Statistics> implements StatisticsService { |
||||
|
||||
@Autowired |
||||
private SysLogService sysLogService; |
||||
|
||||
|
||||
/** |
||||
* 保存统计的数据 |
||||
*/ |
||||
@Override |
||||
public void saveCountStatistics() { |
||||
//1. 保存操作模块的数据
|
||||
|
||||
} |
||||
} |
@ -0,0 +1,31 @@
|
||||
package com.hnac.hzims.middle.systemlog.task; |
||||
|
||||
import com.hnac.hzims.middle.systemlog.service.StatisticsService; |
||||
import com.hnac.hzims.middle.systemlog.service.SysLogService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Component; |
||||
|
||||
import java.util.TimerTask; |
||||
|
||||
/** |
||||
* @Author WL |
||||
* @Version v1.0 |
||||
* @Serial 1.0 |
||||
* @Date 2023/4/8 14:13 |
||||
*/ |
||||
@Component |
||||
public class SyslogTimerTask extends TimerTask { |
||||
|
||||
|
||||
@Autowired |
||||
private StatisticsService statisticsService; |
||||
|
||||
/** |
||||
* The action to be performed by this timer task. |
||||
*/ |
||||
@Override |
||||
public void run() { |
||||
//保存统计的数据
|
||||
statisticsService.saveCountStatistics(); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -1,17 +0,0 @@
|
||||
package com.hnac.hzims.ticket.twoTicket.mapper; |
||||
|
||||
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity; |
||||
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||
import org.springframework.stereotype.Repository; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* @Author WL |
||||
* @Version v1.0 |
||||
* @Serial 1.0 |
||||
* @Date 2023/4/8 11:29 |
||||
*/ |
||||
@Repository |
||||
public interface WorkTicketInfoMapper extends UserDataScopeBaseMapper<WorkTicketInfoEntity> { |
||||
|
||||
} |
@ -1,14 +0,0 @@
|
||||
package com.hnac.hzims.ticket.twoTicket.service; |
||||
|
||||
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
|
||||
/** |
||||
* @Author WL |
||||
* @Version v1.0 |
||||
* @Serial 1.0 |
||||
* @Date 2023/4/8 11:31 |
||||
*/ |
||||
public interface WorkTicketInfoService extends BaseService<WorkTicketInfoEntity> { |
||||
|
||||
} |
@ -1,17 +0,0 @@
|
||||
package com.hnac.hzims.ticket.twoTicket.service.impl; |
||||
|
||||
import com.hnac.hzims.ticket.twoTicket.mapper.WorkTicketInfoMapper; |
||||
import com.hnac.hzims.ticket.twoTicket.service.WorkTicketInfoService; |
||||
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* @Author WL |
||||
* @Version v1.0 |
||||
* @Serial 1.0 |
||||
* @Date 2023/4/8 11:32 |
||||
*/ |
||||
@Service |
||||
public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMapper,WorkTicketInfoEntity> implements WorkTicketInfoService { |
||||
} |
Loading…
Reference in new issue