提交增加运维管理

This commit is contained in:
LEED
2025-04-29 22:30:18 +08:00
parent 4201690d93
commit 360b630306
98 changed files with 6300 additions and 45 deletions

View File

@@ -465,7 +465,12 @@
<artifactId>xinda-scada</artifactId>
<version>${xinda.version}</version>
</dependency>
<!-- 运维模块 -->
<dependency>
<groupId>com.xinda</groupId>
<artifactId>xinda-itsm</artifactId>
<version>${xinda.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
@@ -484,6 +489,7 @@
<module>xinda-notify</module>
<!-- <module>xinda-speaker</module>-->
<module>xinda-scada</module>
<module>xinda-itsm</module>
</modules>
<packaging>pom</packaging>

View File

@@ -136,7 +136,10 @@
<groupId>com.xinda</groupId>
<artifactId>xinda-scada</artifactId>
</dependency>
<dependency>
<groupId>com.xinda</groupId>
<artifactId>xinda-itsm</artifactId>
</dependency>
</dependencies>
<build>

View File

@@ -6,12 +6,12 @@ spring:
druid:
# 主库数据源
master:
# url: jdbc:mysql://1.14.72.242:3306/gongkongbang?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: gongkongbang
# password: pRePNKSeawMMpKpJ
url: jdbc:mysql://127.0.0.1:3306/gongkongbang?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:mysql://1.15.36.7:3306/gongkongbang?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: gongkongbang
password: pRePNKSeawMMpKpJ
# url: jdbc:mysql://192.168.200.53:3306/gongkongbang?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: root
# password: aiot@1234
# 从库数据源
slave:
enabled: false # 从数据源开关/默认关闭
@@ -60,10 +60,10 @@ spring:
multi-statement-allow: true
# redis 配置
redis:
host: 127.0.0.1 # 地址
port: 6379 # 端口默认为6379
database: 11 # 数据库索引
password: 841503 # 密码
host: 192.168.200.53 # 地址
port: 16379 # 端口默认为6379
database: 17 # 数据库索引
password: aiot@1234 # 密码
timeout: 10s # 连接超时时间
lettuce:
pool:
@@ -81,7 +81,8 @@ spring:
timeout: 30 # 超时时间
keepalive: 30 # 保持连接
clearSession: true # 清除会话(设置为false,断开连接,重连后使用原来的会话 保留订阅的主题,能接收离线期间的消息)
gen-username: gkb # 用户名
gen-password: 888888
# redisson 配置
redisson:
# redis key前缀
@@ -107,7 +108,7 @@ redisson:
# sip 配置
sip:
enabled: true # 是否启用视频监控SIPtrue为启用
enabled: false # 是否启用视频监控SIPtrue为启用
## 本地调试时绑定网卡局域网IP设备在同一局域网设备接入IP填写绑定IP
## 部署服务端时默认绑定容器IP设备接入IP填写服务器公网IP
ip: 10.0.0.5

View File

@@ -72,14 +72,15 @@ spring:
mqtt:
username: xinda # 账号(仅用于后端自认证)
password: xinda # 密码(仅用于后端自认证)
host-url: tcp://1.14.72.242:1883 # 连接 Emqx 消息服务器地址
host-url: tcp://127.0.0.1:1883 # 连接 Emqx 消息服务器地址
# host-url: tcp://192.168.1.103:1883 # 内置netty mqtt broker地址
client-id: ${random.int} # 客户端Id不能相同采用随机数 ${random.value}
default-topic: test # 默认主题
timeout: 30 # 超时时间
keepalive: 30 # 保持连接
clearSession: true # 清除会话(设置为false,断开连接,重连后使用原来的会话 保留订阅的主题,能接收离线期间的消息)
general-username: gkb # 用户名
general-password: 888888
# redisson 配置
redisson:
# redis key前缀

View File

@@ -60,7 +60,7 @@ server:
spring:
# 环境配置dev=开发环境prod=生产环境
profiles:
active: prod # 环境配置dev=开发环境prod=生产环境
active: dev # 环境配置dev=开发环境prod=生产环境
# 资源信息
messages:
# 国际化资源文件路径

View File

@@ -49,6 +49,7 @@ public enum TopicType {
/*** webSocket转发前端使用 ***/
WS_SERVICE_INVOKE(2,16,"/ws/service", "WS服务调用"),
WS_LOG_INVOKE(2,17,"/ws/log","ws下发指令日志"),
WS_SERVICE_ALERT(2,16,"/ws/alert", "WS告警推送"),
/*** 模拟设备使用 ***/

View File

@@ -82,6 +82,9 @@ public class SecurityUtils
return SecurityContextHolder.getContext().getAuthentication();
}
public static void setAuthentication(Authentication authentication) {
SecurityContextHolder.getContext().setAuthentication(authentication);
}
/**
* 生成BCryptPasswordEncoder密码
*
@@ -136,4 +139,7 @@ public class SecurityUtils
return "en-US";
}
}
}

View File

@@ -103,6 +103,11 @@
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-redis</artifactId>
</dependency>
<!-- SpringBoot Websocket -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
</dependencies>

View File

@@ -130,7 +130,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// .antMatchers("/oauth/css/**","/oauth/fonts/**","/oauth/js/**").permitAll()
// dueros
.antMatchers("/dueros").permitAll()
.antMatchers("/ws/alert/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated()

View File

@@ -0,0 +1,58 @@
package com.xinda.framework.websocket;
import java.util.concurrent.Semaphore;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 信号量相关处理
*
* @author ruoyi
*/
public class SemaphoreUtils
{
/**
* SemaphoreUtils 日志控制器
*/
private static final Logger LOGGER = LoggerFactory.getLogger(SemaphoreUtils.class);
/**
* 获取信号量
*
* @param semaphore
* @return
*/
public static boolean tryAcquire(Semaphore semaphore)
{
boolean flag = false;
try
{
flag = semaphore.tryAcquire();
}
catch (Exception e)
{
LOGGER.error("获取信号量异常", e);
}
return flag;
}
/**
* 释放信号量
*
* @param semaphore
*/
public static void release(Semaphore semaphore)
{
try
{
semaphore.release();
}
catch (Exception e)
{
LOGGER.error("释放信号量异常", e);
}
}
}

View File

@@ -0,0 +1,122 @@
package com.xinda.framework.websocket;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import javax.websocket.*;
import javax.websocket.server.PathParam;
import javax.websocket.server.ServerEndpoint;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicInteger;
@Component
@ServerEndpoint("/ws/alert/{deptId}")
public class WebSocketAlertServer {
private static final Logger log = LoggerFactory.getLogger(WebSocketAlertServer.class);
//静态变量,用来记录当前在线连接数。应该把它设计成线程安全的。
private static AtomicInteger onlineNum = new AtomicInteger();
//concurrent包的线程安全Set用来存放每个客户端对应的WebSocketServer对象。
private static ConcurrentHashMap<Long, Session> sessionPools = new ConcurrentHashMap<>();
/**
* 线程安全list用来存放 在线客户端账号
*/
public static List<Long> deptList = new CopyOnWriteArrayList<>();
/**
* 连接成功
* @param session
* @param deptId
*/
@OnOpen
public void onOpen(Session session, @PathParam(value = "deptId") Long deptId) {
sessionPools.put(deptId, session);
if (!deptList.contains(deptId)) {
addOnlineCount();
deptList.add(deptId);
}
log.debug("ID为【" + deptId + "】的用户加入websocket当前在线人数为" + onlineNum);
log.debug("当前在线:" + deptList);
}
/**
* 关闭连接
* @param deptId
*/
@OnClose
public void onClose(@PathParam(value = "deptId") Long deptId) {
sessionPools.remove(deptId);
if (deptList.contains(deptId)) {
deptList.remove(deptId);
subOnlineCount();
}
log.debug(deptId + "断开webSocket连接当前人数为" + onlineNum);
}
/**
* 消息监听
* @param message
* @throws IOException
*/
@OnMessage
public void onMessage(String message) throws IOException {
String msg = message.replace("", "").replace("", "");
// sendToUser(userId, JSONObject.toJSONString(jsonObject));
}
/**
* 连接错误
* @param session
* @param throwable
* @throws IOException
*/
@OnError
public void onError(Session session, Throwable throwable) throws IOException {
log.error("websocket连接错误");
throwable.printStackTrace();
}
/**
* 发送消息
*/
public void sendMessage(Session session, String message) throws IOException, EncodeException {
if (session != null) {
synchronized (session) {
session.getBasicRemote().sendText(message);
}
}
}
/**
* 给指定用户发送信息
*/
public void sendToUser(Long deptId, String message) {
Session session = sessionPools.get(deptId);
try {
if (session != null) {
sendMessage(session, message);
}else {
log.debug("推送用户不在线");
}
} catch (Exception e) {
e.printStackTrace();
}
}
public static void addOnlineCount() {
onlineNum.incrementAndGet();
}
public static void subOnlineCount() {
onlineNum.decrementAndGet();
}
}

View File

@@ -0,0 +1,20 @@
package com.xinda.framework.websocket;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
/**
* websocket 配置
*
* @author ruoyi
*/
@Configuration
public class WebSocketConfig
{
@Bean
public ServerEndpointExporter serverEndpointExporter()
{
return new ServerEndpointExporter();
}
}

View File

@@ -0,0 +1,140 @@
package com.xinda.framework.websocket;
import java.io.IOException;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import javax.websocket.Session;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* websocket 客户端用户集
*
* @author ruoyi
*/
public class WebSocketUsers
{
/**
* WebSocketUsers 日志控制器
*/
private static final Logger LOGGER = LoggerFactory.getLogger(WebSocketUsers.class);
/**
* 用户集
*/
private static Map<String, Session> USERS = new ConcurrentHashMap<String, Session>();
/**
* 存储用户
*
* @param key 唯一键
* @param session 用户信息
*/
public static void put(String key, Session session)
{
USERS.put(key, session);
}
/**
* 移除用户
*
* @param session 用户信息
*
* @return 移除结果
*/
public static boolean remove(Session session)
{
String key = null;
boolean flag = USERS.containsValue(session);
if (flag)
{
Set<Map.Entry<String, Session>> entries = USERS.entrySet();
for (Map.Entry<String, Session> entry : entries)
{
Session value = entry.getValue();
if (value.equals(session))
{
key = entry.getKey();
break;
}
}
}
else
{
return true;
}
return remove(key);
}
/**
* 移出用户
*
* @param key 键
*/
public static boolean remove(String key)
{
LOGGER.info("\n 正在移出用户 - {}", key);
Session remove = USERS.remove(key);
if (remove != null)
{
boolean containsValue = USERS.containsValue(remove);
LOGGER.info("\n 移出结果 - {}", containsValue ? "失败" : "成功");
return containsValue;
}
else
{
return true;
}
}
/**
* 获取在线用户列表
*
* @return 返回用户集合
*/
public static Map<String, Session> getUsers()
{
return USERS;
}
/**
* 群发消息文本消息
*
* @param message 消息内容
*/
public static void sendMessageToUsersByText(String message)
{
Collection<Session> values = USERS.values();
for (Session value : values)
{
sendMessageToUserByText(value, message);
}
}
/**
* 发送文本消息
*
* @param session 自己的用户名
* @param message 消息内容
*/
public static void sendMessageToUserByText(Session session, String message)
{
if (session != null)
{
try
{
session.getBasicRemote().sendText(message);
}
catch (IOException e)
{
LOGGER.error("\n[发送消息异常]", e);
}
}
else
{
LOGGER.info("\n[你已离线]");
}
}
}

View File

@@ -8,6 +8,7 @@ import com.xinda.common.core.redis.RedisCache;
import com.xinda.common.core.redis.RedisKeyBuilder;
import com.xinda.common.core.thingsModel.SceneThingsModelItem;
import com.xinda.common.core.thingsModel.ThingsModelSimpleItem;
import com.xinda.common.enums.TopicType;
import com.xinda.common.exception.ServiceException;
import com.xinda.common.utils.DateUtils;
import com.xinda.common.utils.StringUtils;
@@ -66,6 +67,8 @@ public class SceneContext {
*/
private List<SceneThingsModelItem> sceneThingsModelItems;
// private List<AlertLog> sceneAlertLogList;
private static IFunctionInvoke functionInvoke = SpringUtils.getBean(IFunctionInvoke.class);
@@ -485,6 +488,7 @@ public class SceneContext {
}
AlertLog alertLog = getAlertLog(alertSceneSendVO, device, sceneThingsModelItem);
alertLogList.add(alertLog);
// sceneAlertLogList.add(alertLog);
}
}
// 保存告警日志
@@ -694,4 +698,7 @@ public class SceneContext {
return true;
}
// public Collection<? extends AlertLog> getAlertLogList() {
// return sceneAlertLogList;
// }
}

View File

