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

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;
/** 设备id */
@Excel(name = "设备id")
private String equipId;
private Integer nums;
/** 设备状态 */
@Excel(name = "设备状态")
@ -46,15 +45,15 @@ public class IpcDailyEquipNumByStatus extends BaseEntity
{
return id;
}
public void setEquipId(String equipId)
{
this.equipId = equipId;
public Integer getNums() {
return nums;
}
public String getEquipId()
{
return equipId;
public void setNums(Integer nums) {
this.nums = nums;
}
public void setStatus(Integer status)
{
this.status = status;
@ -87,7 +86,6 @@ public class IpcDailyEquipNumByStatus extends BaseEntity
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("equipId", getEquipId())
.append("status", getStatus())
.append("deptId", getDeptId())
.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">
<result property="id" column="id" />
<result property="equipId" column="equip_id" />
<result property="nums" column="nums" />
<result property="status" column="status" />
<result property="deptId" column="dept_id" />
<result property="createDate" column="create_date" />
</resultMap>
<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>
<select id="selectIpcDailyEquipNumByStatusList" parameterType="IpcDailyEquipNumByStatus" resultMap="IpcDailyEquipNumByStatusResult">
<include refid="selectIpcDailyEquipNumByStatusVo"/>
<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="deptId != null "> and dept_id = #{deptId}</if>
<if test="createDate != null "> and create_date = #{createDate}</if>
@ -34,13 +34,13 @@
<insert id="insertIpcDailyEquipNumByStatus" parameterType="IpcDailyEquipNumByStatus" useGeneratedKeys="true" keyProperty="id">
insert into ipc_daily_equip_num_by_status
<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="deptId != null">dept_id,</if>
<if test="createDate != null">create_date,</if>
</trim>
<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="deptId != null">#{deptId},</if>
<if test="createDate != null">#{createDate},</if>
@ -50,7 +50,7 @@
<update id="updateIpcDailyEquipNumByStatus" parameterType="IpcDailyEquipNumByStatus">
update ipc_daily_equip_num_by_status
<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="deptId != null">dept_id = #{deptId},</if>
<if test="createDate != null">create_date = #{createDate},</if>