diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/LineController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/LineController.java index 330d04f..a06ec68 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/LineController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/LineController.java @@ -7,10 +7,7 @@ import com.shxy.xymanager_common.bean.ServiceBody; import com.shxy.xymanager_common.bean.ServiceStatus; import com.shxy.xymanager_common.model.LineListModel; import com.shxy.xymanager_common.model.DyLineTreeListModel; -import com.shxy.xymanager_common.vo.LineIdVo; -import com.shxy.xymanager_common.vo.LineVo; -import com.shxy.xymanager_common.vo.PageVo; -import com.shxy.xymanager_common.vo.UpdateLineVo; +import com.shxy.xymanager_common.vo.*; import com.shxy.xymanager_service.service.LineService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -84,4 +81,18 @@ public class LineController extends BaseController { 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("/getLineAndGt") + @Log(title = "线路杆塔通道查询", type = "查询") + public ResponseReult getLineAndGt(@RequestBody @Validated LineAndGtAndChannelVo vo) { + ServiceBody serviceBody = lineService.getLineAndGt(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/TerminalPhotoController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java index a6ddfe3..26207ed 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 @@ -37,7 +37,7 @@ public class TerminalPhotoController extends BaseController { @ApiOperation(value = "获取图片列表", notes = "获取图片列表接口", httpMethod = "POST") @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/getTerminalPhotoList") - @Log(title = "获取设备列表", type = "查询") + @Log(title = "获取图片列表", type = "查询") public ResponseReult getTerminalPhotoList(@RequestBody @Validated TerminalAndChannelIdAndTimeVo vo) { ServiceBody serviceBody = terminalPhotoService.getTerminalPhotoList(vo); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { 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 index 6ba77a0..d020094 100644 --- 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 @@ -47,7 +47,7 @@ public class TerminalScheduleRuleController extends BaseController { @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/getSingleScheduleRule") @Log(title = "获取单个任务规则", type = "查询") - public ResponseReult getSingleScheduleRule(@RequestBody @Validated TerminalRuleIdVo vo) { + public ResponseReult getSingleScheduleRule(@RequestBody @Validated ScheduleIdVo vo) { ServiceBody serviceBody = terminalScheduleRuleService.getSingleScheduleRule(vo); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { return ResponseReult.success(serviceBody.getData()); @@ -60,7 +60,7 @@ public class TerminalScheduleRuleController extends BaseController { @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/addSchelduleRuleList") @Log(title = "添加任务规则列表", type = "新增") - public ResponseReult addSchedulelRuleList(@RequestBody @Validated TerminalRuleListVo vo) { + public ResponseReult addSchedulelRuleList(@RequestBody @Validated ScheduleListVo vo) { ServiceBody serviceBody = terminalScheduleRuleService.addSchedulelRuleList(vo); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { return ResponseReult.success(serviceBody.getData()); @@ -73,7 +73,7 @@ public class TerminalScheduleRuleController extends BaseController { @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/updateSchelduleRule") @Log(title = "修改任务规则", type = "修改") - public ResponseReult updateSchelduleRule(@RequestBody @Validated TerminalRuleVo vo) { + public ResponseReult updateSchelduleRule(@RequestBody @Validated UpdateScheduleListVo vo) { ServiceBody serviceBody = terminalScheduleRuleService.updateSchelduleRule(vo); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { return ResponseReult.success(serviceBody.getData()); @@ -86,7 +86,7 @@ public class TerminalScheduleRuleController extends BaseController { @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/deleteSchelduleRule") @Log(title = "删除任务规则", type = "修改") - public ResponseReult deleteSchelduleRule(@RequestBody @Validated TerminalRuleIdListVo vo) { + public ResponseReult deleteSchelduleRule(@RequestBody @Validated ScheduleIdListVo vo) { ServiceBody serviceBody = terminalScheduleRuleService.deleteSchelduleRule(vo); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { return ResponseReult.success(serviceBody.getData()); diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/ScheduleAndRuleDto.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/ScheduleAndRuleDto.java new file mode 100644 index 0000000..8e435af --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/ScheduleAndRuleDto.java @@ -0,0 +1,23 @@ +package com.shxy.xymanager_common.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +@Data +public class ScheduleAndRuleDto implements Serializable { + private Integer id; + + private String name; + + private String remark; + + private Integer status; + + private List list; + + private static final long serialVersionUID = 1L; + +} \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/ScheduleRuleDto.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/ScheduleRuleDto.java new file mode 100644 index 0000000..11eb348 --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/ScheduleRuleDto.java @@ -0,0 +1,23 @@ +package com.shxy.xymanager_common.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.sql.Time; +import java.util.Date; + +@Data +public class ScheduleRuleDto implements Serializable { + private Integer id; + + private Integer scheduleId; + + private Time startTime; + + private Time endTime; + + private Integer span; + + private static final long serialVersionUID = 1L; + +} \ No newline at end of file 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 87797ee..098f502 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 @@ -28,8 +28,6 @@ public class TerminalPhoto implements Serializable { private String path; - private Integer manualRequest; - private Date createTime; private static final long serialVersionUID = 1L; diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalSchedule.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalSchedule.java index 648c8ba..39c79bc 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalSchedule.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalSchedule.java @@ -3,21 +3,18 @@ package com.shxy.xymanager_common.entity; import lombok.Data; import java.io.Serializable; +import java.sql.Time; import java.util.Date; @Data public class TerminalSchedule implements Serializable { private Integer id; - private Integer termId; + private String name; - private Byte channelId; + private String remark; - private Byte hour; - - private Byte minute; - - private Integer presetId; + private Integer status; private Date createTime; diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalScheduleRule.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalScheduleRule.java index 615c313..3ba69fb 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalScheduleRule.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalScheduleRule.java @@ -11,7 +11,7 @@ public class TerminalScheduleRule implements Serializable { private Integer id; - private String name; + private Integer scheduleId; private Time startTime; @@ -19,10 +19,6 @@ public class TerminalScheduleRule implements Serializable { private Integer span; - private String remark; - - private Integer status; - private Date createTime; private Date updateTime; diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalScheduleRuleListModel.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalScheduleRuleListModel.java index e8a1ae9..5ff7770 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalScheduleRuleListModel.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalScheduleRuleListModel.java @@ -25,10 +25,10 @@ public class TerminalScheduleRuleListModel implements Serializable { private int pagesize; @ApiModelProperty(value = "时间任务列表", example = "[]") - private List list; + private List list; @Data - public static class ScheduleRuleBean { + public static class ScheduleBean { @ApiModelProperty(value = "任务编号", example = "123456") private Integer id; @@ -36,6 +36,22 @@ public class TerminalScheduleRuleListModel implements Serializable { @ApiModelProperty(value = "任务名称", example = "123456") private String name; + @ApiModelProperty(value = "备注", example = "erwsafsasa") + private String remark; + + @ApiModelProperty(value = "时间任务详情列表", example = "erwsafsasa") + private List list; + + } + + @Data + public static class ScheduleRuleBean { + @ApiModelProperty(value = "任务详情编号", example = "123456") + private Integer id; + + @ApiModelProperty(value = "任务规则编号", example = "123456") + private Integer scheduleId; + @ApiModelProperty(value = "间隔", example = "213") private Integer span; @@ -44,9 +60,5 @@ public class TerminalScheduleRuleListModel implements Serializable { @ApiModelProperty(value = "结束时间", example = "2022-06-08") private Time endTime; - - @ApiModelProperty(value = "备注", example = "erwsafsasa") - private String remark; - } } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalScheduleRuleModel.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalScheduleRuleModel.java index b52a708..ac7606f 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalScheduleRuleModel.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalScheduleRuleModel.java @@ -21,16 +21,27 @@ public class TerminalScheduleRuleModel implements Serializable { @ApiModelProperty(value = "任务名称", example = "123456") private String name; - @ApiModelProperty(value = "间隔", example = "213") - private Integer span; + @ApiModelProperty(value = "备注", example = "erwsafsasa") + private String remark; - @ApiModelProperty(value = "开始时间", example = "2022-06-08") - private Time startTime; + @ApiModelProperty(value = "时间任务详情列表", example = "erwsafsasa") + private List list; - @ApiModelProperty(value = "结束时间", example = "2022-06-08") - private Time endTime; + @Data + public static class ScheduleRuleBean { + @ApiModelProperty(value = "任务详情编号", example = "123456") + private Integer id; - @ApiModelProperty(value = "备注", example = "erwsafsasa") - private String remark; + @ApiModelProperty(value = "任务规则编号", example = "123456") + private Integer scheduleId; + + @ApiModelProperty(value = "间隔", example = "213") + private Integer span; + + @ApiModelProperty(value = "开始时间", example = "2022-06-08") + private Time startTime; + @ApiModelProperty(value = "结束时间", example = "2022-06-08") + private Time endTime; + } } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/LineAndGtAndChannelVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/LineAndGtAndChannelVo.java new file mode 100644 index 0000000..b3bba97 --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/LineAndGtAndChannelVo.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.NotNull; +import java.util.Date; +import java.util.List; + +@Data +@ApiModel(value = "线路杆塔通道和时间查询", description = "线路杆塔通道和时间查询") +public class LineAndGtAndChannelVo { + + @ApiModelProperty(value = "装置编号", example = "123455") + private Integer dyid; + + @ApiModelProperty(value = "装置编号", example = "123455") + private Integer lineid; + + @ApiModelProperty(value = "杆塔编号", example = "123455") + private Integer towerid; + + @ApiModelProperty(value = "通道编号", example = "123455") + private Integer channelid; + + @ApiModelProperty(value = "查询时间", example = "123455") + private Date time; +} diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/RelateTerminalListRuleIdVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/RelateTerminalListRuleIdVo.java index 9a67f9d..8eecb87 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/RelateTerminalListRuleIdVo.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/RelateTerminalListRuleIdVo.java @@ -17,7 +17,7 @@ public class RelateTerminalListRuleIdVo { @NotNull(message = "规则编号不能缺少") @ApiModelProperty(value = "规则编号", example = "123455") - private Integer ruleid; + private Integer scheduleid; @NotNull(message = "装置列表不能缺少") @ApiModelProperty(value = "装置通道编号列表", example = "123455") diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalRuleIdListVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/ScheduleIdListVo.java similarity index 79% rename from xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalRuleIdListVo.java rename to xymanager_common/src/main/java/com/shxy/xymanager_common/vo/ScheduleIdListVo.java index 9fc1adc..35a94c5 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalRuleIdListVo.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/ScheduleIdListVo.java @@ -5,13 +5,12 @@ 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 = "任务规则编号列表描述") -public class TerminalRuleIdListVo { +public class ScheduleIdListVo { @NotEmpty(message = "不能传入空值") @ApiModelProperty(value = "任务规则对象数组", required = true, example = "A0001") - private List list; + private List list; } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalRuleIdVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/ScheduleIdVo.java similarity index 93% rename from xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalRuleIdVo.java rename to xymanager_common/src/main/java/com/shxy/xymanager_common/vo/ScheduleIdVo.java index e8682cc..d5d76ac 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalRuleIdVo.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/ScheduleIdVo.java @@ -8,7 +8,7 @@ import javax.validation.constraints.NotNull; @Data @ApiModel(value = "任务规则编号对象", description = "任务规则编号对象描述") -public class TerminalRuleIdVo { +public class ScheduleIdVo { @NotNull(message = "规则编号不能缺少") @ApiModelProperty(value = "规则编号", example = "123455") diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/ScheduleListVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/ScheduleListVo.java new file mode 100644 index 0000000..c9bccd6 --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/ScheduleListVo.java @@ -0,0 +1,25 @@ +package com.shxy.xymanager_common.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import java.util.List; + +@Data +@ApiModel(value = "任务规则对象", description = "任务规则对象列表描述") +public class ScheduleListVo { + + @ApiModelProperty(value = "任务规则名称", example = "名称名称") + @NotBlank(message = "任务规则名称不能缺少") + private String name; + + @NotEmpty(message = "不能传入空值") + @ApiModelProperty(value = "任务规则对象数组", required = true, example = "A0001") + private List list; + + @ApiModelProperty(value = "备注", example = "型号型号") + private String remark; +} diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalRuleVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/ScheduleRuleVo.java similarity index 56% rename from xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalRuleVo.java rename to xymanager_common/src/main/java/com/shxy/xymanager_common/vo/ScheduleRuleVo.java index 5790ecd..f33b908 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalRuleVo.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/ScheduleRuleVo.java @@ -10,15 +10,8 @@ import java.sql.Time; import java.util.List; @Data -@ApiModel(value = "任务规则对象", description = "任务规则对象描述") -public class TerminalRuleVo { - @ApiModelProperty(value = "任务规则编号", example = "名称名称") - @NotBlank(message = "任务编号不能缺少") - private Integer id; - - @ApiModelProperty(value = "任务规则名称", example = "名称名称") - @NotBlank(message = "任务规则名称不能缺少") - private String name; +@ApiModel(value = "任务规则对象详情", description = "任务规则对象详情描述") +public class ScheduleRuleVo { @ApiModelProperty(value = "开始时间", example = "单位") @NotBlank(message = "开始时间不能缺少") @@ -32,8 +25,5 @@ public class TerminalRuleVo { @NotBlank(message = "时间间隔不能缺少") private Integer span; - @ApiModelProperty(value = "备注", example = "型号型号") - @NotBlank(message = "时间间隔不能缺少") - private String remark; } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalAndChannelIdAndTimeVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalAndChannelIdAndTimeVo.java index e9897d2..fd7b702 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalAndChannelIdAndTimeVo.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalAndChannelIdAndTimeVo.java @@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; import java.util.Date; import java.util.List; diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalRuleListVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalRuleListVo.java deleted file mode 100644 index a0e7ba0..0000000 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalRuleListVo.java +++ /dev/null @@ -1,18 +0,0 @@ -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 TerminalRuleListVo { - @NotEmpty(message = "不能传入空值") - @ApiModelProperty(value = "任务规则对象数组", required = true, example = "A0001") - private List list; - - -} diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/UpdateScheduleListVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/UpdateScheduleListVo.java new file mode 100644 index 0000000..b979ee0 --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/UpdateScheduleListVo.java @@ -0,0 +1,32 @@ +package com.shxy.xymanager_common.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import java.util.List; + +@Data +@ApiModel(value = "修改任务规则对象", description = "修改任务规则对象描述") +public class UpdateScheduleListVo { + @ApiModelProperty(value = "任务规则编号", example = "任务规则编号") + @NotBlank(message = "任务规则编号不能缺少") + private Integer id; + + @ApiModelProperty(value = "任务规则名称", example = "名称名称") + @NotBlank(message = "任务规则名称不能缺少") + private String name; + + @NotEmpty(message = "不能传入空值") + @ApiModelProperty(value = "任务规则对象数组", required = true, example = "A0001") + private List list; + + @ApiModelProperty(value = "备注", example = "型号型号") + private String remark; + +// @ApiModelProperty(value = "任务规则状态", example = "名称名称") +// @NotBlank(message = "任务规则状态不能缺少") +// private Integer status; +} diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/LinesDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/LinesDao.java index d00574d..16e5a1b 100644 --- a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/LinesDao.java +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/LinesDao.java @@ -17,6 +17,8 @@ public interface LinesDao { Lines selectByPrimaryKey(Integer id); + Lines selectLineAndGt(Integer id); + int updateByPrimaryKeySelective(@Param("data") Lines record, @Param("updateat") Date update); int updateByPrimaryKey(Lines record); diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalScheduleDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalScheduleDao.java index 5322d9b..3ad3a2d 100644 --- a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalScheduleDao.java +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalScheduleDao.java @@ -1,8 +1,20 @@ package com.shxy.xymanager_dao.dao; +import com.shxy.xymanager_common.dto.ScheduleAndRuleDto; import com.shxy.xymanager_common.entity.TerminalSchedule; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; public interface TerminalScheduleDao { + + List selectAll(@Param("status") Integer status); + + ScheduleAndRuleDto selectSingle(@Param("id") Integer id, @Param("status") Integer status); + + int updateStatusById(@Param("list") List list, @Param("status") Integer status, @Param("updateat") Date update); + int deleteByPrimaryKey(Integer id); int insert(TerminalSchedule record); diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalScheduleRuleDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalScheduleRuleDao.java index 3a72e8e..61e342e 100644 --- a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalScheduleRuleDao.java +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalScheduleRuleDao.java @@ -10,13 +10,15 @@ public interface TerminalScheduleRuleDao { int insertSelective(TerminalScheduleRule record); - int insertList(@Param("list") List record, @Param("status") Integer status, @Param("createat") Date create, @Param("updateat") Date update); + int insertList(@Param("list") List record, @Param("createat") Date create, @Param("updateat") Date update); TerminalScheduleRule selectByPrimaryKey(Integer id); List selectAll(@Param("status") Integer status); - int deleteById(@Param("list") List record, @Param("status") Integer status,@Param("updateat") Date update); + + + int deleteById(@Param("scheduleid") Integer id); int updateByPrimaryKeySelective(@Param("data") TerminalScheduleRule record,@Param("updateat") Date update); diff --git a/xymanager_dao/src/main/resources/generatorConfig.xml b/xymanager_dao/src/main/resources/generatorConfig.xml index 4165c68..6d7baa8 100644 --- a/xymanager_dao/src/main/resources/generatorConfig.xml +++ b/xymanager_dao/src/main/resources/generatorConfig.xml @@ -112,7 +112,7 @@ - + @@ -120,7 +120,7 @@ - + diff --git a/xymanager_dao/src/main/resources/mappers/DyLevelDao.xml b/xymanager_dao/src/main/resources/mappers/DyLevelDao.xml index b7b330d..02a6099 100644 --- a/xymanager_dao/src/main/resources/mappers/DyLevelDao.xml +++ b/xymanager_dao/src/main/resources/mappers/DyLevelDao.xml @@ -62,10 +62,8 @@ y.equip_name as equip_name, y.display_name as display_name, y.model as model - from `lines` x, - terminals y, - dy_level z - where z.id = x.dy_level_id and x.id = y.line_id and x.status = #{status} and y.status = #{status} and z.status = #{status} + from ((dy_level z join `lines` x on z.id = x.dy_level_id and x.status = #{status} and z.status = #{status}) + join terminals y on x.id = y.line_id and y.status = #{status}) diff --git a/xymanager_dao/src/main/resources/mappers/TerminalChannelsDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalChannelsDao.xml index 042ab3d..93c9080 100644 --- a/xymanager_dao/src/main/resources/mappers/TerminalChannelsDao.xml +++ b/xymanager_dao/src/main/resources/mappers/TerminalChannelsDao.xml @@ -74,32 +74,6 @@ diff --git a/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml index a47fb8f..398ffe2 100644 --- a/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml +++ b/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml @@ -12,12 +12,11 @@ - id, term_id, channel_id, preset_id, width, height, file_size, photo_time, recv_time, - path, manual_request, create_time + path, create_time - select - - from terminal_schedule - where id = #{id,jdbcType=INTEGER} - - - delete from terminal_schedule - where id = #{id,jdbcType=INTEGER} - - + + + + + + insert into terminal_schedule (id, term_id, channel_id, hour, minute, preset_id, create_time, update_time) @@ -32,89 +73,74 @@ #{hour,jdbcType=TINYINT}, #{minute,jdbcType=TINYINT}, #{presetId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) - - insert into terminal_schedule - - - id, - - - term_id, - - - channel_id, - - - hour, - - - minute, - - - preset_id, - - - create_time, - - - update_time, - - - - - #{id,jdbcType=INTEGER}, - - - #{termId,jdbcType=INTEGER}, - - - #{channelId,jdbcType=TINYINT}, - - - #{hour,jdbcType=TINYINT}, - - - #{minute,jdbcType=TINYINT}, - - - #{presetId,jdbcType=INTEGER}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{updateTime,jdbcType=TIMESTAMP}, - - - - - update terminal_schedule - - - term_id = #{termId,jdbcType=INTEGER}, - - - channel_id = #{channelId,jdbcType=TINYINT}, - - - hour = #{hour,jdbcType=TINYINT}, - - - minute = #{minute,jdbcType=TINYINT}, - - - preset_id = #{presetId,jdbcType=INTEGER}, - - - create_time = #{createTime,jdbcType=TIMESTAMP}, - - - update_time = #{updateTime,jdbcType=TIMESTAMP}, - - - where id = #{id,jdbcType=INTEGER} - - + + + insert into terminal_schedule + + + name, + + + remark, + + + status, + + + create_time, + + + update_time, + + + + + #{name}, + + + #{remark}, + + + #{status}, + + + #{createTime}, + + + #{updateTime}, + + + + + + update terminal_schedule + set status = #{status}, + update_time = #{updateat} + where id in + + #{item.id} + + + + + update terminal_schedule + + + name = #{name}, + + + remark = #{remark}, + + + status = #{status}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + update terminal_schedule set term_id = #{termId,jdbcType=INTEGER}, channel_id = #{channelId,jdbcType=TINYINT}, diff --git a/xymanager_dao/src/main/resources/mappers/TerminalScheduleMapperDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalScheduleMapperDao.xml index 843b013..605c56d 100644 --- a/xymanager_dao/src/main/resources/mappers/TerminalScheduleMapperDao.xml +++ b/xymanager_dao/src/main/resources/mappers/TerminalScheduleMapperDao.xml @@ -15,14 +15,14 @@ @@ -30,7 +30,7 @@ - delete from terminal_schedulemapper + delete from terminal_schedule_mapper where term_id = #{item.termId} and channel_id = #{item.channelId} @@ -49,7 +49,7 @@ - insert into terminal_schedulemapper + insert into terminal_schedule_mapper (term_id,channel_id,schedule_id,create_time,update_time) VALUES @@ -59,7 +59,7 @@ - insert into terminal_schedulemapper (id, term_id, channel_id, + insert into terminal_schedule_mapper (id, term_id, channel_id, schedule_id, create_time, update_time ) values (#{id,jdbcType=INTEGER}, #{termId,jdbcType=INTEGER}, #{channelId,jdbcType=TINYINT}, @@ -67,7 +67,7 @@ ) - insert into terminal_schedulemapper + insert into terminal_schedule_mapper id, @@ -110,7 +110,7 @@ - update terminal_schedulemapper + update terminal_schedule_mapper term_id = #{termId,jdbcType=INTEGER}, @@ -131,7 +131,7 @@ where id = #{id,jdbcType=INTEGER} - update terminal_schedulemapper + update terminal_schedule_mapper set term_id = #{termId,jdbcType=INTEGER}, channel_id = #{channelId,jdbcType=TINYINT}, schedule_id = #{scheduleId,jdbcType=INTEGER}, diff --git a/xymanager_dao/src/main/resources/mappers/TerminalScheduleRuleDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalScheduleRuleDao.xml index 7d1681d..4f2d005 100644 --- a/xymanager_dao/src/main/resources/mappers/TerminalScheduleRuleDao.xml +++ b/xymanager_dao/src/main/resources/mappers/TerminalScheduleRuleDao.xml @@ -3,33 +3,31 @@ - + - - - id, name, start_time, end_time, span, remark, status,create_time, update_time + id, schedule_id, start_time, end_time, span, create_time, update_time - insert into terminal_schedulerule (id, name, start_time, + insert into terminal_schedule_rule (id, name, start_time, end_time, span, remark, create_time, update_time) values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{startTime,jdbcType=TIME}, @@ -38,17 +36,17 @@ - insert into terminal_schedulerule - (name,start_time,end_time,span,remark,status,create_time,update_time) + insert into terminal_schedule_rule + (schedule_id,start_time,end_time,span,create_time,update_time) VALUES - (#{item.name},#{item.startTime},#{item.endTime},#{item.span},#{item.remark},#{status},#{createat},#{updateat}) + (#{item.scheduleId},#{item.startTime},#{item.endTime},#{item.span},#{createat},#{updateat}) - insert into terminal_schedulerule + insert into terminal_schedule_rule id, @@ -103,18 +101,14 @@ - - update terminal_schedulerule - set status = #{status}, - update_time = #{updateat} - where id in - - #{item.id} - - + + + delete from terminal_schedule_rule + where schedule_id = #{scheduleid} + - update terminal_schedulerule + update terminal_schedule_rule name = #{data.name,jdbcType=VARCHAR}, @@ -138,7 +132,7 @@ where id = #{data.id,jdbcType=INTEGER} - update terminal_schedulerule + update terminal_schedule_rule set name = #{name,jdbcType=VARCHAR}, start_time = #{startTime,jdbcType=TIME}, end_time = #{endTime,jdbcType=TIME}, 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 54d383c..8e0a00d 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 @@ -13,10 +13,7 @@ import com.shxy.xymanager_common.exception.Asserts; import com.shxy.xymanager_common.model.LineListModel; import com.shxy.xymanager_common.model.TerminalPhotoListModel; import com.shxy.xymanager_common.page.PageUtils; -import com.shxy.xymanager_common.vo.LineIdVo; -import com.shxy.xymanager_common.vo.LineVo; -import com.shxy.xymanager_common.vo.PageVo; -import com.shxy.xymanager_common.vo.UpdateLineVo; +import com.shxy.xymanager_common.vo.*; import com.shxy.xymanager_dao.dao.LinesDao; import com.shxy.xymanager_service.service.LineService; import lombok.extern.slf4j.Slf4j; @@ -129,5 +126,22 @@ public class LineServiceImpl implements LineService { } } + /** + * 线路杆塔通道查询 + * + * @param vo + * @return + */ + @Override + public ServiceBody getLineAndGt(LineAndGtAndChannelVo vo) { +// Integer dyid = vo.getDyid(); +// Integer lineid = vo.getLineid(); +// Integer towerid = vo.getTowerid(); +// vo. +// linesDao.selectByPrimaryKey() + + 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 e43e60a..aea289f 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 @@ -64,7 +64,11 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService { DateTime enddateTime = MyDateUtils.endOfDay(time); BigInteger start = MyDateUtils.TimeMillSecond2Second(begindateTime); BigInteger end = MyDateUtils.TimeMillSecond2Second(enddateTime); - List list = terminalPhotoDao.selectPhotoList(vo.getTerminalid(), vo.getChannelid(), start, end); + boolean empty1 = CollectionUtil.isEmpty(vo.getChannelid()); + List list = new ArrayList<>(); + if (!empty1) { + list = terminalPhotoDao.selectPhotoList(vo.getTerminalid(), vo.getChannelid(), start, end); + } boolean empty = CollectionUtil.isEmpty(list); model.setTime(vo.getTime()); model.setNum(list.size()); @@ -77,7 +81,6 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService { photoBean.setChannelId(item.getChannelId()); photoBean.setFileSize(item.getFileSize()); photoBean.setHeight(item.getHeight()); - photoBean.setManualRequest(item.getManualRequest()); photoBean.setPath(photoaddress + item.getPath()); photoBean.setId(item.getId()); photoBean.setTermId(item.getTermId()); @@ -156,7 +159,6 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService { photoBean.setChannelId(item.getChannelId()); photoBean.setFileSize(item.getFileSize()); photoBean.setHeight(item.getHeight()); - photoBean.setManualRequest(item.getManualRequest()); photoBean.setPath(photoaddress + item.getPath()); photoBean.setId(item.getId()); photoBean.setTermId(item.getTermId()); 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 index 8caa383..446c020 100644 --- 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 @@ -8,6 +8,8 @@ import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateUtil; import com.github.pagehelper.PageInfo; import com.shxy.xymanager_common.bean.ServiceBody; +import com.shxy.xymanager_common.dto.ScheduleAndRuleDto; +import com.shxy.xymanager_common.entity.TerminalSchedule; import com.shxy.xymanager_common.entity.TerminalScheduleMapper; import com.shxy.xymanager_common.entity.TerminalScheduleRule; import com.shxy.xymanager_common.enums.CommonStatus; @@ -18,14 +20,17 @@ import com.shxy.xymanager_common.model.TerminalScheduleRuleTimeListModel; import com.shxy.xymanager_common.page.PageUtils; import com.shxy.xymanager_common.util.MyDateUtils; import com.shxy.xymanager_common.vo.*; +import com.shxy.xymanager_dao.dao.TerminalScheduleDao; import com.shxy.xymanager_dao.dao.TerminalScheduleMapperDao; import com.shxy.xymanager_dao.dao.TerminalScheduleRuleDao; import com.shxy.xymanager_service.service.TerminalScheduleRuleService; import lombok.extern.slf4j.Slf4j; +import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.validation.constraints.NotBlank; import java.sql.Time; import java.util.ArrayList; import java.util.Date; @@ -38,6 +43,9 @@ import java.util.List; @Slf4j public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleService { + @Autowired + TerminalScheduleDao terminalScheduleDao; + @Autowired TerminalScheduleRuleDao terminalScheduleRuleDao; @@ -55,12 +63,12 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ int pageindex = vo.getPageindex(); int pagesize = vo.getPagesize(); PageUtils.SetPage(pageindex, pagesize); - List list = terminalScheduleRuleDao.selectAll(CommonStatus.EFFECTIVE.value()); + List list = terminalScheduleDao.selectAll(CommonStatus.EFFECTIVE.value()); boolean empty = CollectionUtil.isEmpty(list); if (empty) { model.setList(new ArrayList<>()); } else { - List beans = BeanUtil.copyToList(list, TerminalScheduleRuleListModel.ScheduleRuleBean.class, CopyOptions.create().ignoreCase()); + List beans = BeanUtil.copyToList(list, TerminalScheduleRuleListModel.ScheduleBean.class, CopyOptions.create().ignoreCase()); model.setList(beans); } PageInfo pageData = PageUtils.getPageData(list); @@ -83,19 +91,13 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ * @return */ @Override - public ServiceBody getSingleScheduleRule(TerminalRuleIdVo vo) { - TerminalScheduleRule item = terminalScheduleRuleDao.selectByPrimaryKey(vo.getId()); - if (BeanUtil.isEmpty(item)) { + public ServiceBody getSingleScheduleRule(ScheduleIdVo vo) { + ScheduleAndRuleDto bean = terminalScheduleDao.selectSingle(vo.getId(), CommonStatus.EFFECTIVE.value()); + if (BeanUtil.isEmpty(bean)) { return Asserts.error("没有该对象"); } else { - TerminalScheduleRuleModel bean = new TerminalScheduleRuleModel(); - bean.setId(item.getId()); - bean.setName(item.getName()); - bean.setStartTime(item.getStartTime()); - bean.setEndTime(item.getEndTime()); - bean.setSpan(item.getSpan()); - bean.setRemark(item.getRemark()); - return Asserts.success(bean); + TerminalScheduleRuleModel model = BeanUtil.copyProperties(bean, TerminalScheduleRuleModel.class); + return Asserts.success(model); } } @@ -106,22 +108,32 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ * @return */ @Override - public ServiceBody addSchedulelRuleList(TerminalRuleListVo vo) { - ArrayList list = new ArrayList<>(); - for (TerminalRuleVo item : vo.getList()) { - TerminalScheduleRule bean = new TerminalScheduleRule(); - bean.setName(item.getName()); - bean.setStartTime(item.getStartTime()); - bean.setEndTime(item.getEndTime()); - bean.setSpan(item.getSpan()); - bean.setRemark(item.getRemark()); - bean.setStatus(CommonStatus.EFFECTIVE.value()); - list.add(bean); - } + @Transactional + public ServiceBody addSchedulelRuleList(ScheduleListVo vo) { Date date = new Date(); - int i = terminalScheduleRuleDao.insertList(list, CommonStatus.EFFECTIVE.value(), date, date); - if (i != 0) { - return Asserts.success("录入成功"); + TerminalSchedule terminalSchedule = new TerminalSchedule(); + terminalSchedule.setName(vo.getName()); + terminalSchedule.setRemark(vo.getRemark()); + terminalSchedule.setStatus(CommonStatus.EFFECTIVE.value()); + terminalSchedule.setCreateTime(date); + terminalSchedule.setUpdateTime(date); + int i1 = terminalScheduleDao.insertSelective(terminalSchedule); + if (i1 != 0) { + ArrayList list = new ArrayList<>(); + for (ScheduleRuleVo item : vo.getList()) { + TerminalScheduleRule rule = new TerminalScheduleRule(); + rule.setScheduleId(terminalSchedule.getId()); + rule.setStartTime(item.getStartTime()); + rule.setEndTime(item.getEndTime()); + rule.setSpan(item.getSpan()); + list.add(rule); + } + int i = terminalScheduleRuleDao.insertList(list, date, date); + if (i != 0) { + return Asserts.success("录入成功"); + } else { + return Asserts.error("录入失败"); + } } else { return Asserts.error("录入失败"); } @@ -134,16 +146,33 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ * @return */ @Override - public ServiceBody updateSchelduleRule(TerminalRuleVo vo) { - TerminalScheduleRule bean = new TerminalScheduleRule(); - bean.setId(vo.getId()); - bean.setName(vo.getName()); - bean.setStartTime(vo.getStartTime()); - bean.setEndTime(vo.getEndTime()); - bean.setSpan(vo.getSpan()); - bean.setRemark(vo.getRemark()); - bean.setStatus(CommonStatus.EFFECTIVE.value()); - int i = terminalScheduleRuleDao.updateByPrimaryKeySelective(bean, new Date()); + @Transactional + public ServiceBody updateSchelduleRule(UpdateScheduleListVo vo) { + Integer scheduleid = vo.getId(); + TerminalSchedule bean = terminalScheduleDao.selectByPrimaryKey(vo.getId()); + if (BeanUtil.isEmpty(bean)) { + return Asserts.error("没有需要修改任务规则"); + } + Date date = new Date(); + + TerminalSchedule schedule = new TerminalSchedule(); + schedule.setName(vo.getName()); + schedule.setRemark(vo.getRemark()); + schedule.setUpdateTime(date); + terminalScheduleDao.updateByPrimaryKeySelective(schedule); + + terminalScheduleRuleDao.deleteById(scheduleid); + + ArrayList list = new ArrayList<>(); + for (ScheduleRuleVo item : vo.getList()) { + TerminalScheduleRule rule = new TerminalScheduleRule(); + rule.setScheduleId(scheduleid); + rule.setStartTime(item.getStartTime()); + rule.setEndTime(item.getEndTime()); + rule.setSpan(item.getSpan()); + list.add(rule); + } + int i = terminalScheduleRuleDao.insertList(list, date, date); if (i != 0) { return Asserts.success("修改成功"); } else { @@ -159,9 +188,9 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ * @return */ @Override - public ServiceBody deleteSchelduleRule(TerminalRuleIdListVo vo) { - List list = BeanUtil.copyToList(vo.getList(), TerminalScheduleRule.class); - int i = terminalScheduleRuleDao.deleteById(list, CommonStatus.DELETE.value(), new Date()); + public ServiceBody deleteSchelduleRule(ScheduleIdListVo vo) { + List list = BeanUtil.copyToList(vo.getList(), TerminalSchedule.class); + int i = terminalScheduleDao.updateStatusById(list, CommonStatus.DELETE.value(), new Date()); if (i != 0) { return Asserts.success("删除成功"); } else { @@ -181,7 +210,7 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ ArrayList list = new ArrayList<>(); List termBeanList = vo.getList(); - Integer ruleid = vo.getRuleid(); + Integer scheduleid = vo.getScheduleid(); List mappers = terminalScheduleMapperDao.selectByTerminalBean(termBeanList); boolean empty = CollectionUtil.isEmpty(mappers); @@ -192,7 +221,7 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ for (Integer id : item.getChannelidlist()) { TerminalScheduleMapper record = new TerminalScheduleMapper(); record.setChannelId(id); - record.setScheduleId(ruleid); + record.setScheduleId(scheduleid); record.setTermId(item.getTermid()); list.add(record); } @@ -208,6 +237,7 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ /** * 获取通道的规则时间表 + * * @param vo * @return */ @@ -217,7 +247,7 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ TerminalScheduleMapper mapper = terminalScheduleMapperDao.selectByChannelId(vo.getChannelid(), vo.getTerminalid()); if (mapper == null) { model.setList(new ArrayList<>()); - }else { + } else { Integer scheduleId = mapper.getScheduleId(); TerminalScheduleRule bean = terminalScheduleRuleDao.selectByPrimaryKey(scheduleId); Time startTime = bean.getStartTime(); diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/LineService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/LineService.java index 8f1ebb0..c22eabc 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/LineService.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/LineService.java @@ -3,10 +3,7 @@ package com.shxy.xymanager_service.service; import com.shxy.xymanager_common.bean.ServiceBody; import com.shxy.xymanager_common.model.LineListModel; import com.shxy.xymanager_common.model.DyLineTreeListModel; -import com.shxy.xymanager_common.vo.LineIdVo; -import com.shxy.xymanager_common.vo.LineVo; -import com.shxy.xymanager_common.vo.PageVo; -import com.shxy.xymanager_common.vo.UpdateLineVo; +import com.shxy.xymanager_common.vo.*; /** * 线路接口 @@ -44,4 +41,12 @@ public interface LineService { * @return */ ServiceBody updateLine(UpdateLineVo vo); + + /** + * 线路杆塔通道查询 + * + * @param vo + * @return + */ + ServiceBody getLineAndGt(LineAndGtAndChannelVo 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 index 509f13f..262ff3d 100644 --- 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 @@ -25,14 +25,14 @@ public interface TerminalScheduleRuleService { * @param vo * @return */ - ServiceBody getSingleScheduleRule(TerminalRuleIdVo vo); + ServiceBody getSingleScheduleRule(ScheduleIdVo vo); /** * 添加任务规则接口 * * @return */ - ServiceBody addSchedulelRuleList(TerminalRuleListVo vo); + ServiceBody addSchedulelRuleList(ScheduleListVo vo); /** * 修改任务规则接口 @@ -40,7 +40,7 @@ public interface TerminalScheduleRuleService { * @param vo * @return */ - ServiceBody updateSchelduleRule(TerminalRuleVo vo); + ServiceBody updateSchelduleRule(UpdateScheduleListVo vo); /** * 删除任务规则接口 @@ -48,7 +48,7 @@ public interface TerminalScheduleRuleService { * @param vo * @return */ - ServiceBody deleteSchelduleRule(TerminalRuleIdListVo vo); + ServiceBody deleteSchelduleRule(ScheduleIdListVo vo); /** * 关联任务规则接口