@@ -1,7 +1,9 @@
package com.xinda.mq.service;
import com.xinda.iot.domain.AlertLog;
import com.xinda.mq.model.ReportDataBo;
import java.util.List;
import java.util.concurrent.ScheduledExecutorService;
/**

View File

@@ -16,6 +16,7 @@ import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -51,6 +52,7 @@ public class RuleEngineHandler implements IRuleEngine {
* @see ReportDataBo
*/
public void ruleMatch(ReportDataBo bo) {
// List<AlertLog> alertLogList = new ArrayList<>();
try {
// 场景联动处理
this.sceneProcess(bo);

23
xinda-itsm/pom.xml Normal file
View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.xinda</groupId>
<artifactId>xinda</artifactId>
<version>3.8.5</version>
</parent>
<groupId>com.xinda</groupId>
<artifactId>xinda-itsm</artifactId>
<dependencies>
<!-- 通用工具-->
<dependency>
<groupId>com.xinda</groupId>
<artifactId>xinda-common</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,110 @@
package com.xinda.itsm.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.itsm.domain.Duty;
import com.xinda.itsm.service.IDutyService;
import com.xinda.common.utils.poi.ExcelUtil;
import com.xinda.common.core.page.TableDataInfo;
/**
* 值班管理Controller
*
* @author kerwincui
* @date 2025-04-23
*/
@RestController
@RequestMapping("/itsm/duty")
@Api(tags = "值班管理")
public class DutyController extends BaseController
{
@Autowired
private IDutyService dutyService;
/**
* 查询值班管理列表
*/
@PreAuthorize("@ss.hasPermi('itsm:duty:list')")
@GetMapping("/list")
@ApiOperation("查询值班管理列表")
public TableDataInfo list(Duty duty)
{
startPage();
List<Duty> list = dutyService.selectDutyList(duty);
return getDataTable(list);
}
/**
* 导出值班管理列表
*/
@ApiOperation("导出值班管理列表")
@PreAuthorize("@ss.hasPermi('itsm:duty:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, Duty duty)
{
List<Duty> list = dutyService.selectDutyList(duty);
ExcelUtil<Duty> util = new ExcelUtil<Duty>(Duty.class);
util.exportExcel(response, list, "值班管理数据");
}
/**
* 获取值班管理详细信息
*/
@PreAuthorize("@ss.hasPermi('itsm:duty:query')")
@GetMapping(value = "/{dutyId}")
@ApiOperation("获取值班管理详细信息")
public AjaxResult getInfo(@PathVariable("dutyId") Long dutyId)
{
return success(dutyService.selectDutyByDutyId(dutyId));
}
/**
* 新增值班管理
*/
@PreAuthorize("@ss.hasPermi('itsm:duty:add')")
@PostMapping
@ApiOperation("新增值班管理")
public AjaxResult add(@RequestBody Duty duty)
{
return toAjax(dutyService.insertDuty(duty));
}
/**
* 修改值班管理
*/
@PreAuthorize("@ss.hasPermi('itsm:duty:edit')")
@PutMapping
@ApiOperation("修改值班管理")
public AjaxResult edit(@RequestBody Duty duty)
{
return toAjax(dutyService.updateDuty(duty));
}
/**
* 删除值班管理
*/
@PreAuthorize("@ss.hasPermi('itsm:duty:remove')")
@DeleteMapping("/{dutyIds}")
@ApiOperation("删除值班管理")
public AjaxResult remove(@PathVariable Long[] dutyIds)
{
return toAjax(dutyService.deleteDutyByDutyIds(dutyIds));
}
}

View File

@@ -0,0 +1,108 @@
package com.xinda.itsm.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.core.controller.BaseController;
import com.xinda.common.core.domain.AjaxResult;
import com.xinda.itsm.domain.ExampleReport;
import com.xinda.itsm.service.IExampleReportService;
import com.xinda.common.utils.poi.ExcelUtil;
import com.xinda.common.core.page.TableDataInfo;
/**
* 例报管理Controller
*
* @author kerwincui
* @date 2025-04-23
*/
@RestController
@RequestMapping("/itsm/report")
@Api(tags = "例报管理")
public class ExampleReportController extends BaseController
{
@Autowired
private IExampleReportService exampleReportService;
/**
* 查询例报管理列表
*/
@PreAuthorize("@ss.hasPermi('itsm:report:list')")
@GetMapping("/list")
@ApiOperation("查询例报管理列表")
public TableDataInfo list(ExampleReport exampleReport)
{
startPage();
List<ExampleReport> list = exampleReportService.selectExampleReportList(exampleReport);
return getDataTable(list);
}
/**
* 导出例报管理列表
*/
@ApiOperation("导出例报管理列表")
@PreAuthorize("@ss.hasPermi('itsm:report:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, ExampleReport exampleReport)
{
List<ExampleReport> list = exampleReportService.selectExampleReportList(exampleReport);
ExcelUtil<ExampleReport> util = new ExcelUtil<ExampleReport>(ExampleReport.class);
util.exportExcel(response, list, "例报管理数据");
}
/**
* 获取例报管理详细信息
*/
@PreAuthorize("@ss.hasPermi('itsm:report:query')")
@GetMapping(value = "/{exampleReportId}")
@ApiOperation("获取例报管理详细信息")
public AjaxResult getInfo(@PathVariable("exampleReportId") Long exampleReportId)
{
return success(exampleReportService.selectExampleReportByExampleReportId(exampleReportId));
}
/**
* 新增例报管理
*/
@PreAuthorize("@ss.hasPermi('itsm:report:add')")
@PostMapping
@ApiOperation("新增例报管理")
public AjaxResult add(@RequestBody ExampleReport exampleReport)
{
return toAjax(exampleReportService.insertExampleReport(exampleReport));
}
/**
* 修改例报管理
*/
@PreAuthorize("@ss.hasPermi('itsm:report:edit')")
@PutMapping
@ApiOperation("修改例报管理")
public AjaxResult edit(@RequestBody ExampleReport exampleReport)
{
return toAjax(exampleReportService.updateExampleReport(exampleReport));
}
/**
* 删除例报管理
*/
@PreAuthorize("@ss.hasPermi('itsm:report:remove')")
@DeleteMapping("/{exampleReportIds}")
@ApiOperation("删除例报管理")
public AjaxResult remove(@PathVariable Long[] exampleReportIds)
{
return toAjax(exampleReportService.deleteExampleReportByExampleReportIds(exampleReportIds));
}
}

View File

@@ -0,0 +1,110 @@
package com.xinda.itsm.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.itsm.domain.InspectionPlan;
import com.xinda.itsm.service.IInspectionPlanService;
import com.xinda.common.utils.poi.ExcelUtil;
import com.xinda.common.core.page.TableDataInfo;
/**
* 巡检计划Controller
*
* @author kerwincui
* @date 2025-04-23
*/
@RestController
@RequestMapping("/itsm/plan")
@Api(tags = "巡检计划")
public class InspectionPlanController extends BaseController
{
@Autowired
private IInspectionPlanService inspectionPlanService;
/**
* 查询巡检计划列表
*/
@PreAuthorize("@ss.hasPermi('itsm:plan:list')")
@GetMapping("/list")
@ApiOperation("查询巡检计划列表")
public TableDataInfo list(InspectionPlan inspectionPlan)
{
startPage();
List<InspectionPlan> list = inspectionPlanService.selectInspectionPlanList(inspectionPlan);
return getDataTable(list);
}
/**
* 导出巡检计划列表
*/
@ApiOperation("导出巡检计划列表")
@PreAuthorize("@ss.hasPermi('itsm:plan:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, InspectionPlan inspectionPlan)
{
List<InspectionPlan> list = inspectionPlanService.selectInspectionPlanList(inspectionPlan);
ExcelUtil<InspectionPlan> util = new ExcelUtil<InspectionPlan>(InspectionPlan.class);
util.exportExcel(response, list, "巡检计划数据");
}
/**
* 获取巡检计划详细信息
*/
@PreAuthorize("@ss.hasPermi('itsm:plan:query')")
@GetMapping(value = "/{id}")
@ApiOperation("获取巡检计划详细信息")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(inspectionPlanService.selectInspectionPlanById(id));
}
/**
* 新增巡检计划
*/
@PreAuthorize("@ss.hasPermi('itsm:plan:add')")
@PostMapping
@ApiOperation("新增巡检计划")
public AjaxResult add(@RequestBody InspectionPlan inspectionPlan)
{
return toAjax(inspectionPlanService.insertInspectionPlan(inspectionPlan));
}
/**
* 修改巡检计划
*/
@PreAuthorize("@ss.hasPermi('itsm:plan:edit')")
@PutMapping
@ApiOperation("修改巡检计划")
public AjaxResult edit(@RequestBody InspectionPlan inspectionPlan)
{
return toAjax(inspectionPlanService.updateInspectionPlan(inspectionPlan));
}
/**
* 删除巡检计划
*/
@PreAuthorize("@ss.hasPermi('itsm:plan:remove')")
@DeleteMapping("/{ids}")
@ApiOperation("删除巡检计划")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(inspectionPlanService.deleteInspectionPlanByIds(ids));
}
}

View File

@@ -0,0 +1,110 @@
package com.xinda.itsm.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.itsm.domain.InspectionRecord;
import com.xinda.itsm.service.IInspectionRecordService;
import com.xinda.common.utils.poi.ExcelUtil;
import com.xinda.common.core.page.TableDataInfo;
/**
* 巡检记录Controller
*
* @author kerwincui
* @date 2025-04-23
*/
@RestController
@RequestMapping("/itsm/record")
@Api(tags = "巡检记录")
public class InspectionRecordController extends BaseController
{
@Autowired
private IInspectionRecordService inspectionRecordService;
/**
* 查询巡检记录列表
*/
@PreAuthorize("@ss.hasPermi('itsm:record:list')")
@GetMapping("/list")
@ApiOperation("查询巡检记录列表")
public TableDataInfo list(InspectionRecord inspectionRecord)
{
startPage();
List<InspectionRecord> list = inspectionRecordService.selectInspectionRecordList(inspectionRecord);
return getDataTable(list);
}
/**
* 导出巡检记录列表
*/
@ApiOperation("导出巡检记录列表")
@PreAuthorize("@ss.hasPermi('itsm:record:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, InspectionRecord inspectionRecord)
{
List<InspectionRecord> list = inspectionRecordService.selectInspectionRecordList(inspectionRecord);
ExcelUtil<InspectionRecord> util = new ExcelUtil<InspectionRecord>(InspectionRecord.class);
util.exportExcel(response, list, "巡检记录数据");
}
/**
* 获取巡检记录详细信息
*/
@PreAuthorize("@ss.hasPermi('itsm:record:query')")
@GetMapping(value = "/{id}")
@ApiOperation("获取巡检记录详细信息")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(inspectionRecordService.selectInspectionRecordById(id));
}
/**
* 新增巡检记录
*/
@PreAuthorize("@ss.hasPermi('itsm:record:add')")
@PostMapping
@ApiOperation("新增巡检记录")
public AjaxResult add(@RequestBody InspectionRecord inspectionRecord)
{
return toAjax(inspectionRecordService.insertInspectionRecord(inspectionRecord));
}
/**
* 修改巡检记录
*/
@PreAuthorize("@ss.hasPermi('itsm:record:edit')")
@PutMapping
@ApiOperation("修改巡检记录")
public AjaxResult edit(@RequestBody InspectionRecord inspectionRecord)
{
return toAjax(inspectionRecordService.updateInspectionRecord(inspectionRecord));
}
/**
* 删除巡检记录
*/
@PreAuthorize("@ss.hasPermi('itsm:record:remove')")
@DeleteMapping("/{ids}")
@ApiOperation("删除巡检记录")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(inspectionRecordService.deleteInspectionRecordByIds(ids));
}
}

View File

@@ -0,0 +1,110 @@
package com.xinda.itsm.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.itsm.domain.PrePlan;
import com.xinda.itsm.service.IPrePlanService;
import com.xinda.common.utils.poi.ExcelUtil;
import com.xinda.common.core.page.TableDataInfo;
/**
* 预案管理Controller
*
* @author kerwincui
* @date 2025-04-27
*/
@RestController
@RequestMapping("/itsm/prePlan")
@Api(tags = "预案管理")
public class PrePlanController extends BaseController
{
@Autowired
private IPrePlanService prePlanService;
/**
* 查询预案管理列表
*/
@PreAuthorize("@ss.hasPermi('itsm:prePlan:list')")
@GetMapping("/list")
@ApiOperation("查询预案管理列表")
public TableDataInfo list(PrePlan prePlan)
{
startPage();
List<PrePlan> list = prePlanService.selectPrePlanList(prePlan);
return getDataTable(list);
}
/**
* 导出预案管理列表
*/
@ApiOperation("导出预案管理列表")
@PreAuthorize("@ss.hasPermi('itsm:prePlan:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, PrePlan prePlan)
{
List<PrePlan> list = prePlanService.selectPrePlanList(prePlan);
ExcelUtil<PrePlan> util = new ExcelUtil<PrePlan>(PrePlan.class);
util.exportExcel(response, list, "预案管理数据");
}
/**
* 获取预案管理详细信息
*/
@PreAuthorize("@ss.hasPermi('itsm:prePlan:query')")
@GetMapping(value = "/{prePlanId}")
@ApiOperation("获取预案管理详细信息")
public AjaxResult getInfo(@PathVariable("prePlanId") Long prePlanId)
{
return success(prePlanService.selectPrePlanByPrePlanId(prePlanId));
}
/**
* 新增预案管理
*/
@PreAuthorize("@ss.hasPermi('itsm:prePlan:add')")
@PostMapping
@ApiOperation("新增预案管理")
public AjaxResult add(@RequestBody PrePlan prePlan)
{
return toAjax(prePlanService.insertPrePlan(prePlan));
}
/**
* 修改预案管理
*/
@PreAuthorize("@ss.hasPermi('itsm:prePlan:edit')")
@PutMapping
@ApiOperation("修改预案管理")
public AjaxResult edit(@RequestBody PrePlan prePlan)
{
return toAjax(prePlanService.updatePrePlan(prePlan));
}
/**
* 删除预案管理
*/
@PreAuthorize("@ss.hasPermi('itsm:prePlan:remove')")
@DeleteMapping("/{prePlanIds}")
@ApiOperation("删除预案管理")
public AjaxResult remove(@PathVariable Long[] prePlanIds)
{
return toAjax(prePlanService.deletePrePlanByPrePlanIds(prePlanIds));
}
}

View File

@@ -0,0 +1,110 @@
package com.xinda.itsm.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.itsm.domain.ProcessInfo;
import com.xinda.itsm.service.IProcessInfoService;
import com.xinda.common.utils.poi.ExcelUtil;
import com.xinda.common.core.page.TableDataInfo;
/**
* 流程管理Controller
*
* @author kerwincui
* @date 2025-04-27
*/
@RestController
@RequestMapping("/itsm/process")
@Api(tags = "流程管理")
public class ProcessInfoController extends BaseController
{
@Autowired
private IProcessInfoService processInfoService;
/**
* 查询流程管理列表
*/
@PreAuthorize("@ss.hasPermi('itsm:process:list')")
@GetMapping("/list")
@ApiOperation("查询流程管理列表")
public TableDataInfo list(ProcessInfo processInfo)
{
startPage();
List<ProcessInfo> list = processInfoService.selectProcessInfoList(processInfo);
return getDataTable(list);
}
/**
* 导出流程管理列表
*/
@ApiOperation("导出流程管理列表")
@PreAuthorize("@ss.hasPermi('itsm:process:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, ProcessInfo processInfo)
{
List<ProcessInfo> list = processInfoService.selectProcessInfoList(processInfo);
ExcelUtil<ProcessInfo> util = new ExcelUtil<ProcessInfo>(ProcessInfo.class);
util.exportExcel(response, list, "流程管理数据");
}
/**
* 获取流程管理详细信息
*/
@PreAuthorize("@ss.hasPermi('itsm:process:query')")
@GetMapping(value = "/{processId}")
@ApiOperation("获取流程管理详细信息")
public AjaxResult getInfo(@PathVariable("processId") Long processId)
{
return success(processInfoService.selectProcessInfoByProcessId(processId));
}
/**
* 新增流程管理
*/
@PreAuthorize("@ss.hasPermi('itsm:process:add')")
@PostMapping
@ApiOperation("新增流程管理")
public AjaxResult add(@RequestBody ProcessInfo processInfo)
{
return toAjax(processInfoService.insertProcessInfo(processInfo));
}
/**
* 修改流程管理
*/
@PreAuthorize("@ss.hasPermi('itsm:process:edit')")
@PutMapping
@ApiOperation("修改流程管理")
public AjaxResult edit(@RequestBody ProcessInfo processInfo)
{
return toAjax(processInfoService.updateProcessInfo(processInfo));
}
/**
* 删除流程管理
*/
@PreAuthorize("@ss.hasPermi('itsm:process:remove')")
@DeleteMapping("/{processIds}")
@ApiOperation("删除流程管理")
public AjaxResult remove(@PathVariable Long[] processIds)
{
return toAjax(processInfoService.deleteProcessInfoByProcessIds(processIds));
}
}

View File

@@ -0,0 +1,110 @@
package com.xinda.itsm.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.itsm.domain.RegulationInfo;
import com.xinda.itsm.service.IRegulationInfoService;
import com.xinda.common.utils.poi.ExcelUtil;
import com.xinda.common.core.page.TableDataInfo;
/**
* 制度管理Controller
*
* @author kerwincui
* @date 2025-04-27
*/
@RestController
@RequestMapping("/itsm/regulation")
@Api(tags = "制度管理")
public class RegulationInfoController extends BaseController
{
@Autowired
private IRegulationInfoService regulationInfoService;
/**
* 查询制度管理列表
*/
@PreAuthorize("@ss.hasPermi('itsm:regulation:list')")
@GetMapping("/list")
@ApiOperation("查询制度管理列表")
public TableDataInfo list(RegulationInfo regulationInfo)
{
startPage();
List<RegulationInfo> list = regulationInfoService.selectRegulationInfoList(regulationInfo);
return getDataTable(list);
}
/**
* 导出制度管理列表
*/
@ApiOperation("导出制度管理列表")
@PreAuthorize("@ss.hasPermi('itsm:regulation:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, RegulationInfo regulationInfo)
{
List<RegulationInfo> list = regulationInfoService.selectRegulationInfoList(regulationInfo);
ExcelUtil<RegulationInfo> util = new ExcelUtil<RegulationInfo>(RegulationInfo.class);
util.exportExcel(response, list, "制度管理数据");
}
/**
* 获取制度管理详细信息
*/
@PreAuthorize("@ss.hasPermi('itsm:regulation:query')")
@GetMapping(value = "/{regulationId}")
@ApiOperation("获取制度管理详细信息")
public AjaxResult getInfo(@PathVariable("regulationId") Long regulationId)
{
return success(regulationInfoService.selectRegulationInfoByRegulationId(regulationId));
}
/**
* 新增制度管理
*/
@PreAuthorize("@ss.hasPermi('itsm:regulation:add')")
@PostMapping
@ApiOperation("新增制度管理")
public AjaxResult add(@RequestBody RegulationInfo regulationInfo)
{
return toAjax(regulationInfoService.insertRegulationInfo(regulationInfo));
}
/**
* 修改制度管理
*/
@PreAuthorize("@ss.hasPermi('itsm:regulation:edit')")
@PutMapping
@ApiOperation("修改制度管理")
public AjaxResult edit(@RequestBody RegulationInfo regulationInfo)
{
return toAjax(regulationInfoService.updateRegulationInfo(regulationInfo));
}
/**
* 删除制度管理
*/
@PreAuthorize("@ss.hasPermi('itsm:regulation:remove')")
@DeleteMapping("/{regulationIds}")
@ApiOperation("删除制度管理")
public AjaxResult remove(@PathVariable Long[] regulationIds)
{
return toAjax(regulationInfoService.deleteRegulationInfoByRegulationIds(regulationIds));
}
}

View File

@@ -0,0 +1,110 @@
package com.xinda.itsm.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.itsm.domain.RepairOrder;
import com.xinda.itsm.service.IRepairOrderService;
import com.xinda.common.utils.poi.ExcelUtil;
import com.xinda.common.core.page.TableDataInfo;
/**
* 维修工单Controller
*
* @author kerwincui
* @date 2025-04-23
*/
@RestController
@RequestMapping("/itsm/order")
@Api(tags = "维修工单")
public class RepairOrderController extends BaseController
{
@Autowired
private IRepairOrderService repairOrderService;
/**
* 查询维修工单列表
*/
@PreAuthorize("@ss.hasPermi('itsm:order:list')")
@GetMapping("/list")
@ApiOperation("查询维修工单列表")
public TableDataInfo list(RepairOrder repairOrder)
{
startPage();
List<RepairOrder> list = repairOrderService.selectRepairOrderList(repairOrder);
return getDataTable(list);
}
/**
* 导出维修工单列表
*/
@ApiOperation("导出维修工单列表")
@PreAuthorize("@ss.hasPermi('itsm:order:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, RepairOrder repairOrder)
{
List<RepairOrder> list = repairOrderService.selectRepairOrderList(repairOrder);
ExcelUtil<RepairOrder> util = new ExcelUtil<RepairOrder>(RepairOrder.class);
util.exportExcel(response, list, "维修工单数据");
}
/**
* 获取维修工单详细信息
*/
@PreAuthorize("@ss.hasPermi('itsm:order:query')")
@GetMapping(value = "/{id}")
@ApiOperation("获取维修工单详细信息")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(repairOrderService.selectRepairOrderById(id));
}
/**
* 新增维修工单
*/
@PreAuthorize("@ss.hasPermi('itsm:order:add')")
@PostMapping
@ApiOperation("新增维修工单")
public AjaxResult add(@RequestBody RepairOrder repairOrder)
{
return toAjax(repairOrderService.insertRepairOrder(repairOrder));
}
/**
* 修改维修工单
*/
@PreAuthorize("@ss.hasPermi('itsm:order:edit')")
@PutMapping
@ApiOperation("修改维修工单")
public AjaxResult edit(@RequestBody RepairOrder repairOrder)
{
return toAjax(repairOrderService.updateRepairOrder(repairOrder));
}
/**
* 删除维修工单
*/
@PreAuthorize("@ss.hasPermi('itsm:order:remove')")
@DeleteMapping("/{ids}")
@ApiOperation("删除维修工单")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(repairOrderService.deleteRepairOrderByIds(ids));
}
}

View File

@@ -0,0 +1,110 @@
package com.xinda.itsm.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.itsm.domain.Schedule;
import com.xinda.itsm.service.IScheduleService;
import com.xinda.common.utils.poi.ExcelUtil;
import com.xinda.common.core.page.TableDataInfo;
/**
* 调度计划管理Controller
*
* @author kerwincui
* @date 2025-04-23
*/
@RestController
@RequestMapping("/itsm/schedule")
@Api(tags = "调度计划管理")
public class ScheduleController extends BaseController
{
@Autowired
private IScheduleService scheduleService;
/**
* 查询调度计划管理列表
*/
@PreAuthorize("@ss.hasPermi('itsm:schedule:list')")
@GetMapping("/list")
@ApiOperation("查询调度计划管理列表")
public TableDataInfo list(Schedule schedule)
{
startPage();
List<Schedule> list = scheduleService.selectScheduleList(schedule);
return getDataTable(list);
}
/**
* 导出调度计划管理列表
*/
@ApiOperation("导出调度计划管理列表")
@PreAuthorize("@ss.hasPermi('itsm:schedule:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, Schedule schedule)
{
List<Schedule> list = scheduleService.selectScheduleList(schedule);
ExcelUtil<Schedule> util = new ExcelUtil<Schedule>(Schedule.class);
util.exportExcel(response, list, "调度计划管理数据");
}
/**
* 获取调度计划管理详细信息
*/
@PreAuthorize("@ss.hasPermi('itsm:schedule:query')")
@GetMapping(value = "/{scheduleId}")
@ApiOperation("获取调度计划管理详细信息")
public AjaxResult getInfo(@PathVariable("scheduleId") Long scheduleId)
{
return success(scheduleService.selectScheduleByScheduleId(scheduleId));
}
/**
* 新增调度计划管理
*/
@PreAuthorize("@ss.hasPermi('itsm:schedule:add')")
@PostMapping
@ApiOperation("新增调度计划管理")
public AjaxResult add(@RequestBody Schedule schedule)
{
return toAjax(scheduleService.insertSchedule(schedule));
}
/**
* 修改调度计划管理
*/
@PreAuthorize("@ss.hasPermi('itsm:schedule:edit')")
@PutMapping
@ApiOperation("修改调度计划管理")
public AjaxResult edit(@RequestBody Schedule schedule)
{
return toAjax(scheduleService.updateSchedule(schedule));
}
/**
* 删除调度计划管理
*/
@PreAuthorize("@ss.hasPermi('itsm:schedule:remove')")
@DeleteMapping("/{scheduleIds}")
@ApiOperation("删除调度计划管理")
public AjaxResult remove(@PathVariable Long[] scheduleIds)
{
return toAjax(scheduleService.deleteScheduleByScheduleIds(scheduleIds));
}
}

View File

@@ -0,0 +1,110 @@
package com.xinda.itsm.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.itsm.domain.StandardInfo;
import com.xinda.itsm.service.IStandardInfoService;
import com.xinda.common.utils.poi.ExcelUtil;
import com.xinda.common.core.page.TableDataInfo;
/**
* 作业规范Controller
*
* @author kerwincui
* @date 2025-04-27
*/
@RestController
@RequestMapping("/itsm/standardInfo")
@Api(tags = "作业规范")
public class StandardInfoController extends BaseController
{
@Autowired
private IStandardInfoService standardInfoService;
/**
* 查询作业规范列表
*/
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:list')")
@GetMapping("/list")
@ApiOperation("查询作业规范列表")
public TableDataInfo list(StandardInfo standardInfo)
{
startPage();
List<StandardInfo> list = standardInfoService.selectStandardInfoList(standardInfo);
return getDataTable(list);
}
/**
* 导出作业规范列表
*/
@ApiOperation("导出作业规范列表")
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, StandardInfo standardInfo)
{
List<StandardInfo> list = standardInfoService.selectStandardInfoList(standardInfo);
ExcelUtil<StandardInfo> util = new ExcelUtil<StandardInfo>(StandardInfo.class);
util.exportExcel(response, list, "作业规范数据");
}
/**
* 获取作业规范详细信息
*/
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:query')")
@GetMapping(value = "/{standardId}")
@ApiOperation("获取作业规范详细信息")
public AjaxResult getInfo(@PathVariable("standardId") Long standardId)
{
return success(standardInfoService.selectStandardInfoByStandardId(standardId));
}
/**
* 新增作业规范
*/
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:add')")
@PostMapping
@ApiOperation("新增作业规范")
public AjaxResult add(@RequestBody StandardInfo standardInfo)
{
return toAjax(standardInfoService.insertStandardInfo(standardInfo));
}
/**
* 修改作业规范
*/
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:edit')")
@PutMapping
@ApiOperation("修改作业规范")
public AjaxResult edit(@RequestBody StandardInfo standardInfo)
{
return toAjax(standardInfoService.updateStandardInfo(standardInfo));
}
/**
* 删除作业规范
*/
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:remove')")
@DeleteMapping("/{standardIds}")
@ApiOperation("删除作业规范")
public AjaxResult remove(@PathVariable Long[] standardIds)
{
return toAjax(standardInfoService.deleteStandardInfoByStandardIds(standardIds));
}
}

View File

@@ -0,0 +1,56 @@
package com.xinda.itsm.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;
/**
* 值班管理对象 duty
*
* @author kerwincui
* @date 2025-04-23
*/
@ApiModel(value = "Duty",description = "值班管理 duty")
@Data
public class Duty extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 值班id */
private Long dutyId;
/** 值班日期 */
@Excel(name = "值班日期")
@ApiModelProperty("值班日期")
private String dutyDate;
/** 值班人员 */
@Excel(name = "值班人员")
@ApiModelProperty("值班人员")
private String onDuty;
/** 值班时间段 */
@Excel(name = "值班时间段")
@ApiModelProperty("值班时间段")
private String dutyPeriod;
/** 值班类型 */
@Excel(name = "值班类型")
@ApiModelProperty("值班类型")
private String type;
/** 值班状态 */
@Excel(name = "值班状态")
@ApiModelProperty("值班状态")
private String status;
/** 替班人员 */
@Excel(name = "替班人员")
@ApiModelProperty("替班人员")
private String relief;
}

View File

@@ -0,0 +1,70 @@
package com.xinda.itsm.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
/**
* 例报管理对象 example_report
*
* @author kerwincui
* @date 2025-04-23
*/
@ApiModel(value = "ExampleReport",description = "例报管理 example_report")
@Data
public class ExampleReport extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 例报id */
private Long exampleReportId;
/** 例报类型 */
@Excel(name = "例报类型")
@ApiModelProperty("例报类型")
private String type;
/** 例报周期 */
@Excel(name = "例报周期")
@ApiModelProperty("例报周期")
private String cycle;
/** 例报内容 */
@Excel(name = "例报内容")
@ApiModelProperty("例报内容")
private String content;
/** 推送方式 */
@Excel(name = "推送方式")
@ApiModelProperty("推送方式")
private String pushMethod;
/** 接收人id */
@Excel(name = "接收人id")
@ApiModelProperty("接收人id")
private String userId;
/** 接收人 */
@Excel(name = "接收人")
@ApiModelProperty("接收人")
private String receiver;
/** 开始日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "开始日期", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("开始日期")
private Date startDate;
/** 结束日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "结束日期", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("结束日期")
private Date endDate;
}

View File

@@ -0,0 +1,85 @@
package com.xinda.itsm.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
/**
* 巡检计划对象 inspection_plan
*
* @author kerwincui
* @date 2025-04-23
*/
@ApiModel(value = "InspectionPlan",description = "巡检计划 inspection_plan")
@Data
public class InspectionPlan extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 计划名称 */
@Excel(name = "计划名称")
@ApiModelProperty("计划名称")
private String planName;
/** 计划内容 */
@Excel(name = "计划内容")
@ApiModelProperty("计划内容")
private String planContent;
/** 项目名称 */
@Excel(name = "项目名称")
@ApiModelProperty("项目名称")
private String projectName;
/** 开始日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "开始日期", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("开始日期")
private Date startDate;
/** 结束日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "结束日期", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("结束日期")
private Date endDate;
/** 巡检周期 */
@Excel(name = "巡检周期")
@ApiModelProperty("巡检周期")
private String inspectionCycle;
/** 巡检人 */
@Excel(name = "巡检人")
@ApiModelProperty("巡检人")
private String inspectionPerson;
/** 巡检人id */
@Excel(name = "巡检人id")
@ApiModelProperty("巡检人id")
private String userId;
/** 巡检指定日期 */
@Excel(name = "巡检指定日期")
@ApiModelProperty("巡检指定日期")
private String setDate;
/** 巡检固定时间 */
@Excel(name = "巡检固定时间")
@ApiModelProperty("巡检固定时间")
private String setTime;
/** 状态0正常 1停用 */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
@ApiModelProperty("状态")
private String status;
}

View File

@@ -0,0 +1,90 @@
package com.xinda.itsm.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
/**
* 巡检记录对象 inspection_record
*
* @author kerwincui
* @date 2025-04-23
*/
@ApiModel(value = "InspectionRecord",description = "巡检记录 inspection_record")
@Data
public class InspectionRecord extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 计划id */
@Excel(name = "计划id")
@ApiModelProperty("计划id")
private Long planId;
/** 计划名称 */
@Excel(name = "计划名称")
@ApiModelProperty("计划名称")
private String planName;
/** 计划内容 */
@Excel(name = "计划内容")
@ApiModelProperty("计划内容")
private String planContent;
/** 项目名称 */
@Excel(name = "项目名称")
@ApiModelProperty("项目名称")
private String projectName;
/** 计划巡检时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划巡检时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("计划巡检时间")
private Date planTime;
/** 实际巡检时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "实际巡检时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("实际巡检时间")
private Date inspectionTime;
/** 巡检人 */
@Excel(name = "巡检人")
@ApiModelProperty("巡检人")
private String inspectionPerson;
/** 巡检人id */
@Excel(name = "巡检人id")
@ApiModelProperty("巡检人id")
private String userId;
/** 巡检周期 */
@Excel(name = "巡检周期")
@ApiModelProperty("巡检周期")
private String inspectionCycle;
/** 周期 */
@Excel(name = "周期")
@ApiModelProperty("周期")
private String cycle;
/** 巡检状态(默认值为0待进行) */
@Excel(name = "巡检状态(默认值为0待进行)")
@ApiModelProperty("巡检状态(默认值为0待进行)")
private String inspectionStatus;
/** 巡检备注 */
@Excel(name = "巡检备注")
@ApiModelProperty("巡检备注")
private String inspectionRemark;
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.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;
/**
* 预案管理对象 pre_plan
*
* @author kerwincui
* @date 2025-04-27
*/
@ApiModel(value = "PrePlan",description = "预案管理 pre_plan")
@Data
public class PrePlan extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 预案id */
private Long prePlanId;
/** 预案编号 */
@Excel(name = "预案编号")
@ApiModelProperty("预案编号")
private String number;
/** 预案类型 */
@Excel(name = "预案类型")
@ApiModelProperty("预案类型")
private String type;
/** 站名 */
@Excel(name = "站名")
@ApiModelProperty("站名")
private String station;
/** 设备 */
@Excel(name = "设备")
@ApiModelProperty("设备")
private String device;
/** 预案内容 */
@Excel(name = "预案内容")
@ApiModelProperty("预案内容")
private String content;
/** 编制人 */
@Excel(name = "编制人")
@ApiModelProperty("编制人")
private String preparedBy;
/** 预案关键词 */
@Excel(name = "预案关键词")
@ApiModelProperty("预案关键词")
private String keywords;
}

View File

@@ -0,0 +1,54 @@
package com.xinda.itsm.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
/**
* 流程管理对象 process_info
*
* @author kerwincui
* @date 2025-04-27
*/
@ApiModel(value = "ProcessInfo",description = "流程管理 process_info")
@Data
public class ProcessInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long processId;
/** 事件名称 */
@Excel(name = "事件名称")
@ApiModelProperty("事件名称")
private String eventName;
/** 事件类型 */
@Excel(name = "事件类型")
@ApiModelProperty("事件类型")
private String eventType;
/** 触发时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "触发时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("触发时间")
private Date touchTime;
/** 处理结果 */
@Excel(name = "处理结果")
@ApiModelProperty("处理结果")
private String handleResult;
/** 处理人 */
@Excel(name = "处理人")
@ApiModelProperty("处理人")
private Long handlePerson;
}

