From 0e12618250dd59c292e611da225511ed8d86e548 Mon Sep 17 00:00:00 2001 From: liuguijing <123456> Date: Wed, 12 Apr 2023 21:04:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AC=A3=E5=BD=B1=E7=AE=A1=E7=90=86=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E6=97=B6=E9=97=B4=E4=BB=BB=E5=8A=A1=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ChannelController.java | 11 +- .../controller/TerminalController.java | 5 +- .../controller/TerminalPhotoController.java | 59 +--- .../TerminalScheduleRuleController.java | 51 +++ .../entity/TerminalPhoto.java | 100 +----- .../model/TerminalChannelListModel.java | 43 +++ .../model/TerminalPhotoListModel.java | 67 ++++ .../vo/TerminalAndChannelIdVo.java | 29 ++ .../xymanager_common/vo/TerminalIdListVo.java | 22 ++ .../xymanager_common/vo/TerminalIdVo.java | 14 +- .../dao/TerminalChannelsDao.java | 4 +- .../xymanager_dao/dao/TerminalPhotoDao.java | 6 + .../src/main/resources/generatorConfig.xml | 22 +- .../src/main/resources/mappers/LinesDao.xml | 2 +- .../resources/mappers/TerminalChannelsDao.xml | 171 +++++----- .../resources/mappers/TerminalPhotoDao.xml | 291 +++++++++--------- .../impl/LineServiceImpl.java | 7 +- .../impl/TerminalChannelServiceImpl.java | 40 ++- .../impl/TerminalParamsServiceImpl.java | 5 +- .../impl/TerminalPhotoServiceImpl.java | 59 +++- .../impl/TerminalScheduleRuleServiceImpl.java | 31 ++ .../impl/TerminalServiceImpl.java | 4 +- .../impl/TerminalStatusServiceImpl.java | 6 +- .../service/TerminalChannelService.java | 15 +- .../service/TerminalPhotoService.java | 17 +- .../service/TerminalScheduleRuleService.java | 27 ++ .../service/TerminalScheduleService.java | 4 +- .../service/TerminalService.java | 4 +- .../service/TerminalStatusService.java | 5 +- 29 files changed, 668 insertions(+), 453 deletions(-) create mode 100644 xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalScheduleRuleController.java create mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalChannelListModel.java create mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalPhotoListModel.java create mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalAndChannelIdVo.java create mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalIdListVo.java create mode 100644 xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalScheduleRuleServiceImpl.java create mode 100644 xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalScheduleRuleService.java diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/ChannelController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/ChannelController.java index 4120876..700658e 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/ChannelController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/ChannelController.java @@ -5,7 +5,10 @@ import com.shxy.xymanager_common.base.BaseController; import com.shxy.xymanager_common.base.ResponseReult; import com.shxy.xymanager_common.bean.ServiceBody; import com.shxy.xymanager_common.bean.ServiceStatus; +import com.shxy.xymanager_common.model.TerminalChannelListModel; import com.shxy.xymanager_common.model.TerminalListModel; +import com.shxy.xymanager_common.vo.TerminalIdVo; +import com.shxy.xymanager_service.service.TerminalChannelService; import com.shxy.xymanager_service.service.TerminalService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -13,6 +16,8 @@ import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -23,14 +28,14 @@ import org.springframework.web.bind.annotation.RestController; public class ChannelController extends BaseController { @Autowired - TerminalService terminalService; + TerminalChannelService terminalChannelService; @ApiOperation(value = "获取通道接口", notes = "获取通道列表接口", httpMethod = "POST") @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/getChannelList") @Log(title = "获取通道列表", type = "查询") - public ResponseReult getChannelList() { - ServiceBody serviceBody = terminalService.getTerminalList(); + public ResponseReult getChannelList(@RequestBody @Validated TerminalIdVo vo) { + ServiceBody serviceBody = terminalChannelService.getChannelList(vo); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { return ResponseReult.success(serviceBody.getData()); } else { diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalController.java index 0b5566e..f1df6cb 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalController.java @@ -6,7 +6,7 @@ import com.shxy.xymanager_common.base.ResponseReult; import com.shxy.xymanager_common.bean.ServiceBody; import com.shxy.xymanager_common.bean.ServiceStatus; import com.shxy.xymanager_common.model.TerminalListModel; -import com.shxy.xymanager_common.vo.TerminalIdVo; +import com.shxy.xymanager_common.vo.TerminalIdListVo; import com.shxy.xymanager_common.vo.TerminalVo; import com.shxy.xymanager_common.vo.UpdateTerminalVo; import com.shxy.xymanager_service.service.TerminalService; @@ -41,7 +41,6 @@ public class TerminalController extends BaseController { } } - @ApiOperation(value = "添加设备", notes = "添加设备接口", httpMethod = "POST") @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/addTerminal") @@ -72,7 +71,7 @@ public class TerminalController extends BaseController { @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/deleteTerminal") @Log(title = "删除装置列表", type = "修改") - public ResponseReult deleteTerminal(@RequestBody @Validated TerminalIdVo vo) { + public ResponseReult deleteTerminal(@RequestBody @Validated TerminalIdListVo vo) { ServiceBody serviceBody = terminalService.deleteTerminal(vo); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { return ResponseReult.success(serviceBody.getData()); diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java index 5f31e3e..26f6a54 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java @@ -5,11 +5,9 @@ import com.shxy.xymanager_common.base.BaseController; import com.shxy.xymanager_common.base.ResponseReult; import com.shxy.xymanager_common.bean.ServiceBody; import com.shxy.xymanager_common.bean.ServiceStatus; -import com.shxy.xymanager_common.model.TerminalListModel; -import com.shxy.xymanager_common.vo.TerminalIdVo; -import com.shxy.xymanager_common.vo.TerminalVo; -import com.shxy.xymanager_common.vo.UpdateTerminalVo; -import com.shxy.xymanager_service.service.TerminalService; +import com.shxy.xymanager_common.model.TerminalPhotoListModel; +import com.shxy.xymanager_common.vo.TerminalAndChannelIdVo; +import com.shxy.xymanager_service.service.TerminalPhotoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; @@ -22,20 +20,20 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -@Api(value = "设备接口", tags = "设备接口相关") +@Api(value = "图片接口", tags = "图片接口相关") @RestController @Slf4j public class TerminalPhotoController extends BaseController { @Autowired - TerminalService terminalService; + TerminalPhotoService terminalPhotoService; - @ApiOperation(value = "获取设备列表", notes = "获取设备列表接口", httpMethod = "POST") + @ApiOperation(value = "获取图片列表", notes = "获取图片列表接口", httpMethod = "POST") @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) - @RequestMapping("/getTerminalList") + @RequestMapping("/getTerminalPhotoList") @Log(title = "获取设备列表", type = "查询") - public ResponseReult getTerminalList() { - ServiceBody serviceBody = terminalService.getTerminalList(); + public ResponseReult getTerminalPhotoList(@RequestBody @Validated TerminalAndChannelIdVo vo) { + ServiceBody serviceBody = terminalPhotoService.getTerminalPhotoList(vo); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { return ResponseReult.success(serviceBody.getData()); } else { @@ -44,43 +42,4 @@ public class TerminalPhotoController extends BaseController { } - @ApiOperation(value = "添加设备", notes = "添加设备接口", httpMethod = "POST") - @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) - @RequestMapping("/addTerminal") - @Log(title = "新增设备列表", type = "新增") - public ResponseReult addTerminal(@RequestBody @Validated TerminalVo vo) { - ServiceBody serviceBody = terminalService.addTerminal(vo); - if (serviceBody.getCode() == ServiceStatus.SUCCESS) { - return ResponseReult.success(serviceBody.getData()); - } else { - return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg()); - } - } - - @ApiOperation(value = "修改设备", notes = "修改设备接口", httpMethod = "POST") - @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) - @RequestMapping("/updateTerminal") - @Log(title = "修改设备", type = "修改") - public ResponseReult updateTerminal(@RequestBody @Validated UpdateTerminalVo vo) { - ServiceBody serviceBody = terminalService.updateTerminal(vo); - if (serviceBody.getCode() == ServiceStatus.SUCCESS) { - return ResponseReult.success(serviceBody.getData()); - } else { - return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg()); - } - } - - @ApiOperation(value = "删除装置", notes = "删除装置接口", httpMethod = "POST") - @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) - @RequestMapping("/deleteTerminal") - @Log(title = "删除装置列表", type = "修改") - public ResponseReult deleteTerminal(@RequestBody @Validated TerminalIdVo vo) { - ServiceBody serviceBody = terminalService.deleteTerminal(vo); - if (serviceBody.getCode() == ServiceStatus.SUCCESS) { - return ResponseReult.success(serviceBody.getData()); - } else { - return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg()); - } - } - } diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalScheduleRuleController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalScheduleRuleController.java new file mode 100644 index 0000000..afdc07e --- /dev/null +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalScheduleRuleController.java @@ -0,0 +1,51 @@ +package com.shxy.xymanager_admin.controller; + +import com.shxy.xymanager_common.annotation.Log; +import com.shxy.xymanager_common.base.BaseController; +import com.shxy.xymanager_common.base.ResponseReult; +import com.shxy.xymanager_common.bean.ServiceBody; +import com.shxy.xymanager_common.bean.ServiceStatus; +import com.shxy.xymanager_common.model.TerminalListModel; +import com.shxy.xymanager_common.vo.TerminalIdListVo; +import com.shxy.xymanager_common.vo.TerminalVo; +import com.shxy.xymanager_common.vo.UpdateTerminalVo; +import com.shxy.xymanager_service.service.TerminalScheduleRuleService; +import com.shxy.xymanager_service.service.TerminalScheduleService; +import com.shxy.xymanager_service.service.TerminalService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +@Api(value = "任务规则接口", tags = "任务规则接口相关") +@RestController +@Slf4j +public class TerminalScheduleRuleController extends BaseController { + + @Autowired + TerminalScheduleRuleService terminalScheduleRuleService; + + @ApiOperation(value = "获取任务规则列表", notes = "获取任务规则列表接口", httpMethod = "POST") + @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) + @RequestMapping("/getScheduleRulelList") + @Log(title = "获取任务规则列表", type = "查询") + public ResponseReult getSchedulelRuleList() { + ServiceBody serviceBody = terminalScheduleRuleService.getScheduleRuleList(); + if (serviceBody.getCode() == ServiceStatus.SUCCESS) { + return ResponseReult.success(serviceBody.getData()); + } else { + return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg()); + } + } + + + + +} diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPhoto.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPhoto.java index d715a51..586b4e2 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPhoto.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPhoto.java @@ -1,8 +1,11 @@ package com.shxy.xymanager_common.entity; +import lombok.Data; + import java.io.Serializable; import java.util.Date; +@Data public class TerminalPhoto implements Serializable { private Long id; @@ -26,103 +29,8 @@ public class TerminalPhoto implements Serializable { private Byte manualRequest; - private Integer createTime; + private Date createTime; private static final long serialVersionUID = 1L; - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Integer getTermId() { - return termId; - } - - public void setTermId(Integer termId) { - this.termId = termId; - } - - public Integer getChannelId() { - return channelId; - } - - public void setChannelId(Integer channelId) { - this.channelId = channelId; - } - - public Byte getPresetId() { - return presetId; - } - - public void setPresetId(Byte presetId) { - this.presetId = presetId; - } - - public Integer getWidth() { - return width; - } - - public void setWidth(Integer width) { - this.width = width; - } - - public Integer getHeight() { - return height; - } - - public void setHeight(Integer height) { - this.height = height; - } - - public Integer getFileSize() { - return fileSize; - } - - public void setFileSize(Integer fileSize) { - this.fileSize = fileSize; - } - - public Date getPhotoTime() { - return photoTime; - } - - public void setPhotoTime(Date photoTime) { - this.photoTime = photoTime; - } - - public Date getRecvTime() { - return recvTime; - } - - public void setRecvTime(Date recvTime) { - this.recvTime = recvTime; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path == null ? null : path.trim(); - } - - public Byte getManualRequest() { - return manualRequest; - } - - public void setManualRequest(Byte manualRequest) { - this.manualRequest = manualRequest; - } - - public Integer getCreateTime() { - return createTime; - } - - public void setCreateTime(Integer createTime) { - this.createTime = createTime; - } } \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalChannelListModel.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalChannelListModel.java new file mode 100644 index 0000000..3a3fbb6 --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalChannelListModel.java @@ -0,0 +1,43 @@ +package com.shxy.xymanager_common.model; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * 通道列表 + */ +@Data +@ApiModel(value = "通道列表", description = "通道列表信息") +public class TerminalChannelListModel implements Serializable { + + @ApiModelProperty(value = "通道列表对象", example = "[]") + private List list; + + @Data + public static class ChannelBean { + + @ApiModelProperty(value = "通道id", example = "12321") + private Integer id; + + @ApiModelProperty(value = "装置编号", example = "123456") + private Integer termId; + + @ApiModelProperty(value = "通道编号", example = "123456") + private Byte channelNo; + + @ApiModelProperty(value = "通道名称", example = "123456") + private String channelName; + + @ApiModelProperty(value = "分辨率W", example = "123456") + private Integer maxResolutionWidth; + + @ApiModelProperty(value = "分辨率H", example = "123456") + private Integer maxResolutionHeight; + + } +} diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalPhotoListModel.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalPhotoListModel.java new file mode 100644 index 0000000..7af747d --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalPhotoListModel.java @@ -0,0 +1,67 @@ +package com.shxy.xymanager_common.model; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * 通道列表 + */ +@Data +@ApiModel(value = "通道列表", description = "通道列表信息") +public class TerminalPhotoListModel implements Serializable { + + @ApiModelProperty(value = "总记录数", example = "120") + private long total; + @ApiModelProperty(value = "总页数", example = "120") + private int totalpage; + @ApiModelProperty(value = "当前页", example = "1") + private int currentpage; + @ApiModelProperty(value = "每页记录数", example = "1") + private int pagesize; + + @ApiModelProperty(value = "通道列表对象", example = "[]") + private List list; + + @Data + public static class ChannelBean { + + @ApiModelProperty(value = "通道id", example = "12321") + private Long id; + + @ApiModelProperty(value = "装置编号", example = "123456") + private Integer termId; + + @ApiModelProperty(value = "通道编号", example = "123456") + private Integer channelId; + + @ApiModelProperty(value = "预置位编号", example = "123456") + private Byte presetId; + + @ApiModelProperty(value = "宽度", example = "123456") + private Integer width; + + @ApiModelProperty(value = "高度", example = "123456") + private Integer height; + + @ApiModelProperty(value = "大小", example = "123456") + private Integer fileSize; + + @ApiModelProperty(value = "拍照时间", example = "123456") + private Date photoTime; + + @ApiModelProperty(value = "接收时间", example = "123456") + private Date recvTime; + + @ApiModelProperty(value = "照片路径", example = "123456") + private String path; + + @ApiModelProperty(value = "拍照方式", example = "123456") + private Byte manualRequest; + + } +} diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalAndChannelIdVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalAndChannelIdVo.java new file mode 100644 index 0000000..ec383f5 --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalAndChannelIdVo.java @@ -0,0 +1,29 @@ +package com.shxy.xymanager_common.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; + +@Data +@ApiModel(value = "装置编号", description = "装置编号描述") +public class TerminalAndChannelIdVo { + + @NotNull(message = "装置编号不能缺少") + @ApiModelProperty(value = "装置编号", example = "123455") + private Integer terminalid; + + @NotNull(message = "通道编号不能缺少") + @ApiModelProperty(value = "通道编号", example = "123455") + private Integer channelid; + + @Min(value = 1, message = "分页位置最小从1开始") + @ApiModelProperty(value = "分页位置从1开始", required = true, example = "1") + private int pageindex; + + @Min(value = 1, message = "分页大小最小为1") + @ApiModelProperty(value = "分页大小", required = true, example = "1") + private int pagesize; +} diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalIdListVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalIdListVo.java new file mode 100644 index 0000000..d5d4b73 --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalIdListVo.java @@ -0,0 +1,22 @@ +package com.shxy.xymanager_common.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import java.util.List; + +@Data +@ApiModel(value = "装置编号数组", description = "装置编号数组描述") +public class TerminalIdListVo { + @NotEmpty(message = "不能传入空值") + @ApiModelProperty(value = "装置对象数组", required = true, example = "A0001") + private List list; + + @Data + private static class Item { + @ApiModelProperty(value = "装置编号", example = "123455") + private Integer id; + } +} diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalIdVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalIdVo.java index 1ecb54c..2cc8dbb 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalIdVo.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalIdVo.java @@ -5,18 +5,14 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; import java.util.List; @Data -@ApiModel(value = "装置编号数组", description = "装置编号数组描述") +@ApiModel(value = "装置编号对象", description = "装置编号对象描述") public class TerminalIdVo { - @NotEmpty(message = "不能传入空值") - @ApiModelProperty(value = "装置对象数组", required = true, example = "A0001") - private List list; - @Data - private static class Item { - @ApiModelProperty(value = "装置编号", example = "123455") - private Integer id; - } + @NotNull(message = "装置编号不能缺少") + @ApiModelProperty(value = "装置编号", example = "123455") + private Integer cmdid; } diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalChannelsDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalChannelsDao.java index cfa8cdb..7f19c68 100644 --- a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalChannelsDao.java +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalChannelsDao.java @@ -2,6 +2,8 @@ package com.shxy.xymanager_dao.dao; import com.shxy.xymanager_common.entity.TerminalChannels; +import java.util.List; + public interface TerminalChannelsDao { int deleteByPrimaryKey(Integer id); @@ -9,7 +11,7 @@ public interface TerminalChannelsDao { int insertSelective(TerminalChannels record); - TerminalChannels selectByPrimaryKey(Integer id); + List selectByTermid(Integer termid); int updateByPrimaryKeySelective(TerminalChannels record); diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoDao.java index 61d7ecc..32273f6 100644 --- a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoDao.java +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoDao.java @@ -1,8 +1,14 @@ package com.shxy.xymanager_dao.dao; import com.shxy.xymanager_common.entity.TerminalPhoto; +import org.apache.ibatis.annotations.Param; + +import java.util.List; public interface TerminalPhotoDao { + + List selectPhotoList(@Param("terminalid") Integer terminalid, @Param("channelid") Integer channelid); + int deleteByPrimaryKey(Long id); int insert(TerminalPhoto record); diff --git a/xymanager_dao/src/main/resources/generatorConfig.xml b/xymanager_dao/src/main/resources/generatorConfig.xml index 4f9cbde..5286114 100644 --- a/xymanager_dao/src/main/resources/generatorConfig.xml +++ b/xymanager_dao/src/main/resources/generatorConfig.xml @@ -103,14 +103,30 @@ - + + + + + + + + +
+ + +
\ No newline at end of file diff --git a/xymanager_dao/src/main/resources/mappers/LinesDao.xml b/xymanager_dao/src/main/resources/mappers/LinesDao.xml index 2c1d6db..c238f0e 100644 --- a/xymanager_dao/src/main/resources/mappers/LinesDao.xml +++ b/xymanager_dao/src/main/resources/mappers/LinesDao.xml @@ -91,7 +91,7 @@ update_time = #{updateat,jdbcType=TIMESTAMP}, - where id = #{id,jdbcType=INTEGER} + where id = #{data.id} diff --git a/xymanager_dao/src/main/resources/mappers/TerminalChannelsDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalChannelsDao.xml index 6111eeb..64d7646 100644 --- a/xymanager_dao/src/main/resources/mappers/TerminalChannelsDao.xml +++ b/xymanager_dao/src/main/resources/mappers/TerminalChannelsDao.xml @@ -1,28 +1,35 @@ - - - - - - - - - + + + + + + + + + id, term_id, channel_no, channel_name, max_resolution_width, max_resolution_height - - + + + + delete from terminal_channels where id = #{id,jdbcType=INTEGER} - + insert into terminal_channels (id, term_id, channel_no, channel_name, max_resolution_width, max_resolution_height ) @@ -30,71 +37,71 @@ #{channelName,jdbcType=VARCHAR}, #{maxResolutionWidth,jdbcType=INTEGER}, #{maxResolutionHeight,jdbcType=INTEGER} ) - - insert into terminal_channels - - - id, - - - term_id, - - - channel_no, - - - channel_name, - - - max_resolution_width, - - - max_resolution_height, - - - - - #{id,jdbcType=INTEGER}, - - - #{termId,jdbcType=INTEGER}, - - - #{channelNo,jdbcType=TINYINT}, - - - #{channelName,jdbcType=VARCHAR}, - - - #{maxResolutionWidth,jdbcType=INTEGER}, - - - #{maxResolutionHeight,jdbcType=INTEGER}, - - - - - update terminal_channels - - - term_id = #{termId,jdbcType=INTEGER}, - - - channel_no = #{channelNo,jdbcType=TINYINT}, - - - channel_name = #{channelName,jdbcType=VARCHAR}, - - - max_resolution_width = #{maxResolutionWidth,jdbcType=INTEGER}, - - - max_resolution_height = #{maxResolutionHeight,jdbcType=INTEGER}, - - - where id = #{id,jdbcType=INTEGER} - - + + insert into terminal_channels + + + id, + + + term_id, + + + channel_no, + + + channel_name, + + + max_resolution_width, + + + max_resolution_height, + + + + + #{id,jdbcType=INTEGER}, + + + #{termId,jdbcType=INTEGER}, + + + #{channelNo,jdbcType=TINYINT}, + + + #{channelName,jdbcType=VARCHAR}, + + + #{maxResolutionWidth,jdbcType=INTEGER}, + + + #{maxResolutionHeight,jdbcType=INTEGER}, + + + + + update terminal_channels + + + term_id = #{termId,jdbcType=INTEGER}, + + + channel_no = #{channelNo,jdbcType=TINYINT}, + + + channel_name = #{channelName,jdbcType=VARCHAR}, + + + max_resolution_width = #{maxResolutionWidth,jdbcType=INTEGER}, + + + max_resolution_height = #{maxResolutionHeight,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + update terminal_channels set term_id = #{termId,jdbcType=INTEGER}, channel_no = #{channelNo,jdbcType=TINYINT}, diff --git a/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml index f49a4c0..07ea9ba 100644 --- a/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml +++ b/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml @@ -1,35 +1,42 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + id, term_id, channel_id, preset_id, width, height, file_size, photo_time, recv_time, path, manual_request, create_time - - + + + + delete from terminal_photos where id = #{id,jdbcType=BIGINT} - + insert into terminal_photos (id, term_id, channel_id, preset_id, width, height, file_size, photo_time, recv_time, @@ -41,125 +48,125 @@ #{path,jdbcType=VARCHAR}, #{manualRequest,jdbcType=TINYINT}, #{createTime,jdbcType=INTEGER} ) - - insert into terminal_photos - - - id, - - - term_id, - - - channel_id, - - - preset_id, - - - width, - - - height, - - - file_size, - - - photo_time, - - - recv_time, - - - path, - - - manual_request, - - - create_time, - - - - - #{id,jdbcType=BIGINT}, - - - #{termId,jdbcType=INTEGER}, - - - #{channelId,jdbcType=INTEGER}, - - - #{presetId,jdbcType=TINYINT}, - - - #{width,jdbcType=INTEGER}, - - - #{height,jdbcType=INTEGER}, - - - #{fileSize,jdbcType=INTEGER}, - - - #{photoTime,jdbcType=TIMESTAMP}, - - - #{recvTime,jdbcType=TIMESTAMP}, - - - #{path,jdbcType=VARCHAR}, - - - #{manualRequest,jdbcType=TINYINT}, - - - #{createTime,jdbcType=INTEGER}, - - - - - update terminal_photos - - - term_id = #{termId,jdbcType=INTEGER}, - - - channel_id = #{channelId,jdbcType=INTEGER}, - - - preset_id = #{presetId,jdbcType=TINYINT}, - - - width = #{width,jdbcType=INTEGER}, - - - height = #{height,jdbcType=INTEGER}, - - - file_size = #{fileSize,jdbcType=INTEGER}, - - - photo_time = #{photoTime,jdbcType=TIMESTAMP}, - - - recv_time = #{recvTime,jdbcType=TIMESTAMP}, - - - path = #{path,jdbcType=VARCHAR}, - - - manual_request = #{manualRequest,jdbcType=TINYINT}, - - - create_time = #{createTime,jdbcType=INTEGER}, - - - where id = #{id,jdbcType=BIGINT} - - + + insert into terminal_photos + + + id, + + + term_id, + + + channel_id, + + + preset_id, + + + width, + + + height, + + + file_size, + + + photo_time, + + + recv_time, + + + path, + + + manual_request, + + + create_time, + + + + + #{id,jdbcType=BIGINT}, + + + #{termId,jdbcType=INTEGER}, + + + #{channelId,jdbcType=INTEGER}, + + + #{presetId,jdbcType=TINYINT}, + + + #{width,jdbcType=INTEGER}, + + + #{height,jdbcType=INTEGER}, + + + #{fileSize,jdbcType=INTEGER}, + + + #{photoTime,jdbcType=TIMESTAMP}, + + + #{recvTime,jdbcType=TIMESTAMP}, + + + #{path,jdbcType=VARCHAR}, + + + #{manualRequest,jdbcType=TINYINT}, + + + #{createTime,jdbcType=INTEGER}, + + + + + update terminal_photos + + + term_id = #{termId,jdbcType=INTEGER}, + + + channel_id = #{channelId,jdbcType=INTEGER}, + + + preset_id = #{presetId,jdbcType=TINYINT}, + + + width = #{width,jdbcType=INTEGER}, + + + height = #{height,jdbcType=INTEGER}, + + + file_size = #{fileSize,jdbcType=INTEGER}, + + + photo_time = #{photoTime,jdbcType=TIMESTAMP}, + + + recv_time = #{recvTime,jdbcType=TIMESTAMP}, + + + path = #{path,jdbcType=VARCHAR}, + + + manual_request = #{manualRequest,jdbcType=TINYINT}, + + + create_time = #{createTime,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=BIGINT} + + update terminal_photos set term_id = #{termId,jdbcType=INTEGER}, channel_id = #{channelId,jdbcType=INTEGER}, diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LineServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LineServiceImpl.java index 2a8950b..4bc68c5 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LineServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LineServiceImpl.java @@ -119,13 +119,12 @@ public class LineServiceImpl implements LineService { */ @Override public ServiceBody updateLine(UpdateLineVo vo) { - Lines lines = new Lines(); - BeanUtil.copyProperties(vo, Lines.class); + Lines lines = BeanUtil.copyProperties(vo, Lines.class); int i = linesDao.updateByPrimaryKeySelective(lines,new Date()); if (i != 0) { - return Asserts.success("删除成功"); + return Asserts.success("修改成功"); } else { - return Asserts.error("删除失败"); + return Asserts.error("修改失败"); } } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalChannelServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalChannelServiceImpl.java index 1d83eda..fbfb30e 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalChannelServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalChannelServiceImpl.java @@ -1,28 +1,48 @@ package com.shxy.xymanager_service.impl; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollectionUtil; import com.shxy.xymanager_common.bean.ServiceBody; -import com.shxy.xymanager_common.model.TerminalListModel; -import com.shxy.xymanager_common.vo.TerminalVo; +import com.shxy.xymanager_common.entity.TerminalChannels; +import com.shxy.xymanager_common.exception.Asserts; +import com.shxy.xymanager_common.model.TerminalChannelListModel; +import com.shxy.xymanager_common.vo.TerminalIdVo; +import com.shxy.xymanager_dao.dao.TerminalChannelsDao; import com.shxy.xymanager_service.service.TerminalChannelService; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.List; + /** - * 杆塔信息实现层 + * 装置通道实现层 * */ @Service @Slf4j public class TerminalChannelServiceImpl implements TerminalChannelService { + @Autowired + TerminalChannelsDao terminalChannelsDao; + /** + * 装置通道获取 + * @param vo + * @return + */ @Override - public ServiceBody getChannelTreeList() { - return null; - } - - @Override - public ServiceBody addTerminal(TerminalVo terminalVo) { - return null; + public ServiceBody getChannelList(TerminalIdVo vo) { + TerminalChannelListModel model = new TerminalChannelListModel(); + List list = terminalChannelsDao.selectByTermid(vo.getCmdid()); + boolean empty = CollectionUtil.isEmpty(list); + if (empty) { + model.setList(new ArrayList<>()); + } else { + List channelBeans = BeanUtil.copyToList(list, TerminalChannelListModel.ChannelBean.class); + model.setList(channelBeans); + } + return Asserts.success(model); } } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalParamsServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalParamsServiceImpl.java index c7346ba..0f118e7 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalParamsServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalParamsServiceImpl.java @@ -4,6 +4,7 @@ import com.shxy.xymanager_common.bean.ServiceBody; import com.shxy.xymanager_common.model.TerminalListModel; import com.shxy.xymanager_common.vo.TerminalVo; import com.shxy.xymanager_service.service.TerminalChannelService; +import com.shxy.xymanager_service.service.TerminalParamsService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -13,11 +14,11 @@ import org.springframework.stereotype.Service; */ @Service @Slf4j -public class TerminalParamsServiceImpl implements TerminalChannelService { +public class TerminalParamsServiceImpl implements TerminalParamsService { @Override - public ServiceBody getChannelTreeList() { + public ServiceBody getTerminalList() { return null; } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalPhotoServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalPhotoServiceImpl.java index 79bb587..6fa9589 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalPhotoServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalPhotoServiceImpl.java @@ -1,30 +1,65 @@ package com.shxy.xymanager_service.impl; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import cn.hutool.core.collection.CollectionUtil; +import com.github.pagehelper.PageInfo; import com.shxy.xymanager_common.bean.ServiceBody; -import com.shxy.xymanager_common.model.TerminalListModel; -import com.shxy.xymanager_common.vo.TerminalVo; -import com.shxy.xymanager_service.service.TerminalChannelService; +import com.shxy.xymanager_common.entity.TerminalPhoto; +import com.shxy.xymanager_common.exception.Asserts; +import com.shxy.xymanager_common.model.TerminalPhotoListModel; +import com.shxy.xymanager_common.page.PageUtils; +import com.shxy.xymanager_common.vo.TerminalAndChannelIdVo; +import com.shxy.xymanager_dao.dao.TerminalPhotoDao; import com.shxy.xymanager_service.service.TerminalPhotoService; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.List; + /** - * 杆塔信息实现层 - * + * 装置图片实现层 */ @Service @Slf4j public class TerminalPhotoServiceImpl implements TerminalPhotoService { + @Autowired + TerminalPhotoDao terminalPhotoDao; - + /** + * 根据装置id和通道id获取图片 + * + * @param vo + * @return + */ @Override - public ServiceBody getTerminalList() { - return null; - } + public ServiceBody getTerminalPhotoList(TerminalAndChannelIdVo vo) { + TerminalPhotoListModel model = new TerminalPhotoListModel(); + int pageindex = vo.getPageindex(); + int pagesize = vo.getPagesize(); + PageUtils.SetPage(pageindex, pagesize); + List list = terminalPhotoDao.selectPhotoList(vo.getTerminalid(), vo.getChannelid()); + boolean empty = CollectionUtil.isEmpty(list); + if (empty) { + model.setList(new ArrayList<>()); + } else { + List beans = BeanUtil.copyToList(list, TerminalPhotoListModel.ChannelBean.class, CopyOptions.create().ignoreCase()); + model.setList(beans); + } + PageInfo pageData = PageUtils.getPageData(list); + int currentpage = pageData.getPageNum(); + model.setCurrentpage(currentpage); + long total = pageData.getTotal(); + model.setTotal(total); - @Override - public ServiceBody addTerminal(TerminalVo terminalVo) { - return null; + int pageSize = pageData.getPageSize(); + model.setPagesize(pageSize); + int pages = pageData.getPages(); + model.setTotalpage(pages); + return Asserts.success(model); } + } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalScheduleRuleServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalScheduleRuleServiceImpl.java new file mode 100644 index 0000000..bebb0a0 --- /dev/null +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalScheduleRuleServiceImpl.java @@ -0,0 +1,31 @@ +package com.shxy.xymanager_service.impl; + +import com.shxy.xymanager_common.bean.ServiceBody; +import com.shxy.xymanager_common.model.TerminalListModel; +import com.shxy.xymanager_common.vo.TerminalVo; +import com.shxy.xymanager_service.service.TerminalScheduleRuleService; +import com.shxy.xymanager_service.service.TerminalScheduleService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/** + * 时间任务实现层 + */ +@Service +@Slf4j +public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleService { + + /** + * 时间 + * @return + */ + @Override + public ServiceBody getScheduleRuleList() { + return null; + } + + @Override + public ServiceBody addSchelduleRule(TerminalVo terminalVo) { + return null; + } +} diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java index f41e24a..43edec9 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java @@ -8,7 +8,7 @@ import com.shxy.xymanager_common.entity.Terminals; import com.shxy.xymanager_common.enums.CommonStatus; import com.shxy.xymanager_common.exception.Asserts; import com.shxy.xymanager_common.model.TerminalListModel; -import com.shxy.xymanager_common.vo.TerminalIdVo; +import com.shxy.xymanager_common.vo.TerminalIdListVo; import com.shxy.xymanager_common.vo.TerminalVo; import com.shxy.xymanager_common.vo.UpdateTerminalVo; import com.shxy.xymanager_dao.dao.TerminalsDao; @@ -95,7 +95,7 @@ public class TerminalServiceImpl implements TerminalService { * @return */ @Override - public ServiceBody deleteTerminal(TerminalIdVo vo) { + public ServiceBody deleteTerminal(TerminalIdListVo vo) { List list = BeanUtil.copyToList(vo.getList(), Terminals.class); int i = terminalsDao.deleteById(list,CommonStatus.DELETE.value(),new Date()); if (i != 0) { diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalStatusServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalStatusServiceImpl.java index 71da656..936c262 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalStatusServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalStatusServiceImpl.java @@ -4,13 +4,11 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import cn.hutool.core.collection.CollectionUtil; import com.shxy.xymanager_common.bean.ServiceBody; -import com.shxy.xymanager_common.entity.Lines; import com.shxy.xymanager_common.entity.Terminals; import com.shxy.xymanager_common.enums.CommonStatus; import com.shxy.xymanager_common.exception.Asserts; import com.shxy.xymanager_common.model.TerminalListModel; -import com.shxy.xymanager_common.vo.LineIdVo; -import com.shxy.xymanager_common.vo.TerminalIdVo; +import com.shxy.xymanager_common.vo.TerminalIdListVo; import com.shxy.xymanager_common.vo.TerminalVo; import com.shxy.xymanager_dao.dao.TerminalsDao; import com.shxy.xymanager_service.service.TerminalStatusService; @@ -79,7 +77,7 @@ public class TerminalStatusServiceImpl implements TerminalStatusService { * @return */ @Override - public ServiceBody deleteLine(TerminalIdVo vo) { + public ServiceBody deleteLine(TerminalIdListVo vo) { List list = BeanUtil.copyToList(vo.getList(), Terminals.class); int i = terminalsDao.deleteById(list,CommonStatus.DELETE.value(),new Date()); if (i != 0) { diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalChannelService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalChannelService.java index aa1ec01..286b9ed 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalChannelService.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalChannelService.java @@ -1,27 +1,22 @@ package com.shxy.xymanager_service.service; import com.shxy.xymanager_common.bean.ServiceBody; +import com.shxy.xymanager_common.model.TerminalChannelListModel; import com.shxy.xymanager_common.model.TerminalListModel; +import com.shxy.xymanager_common.vo.TerminalIdVo; import com.shxy.xymanager_common.vo.TerminalVo; /** - * 杆塔线路接口 + * 通道接口 * * @author 晶晶 */ public interface TerminalChannelService { /** - * 获取杆塔线路树状数据 + * 获取通道数据 * * @return */ - ServiceBody getChannelTreeList(); - - /** - * 添加设备信息 - * - * @return - */ - ServiceBody addTerminal(TerminalVo terminalVo); + ServiceBody getChannelList(TerminalIdVo vo); } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalPhotoService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalPhotoService.java index 915408d..2738174 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalPhotoService.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalPhotoService.java @@ -1,27 +1,20 @@ package com.shxy.xymanager_service.service; import com.shxy.xymanager_common.bean.ServiceBody; -import com.shxy.xymanager_common.model.TerminalListModel; -import com.shxy.xymanager_common.vo.TerminalVo; +import com.shxy.xymanager_common.model.TerminalPhotoListModel; +import com.shxy.xymanager_common.vo.TerminalAndChannelIdVo; /** - * 设备接口 + * 装置图片接口 * * @author 晶晶 */ public interface TerminalPhotoService { /** - * 获取所有设备接口 + * 根据通道和装置id获取图片接口 * * @return */ - ServiceBody getTerminalList(); - - /** - * 添加设备信息 - * - * @return - */ - ServiceBody addTerminal(TerminalVo terminalVo); + ServiceBody getTerminalPhotoList(TerminalAndChannelIdVo vo); } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalScheduleRuleService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalScheduleRuleService.java new file mode 100644 index 0000000..c16ad32 --- /dev/null +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalScheduleRuleService.java @@ -0,0 +1,27 @@ +package com.shxy.xymanager_service.service; + +import com.shxy.xymanager_common.bean.ServiceBody; +import com.shxy.xymanager_common.model.TerminalListModel; +import com.shxy.xymanager_common.vo.TerminalVo; + +/** + * 任务规则接口 + * + * @author 晶晶 + */ +public interface TerminalScheduleRuleService { + /** + * 获取所有任务规则接口 + * + * @return + */ + ServiceBody getScheduleRuleList(); + + /** + * 添加任务规则接口 + * + * @return + */ + ServiceBody addSchelduleRule(TerminalVo terminalVo); + +} diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalScheduleService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalScheduleService.java index 66b60f6..e1616be 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalScheduleService.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalScheduleService.java @@ -5,7 +5,7 @@ import com.shxy.xymanager_common.model.TerminalListModel; import com.shxy.xymanager_common.vo.TerminalVo; /** - * 设备接口 + * 任务接口 * * @author 晶晶 */ @@ -15,7 +15,7 @@ public interface TerminalScheduleService { * * @return */ - ServiceBody getTerminalList(); + ServiceBody getScheduleList(); /** * 添加设备信息 diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalService.java index e9f766c..6d72297 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalService.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalService.java @@ -2,7 +2,7 @@ package com.shxy.xymanager_service.service; import com.shxy.xymanager_common.bean.ServiceBody; import com.shxy.xymanager_common.model.TerminalListModel; -import com.shxy.xymanager_common.vo.TerminalIdVo; +import com.shxy.xymanager_common.vo.TerminalIdListVo; import com.shxy.xymanager_common.vo.TerminalVo; import com.shxy.xymanager_common.vo.UpdateTerminalVo; @@ -40,6 +40,6 @@ public interface TerminalService { * @param vo * @return */ - ServiceBody deleteTerminal(TerminalIdVo vo); + ServiceBody deleteTerminal(TerminalIdListVo vo); } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalStatusService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalStatusService.java index 106ba2c..2c1c6ef 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalStatusService.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalStatusService.java @@ -2,8 +2,7 @@ package com.shxy.xymanager_service.service; import com.shxy.xymanager_common.bean.ServiceBody; import com.shxy.xymanager_common.model.TerminalListModel; -import com.shxy.xymanager_common.vo.LineIdVo; -import com.shxy.xymanager_common.vo.TerminalIdVo; +import com.shxy.xymanager_common.vo.TerminalIdListVo; import com.shxy.xymanager_common.vo.TerminalVo; /** @@ -31,5 +30,5 @@ public interface TerminalStatusService { * @param vo * @return */ - ServiceBody deleteLine(TerminalIdVo vo); + ServiceBody deleteLine(TerminalIdListVo vo); }