Browse Source

Merge branch 'prod-5.1.3' of http://175.6.40.68:8081/Jone/hzims-back into prod-5.1.3

zhongwei
luyie 3 months ago
parent
commit
6f0ed22b1e
  1. 9
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/show/vo/AlarmHistoryParamVo.java
  2. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/ScheduledConstant.java
  3. 7
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmMapper.xml
  4. 40
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/StartStopScheduledTask.java
  5. 9
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/startstop/StratStopService.java
  6. 24
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/startstop/impl/StartStopServiceImpl.java

9
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/show/vo/AlarmHistoryParamVo.java

@ -3,8 +3,6 @@ package com.hnac.hzims.alarm.show.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author ysj
* @date 2023/03/17 10:02:33
@ -16,8 +14,11 @@ public class AlarmHistoryParamVo {
@ApiModelProperty(value = "站点编号")
private String stationId;
@ApiModelProperty(value = "告警日期 : yyyy-MM-dd")
private String alarmTime;
@ApiModelProperty(value = "告警开始日期 : yyyy-MM-dd")
private String startTime;
@ApiModelProperty(value = "告警结束日期 : yyyy-MM-dd")
private String endTime;
@ApiModelProperty(value = "告警类型")
private Integer alarmType;

2
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/ScheduledConstant.java

@ -13,4 +13,6 @@ public interface ScheduledConstant {
String THIS_DAY_POWER_GENERATION = "thisDayPowerGeneration";
String LOAD_THREE_YEAR_POWER_GENERATION = "loadThreeYearPowerGeneration";
String THIS_DAY_START_STOP_RECORD = "thisDayStartStopRecord";
}

7
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmMapper.xml

@ -14,8 +14,11 @@
<if test="param.stationId != null and param.stationId != ''">
AND ALARM.STATION_ID = #{param.stationId}
</if>
<if test="param.alarmTime != null and param.alarmTime != ''">
AND ALARM.ALARM_TIME like CONCAT('%',#{param.alarmTime}, '%')
<if test="param.startTime != null and param.alarmTime != ''">
AND ALARM.ALARM_TIME &gt;= #{param.startTime}
</if>
<if test="param.endTime != null and param.endTime != ''">
AND ALARM.ALARM_TIME &lt;= #{param.endTime}
</if>
<if test="param.alarmType != null and param.alarmType != ''">
AND ALARM.ALARM_TYPE = #{param.alarmType}

40
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/StartStopScheduledTask.java

@ -0,0 +1,40 @@
package com.hnac.hzims.scheduled.scheduled;
import com.hnac.hzims.scheduled.service.startstop.StratStopService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Date;
import static com.hnac.hzims.operational.main.constant.ScheduledConstant.THIS_DAY_START_STOP_RECORD;
/**
* 开停机定时任务
* @author ysj
*/
@Slf4j
@Component
public class StartStopScheduledTask {
@Autowired
private StratStopService service;
/**
* 单日开停机记录
*/
@XxlJob(THIS_DAY_START_STOP_RECORD)
//@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> thisDayStartStopRecord(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}
service.thisDayStartStopRecord(param);
return new ReturnT<>("SUCCESS");
}
}

9
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/startstop/StratStopService.java

@ -0,0 +1,9 @@
package com.hnac.hzims.scheduled.service.startstop;
/**
* @author ysj
*/
public interface StratStopService {
void thisDayStartStopRecord(String param);
}

24
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/startstop/impl/StartStopServiceImpl.java

@ -0,0 +1,24 @@
package com.hnac.hzims.scheduled.service.startstop.impl;
import com.hnac.hzims.scheduled.service.startstop.StratStopService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* @author ysj
*/
@Service
@RequiredArgsConstructor
@Slf4j
public class StartStopServiceImpl implements StratStopService {
/**
* 单日开停机记录
* @param param
*/
@Override
public void thisDayStartStopRecord(String param) {
}
}
Loading…
Cancel
Save