View File

@@ -0,0 +1,59 @@
package com.xinda.itsm.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
/**
* 制度管理对象 regulation_info
*
* @author kerwincui
* @date 2025-04-27
*/
@ApiModel(value = "RegulationInfo",description = "制度管理 regulation_info")
@Data
public class RegulationInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long regulationId;
/** 制度编码 */
@Excel(name = "制度编码")
@ApiModelProperty("制度编码")
private String regulationCode;
/** 制度名称 */
@Excel(name = "制度名称")
@ApiModelProperty("制度名称")
private String regulationName;
/** 制度描述 */
@Excel(name = "制度描述")
@ApiModelProperty("制度描述")
private String regulationDescribe;
/** 制度类型 */
@Excel(name = "制度类型")
@ApiModelProperty("制度类型")
private String regulationType;
/** 制度文件 */
@Excel(name = "制度文件")
@ApiModelProperty("制度文件")
private String docOssId;
/** 上传时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("上传时间")
private Date uploadTime;
}

View File

@@ -0,0 +1,80 @@
package com.xinda.itsm.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
/**
* 维修工单对象 repair_order
*
* @author kerwincui
* @date 2025-04-23
*/
@ApiModel(value = "RepairOrder",description = "维修工单 repair_order")
@Data
public class RepairOrder extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 工单编号 */
@Excel(name = "工单编号")
@ApiModelProperty("工单编号")
private String orderNo;
/** 工单内容 */
@Excel(name = "工单内容")
@ApiModelProperty("工单内容")
private String orderContent;
/** 项目名称 */
@Excel(name = "项目名称")
@ApiModelProperty("项目名称")
private String projectName;
/** 派单时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "派单时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("派单时间")
private Date assignTime;
/** 完成时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("完成时间")
private Date finishTime;
/** 完成人 */
@Excel(name = "完成人")
@ApiModelProperty("完成人")
private String finishBy;
/** 附件 */
@Excel(name = "附件")
@ApiModelProperty("附件")
private String annex;
/** 完成人id */
@Excel(name = "完成人id")
@ApiModelProperty("完成人id")
private Long userId;
/** 工单状态(默认值为0待进行) */
@Excel(name = "工单状态(默认值为0待进行)")
@ApiModelProperty("工单状态(默认值为0待进行)")
private String orderStatus;
/** 工单备注 */
@Excel(name = "工单备注")
@ApiModelProperty("工单备注")
private String orderRemark;
}

View File

@@ -0,0 +1,132 @@
package com.xinda.itsm.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
/**
* 调度计划管理对象 schedule
*
* @author kerwincui
* @date 2025-04-23
*/
@ApiModel(value = "Schedule",description = "调度计划管理 schedule")
@Data
public class Schedule extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 调度计划id */
private Long scheduleId;
/** 计划编号 */
@Excel(name = "计划编号")
@ApiModelProperty("计划编号")
private String number;
/** 类型 */
@Excel(name = "类型")
@ApiModelProperty("类型")
private String type;
/** 计划周期 */
@Excel(name = "计划周期")
@ApiModelProperty("计划周期")
private String cycle;
/** 站所 */
@Excel(name = "站所")
@ApiModelProperty("站所")
private String station;
/** 状态 */
@Excel(name = "状态")
@ApiModelProperty("状态")
private String status;
/** 是否超时(0是1不是) */
@Excel(name = "是否超时(0是1不是)")
@ApiModelProperty("是否超时(0是1不是)")
private String isTimeout;
/** 计划名称 */
@Excel(name = "计划名称")
@ApiModelProperty("计划名称")
private String name;
/** 计划来源 */
@Excel(name = "计划来源")
@ApiModelProperty("计划来源")
private String source;
/** 计划内容 */
@Excel(name = "计划内容")
@ApiModelProperty("计划内容")
private String content;
/** 开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("开始时间")
private Date startTime;
/** 结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("结束时间")
private Date endTime;
/** 一级提醒 */
@Excel(name = "一级提醒")
@ApiModelProperty("一级提醒")
private Long firstReminder;
/** 二级提醒 */
@Excel(name = "二级提醒")
@ApiModelProperty("二级提醒")
private Long secondReminder;
/** 开工执行人 */
@Excel(name = "开工执行人")
@ApiModelProperty("开工执行人")
private String operator;
/** 开工时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "开工时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("开工时间")
private Date commencementTime;
/** 归结执行人 */
@Excel(name = "归结执行人")
@ApiModelProperty("归结执行人")
private String terminator;
/** 归结时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "归结时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("归结时间")
private Date resolutionTime;
/** 归结内容 */
@Excel(name = "归结内容")
@ApiModelProperty("归结内容")
private String resolutionContent;
/** 编制人 */
@Excel(name = "编制人")
@ApiModelProperty("编制人")
private String preparedBy;
/** 负责人 */
@Excel(name = "负责人")
@ApiModelProperty("负责人")
private String head;
}

View File

@@ -0,0 +1,46 @@
package com.xinda.itsm.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;
/**
* 作业规范对象 standard_info
*
* @author kerwincui
* @date 2025-04-27
*/
@ApiModel(value = "StandardInfo",description = "作业规范 standard_info")
@Data
public class StandardInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long standardId;
/** 规范编码 */
@Excel(name = "规范编码")
@ApiModelProperty("规范编码")
private String standardCode;
/** 规范名称 */
@Excel(name = "规范名称")
@ApiModelProperty("规范名称")
private String standardName;
/** 规范描述 */
@Excel(name = "规范描述")
@ApiModelProperty("规范描述")
private String standardDescribe;
/** 规范文件 */
@Excel(name = "规范文件")
@ApiModelProperty("规范文件")
private String docOssId;
}

View File

@@ -0,0 +1,29 @@
package com.xinda.itsm.domain.enums;
import lombok.Getter;
/**
* @Author cpems
* @Date 2023/11/2 14:44
**/
@Getter
public enum InspectionRecordStatus {
/**
* 进行中
*/
IN_PROGRESS("0", "inProgress", "进行中"),
/**
* 已完成
*/
COMPLETED("1", "completed", "已完成");
private final String code;
private final String info;
private final String name;
InspectionRecordStatus(String code, String info, String name) {
this.code = code;
this.info = info;
this.name = name;
}
}

View File

