自动模式,设备日志
parent
3de90ccc70
commit
af3be1f431
|
|
@ -233,8 +233,8 @@ public class RollerAutoTask {
|
|||
imeiAutoLog.setImei(imei);
|
||||
imeiAutoLog.setMonitorPeriod(term.getStartTime().format(FORMATTER)+"~"+term.getEndTime().format(FORMATTER));
|
||||
imeiAutoLog.setCurrentTemp(currentTemp);
|
||||
imeiAutoLog.setRefTemp(term.getTemp());
|
||||
imeiAutoLog.setSuitableTemp(refTempCode);
|
||||
imeiAutoLog.setRefTemp(refTempCode);
|
||||
imeiAutoLog.setSuitableTemp(term.getTemp());
|
||||
imeiAutoLog.setFanStatus(term.getVent());
|
||||
imeiAutoLog.setIsLast(isCancelOff?1:0);
|
||||
// todo 开关指令需要通知用户 推送主题 && 更新数据 前端重新请求消息表
|
||||
|
|
@ -243,7 +243,7 @@ public class RollerAutoTask {
|
|||
imei, roller, currentTemp, term.getTemp());
|
||||
// 判断是否首次开
|
||||
Integer openLen = todayLogByRoller.getOrDefault(roller + "k1", 0);
|
||||
imeiAutoLog.setRollFilm(roller + "k1");
|
||||
imeiAutoLog.setRollFilm(roller);
|
||||
imeiAutoLog.setExecCmd("开");
|
||||
// 开指令
|
||||
sendOpenCommand(imei, agriName, roller, openLen == 0, term.getVent(), reservedLen);
|
||||
|
|
@ -253,7 +253,7 @@ public class RollerAutoTask {
|
|||
imei, roller, currentTemp, term.getTemp());
|
||||
// 判断是否首次开
|
||||
Integer closeLen = todayLogByRoller.getOrDefault(roller + "g1", 0);
|
||||
imeiAutoLog.setRollFilm(roller + "g1");
|
||||
imeiAutoLog.setRollFilm(roller);
|
||||
imeiAutoLog.setExecCmd("关");
|
||||
// 关指令
|
||||
sendCloseCommand(imei, agriName, roller, closeLen == 0, term.getVent(), isCancelOff);
|
||||
|
|
|
|||
|
|
@ -101,4 +101,16 @@ public class SysImeiAutoLogController extends BaseController
|
|||
{
|
||||
return toAjax(sysImeiAutoLogService.deleteSysImeiAutoLogByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询自动模式日志列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('warn:autolog:list')")
|
||||
@GetMapping("/getAutoLogList")
|
||||
public AjaxResult getAutoLogList(SysImeiAutoLog sysImeiAutoLog)
|
||||
{
|
||||
List<SysImeiAutoLog> list = sysImeiAutoLogService.selectSysImeiAutoLogList(sysImeiAutoLog);
|
||||
return success(list);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
package com.agri.system.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
|
@ -10,6 +12,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
|||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.agri.common.annotation.Excel;
|
||||
import com.agri.common.core.domain.BaseEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 自动模式日志对象 sys_imei_auto_log
|
||||
|
|
@ -46,11 +49,11 @@ public class SysImeiAutoLog extends BaseEntity
|
|||
|
||||
/** 参考温度 */
|
||||
@Excel(name = "参考温度")
|
||||
private BigDecimal refTemp;
|
||||
private String refTemp;
|
||||
|
||||
/** 适宜温度 */
|
||||
@Excel(name = "适宜温度")
|
||||
private String suitableTemp;
|
||||
private BigDecimal suitableTemp;
|
||||
|
||||
/** 运行风口 */
|
||||
@Excel(name = "运行风口")
|
||||
|
|
@ -68,7 +71,19 @@ public class SysImeiAutoLog extends BaseEntity
|
|||
@Excel(name = "操作日志ID")
|
||||
private Long logId;
|
||||
|
||||
public void setId(Long id)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private LocalDate monitorDate;
|
||||
|
||||
public LocalDate getMonitorDate() {
|
||||
return monitorDate;
|
||||
}
|
||||
|
||||
public void setMonitorDate(LocalDate monitorDate) {
|
||||
this.monitorDate = monitorDate;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
|
@ -118,26 +133,22 @@ public class SysImeiAutoLog extends BaseEntity
|
|||
return currentTemp;
|
||||
}
|
||||
|
||||
public void setRefTemp(BigDecimal refTemp)
|
||||
{
|
||||
this.refTemp = refTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getRefTemp()
|
||||
{
|
||||
public String getRefTemp() {
|
||||
return refTemp;
|
||||
}
|
||||
|
||||
public void setSuitableTemp(String suitableTemp)
|
||||
{
|
||||
this.suitableTemp = suitableTemp;
|
||||
public void setRefTemp(String refTemp) {
|
||||
this.refTemp = refTemp;
|
||||
}
|
||||
|
||||
public String getSuitableTemp()
|
||||
{
|
||||
public BigDecimal getSuitableTemp() {
|
||||
return suitableTemp;
|
||||
}
|
||||
|
||||
public void setSuitableTemp(BigDecimal suitableTemp) {
|
||||
this.suitableTemp = suitableTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getFanStatus() {
|
||||
return fanStatus;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<where>
|
||||
<if test="imei != null and imei != ''"> and imei = #{imei}</if>
|
||||
<if test="rollFilm != null and rollFilm != ''"> and roll_film = #{rollFilm}</if>
|
||||
<if test="monitorDate != null"> and DATE_FORMAT(create_time, '%Y-%m-%d') = #{monitorDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue