Compare commits

...

4 Commits

  1. 8
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/AlertMessage.java
  2. 4
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquManu.java
  3. 3
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquSupplier.java
  4. 5
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquType.java
  5. 2
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquTypeServiceImpl.java
  6. 48
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquBaseMapper.xml
  7. 3
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquTypeMapper.xml

@ -50,8 +50,8 @@ public class AlertMessage
private Long level; private Long level;
/** 发生时间 */ /** 发生时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "发生时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "添加日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date occurTime; private Date occurTime;
@ -61,8 +61,8 @@ public class AlertMessage
private String handler; private String handler;
/** 解决时间 */ /** 解决时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "解决时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "添加日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date handleTime; private Date handleTime;
/** 处理状态(open、in_progress_closed) */ /** 处理状态(open、in_progress_closed) */

@ -41,8 +41,8 @@ public class EquManu
/** 添加日期 */ /** 添加日期 */
//@JsonIgnore //@JsonIgnore
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "添加日期", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "添加日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createDate; private Date createDate;
/** 状态(0-禁用,1-启用) */ /** 状态(0-禁用,1-启用) */

@ -53,7 +53,8 @@ public class EquSupplier
/** 创建时间 */ /** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "添加日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createTime; private Date createTime;

@ -38,10 +38,11 @@ public class EquType
/** 添加日期 */ /** 添加日期 */
//@JsonIgnore //@JsonIgnore
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "添加日期", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "添加日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createDate; private Date createDate;
//@JsonIgnore //@JsonIgnore
private String createBy; private String createBy;

@ -1,5 +1,6 @@
package com.alops.system.service.impl; package com.alops.system.service.impl;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
@ -71,6 +72,7 @@ public class EquTypeServiceImpl implements IEquTypeService
public int updateEquType(EquType equType) public int updateEquType(EquType equType)
{ {
String userName = SecurityUtils.getLoginUser().getUser().getUserName(); String userName = SecurityUtils.getLoginUser().getUser().getUserName();
equType.setCreateDate(new Date());
equType.setCreateBy(userName); equType.setCreateBy(userName);
return equTypeMapper.updateEquType(equType); return equTypeMapper.updateEquType(equType);
} }

@ -164,6 +164,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
b.floor AS floor b.floor AS floor
</sql> </sql>
<!-- <select id="selectEquBaseList" parameterType="equBaseQueryDto" resultType="com.alops.system.domain.vo.queryEquBaseVO">-->
<!-- SELECT-->
<!-- <include refid="selectEquBaseVo2"/>-->
<!-- FROM equ_base b-->
<!-- LEFT JOIN equ_manu m ON b.manufacture = m.id-->
<!-- LEFT JOIN equ_supplier s ON b.supplier_id = s.id-->
<!-- LEFT JOIN equ_type t ON b.equ_type = t.id-->
<!-- LEFT JOIN sys_user su ON b.create_by = su.user_id-->
<!-- LEFT JOIN (-->
<!-- &#45;&#45; 子查询:每台设备取最新的健康度-->
<!-- SELECT eg.equ_id, eg.health-->
<!-- FROM equ_gather eg-->
<!-- INNER JOIN (-->
<!-- SELECT equ_id, MAX(gather_time) AS max_time-->
<!-- FROM equ_gather-->
<!-- GROUP BY equ_id-->
<!-- ) tmp ON eg.equ_id = tmp.equ_id AND eg.gather_time = tmp.max_time-->
<!-- ) g ON b.id = g.equ_id-->
<!-- <where>-->
<!-- <if test="minTime != null">-->
<!-- AND b.create_date &gt;= #{minTime}-->
<!-- </if>-->
<!-- <if test="maxTime != null">-->
<!-- AND b.create_date &lt;= #{maxTime}-->
<!-- </if>-->
<!-- </where>-->
<!-- ORDER BY b.create_date DESC-->
<!-- </select>-->
<select id="selectEquBaseList" parameterType="equBaseQueryDto" resultType="com.alops.system.domain.vo.queryEquBaseVO"> <select id="selectEquBaseList" parameterType="equBaseQueryDto" resultType="com.alops.system.domain.vo.queryEquBaseVO">
SELECT SELECT
<include refid="selectEquBaseVo2"/> <include refid="selectEquBaseVo2"/>
@ -182,6 +211,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY equ_id GROUP BY equ_id
) tmp ON eg.equ_id = tmp.equ_id AND eg.gather_time = tmp.max_time ) tmp ON eg.equ_id = tmp.equ_id AND eg.gather_time = tmp.max_time
) g ON b.id = g.equ_id ) g ON b.id = g.equ_id
<where> <where>
<if test="minTime != null"> <if test="minTime != null">
AND b.create_date &gt;= #{minTime} AND b.create_date &gt;= #{minTime}
@ -189,10 +219,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="maxTime != null"> <if test="maxTime != null">
AND b.create_date &lt;= #{maxTime} AND b.create_date &lt;= #{maxTime}
</if> </if>
<!-- 模糊查询:设备名称 -->
<if test="name != null and name != ''">
AND b.name LIKE CONCAT('%', #{name}, '%')
</if>
<!-- 模糊查询:安装位置 -->
<if test="location != null and location != ''">
AND b.location LIKE CONCAT('%', #{location}, '%')
</if>
<!-- 精确查询:状态 -->
<if test="status != null and status != ''">
AND b.status = #{status}
</if>
</where> </where>
ORDER BY b.create_date DESC ORDER BY b.create_date DESC
</select> </select>
<select id="selectEquMonitorListPaged" resultType="MonitorListDto"> <select id="selectEquMonitorListPaged" resultType="MonitorListDto">
SELECT SELECT
c.id, c.id,
@ -508,6 +555,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="equImage != null">equ_image = #{equImage},</if> <if test="equImage != null">equ_image = #{equImage},</if>
<if test="equNumber != null">equ_number = #{equNumber},</if> <if test="equNumber != null">equ_number = #{equNumber},</if>
<if test="floor != null">floor = #{floor},</if> <if test="floor != null">floor = #{floor},</if>
create_date = create_date
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>

@ -50,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="description != null">description,</if> <if test="description != null">description,</if>
<if test="image != null">image,</if> <if test="image != null">image,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createDate != null">create_date,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
@ -58,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="description != null">#{description},</if> <if test="description != null">#{description},</if>
<if test="image != null">#{image},</if> <if test="image != null">#{image},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createDate != null">#{createDate},</if>
</trim> </trim>
</insert> </insert>

Loading…
Cancel
Save