统计设备状态数量信息修改

This commit is contained in:
zhangjunwen 2024-07-11 17:56:53 +08:00
parent 847a1bae5c
commit 6b9bf6cf64
3 changed files with 33 additions and 15 deletions

View File

@ -21,8 +21,7 @@ public class IpcDailyEquipNumByStatus extends BaseEntity
private Long id; private Long id;
/** 设备id */ /** 设备id */
@Excel(name = "设备id") private Integer nums;
private String equipId;
/** 设备状态 */ /** 设备状态 */
@Excel(name = "设备状态") @Excel(name = "设备状态")
@ -46,15 +45,15 @@ public class IpcDailyEquipNumByStatus extends BaseEntity
{ {
return id; return id;
} }
public void setEquipId(String equipId)
{ public Integer getNums() {
this.equipId = equipId; return nums;
} }
public String getEquipId() public void setNums(Integer nums) {
{ this.nums = nums;
return equipId;
} }
public void setStatus(Integer status) public void setStatus(Integer status)
{ {
this.status = status; this.status = status;
@ -87,7 +86,6 @@ public class IpcDailyEquipNumByStatus extends BaseEntity
public String toString() { public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("equipId", getEquipId())
.append("status", getStatus()) .append("status", getStatus())
.append("deptId", getDeptId()) .append("deptId", getDeptId())
.append("createDate", getCreateDate()) .append("createDate", getCreateDate())

View File

@ -0,0 +1,20 @@
package com.inspur.bigscreen.task;
import org.springframework.stereotype.Component;
/**
* 大屏数据统计定时任务
* @Author zhangjunwen
* @create 2024/7/11
*/
@Component("statsDataTask")
public class StatsDataTask {
/**
* 每日根据不同状态统计设备数量
*/
public void countDailyEquipNumByStatus(){
}
}

View File

@ -6,20 +6,20 @@
<resultMap type="IpcDailyEquipNumByStatus" id="IpcDailyEquipNumByStatusResult"> <resultMap type="IpcDailyEquipNumByStatus" id="IpcDailyEquipNumByStatusResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="equipId" column="equip_id" /> <result property="nums" column="nums" />
<result property="status" column="status" /> <result property="status" column="status" />
<result property="deptId" column="dept_id" /> <result property="deptId" column="dept_id" />
<result property="createDate" column="create_date" /> <result property="createDate" column="create_date" />
</resultMap> </resultMap>
<sql id="selectIpcDailyEquipNumByStatusVo"> <sql id="selectIpcDailyEquipNumByStatusVo">
select id, equip_id, status, dept_id, create_date from ipc_daily_equip_num_by_status select id, nums, status, dept_id, create_date from ipc_daily_equip_num_by_status
</sql> </sql>
<select id="selectIpcDailyEquipNumByStatusList" parameterType="IpcDailyEquipNumByStatus" resultMap="IpcDailyEquipNumByStatusResult"> <select id="selectIpcDailyEquipNumByStatusList" parameterType="IpcDailyEquipNumByStatus" resultMap="IpcDailyEquipNumByStatusResult">
<include refid="selectIpcDailyEquipNumByStatusVo"/> <include refid="selectIpcDailyEquipNumByStatusVo"/>
<where> <where>
<if test="equipId != null and equipId != ''"> and equip_id = #{equipId}</if> <if test="nums != null and nums != ''"> and nums = #{nums}</if>
<if test="status != null "> and status = #{status}</if> <if test="status != null "> and status = #{status}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if> <if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="createDate != null "> and create_date = #{createDate}</if> <if test="createDate != null "> and create_date = #{createDate}</if>
@ -34,13 +34,13 @@
<insert id="insertIpcDailyEquipNumByStatus" parameterType="IpcDailyEquipNumByStatus" useGeneratedKeys="true" keyProperty="id"> <insert id="insertIpcDailyEquipNumByStatus" parameterType="IpcDailyEquipNumByStatus" useGeneratedKeys="true" keyProperty="id">
insert into ipc_daily_equip_num_by_status insert into ipc_daily_equip_num_by_status
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="equipId != null">equip_id,</if> <if test="nums != null">nums,</if>
<if test="status != null">status,</if> <if test="status != null">status,</if>
<if test="deptId != null">dept_id,</if> <if test="deptId != null">dept_id,</if>
<if test="createDate != null">create_date,</if> <if test="createDate != null">create_date,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="equipId != null">#{equipId},</if> <if test="nums != null">#{nums},</if>
<if test="status != null">#{status},</if> <if test="status != null">#{status},</if>
<if test="deptId != null">#{deptId},</if> <if test="deptId != null">#{deptId},</if>
<if test="createDate != null">#{createDate},</if> <if test="createDate != null">#{createDate},</if>
@ -50,7 +50,7 @@
<update id="updateIpcDailyEquipNumByStatus" parameterType="IpcDailyEquipNumByStatus"> <update id="updateIpcDailyEquipNumByStatus" parameterType="IpcDailyEquipNumByStatus">
update ipc_daily_equip_num_by_status update ipc_daily_equip_num_by_status
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="equipId != null">equip_id = #{equipId},</if> <if test="nums != null">nums = #{nums},</if>
<if test="status != null">status = #{status},</if> <if test="status != null">status = #{status},</if>
<if test="deptId != null">dept_id = #{deptId},</if> <if test="deptId != null">dept_id = #{deptId},</if>
<if test="createDate != null">create_date = #{createDate},</if> <if test="createDate != null">create_date = #{createDate},</if>