@@ -0,0 +1,38 @@
package com.xinda.itsm.domain.enums;
import lombok.Getter;
/**
* @Author cpems
* @Date 2023/11/2 13:55
**/
@Getter
public enum RepairOrderStatus {
/**
* 待进行
*/
CARRIED_OUT("0", "carriedOut", "待进行"),
/**
* 进行中
*/
IN_PROGRESS("1", "inProgress", "进行中"),
/**
* 已完成
*/
COMPLETED("2", "completed", "已完成"),
/**
* 已取消
*/
CANCELED("3", "canceled", "已取消");
private final String code;
private final String info;
private final String name;
RepairOrderStatus(String code, String info, String name) {
this.code = code;
this.info = info;
this.name = name;
}
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.mapper;
import java.util.List;
import com.xinda.itsm.domain.Duty;
/**
* 值班管理Mapper接口
*
* @author kerwincui
* @date 2025-04-23
*/
public interface DutyMapper
{
/**
* 查询值班管理
*
* @param dutyId 值班管理主键
* @return 值班管理
*/
public Duty selectDutyByDutyId(Long dutyId);
/**
* 查询值班管理列表
*
* @param duty 值班管理
* @return 值班管理集合
*/
public List<Duty> selectDutyList(Duty duty);
/**
* 新增值班管理
*
* @param duty 值班管理
* @return 结果
*/
public int insertDuty(Duty duty);
/**
* 修改值班管理
*
* @param duty 值班管理
* @return 结果
*/
public int updateDuty(Duty duty);
/**
* 删除值班管理
*
* @param dutyId 值班管理主键
* @return 结果
*/
public int deleteDutyByDutyId(Long dutyId);
/**
* 批量删除值班管理
*
* @param dutyIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteDutyByDutyIds(Long[] dutyIds);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.mapper;
import java.util.List;
import com.xinda.itsm.domain.ExampleReport;
/**
* 例报管理Mapper接口
*
* @author kerwincui
* @date 2025-04-23
*/
public interface ExampleReportMapper
{
/**
* 查询例报管理
*
* @param exampleReportId 例报管理主键
* @return 例报管理
*/
public ExampleReport selectExampleReportByExampleReportId(Long exampleReportId);
/**
* 查询例报管理列表
*
* @param exampleReport 例报管理
* @return 例报管理集合
*/
public List<ExampleReport> selectExampleReportList(ExampleReport exampleReport);
/**
* 新增例报管理
*
* @param exampleReport 例报管理
* @return 结果
*/
public int insertExampleReport(ExampleReport exampleReport);
/**
* 修改例报管理
*
* @param exampleReport 例报管理
* @return 结果
*/
public int updateExampleReport(ExampleReport exampleReport);
/**
* 删除例报管理
*
* @param exampleReportId 例报管理主键
* @return 结果
*/
public int deleteExampleReportByExampleReportId(Long exampleReportId);
/**
* 批量删除例报管理
*
* @param exampleReportIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteExampleReportByExampleReportIds(Long[] exampleReportIds);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.mapper;
import java.util.List;
import com.xinda.itsm.domain.InspectionPlan;
/**
* 巡检计划Mapper接口
*
* @author kerwincui
* @date 2025-04-23
*/
public interface InspectionPlanMapper
{
/**
* 查询巡检计划
*
* @param id 巡检计划主键
* @return 巡检计划
*/
public InspectionPlan selectInspectionPlanById(Long id);
/**
* 查询巡检计划列表
*
* @param inspectionPlan 巡检计划
* @return 巡检计划集合
*/
public List<InspectionPlan> selectInspectionPlanList(InspectionPlan inspectionPlan);
/**
* 新增巡检计划
*
* @param inspectionPlan 巡检计划
* @return 结果
*/
public int insertInspectionPlan(InspectionPlan inspectionPlan);
/**
* 修改巡检计划
*
* @param inspectionPlan 巡检计划
* @return 结果
*/
public int updateInspectionPlan(InspectionPlan inspectionPlan);
/**
* 删除巡检计划
*
* @param id 巡检计划主键
* @return 结果
*/
public int deleteInspectionPlanById(Long id);
/**
* 批量删除巡检计划
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteInspectionPlanByIds(Long[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.mapper;
import java.util.List;
import com.xinda.itsm.domain.InspectionRecord;
/**
* 巡检记录Mapper接口
*
* @author kerwincui
* @date 2025-04-23
*/
public interface InspectionRecordMapper
{
/**
* 查询巡检记录
*
* @param id 巡检记录主键
* @return 巡检记录
*/
public InspectionRecord selectInspectionRecordById(Long id);
/**
* 查询巡检记录列表
*
* @param inspectionRecord 巡检记录
* @return 巡检记录集合
*/
public List<InspectionRecord> selectInspectionRecordList(InspectionRecord inspectionRecord);
/**
* 新增巡检记录
*
* @param inspectionRecord 巡检记录
* @return 结果
*/
public int insertInspectionRecord(InspectionRecord inspectionRecord);
/**
* 修改巡检记录
*
* @param inspectionRecord 巡检记录
* @return 结果
*/
public int updateInspectionRecord(InspectionRecord inspectionRecord);
/**
* 删除巡检记录
*
* @param id 巡检记录主键
* @return 结果
*/
public int deleteInspectionRecordById(Long id);
/**
* 批量删除巡检记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteInspectionRecordByIds(Long[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.mapper;
import java.util.List;
import com.xinda.itsm.domain.PrePlan;
/**
* 预案管理Mapper接口
*
* @author kerwincui
* @date 2025-04-27
*/
public interface PrePlanMapper
{
/**
* 查询预案管理
*
* @param prePlanId 预案管理主键
* @return 预案管理
*/
public PrePlan selectPrePlanByPrePlanId(Long prePlanId);
/**
* 查询预案管理列表
*
* @param prePlan 预案管理
* @return 预案管理集合
*/
public List<PrePlan> selectPrePlanList(PrePlan prePlan);
/**
* 新增预案管理
*
* @param prePlan 预案管理
* @return 结果
*/
public int insertPrePlan(PrePlan prePlan);
/**
* 修改预案管理
*
* @param prePlan 预案管理
* @return 结果
*/
public int updatePrePlan(PrePlan prePlan);
/**
* 删除预案管理
*
* @param prePlanId 预案管理主键
* @return 结果
*/
public int deletePrePlanByPrePlanId(Long prePlanId);
/**
* 批量删除预案管理
*
* @param prePlanIds 需要删除的数据主键集合
* @return 结果
*/
public int deletePrePlanByPrePlanIds(Long[] prePlanIds);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.mapper;
import java.util.List;
import com.xinda.itsm.domain.ProcessInfo;
/**
* 流程管理Mapper接口
*
* @author kerwincui
* @date 2025-04-27
*/
public interface ProcessInfoMapper
{
/**
* 查询流程管理
*
* @param processId 流程管理主键
* @return 流程管理
*/
public ProcessInfo selectProcessInfoByProcessId(Long processId);
/**
* 查询流程管理列表
*
* @param processInfo 流程管理
* @return 流程管理集合
*/
public List<ProcessInfo> selectProcessInfoList(ProcessInfo processInfo);
/**
* 新增流程管理
*
* @param processInfo 流程管理
* @return 结果
*/
public int insertProcessInfo(ProcessInfo processInfo);
/**
* 修改流程管理
*
* @param processInfo 流程管理
* @return 结果
*/
public int updateProcessInfo(ProcessInfo processInfo);
/**
* 删除流程管理
*
* @param processId 流程管理主键
* @return 结果
*/
public int deleteProcessInfoByProcessId(Long processId);
/**
* 批量删除流程管理
*
* @param processIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteProcessInfoByProcessIds(Long[] processIds);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.mapper;
import java.util.List;
import com.xinda.itsm.domain.RegulationInfo;
/**
* 制度管理Mapper接口
*
* @author kerwincui
* @date 2025-04-27
*/
public interface RegulationInfoMapper
{
/**
* 查询制度管理
*
* @param regulationId 制度管理主键
* @return 制度管理
*/
public RegulationInfo selectRegulationInfoByRegulationId(Long regulationId);
/**
* 查询制度管理列表
*
* @param regulationInfo 制度管理
* @return 制度管理集合
*/
public List<RegulationInfo> selectRegulationInfoList(RegulationInfo regulationInfo);
/**
* 新增制度管理
*
* @param regulationInfo 制度管理
* @return 结果
*/
public int insertRegulationInfo(RegulationInfo regulationInfo);
/**
* 修改制度管理
*
* @param regulationInfo 制度管理
* @return 结果
*/
public int updateRegulationInfo(RegulationInfo regulationInfo);
/**
* 删除制度管理
*
* @param regulationId 制度管理主键
* @return 结果
*/
public int deleteRegulationInfoByRegulationId(Long regulationId);
/**
* 批量删除制度管理
*
* @param regulationIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteRegulationInfoByRegulationIds(Long[] regulationIds);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.mapper;
import java.util.List;
import com.xinda.itsm.domain.RepairOrder;
/**
* 维修工单Mapper接口
*
* @author kerwincui
* @date 2025-04-23
*/
public interface RepairOrderMapper
{
/**
* 查询维修工单
*
* @param id 维修工单主键
* @return 维修工单
*/
public RepairOrder selectRepairOrderById(Long id);
/**
* 查询维修工单列表
*
* @param repairOrder 维修工单
* @return 维修工单集合
*/
public List<RepairOrder> selectRepairOrderList(RepairOrder repairOrder);
/**
* 新增维修工单
*
* @param repairOrder 维修工单
* @return 结果
*/
public int insertRepairOrder(RepairOrder repairOrder);
/**
* 修改维修工单
*
* @param repairOrder 维修工单
* @return 结果
*/
public int updateRepairOrder(RepairOrder repairOrder);
/**
* 删除维修工单
*
* @param id 维修工单主键
* @return 结果
*/
public int deleteRepairOrderById(Long id);
/**
* 批量删除维修工单
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteRepairOrderByIds(Long[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.mapper;
import java.util.List;
import com.xinda.itsm.domain.Schedule;
/**
* 调度计划管理Mapper接口
*
* @author kerwincui
* @date 2025-04-23
*/
public interface ScheduleMapper
{
/**
* 查询调度计划管理
*
* @param scheduleId 调度计划管理主键
* @return 调度计划管理
*/
public Schedule selectScheduleByScheduleId(Long scheduleId);
/**
* 查询调度计划管理列表
*
* @param schedule 调度计划管理
* @return 调度计划管理集合
*/
public List<Schedule> selectScheduleList(Schedule schedule);
/**
* 新增调度计划管理
*
* @param schedule 调度计划管理
* @return 结果
*/
public int insertSchedule(Schedule schedule);
/**
* 修改调度计划管理
*
* @param schedule 调度计划管理
* @return 结果
*/
public int updateSchedule(Schedule schedule);
/**
* 删除调度计划管理
*
* @param scheduleId 调度计划管理主键
* @return 结果
*/
public int deleteScheduleByScheduleId(Long scheduleId);
/**
* 批量删除调度计划管理
*
* @param scheduleIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteScheduleByScheduleIds(Long[] scheduleIds);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.mapper;
import java.util.List;
import com.xinda.itsm.domain.StandardInfo;
/**
* 作业规范Mapper接口
*
* @author kerwincui
* @date 2025-04-27
*/
public interface StandardInfoMapper
{
/**
* 查询作业规范
*
* @param standardId 作业规范主键
* @return 作业规范
*/
public StandardInfo selectStandardInfoByStandardId(Long standardId);
/**
* 查询作业规范列表
*
* @param standardInfo 作业规范
* @return 作业规范集合
*/
public List<StandardInfo> selectStandardInfoList(StandardInfo standardInfo);
/**
* 新增作业规范
*
* @param standardInfo 作业规范
* @return 结果
*/
public int insertStandardInfo(StandardInfo standardInfo);
/**
* 修改作业规范
*
* @param standardInfo 作业规范
* @return 结果
*/
public int updateStandardInfo(StandardInfo standardInfo);
/**
* 删除作业规范
*
* @param standardId 作业规范主键
* @return 结果
*/
public int deleteStandardInfoByStandardId(Long standardId);
/**
* 批量删除作业规范
*
* @param standardIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteStandardInfoByStandardIds(Long[] standardIds);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.service;
import java.util.List;
import com.xinda.itsm.domain.Duty;
/**
* 值班管理Service接口
*
* @author kerwincui
* @date 2025-04-23
*/
public interface IDutyService
{
/**
* 查询值班管理
*
* @param dutyId 值班管理主键
* @return 值班管理
*/
public Duty selectDutyByDutyId(Long dutyId);
/**
* 查询值班管理列表
*
* @param duty 值班管理
* @return 值班管理集合
*/
public List<Duty> selectDutyList(Duty duty);
/**
* 新增值班管理
*
* @param duty 值班管理
* @return 结果
*/
public int insertDuty(Duty duty);
/**
* 修改值班管理
*
* @param duty 值班管理
* @return 结果
*/
public int updateDuty(Duty duty);
/**
* 批量删除值班管理
*
* @param dutyIds 需要删除的值班管理主键集合
* @return 结果
*/
public int deleteDutyByDutyIds(Long[] dutyIds);
/**
* 删除值班管理信息
*
* @param dutyId 值班管理主键
* @return 结果
*/
public int deleteDutyByDutyId(Long dutyId);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.service;
import java.util.List;
import com.xinda.itsm.domain.ExampleReport;
/**
* 例报管理Service接口
*
* @author kerwincui
* @date 2025-04-23
*/
public interface IExampleReportService
{
/**
* 查询例报管理
*
* @param exampleReportId 例报管理主键
* @return 例报管理
*/
public ExampleReport selectExampleReportByExampleReportId(Long exampleReportId);
/**
* 查询例报管理列表
*
* @param exampleReport 例报管理
* @return 例报管理集合
*/
public List<ExampleReport> selectExampleReportList(ExampleReport exampleReport);
/**
* 新增例报管理
*
* @param exampleReport 例报管理
* @return 结果
*/
public int insertExampleReport(ExampleReport exampleReport);
/**
* 修改例报管理
*
* @param exampleReport 例报管理
* @return 结果
*/
public int updateExampleReport(ExampleReport exampleReport);
/**
* 批量删除例报管理
*
* @param exampleReportIds 需要删除的例报管理主键集合
* @return 结果
*/
public int deleteExampleReportByExampleReportIds(Long[] exampleReportIds);
/**
* 删除例报管理信息
*
* @param exampleReportId 例报管理主键
* @return 结果
*/
public int deleteExampleReportByExampleReportId(Long exampleReportId);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.service;
import java.util.List;
import com.xinda.itsm.domain.InspectionPlan;
/**
* 巡检计划Service接口
*
* @author kerwincui
* @date 2025-04-23
*/
public interface IInspectionPlanService
{
/**
* 查询巡检计划
*
* @param id 巡检计划主键
* @return 巡检计划
*/
public InspectionPlan selectInspectionPlanById(Long id);
/**
* 查询巡检计划列表
*
* @param inspectionPlan 巡检计划
* @return 巡检计划集合
*/
public List<InspectionPlan> selectInspectionPlanList(InspectionPlan inspectionPlan);
/**
* 新增巡检计划
*
* @param inspectionPlan 巡检计划
* @return 结果
*/
public int insertInspectionPlan(InspectionPlan inspectionPlan);
/**
* 修改巡检计划
*
* @param inspectionPlan 巡检计划
* @return 结果
*/
public int updateInspectionPlan(InspectionPlan inspectionPlan);
/**
* 批量删除巡检计划
*
* @param ids 需要删除的巡检计划主键集合
* @return 结果
*/
public int deleteInspectionPlanByIds(Long[] ids);
/**
* 删除巡检计划信息
*
* @param id 巡检计划主键
* @return 结果
*/
public int deleteInspectionPlanById(Long id);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.service;
import java.util.List;
import com.xinda.itsm.domain.InspectionRecord;
/**
* 巡检记录Service接口
*
* @author kerwincui
* @date 2025-04-23
*/
public interface IInspectionRecordService
{
/**
* 查询巡检记录
*
* @param id 巡检记录主键
* @return 巡检记录
*/
public InspectionRecord selectInspectionRecordById(Long id);
/**
* 查询巡检记录列表
*
* @param inspectionRecord 巡检记录
* @return 巡检记录集合
*/
public List<InspectionRecord> selectInspectionRecordList(InspectionRecord inspectionRecord);
/**
* 新增巡检记录
*
* @param inspectionRecord 巡检记录
* @return 结果
*/
public int insertInspectionRecord(InspectionRecord inspectionRecord);
/**
* 修改巡检记录
*
* @param inspectionRecord 巡检记录
* @return 结果
*/
public int updateInspectionRecord(InspectionRecord inspectionRecord);
/**
* 批量删除巡检记录
*
* @param ids 需要删除的巡检记录主键集合
* @return 结果
*/
public int deleteInspectionRecordByIds(Long[] ids);
/**
* 删除巡检记录信息
*
* @param id 巡检记录主键
* @return 结果
*/
public int deleteInspectionRecordById(Long id);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.service;
import java.util.List;
import com.xinda.itsm.domain.PrePlan;
/**
* 预案管理Service接口
*
* @author kerwincui
* @date 2025-04-27
*/
public interface IPrePlanService
{
/**
* 查询预案管理
*
* @param prePlanId 预案管理主键
* @return 预案管理
*/
public PrePlan selectPrePlanByPrePlanId(Long prePlanId);
/**
* 查询预案管理列表
*
* @param prePlan 预案管理
* @return 预案管理集合
*/
public List<PrePlan> selectPrePlanList(PrePlan prePlan);
/**
* 新增预案管理
*
* @param prePlan 预案管理
* @return 结果
*/
public int insertPrePlan(PrePlan prePlan);
/**
* 修改预案管理
*
* @param prePlan 预案管理
* @return 结果
*/
public int updatePrePlan(PrePlan prePlan);
/**
* 批量删除预案管理
*
* @param prePlanIds 需要删除的预案管理主键集合
* @return 结果
*/
public int deletePrePlanByPrePlanIds(Long[] prePlanIds);
/**
* 删除预案管理信息
*
* @param prePlanId 预案管理主键
* @return 结果
*/
public int deletePrePlanByPrePlanId(Long prePlanId);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.service;
import java.util.List;
import com.xinda.itsm.domain.ProcessInfo;
/**
* 流程管理Service接口
*
* @author kerwincui
* @date 2025-04-27
*/
public interface IProcessInfoService
{
/**
* 查询流程管理
*
* @param processId 流程管理主键
* @return 流程管理
*/
public ProcessInfo selectProcessInfoByProcessId(Long processId);
/**
* 查询流程管理列表
*
* @param processInfo 流程管理
* @return 流程管理集合
*/
public List<ProcessInfo> selectProcessInfoList(ProcessInfo processInfo);
/**
* 新增流程管理
*
* @param processInfo 流程管理
* @return 结果
*/
public int insertProcessInfo(ProcessInfo processInfo);
/**
* 修改流程管理
*
* @param processInfo 流程管理
* @return 结果
*/
public int updateProcessInfo(ProcessInfo processInfo);
/**
* 批量删除流程管理
*
* @param processIds 需要删除的流程管理主键集合
* @return 结果
*/
public int deleteProcessInfoByProcessIds(Long[] processIds);
/**
* 删除流程管理信息
*
* @param processId 流程管理主键
* @return 结果
*/
public int deleteProcessInfoByProcessId(Long processId);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.service;
import java.util.List;
import com.xinda.itsm.domain.RegulationInfo;
/**
* 制度管理Service接口
*
* @author kerwincui
* @date 2025-04-27
*/
public interface IRegulationInfoService
{
/**
* 查询制度管理
*
* @param regulationId 制度管理主键
* @return 制度管理
*/
public RegulationInfo selectRegulationInfoByRegulationId(Long regulationId);
/**
* 查询制度管理列表
*
* @param regulationInfo 制度管理
* @return 制度管理集合
*/
public List<RegulationInfo> selectRegulationInfoList(RegulationInfo regulationInfo);
/**
* 新增制度管理
*
* @param regulationInfo 制度管理
* @return 结果
*/
public int insertRegulationInfo(RegulationInfo regulationInfo);
/**
* 修改制度管理
*
* @param regulationInfo 制度管理
* @return 结果
*/
public int updateRegulationInfo(RegulationInfo regulationInfo);
/**
* 批量删除制度管理
*
* @param regulationIds 需要删除的制度管理主键集合
* @return 结果
*/
public int deleteRegulationInfoByRegulationIds(Long[] regulationIds);
/**
* 删除制度管理信息
*
* @param regulationId 制度管理主键
* @return 结果
*/
public int deleteRegulationInfoByRegulationId(Long regulationId);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.service;
import java.util.List;
import com.xinda.itsm.domain.RepairOrder;
/**
* 维修工单Service接口
*
* @author kerwincui
* @date 2025-04-23
*/
public interface IRepairOrderService
{
/**
* 查询维修工单
*
* @param id 维修工单主键
* @return 维修工单
*/
public RepairOrder selectRepairOrderById(Long id);
/**
* 查询维修工单列表
*
* @param repairOrder 维修工单
* @return 维修工单集合
*/
public List<RepairOrder> selectRepairOrderList(RepairOrder repairOrder);
/**
* 新增维修工单
*
* @param repairOrder 维修工单
* @return 结果
*/
public int insertRepairOrder(RepairOrder repairOrder);
/**
* 修改维修工单
*
* @param repairOrder 维修工单
* @return 结果
*/
public int updateRepairOrder(RepairOrder repairOrder);
/**
* 批量删除维修工单
*
* @param ids 需要删除的维修工单主键集合
* @return 结果
*/
public int deleteRepairOrderByIds(Long[] ids);
/**
* 删除维修工单信息
*
* @param id 维修工单主键
* @return 结果
*/
public int deleteRepairOrderById(Long id);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.service;
import java.util.List;
import com.xinda.itsm.domain.Schedule;
/**
* 调度计划管理Service接口
*
* @author kerwincui
* @date 2025-04-23
*/
public interface IScheduleService
{
/**
* 查询调度计划管理
*
* @param scheduleId 调度计划管理主键
* @return 调度计划管理
*/
public Schedule selectScheduleByScheduleId(Long scheduleId);
/**
* 查询调度计划管理列表
*
* @param schedule 调度计划管理
* @return 调度计划管理集合
*/
public List<Schedule> selectScheduleList(Schedule schedule);
/**
* 新增调度计划管理
*
* @param schedule 调度计划管理
* @return 结果
*/
public int insertSchedule(Schedule schedule);
/**
* 修改调度计划管理
*
* @param schedule 调度计划管理
* @return 结果
*/
public int updateSchedule(Schedule schedule);
/**
* 批量删除调度计划管理
*
* @param scheduleIds 需要删除的调度计划管理主键集合
* @return 结果
*/
public int deleteScheduleByScheduleIds(Long[] scheduleIds);
/**
* 删除调度计划管理信息
*
* @param scheduleId 调度计划管理主键
* @return 结果
*/
public int deleteScheduleByScheduleId(Long scheduleId);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.itsm.service;
import java.util.List;
import com.xinda.itsm.domain.StandardInfo;
/**
* 作业规范Service接口
*
* @author kerwincui
* @date 2025-04-27
*/
public interface IStandardInfoService
{
/**
* 查询作业规范
*
* @param standardId 作业规范主键
* @return 作业规范
*/
public StandardInfo selectStandardInfoByStandardId(Long standardId);
/**
* 查询作业规范列表
*
* @param standardInfo 作业规范
* @return 作业规范集合
*/
public List<StandardInfo> selectStandardInfoList(StandardInfo standardInfo);
/**
* 新增作业规范
*
* @param standardInfo 作业规范
* @return 结果
*/
public int insertStandardInfo(StandardInfo standardInfo);
/**
* 修改作业规范
*
* @param standardInfo 作业规范
* @return 结果
*/
public int updateStandardInfo(StandardInfo standardInfo);
/**
* 批量删除作业规范
*
* @param standardIds 需要删除的作业规范主键集合
* @return 结果
*/
public int deleteStandardInfoByStandardIds(Long[] standardIds);
/**
* 删除作业规范信息
*
* @param standardId 作业规范主键
* @return 结果
*/
public int deleteStandardInfoByStandardId(Long standardId);
}

View File

@@ -0,0 +1,96 @@
package com.xinda.itsm.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.itsm.mapper.DutyMapper;
import com.xinda.itsm.domain.Duty;
import com.xinda.itsm.service.IDutyService;
/**
* 值班管理Service业务层处理
*
* @author kerwincui
* @date 2025-04-23
*/
@Service
public class DutyServiceImpl implements IDutyService
{
@Autowired
private DutyMapper dutyMapper;
/**
* 查询值班管理
*
* @param dutyId 值班管理主键
* @return 值班管理
*/
@Override
public Duty selectDutyByDutyId(Long dutyId)
{
return dutyMapper.selectDutyByDutyId(dutyId);
}
/**
* 查询值班管理列表
*
* @param duty 值班管理
* @return 值班管理
*/
@Override
public List<Duty> selectDutyList(Duty duty)
{
return dutyMapper.selectDutyList(duty);
}
/**
* 新增值班管理
*
* @param duty 值班管理
* @return 结果
*/
@Override
public int insertDuty(Duty duty)
{
duty.setCreateTime(DateUtils.getNowDate());
return dutyMapper.insertDuty(duty);
}
/**
* 修改值班管理
*
* @param duty 值班管理
* @return 结果
*/
@Override
public int updateDuty(Duty duty)
{
duty.setUpdateTime(DateUtils.getNowDate());
return dutyMapper.updateDuty(duty);
}
/**
* 批量删除值班管理
*
* @param dutyIds 需要删除的值班管理主键
* @return 结果
*/
@Override
public int deleteDutyByDutyIds(Long[] dutyIds)
{
return dutyMapper.deleteDutyByDutyIds(dutyIds);
}
/**
* 删除值班管理信息
*
* @param dutyId 值班管理主键
* @return 结果
*/
@Override
public int deleteDutyByDutyId(Long dutyId)
{
return dutyMapper.deleteDutyByDutyId(dutyId);
}
}

View File

@@ -0,0 +1,96 @@
package com.xinda.itsm.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.itsm.mapper.ExampleReportMapper;
import com.xinda.itsm.domain.ExampleReport;
import com.xinda.itsm.service.IExampleReportService;
/**
* 例报管理Service业务层处理
*
* @author kerwincui
* @date 2025-04-23
*/
@Service
public class ExampleReportServiceImpl implements IExampleReportService
{
@Autowired
private ExampleReportMapper exampleReportMapper;
/**
* 查询例报管理
*
* @param exampleReportId 例报管理主键
* @return 例报管理
*/
@Override
public ExampleReport selectExampleReportByExampleReportId(Long exampleReportId)
{
return exampleReportMapper.selectExampleReportByExampleReportId(exampleReportId);
}
/**
* 查询例报管理列表
*
* @param exampleReport 例报管理
* @return 例报管理
*/
@Override
public List<ExampleReport> selectExampleReportList(ExampleReport exampleReport)
{
return exampleReportMapper.selectExampleReportList(exampleReport);
}
/**
* 新增例报管理
*
* @param exampleReport 例报管理
* @return 结果
*/
@Override
public int insertExampleReport(ExampleReport exampleReport)
{
exampleReport.setCreateTime(DateUtils.getNowDate());
return exampleReportMapper.insertExampleReport(exampleReport);
}
/**
* 修改例报管理
*
* @param exampleReport 例报管理
* @return 结果
*/
@Override
public int updateExampleReport(ExampleReport exampleReport)
{
exampleReport.setUpdateTime(DateUtils.getNowDate());
return exampleReportMapper.updateExampleReport(exampleReport);
}
/**
* 批量删除例报管理
*
* @param exampleReportIds 需要删除的例报管理主键
* @return 结果
*/
@Override
public int deleteExampleReportByExampleReportIds(Long[] exampleReportIds)
{
return exampleReportMapper.deleteExampleReportByExampleReportIds(exampleReportIds);
}
/**
* 删除例报管理信息
*
* @param exampleReportId 例报管理主键
* @return 结果
*/
@Override
public int deleteExampleReportByExampleReportId(Long exampleReportId)
{
return exampleReportMapper.deleteExampleReportByExampleReportId(exampleReportId);
}
}

View File

@@ -0,0 +1,96 @@
package com.xinda.itsm.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.itsm.mapper.InspectionPlanMapper;
import com.xinda.itsm.domain.InspectionPlan;
import com.xinda.itsm.service.IInspectionPlanService;
/**
* 巡检计划Service业务层处理
*
* @author kerwincui
* @date 2025-04-23
*/
@Service
public class InspectionPlanServiceImpl implements IInspectionPlanService
{
@Autowired
private InspectionPlanMapper inspectionPlanMapper;
/**
* 查询巡检计划
*
* @param id 巡检计划主键
* @return 巡检计划
*/
@Override
public InspectionPlan selectInspectionPlanById(Long id)
{
return inspectionPlanMapper.selectInspectionPlanById(id);
}
/**
* 查询巡检计划列表
*
* @param inspectionPlan 巡检计划
* @return 巡检计划
*/
@Override
public List<InspectionPlan> selectInspectionPlanList(InspectionPlan inspectionPlan)
{
return inspectionPlanMapper.selectInspectionPlanList(inspectionPlan);
}
/**
* 新增巡检计划
*
* @param inspectionPlan 巡检计划
* @return 结果
*/
@Override
public int insertInspectionPlan(InspectionPlan inspectionPlan)
{
inspectionPlan.setCreateTime(DateUtils.getNowDate());
return inspectionPlanMapper.insertInspectionPlan(inspectionPlan);
}
/**
* 修改巡检计划
*
* @param inspectionPlan 巡检计划
* @return 结果
*/
@Override
public int updateInspectionPlan(InspectionPlan inspectionPlan)
{
inspectionPlan.setUpdateTime(DateUtils.getNowDate());
return inspectionPlanMapper.updateInspectionPlan(inspectionPlan);
}
/**
* 批量删除巡检计划
*
* @param ids 需要删除的巡检计划主键
* @return 结果
*/
@Override
public int deleteInspectionPlanByIds(Long[] ids)
{
return inspectionPlanMapper.deleteInspectionPlanByIds(ids);
}
/**
* 删除巡检计划信息
*
* @param id 巡检计划主键
* @return 结果
*/
@Override
public int deleteInspectionPlanById(Long id)
{
return inspectionPlanMapper.deleteInspectionPlanById(id);
}
}

View File

@@ -0,0 +1,96 @@
package com.xinda.itsm.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.itsm.mapper.InspectionRecordMapper;
import com.xinda.itsm.domain.InspectionRecord;
import com.xinda.itsm.service.IInspectionRecordService;
/**
* 巡检记录Service业务层处理
*
* @author kerwincui
* @date 2025-04-23
*/
@Service
public class InspectionRecordServiceImpl implements IInspectionRecordService
{
@Autowired
private InspectionRecordMapper inspectionRecordMapper;
/**
* 查询巡检记录
*
* @param id 巡检记录主键
* @return 巡检记录
*/
@Override
public InspectionRecord selectInspectionRecordById(Long id)
{
return inspectionRecordMapper.selectInspectionRecordById(id);
}
/**
* 查询巡检记录列表
*
* @param inspectionRecord 巡检记录
* @return 巡检记录
*/
@Override
public List<InspectionRecord> selectInspectionRecordList(InspectionRecord inspectionRecord)
{
return inspectionRecordMapper.selectInspectionRecordList(inspectionRecord);
}
/**
* 新增巡检记录
*
* @param inspectionRecord 巡检记录
* @return 结果
*/
@Override
public int insertInspectionRecord(InspectionRecord inspectionRecord)
{
inspectionRecord.setCreateTime(DateUtils.getNowDate());
return inspectionRecordMapper.insertInspectionRecord(inspectionRecord);
}
/**
* 修改巡检记录
*
* @param inspectionRecord 巡检记录
* @return 结果
*/
@Override
public int updateInspectionRecord(InspectionRecord inspectionRecord)
{
inspectionRecord.setUpdateTime(DateUtils.getNowDate());
return inspectionRecordMapper.updateInspectionRecord(inspectionRecord);
}
/**
* 批量删除巡检记录
*
* @param ids 需要删除的巡检记录主键
* @return 结果
*/
@Override
public int deleteInspectionRecordByIds(Long[] ids)
{
return inspectionRecordMapper.deleteInspectionRecordByIds(ids);
}
/**
* 删除巡检记录信息
*
* @param id 巡检记录主键
* @return 结果
*/
@Override
public int deleteInspectionRecordById(Long id)
{
return inspectionRecordMapper.deleteInspectionRecordById(id);
}
}

View File

@@ -0,0 +1,96 @@
package com.xinda.itsm.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.itsm.mapper.PrePlanMapper;
import com.xinda.itsm.domain.PrePlan;
import com.xinda.itsm.service.IPrePlanService;
/**
* 预案管理Service业务层处理
*
* @author kerwincui
* @date 2025-04-27
*/
@Service
public class PrePlanServiceImpl implements IPrePlanService
{
@Autowired
private PrePlanMapper prePlanMapper;
/**
* 查询预案管理
*
* @param prePlanId 预案管理主键
* @return 预案管理
*/
@Override
public PrePlan selectPrePlanByPrePlanId(Long prePlanId)
{
return prePlanMapper.selectPrePlanByPrePlanId(prePlanId);
}
/**
* 查询预案管理列表
*
* @param prePlan 预案管理
* @return 预案管理
*/
@Override
public List<PrePlan> selectPrePlanList(PrePlan prePlan)
{
return prePlanMapper.selectPrePlanList(prePlan);
}
/**
* 新增预案管理
*
* @param prePlan 预案管理
* @return 结果
*/
@Override
public int insertPrePlan(PrePlan prePlan)
{
prePlan.setCreateTime(DateUtils.getNowDate());
return prePlanMapper.insertPrePlan(prePlan);
}
/**
* 修改预案管理
*
* @param prePlan 预案管理
* @return 结果
*/
@Override
public int updatePrePlan(PrePlan prePlan)
{
prePlan.setUpdateTime(DateUtils.getNowDate());
return prePlanMapper.updatePrePlan(prePlan);
}
/**
* 批量删除预案管理
*
* @param prePlanIds 需要删除的预案管理主键
* @return 结果
*/
@Override
public int deletePrePlanByPrePlanIds(Long[] prePlanIds)
{
return prePlanMapper.deletePrePlanByPrePlanIds(prePlanIds);
}
/**
* 删除预案管理信息
*
* @param prePlanId 预案管理主键
* @return 结果
*/
@Override
public int deletePrePlanByPrePlanId(Long prePlanId)
{
return prePlanMapper.deletePrePlanByPrePlanId(prePlanId);
}
}

View File

@@ -0,0 +1,96 @@
package com.xinda.itsm.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.itsm.mapper.ProcessInfoMapper;
import com.xinda.itsm.domain.ProcessInfo;
import com.xinda.itsm.service.IProcessInfoService;
/**
* 流程管理Service业务层处理
*
* @author kerwincui
* @date 2025-04-27
*/
@Service
public class ProcessInfoServiceImpl implements IProcessInfoService
{
@Autowired
private ProcessInfoMapper processInfoMapper;
/**
* 查询流程管理
*
* @param processId 流程管理主键
* @return 流程管理
*/
@Override
public ProcessInfo selectProcessInfoByProcessId(Long processId)
{
return processInfoMapper.selectProcessInfoByProcessId(processId);
}
/**
* 查询流程管理列表
*
* @param processInfo 流程管理
* @return 流程管理
*/
@Override
public List<ProcessInfo> selectProcessInfoList(ProcessInfo processInfo)
{
return processInfoMapper.selectProcessInfoList(processInfo);
}
/**
* 新增流程管理
*
* @param processInfo 流程管理
* @return 结果
*/
@Override
public int insertProcessInfo(ProcessInfo processInfo)
{
processInfo.setCreateTime(DateUtils.getNowDate());
return processInfoMapper.insertProcessInfo(processInfo);
}
/**
* 修改流程管理
*
* @param processInfo 流程管理
* @return 结果
*/
@Override
public int updateProcessInfo(ProcessInfo processInfo)
{
processInfo.setUpdateTime(DateUtils.getNowDate());
return processInfoMapper.updateProcessInfo(processInfo);
}
/**
* 批量删除流程管理
*
* @param processIds 需要删除的流程管理主键
* @return 结果
*/
@Override
public int deleteProcessInfoByProcessIds(Long[] processIds)
{
return processInfoMapper.deleteProcessInfoByProcessIds(processIds);
}
/**
* 删除流程管理信息
*
* @param processId 流程管理主键
* @return 结果
*/
@Override
public int deleteProcessInfoByProcessId(Long processId)
{
return processInfoMapper.deleteProcessInfoByProcessId(processId);
}
}

View File

@@ -0,0 +1,96 @@
package com.xinda.itsm.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.itsm.mapper.RegulationInfoMapper;
import com.xinda.itsm.domain.RegulationInfo;
import com.xinda.itsm.service.IRegulationInfoService;
/**
* 制度管理Service业务层处理
*
* @author kerwincui
* @date 2025-04-27
*/
@Service
public class RegulationInfoServiceImpl implements IRegulationInfoService
{
@Autowired
private RegulationInfoMapper regulationInfoMapper;
/**
* 查询制度管理
*
* @param regulationId 制度管理主键
* @return 制度管理
*/
@Override
public RegulationInfo selectRegulationInfoByRegulationId(Long regulationId)
{
return regulationInfoMapper.selectRegulationInfoByRegulationId(regulationId);
}
/**
* 查询制度管理列表
*
* @param regulationInfo 制度管理
* @return 制度管理
*/
@Override
public List<RegulationInfo> selectRegulationInfoList(RegulationInfo regulationInfo)
{
return regulationInfoMapper.selectRegulationInfoList(regulationInfo);
}
/**
* 新增制度管理
*
* @param regulationInfo 制度管理
* @return 结果
*/
@Override
public int insertRegulationInfo(RegulationInfo regulationInfo)
{
regulationInfo.setCreateTime(DateUtils.getNowDate());
return regulationInfoMapper.insertRegulationInfo(regulationInfo);
}
/**
* 修改制度管理
*
* @param regulationInfo 制度管理
* @return 结果
*/
@Override
public int updateRegulationInfo(RegulationInfo regulationInfo)
{
regulationInfo.setUpdateTime(DateUtils.getNowDate());
return regulationInfoMapper.updateRegulationInfo(regulationInfo);
}
/**
* 批量删除制度管理
*
* @param regulationIds 需要删除的制度管理主键
* @return 结果
*/
@Override
public int deleteRegulationInfoByRegulationIds(Long[] regulationIds)
{
return regulationInfoMapper.deleteRegulationInfoByRegulationIds(regulationIds);
}
/**
* 删除制度管理信息
*
* @param regulationId 制度管理主键
* @return 结果
*/
@Override
public int deleteRegulationInfoByRegulationId(Long regulationId)
{
return regulationInfoMapper.deleteRegulationInfoByRegulationId(regulationId);
}
}

View File

@@ -0,0 +1,96 @@
package com.xinda.itsm.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.itsm.mapper.RepairOrderMapper;
import com.xinda.itsm.domain.RepairOrder;
import com.xinda.itsm.service.IRepairOrderService;
/**
* 维修工单Service业务层处理
*
* @author kerwincui
* @date 2025-04-23
*/
@Service
public class RepairOrderServiceImpl implements IRepairOrderService
{
@Autowired
private RepairOrderMapper repairOrderMapper;
/**
* 查询维修工单
*
* @param id 维修工单主键
* @return 维修工单
*/
@Override
public RepairOrder selectRepairOrderById(Long id)
{
return repairOrderMapper.selectRepairOrderById(id);
}
/**
* 查询维修工单列表
*
* @param repairOrder 维修工单
* @return 维修工单
*/
@Override
public List<RepairOrder> selectRepairOrderList(RepairOrder repairOrder)
{
return repairOrderMapper.selectRepairOrderList(repairOrder);
}
/**
* 新增维修工单
*
* @param repairOrder 维修工单
* @return 结果
*/
@Override
public int insertRepairOrder(RepairOrder repairOrder)
{
repairOrder.setCreateTime(DateUtils.getNowDate());
return repairOrderMapper.insertRepairOrder(repairOrder);
}
/**
* 修改维修工单
*
* @param repairOrder 维修工单
* @return 结果
*/
@Override
public int updateRepairOrder(RepairOrder repairOrder)
{
repairOrder.setUpdateTime(DateUtils.getNowDate());
return repairOrderMapper.updateRepairOrder(repairOrder);
}
/**
* 批量删除维修工单
*
* @param ids 需要删除的维修工单主键
* @return 结果
*/
@Override
public int deleteRepairOrderByIds(Long[] ids)
{
return repairOrderMapper.deleteRepairOrderByIds(ids);
}
/**
* 删除维修工单信息
*
* @param id 维修工单主键
* @return 结果
*/
@Override
public int deleteRepairOrderById(Long id)
{
return repairOrderMapper.deleteRepairOrderById(id);
}
}

View File

@@ -0,0 +1,96 @@
package com.xinda.itsm.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.itsm.mapper.ScheduleMapper;
import com.xinda.itsm.domain.Schedule;
import com.xinda.itsm.service.IScheduleService;
/**
* 调度计划管理Service业务层处理
*
* @author kerwincui
* @date 2025-04-23
*/
@Service
public class ScheduleServiceImpl implements IScheduleService
{
@Autowired
private ScheduleMapper scheduleMapper;
/**
* 查询调度计划管理
*
* @param scheduleId 调度计划管理主键
* @return 调度计划管理
*/
@Override
public Schedule selectScheduleByScheduleId(Long scheduleId)
{
return scheduleMapper.selectScheduleByScheduleId(scheduleId);
}
/**
* 查询调度计划管理列表
*
* @param schedule 调度计划管理
* @return 调度计划管理
*/
@Override
public List<Schedule> selectScheduleList(Schedule schedule)
{
return scheduleMapper.selectScheduleList(schedule);
}
/**
* 新增调度计划管理
*
* @param schedule 调度计划管理
* @return 结果
*/
@Override
public int insertSchedule(Schedule schedule)
{
schedule.setCreateTime(DateUtils.getNowDate());
return scheduleMapper.insertSchedule(schedule);
}
/**
* 修改调度计划管理
*
* @param schedule 调度计划管理
* @return 结果
*/
@Override
public int updateSchedule(Schedule schedule)
{
schedule.setUpdateTime(DateUtils.getNowDate());
return scheduleMapper.updateSchedule(schedule);
}
/**
* 批量删除调度计划管理
*
* @param scheduleIds 需要删除的调度计划管理主键
* @return 结果
*/
@Override
public int deleteScheduleByScheduleIds(Long[] scheduleIds)
{
return scheduleMapper.deleteScheduleByScheduleIds(scheduleIds);
}
/**
* 删除调度计划管理信息
*
* @param scheduleId 调度计划管理主键
* @return 结果
*/
@Override
public int deleteScheduleByScheduleId(Long scheduleId)
{
return scheduleMapper.deleteScheduleByScheduleId(scheduleId);
}
}

View File

@@ -0,0 +1,96 @@
package com.xinda.itsm.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.itsm.mapper.StandardInfoMapper;
import com.xinda.itsm.domain.StandardInfo;
import com.xinda.itsm.service.IStandardInfoService;
/**
* 作业规范Service业务层处理
*
* @author kerwincui
* @date 2025-04-27
*/
@Service
public class StandardInfoServiceImpl implements IStandardInfoService
{
@Autowired
private StandardInfoMapper standardInfoMapper;
/**
* 查询作业规范
*
* @param standardId 作业规范主键
* @return 作业规范
*/
@Override
public StandardInfo selectStandardInfoByStandardId(Long standardId)
{
return standardInfoMapper.selectStandardInfoByStandardId(standardId);
}
/**
* 查询作业规范列表
*
* @param standardInfo 作业规范
* @return 作业规范
*/
@Override
public List<StandardInfo> selectStandardInfoList(StandardInfo standardInfo)
{
return standardInfoMapper.selectStandardInfoList(standardInfo);
}
/**
* 新增作业规范
*
* @param standardInfo 作业规范
* @return 结果
*/
@Override
public int insertStandardInfo(StandardInfo standardInfo)
{
standardInfo.setCreateTime(DateUtils.getNowDate());
return standardInfoMapper.insertStandardInfo(standardInfo);
}
/**
* 修改作业规范
*
* @param standardInfo 作业规范
* @return 结果
*/
@Override
public int updateStandardInfo(StandardInfo standardInfo)
{
standardInfo.setUpdateTime(DateUtils.getNowDate());
return standardInfoMapper.updateStandardInfo(standardInfo);
}
/**
* 批量删除作业规范
*
* @param standardIds 需要删除的作业规范主键
* @return 结果
*/
@Override
public int deleteStandardInfoByStandardIds(Long[] standardIds)
{
return standardInfoMapper.deleteStandardInfoByStandardIds(standardIds);
}
/**
* 删除作业规范信息
*
* @param standardId 作业规范主键
* @return 结果
*/
@Override
public int deleteStandardInfoByStandardId(Long standardId)
{
return standardInfoMapper.deleteStandardInfoByStandardId(standardId);
}
}

View File

@@ -0,0 +1,103 @@
<?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.itsm.mapper.DutyMapper">
<resultMap type="Duty" id="DutyResult">
<result property="dutyId" column="duty_id" />
<result property="dutyDate" column="duty_date" />
<result property="onDuty" column="on_duty" />
<result property="dutyPeriod" column="duty_period" />
<result property="type" column="type" />
<result property="status" column="status" />
<result property="relief" column="relief" />
<result property="remark" column="remark" />
<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="selectDutyVo">
select duty_id, duty_date, on_duty, duty_period, type, status, relief, remark, create_by, create_time, update_by, update_time from duty
</sql>
<select id="selectDutyList" parameterType="Duty" resultMap="DutyResult">
<include refid="selectDutyVo"/>
<where>
<if test="dutyDate != null and dutyDate != ''"> and duty_date = #{dutyDate}</if>
<if test="onDuty != null and onDuty != ''"> and on_duty = #{onDuty}</if>
<if test="dutyPeriod != null and dutyPeriod != ''"> and duty_period = #{dutyPeriod}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="relief != null and relief != ''"> and relief = #{relief}</if>
</where>
</select>
<select id="selectDutyByDutyId" parameterType="Long" resultMap="DutyResult">
<include refid="selectDutyVo"/>
where duty_id = #{dutyId}
</select>
<insert id="insertDuty" parameterType="Duty">
insert into duty
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dutyId != null">duty_id,</if>
<if test="dutyDate != null">duty_date,</if>
<if test="onDuty != null">on_duty,</if>
<if test="dutyPeriod != null">duty_period,</if>
<if test="type != null">type,</if>
<if test="status != null">status,</if>
<if test="relief != null">relief,</if>
<if test="remark != null">remark,</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="dutyId != null">#{dutyId},</if>
<if test="dutyDate != null">#{dutyDate},</if>
<if test="onDuty != null">#{onDuty},</if>
<if test="dutyPeriod != null">#{dutyPeriod},</if>
<if test="type != null">#{type},</if>
<if test="status != null">#{status},</if>
<if test="relief != null">#{relief},</if>
<if test="remark != null">#{remark},</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="updateDuty" parameterType="Duty">
update duty
<trim prefix="SET" suffixOverrides=",">
<if test="dutyDate != null">duty_date = #{dutyDate},</if>
<if test="onDuty != null">on_duty = #{onDuty},</if>
<if test="dutyPeriod != null">duty_period = #{dutyPeriod},</if>
<if test="type != null">type = #{type},</if>
<if test="status != null">status = #{status},</if>
<if test="relief != null">relief = #{relief},</if>
<if test="remark != null">remark = #{remark},</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 duty_id = #{dutyId}
</update>
<delete id="deleteDutyByDutyId" parameterType="Long">
delete from duty where duty_id = #{dutyId}
</delete>
<delete id="deleteDutyByDutyIds" parameterType="String">
delete from duty where duty_id in
<foreach item="dutyId" collection="array" open="(" separator="," close=")">
#{dutyId}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,109 @@
<?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.itsm.mapper.ExampleReportMapper">
<resultMap type="ExampleReport" id="ExampleReportResult">
<result property="exampleReportId" column="example_report_id" />
<result property="type" column="type" />
<result property="cycle" column="cycle" />
<result property="content" column="content" />
<result property="pushMethod" column="push_method" />
<result property="userId" column="user_id" />
<result property="receiver" column="receiver" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="startDate" column="start_date" />
<result property="endDate" column="end_date" />
</resultMap>
<sql id="selectExampleReportVo">
select example_report_id, type, cycle, content, push_method, user_id, receiver, create_by, create_time, update_by, update_time, start_date, end_date from example_report
</sql>
<select id="selectExampleReportList" parameterType="ExampleReport" resultMap="ExampleReportResult">
<include refid="selectExampleReportVo"/>
<where>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="cycle != null and cycle != ''"> and cycle = #{cycle}</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="pushMethod != null and pushMethod != ''"> and push_method = #{pushMethod}</if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
<if test="receiver != null and receiver != ''"> and receiver = #{receiver}</if>
<if test="startDate != null "> and start_date = #{startDate}</if>
<if test="endDate != null "> and end_date = #{endDate}</if>
</where>
</select>
<select id="selectExampleReportByExampleReportId" parameterType="Long" resultMap="ExampleReportResult">
<include refid="selectExampleReportVo"/>
where example_report_id = #{exampleReportId}
</select>
<insert id="insertExampleReport" parameterType="ExampleReport">
insert into example_report
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="exampleReportId != null">example_report_id,</if>
<if test="type != null">type,</if>
<if test="cycle != null">cycle,</if>
<if test="content != null">content,</if>
<if test="pushMethod != null">push_method,</if>
<if test="userId != null">user_id,</if>
<if test="receiver != null">receiver,</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>
<if test="startDate != null">start_date,</if>
<if test="endDate != null">end_date,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="exampleReportId != null">#{exampleReportId},</if>
<if test="type != null">#{type},</if>
<if test="cycle != null">#{cycle},</if>
<if test="content != null">#{content},</if>
<if test="pushMethod != null">#{pushMethod},</if>
<if test="userId != null">#{userId},</if>
<if test="receiver != null">#{receiver},</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>
<if test="startDate != null">#{startDate},</if>
<if test="endDate != null">#{endDate},</if>
</trim>
</insert>
<update id="updateExampleReport" parameterType="ExampleReport">
update example_report
<trim prefix="SET" suffixOverrides=",">
<if test="type != null">type = #{type},</if>
<if test="cycle != null">cycle = #{cycle},</if>
<if test="content != null">content = #{content},</if>
<if test="pushMethod != null">push_method = #{pushMethod},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="receiver != null">receiver = #{receiver},</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>
<if test="startDate != null">start_date = #{startDate},</if>
<if test="endDate != null">end_date = #{endDate},</if>
</trim>
where example_report_id = #{exampleReportId}
</update>
<delete id="deleteExampleReportByExampleReportId" parameterType="Long">
delete from example_report where example_report_id = #{exampleReportId}
</delete>
<delete id="deleteExampleReportByExampleReportIds" parameterType="String">
delete from example_report where example_report_id in
<foreach item="exampleReportId" collection="array" open="(" separator="," close=")">
#{exampleReportId}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,124 @@
<?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.itsm.mapper.InspectionPlanMapper">
<resultMap type="InspectionPlan" id="InspectionPlanResult">
<result property="id" column="id" />
<result property="planName" column="plan_name" />
<result property="planContent" column="plan_content" />
<result property="projectName" column="project_name" />
<result property="startDate" column="start_date" />
<result property="endDate" column="end_date" />
<result property="inspectionCycle" column="inspection_cycle" />
<result property="inspectionPerson" column="inspection_person" />
<result property="userId" column="user_id" />
<result property="setDate" column="set_date" />
<result property="setTime" column="set_time" />
<result property="status" column="status" />
<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="selectInspectionPlanVo">
select id, plan_name, plan_content, project_name, start_date, end_date, inspection_cycle, inspection_person, user_id, set_date, set_time, status, create_by, create_time, update_by, update_time from inspection_plan
</sql>
<select id="selectInspectionPlanList" parameterType="InspectionPlan" resultMap="InspectionPlanResult">
<include refid="selectInspectionPlanVo"/>
<where>
<if test="planName != null and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if>
<if test="planContent != null and planContent != ''"> and plan_content = #{planContent}</if>
<if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
<if test="startDate != null "> and start_date = #{startDate}</if>
<if test="endDate != null "> and end_date = #{endDate}</if>
<if test="inspectionCycle != null and inspectionCycle != ''"> and inspection_cycle = #{inspectionCycle}</if>
<if test="inspectionPerson != null and inspectionPerson != ''"> and inspection_person = #{inspectionPerson}</if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</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="status != null and status != ''"> and status = #{status}</if>
</where>
</select>
<select id="selectInspectionPlanById" parameterType="Long" resultMap="InspectionPlanResult">
<include refid="selectInspectionPlanVo"/>
where id = #{id}
</select>
<insert id="insertInspectionPlan" parameterType="InspectionPlan">
insert into inspection_plan
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="planName != null">plan_name,</if>
<if test="planContent != null">plan_content,</if>
<if test="projectName != null">project_name,</if>
<if test="startDate != null">start_date,</if>
<if test="endDate != null">end_date,</if>
<if test="inspectionCycle != null">inspection_cycle,</if>
<if test="inspectionPerson != null">inspection_person,</if>
<if test="userId != null">user_id,</if>
<if test="setDate != null">set_date,</if>
<if test="setTime != null">set_time,</if>
<if test="status != null">status,</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="id != null">#{id},</if>
<if test="planName != null">#{planName},</if>
<if test="planContent != null">#{planContent},</if>
<if test="projectName != null">#{projectName},</if>
<if test="startDate != null">#{startDate},</if>
<if test="endDate != null">#{endDate},</if>
<if test="inspectionCycle != null">#{inspectionCycle},</if>
<if test="inspectionPerson != null">#{inspectionPerson},</if>
<if test="userId != null">#{userId},</if>
<if test="setDate != null">#{setDate},</if>
<if test="setTime != null">#{setTime},</if>
<if test="status != null">#{status},</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="updateInspectionPlan" parameterType="InspectionPlan">
update inspection_plan
<trim prefix="SET" suffixOverrides=",">
<if test="planName != null">plan_name = #{planName},</if>
<if test="planContent != null">plan_content = #{planContent},</if>
<if test="projectName != null">project_name = #{projectName},</if>
<if test="startDate != null">start_date = #{startDate},</if>
<if test="endDate != null">end_date = #{endDate},</if>
<if test="inspectionCycle != null">inspection_cycle = #{inspectionCycle},</if>
<if test="inspectionPerson != null">inspection_person = #{inspectionPerson},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="setDate != null">set_date = #{setDate},</if>
<if test="setTime != null">set_time = #{setTime},</if>
<if test="status != null">status = #{status},</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="deleteInspectionPlanById" parameterType="Long">
delete from inspection_plan where id = #{id}
</delete>
<delete id="deleteInspectionPlanByIds" parameterType="String">
delete from inspection_plan where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,129 @@
<?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.itsm.mapper.InspectionRecordMapper">
<resultMap type="InspectionRecord" id="InspectionRecordResult">
<result property="id" column="id" />
<result property="planId" column="plan_id" />
<result property="planName" column="plan_name" />
<result property="planContent" column="plan_content" />
<result property="projectName" column="project_name" />
<result property="planTime" column="plan_time" />
<result property="inspectionTime" column="inspection_time" />
<result property="inspectionPerson" column="inspection_person" />
<result property="userId" column="user_id" />
<result property="inspectionCycle" column="inspection_cycle" />
<result property="cycle" column="cycle" />
<result property="inspectionStatus" column="inspection_status" />
<result property="inspectionRemark" column="inspection_remark" />
<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="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
</sql>
<select id="selectInspectionRecordList" parameterType="InspectionRecord" resultMap="InspectionRecordResult">
<include refid="selectInspectionRecordVo"/>
<where>
<if test="planId != null "> and plan_id = #{planId}</if>
<if test="planName != null and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if>
<if test="planContent != null and planContent != ''"> and plan_content = #{planContent}</if>
<if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
<if test="planTime != null "> and plan_time = #{planTime}</if>
<if test="inspectionTime != null "> and inspection_time = #{inspectionTime}</if>
<if test="inspectionPerson != null and inspectionPerson != ''"> and inspection_person = #{inspectionPerson}</if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
<if test="inspectionCycle != null and inspectionCycle != ''"> and inspection_cycle = #{inspectionCycle}</if>
<if test="cycle != null and cycle != ''"> and cycle = #{cycle}</if>
<if test="inspectionStatus != null and inspectionStatus != ''"> and inspection_status = #{inspectionStatus}</if>
<if test="inspectionRemark != null and inspectionRemark != ''"> and inspection_remark = #{inspectionRemark}</if>
</where>
</select>
<select id="selectInspectionRecordById" parameterType="Long" resultMap="InspectionRecordResult">
<include refid="selectInspectionRecordVo"/>
where id = #{id}
</select>
<insert id="insertInspectionRecord" parameterType="InspectionRecord">
insert into inspection_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="planId != null">plan_id,</if>
<if test="planName != null">plan_name,</if>
<if test="planContent != null">plan_content,</if>
<if test="projectName != null">project_name,</if>
<if test="planTime != null">plan_time,</if>
<if test="inspectionTime != null">inspection_time,</if>
<if test="inspectionPerson != null">inspection_person,</if>
<if test="userId != null">user_id,</if>
<if test="inspectionCycle != null">inspection_cycle,</if>
<if test="cycle != null">cycle,</if>
<if test="inspectionStatus != null">inspection_status,</if>
<if test="inspectionRemark != null">inspection_remark,</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="id != null">#{id},</if>
<if test="planId != null">#{planId},</if>
<if test="planName != null">#{planName},</if>
<if test="planContent != null">#{planContent},</if>
<if test="projectName != null">#{projectName},</if>
<if test="planTime != null">#{planTime},</if>
<if test="inspectionTime != null">#{inspectionTime},</if>
<if test="inspectionPerson != null">#{inspectionPerson},</if>
<if test="userId != null">#{userId},</if>
<if test="inspectionCycle != null">#{inspectionCycle},</if>
<if test="cycle != null">#{cycle},</if>
<if test="inspectionStatus != null">#{inspectionStatus},</if>
<if test="inspectionRemark != null">#{inspectionRemark},</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="updateInspectionRecord" parameterType="InspectionRecord">
update inspection_record
<trim prefix="SET" suffixOverrides=",">
<if test="planId != null">plan_id = #{planId},</if>
<if test="planName != null">plan_name = #{planName},</if>
<if test="planContent != null">plan_content = #{planContent},</if>
<if test="projectName != null">project_name = #{projectName},</if>
<if test="planTime != null">plan_time = #{planTime},</if>
<if test="inspectionTime != null">inspection_time = #{inspectionTime},</if>
<if test="inspectionPerson != null">inspection_person = #{inspectionPerson},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="inspectionCycle != null">inspection_cycle = #{inspectionCycle},</if>
<if test="cycle != null">cycle = #{cycle},</if>
<if test="inspectionStatus != null">inspection_status = #{inspectionStatus},</if>
<if test="inspectionRemark != null">inspection_remark = #{inspectionRemark},</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="deleteInspectionRecordById" parameterType="Long">
delete from inspection_record where id = #{id}
</delete>
<delete id="deleteInspectionRecordByIds" parameterType="String">
delete from inspection_record where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,104 @@
<?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.itsm.mapper.PrePlanMapper">
<resultMap type="PrePlan" id="PrePlanResult">
<result property="prePlanId" column="pre_plan_id" />
<result property="number" column="number" />
<result property="type" column="type" />
<result property="station" column="station" />
<result property="device" column="device" />
<result property="content" column="content" />
<result property="preparedBy" column="prepared_by" />
<result property="keywords" column="keywords" />
<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="selectPrePlanVo">
select pre_plan_id, number, type, station, device, content, prepared_by, keywords, create_by, create_time, update_by, update_time from pre_plan
</sql>
<select id="selectPrePlanList" parameterType="PrePlan" resultMap="PrePlanResult">
<include refid="selectPrePlanVo"/>
<where>
<if test="number != null and number != ''"> and number = #{number}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="station != null and station != ''"> and station = #{station}</if>
<if test="device != null and device != ''"> and device = #{device}</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="preparedBy != null and preparedBy != ''"> and prepared_by = #{preparedBy}</if>
<if test="keywords != null and keywords != ''"> and keywords = #{keywords}</if>
</where>
</select>
<select id="selectPrePlanByPrePlanId" parameterType="Long" resultMap="PrePlanResult">
<include refid="selectPrePlanVo"/>
where pre_plan_id = #{prePlanId}
</select>
<insert id="insertPrePlan" parameterType="PrePlan">
insert into pre_plan
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="prePlanId != null">pre_plan_id,</if>
<if test="number != null">number,</if>
<if test="type != null">type,</if>
<if test="station != null">station,</if>
<if test="device != null">device,</if>
<if test="content != null">content,</if>
<if test="preparedBy != null">prepared_by,</if>
<if test="keywords != null">keywords,</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="prePlanId != null">#{prePlanId},</if>
<if test="number != null">#{number},</if>
<if test="type != null">#{type},</if>
<if test="station != null">#{station},</if>
<if test="device != null">#{device},</if>
<if test="content != null">#{content},</if>
<if test="preparedBy != null">#{preparedBy},</if>
<if test="keywords != null">#{keywords},</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="updatePrePlan" parameterType="PrePlan">
update pre_plan
<trim prefix="SET" suffixOverrides=",">
<if test="number != null">number = #{number},</if>
<if test="type != null">type = #{type},</if>
<if test="station != null">station = #{station},</if>
<if test="device != null">device = #{device},</if>
<if test="content != null">content = #{content},</if>
<if test="preparedBy != null">prepared_by = #{preparedBy},</if>
<if test="keywords != null">keywords = #{keywords},</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 pre_plan_id = #{prePlanId}
</update>
<delete id="deletePrePlanByPrePlanId" parameterType="Long">
delete from pre_plan where pre_plan_id = #{prePlanId}
</delete>
<delete id="deletePrePlanByPrePlanIds" parameterType="String">
delete from pre_plan where pre_plan_id in
<foreach item="prePlanId" collection="array" open="(" separator="," close=")">
#{prePlanId}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,98 @@
<?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.itsm.mapper.ProcessInfoMapper">
<resultMap type="ProcessInfo" id="ProcessInfoResult">
<result property="processId" column="process_id" />
<result property="eventName" column="event_name" />
<result property="eventType" column="event_type" />
<result property="touchTime" column="touch_time" />
<result property="handleResult" column="handle_result" />
<result property="handlePerson" column="handle_person" />
<result property="remark" column="remark" />
<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="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
</sql>
<select id="selectProcessInfoList" parameterType="ProcessInfo" resultMap="ProcessInfoResult">
<include refid="selectProcessInfoVo"/>
<where>
<if test="eventName != null and eventName != ''"> and event_name like concat('%', #{eventName}, '%')</if>
<if test="eventType != null and eventType != ''"> and event_type = #{eventType}</if>
<if test="touchTime != null "> and touch_time = #{touchTime}</if>
<if test="handleResult != null and handleResult != ''"> and handle_result = #{handleResult}</if>
<if test="handlePerson != null "> and handle_person = #{handlePerson}</if>
</where>
</select>
<select id="selectProcessInfoByProcessId" parameterType="Long" resultMap="ProcessInfoResult">
<include refid="selectProcessInfoVo"/>
where process_id = #{processId}
</select>
<insert id="insertProcessInfo" parameterType="ProcessInfo">
insert into process_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="processId != null">process_id,</if>
<if test="eventName != null">event_name,</if>
<if test="eventType != null">event_type,</if>
<if test="touchTime != null">touch_time,</if>
<if test="handleResult != null">handle_result,</if>
<if test="handlePerson != null">handle_person,</if>
<if test="remark != null">remark,</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="processId != null">#{processId},</if>
<if test="eventName != null">#{eventName},</if>
<if test="eventType != null">#{eventType},</if>
<if test="touchTime != null">#{touchTime},</if>
<if test="handleResult != null">#{handleResult},</if>
<if test="handlePerson != null">#{handlePerson},</if>
<if test="remark != null">#{remark},</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="updateProcessInfo" parameterType="ProcessInfo">
update process_info
<trim prefix="SET" suffixOverrides=",">
<if test="eventName != null">event_name = #{eventName},</if>
<if test="eventType != null">event_type = #{eventType},</if>
<if test="touchTime != null">touch_time = #{touchTime},</if>
<if test="handleResult != null">handle_result = #{handleResult},</if>
<if test="handlePerson != null">handle_person = #{handlePerson},</if>
<if test="remark != null">remark = #{remark},</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 process_id = #{processId}
</update>
<delete id="deleteProcessInfoByProcessId" parameterType="Long">
delete from process_info where process_id = #{processId}
</delete>
<delete id="deleteProcessInfoByProcessIds" parameterType="String">
delete from process_info where process_id in
<foreach item="processId" collection="array" open="(" separator="," close=")">
#{processId}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,103 @@
<?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.itsm.mapper.RegulationInfoMapper">
<resultMap type="RegulationInfo" id="RegulationInfoResult">
<result property="regulationId" column="regulation_id" />
<result property="regulationCode" column="regulation_code" />
<result property="regulationName" column="regulation_name" />
<result property="regulationDescribe" column="regulation_describe" />
<result property="regulationType" column="regulation_type" />
<result property="docOssId" column="doc_oss_id" />
<result property="uploadTime" column="upload_time" />
<result property="remark" column="remark" />
<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="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
</sql>
<select id="selectRegulationInfoList" parameterType="RegulationInfo" resultMap="RegulationInfoResult">
<include refid="selectRegulationInfoVo"/>
<where>
<if test="regulationCode != null and regulationCode != ''"> and regulation_code = #{regulationCode}</if>
<if test="regulationName != null and regulationName != ''"> and regulation_name like concat('%', #{regulationName}, '%')</if>
<if test="regulationDescribe != null and regulationDescribe != ''"> and regulation_describe = #{regulationDescribe}</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="uploadTime != null "> and upload_time = #{uploadTime}</if>
</where>
</select>
<select id="selectRegulationInfoByRegulationId" parameterType="Long" resultMap="RegulationInfoResult">
<include refid="selectRegulationInfoVo"/>
where regulation_id = #{regulationId}
</select>
<insert id="insertRegulationInfo" parameterType="RegulationInfo">
insert into regulation_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="regulationId != null">regulation_id,</if>
<if test="regulationCode != null">regulation_code,</if>
<if test="regulationName != null">regulation_name,</if>
<if test="regulationDescribe != null">regulation_describe,</if>
<if test="regulationType != null">regulation_type,</if>
<if test="docOssId != null">doc_oss_id,</if>
<if test="uploadTime != null">upload_time,</if>
<if test="remark != null">remark,</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="regulationId != null">#{regulationId},</if>
<if test="regulationCode != null">#{regulationCode},</if>
<if test="regulationName != null">#{regulationName},</if>
<if test="regulationDescribe != null">#{regulationDescribe},</if>
<if test="regulationType != null">#{regulationType},</if>
<if test="docOssId != null">#{docOssId},</if>
<if test="uploadTime != null">#{uploadTime},</if>
<if test="remark != null">#{remark},</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="updateRegulationInfo" parameterType="RegulationInfo">
update regulation_info
<trim prefix="SET" suffixOverrides=",">
<if test="regulationCode != null">regulation_code = #{regulationCode},</if>
<if test="regulationName != null">regulation_name = #{regulationName},</if>
<if test="regulationDescribe != null">regulation_describe = #{regulationDescribe},</if>
<if test="regulationType != null">regulation_type = #{regulationType},</if>
<if test="docOssId != null">doc_oss_id = #{docOssId},</if>
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
<if test="remark != null">remark = #{remark},</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 regulation_id = #{regulationId}
</update>
<delete id="deleteRegulationInfoByRegulationId" parameterType="Long">
delete from regulation_info where regulation_id = #{regulationId}
</delete>
<delete id="deleteRegulationInfoByRegulationIds" parameterType="String">
delete from regulation_info where regulation_id in
<foreach item="regulationId" collection="array" open="(" separator="," close=")">
#{regulationId}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,119 @@
<?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.itsm.mapper.RepairOrderMapper">
<resultMap type="RepairOrder" id="RepairOrderResult">
<result property="id" column="id" />
<result property="orderNo" column="order_no" />
<result property="orderContent" column="order_content" />
<result property="projectName" column="project_name" />
<result property="assignTime" column="assign_time" />
<result property="finishTime" column="finish_time" />
<result property="finishBy" column="finish_by" />
<result property="annex" column="annex" />
<result property="userId" column="user_id" />
<result property="orderStatus" column="order_status" />
<result property="orderRemark" column="order_remark" />
<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="selectRepairOrderVo">
select id, order_no, order_content, project_name, assign_time, finish_time, finish_by, annex, user_id, order_status, order_remark, create_by, create_time, update_by, update_time from repair_order
</sql>
<select id="selectRepairOrderList" parameterType="RepairOrder" resultMap="RepairOrderResult">
<include refid="selectRepairOrderVo"/>
<where>
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
<if test="orderContent != null and orderContent != ''"> and order_content = #{orderContent}</if>
<if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
<if test="assignTime != null "> and assign_time = #{assignTime}</if>
<if test="finishTime != null "> and finish_time = #{finishTime}</if>
<if test="finishBy != null and finishBy != ''"> and finish_by = #{finishBy}</if>
<if test="annex != null and annex != ''"> and annex = #{annex}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
<if test="orderRemark != null and orderRemark != ''"> and order_remark = #{orderRemark}</if>
</where>
</select>
<select id="selectRepairOrderById" parameterType="Long" resultMap="RepairOrderResult">
<include refid="selectRepairOrderVo"/>
where id = #{id}
</select>
<insert id="insertRepairOrder" parameterType="RepairOrder">
insert into repair_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="orderNo != null">order_no,</if>
<if test="orderContent != null">order_content,</if>
<if test="projectName != null">project_name,</if>
<if test="assignTime != null">assign_time,</if>
<if test="finishTime != null">finish_time,</if>
<if test="finishBy != null">finish_by,</if>
<if test="annex != null">annex,</if>
<if test="userId != null">user_id,</if>
<if test="orderStatus != null">order_status,</if>
<if test="orderRemark != null">order_remark,</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="id != null">#{id},</if>
<if test="orderNo != null">#{orderNo},</if>
<if test="orderContent != null">#{orderContent},</if>
<if test="projectName != null">#{projectName},</if>
<if test="assignTime != null">#{assignTime},</if>
<if test="finishTime != null">#{finishTime},</if>
<if test="finishBy != null">#{finishBy},</if>
<if test="annex != null">#{annex},</if>
<if test="userId != null">#{userId},</if>
<if test="orderStatus != null">#{orderStatus},</if>
<if test="orderRemark != null">#{orderRemark},</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="updateRepairOrder" parameterType="RepairOrder">
update repair_order
<trim prefix="SET" suffixOverrides=",">
<if test="orderNo != null">order_no = #{orderNo},</if>
<if test="orderContent != null">order_content = #{orderContent},</if>
<if test="projectName != null">project_name = #{projectName},</if>
<if test="assignTime != null">assign_time = #{assignTime},</if>
<if test="finishTime != null">finish_time = #{finishTime},</if>
<if test="finishBy != null">finish_by = #{finishBy},</if>
<if test="annex != null">annex = #{annex},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="orderStatus != null">order_status = #{orderStatus},</if>
<if test="orderRemark != null">order_remark = #{orderRemark},</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="deleteRepairOrderById" parameterType="Long">
delete from repair_order where id = #{id}
</delete>
<delete id="deleteRepairOrderByIds" parameterType="String">
delete from repair_order where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,173 @@
<?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.itsm.mapper.ScheduleMapper">
<resultMap type="Schedule" id="ScheduleResult">
<result property="scheduleId" column="schedule_id" />
<result property="number" column="number" />
<result property="type" column="type" />
<result property="cycle" column="cycle" />
<result property="station" column="station" />
<result property="status" column="status" />
<result property="isTimeout" column="is_timeout" />
<result property="name" column="name" />
<result property="source" column="source" />
<result property="content" column="content" />
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
<result property="firstReminder" column="first_reminder" />
<result property="secondReminder" column="second_reminder" />
<result property="operator" column="operator" />
<result property="commencementTime" column="commencement_time" />
<result property="terminator" column="terminator" />
<result property="resolutionTime" column="resolution_time" />
<result property="resolutionContent" column="resolution_content" />
<result property="preparedBy" column="prepared_by" />
<result property="head" column="head" />
<result property="remark" column="remark" />
<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="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
</sql>
<select id="selectScheduleList" parameterType="Schedule" resultMap="ScheduleResult">
<include refid="selectScheduleVo"/>
<where>
<if test="number != null and number != ''"> and number = #{number}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="cycle != null and cycle != ''"> and cycle = #{cycle}</if>
<if test="station != null and station != ''"> and station = #{station}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="isTimeout != null and isTimeout != ''"> and is_timeout = #{isTimeout}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="source != null and source != ''"> and source = #{source}</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="startTime != null "> and start_time = #{startTime}</if>
<if test="endTime != null "> and end_time = #{endTime}</if>
<if test="firstReminder != null "> and first_reminder = #{firstReminder}</if>
<if test="secondReminder != null "> and second_reminder = #{secondReminder}</if>
<if test="operator != null and operator != ''"> and operator = #{operator}</if>
<if test="commencementTime != null "> and commencement_time = #{commencementTime}</if>
<if test="terminator != null and terminator != ''"> and terminator = #{terminator}</if>
<if test="resolutionTime != null "> and resolution_time = #{resolutionTime}</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="head != null and head != ''"> and head = #{head}</if>
</where>
</select>
<select id="selectScheduleByScheduleId" parameterType="Long" resultMap="ScheduleResult">
<include refid="selectScheduleVo"/>
where schedule_id = #{scheduleId}
</select>
<insert id="insertSchedule" parameterType="Schedule">
insert into schedule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="scheduleId != null">schedule_id,</if>
<if test="number != null">number,</if>
<if test="type != null">type,</if>
<if test="cycle != null">cycle,</if>
<if test="station != null">station,</if>
<if test="status != null">status,</if>
<if test="isTimeout != null">is_timeout,</if>
<if test="name != null">name,</if>
<if test="source != null">source,</if>
<if test="content != null">content,</if>
<if test="startTime != null">start_time,</if>
<if test="endTime != null">end_time,</if>
<if test="firstReminder != null">first_reminder,</if>
<if test="secondReminder != null">second_reminder,</if>
<if test="operator != null">operator,</if>
<if test="commencementTime != null">commencement_time,</if>
<if test="terminator != null">terminator,</if>
<if test="resolutionTime != null">resolution_time,</if>
<if test="resolutionContent != null">resolution_content,</if>
<if test="preparedBy != null">prepared_by,</if>
<if test="head != null">head,</if>
<if test="remark != null">remark,</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="scheduleId != null">#{scheduleId},</if>
<if test="number != null">#{number},</if>
<if test="type != null">#{type},</if>
<if test="cycle != null">#{cycle},</if>
<if test="station != null">#{station},</if>
<if test="status != null">#{status},</if>
<if test="isTimeout != null">#{isTimeout},</if>
<if test="name != null">#{name},</if>
<if test="source != null">#{source},</if>
<if test="content != null">#{content},</if>
<if test="startTime != null">#{startTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="firstReminder != null">#{firstReminder},</if>
<if test="secondReminder != null">#{secondReminder},</if>
<if test="operator != null">#{operator},</if>
<if test="commencementTime != null">#{commencementTime},</if>
<if test="terminator != null">#{terminator},</if>
<if test="resolutionTime != null">#{resolutionTime},</if>
<if test="resolutionContent != null">#{resolutionContent},</if>
<if test="preparedBy != null">#{preparedBy},</if>
<if test="head != null">#{head},</if>
<if test="remark != null">#{remark},</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="updateSchedule" parameterType="Schedule">
update schedule
<trim prefix="SET" suffixOverrides=",">
<if test="number != null">number = #{number},</if>
<if test="type != null">type = #{type},</if>
<if test="cycle != null">cycle = #{cycle},</if>
<if test="station != null">station = #{station},</if>
<if test="status != null">status = #{status},</if>
<if test="isTimeout != null">is_timeout = #{isTimeout},</if>
<if test="name != null">name = #{name},</if>
<if test="source != null">source = #{source},</if>
<if test="content != null">content = #{content},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="firstReminder != null">first_reminder = #{firstReminder},</if>
<if test="secondReminder != null">second_reminder = #{secondReminder},</if>
<if test="operator != null">operator = #{operator},</if>
<if test="commencementTime != null">commencement_time = #{commencementTime},</if>
<if test="terminator != null">terminator = #{terminator},</if>
<if test="resolutionTime != null">resolution_time = #{resolutionTime},</if>
<if test="resolutionContent != null">resolution_content = #{resolutionContent},</if>
<if test="preparedBy != null">prepared_by = #{preparedBy},</if>
<if test="head != null">head = #{head},</if>
<if test="remark != null">remark = #{remark},</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 schedule_id = #{scheduleId}
</update>
<delete id="deleteScheduleByScheduleId" parameterType="Long">
delete from schedule where schedule_id = #{scheduleId}
</delete>
<delete id="deleteScheduleByScheduleIds" parameterType="String">
delete from schedule where schedule_id in
<foreach item="scheduleId" collection="array" open="(" separator="," close=")">
#{scheduleId}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,93 @@
<?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.itsm.mapper.StandardInfoMapper">
<resultMap type="StandardInfo" id="StandardInfoResult">
<result property="standardId" column="standard_id" />
<result property="standardCode" column="standard_code" />
<result property="standardName" column="standard_name" />
<result property="standardDescribe" column="standard_describe" />
<result property="docOssId" column="doc_oss_id" />
<result property="remark" column="remark" />
<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="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
</sql>
<select id="selectStandardInfoList" parameterType="StandardInfo" resultMap="StandardInfoResult">
<include refid="selectStandardInfoVo"/>
<where>
<if test="standardCode != null and standardCode != ''"> and standard_code = #{standardCode}</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="docOssId != null and docOssId != ''"> and doc_oss_id = #{docOssId}</if>
</where>
</select>
<select id="selectStandardInfoByStandardId" parameterType="Long" resultMap="StandardInfoResult">
<include refid="selectStandardInfoVo"/>
where standard_id = #{standardId}
</select>
<insert id="insertStandardInfo" parameterType="StandardInfo">
insert into standard_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="standardId != null">standard_id,</if>
<if test="standardCode != null">standard_code,</if>
<if test="standardName != null">standard_name,</if>
<if test="standardDescribe != null">standard_describe,</if>
<if test="docOssId != null">doc_oss_id,</if>
<if test="remark != null">remark,</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="standardId != null">#{standardId},</if>
<if test="standardCode != null">#{standardCode},</if>
<if test="standardName != null">#{standardName},</if>
<if test="standardDescribe != null">#{standardDescribe},</if>
<if test="docOssId != null">#{docOssId},</if>
<if test="remark != null">#{remark},</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="updateStandardInfo" parameterType="StandardInfo">
update standard_info
<trim prefix="SET" suffixOverrides=",">
<if test="standardCode != null">standard_code = #{standardCode},</if>
<if test="standardName != null">standard_name = #{standardName},</if>
<if test="standardDescribe != null">standard_describe = #{standardDescribe},</if>
<if test="docOssId != null">doc_oss_id = #{docOssId},</if>
<if test="remark != null">remark = #{remark},</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 standard_id = #{standardId}
</update>
<delete id="deleteStandardInfoByStandardId" parameterType="Long">
delete from standard_info where standard_id = #{standardId}
</delete>
<delete id="deleteStandardInfoByStandardIds" parameterType="String">
delete from standard_info where standard_id in
<foreach item="standardId" collection="array" open="(" separator="," close=")">
#{standardId}
</foreach>
</delete>
</mapper>

View File

@@ -1,6 +1,9 @@
package com.xinda.data.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import com.xinda.common.core.domain.entity.SysUser;
@@ -60,6 +63,34 @@ public class AlertLogController extends BaseController
return getDataTable(list);
}
/**
* 查询设备告警列表
*/
@PreAuthorize("@ss.hasPermi('iot:alertLog:list')")
@GetMapping("/listCount")
public Map<String,Integer> listCount()
{
Map<String,Integer> map = new HashMap<>();
AlertLog alertLog = new AlertLog();
alertLog.setStatus(2);
List<AlertLog> list = alertLogService.selectAlertLogList(alertLog);
//1=提醒通知2=轻微问题3=严重警告
List<AlertLog> tlist =list.stream()
.filter(log -> log.getAlertLevel() == 1)
.collect(Collectors.toList());
List<AlertLog> qlist =list.stream()
.filter(log -> log.getAlertLevel() == 2)
.collect(Collectors.toList());
List<AlertLog> ylist =list.stream()
.filter(log -> log.getAlertLevel() == 3)
.collect(Collectors.toList());
map.put("tx",tlist.size());
map.put("qw",qlist.size());
map.put("yz",ylist.size());
return map;
}
@GetMapping("/snList")
public TableDataInfo snList(AlertLog alertLog)
{

View File

@@ -27,6 +27,7 @@ import com.xinda.mq.service.IMqttMessagePublish;
import com.github.pagehelper.PageInfo;
import com.xinda.scada.domain.Scada;
import com.xinda.scada.domain.ScadaDeviceBind;
import com.xinda.scada.enums.ScadaTypeEnum;
import com.xinda.scada.service.IScadaDeviceBindService;
import com.xinda.scada.service.IScadaService;
import com.xinda.sip.domain.SipDeviceChannel;
@@ -43,10 +44,7 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
import java.util.*;
import java.util.stream.Collectors;
/**
@@ -351,20 +349,27 @@ public class DeviceController extends BaseController
//复制组态信息
if(StringUtils.isNotEmpty(product.getGuid())){
Scada scada = scadaService.selectScadaByGuid(product.getGuid());
if(scada!=null){
UUID uuid = UUID.randomUUID();
scada.setGuid(uuid.toString());
scada.setPageName(device.getDeviceName()+"组态");
scada.setType(ScadaTypeEnum.SCENE_MODEL.getType());
scada.setCreateTime(new Date());
scada.setCreateBy(SecurityUtils.getUsername());
scadaService.insertScada(scada);
device.setGuid(uuid.toString());
}
}
deviceService.insertDevice(device);
//复制组态信息
if(StringUtils.isNotEmpty(product.getGuid())){
if(StringUtils.isNotEmpty(device.getGuid())){
ScadaDeviceBind scadaDeviceBind = new ScadaDeviceBind();
scadaDeviceBind.setScadaGuid(device.getGuid());
scadaDeviceBind.setSerialNumber(device.getSerialNumber());
scadaDeviceBindService.insertScadaDeviceBind(scadaDeviceBind);
}
return AjaxResult.success();
return AjaxResult.success(device);
}
/**
@@ -405,7 +410,7 @@ public class DeviceController extends BaseController
SipDeviceChannel sipDeviceChannel = new SipDeviceChannel();
sipDeviceChannel.setDeviceSipId(device.getSerialNumber());
List<SipDeviceChannel> list = sipDeviceChannelService.selectSipDeviceChannelList(sipDeviceChannel);
List<SipDeviceChannel> newList = new ArrayList<>();
// List<SipDeviceChannel> newList = new ArrayList<>();
if (list != null && list.size() > 0) {
for (SipDeviceChannel channel : list) {
channel.setTenantId(deptUserId);
@@ -414,6 +419,24 @@ public class DeviceController extends BaseController
}
}
}
if(StringUtils.isBlank(device.getGuid())){
Product product = productService.selectProductByProductId(device.getProductId());
//复制组态信息
if(StringUtils.isNotEmpty(product.getGuid())){
Scada scada = scadaService.selectScadaByGuid(product.getGuid());
if(scada!=null){
UUID uuid = UUID.randomUUID();
scada.setGuid(uuid.toString());
scada.setPageName(device.getDeviceName()+"组态");
scada.setType(ScadaTypeEnum.SCENE_MODEL.getType());
scada.setCreateTime(new Date());
scada.setCreateBy(SecurityUtils.getUsername());
scadaService.insertScada(scada);
device.setGuid(uuid.toString());
}
}
}
return deviceService.updateDevice(device);
}

View File

@@ -0,0 +1,110 @@
package com.xinda.iot.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.Pip;
import com.xinda.iot.service.IPipService;
import com.xinda.common.utils.poi.ExcelUtil;
import com.xinda.common.core.page.TableDataInfo;
/**
* 机构管网Controller
*
* @author kerwincui
* @date 2025-04-18
*/
@RestController
@RequestMapping("/iot/pip")
@Api(tags = "机构管网")
public class PipController extends BaseController
{
@Autowired
private IPipService pipService;
/**
* 查询机构管网列表
*/
@PreAuthorize("@ss.hasPermi('iot:pip:list')")
@GetMapping("/list")
@ApiOperation("查询机构管网列表")
public TableDataInfo list(Pip pip)
{
startPage();
List<Pip> list = pipService.selectPipList(pip);
return getDataTable(list);
}
// /**
// * 导出机构管网列表
// */
// @ApiOperation("导出机构管网列表")
// @PreAuthorize("@ss.hasPermi('iot:pip:export')")
// @PostMapping("/export")
// public void export(HttpServletResponse response, Pip pip)
// {
// List<Pip> list = pipService.selectPipList(pip);
// ExcelUtil<Pip> util = new ExcelUtil<Pip>(Pip.class);
// util.exportExcel(response, list, "机构管网数据");
// }
/**
* 获取机构管网详细信息
*/
// @PreAuthorize("@ss.hasPermi('iot:pip:query')")
@GetMapping(value = "/{deptId}")
@ApiOperation("获取机构管网详细信息")
public AjaxResult getInfo(@PathVariable("deptId") Long deptId)
{
return success(pipService.selectPipByDeptId(deptId));
}
/**
* 新增机构管网
*/
// @PreAuthorize("@ss.hasPermi('iot:pip:add')")
// @PostMapping
// @ApiOperation("新增机构管网")
// public AjaxResult add(@RequestBody Pip pip)
// {
// return toAjax(pipService.insertPip(pip));
// }
/**
* 修改机构管网
*/
// @PreAuthorize("@ss.hasPermi('iot:pip:edit')")
@PutMapping
@ApiOperation("修改机构管网")
public AjaxResult edit(@RequestBody Pip pip)
{
return toAjax(pipService.updatePip(pip));
}
// /**
// * 删除机构管网
// */
// @PreAuthorize("@ss.hasPermi('iot:pip:remove')")
// @DeleteMapping("/{deptIds}")
// @ApiOperation("删除机构管网")
// public AjaxResult remove(@PathVariable Long[] deptIds)
// {
// return toAjax(pipService.deletePipByDeptIds(deptIds));
// }
}

View File

@@ -106,6 +106,8 @@ public interface ScadaMapper
void updateSceneModelGuid( @Param("sceneModelId") Long sceneModelId, @Param("guid") String guid);
void updateDeviceGuid( @Param("serialNumber") String serialNumber, @Param("guid") String guid);
void deleteProductByGuids(List<String> guids);
void deleteSceneModelByGuids(List<String> guids);

View File

@@ -95,6 +95,9 @@ public class ScadaServiceImpl implements IScadaService
@Override
public List<Scada> selectScadaList(Scada scada)
{
// 多租户版本使用
SysUser user = getLoginUser().getUser();
scada.setDeptId(user.getDeptId());
return scadaMapper.selectScadaList(scada);
}
@@ -135,17 +138,19 @@ public class ScadaServiceImpl implements IScadaService
scadaVO.setTenantId(user.getUserId());
scadaVO.setTenantName(user.getUserName());
}
scadaVO.setCreateBy(loginUser.getUserId().toString());
UUID uuid = UUID.randomUUID();
scadaVO.setGuid(uuid.toString());
Scada scada = ScadaConvert.INSTANCE.convertScada(scadaVO);
scada.setDeptId(user.getDept().getDeptId());
int result = scadaMapper.insertScada(scada);
if (result >0){
if (ScadaTypeEnum.PRODUCT_TEMPLATE.getType().equals(scadaVO.getType())) {
scadaMapper.updateProductGuid(scadaVO.getProductId(), uuid.toString());
}
if (ScadaTypeEnum.SCENE_MODEL.getType().equals(scadaVO.getType())) {
scadaMapper.updateSceneModelGuid(scadaVO.getSceneModelId(), uuid.toString());
scadaMapper.updateDeviceGuid(scadaVO.getSerialNumber(), uuid.toString());
}
return AjaxResult.success(uuid.toString());
}else {

View File

@@ -351,6 +351,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where scene_model_id = #{sceneModelId}
</update>
<update id="updateDeviceGuid">
update iot_device
set guid = #{guid,jdbcType=VARCHAR}
where serial_number = #{serialNumber,jdbcType=VARCHAR}
</update>
<update id="deleteSceneModelByGuids">
update scene_model
set guid = null

View File

@@ -30,6 +30,7 @@ import com.xinda.mq.service.IRuleEngine;
import com.xinda.mqtt.manager.MqttRemoteManager;
import com.xinda.mqtt.model.PushMessageBo;
import com.xinda.mqttclient.PubMqttClient;
import com.xinda.system.service.ISysUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -82,6 +83,8 @@ public class DataHandlerImpl implements IDataHandler {
@Resource
private IFunctionLogService functionLogService;
@Resource
private ISysUserService sysUserService;
/**
* 上报属性或功能处理
*
@@ -104,6 +107,16 @@ public class DataHandlerImpl implements IDataHandler {
// 只有设备上报进入规则引擎流程
if (bo.isRuleEngine() && !bo.getSerialNumber().startsWith("server-")){
ruleEngine.ruleMatch(bo);
// 发送至前端告警日志
// for (AlertLog alertLog:alertLogList) {
// PushMessageBo amessageBo = new PushMessageBo();
// Long deptId = sysUserService.getDeptUserByUserId(alertLog.getUserId()).getDeptId();
// amessageBo.setTopic(topicsUtils.buildTopic(deptId, "all", TopicType.WS_SERVICE_ALERT));
// JSONObject pushObj = new JSONObject();
// pushObj.put("message", alertLog);
// amessageBo.setMessage(JSON.toJSONString(pushObj));
// remoteManager.pushCommon(amessageBo);
// }
}
//发送至前端
PushMessageBo messageBo = new PushMessageBo();
@@ -113,6 +126,7 @@ public class DataHandlerImpl implements IDataHandler {
pushObj.put("sources",bo.getSources());
messageBo.setMessage(JSON.toJSONString(pushObj));
remoteManager.pushCommon(messageBo);
// 上报属性给小度音箱,接入小度音箱后可放开
// try {
// List<String> identifierList = thingsModelSimpleItems.stream().map(ThingsModelSimpleItem::getId).collect(Collectors.toList());

View File

@@ -247,6 +247,8 @@ public class Device extends BaseEntity {
* 关联组态,来源产品
*/
private String guid;
private Long scadaId;
// todo
private Long agenciesId;

View File

@@ -0,0 +1,33 @@
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_pip
*
* @author kerwincui
* @date 2025-04-18
*/
@ApiModel(value = "Pip",description = "机构管网 iot_pip")
@Data
public class Pip extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 机构ID */
@Excel(name = "机构ID")
@ApiModelProperty("机构ID")
private Long deptId;
/** 管线JSON */
@Excel(name = "管线JSON")
@ApiModelProperty("管线JSON")
private String pipJson;
}

View File

@@ -4,6 +4,7 @@ import com.xinda.common.core.device.DeviceAndProtocol;
import com.xinda.common.core.thingsModel.ThingsModelValuesInput;
import com.xinda.iot.domain.Device;
import com.xinda.iot.domain.DeviceGroup;
import com.xinda.iot.domain.Product;
import com.xinda.iot.model.*;
import com.xinda.iot.model.ThingsModels.ThingsModelValuesOutput;
import org.apache.ibatis.annotations.Param;
@@ -369,6 +370,7 @@ public interface DeviceMapper
List<DeviceShortOutput> selectDeviceShortTreeList(Device device);
List<DeviceShortOutput> selectCamDeviceListByDeviceId(Long deviceId);
List<DeviceShortOutput> selectListScadaIdByGuidS(@Param("guidList") List<String> guidList);
Long selectScadaIdByGuid(String guid);
}

View File

@@ -0,0 +1,61 @@
package com.xinda.iot.mapper;
import java.util.List;
import com.xinda.iot.domain.Pip;
/**
* 机构管网Mapper接口
*
* @author kerwincui
* @date 2025-04-18
*/
public interface PipMapper
{
/**
* 查询机构管网
*
* @param deptId 机构管网主键
* @return 机构管网
*/
public Pip selectPipByDeptId(Long deptId);
/**
* 查询机构管网列表
*
* @param pip 机构管网
* @return 机构管网集合
*/
public List<Pip> selectPipList(Pip pip);
/**
* 新增机构管网
*
* @param pip 机构管网
* @return 结果
*/
public int insertPip(Pip pip);
/**
* 修改机构管网
*
* @param pip 机构管网
* @return 结果
*/
public int updatePip(Pip pip);
/**
* 删除机构管网
*
* @param deptId 机构管网主键
* @return 结果
*/
public int deletePipByDeptId(Long deptId);
/**
* 批量删除机构管网
*
* @param deptIds 需要删除的数据主键集合
* @return 结果
*/
public int deletePipByDeptIds(Long[] deptIds);
}

View File

@@ -74,6 +74,27 @@ public class DeviceAllShortOutput
private Integer subDeviceCount;
private Long gwId;
/** 监控设备名称 */
private String gwName;
public Long getGwId() {
return gwId;
}
public void setGwId(Long gwId) {
this.gwId = gwId;
}
public String getGwName() {
return gwName;
}
public void setGwName(String gwName) {
this.gwName = gwName;
}
public Integer getSubDeviceCount() {
return subDeviceCount;
}

View File

@@ -5,6 +5,7 @@ import com.xinda.iot.model.ThingsModels.ThingsModelValueItem;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinda.common.annotation.Excel;
import com.xinda.iot.model.ThingsModelItem.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@@ -136,11 +137,42 @@ public class DeviceShortOutput
* 产品guid
*/
private String guid;
private Long scadaId;
private Long groupId;
private Long agenciesId;
private Long gwId;
/** 监控设备名称 */
private String gwName;
public Long getScadaId() {
return scadaId;
}
public void setScadaId(Long scadaId) {
this.scadaId = scadaId;
}
public Long getGwId() {
return gwId;
}
public void setGwId(Long gwId) {
this.gwId = gwId;
}
public String getGwName() {
return gwName;
}
public void setGwName(String gwName) {
this.gwName = gwName;
}
/**
* 所属机构
* agenciesName

View File

@@ -0,0 +1,61 @@
package com.xinda.iot.service;
import java.util.List;
import com.xinda.iot.domain.Pip;
/**
* 机构管网Service接口
*
* @author kerwincui
* @date 2025-04-18
*/
public interface IPipService
{
/**
* 查询机构管网
*
* @param deptId 机构管网主键
* @return 机构管网
*/
public Pip selectPipByDeptId(Long deptId);
/**
* 查询机构管网列表
*
* @param pip 机构管网
* @return 机构管网集合
*/
public List<Pip> selectPipList(Pip pip);
/**
* 新增机构管网
*
* @param pip 机构管网
* @return 结果
*/
public int insertPip(Pip pip);
/**
* 修改机构管网
*
* @param pip 机构管网
* @return 结果
*/
public int updatePip(Pip pip);
/**
* 批量删除机构管网
*
* @param deptIds 需要删除的机构管网主键集合
* @return 结果
*/
public int deletePipByDeptIds(Long[] deptIds);
/**
* 删除机构管网信息
*
* @param deptId 机构管网主键
* @return 结果
*/
public int deletePipByDeptId(Long deptId);
}

View File

@@ -2,19 +2,28 @@ package com.xinda.iot.service.impl;
import java.util.List;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.xinda.common.core.domain.entity.SysRole;
import com.xinda.common.core.domain.entity.SysUser;
import com.xinda.common.enums.TopicType;
import com.xinda.common.utils.DateUtils;
import com.xinda.common.utils.SecurityUtils;
import com.xinda.framework.websocket.WebSocketAlertServer;
import com.xinda.iot.domain.Device;
import com.xinda.iot.model.AlertCountVO;
import com.xinda.iot.model.param.DataCenterParam;
import com.xinda.iot.model.DeviceAlertCount;
import com.xinda.system.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xinda.iot.mapper.AlertLogMapper;
import com.xinda.iot.domain.AlertLog;
import com.xinda.iot.service.IAlertLogService;
import javax.annotation.Resource;
import static com.xinda.common.utils.SecurityUtils.getLoginUser;
/**
@@ -25,9 +34,14 @@ import static com.xinda.common.utils.SecurityUtils.getLoginUser;
*/
@Service
public class AlertLogServiceImpl implements IAlertLogService {
@Autowired
private WebSocketAlertServer webSocketAlertServer;
@Autowired
private AlertLogMapper alertLogMapper;
@Resource
private SysUserMapper sysUserMapper;
/**
* 查询设备告警
*
@@ -142,6 +156,18 @@ public class AlertLogServiceImpl implements IAlertLogService {
@Override
public int insertAlertLogBatch(List<AlertLog> alertLogList) {
if(alertLogList.size()>0){
Long deptId = sysUserMapper.getDeptUserByUserId(alertLogList.get(0).getUserId()).getDeptId();
if (deptId != null) {
webSocketAlertServer.sendToUser(deptId, JSON.toJSONString(alertLogList));
}
}
// for(AlertLog alertLog:alertLogList){
// Long deptId = sysUserMapper.getDeptUserByUserId(alertLog.getUserId()).getDeptId();
// if (deptId != null) {
// webSocketAlertServer.sendToUser(deptId, JSON.toJSONString(alertLog));
// }
// }
return alertLogMapper.insertAlertLogBatch(alertLogList);
}

View File

@@ -159,6 +159,13 @@ public class DeviceServiceImpl implements IDeviceService {
if (StringUtils.isEmpty(device.getImgUrl())) {
device.setImgUrl(productService.selectImgUrlByProductId(device.getProductId()));
}
// 组态
if(device.getGuid()!=null){
Long scadaId = deviceMapper.selectScadaIdByGuid(device.getGuid());
if(scadaId !=null) {
device.setScadaId(scadaId);
}
}
return device;
}
@@ -583,8 +590,16 @@ public class DeviceServiceImpl implements IDeviceService {
}
}
// // 组态不是所有人都买了,故单独查询组态信息
// List<String> guidList = productList.stream().map(Product::getGuid).collect(Collectors.toList());
// 组态不是所有人都买了,故单独查询组态信息
List<String> guidList = list.stream().map(DeviceShortOutput::getGuid).collect(Collectors.toList());
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(guidList)) {
List<DeviceShortOutput> scadaList = deviceMapper.selectListScadaIdByGuidS(guidList);
Map<String, Long> map = scadaList.stream().collect(Collectors.toMap(DeviceShortOutput::getGuid, DeviceShortOutput::getScadaId));
for (DeviceShortOutput device1 : list) {
Long scadaId = map.get(device1.getGuid());
device1.setScadaId(scadaId);
}
}
return list;
}
@@ -614,7 +629,7 @@ public class DeviceServiceImpl implements IDeviceService {
for (DeviceShortOutput deviceShortOutput : list )
{
Device sdevice = new Device();
sdevice.setGwId(device.getDeviceId());
sdevice.setGwId(deviceShortOutput.getDeviceId());
sdevice.setDeviceType(3);
List<DeviceShortOutput> sipList = deviceMapper.selectDeviceShortList(sdevice);
if(sipList.size()>0){

View File

@@ -0,0 +1,99 @@
package com.xinda.iot.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xinda.iot.mapper.PipMapper;
import com.xinda.iot.domain.Pip;
import com.xinda.iot.service.IPipService;
/**
* 机构管网Service业务层处理
*
* @author kerwincui
* @date 2025-04-18
*/
@Service
public class PipServiceImpl implements IPipService
{
@Autowired
private PipMapper pipMapper;
/**
* 查询机构管网
*
* @param deptId 机构管网主键
* @return 机构管网
*/
@Override
public Pip selectPipByDeptId(Long deptId)
{
return pipMapper.selectPipByDeptId(deptId);
}
/**
* 查询机构管网列表
*
* @param pip 机构管网
* @return 机构管网
*/
@Override
public List<Pip> selectPipList(Pip pip)
{
return pipMapper.selectPipList(pip);
}
/**
* 新增机构管网
*
* @param pip 机构管网
* @return 结果
*/
@Override
public int insertPip(Pip pip)
{
return pipMapper.insertPip(pip);
}
/**
* 修改机构管网
*
* @param pip 机构管网
* @return 结果
*/
@Override
public int updatePip(Pip pip)
{
// 查询指定部门 ID 的 Pip 对象
Pip result = pipMapper.selectPipByDeptId(pip.getDeptId());
if (result != null) {
return pipMapper.updatePip(pip);
}else{
return pipMapper.insertPip(pip);
}
}
/**
* 批量删除机构管网
*
* @param deptIds 需要删除的机构管网主键
* @return 结果
*/
@Override
public int deletePipByDeptIds(Long[] deptIds)
{
return pipMapper.deletePipByDeptIds(deptIds);
}
/**
* 删除机构管网信息
*
* @param deptId 机构管网主键
* @return 结果
*/
@Override
public int deletePipByDeptId(Long deptId)
{
return pipMapper.deletePipByDeptId(deptId);
}
}

View File

@@ -447,7 +447,7 @@
else 1
end as is_owner,
(select count(*) from iot_device d1 where d1.gw_dev_code = d.serial_number) as sub_device_count,
p.protocol_code,p.transport,p.guid,
p.protocol_code,p.transport,d.guid,
d.group_id,d.agencies_id
from iot_device d
left join iot_product p on p.product_id=d.product_id
@@ -547,7 +547,7 @@
else 1
end as is_owner,
(select count(*) from iot_device d1 where d1.gw_dev_code = d.serial_number) as sub_device_count,
p.protocol_code,p.transport,p.guid
p.protocol_code,p.transport,d.guid
from iot_device d
left join iot_product p on p.product_id=d.product_id
<if test="groupId != null and groupId !=0 "> left join iot_device_group g on g.device_id=d.device_id </if>
@@ -585,7 +585,7 @@
else 1
end as is_owner,
(select count(*) from iot_device d1 where d1.gw_dev_code = d.serial_number) as sub_device_count,
p.protocol_code,p.transport,p.guid
p.protocol_code,p.transport,d.guid
from iot_device d
left join iot_product p on p.product_id=d.product_id
<if test="groupId != null and groupId !=0 "> left join iot_device_group g on g.device_id=d.device_id </if>
@@ -624,7 +624,7 @@
else 1
end as is_owner,
(select count(*) from iot_device d1 where d1.gw_dev_code = d.serial_number) as sub_device_count,
p.protocol_code,p.transport,p.guid
p.protocol_code,p.transport,d.guid
from iot_device d
left join iot_product p on p.product_id=d.product_id
<if test="groupId != null and groupId !=0 "> left join iot_device_group g on g.device_id=d.device_id </if>
@@ -658,7 +658,7 @@
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,
(select count(*) from iot_device d1 where d1.gw_dev_code = d.serial_number) as sub_device_count,
p.protocol_code,p.transport,p.guid
p.protocol_code,p.transport,d.guid
from iot_device d
left join iot_product p on p.product_id=d.product_id
<where>
@@ -697,7 +697,7 @@
d.img_url,
d.summary,
d.remark,
p.guid,
d.guid,
d.group_id,
d.agencies_id,
d.ic_way,
@@ -891,6 +891,8 @@
<if test="imei != null">imei,</if>
<if test="gwId != null">gw_id,</if>
<if test="gwName != null">gw_name,</if>
<if test="guid != null">guid,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
@@ -931,13 +933,14 @@
<if test="imei != null">#{imei},</if>
<if test="gwId != null">#{gwId},</if>
<if test="gwName != null">#{gwName},</if>
<if test="guid != null">#{guid},</if>
</trim>
</insert>
<insert id="insertBatchDevice" parameterType="com.xinda.iot.domain.Device" useGeneratedKeys="true"
keyProperty="deviceId">
insert into iot_device (device_name, product_id, product_name, tenant_id, tenant_name, serial_number,
firmware_version, rssi, is_shadow, location_way, create_by, create_time,ic_way,iccid,volt,sd,pd,imei, gw_id, gw_name)
firmware_version, rssi, is_shadow, location_way, create_by, create_time,ic_way,iccid,volt,sd,pd,imei, gw_id, gw_name,guid)
values
<foreach collection="deviceList" item="device" separator=",">
(#{device.deviceName},
@@ -959,7 +962,8 @@
#{device.pd}),
#{device.imei}),
#{device.gwId}),
#{device.geName})
#{device.geName}),
#{device.guid})
</foreach>
</insert>
@@ -1004,6 +1008,7 @@
<if test="imei != null">imei = #{imei},</if>
<if test="gwId != null">gw_id = #{gwId},</if>
<if test="gwName != null">gw_name = #{gwName},</if>
<if test="guid != null">guid = #{guid},</if>
</trim>
where device_id = #{deviceId}
</update>
@@ -1085,6 +1090,7 @@
<if test="imei != null">imei = #{imei},</if>
<if test="gwId != null">gw_id = #{gwId},</if>
<if test="gwName != null">gw_name = #{gwName},</if>
<if test="guid != null">guid = #{guid},</if>
</trim>
where serial_number = #{serialNumber}
</update>
@@ -1408,5 +1414,17 @@
where status = 4
and group_id = '0'
</update>
<select id="selectScadaIdByGuid" resultType="Long">
select id
from scada
where guid = #{guid}
</select>
<select id="selectListScadaIdByGuidS" resultType="com.xinda.iot.model.DeviceShortOutput">
select id scadaId, guid
from scada
where guid in
<foreach collection="guidList" item="guid" open="(" separator="," close=")">
#{guid}
</foreach>
</select>
</mapper>

View File

@@ -0,0 +1,64 @@
<?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.PipMapper">
<resultMap type="Pip" id="PipResult">
<result property="deptId" column="dept_id" />
<result property="pipJson" column="pip_json" />
</resultMap>
<sql id="selectPipVo">
select p.dept_id, p.pip_json from iot_pip p
</sql>
<select id="selectPipList" parameterType="Pip" resultMap="PipResult">
<include refid="selectPipVo"/>
<where>
<if test="deptId != null and deptId != 0 ">
and
( d.dept_id in (SELECT de.dept_id FROM sys_dept de
WHERE FIND_IN_SET(#{deptId}, de.ancestors) OR de.dept_id = #{deptId})
)
</if>
<if test="pipJson != null and pipJson != ''"> and p.pip_json = #{pipJson}</if>
</where>
</select>
<select id="selectPipByDeptId" parameterType="Long" resultMap="PipResult">
<include refid="selectPipVo"/>
where p.dept_id = #{deptId}
</select>
<insert id="insertPip" parameterType="Pip">
insert into iot_pip
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deptId != null">dept_id,</if>
<if test="pipJson != null">pip_json,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">#{deptId},</if>
<if test="pipJson != null">#{pipJson},</if>
</trim>
</insert>
<update id="updatePip" parameterType="Pip">
update iot_pip
<trim prefix="SET" suffixOverrides=",">
<if test="pipJson != null">pip_json = #{pipJson},</if>
</trim>
where dept_id = #{deptId}
</update>
<delete id="deletePipByDeptId" parameterType="Long">
delete from iot_pip where dept_id = #{deptId}
</delete>
<delete id="deletePipByDeptIds" parameterType="String">
delete from iot_pip where dept_id in
<foreach item="deptId" collection="array" open="(" separator="," close=")">
#{deptId}
</foreach>
</delete>
</mapper>