增加限位时间
parent
82602b3821
commit
9dfe3b5f0a
|
|
@ -1,7 +1,7 @@
|
|||
# 代码生成
|
||||
gen:
|
||||
# 作者
|
||||
author: agri
|
||||
author: lld
|
||||
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||
packageName: com.agri.system
|
||||
# 自动去除表前缀,默认是false
|
||||
|
|
|
|||
|
|
@ -1,25 +1,26 @@
|
|||
package com.agri.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.agri.common.annotation.Log;
|
||||
import com.agri.common.core.controller.BaseController;
|
||||
import com.agri.common.core.domain.AjaxResult;
|
||||
import com.agri.common.core.page.TableDataInfo;
|
||||
import com.agri.common.enums.BusinessType;
|
||||
import com.agri.common.utils.poi.ExcelUtil;
|
||||
import com.agri.system.domain.SysAgriLimit;
|
||||
import com.agri.system.service.ISysAgriLimitService;
|
||||
import com.agri.common.utils.poi.ExcelUtil;
|
||||
import com.agri.common.core.page.TableDataInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 执行时间限位管理Controller
|
||||
|
|
@ -101,4 +102,14 @@ public class SysAgriLimitController extends BaseController
|
|||
{
|
||||
return toAjax(sysAgriLimitService.deleteSysAgriLimitByIds(ids));
|
||||
}
|
||||
|
||||
@Log(title = "大棚运行时间限位查询", businessType = BusinessType.SELECT)
|
||||
@GetMapping("/getAgriByImei/{imei}")
|
||||
public AjaxResult getAgriByImei(@PathVariable String imei)
|
||||
{
|
||||
SysAgriLimit agriLimit = sysAgriLimitService.lambdaQuery().eq(SysAgriLimit::getImei, imei).one();
|
||||
|
||||
return success(agriLimit);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ public class SysAgriAlarmRelation extends BaseEntity
|
|||
|
||||
/** 关联大棚设备表ID(sys_agri_info.id) */
|
||||
@Excel(name = "关联大棚设备表ID", readConverterExp = "s=ys_agri_info.id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long agriId;
|
||||
|
||||
/** imei */
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ public class SysAgriLimit extends BaseEntity
|
|||
|
||||
/** 大棚ID(如IMEI/自定义编号) */
|
||||
@Excel(name = "大棚ID", readConverterExp = "如=IMEI/自定义编号")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long agriId;
|
||||
|
||||
/** 大棚名称(冗余字段) */
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
package com.agri.system.domain;
|
||||
|
||||
import com.agri.common.annotation.Excel;
|
||||
import com.agri.common.core.domain.BaseEntity;
|
||||
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;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.agri.common.annotation.Excel;
|
||||
import com.agri.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* DTU温湿度上报数据对象 sys_dtu_data
|
||||
|
|
@ -27,6 +30,7 @@ public class SysDtuData extends BaseEntity
|
|||
|
||||
/** 设备上报时间戳(ms或s,建议统一ms) */
|
||||
@Excel(name = "设备上报时间戳(ms或s,建议统一ms)")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long ts;
|
||||
|
||||
/** ts转换后的正常时间(由服务端转换入库) */
|
||||
|
|
|
|||
|
|
@ -72,13 +72,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="jm3gLimit != null">jm3g_limit,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="version != null">version,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
<if test="deleted != null">deleted,</if>
|
||||
<if test="deleteTime != null">delete_time,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="agriId != null">#{agriId},</if>
|
||||
<if test="agriName != null">#{agriName},</if>
|
||||
|
|
@ -93,10 +93,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="jm3gLimit != null">#{jm3gLimit},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="version != null">#{version},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
#{createBy},
|
||||
#{createTime},
|
||||
#{updateBy},
|
||||
#{updateTime},
|
||||
<if test="deleted != null">#{deleted},</if>
|
||||
<if test="deleteTime != null">#{deleteTime},</if>
|
||||
</trim>
|
||||
|
|
|
|||
Loading…
Reference in New Issue