Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseer
gxpt_ht
Commits
f1d2b985
Commit
f1d2b985
authored
Jan 25, 2024
by
hayden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台管理系统设备管理-设备网关信息:新增筛选条件门店
parent
8320a55c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
21 deletions
+61
-21
DeviceGatewayController.java
.../share/web/controller/system/DeviceGatewayController.java
+5
-4
DeviceGatewayDto.java
...m/src/main/java/share/system/domain/DeviceGatewayDto.java
+15
-0
DeviceGatewayMapper.xml
.../src/main/resources/mapper/system/DeviceGatewayMapper.xml
+39
-15
DeviceMapper.xml
...-system/src/main/resources/mapper/system/DeviceMapper.xml
+2
-2
No files found.
share-admin/src/main/java/share/web/controller/system/DeviceGatewayController.java
View file @
f1d2b985
...
...
@@ -18,6 +18,7 @@ import share.common.core.domain.AjaxResult;
import
share.common.enums.BusinessType
;
import
share.common.utils.SecurityUtils
;
import
share.system.domain.DeviceGateway
;
import
share.system.domain.DeviceGatewayDto
;
import
share.system.service.DeviceGatewayService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
...
...
@@ -43,10 +44,10 @@ public class DeviceGatewayController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('system:gateway:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
DeviceGateway
deviceGateway
)
public
TableDataInfo
list
(
DeviceGateway
Dto
deviceGatewayDto
)
{
startPage
();
List
<
DeviceGateway
>
list
=
deviceGatewayService
.
selectDeviceGatewayList
(
deviceGateway
);
List
<
DeviceGateway
>
list
=
deviceGatewayService
.
selectDeviceGatewayList
(
deviceGateway
Dto
);
return
getDataTable
(
list
);
}
...
...
@@ -56,10 +57,10 @@ public class DeviceGatewayController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:gateway:export')"
)
@Log
(
title
=
"设备网关信息"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
DeviceGateway
deviceGateway
)
public
void
export
(
HttpServletResponse
response
,
DeviceGateway
Dto
deviceGateway
)
{
List
<
DeviceGateway
>
list
=
deviceGatewayService
.
selectDeviceGatewayList
(
deviceGateway
);
ExcelUtil
<
DeviceGateway
>
util
=
new
ExcelUtil
<
DeviceGateway
>(
DeviceGateway
.
class
);
ExcelUtil
<
DeviceGateway
>
util
=
new
ExcelUtil
<>(
DeviceGateway
.
class
);
util
.
exportExcel
(
response
,
list
,
"设备网关信息数据"
);
}
...
...
share-system/src/main/java/share/system/domain/DeviceGatewayDto.java
0 → 100644
View file @
f1d2b985
package
share
.
system
.
domain
;
import
lombok.Data
;
/**
* @author lichenghu
* @date 2024/1/25
*/
@Data
public
class
DeviceGatewayDto
extends
DeviceGateway
{
/**
* 门店id
*/
private
String
storeId
;
}
share-system/src/main/resources/mapper/system/DeviceGatewayMapper.xml
View file @
f1d2b985
...
...
@@ -36,21 +36,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select
id=
"selectDeviceGatewayList"
parameterType=
"DeviceGateway"
resultMap=
"DeviceGatewayResult"
>
<include
refid=
"selectDeviceGatewayVo"
/>
<where>
<if
test=
"devName != null and devName != ''"
>
and dev_name like concat('%', #{devName}, '%')
</if>
<if
test=
"devMac != null and devMac != ''"
>
and dev_mac = #{devMac}
</if>
<if
test=
"devId != null and devId != ''"
>
and dev_id = #{devId}
</if>
<if
test=
"devPsw != null and devPsw != ''"
>
and dev_psw = #{devPsw}
</if>
<if
test=
"devVer != null and devVer != ''"
>
and dev_ver = #{devVer}
</if>
<if
test=
"devType != null and devType != ''"
>
and dev_type = #{devType}
</if>
<if
test=
"group != null and group != ''"
>
and `group` = #{group}
</if>
<if
test=
"status != null and status != ''"
>
and status = #{status}
</if>
<if
test=
"mqttIp != null and mqttIp != ''"
>
and mqtt_iP = #{mqttIp}
</if>
<if
test=
"mqttPort != null and mqttPort != ''"
>
and mqtt_port = #{mqttPort}
</if>
<if
test=
"mqttUser != null and mqttUser != ''"
>
and mqtt_user = #{mqttUser}
</if>
<if
test=
"mqttPaswd != null and mqttPaswd != ''"
>
and mqtt_paswd = #{mqttPaswd}
</if>
<if
test=
"devPosition != null and devPosition != ''"
>
and dev_position = #{devPosition}
</if>
select
t1.id,
t1.dev_name,
t1.dev_mac,
t1.dev_id,
t1.dev_psw,
t1.dev_ver,
t1.dev_type,
t1.`group`,
t1.status,
t1.mqtt_iP,
t1.mqtt_port,
t1.mqtt_user,
t1.mqtt_paswd,
t1.create_by,
t1.create_time,
t1.update_by,
t1.update_time,
t1.remark,
t1.dev_position,
t1.last_report_date,
t1.last_report_content
from s_device_gateway t1
left join s_store t2 on t1.group = t2.device_group
<where>
<if
test=
"devName != null and devName != ''"
>
and t1.dev_name like concat('%', #{devName}, '%')
</if>
<if
test=
"devMac != null and devMac != ''"
>
and t1.dev_mac = #{devMac}
</if>
<if
test=
"devId != null and devId != ''"
>
and t1.dev_id = #{devId}
</if>
<if
test=
"devPsw != null and devPsw != ''"
>
and t1.dev_psw = #{devPsw}
</if>
<if
test=
"devVer != null and devVer != ''"
>
and t1.dev_ver = #{devVer}
</if>
<if
test=
"devType != null and devType != ''"
>
and t1.dev_type = #{devType}
</if>
<if
test=
"group != null and group != ''"
>
and `groupt1.` = #{group}
</if>
<if
test=
"status != null and status != ''"
>
and t1.status = #{status}
</if>
<if
test=
"mqttIp != null and mqttIp != ''"
>
and t1.mqtt_iP = #{mqttIp}
</if>
<if
test=
"mqttPort != null and mqttPort != ''"
>
and t1.mqtt_port = #{mqttPort}
</if>
<if
test=
"mqttUser != null and mqttUser != ''"
>
and t1.mqtt_user = #{mqttUser}
</if>
<if
test=
"mqttPaswd != null and mqttPaswd != ''"
>
and t1.mqtt_paswd = #{mqttPaswd}
</if>
<if
test=
"devPosition != null and devPosition != ''"
>
and t1.dev_position = #{devPosition}
</if>
<if
test=
"storeId != null"
>
and t2.id = #{storeId}
</if>
</where>
</select>
...
...
share-system/src/main/resources/mapper/system/DeviceMapper.xml
View file @
f1d2b985
...
...
@@ -58,8 +58,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t1.signal_value,
t1.room_id
from s_device t1
join s_room t2 on t1.room_id = t2.id
join s_store t3 on t2.store_id = t3.id
left
join s_room t2 on t1.room_id = t2.id
left
join s_store t3 on t2.store_id = t3.id
<where>
<if
test=
"devName != null and devName != ''"
>
and t1.dev_name like concat('%', #{devName}, '%')
</if>
<if
test=
"devMac != null and devMac != ''"
>
and t1.dev_mac = #{devMac}
</if>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment