Commit c5c84b11 by hayden

后台管理系统设备管理-设备状态变更记录:新增筛选条件门店、房间

parent bf60002b
...@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController; ...@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController;
import share.common.core.domain.AjaxResult; import share.common.core.domain.AjaxResult;
import share.common.enums.BusinessType; import share.common.enums.BusinessType;
import share.system.domain.DeviceStatusLog; import share.system.domain.DeviceStatusLog;
import share.system.domain.DeviceStatusLogDto;
import share.system.service.DeviceStatusLogService; import share.system.service.DeviceStatusLogService;
import share.common.utils.poi.ExcelUtil; import share.common.utils.poi.ExcelUtil;
import share.common.core.page.TableDataInfo; import share.common.core.page.TableDataInfo;
...@@ -39,7 +40,7 @@ public class DeviceStatusLogController extends BaseController ...@@ -39,7 +40,7 @@ public class DeviceStatusLogController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('system:statusLog:list')") @PreAuthorize("@ss.hasPermi('system:statusLog:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DeviceStatusLog deviceStatusLog) public TableDataInfo list(DeviceStatusLogDto deviceStatusLog)
{ {
startPage(); startPage();
List<DeviceStatusLog> list = deviceStatusLogService.selectDeviceStatusLogList(deviceStatusLog); List<DeviceStatusLog> list = deviceStatusLogService.selectDeviceStatusLogList(deviceStatusLog);
......
package share.system.domain;
import lombok.Data;
/**
* @author lichenghu
* @date 2024/1/25
*/
@Data
public class DeviceStatusLogDto extends DeviceStatusLog {
/**
* 门店id
*/
private Long storeId;
}
...@@ -27,17 +27,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -27,17 +27,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectDeviceStatusLogList" parameterType="DeviceStatusLog" resultMap="DeviceStatusLogResult"> <select id="selectDeviceStatusLogList" parameterType="DeviceStatusLog" resultMap="DeviceStatusLogResult">
<include refid="selectDeviceStatusLogVo"/> select
t1.id,
t1.dev_id,
t1.dev_mac,
t1.is_abnormal,
t1.status,
t1.room_id,
t1.voltage,
t1.signal_value,
t1.create_time,
t1.update_time,
t1.remark,
t1.operate_log_id,
t1.is_send_sms,
t1.previous_status
from s_device_status_log t1
join s_room t2 on t1.room_id = t2.id
join s_store t3 on t2.store_id = t3.id
<where> <where>
<if test="devId != null and devId != ''"> and dev_id = #{devId}</if> <if test="devId != null and devId != ''">and t1.dev_id = #{devId}</if>
<if test="devMac != null and devMac != ''"> and dev_mac = #{devMac}</if> <if test="devMac != null and devMac != ''">and t1.dev_mac = #{devMac}</if>
<if test="isAbnormal != null "> and is_abnormal = #{isAbnormal}</if> <if test="isAbnormal != null ">and t1.is_abnormal = #{isAbnormal}</if>
<if test="status != null and status != ''"> and status = #{status}</if> <if test="status != null and status != ''">and t1.status = #{status}</if>
<if test="roomId != null "> and room_id = #{roomId}</if> <if test="roomId != null ">and t1.room_id = #{roomId}</if>
<if test="voltage != null and voltage != ''"> and voltage = #{voltage}</if> <if test="voltage != null and voltage != ''">and t1.voltage = #{voltage}</if>
<if test="signalValue != null and signalValue != ''"> and signal_value = #{signalValue}</if> <if test="signalValue != null and signalValue != ''">and t1.signal_value = #{signalValue}</if>
<if test="operateLogId != null "> and operate_log_id = #{operateLogId}</if> <if test="operateLogId != null ">and t1.operate_log_id = #{operateLogId}</if>
<if test="isSendSms != null "> and is_send_sms = #{isSendSms}</if> <if test="isSendSms != null ">and t1.is_send_sms = #{isSendSms}</if>
<if test="roomId != null ">and t2.id = #{roomId}</if>
<if test="storeId != null ">and t3.id = #{storeId}</if>
</where> </where>
order by create_time desc order by create_time desc
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment