提交
This commit is contained in:
@@ -50,6 +50,15 @@ public class SysNoticeController extends BaseController
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/indexList")
|
||||||
|
public TableDataInfo indexList(SysNotice notice)
|
||||||
|
{
|
||||||
|
notice.setDeptId(getDeptId());
|
||||||
|
startPage();
|
||||||
|
List<SysNotice> list = noticeService.selectNoticeList(notice);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据通知公告编号获取详细信息
|
* 根据通知公告编号获取详细信息
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ spring:
|
|||||||
password: pRePNKSeawMMpKpJ
|
password: pRePNKSeawMMpKpJ
|
||||||
# url: jdbc:mysql://192.168.200.53:3306/gongkongbang?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://192.168.200.53:3306/gongkongbang?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
# username: root
|
# username: root
|
||||||
# password: aiot@1234
|
# password: ledo@1234
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
enabled: false # 从数据源开关/默认关闭
|
enabled: false # 从数据源开关/默认关闭
|
||||||
@@ -19,13 +19,13 @@ spring:
|
|||||||
username:
|
username:
|
||||||
password:
|
password:
|
||||||
# TDengine数据库
|
# TDengine数据库
|
||||||
# tdengine-server:
|
tdengine-server:
|
||||||
# enabled: false # 默认不启用TDengine,true=启用,false=不启用
|
enabled: false # 默认不启用TDengine,true=启用,false=不启用
|
||||||
# driverClassName: com.taosdata.jdbc.TSDBDriver
|
driverClassName: com.taosdata.jdbc.TSDBDriver
|
||||||
# url: jdbc:TAOS://xinda:6030/xinda_log?timezone=UTC-8&charset=utf-8
|
url: jdbc:TAOS://1.15.36.7:6041/xinda_log?timezone=UTC-8&charset=utf-8
|
||||||
# username: root
|
username: root
|
||||||
# password: taosdata
|
password: taosdata
|
||||||
# dbName: xinda_log
|
dbName: xinda_log
|
||||||
|
|
||||||
initialSize: 5 # 初始连接数
|
initialSize: 5 # 初始连接数
|
||||||
minIdle: 10 # 最小连接池数量
|
minIdle: 10 # 最小连接池数量
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ spring:
|
|||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://127.0.0.1:3306/gongkongbang?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://177.7.0.11:3306/gongkongbang?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: gongkongbang
|
username: root
|
||||||
password: pRePNKSeawMMpKpJ
|
password: pRePNKSeawMMpKpJ
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
@@ -57,10 +57,10 @@ spring:
|
|||||||
multi-statement-allow: true
|
multi-statement-allow: true
|
||||||
# redis 配置
|
# redis 配置
|
||||||
redis:
|
redis:
|
||||||
host: localhost # 地址
|
host: 177.7.0.10 # 地址
|
||||||
port: 6379 # 端口,默认为6379
|
port: 6379 # 端口,默认为6379
|
||||||
database: 0 # 数据库索引
|
database: 0 # 数据库索引
|
||||||
password: 841503 # 密码
|
password: iot@1234 # 密码
|
||||||
timeout: 10s # 连接超时时间
|
timeout: 10s # 连接超时时间
|
||||||
lettuce:
|
lettuce:
|
||||||
pool:
|
pool:
|
||||||
@@ -70,17 +70,17 @@ spring:
|
|||||||
max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
# mqtt 配置
|
# mqtt 配置
|
||||||
mqtt:
|
mqtt:
|
||||||
username: xinda # 账号(仅用于后端自认证)
|
username: gkb # 账号(仅用于后端自认证)
|
||||||
password: xinda # 密码(仅用于后端自认证)
|
password: 888888 # 密码(仅用于后端自认证)
|
||||||
host-url: tcp://127.0.0.1:1883 # 连接 Emqx 消息服务器地址
|
# host-url: tcp://127.0.0.1:1883 # 连接 Emqx 消息服务器地址
|
||||||
# host-url: tcp://192.168.1.103:1883 # 内置netty mqtt broker地址
|
host-url: tcp://177.7.0.13:1883 # 内置netty mqtt broker地址
|
||||||
client-id: ${random.int} # 客户端Id,不能相同,采用随机数 ${random.value}
|
client-id: ${random.int} # 客户端Id,不能相同,采用随机数 ${random.value}
|
||||||
default-topic: test # 默认主题
|
default-topic: test # 默认主题
|
||||||
timeout: 30 # 超时时间
|
timeout: 30 # 超时时间
|
||||||
keepalive: 30 # 保持连接
|
keepalive: 30 # 保持连接
|
||||||
clearSession: true # 清除会话(设置为false,断开连接,重连后使用原来的会话 保留订阅的主题,能接收离线期间的消息)
|
clearSession: true # 清除会话(设置为false,断开连接,重连后使用原来的会话 保留订阅的主题,能接收离线期间的消息)
|
||||||
general-username: gkb # 用户名
|
gen-username: gkb # 用户名
|
||||||
general-password: 888888
|
gen-password: 888888
|
||||||
# redisson 配置
|
# redisson 配置
|
||||||
redisson:
|
redisson:
|
||||||
# redis key前缀
|
# redis key前缀
|
||||||
@@ -108,8 +108,8 @@ sip:
|
|||||||
enabled: true # 是否启用视频监控SIP,true为启用
|
enabled: true # 是否启用视频监控SIP,true为启用
|
||||||
## 本地调试时,绑定网卡局域网IP,设备在同一局域网,设备接入IP填写绑定IP
|
## 本地调试时,绑定网卡局域网IP,设备在同一局域网,设备接入IP填写绑定IP
|
||||||
## 部署服务端时,默认绑定容器IP,设备接入IP填写服务器公网IP
|
## 部署服务端时,默认绑定容器IP,设备接入IP填写服务器公网IP
|
||||||
ip: 1.14.72.242
|
ip: 177.7.0.15
|
||||||
# ip: 192.168.1.103
|
# ip: 0.0.0.0
|
||||||
port: 5061 # SIP端口(保持默认)
|
port: 5061 # SIP端口(保持默认)
|
||||||
domain: 3402000000 # 由省级、市级、区级、基层编号组成
|
domain: 3402000000 # 由省级、市级、区级、基层编号组成
|
||||||
id: 34020000002000000001 # 同上,另外增加编号,(可保持默认)
|
id: 34020000002000000001 # 同上,另外增加编号,(可保持默认)
|
||||||
@@ -126,7 +126,7 @@ logging:
|
|||||||
# Swagger配置
|
# Swagger配置
|
||||||
swagger:
|
swagger:
|
||||||
enabled: true # 是否开启swagger
|
enabled: true # 是否开启swagger
|
||||||
pathMapping: /prod-api # 请求前缀
|
pathMapping: /prod-api # 请求前缀
|
||||||
|
|
||||||
|
|
||||||
liteflow:
|
liteflow:
|
||||||
|
|||||||
@@ -67,8 +67,14 @@ public class DeviceStatusConsumer {
|
|||||||
device.setIsShadow(0);
|
device.setIsShadow(0);
|
||||||
device.setIsSimulate(0);
|
device.setIsSimulate(0);
|
||||||
device.setLocationWay(1);
|
device.setLocationWay(1);
|
||||||
device.setProductId(147L);
|
if(bo.getSerialNumber().startsWith("FS")){
|
||||||
device.setProductName("测试");
|
device.setProductId(148L);
|
||||||
|
device.setProductName("附属网关");
|
||||||
|
device.setAgenciesId(100L);
|
||||||
|
}else{
|
||||||
|
device.setProductId(147L);
|
||||||
|
device.setProductName("测试");
|
||||||
|
}
|
||||||
device.setSerialNumber(bo.getSerialNumber());
|
device.setSerialNumber(bo.getSerialNumber());
|
||||||
device.setStatus(1);
|
device.setStatus(1);
|
||||||
device.setTenantId(1L);
|
device.setTenantId(1L);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.xinda.common.core.domain.entity.SysUser;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -41,11 +42,13 @@ public class DutyController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询值班管理列表
|
* 查询值班管理列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('itsm:duty:list')")
|
// @PreAuthorize("@ss.hasPermi('itsm:duty:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询值班管理列表")
|
@ApiOperation("查询值班管理列表")
|
||||||
public TableDataInfo list(Duty duty)
|
public TableDataInfo list(Duty duty)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
duty.setTenantId(user.getDeptId());
|
||||||
startPage();
|
startPage();
|
||||||
List<Duty> list = dutyService.selectDutyList(duty);
|
List<Duty> list = dutyService.selectDutyList(duty);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@@ -83,6 +86,8 @@ public class DutyController extends BaseController
|
|||||||
@ApiOperation("新增值班管理")
|
@ApiOperation("新增值班管理")
|
||||||
public AjaxResult add(@RequestBody Duty duty)
|
public AjaxResult add(@RequestBody Duty duty)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
duty.setTenantId(user.getDeptId());
|
||||||
return toAjax(dutyService.insertDuty(duty));
|
return toAjax(dutyService.insertDuty(duty));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.xinda.common.core.domain.entity.SysUser;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -39,11 +40,13 @@ public class ExampleReportController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询例报管理列表
|
* 查询例报管理列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('itsm:report:list')")
|
// @PreAuthorize("@ss.hasPermi('itsm:report:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询例报管理列表")
|
@ApiOperation("查询例报管理列表")
|
||||||
public TableDataInfo list(ExampleReport exampleReport)
|
public TableDataInfo list(ExampleReport exampleReport)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
exampleReport.setTenantId(user.getDeptId());
|
||||||
startPage();
|
startPage();
|
||||||
List<ExampleReport> list = exampleReportService.selectExampleReportList(exampleReport);
|
List<ExampleReport> list = exampleReportService.selectExampleReportList(exampleReport);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@@ -81,6 +84,8 @@ public class ExampleReportController extends BaseController
|
|||||||
@ApiOperation("新增例报管理")
|
@ApiOperation("新增例报管理")
|
||||||
public AjaxResult add(@RequestBody ExampleReport exampleReport)
|
public AjaxResult add(@RequestBody ExampleReport exampleReport)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
exampleReport.setTenantId(user.getDeptId());
|
||||||
return toAjax(exampleReportService.insertExampleReport(exampleReport));
|
return toAjax(exampleReportService.insertExampleReport(exampleReport));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.xinda.common.core.domain.entity.SysUser;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -41,11 +42,13 @@ public class InspectionPlanController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询巡检计划列表
|
* 查询巡检计划列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('itsm:plan:list')")
|
//@PreAuthorize("@ss.hasPermi('itsm:plan:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询巡检计划列表")
|
@ApiOperation("查询巡检计划列表")
|
||||||
public TableDataInfo list(InspectionPlan inspectionPlan)
|
public TableDataInfo list(InspectionPlan inspectionPlan)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
inspectionPlan.setTenantId(user.getDeptId());
|
||||||
startPage();
|
startPage();
|
||||||
List<InspectionPlan> list = inspectionPlanService.selectInspectionPlanList(inspectionPlan);
|
List<InspectionPlan> list = inspectionPlanService.selectInspectionPlanList(inspectionPlan);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@@ -83,6 +86,8 @@ public class InspectionPlanController extends BaseController
|
|||||||
@ApiOperation("新增巡检计划")
|
@ApiOperation("新增巡检计划")
|
||||||
public AjaxResult add(@RequestBody InspectionPlan inspectionPlan)
|
public AjaxResult add(@RequestBody InspectionPlan inspectionPlan)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
inspectionPlan.setTenantId(user.getDeptId());
|
||||||
return toAjax(inspectionPlanService.insertInspectionPlan(inspectionPlan));
|
return toAjax(inspectionPlanService.insertInspectionPlan(inspectionPlan));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.xinda.common.core.domain.entity.SysUser;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -41,11 +42,13 @@ public class InspectionRecordController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询巡检记录列表
|
* 查询巡检记录列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('itsm:record:list')")
|
//@PreAuthorize("@ss.hasPermi('itsm:record:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询巡检记录列表")
|
@ApiOperation("查询巡检记录列表")
|
||||||
public TableDataInfo list(InspectionRecord inspectionRecord)
|
public TableDataInfo list(InspectionRecord inspectionRecord)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
inspectionRecord.setTenantId(user.getDeptId());
|
||||||
startPage();
|
startPage();
|
||||||
List<InspectionRecord> list = inspectionRecordService.selectInspectionRecordList(inspectionRecord);
|
List<InspectionRecord> list = inspectionRecordService.selectInspectionRecordList(inspectionRecord);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@@ -83,6 +86,8 @@ public class InspectionRecordController extends BaseController
|
|||||||
@ApiOperation("新增巡检记录")
|
@ApiOperation("新增巡检记录")
|
||||||
public AjaxResult add(@RequestBody InspectionRecord inspectionRecord)
|
public AjaxResult add(@RequestBody InspectionRecord inspectionRecord)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
inspectionRecord.setTenantId(user.getDeptId());
|
||||||
return toAjax(inspectionRecordService.insertInspectionRecord(inspectionRecord));
|
return toAjax(inspectionRecordService.insertInspectionRecord(inspectionRecord));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.xinda.common.core.domain.entity.SysUser;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -41,11 +42,13 @@ public class PrePlanController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询预案管理列表
|
* 查询预案管理列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('itsm:prePlan:list')")
|
//@PreAuthorize("@ss.hasPermi('itsm:prePlan:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询预案管理列表")
|
@ApiOperation("查询预案管理列表")
|
||||||
public TableDataInfo list(PrePlan prePlan)
|
public TableDataInfo list(PrePlan prePlan)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
prePlan.setTenantId(user.getDeptId());
|
||||||
startPage();
|
startPage();
|
||||||
List<PrePlan> list = prePlanService.selectPrePlanList(prePlan);
|
List<PrePlan> list = prePlanService.selectPrePlanList(prePlan);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@@ -83,6 +86,8 @@ public class PrePlanController extends BaseController
|
|||||||
@ApiOperation("新增预案管理")
|
@ApiOperation("新增预案管理")
|
||||||
public AjaxResult add(@RequestBody PrePlan prePlan)
|
public AjaxResult add(@RequestBody PrePlan prePlan)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
prePlan.setTenantId(user.getDeptId());
|
||||||
return toAjax(prePlanService.insertPrePlan(prePlan));
|
return toAjax(prePlanService.insertPrePlan(prePlan));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.xinda.common.core.domain.entity.SysUser;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -41,11 +42,13 @@ public class ProcessInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询流程管理列表
|
* 查询流程管理列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('itsm:process:list')")
|
//@PreAuthorize("@ss.hasPermi('itsm:process:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询流程管理列表")
|
@ApiOperation("查询流程管理列表")
|
||||||
public TableDataInfo list(ProcessInfo processInfo)
|
public TableDataInfo list(ProcessInfo processInfo)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
processInfo.setTenantId(user.getDeptId());
|
||||||
startPage();
|
startPage();
|
||||||
List<ProcessInfo> list = processInfoService.selectProcessInfoList(processInfo);
|
List<ProcessInfo> list = processInfoService.selectProcessInfoList(processInfo);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@@ -83,6 +86,8 @@ public class ProcessInfoController extends BaseController
|
|||||||
@ApiOperation("新增流程管理")
|
@ApiOperation("新增流程管理")
|
||||||
public AjaxResult add(@RequestBody ProcessInfo processInfo)
|
public AjaxResult add(@RequestBody ProcessInfo processInfo)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
processInfo.setTenantId(user.getDeptId());
|
||||||
return toAjax(processInfoService.insertProcessInfo(processInfo));
|
return toAjax(processInfoService.insertProcessInfo(processInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.xinda.common.core.domain.entity.SysUser;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -41,11 +42,13 @@ public class RegulationInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询制度管理列表
|
* 查询制度管理列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('itsm:regulation:list')")
|
//@PreAuthorize("@ss.hasPermi('itsm:regulation:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询制度管理列表")
|
@ApiOperation("查询制度管理列表")
|
||||||
public TableDataInfo list(RegulationInfo regulationInfo)
|
public TableDataInfo list(RegulationInfo regulationInfo)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
regulationInfo.setTenantId(user.getDeptId());
|
||||||
startPage();
|
startPage();
|
||||||
List<RegulationInfo> list = regulationInfoService.selectRegulationInfoList(regulationInfo);
|
List<RegulationInfo> list = regulationInfoService.selectRegulationInfoList(regulationInfo);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@@ -83,6 +86,8 @@ public class RegulationInfoController extends BaseController
|
|||||||
@ApiOperation("新增制度管理")
|
@ApiOperation("新增制度管理")
|
||||||
public AjaxResult add(@RequestBody RegulationInfo regulationInfo)
|
public AjaxResult add(@RequestBody RegulationInfo regulationInfo)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
regulationInfo.setTenantId(user.getDeptId());
|
||||||
return toAjax(regulationInfoService.insertRegulationInfo(regulationInfo));
|
return toAjax(regulationInfoService.insertRegulationInfo(regulationInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.xinda.common.core.domain.entity.SysUser;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -41,11 +42,13 @@ public class RepairOrderController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询维修工单列表
|
* 查询维修工单列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('itsm:order:list')")
|
//@PreAuthorize("@ss.hasPermi('itsm:order:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询维修工单列表")
|
@ApiOperation("查询维修工单列表")
|
||||||
public TableDataInfo list(RepairOrder repairOrder)
|
public TableDataInfo list(RepairOrder repairOrder)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
repairOrder.setTenantId(user.getDeptId());
|
||||||
startPage();
|
startPage();
|
||||||
List<RepairOrder> list = repairOrderService.selectRepairOrderList(repairOrder);
|
List<RepairOrder> list = repairOrderService.selectRepairOrderList(repairOrder);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@@ -72,6 +75,7 @@ public class RepairOrderController extends BaseController
|
|||||||
@ApiOperation("获取维修工单详细信息")
|
@ApiOperation("获取维修工单详细信息")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
{
|
{
|
||||||
|
|
||||||
return success(repairOrderService.selectRepairOrderById(id));
|
return success(repairOrderService.selectRepairOrderById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,6 +87,8 @@ public class RepairOrderController extends BaseController
|
|||||||
@ApiOperation("新增维修工单")
|
@ApiOperation("新增维修工单")
|
||||||
public AjaxResult add(@RequestBody RepairOrder repairOrder)
|
public AjaxResult add(@RequestBody RepairOrder repairOrder)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
repairOrder.setTenantId(user.getDeptId());
|
||||||
return toAjax(repairOrderService.insertRepairOrder(repairOrder));
|
return toAjax(repairOrderService.insertRepairOrder(repairOrder));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.xinda.common.core.domain.entity.SysUser;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -41,11 +42,13 @@ public class ScheduleController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询调度计划管理列表
|
* 查询调度计划管理列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('itsm:schedule:list')")
|
//@PreAuthorize("@ss.hasPermi('itsm:schedule:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询调度计划管理列表")
|
@ApiOperation("查询调度计划管理列表")
|
||||||
public TableDataInfo list(Schedule schedule)
|
public TableDataInfo list(Schedule schedule)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
schedule.setTenantId(user.getDeptId());
|
||||||
startPage();
|
startPage();
|
||||||
List<Schedule> list = scheduleService.selectScheduleList(schedule);
|
List<Schedule> list = scheduleService.selectScheduleList(schedule);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@@ -83,6 +86,8 @@ public class ScheduleController extends BaseController
|
|||||||
@ApiOperation("新增调度计划管理")
|
@ApiOperation("新增调度计划管理")
|
||||||
public AjaxResult add(@RequestBody Schedule schedule)
|
public AjaxResult add(@RequestBody Schedule schedule)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
schedule.setTenantId(user.getDeptId());
|
||||||
return toAjax(scheduleService.insertSchedule(schedule));
|
return toAjax(scheduleService.insertSchedule(schedule));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.xinda.common.core.domain.entity.SysUser;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -41,11 +42,13 @@ public class StandardInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询作业规范列表
|
* 查询作业规范列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:list')")
|
//@PreAuthorize("@ss.hasPermi('itsm:standard:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询作业规范列表")
|
@ApiOperation("查询作业规范列表")
|
||||||
public TableDataInfo list(StandardInfo standardInfo)
|
public TableDataInfo list(StandardInfo standardInfo)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
standardInfo.setTenantId(user.getDeptId());
|
||||||
startPage();
|
startPage();
|
||||||
List<StandardInfo> list = standardInfoService.selectStandardInfoList(standardInfo);
|
List<StandardInfo> list = standardInfoService.selectStandardInfoList(standardInfo);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@@ -55,7 +58,7 @@ public class StandardInfoController extends BaseController
|
|||||||
* 导出作业规范列表
|
* 导出作业规范列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation("导出作业规范列表")
|
@ApiOperation("导出作业规范列表")
|
||||||
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:export')")
|
@PreAuthorize("@ss.hasPermi('itsm:standard:export')")
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, StandardInfo standardInfo)
|
public void export(HttpServletResponse response, StandardInfo standardInfo)
|
||||||
{
|
{
|
||||||
@@ -67,7 +70,7 @@ public class StandardInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 获取作业规范详细信息
|
* 获取作业规范详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:query')")
|
@PreAuthorize("@ss.hasPermi('itsm:standard:query')")
|
||||||
@GetMapping(value = "/{standardId}")
|
@GetMapping(value = "/{standardId}")
|
||||||
@ApiOperation("获取作业规范详细信息")
|
@ApiOperation("获取作业规范详细信息")
|
||||||
public AjaxResult getInfo(@PathVariable("standardId") Long standardId)
|
public AjaxResult getInfo(@PathVariable("standardId") Long standardId)
|
||||||
@@ -78,18 +81,20 @@ public class StandardInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 新增作业规范
|
* 新增作业规范
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:add')")
|
@PreAuthorize("@ss.hasPermi('itsm:standard:add')")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@ApiOperation("新增作业规范")
|
@ApiOperation("新增作业规范")
|
||||||
public AjaxResult add(@RequestBody StandardInfo standardInfo)
|
public AjaxResult add(@RequestBody StandardInfo standardInfo)
|
||||||
{
|
{
|
||||||
|
SysUser user = getLoginUser().getUser();
|
||||||
|
standardInfo.setTenantId(user.getDeptId());
|
||||||
return toAjax(standardInfoService.insertStandardInfo(standardInfo));
|
return toAjax(standardInfoService.insertStandardInfo(standardInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改作业规范
|
* 修改作业规范
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:edit')")
|
@PreAuthorize("@ss.hasPermi('itsm:standard:edit')")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@ApiOperation("修改作业规范")
|
@ApiOperation("修改作业规范")
|
||||||
public AjaxResult edit(@RequestBody StandardInfo standardInfo)
|
public AjaxResult edit(@RequestBody StandardInfo standardInfo)
|
||||||
@@ -100,7 +105,7 @@ public class StandardInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 删除作业规范
|
* 删除作业规范
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:remove')")
|
@PreAuthorize("@ss.hasPermi('itsm:standard:remove')")
|
||||||
@DeleteMapping("/{standardIds}")
|
@DeleteMapping("/{standardIds}")
|
||||||
@ApiOperation("删除作业规范")
|
@ApiOperation("删除作业规范")
|
||||||
public AjaxResult remove(@PathVariable Long[] standardIds)
|
public AjaxResult remove(@PathVariable Long[] standardIds)
|
||||||
|
|||||||
@@ -52,5 +52,7 @@ private static final long serialVersionUID = 1L;
|
|||||||
@Excel(name = "替班人员")
|
@Excel(name = "替班人员")
|
||||||
@ApiModelProperty("替班人员")
|
@ApiModelProperty("替班人员")
|
||||||
private String relief;
|
private String relief;
|
||||||
|
/** 租户id */
|
||||||
|
@Excel(name = "租户id")
|
||||||
|
private Long tenantId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,5 +66,7 @@ private static final long serialVersionUID = 1L;
|
|||||||
@Excel(name = "结束日期", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "结束日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
@ApiModelProperty("结束日期")
|
@ApiModelProperty("结束日期")
|
||||||
private Date endDate;
|
private Date endDate;
|
||||||
|
/** 租户id */
|
||||||
|
@Excel(name = "租户id")
|
||||||
|
private Long tenantId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,5 +81,7 @@ private static final long serialVersionUID = 1L;
|
|||||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||||
@ApiModelProperty("状态")
|
@ApiModelProperty("状态")
|
||||||
private String status;
|
private String status;
|
||||||
|
/** 租户id */
|
||||||
|
@Excel(name = "租户id")
|
||||||
|
private Long tenantId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,4 +87,7 @@ private static final long serialVersionUID = 1L;
|
|||||||
@ApiModelProperty("巡检备注")
|
@ApiModelProperty("巡检备注")
|
||||||
private String inspectionRemark;
|
private String inspectionRemark;
|
||||||
|
|
||||||
|
/** 租户id */
|
||||||
|
@Excel(name = "租户id")
|
||||||
|
private Long tenantId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,5 +57,7 @@ private static final long serialVersionUID = 1L;
|
|||||||
@Excel(name = "预案关键词")
|
@Excel(name = "预案关键词")
|
||||||
@ApiModelProperty("预案关键词")
|
@ApiModelProperty("预案关键词")
|
||||||
private String keywords;
|
private String keywords;
|
||||||
|
/** 租户id */
|
||||||
|
@Excel(name = "租户id")
|
||||||
|
private Long tenantId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,5 +50,7 @@ private static final long serialVersionUID = 1L;
|
|||||||
@Excel(name = "处理人")
|
@Excel(name = "处理人")
|
||||||
@ApiModelProperty("处理人")
|
@ApiModelProperty("处理人")
|
||||||
private Long handlePerson;
|
private Long handlePerson;
|
||||||
|
/** 租户id */
|
||||||
|
@Excel(name = "租户id")
|
||||||
|
private Long tenantId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,5 +55,7 @@ private static final long serialVersionUID = 1L;
|
|||||||
@Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
@ApiModelProperty("上传时间")
|
@ApiModelProperty("上传时间")
|
||||||
private Date uploadTime;
|
private Date uploadTime;
|
||||||
|
/** 租户id */
|
||||||
|
@Excel(name = "租户id")
|
||||||
|
private Long tenantId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,5 +78,7 @@ private static final long serialVersionUID = 1L;
|
|||||||
@Excel(name = "工单备注")
|
@Excel(name = "工单备注")
|
||||||
@ApiModelProperty("工单备注")
|
@ApiModelProperty("工单备注")
|
||||||
private String orderRemark;
|
private String orderRemark;
|
||||||
|
/** 租户id */
|
||||||
|
@Excel(name = "租户id")
|
||||||
|
private Long tenantId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,5 +128,7 @@ private static final long serialVersionUID = 1L;
|
|||||||
@Excel(name = "负责人")
|
@Excel(name = "负责人")
|
||||||
@ApiModelProperty("负责人")
|
@ApiModelProperty("负责人")
|
||||||
private String head;
|
private String head;
|
||||||
|
/** 租户id */
|
||||||
|
@Excel(name = "租户id")
|
||||||
|
private Long tenantId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,5 +42,7 @@ private static final long serialVersionUID = 1L;
|
|||||||
@Excel(name = "规范文件")
|
@Excel(name = "规范文件")
|
||||||
@ApiModelProperty("规范文件")
|
@ApiModelProperty("规范文件")
|
||||||
private String docOssId;
|
private String docOssId;
|
||||||
|
/** 租户id */
|
||||||
|
@Excel(name = "租户id")
|
||||||
|
private Long tenantId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService
|
|||||||
processDateRange(inspectionPlan.getStartDate(), inspectionPlan.getEndDate(), dateList::add);
|
processDateRange(inspectionPlan.getStartDate(), inspectionPlan.getEndDate(), dateList::add);
|
||||||
for(Date date : dateList){
|
for(Date date : dateList){
|
||||||
InspectionRecord inspectionRecord = getBasicRecord(inspectionPlan, date, "日");
|
InspectionRecord inspectionRecord = getBasicRecord(inspectionPlan, date, "日");
|
||||||
|
inspectionRecord.setTenantId(inspectionPlan.getTenantId());
|
||||||
inspectionRecord.setCreateTime(DateUtils.getNowDate());
|
inspectionRecord.setCreateTime(DateUtils.getNowDate());
|
||||||
inspectionRecord.setCreateBy(loginUser.getUsername());
|
inspectionRecord.setCreateBy(loginUser.getUsername());
|
||||||
inspectionRecordMapper.insertInspectionRecord(inspectionRecord);
|
inspectionRecordMapper.insertInspectionRecord(inspectionRecord);
|
||||||
@@ -153,6 +154,7 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService
|
|||||||
record.setInspectionPerson(inspectionPlan.getInspectionPerson());
|
record.setInspectionPerson(inspectionPlan.getInspectionPerson());
|
||||||
record.setPlanId(inspectionPlan.getId());
|
record.setPlanId(inspectionPlan.getId());
|
||||||
record.setUserId(inspectionPlan.getUserId());
|
record.setUserId(inspectionPlan.getUserId());
|
||||||
|
record.setTenantId(inspectionPlan.getTenantId());
|
||||||
record.setInspectionCycle(cycle);
|
record.setInspectionCycle(cycle);
|
||||||
record.setCycle(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, now));
|
record.setCycle(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, now));
|
||||||
return record;
|
return record;
|
||||||
|
|||||||
@@ -17,10 +17,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="tenantId" column="tenant_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectDutyVo">
|
<sql id="selectDutyVo">
|
||||||
select duty_id, duty_date, on_duty, duty_period, type, status, relief, remark, create_by, create_time, update_by, update_time from duty
|
select duty_id, duty_date, on_duty, duty_period, type, status, relief, remark, create_by, create_time, update_by, update_time,tenant_id from duty
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDutyList" parameterType="Duty" resultMap="DutyResult">
|
<select id="selectDutyList" parameterType="Duty" resultMap="DutyResult">
|
||||||
@@ -32,6 +33,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
<if test="relief != null and relief != ''"> and relief = #{relief}</if>
|
<if test="relief != null and relief != ''"> and relief = #{relief}</if>
|
||||||
|
<if test="tenantId != null ">
|
||||||
|
and ( tenant_id in (SELECT dept_id FROM sys_dept
|
||||||
|
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
|
||||||
|
)
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -55,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="tenantId != null">tenant_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="dutyId != null">#{dutyId},</if>
|
<if test="dutyId != null">#{dutyId},</if>
|
||||||
@@ -69,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="tenantId != null">#{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -86,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where duty_id = #{dutyId}
|
where duty_id = #{dutyId}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="startDate" column="start_date" />
|
<result property="startDate" column="start_date" />
|
||||||
<result property="endDate" column="end_date" />
|
<result property="endDate" column="end_date" />
|
||||||
|
<result property="tenantId" column="tenant_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectExampleReportVo">
|
<sql id="selectExampleReportVo">
|
||||||
@@ -35,6 +36,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="receiver != null and receiver != ''"> and receiver = #{receiver}</if>
|
<if test="receiver != null and receiver != ''"> and receiver = #{receiver}</if>
|
||||||
<if test="startDate != null "> and start_date = #{startDate}</if>
|
<if test="startDate != null "> and start_date = #{startDate}</if>
|
||||||
<if test="endDate != null "> and end_date = #{endDate}</if>
|
<if test="endDate != null "> and end_date = #{endDate}</if>
|
||||||
|
<if test="tenantId != null ">
|
||||||
|
and ( tenant_id in (SELECT dept_id FROM sys_dept
|
||||||
|
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
|
||||||
|
)
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -59,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
<if test="startDate != null">start_date,</if>
|
<if test="startDate != null">start_date,</if>
|
||||||
<if test="endDate != null">end_date,</if>
|
<if test="endDate != null">end_date,</if>
|
||||||
|
<if test="tenantId != null">tenant_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="exampleReportId != null">#{exampleReportId},</if>
|
<if test="exampleReportId != null">#{exampleReportId},</if>
|
||||||
@@ -74,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
<if test="startDate != null">#{startDate},</if>
|
<if test="startDate != null">#{startDate},</if>
|
||||||
<if test="endDate != null">#{endDate},</if>
|
<if test="endDate != null">#{endDate},</if>
|
||||||
|
<if test="tenantId != null">#{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -92,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="startDate != null">start_date = #{startDate},</if>
|
<if test="startDate != null">start_date = #{startDate},</if>
|
||||||
<if test="endDate != null">end_date = #{endDate},</if>
|
<if test="endDate != null">end_date = #{endDate},</if>
|
||||||
|
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where example_report_id = #{exampleReportId}
|
where example_report_id = #{exampleReportId}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -22,10 +22,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="tenantId" column="tenant_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectInspectionPlanVo">
|
<sql id="selectInspectionPlanVo">
|
||||||
select id, plan_name, plan_content, project_name, start_date, end_date, inspection_cycle, inspection_person,inspection, user_id, set_date, set_time, status, create_by, create_time, update_by, update_time from inspection_plan
|
select id, plan_name, plan_content, project_name, start_date, end_date, inspection_cycle, inspection_person,inspection, user_id, set_date, set_time, status, create_by, create_time, update_by, update_time,tenant_id from inspection_plan
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectInspectionPlanList" parameterType="InspectionPlan" resultMap="InspectionPlanResult">
|
<select id="selectInspectionPlanList" parameterType="InspectionPlan" resultMap="InspectionPlanResult">
|
||||||
@@ -43,6 +44,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="setDate != null and setDate != ''"> and set_date = #{setDate}</if>
|
<if test="setDate != null and setDate != ''"> and set_date = #{setDate}</if>
|
||||||
<if test="setTime != null and setTime != ''"> and set_time = #{setTime}</if>
|
<if test="setTime != null and setTime != ''"> and set_time = #{setTime}</if>
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
|
<if test="tenantId != null ">
|
||||||
|
and ( tenant_id in (SELECT dept_id FROM sys_dept
|
||||||
|
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
|
||||||
|
)
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -71,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="tenantId != null">tenant_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">#{id},</if>
|
<if test="id != null">#{id},</if>
|
||||||
@@ -90,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="tenantId != null">#{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -112,6 +120,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
||||||
|
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -22,10 +22,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="tenantId" column="tenant_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectInspectionRecordVo">
|
<sql id="selectInspectionRecordVo">
|
||||||
select id, plan_id, plan_name, plan_content, project_name, plan_time, inspection_time, inspection_person, user_id, inspection_cycle, cycle, inspection_status, inspection_remark, create_by, create_time, update_by, update_time from inspection_record
|
select id, plan_id, plan_name, plan_content, project_name, plan_time, inspection_time, inspection_person, user_id, inspection_cycle, cycle, inspection_status, inspection_remark, create_by, create_time, update_by, update_time,tenant_id from inspection_record
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectInspectionRecordList" parameterType="InspectionRecord" resultMap="InspectionRecordResult">
|
<select id="selectInspectionRecordList" parameterType="InspectionRecord" resultMap="InspectionRecordResult">
|
||||||
@@ -43,6 +44,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="cycle != null and cycle != ''"> and cycle = #{cycle}</if>
|
<if test="cycle != null and cycle != ''"> and cycle = #{cycle}</if>
|
||||||
<if test="inspectionStatus != null and inspectionStatus != ''"> and inspection_status = #{inspectionStatus}</if>
|
<if test="inspectionStatus != null and inspectionStatus != ''"> and inspection_status = #{inspectionStatus}</if>
|
||||||
<if test="inspectionRemark != null and inspectionRemark != ''"> and inspection_remark = #{inspectionRemark}</if>
|
<if test="inspectionRemark != null and inspectionRemark != ''"> and inspection_remark = #{inspectionRemark}</if>
|
||||||
|
<if test="tenantId != null ">
|
||||||
|
and ( tenant_id in (SELECT dept_id FROM sys_dept
|
||||||
|
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
|
||||||
|
)
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -71,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="tenantId != null">tenant_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">#{id},</if>
|
<if test="id != null">#{id},</if>
|
||||||
@@ -90,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="tenantId != null">#{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -112,6 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -17,10 +17,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="tenantId" column="tenant_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectPrePlanVo">
|
<sql id="selectPrePlanVo">
|
||||||
select pre_plan_id, number, type, station, device, content, prepared_by, keywords, create_by, create_time, update_by, update_time from pre_plan
|
select pre_plan_id, number, type, station, device, content, prepared_by, keywords, create_by, create_time, update_by, update_time,tenant_id from pre_plan
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectPrePlanList" parameterType="PrePlan" resultMap="PrePlanResult">
|
<select id="selectPrePlanList" parameterType="PrePlan" resultMap="PrePlanResult">
|
||||||
@@ -33,6 +34,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="content != null and content != ''"> and content = #{content}</if>
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||||
<if test="preparedBy != null and preparedBy != ''"> and prepared_by = #{preparedBy}</if>
|
<if test="preparedBy != null and preparedBy != ''"> and prepared_by = #{preparedBy}</if>
|
||||||
<if test="keywords != null and keywords != ''"> and keywords = #{keywords}</if>
|
<if test="keywords != null and keywords != ''"> and keywords = #{keywords}</if>
|
||||||
|
<if test="tenantId != null ">
|
||||||
|
and ( tenant_id in (SELECT dept_id FROM sys_dept
|
||||||
|
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
|
||||||
|
)
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -56,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="tenantId != null">tenant_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="prePlanId != null">#{prePlanId},</if>
|
<if test="prePlanId != null">#{prePlanId},</if>
|
||||||
@@ -70,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="tenantId != null">#{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -87,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where pre_plan_id = #{prePlanId}
|
where pre_plan_id = #{prePlanId}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -16,10 +16,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="tenantId" column="tenant_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectProcessInfoVo">
|
<sql id="selectProcessInfoVo">
|
||||||
select process_id, event_name, event_type, touch_time, handle_result, handle_person, remark, create_by, create_time, update_by, update_time from process_info
|
select process_id, event_name, event_type, touch_time, handle_result, handle_person, remark, create_by, create_time, update_by, update_time,tenant_id from process_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectProcessInfoList" parameterType="ProcessInfo" resultMap="ProcessInfoResult">
|
<select id="selectProcessInfoList" parameterType="ProcessInfo" resultMap="ProcessInfoResult">
|
||||||
@@ -30,6 +31,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="touchTime != null "> and touch_time = #{touchTime}</if>
|
<if test="touchTime != null "> and touch_time = #{touchTime}</if>
|
||||||
<if test="handleResult != null and handleResult != ''"> and handle_result = #{handleResult}</if>
|
<if test="handleResult != null and handleResult != ''"> and handle_result = #{handleResult}</if>
|
||||||
<if test="handlePerson != null "> and handle_person = #{handlePerson}</if>
|
<if test="handlePerson != null "> and handle_person = #{handlePerson}</if>
|
||||||
|
<if test="tenantId != null ">
|
||||||
|
and ( tenant_id in (SELECT dept_id FROM sys_dept
|
||||||
|
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
|
||||||
|
)
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -52,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="tenantId != null">tenant_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="processId != null">#{processId},</if>
|
<if test="processId != null">#{processId},</if>
|
||||||
@@ -65,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="tenantId != null">#{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -81,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where process_id = #{processId}
|
where process_id = #{processId}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -17,10 +17,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="tenantId" column="tenant_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectRegulationInfoVo">
|
<sql id="selectRegulationInfoVo">
|
||||||
select regulation_id, regulation_code, regulation_name, regulation_describe, regulation_type, doc_oss_id, upload_time, remark, create_by, create_time, update_by, update_time from regulation_info
|
select regulation_id, regulation_code, regulation_name, regulation_describe, regulation_type, doc_oss_id, upload_time, remark, create_by, create_time, update_by, update_time,tenant_id from regulation_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectRegulationInfoList" parameterType="RegulationInfo" resultMap="RegulationInfoResult">
|
<select id="selectRegulationInfoList" parameterType="RegulationInfo" resultMap="RegulationInfoResult">
|
||||||
@@ -32,6 +33,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="regulationType != null and regulationType != ''"> and regulation_type = #{regulationType}</if>
|
<if test="regulationType != null and regulationType != ''"> and regulation_type = #{regulationType}</if>
|
||||||
<if test="docOssId != null and docOssId != ''"> and doc_oss_id = #{docOssId}</if>
|
<if test="docOssId != null and docOssId != ''"> and doc_oss_id = #{docOssId}</if>
|
||||||
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
|
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
|
||||||
|
<if test="tenantId != null ">
|
||||||
|
and ( tenant_id in (SELECT dept_id FROM sys_dept
|
||||||
|
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
|
||||||
|
)
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -55,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="tenantId != null">tenant_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="regulationId != null">#{regulationId},</if>
|
<if test="regulationId != null">#{regulationId},</if>
|
||||||
@@ -69,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="tenantId != null">#{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -86,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where regulation_id = #{regulationId}
|
where regulation_id = #{regulationId}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -21,10 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="tenantId" column="tenant_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectRepairOrderVo">
|
<sql id="selectRepairOrderVo">
|
||||||
select id, order_no, order_content, project_name, assign_time, finish_time, finish_by,respon, annex, user_id, order_status, order_remark, create_by, create_time, update_by, update_time from repair_order
|
select id, order_no, order_content, project_name, assign_time, finish_time, finish_by,respon, annex, user_id, order_status, order_remark, create_by, create_time, update_by, update_time,tenant_id from repair_order
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectRepairOrderList" parameterType="RepairOrder" resultMap="RepairOrderResult">
|
<select id="selectRepairOrderList" parameterType="RepairOrder" resultMap="RepairOrderResult">
|
||||||
@@ -41,6 +42,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="userId != null "> and user_id = #{userId}</if>
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||||||
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
|
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
|
||||||
<if test="orderRemark != null and orderRemark != ''"> and order_remark = #{orderRemark}</if>
|
<if test="orderRemark != null and orderRemark != ''"> and order_remark = #{orderRemark}</if>
|
||||||
|
<if test="tenantId != null ">
|
||||||
|
and ( tenant_id in (SELECT dept_id FROM sys_dept
|
||||||
|
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
|
||||||
|
)
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -68,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="tenantId != null">tenant_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">#{id},</if>
|
<if test="id != null">#{id},</if>
|
||||||
@@ -86,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="tenantId != null">#{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -107,6 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -31,10 +31,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="tenantId" column="tenant_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectScheduleVo">
|
<sql id="selectScheduleVo">
|
||||||
select schedule_id, number, type, cycle, station, status, is_timeout, name, source, content, start_time, end_time, first_reminder, second_reminder, operator, commencement_time, terminator, resolution_time, resolution_content, prepared_by, head, remark, create_by, create_time, update_by, update_time from schedule
|
select schedule_id, number, type, cycle, station, status, is_timeout, name, source, content, start_time, end_time, first_reminder, second_reminder, operator, commencement_time, terminator, resolution_time, resolution_content, prepared_by, head, remark, create_by, create_time, update_by, update_time,tenant_id from schedule
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectScheduleList" parameterType="Schedule" resultMap="ScheduleResult">
|
<select id="selectScheduleList" parameterType="Schedule" resultMap="ScheduleResult">
|
||||||
@@ -60,6 +61,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="resolutionContent != null and resolutionContent != ''"> and resolution_content = #{resolutionContent}</if>
|
<if test="resolutionContent != null and resolutionContent != ''"> and resolution_content = #{resolutionContent}</if>
|
||||||
<if test="preparedBy != null and preparedBy != ''"> and prepared_by = #{preparedBy}</if>
|
<if test="preparedBy != null and preparedBy != ''"> and prepared_by = #{preparedBy}</if>
|
||||||
<if test="head != null and head != ''"> and head = #{head}</if>
|
<if test="head != null and head != ''"> and head = #{head}</if>
|
||||||
|
<if test="tenantId != null ">
|
||||||
|
and ( tenant_id in (SELECT dept_id FROM sys_dept
|
||||||
|
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
|
||||||
|
)
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -97,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="tenantId != null">tenant_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="scheduleId != null">#{scheduleId},</if>
|
<if test="scheduleId != null">#{scheduleId},</if>
|
||||||
@@ -125,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="tenantId != null">#{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -156,6 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where schedule_id = #{scheduleId}
|
where schedule_id = #{scheduleId}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -15,10 +15,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="tenantId" column="tenant_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectStandardInfoVo">
|
<sql id="selectStandardInfoVo">
|
||||||
select standard_id, standard_code, standard_name, standard_describe, doc_oss_id, remark, create_by, create_time, update_by, update_time from standard_info
|
select standard_id, standard_code, standard_name, standard_describe, doc_oss_id, remark, create_by, create_time, update_by, update_time,tenant_id from standard_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectStandardInfoList" parameterType="StandardInfo" resultMap="StandardInfoResult">
|
<select id="selectStandardInfoList" parameterType="StandardInfo" resultMap="StandardInfoResult">
|
||||||
@@ -28,6 +29,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="standardName != null and standardName != ''"> and standard_name like concat('%', #{standardName}, '%')</if>
|
<if test="standardName != null and standardName != ''"> and standard_name like concat('%', #{standardName}, '%')</if>
|
||||||
<if test="standardDescribe != null and standardDescribe != ''"> and standard_describe = #{standardDescribe}</if>
|
<if test="standardDescribe != null and standardDescribe != ''"> and standard_describe = #{standardDescribe}</if>
|
||||||
<if test="docOssId != null and docOssId != ''"> and doc_oss_id = #{docOssId}</if>
|
<if test="docOssId != null and docOssId != ''"> and doc_oss_id = #{docOssId}</if>
|
||||||
|
<if test="tenantId != null ">
|
||||||
|
and ( tenant_id in (SELECT dept_id FROM sys_dept
|
||||||
|
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
|
||||||
|
)
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -49,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="tenantId != null">tenant_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="standardId != null">#{standardId},</if>
|
<if test="standardId != null">#{standardId},</if>
|
||||||
@@ -61,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="tenantId != null">#{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -76,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where standard_id = #{standardId}
|
where standard_id = #{standardId}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -0,0 +1,110 @@
|
|||||||
|
package com.xinda.data.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.xinda.common.annotation.Log;
|
||||||
|
import com.xinda.common.core.controller.BaseController;
|
||||||
|
import com.xinda.common.core.domain.AjaxResult;
|
||||||
|
import com.xinda.common.enums.BusinessType;
|
||||||
|
import com.xinda.iot.domain.DeviceDoc;
|
||||||
|
import com.xinda.iot.service.IDeviceDocService;
|
||||||
|
import com.xinda.common.utils.poi.ExcelUtil;
|
||||||
|
import com.xinda.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备档案管理Controller
|
||||||
|
*
|
||||||
|
* @author leed
|
||||||
|
* @date 2025-07-13
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/iot/deviecDoc")
|
||||||
|
@Api(tags = "设备档案管理")
|
||||||
|
public class DeviceDocController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IDeviceDocService deviceDocService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设备档案管理列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('iot:deviecDoc:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
@ApiOperation("查询设备档案管理列表")
|
||||||
|
public TableDataInfo list(DeviceDoc deviceDoc)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<DeviceDoc> list = deviceDocService.selectDeviceDocList(deviceDoc);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出设备档案管理列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("导出设备档案管理列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('iot:deviecDoc:export')")
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, DeviceDoc deviceDoc)
|
||||||
|
{
|
||||||
|
List<DeviceDoc> list = deviceDocService.selectDeviceDocList(deviceDoc);
|
||||||
|
ExcelUtil<DeviceDoc> util = new ExcelUtil<DeviceDoc>(DeviceDoc.class);
|
||||||
|
util.exportExcel(response, list, "设备档案管理数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取设备档案管理详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('iot:deviecDoc:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
@ApiOperation("获取设备档案管理详细信息")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(deviceDocService.selectDeviceDocById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设备档案管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('iot:deviecDoc:add')")
|
||||||
|
@PostMapping
|
||||||
|
@ApiOperation("新增设备档案管理")
|
||||||
|
public AjaxResult add(@RequestBody DeviceDoc deviceDoc)
|
||||||
|
{
|
||||||
|
return toAjax(deviceDocService.insertDeviceDoc(deviceDoc));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设备档案管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('iot:deviecDoc:edit')")
|
||||||
|
@PutMapping
|
||||||
|
@ApiOperation("修改设备档案管理")
|
||||||
|
public AjaxResult edit(@RequestBody DeviceDoc deviceDoc)
|
||||||
|
{
|
||||||
|
return toAjax(deviceDocService.updateDeviceDoc(deviceDoc));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除设备档案管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('iot:deviecDoc:remove')")
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
@ApiOperation("删除设备档案管理")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(deviceDocService.deleteDeviceDocByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -294,11 +294,22 @@ public class IECF6113ProtocolService implements IProtocol {
|
|||||||
callBack.setSources(msg);
|
callBack.setSources(msg);
|
||||||
callBack.setMessage(msg.getBytes());
|
callBack.setMessage(msg.getBytes());
|
||||||
}
|
}
|
||||||
|
// if (params.containsKey("TIME")) {
|
||||||
|
// String msg = "GKB29810,JCZ,{\"TIME\":" + params.get("TIME") + "}";
|
||||||
|
// callBack.setSources(msg);
|
||||||
|
// callBack.setMessage(msg.getBytes());
|
||||||
|
// }
|
||||||
if (params.containsKey("TIME")) {
|
if (params.containsKey("TIME")) {
|
||||||
|
String msg = "GKB29810,time,{\"TIME\":" + params.get("TIME") + "}";
|
||||||
|
callBack.setSources(msg);
|
||||||
|
callBack.setMessage(msg.getBytes());
|
||||||
|
}
|
||||||
|
if (params.containsKey("JCZ")) {
|
||||||
String msg = "GKB29810,JCZ,{\"TIME\":" + params.get("TIME") + "}";
|
String msg = "GKB29810,JCZ,{\"TIME\":" + params.get("TIME") + "}";
|
||||||
callBack.setSources(msg);
|
callBack.setSources(msg);
|
||||||
callBack.setMessage(msg.getBytes());
|
callBack.setMessage(msg.getBytes());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 调用方法检查并获取以前缀开头的键和值
|
// 调用方法检查并获取以前缀开头的键和值
|
||||||
Map<String, Object> result = getKeysAndValuesWithPrefix(params, "Q0.");
|
Map<String, Object> result = getKeysAndValuesWithPrefix(params, "Q0.");
|
||||||
// 输出结果
|
// 输出结果
|
||||||
|
|||||||
@@ -0,0 +1,180 @@
|
|||||||
|
//package com.xinda.mqtt.server;
|
||||||
|
//
|
||||||
|
////import com.xinda.server.Server;
|
||||||
|
////import com.xinda.mqtt.handler.adapter.MqttMessageAdapter;
|
||||||
|
////import io.netty.bootstrap.AbstractBootstrap;
|
||||||
|
////import io.netty.bootstrap.ServerBootstrap;
|
||||||
|
////import io.netty.channel.ChannelInitializer;
|
||||||
|
////import io.netty.channel.ChannelOption;
|
||||||
|
////import io.netty.channel.EventLoopGroup;
|
||||||
|
////import io.netty.channel.nio.NioEventLoopGroup;
|
||||||
|
////import io.netty.channel.socket.nio.NioServerSocketChannel;
|
||||||
|
////import io.netty.channel.socket.nio.NioSocketChannel;
|
||||||
|
////import io.netty.handler.codec.mqtt.MqttDecoder;
|
||||||
|
////import io.netty.handler.codec.mqtt.MqttEncoder;
|
||||||
|
////import io.netty.handler.logging.LogLevel;
|
||||||
|
////import io.netty.handler.logging.LoggingHandler;
|
||||||
|
////import io.netty.handler.timeout.IdleStateHandler;
|
||||||
|
////import io.netty.util.concurrent.DefaultThreadFactory;
|
||||||
|
////import lombok.extern.slf4j.Slf4j;
|
||||||
|
////import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
////import org.springframework.stereotype.Component;
|
||||||
|
////
|
||||||
|
////import java.util.concurrent.*;
|
||||||
|
////
|
||||||
|
////@Component
|
||||||
|
////@Slf4j
|
||||||
|
////public class MqttServer extends Server {
|
||||||
|
////
|
||||||
|
//// @Autowired
|
||||||
|
//// private MqttMessageAdapter messageAdapter;
|
||||||
|
////
|
||||||
|
//// private EventLoopGroup bossGroup;
|
||||||
|
//// private EventLoopGroup workerGroup;
|
||||||
|
////
|
||||||
|
//// @Override
|
||||||
|
//// protected AbstractBootstrap initialize() {
|
||||||
|
//// int bossThreads = 1;
|
||||||
|
//// // Increase worker threads based on CPU cores and expected load
|
||||||
|
//// int workerThreads = Runtime.getRuntime().availableProcessors() * 4;
|
||||||
|
////
|
||||||
|
//// bossGroup = new NioEventLoopGroup(bossThreads, new DefaultThreadFactory("MQTT-Boss", Thread.MAX_PRIORITY));
|
||||||
|
//// workerGroup = new NioEventLoopGroup(workerThreads, new DefaultThreadFactory("MQTT-Worker", Thread.MAX_PRIORITY));
|
||||||
|
////
|
||||||
|
//// if (config.businessCore > 0) {
|
||||||
|
//// businessService = new ThreadPoolExecutor(
|
||||||
|
//// config.businessCore,
|
||||||
|
//// config.businessCore * 2, // Allow some extra threads for bursty workloads
|
||||||
|
//// 60L, TimeUnit.SECONDS, // Keep idle threads alive longer
|
||||||
|
//// new LinkedBlockingQueue<>(2048), // Increase queue length
|
||||||
|
//// new DefaultThreadFactory("MQTT-Business", true, Thread.NORM_PRIORITY),
|
||||||
|
//// new ThreadPoolExecutor.CallerRunsPolicy()); // Queue full policy
|
||||||
|
//// }
|
||||||
|
////
|
||||||
|
//// return new ServerBootstrap()
|
||||||
|
//// .group(bossGroup, workerGroup)
|
||||||
|
//// .channel(NioServerSocketChannel.class)
|
||||||
|
//// .handler(new LoggingHandler(LogLevel.INFO))
|
||||||
|
//// .option(ChannelOption.SO_BACKLOG, 2048) // Increase backlog
|
||||||
|
//// .childOption(ChannelOption.SO_KEEPALIVE, Boolean.TRUE)
|
||||||
|
//// .childOption(ChannelOption.TCP_NODELAY, true)
|
||||||
|
//// .childOption(ChannelOption.SO_SNDBUF, 2 * 1024 * 1024) // Increase send buffer size
|
||||||
|
//// .childOption(ChannelOption.SO_RCVBUF, 2 * 1024 * 1024) // Increase receive buffer size
|
||||||
|
//// .childHandler(new ChannelInitializer<NioSocketChannel>() {
|
||||||
|
//// @Override
|
||||||
|
//// protected void initChannel(NioSocketChannel channel) {
|
||||||
|
//// channel.pipeline()
|
||||||
|
//// .addFirst(new IdleStateHandler(config.readerIdleTime, config.writerIdleTime, config.allIdleTime, TimeUnit.SECONDS))
|
||||||
|
//// .addLast(new MqttDecoder(2 * 1024 * 1024 * 2)) // Increase max frame length
|
||||||
|
//// .addLast(MqttEncoder.INSTANCE)
|
||||||
|
//// .addLast(messageAdapter);
|
||||||
|
//// }
|
||||||
|
//// });
|
||||||
|
//// }
|
||||||
|
//
|
||||||
|
//import com.xinda.mqtt.handler.adapter.MqttMessageAdapter;
|
||||||
|
//import com.xinda.server.Server;
|
||||||
|
//import io.netty.bootstrap.AbstractBootstrap;
|
||||||
|
//import io.netty.bootstrap.ServerBootstrap;
|
||||||
|
//import io.netty.channel.ChannelInitializer;
|
||||||
|
//import io.netty.channel.ChannelOption;
|
||||||
|
//import io.netty.channel.EventLoopGroup;
|
||||||
|
//import io.netty.channel.nio.NioEventLoopGroup;
|
||||||
|
//import io.netty.channel.socket.nio.NioServerSocketChannel;
|
||||||
|
//import io.netty.channel.socket.nio.NioSocketChannel;
|
||||||
|
//import io.netty.handler.codec.mqtt.MqttDecoder;
|
||||||
|
//import io.netty.handler.codec.mqtt.MqttEncoder;
|
||||||
|
//import io.netty.handler.logging.LogLevel;
|
||||||
|
//import io.netty.handler.logging.LoggingHandler;
|
||||||
|
//import io.netty.handler.timeout.IdleStateHandler;
|
||||||
|
//import io.netty.util.concurrent.DefaultThreadFactory;
|
||||||
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
|
//import java.util.concurrent.LinkedBlockingQueue;
|
||||||
|
//import java.util.concurrent.ThreadPoolExecutor;
|
||||||
|
//import java.util.concurrent.TimeUnit;
|
||||||
|
//
|
||||||
|
//@Component
|
||||||
|
//@Slf4j
|
||||||
|
//public class MqttServer1 extends Server {
|
||||||
|
//
|
||||||
|
// @Autowired
|
||||||
|
// private MqttMessageAdapter messageAdapter;
|
||||||
|
//
|
||||||
|
// private EventLoopGroup bossGroup;
|
||||||
|
// private EventLoopGroup workerGroup;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// protected AbstractBootstrap initialize() {
|
||||||
|
// int bossThreads = 1;
|
||||||
|
// int workerThreads = Runtime.getRuntime().availableProcessors() * 2;
|
||||||
|
//
|
||||||
|
// bossGroup = new NioEventLoopGroup(bossThreads, new DefaultThreadFactory("MQTT-Boss", Thread.MAX_PRIORITY));
|
||||||
|
// workerGroup = new NioEventLoopGroup(workerThreads, new DefaultThreadFactory("MQTT-Worker", Thread.MAX_PRIORITY));
|
||||||
|
//
|
||||||
|
// if (config.businessCore > 0) {
|
||||||
|
// businessService = new ThreadPoolExecutor(
|
||||||
|
// config.businessCore,
|
||||||
|
// config.businessCore,
|
||||||
|
// 1L, TimeUnit.SECONDS,
|
||||||
|
// new LinkedBlockingQueue<>(1024), // 增加队列长度
|
||||||
|
// new DefaultThreadFactory("MQTT-Business", true, Thread.NORM_PRIORITY),
|
||||||
|
// new ThreadPoolExecutor.CallerRunsPolicy()); // 队列满时由调用者处理
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return new ServerBootstrap()
|
||||||
|
// .group(bossGroup, workerGroup)
|
||||||
|
// .channel(NioServerSocketChannel.class)
|
||||||
|
// .handler(new LoggingHandler(LogLevel.INFO))
|
||||||
|
// .option(ChannelOption.SO_BACKLOG, 1024)
|
||||||
|
// .childOption(ChannelOption.SO_KEEPALIVE, Boolean.TRUE)
|
||||||
|
// .childOption(ChannelOption.TCP_NODELAY, true)
|
||||||
|
// .childOption(ChannelOption.SO_SNDBUF, 1024 * 1024)
|
||||||
|
// .childOption(ChannelOption.SO_RCVBUF, 1024 * 1024)
|
||||||
|
// .childHandler(new ChannelInitializer<NioSocketChannel>() {
|
||||||
|
// @Override
|
||||||
|
// protected void initChannel(NioSocketChannel channel) {
|
||||||
|
// channel.pipeline()
|
||||||
|
// .addFirst(new IdleStateHandler(config.readerIdleTime, config.writerIdleTime, config.allIdleTime, TimeUnit.SECONDS))
|
||||||
|
// .addLast(new MqttDecoder(1024 * 1024 * 2))
|
||||||
|
// .addLast(MqttEncoder.INSTANCE)
|
||||||
|
// .addLast(messageAdapter); // 确保 messageAdapter 内部处理异步
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//// bossGroup = new NioEventLoopGroup(1, new DefaultThreadFactory(config.name, Thread.MAX_PRIORITY));
|
||||||
|
//// workerGroup = new NioEventLoopGroup(config.workerCore, new DefaultThreadFactory(config.name, Thread.MAX_PRIORITY));
|
||||||
|
////
|
||||||
|
//// if (config.businessCore > 0) {
|
||||||
|
//// businessService = new ThreadPoolExecutor(config.businessCore, config.businessCore, 1L,
|
||||||
|
//// TimeUnit.SECONDS, new LinkedBlockingQueue<>(), new DefaultThreadFactory(config.name, true, Thread.NORM_PRIORITY));
|
||||||
|
//// }
|
||||||
|
//// return new ServerBootstrap()
|
||||||
|
//// .group(bossGroup, workerGroup)
|
||||||
|
//// .channel(NioServerSocketChannel.class)
|
||||||
|
//// .handler(new LoggingHandler(LogLevel.DEBUG))
|
||||||
|
//// .option(ChannelOption.SO_BACKLOG, 511)
|
||||||
|
//// .childOption(ChannelOption.SO_KEEPALIVE, Boolean.TRUE)
|
||||||
|
//// .childHandler(new ChannelInitializer<NioSocketChannel>() {
|
||||||
|
////
|
||||||
|
//// @Override
|
||||||
|
//// protected void initChannel(NioSocketChannel channel) {
|
||||||
|
//// //客户端心跳检测机制
|
||||||
|
//// channel.pipeline()
|
||||||
|
//// .addFirst(XinDaConstant.SERVER.IDLE
|
||||||
|
//// , new IdleStateHandler(config.readerIdleTime, config.writerIdleTime, config.allIdleTime, TimeUnit.SECONDS))
|
||||||
|
//// .addLast(XinDaConstant.SERVER.DECODER, new MqttDecoder(1024 * 1024 * 2))
|
||||||
|
//// .addLast(XinDaConstant.SERVER.ENCODER, MqttEncoder.INSTANCE)
|
||||||
|
//// .addLast(messageAdapter);
|
||||||
|
//// }
|
||||||
|
//// });
|
||||||
|
////
|
||||||
|
////
|
||||||
|
//// }
|
||||||
|
//}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.xinda.iot.domain;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.xinda.common.annotation.Excel;
|
||||||
|
import com.xinda.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备档案管理对象 iot_device_doc
|
||||||
|
*
|
||||||
|
* @author leed
|
||||||
|
* @date 2025-07-13
|
||||||
|
*/
|
||||||
|
@ApiModel(value = "DeviceDoc",description = "设备档案管理 iot_device_doc")
|
||||||
|
@Data
|
||||||
|
public class DeviceDoc extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** id唯一标识 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 设备id */
|
||||||
|
@Excel(name = "设备id")
|
||||||
|
@ApiModelProperty("设备id")
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
/** 设备编号 */
|
||||||
|
@Excel(name = "设备编号")
|
||||||
|
@ApiModelProperty("设备编号")
|
||||||
|
private String serialNumber;
|
||||||
|
|
||||||
|
/** 文件名称 */
|
||||||
|
@Excel(name = "文件名称")
|
||||||
|
@ApiModelProperty("文件名称")
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/** 资源请求路径 */
|
||||||
|
@Excel(name = "资源请求路径")
|
||||||
|
@ApiModelProperty("资源请求路径")
|
||||||
|
private String resourceUrl;
|
||||||
|
|
||||||
|
/** 租户id */
|
||||||
|
@Excel(name = "租户id")
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/** 租户名称 */
|
||||||
|
@Excel(name = "租户名称")
|
||||||
|
@ApiModelProperty("租户名称")
|
||||||
|
private String tenantName;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.xinda.iot.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.xinda.iot.domain.DeviceDoc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备档案管理Mapper接口
|
||||||
|
*
|
||||||
|
* @author leed
|
||||||
|
* @date 2025-07-13
|
||||||
|
*/
|
||||||
|
public interface DeviceDocMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询设备档案管理
|
||||||
|
*
|
||||||
|
* @param id 设备档案管理主键
|
||||||
|
* @return 设备档案管理
|
||||||
|
*/
|
||||||
|
public DeviceDoc selectDeviceDocById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设备档案管理列表
|
||||||
|
*
|
||||||
|
* @param deviceDoc 设备档案管理
|
||||||
|
* @return 设备档案管理集合
|
||||||
|
*/
|
||||||
|
public List<DeviceDoc> selectDeviceDocList(DeviceDoc deviceDoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设备档案管理
|
||||||
|
*
|
||||||
|
* @param deviceDoc 设备档案管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertDeviceDoc(DeviceDoc deviceDoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设备档案管理
|
||||||
|
*
|
||||||
|
* @param deviceDoc 设备档案管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateDeviceDoc(DeviceDoc deviceDoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除设备档案管理
|
||||||
|
*
|
||||||
|
* @param id 设备档案管理主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteDeviceDocById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除设备档案管理
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteDeviceDocByIds(Long[] ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.xinda.iot.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.xinda.iot.domain.DeviceDoc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备档案管理Service接口
|
||||||
|
*
|
||||||
|
* @author leed
|
||||||
|
* @date 2025-07-13
|
||||||
|
*/
|
||||||
|
public interface IDeviceDocService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询设备档案管理
|
||||||
|
*
|
||||||
|
* @param id 设备档案管理主键
|
||||||
|
* @return 设备档案管理
|
||||||
|
*/
|
||||||
|
public DeviceDoc selectDeviceDocById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设备档案管理列表
|
||||||
|
*
|
||||||
|
* @param deviceDoc 设备档案管理
|
||||||
|
* @return 设备档案管理集合
|
||||||
|
*/
|
||||||
|
public List<DeviceDoc> selectDeviceDocList(DeviceDoc deviceDoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设备档案管理
|
||||||
|
*
|
||||||
|
* @param deviceDoc 设备档案管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertDeviceDoc(DeviceDoc deviceDoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设备档案管理
|
||||||
|
*
|
||||||
|
* @param deviceDoc 设备档案管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateDeviceDoc(DeviceDoc deviceDoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除设备档案管理
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的设备档案管理主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteDeviceDocByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除设备档案管理信息
|
||||||
|
*
|
||||||
|
* @param id 设备档案管理主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteDeviceDocById(Long id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
package com.xinda.iot.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.xinda.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.xinda.iot.mapper.DeviceDocMapper;
|
||||||
|
import com.xinda.iot.domain.DeviceDoc;
|
||||||
|
import com.xinda.iot.service.IDeviceDocService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备档案管理Service业务层处理
|
||||||
|
*
|
||||||
|
* @author leed
|
||||||
|
* @date 2025-07-13
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DeviceDocServiceImpl implements IDeviceDocService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private DeviceDocMapper deviceDocMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设备档案管理
|
||||||
|
*
|
||||||
|
* @param id 设备档案管理主键
|
||||||
|
* @return 设备档案管理
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DeviceDoc selectDeviceDocById(Long id)
|
||||||
|
{
|
||||||
|
return deviceDocMapper.selectDeviceDocById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设备档案管理列表
|
||||||
|
*
|
||||||
|
* @param deviceDoc 设备档案管理
|
||||||
|
* @return 设备档案管理
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<DeviceDoc> selectDeviceDocList(DeviceDoc deviceDoc)
|
||||||
|
{
|
||||||
|
return deviceDocMapper.selectDeviceDocList(deviceDoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设备档案管理
|
||||||
|
*
|
||||||
|
* @param deviceDoc 设备档案管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertDeviceDoc(DeviceDoc deviceDoc)
|
||||||
|
{
|
||||||
|
deviceDoc.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return deviceDocMapper.insertDeviceDoc(deviceDoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设备档案管理
|
||||||
|
*
|
||||||
|
* @param deviceDoc 设备档案管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateDeviceDoc(DeviceDoc deviceDoc)
|
||||||
|
{
|
||||||
|
deviceDoc.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return deviceDocMapper.updateDeviceDoc(deviceDoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除设备档案管理
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的设备档案管理主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteDeviceDocByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return deviceDocMapper.deleteDeviceDocByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除设备档案管理信息
|
||||||
|
*
|
||||||
|
* @param id 设备档案管理主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteDeviceDocById(Long id)
|
||||||
|
{
|
||||||
|
return deviceDocMapper.deleteDeviceDocById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -279,6 +279,7 @@ public class SceneServiceImpl implements ISceneService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 构建规则链
|
// 构建规则链
|
||||||
|
|
||||||
LiteFlowChainELBuilder.createChain().setChainName(scene.getChainName()).setEL(scene.getElData()).build();
|
LiteFlowChainELBuilder.createChain().setChainName(scene.getChainName()).setEL(scene.getElData()).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,13 +295,14 @@ public class SceneServiceImpl implements ISceneService {
|
|||||||
@Override
|
@Override
|
||||||
public String buildElData(Scene scene, List<Script> ruleScripts, List<SceneScript> sceneScripts, List<SceneDevice> sceneDevices) {
|
public String buildElData(Scene scene, List<Script> ruleScripts, List<SceneScript> sceneScripts, List<SceneDevice> sceneDevices) {
|
||||||
// 排除定时后的触发器,等于0不生成规则数据,等于1移除AND和OR
|
// 排除定时后的触发器,等于0不生成规则数据,等于1移除AND和OR
|
||||||
Long triggerNodeCount = scene.getTriggers().stream().filter(x -> x.getSource() != 2).count();
|
Long triggerNodeCount = scene.getTriggers().stream().filter(x -> x.getSource() != 2 && x.getSource() != 4).count();
|
||||||
Long triggerTimingCount = scene.getTriggers().stream().filter(x -> x.getSource() == 2).count();
|
Long triggerTimingCount = scene.getTriggers().stream().filter(x -> x.getSource() == 2).count();
|
||||||
|
Long selftriggerCount = scene.getTriggers().stream().filter(x -> x.getSource() == 4).count();
|
||||||
// 拼接规则数据,格式如:IF(AND(T1,T2,T3),THEN(A1,A2,A3))
|
// 拼接规则数据,格式如:IF(AND(T1,T2,T3),THEN(A1,A2,A3))
|
||||||
StringBuilder triggerBuilder = new StringBuilder();
|
StringBuilder triggerBuilder = new StringBuilder();
|
||||||
StringBuilder actionBuilder = new StringBuilder();
|
StringBuilder actionBuilder = new StringBuilder();
|
||||||
if (0 == triggerNodeCount && triggerTimingCount != 0) {
|
// if (0 == triggerNodeCount && triggerTimingCount != 0) {
|
||||||
|
if (0 == triggerNodeCount && (triggerTimingCount != 0 || selftriggerCount != 0 )) {
|
||||||
switch (scene.getExecuteMode()) {
|
switch (scene.getExecuteMode()) {
|
||||||
case 1:
|
case 1:
|
||||||
actionBuilder.append("THEN(");
|
actionBuilder.append("THEN(");
|
||||||
@@ -341,7 +343,7 @@ public class SceneServiceImpl implements ISceneService {
|
|||||||
// 保存触发器和执行动作
|
// 保存触发器和执行动作
|
||||||
String scriptId = buildTriggerAction(scene.getTriggers().get(i), 2, scene, ruleScripts, sceneScripts, sceneDevices);
|
String scriptId = buildTriggerAction(scene.getTriggers().get(i), 2, scene, ruleScripts, sceneScripts, sceneDevices);
|
||||||
// 构建触发器EL,排除定时触发器
|
// 构建触发器EL,排除定时触发器
|
||||||
if (scene.getTriggers().get(i).getSource() != 2 || scene.getTriggers().get(i).getSource() != 4) {
|
if (scene.getTriggers().get(i).getSource() != 2 && scene.getTriggers().get(i).getSource() != 4) {
|
||||||
triggerBuilder.append(scriptId + ",");
|
triggerBuilder.append(scriptId + ",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -431,13 +433,17 @@ public class SceneServiceImpl implements ISceneService {
|
|||||||
"sceneContext.process(json);", StringEscapeUtils.escapeJava(JSONObject.toJSONString(template)));
|
"sceneContext.process(json);", StringEscapeUtils.escapeJava(JSONObject.toJSONString(template)));
|
||||||
ruleScript.setScriptData(data);
|
ruleScript.setScriptData(data);
|
||||||
// 构建脚本集合,规则脚本不需要存储定时触发器
|
// 构建脚本集合,规则脚本不需要存储定时触发器
|
||||||
if (sceneScript.getSource() != 2 || sceneScript.getSource() != 4) {
|
// if (sceneScript.getSource() != 2 || sceneScript.getSource() != 4) {
|
||||||
ruleScripts.add(ruleScript);
|
// ruleScripts.add(ruleScript);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (scriptPurpose == 2) {
|
if (scriptPurpose == 2) {
|
||||||
|
// 构建脚本集合,规则脚本不需要存储定时触发器
|
||||||
|
if (sceneScript.getSource() != 2) {
|
||||||
|
ruleScripts.add(ruleScript);
|
||||||
|
}
|
||||||
// 触发器
|
// 触发器
|
||||||
if (sceneScript.getSource() == 1) {
|
if (sceneScript.getSource() == 1|| 5 == sceneScript.getSource()) {
|
||||||
// 构建场景设备集合
|
// 构建场景设备集合
|
||||||
for (int j = 0; j < sceneScript.getDeviceNums().length; j++) {
|
for (int j = 0; j < sceneScript.getDeviceNums().length; j++) {
|
||||||
SceneDevice sceneDevice = new SceneDevice();
|
SceneDevice sceneDevice = new SceneDevice();
|
||||||
@@ -466,6 +472,7 @@ public class SceneServiceImpl implements ISceneService {
|
|||||||
sceneDevices.add(sceneDevice);
|
sceneDevices.add(sceneDevice);
|
||||||
}
|
}
|
||||||
} else if (scriptPurpose == 3) {
|
} else if (scriptPurpose == 3) {
|
||||||
|
ruleScripts.add(ruleScript);
|
||||||
if (sceneScript.getSource() == 1) {
|
if (sceneScript.getSource() == 1) {
|
||||||
// 构建场景设备集合
|
// 构建场景设备集合
|
||||||
for (int j = 0; j < sceneScript.getDeviceNums().length; j++) {
|
for (int j = 0; j < sceneScript.getDeviceNums().length; j++) {
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.xinda.iot.mapper.DeviceDocMapper">
|
||||||
|
|
||||||
|
<resultMap type="DeviceDoc" id="DeviceDocResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="deviceId" column="device_id" />
|
||||||
|
<result property="serialNumber" column="serial_number" />
|
||||||
|
<result property="fileName" column="file_name" />
|
||||||
|
<result property="resourceUrl" column="resource_url" />
|
||||||
|
<result property="tenantId" column="tenant_id" />
|
||||||
|
<result property="tenantName" column="tenant_name" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectDeviceDocVo">
|
||||||
|
select id, device_id, serial_number, file_name, resource_url, tenant_id, tenant_name, create_by, create_time, update_by, update_time from iot_device_doc
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectDeviceDocList" parameterType="DeviceDoc" resultMap="DeviceDocResult">
|
||||||
|
<include refid="selectDeviceDocVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||||
|
<if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
|
||||||
|
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
|
||||||
|
<if test="resourceUrl != null and resourceUrl != ''"> and resource_url = #{resourceUrl}</if>
|
||||||
|
<if test="tenantId != null "> and tenant_id = #{tenantId}</if>
|
||||||
|
<if test="tenantName != null and tenantName != ''"> and tenant_name like concat('%', #{tenantName}, '%')</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectDeviceDocById" parameterType="Long" resultMap="DeviceDocResult">
|
||||||
|
<include refid="selectDeviceDocVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertDeviceDoc" parameterType="DeviceDoc" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into iot_device_doc
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="deviceId != null">device_id,</if>
|
||||||
|
<if test="serialNumber != null">serial_number,</if>
|
||||||
|
<if test="fileName != null">file_name,</if>
|
||||||
|
<if test="resourceUrl != null">resource_url,</if>
|
||||||
|
<if test="tenantId != null">tenant_id,</if>
|
||||||
|
<if test="tenantName != null">tenant_name,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="deviceId != null">#{deviceId},</if>
|
||||||
|
<if test="serialNumber != null">#{serialNumber},</if>
|
||||||
|
<if test="fileName != null">#{fileName},</if>
|
||||||
|
<if test="resourceUrl != null">#{resourceUrl},</if>
|
||||||
|
<if test="tenantId != null">#{tenantId},</if>
|
||||||
|
<if test="tenantName != null">#{tenantName},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateDeviceDoc" parameterType="DeviceDoc">
|
||||||
|
update iot_device_doc
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||||
|
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
|
||||||
|
<if test="fileName != null">file_name = #{fileName},</if>
|
||||||
|
<if test="resourceUrl != null">resource_url = #{resourceUrl},</if>
|
||||||
|
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
||||||
|
<if test="tenantName != null">tenant_name = #{tenantName},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteDeviceDocById" parameterType="Long">
|
||||||
|
delete from iot_device_doc where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteDeviceDocByIds" parameterType="String">
|
||||||
|
delete from iot_device_doc where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@@ -436,7 +436,7 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectDeviceGShortList" parameterType="com.xinda.iot.domain.Device" resultMap="DeviceShortResult">
|
<select id="selectDeviceGShortList" parameterType="com.xinda.iot.domain.Device" resultMap="DeviceShortResult">
|
||||||
select d.device_id, d.device_name, p.product_id, p.product_name,p.device_type,
|
select d.device_id, d.device_name, d.product_id, d.product_name,p.device_type,
|
||||||
d.tenant_id, d.tenant_name, d.serial_number,d.gw_dev_code,
|
d.tenant_id, d.tenant_name, d.serial_number,d.gw_dev_code,
|
||||||
d.firmware_version, d.status,d.rssi,d.is_shadow,d.is_simulate ,d.location_way,d.ic_way,d.iccid,d.volt,d.sd,d.pd,d.imei, d.gw_id, d.gw_name,
|
d.firmware_version, d.status,d.rssi,d.is_shadow,d.is_simulate ,d.location_way,d.ic_way,d.iccid,d.volt,d.sd,d.pd,d.imei, d.gw_id, d.gw_name,
|
||||||
d.things_model_value, d.active_time,d.create_time, if(null = d.img_url or '' = d.img_url, p.img_url, d.img_url)
|
d.things_model_value, d.active_time,d.create_time, if(null = d.img_url or '' = d.img_url, p.img_url, d.img_url)
|
||||||
@@ -538,7 +538,7 @@
|
|||||||
<!-- </select>-->
|
<!-- </select>-->
|
||||||
|
|
||||||
<select id="selectDeviceShortList" parameterType="com.xinda.iot.domain.Device" resultMap="DeviceShortResult">
|
<select id="selectDeviceShortList" parameterType="com.xinda.iot.domain.Device" resultMap="DeviceShortResult">
|
||||||
select d.device_id, d.device_name, p.product_id, p.product_name,p.device_type,
|
select d.device_id, d.device_name, p.product_id, d.product_name,p.device_type,
|
||||||
d.tenant_id, d.tenant_name, d.serial_number,d.gw_dev_code,
|
d.tenant_id, d.tenant_name, d.serial_number,d.gw_dev_code,
|
||||||
d.firmware_version, d.status,d.rssi,d.is_shadow,d.is_simulate ,d.location_way,d.ic_way,d.iccid,d.volt,d.sd,d.pd,d.imei, d.gw_id, d.gw_name,
|
d.firmware_version, d.status,d.rssi,d.is_shadow,d.is_simulate ,d.location_way,d.ic_way,d.iccid,d.volt,d.sd,d.pd,d.imei, d.gw_id, d.gw_name,
|
||||||
d.things_model_value, d.active_time,d.create_time, if(null = d.img_url or '' = d.img_url, p.img_url, d.img_url) as img_url,
|
d.things_model_value, d.active_time,d.create_time, if(null = d.img_url or '' = d.img_url, p.img_url, d.img_url) as img_url,
|
||||||
@@ -576,7 +576,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDeviceShortGwList" parameterType="com.xinda.iot.domain.Device" resultMap="DeviceShortResult">
|
<select id="selectDeviceShortGwList" parameterType="com.xinda.iot.domain.Device" resultMap="DeviceShortResult">
|
||||||
select d.device_id, d.device_name, p.product_id, p.product_name,p.device_type,
|
select d.device_id, d.device_name, p.product_id, d.product_name,p.device_type,
|
||||||
d.tenant_id, d.tenant_name, d.serial_number,d.gw_dev_code,
|
d.tenant_id, d.tenant_name, d.serial_number,d.gw_dev_code,
|
||||||
d.firmware_version, d.status,d.rssi,d.is_shadow,d.is_simulate ,d.location_way,d.ic_way,d.iccid,d.volt,d.sd,d.pd,d.imei, d.gw_id, d.gw_name,
|
d.firmware_version, d.status,d.rssi,d.is_shadow,d.is_simulate ,d.location_way,d.ic_way,d.iccid,d.volt,d.sd,d.pd,d.imei, d.gw_id, d.gw_name,
|
||||||
d.things_model_value, d.active_time,d.create_time, if(null = d.img_url or '' = d.img_url, p.img_url, d.img_url) as img_url,
|
d.things_model_value, d.active_time,d.create_time, if(null = d.img_url or '' = d.img_url, p.img_url, d.img_url) as img_url,
|
||||||
@@ -615,7 +615,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDeviceShortTreeList" parameterType="com.xinda.iot.domain.Device" resultMap="DeviceShortResult">
|
<select id="selectDeviceShortTreeList" parameterType="com.xinda.iot.domain.Device" resultMap="DeviceShortResult">
|
||||||
select d.device_id, d.device_name, p.product_id, p.product_name,p.device_type,
|
select d.device_id, d.device_name, p.product_id, d.product_name,p.device_type,
|
||||||
d.tenant_id, d.tenant_name, d.serial_number,d.gw_dev_code,
|
d.tenant_id, d.tenant_name, d.serial_number,d.gw_dev_code,
|
||||||
d.firmware_version, d.status,d.rssi,d.is_shadow,d.is_simulate ,d.location_way,d.ic_way,d.iccid,d.volt,d.sd,d.pd,d.imei, d.gw_id, d.gw_name,
|
d.firmware_version, d.status,d.rssi,d.is_shadow,d.is_simulate ,d.location_way,d.ic_way,d.iccid,d.volt,d.sd,d.pd,d.imei, d.gw_id, d.gw_name,
|
||||||
d.things_model_value, d.active_time,d.create_time, if(null = d.img_url or '' = d.img_url, p.img_url, d.img_url) as img_url,
|
d.things_model_value, d.active_time,d.create_time, if(null = d.img_url or '' = d.img_url, p.img_url, d.img_url) as img_url,
|
||||||
@@ -653,7 +653,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectCamDeviceListByDeviceId" parameterType="Long" resultMap="DeviceShortResult">
|
<select id="selectCamDeviceListByDeviceId" parameterType="Long" resultMap="DeviceShortResult">
|
||||||
select d.device_id, d.device_name, p.product_id, p.product_name,p.device_type,
|
select d.device_id, d.device_name, p.product_id, d.product_name,p.device_type,
|
||||||
d.tenant_id, d.tenant_name, d.serial_number,d.gw_dev_code,
|
d.tenant_id, d.tenant_name, d.serial_number,d.gw_dev_code,
|
||||||
d.firmware_version, d.status,d.rssi,d.is_shadow,d.is_simulate ,d.location_way,d.ic_way,d.iccid,d.volt,d.sd,d.pd,d.imei, d.gw_id, d.gw_name,
|
d.firmware_version, d.status,d.rssi,d.is_shadow,d.is_simulate ,d.location_way,d.ic_way,d.iccid,d.volt,d.sd,d.pd,d.imei, d.gw_id, d.gw_name,
|
||||||
d.things_model_value, d.active_time,d.create_time, if(null = d.img_url or '' = d.img_url, p.img_url, d.img_url) as img_url,
|
d.things_model_value, d.active_time,d.create_time, if(null = d.img_url or '' = d.img_url, p.img_url, d.img_url) as img_url,
|
||||||
@@ -675,7 +675,7 @@
|
|||||||
select d.device_id,
|
select d.device_id,
|
||||||
d.device_name,
|
d.device_name,
|
||||||
d.product_id,
|
d.product_id,
|
||||||
p.product_name,
|
d.product_name,
|
||||||
p.device_type,
|
p.device_type,
|
||||||
d.tenant_id,
|
d.tenant_id,
|
||||||
d.tenant_name,
|
d.tenant_name,
|
||||||
|
|||||||
Reference in New Issue
Block a user