Merge remote-tracking branch 'origin/master'
# Conflicts:
# ycl-server/src/main/java/com/ycl/platform/controller/CheckRuleController.java
# ycl-server/src/main/java/com/ycl/platform/controller/CheckTemplateController.java
# ycl-server/src/main/java/com/ycl/platform/mapper/CheckTemplateMapper.java
# ycl-server/src/main/java/com/ycl/platform/service/impl/CheckPublishServiceImpl.java
# ycl-server/src/main/java/com/ycl/platform/service/impl/CheckTemplateServiceImpl.java
72个文件已修改
26个文件已添加
1个文件已删除
| | |
| | | |
| | | /** |
| | | * 通用常量信息 |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public class Constants |
| | |
| | | /** |
| | | * 自动识别json对象白名单配置(仅允许解析的包名,范围越小越安全) |
| | | */ |
| | | public static final String[] JSON_WHITELIST_STR = { "org.springframework", "com.ruoyi" }; |
| | | public static final String[] JSON_WHITELIST_STR = { "org.springframework", "com.ycl" }; |
| | | |
| | | /** |
| | | * 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加) |
| | | */ |
| | | public static final String[] JOB_WHITELIST_STR = { "com.ruoyi" }; |
| | | public static final String[] JOB_WHITELIST_STR = { "com.ycl" }; |
| | | |
| | | /** |
| | | * 定时任务违规的字符 |
| | | */ |
| | | public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml", |
| | | "org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config" }; |
| | | "org.springframework", "org.apache", "com.ycl.common.utils.file", "com.ycl.common.config" }; |
| | | } |
| New file |
| | |
| | | package enumeration.general; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.EnumValue; |
| | | import com.fasterxml.jackson.annotation.JsonValue; |
| | | |
| | | /** |
| | | * 三大板块 |
| | | * |
| | | * @author:xp |
| | | * @date:2024/4/12 10:21 |
| | | */ |
| | | public enum BusinessTypeEnum { |
| | | VIDEO("video", "视频"), |
| | | CAR("car", "车辆"), |
| | | FACE("face", "人脸"); |
| | | |
| | | @EnumValue // 标明该字段存入数据库 |
| | | @JsonValue // 标明在转JSON时使用该字段 |
| | | private final String code; |
| | | |
| | | private final String desc; |
| | | |
| | | BusinessTypeEnum(String code, String desc) { |
| | | this.code = code; |
| | | this.desc = desc; |
| | | } |
| | | } |
| New file |
| | |
| | | package enumeration.general; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.EnumValue; |
| | | import com.fasterxml.jackson.annotation.JsonValue; |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * 通知状态 |
| | | * |
| | | * @author:gonghl |
| | | * @date:2024/4/15 15:15 |
| | | */ |
| | | @Getter |
| | | public enum NotifyTypeEnum { |
| | | |
| | | WORK_ORDER("WORK_ORDER", "工单"), |
| | | CHECK("CHECK", "考核"), |
| | | ; |
| | | |
| | | |
| | | @EnumValue // 标明该字段存入数据库 |
| | | @JsonValue // 标明在转JSON时使用该字段,即响应时 |
| | | private final String value; |
| | | |
| | | private final String desc; |
| | | |
| | | NotifyTypeEnum(String value, String desc) { |
| | | this.value = value; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package enumeration.general; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.EnumValue; |
| | | import com.fasterxml.jackson.annotation.JsonValue; |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * 工单下发方式 |
| | | * |
| | | * @author:gonghl |
| | | * @date:2024/4/18 |
| | | */ |
| | | @Getter |
| | | public enum WorkOrderDistributeWayEnum { |
| | | |
| | | SELECTED_DISTRIBUTE("SELECTED_DISTRIBUTE", "选择下发"), |
| | | ALL_DISTRIBUTE("ALL_DISTRIBUTE", "全部下发"), |
| | | FAST_DISTRIBUTE("FAST_DISTRIBUTE", "快捷下发"), |
| | | ; |
| | | |
| | | |
| | | @EnumValue // 标明该字段存入数据库 |
| | | @JsonValue // 标明在转JSON时使用该字段,即响应时 |
| | | private final String value; |
| | | |
| | | private final String desc; |
| | | |
| | | WorkOrderDistributeWayEnum(String value, String desc) { |
| | | this.value = value; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | WAIT_DISTRIBUTE("WAIT_DISTRIBUTE", "等待下发"), |
| | | DISTRIBUTED("DISTRIBUTED", "已下发"), |
| | | YW_HANDLE("YW_HANDLE", "运维已处理"), |
| | | AUDITING("AUDITING", "审核中"), |
| | | AUDITING_SUCCESS("AUDITING_SUCCESS", "审核通过"), |
| | | AUDITING_FAIL("AUDITING_FAIL", "审核不通过"), |
| | | FINISH("FINISH", "已完成"), |
| | | ; |
| | | |
| New file |
| | |
| | | package com.ycl.platform.domain.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 请求到得车辆数据,用于判断满足工单阈值 |
| | | * |
| | | * @author:xp |
| | | * @date:2024/4/15 11:05 |
| | | */ |
| | | @Data |
| | | public class CarDTO { |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 请求到得人脸数据,用于判断满足工单阈值 |
| | | * |
| | | * @author:xp |
| | | * @date:2024/4/15 11:05 |
| | | */ |
| | | @Data |
| | | public class FaceDTO { |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 请求到得视频数据,用于判断满足工单阈值 |
| | | * |
| | | * @author:xp |
| | | * @date:2024/4/15 11:05 |
| | | */ |
| | | @Data |
| | | public class VideoDTO { |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ycl.platform.base.AbsEntity; |
| | | import enumeration.general.NotifyTypeEnum; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 通知 |
| | | * |
| | | * @author xp |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("t_notify") |
| | | @ApiModel(value = "Notify对象", description = "通知") |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class Notify extends AbsEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("通知类型") |
| | | @TableField("notify_type") |
| | | private NotifyTypeEnum notifyType; |
| | | |
| | | @ApiModelProperty("通知内容") |
| | | @TableField("content") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("通知谁") |
| | | @TableField("notify_who") |
| | | private Integer notifyWho; |
| | | |
| | | @ApiModelProperty("已读") |
| | | @TableField("readed") |
| | | private String readed; |
| | | |
| | | @ApiModelProperty("紧急") |
| | | @TableField("urgent") |
| | | private String urgent; |
| | | |
| | | @ApiModelProperty("工单ID") |
| | | @TableField("work_order_id") |
| | | private Integer workOrderId; |
| | | |
| | | } |
| | |
| | | @TableField("error_type") |
| | | private String errorType; |
| | | |
| | | @ApiModelProperty("点位") |
| | | @TableField("point_id") |
| | | private Integer pointId; |
| | | |
| | | @ApiModelProperty("工单来源") |
| | | @TableField("source") |
| | | private String source; |
| | |
| | | @TableField("yw_condition") |
| | | private String ywCondition; |
| | | |
| | | @ApiModelProperty("运维检测结果") |
| | | @TableField("yw_check_result") |
| | | private String ywCheckResult; |
| | | @ApiModelProperty("处理期限") |
| | | @TableField("processing_period") |
| | | private Integer processingPeriod; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ycl.platform.base.AbsEntity; |
| | | import enumeration.general.WorkOrderDistributeWayEnum; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 工单下发记录 |
| | | * |
| | | * @author gonghl |
| | | * @since 2024-04-17 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("t_work_order_distribute_record") |
| | | @ApiModel(value = "WorkOrderAuditingRecord对象", description = "工单下发记录") |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class WorkOrderDistributeRecord extends AbsEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("工单ID") |
| | | @TableField("work_order_id") |
| | | private Integer workOrderId; |
| | | |
| | | @ApiModelProperty("下发人") |
| | | @TableField("user_id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("下发方式") |
| | | @TableField("distribute_way") |
| | | private WorkOrderDistributeWayEnum distributeWay; |
| | | |
| | | } |
| | |
| | | @TableField("yw_condition") |
| | | private String ywCondition; |
| | | |
| | | @ApiModelProperty("佐证材料") |
| | | @TableField("yw_proofMaterials") |
| | | private String ywProofMaterials; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | import annotation.Excel; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ycl.system.entity.BaseEntity; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import enumeration.general.BusinessTypeEnum; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * 运维阈值对象 t_yw_threshold |
| | |
| | | * @author gonghl |
| | | * @date 2024-03-25 |
| | | */ |
| | | @Data |
| | | @TableName("t_yw_threshold") |
| | | public class YwThreshold extends BaseEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 设备类型:1人脸 2车辆 3视频 |
| | | */ |
| | | @Excel(name = "设备类型:1人脸 2车辆 3视频") |
| | | private String monitorType; |
| | | @Excel(name = "设备类型") |
| | | @TableField("monitor_type") |
| | | private BusinessTypeEnum monitorType; |
| | | |
| | | /*---------------------------- 视频字段 ----------------------------------------------*/ |
| | | /** |
| | | * 视频质量工单阈值 |
| | | */ |
| | | @Excel(name = "视频质量工单阈值") |
| | | @TableField("video_quality") |
| | | private String videoQuality; |
| | | |
| | | /** |
| | | * 超时天数 |
| | | * 视频质量工单阈值 |
| | | */ |
| | | @Excel(name = "超时天数") |
| | | private Integer timeout; |
| | | @Excel(name = "视频质量下发阈值") |
| | | @TableField("video_quality_auto") |
| | | private String videoQualityAuto; |
| | | |
| | | /** |
| | | * 指标json |
| | | * 图像质量工单阈值 |
| | | */ |
| | | @Excel(name = "指标json") |
| | | private String indicator; |
| | | @Excel(name = "图像质量工单阈值") |
| | | @TableField("image_quality") |
| | | private String imageQuality; |
| | | |
| | | /** |
| | | * 图像质量下发阈值 |
| | | */ |
| | | @Excel(name = "图像质量下发阈值") |
| | | @TableField("image_quality_auto") |
| | | private String imageQualityAuto; |
| | | |
| | | /** |
| | | * 标注准确率工单阈值 |
| | | */ |
| | | @Excel(name = "标注准确率工单阈值") |
| | | @TableField("annotation_accuracy") |
| | | private BigDecimal annotationAccuracy; |
| | | |
| | | /** |
| | | * 标注准确率下发阈值 |
| | | */ |
| | | @Excel(name = "标注准确率下发阈值") |
| | | @TableField("annotation_accuracy_auto") |
| | | private BigDecimal annotationAccuracyAuto; |
| | | |
| | | |
| | | /*---------------------------- 人脸字段 ----------------------------------------------*/ |
| | | |
| | | |
| | | |
| | | /*---------------------------- 车辆字段 ----------------------------------------------*/ |
| | | |
| | | /** |
| | | * 逻辑删除:0未删除 1删除 |
| | | */ |
| | | @TableField("deleted") |
| | | private String deleted; |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setMonitorType(String monitorType) { |
| | | this.monitorType = monitorType; |
| | | } |
| | | |
| | | public String getMonitorType() { |
| | | return monitorType; |
| | | } |
| | | |
| | | public void setTimeout(Integer timeout) { |
| | | this.timeout = timeout; |
| | | } |
| | | |
| | | public Integer getTimeout() { |
| | | return timeout; |
| | | } |
| | | |
| | | public void setIndicator(String indicator) { |
| | | this.indicator = indicator; |
| | | } |
| | | |
| | | public String getIndicator() { |
| | | return indicator; |
| | | } |
| | | |
| | | public void setDeleted(String deleted) { |
| | | this.deleted = deleted; |
| | | } |
| | | |
| | | public String getDeleted() { |
| | | return deleted; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("monitorType", getMonitorType()) |
| | | .append("timeout", getTimeout()) |
| | | .append("indicator", getIndicator()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("deleted", getDeleted()) |
| | | .toString(); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.form; |
| | | |
| | | import com.ycl.platform.base.AbsForm; |
| | | import enumeration.general.BusinessTypeEnum; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 车辆工单阈值 |
| | | * |
| | | * @author:xp |
| | | * @date:2024/4/12 10:30 |
| | | */ |
| | | @Data |
| | | public class CarThresholdForm implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "id,修改必传", required = false) |
| | | @NotBlank(message = "请选择修改数据") |
| | | private String id; |
| | | |
| | | @NotBlank(message = "请选择设备类型") |
| | | private BusinessTypeEnum monitorType; |
| | | |
| | | @NotNull(message = "请输入超时天数") |
| | | private Integer timeout; |
| | | |
| | | /** 过车辆 */ |
| | | @NotBlank(message = "请填写过车数据量") |
| | | private String passCarNum; |
| | | |
| | | /** 过车缺失率 */ |
| | | @NotBlank(message = "请填写过车缺失率") |
| | | private String passCarMissRate; |
| | | |
| | | /** 有效过车数据量 */ |
| | | @NotBlank(message = "请填写有效过车数据量") |
| | | private String passCarEffectiveNum; |
| | | |
| | | /** 抽检量 */ |
| | | @NotBlank(message = "请填写抽检量") |
| | | private String samplingInspectionNum; |
| | | |
| | | /** 设备活跃率 */ |
| | | @NotBlank(message = "请填写设备活跃率") |
| | | private String deviceActiveRate; |
| | | |
| | | /** 抓拍及时率 */ |
| | | @NotBlank(message = "请填写抓拍及时率") |
| | | private String timelyCapture; |
| | | |
| | | /** 时钟不准确率 */ |
| | | @NotBlank(message = "请填写时钟不准确率") |
| | | private String timeNotAccuracy; |
| | | |
| | | /** 时钟准确率 */ |
| | | @NotBlank(message = "请填写时钟准确率") |
| | | private String timeAccuracy; |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.form; |
| | | |
| | | import com.ycl.platform.base.AbsForm; |
| | | import enumeration.general.BusinessTypeEnum; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 人脸工单阈值 |
| | | * |
| | | * @author:xp |
| | | * @date:2024/4/12 10:30 |
| | | */ |
| | | @Data |
| | | public class FaceThresholdForm implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "id,修改必传", required = false) |
| | | @NotBlank(message = "请选择修改数据") |
| | | private String id; |
| | | |
| | | @NotBlank(message = "请选择设备类型") |
| | | private BusinessTypeEnum monitorType; |
| | | |
| | | @NotNull(message = "请输入超时天数") |
| | | private Integer timeout; |
| | | |
| | | /** 抓拍量 */ |
| | | @NotBlank(message = "请填写抓拍量") |
| | | private String captureNum; |
| | | |
| | | /** 及时率 */ |
| | | @NotBlank(message = "请填写及时率") |
| | | private String timelyRate; |
| | | |
| | | /** 延迟量 */ |
| | | @NotBlank(message = "请填写延迟量") |
| | | private String delayAmount; |
| | | |
| | | /** 抽检量 */ |
| | | @NotBlank(message = "请填写抽检量") |
| | | private String samplingInspectionNum; |
| | | |
| | | /** 设备活跃率 */ |
| | | @NotBlank(message = "请填写设备活跃率") |
| | | private String deviceActiveRate; |
| | | |
| | | /** 抓拍及时率 */ |
| | | @NotBlank(message = "请填写抓拍及时率") |
| | | private String timelyCapture; |
| | | |
| | | /** 时钟不准确率 */ |
| | | @NotBlank(message = "请填写时钟不准确率") |
| | | private String timeNotAccuracy; |
| | | |
| | | /** 时钟准确率 */ |
| | | @NotBlank(message = "请填写时钟准确率") |
| | | private String timeAccuracy; |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.form; |
| | | |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.system.domain.group.Add; |
| | | import com.ycl.platform.base.AbsForm; |
| | | import com.ycl.platform.domain.entity.Notify; |
| | | import java.time.LocalDateTime; |
| | | import org.springframework.beans.BeanUtils; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import org.springframework.lang.NonNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 通知表单 |
| | | * |
| | | * @author xp |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "Notify表单", description = "通知表单") |
| | | public class NotifyForm extends AbsForm { |
| | | |
| | | @NotBlank(message = "通知类型不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("通知类型") |
| | | private String notifyType; |
| | | |
| | | @NotBlank(message = "通知内容不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("通知内容") |
| | | private String content; |
| | | |
| | | @NotNull(message = "通知谁不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("通知谁") |
| | | private Integer notifyWho; |
| | | |
| | | @NotBlank(message = "已读不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("已读") |
| | | private String readed; |
| | | |
| | | @NotBlank(message = "紧急不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("紧急") |
| | | private String urgent; |
| | | |
| | | @NotNull(message = "工单ID不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("工单ID") |
| | | private Integer workOrderId; |
| | | |
| | | public static Notify getEntityByForm(@NonNull NotifyForm form, Notify entity) { |
| | | if(entity == null) { |
| | | entity = new Notify(); |
| | | } |
| | | BeanUtils.copyProperties(form, entity); |
| | | return entity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.form; |
| | | |
| | | import com.ycl.platform.base.AbsForm; |
| | | import com.ycl.system.domain.group.Update; |
| | | import enumeration.general.BusinessTypeEnum; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * 视频工单阈值 |
| | | * |
| | | * @author:xp |
| | | * @date:2024/4/12 10:30 |
| | | */ |
| | | @Data |
| | | public class VideoThresholdForm implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "id,修改必传", required = false) |
| | | @NotBlank(message = "请选择修改数据") |
| | | private String id; |
| | | |
| | | @NotBlank(message = "请选择设备类型") |
| | | private BusinessTypeEnum monitorType; |
| | | |
| | | /** 视频质量 */ |
| | | @NotBlank(message = "请选择视频质量工单阈值") |
| | | private String videoQuality; |
| | | @NotBlank(message = "请选择视频质量下发阈值") |
| | | private String videoQualityAuto; |
| | | |
| | | /** 图像质量 */ |
| | | @NotBlank(message = "请选择图像质量工单阈值") |
| | | private String imageQuality; |
| | | @NotBlank(message = "请选择图像质量下发阈值") |
| | | private String imageQualityAuto; |
| | | |
| | | /** 标注准确率 */ |
| | | @NotBlank(message = "请填写标注准确率工单阈值") |
| | | private BigDecimal annotationAccuracy; |
| | | @NotBlank(message = "请填写标注准确率下发阈值") |
| | | private BigDecimal annotationAccuracyAuto; |
| | | |
| | | } |
| | |
| | | package com.ycl.platform.domain.form; |
| | | |
| | | import com.ycl.platform.base.AbsForm; |
| | | import enumeration.general.WorkOrderStatusEnum; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import lombok.Data; |
| | | |
| | |
| | | * 审核结果 |
| | | */ |
| | | @NotBlank(message = "审核结果不能为空") |
| | | private String auditingResult; |
| | | private WorkOrderStatusEnum auditingResult; |
| | | |
| | | /** |
| | | * 审核说明 |
| | |
| | | @ApiModelProperty("工单来源") |
| | | private String source; |
| | | |
| | | @NotNull(message = "点位不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("点位") |
| | | private Integer pointId; |
| | | |
| | | @NotNull(message = "故障类型不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("故障类型") |
| | | private String errorType; |
| | |
| | | package com.ycl.platform.domain.form; |
| | | |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 工单ID |
| | | */ |
| | | private Integer id; |
| | | @NotBlank |
| | | private String id; |
| | | |
| | | |
| | | /** |
| | | * 运维情况 |
| | | */ |
| | | @NotBlank |
| | | private String ywCondition; |
| | | |
| | | /** |
| | | * 佐证材料 |
| | | */ |
| | | private String ywProofMaterials; |
| | | |
| | | } |
| | |
| | | package com.ycl.platform.domain.query; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import com.ycl.platform.base.AbsQuery; |
| | | import enumeration.general.FastDistributeTypeEnum; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 下发工单查询 |
| | |
| | | /** |
| | | * 运维单位 |
| | | */ |
| | | @JsonProperty("unitId") |
| | | private Integer unitId; |
| | | |
| | | /** |
| | | * 工单id |
| | | */ |
| | | @JsonProperty("ids") |
| | | private List<Integer> ids; |
| | | |
| | | } |
| | | |
| New file |
| | |
| | | package com.ycl.platform.domain.query; |
| | | |
| | | import com.ycl.platform.base.AbsQuery; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 通知查询 |
| | | * |
| | | * @author xp |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "Notify查询", description = "通知查询") |
| | | public class NotifyQuery extends AbsQuery { |
| | | } |
| | | |
| | |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ycl.platform.base.AbsQuery; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import enumeration.general.WorkOrderStatusEnum; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 工单查询 |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date end; |
| | | |
| | | /** |
| | | * 故障类型 |
| | | */ |
| | | private String errorType; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | private WorkOrderStatusEnum status; |
| | | } |
| | | |
| | |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.util.Date; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * 下发工单查询 |
| | |
| | | /** |
| | | * 快速下发方式 |
| | | */ |
| | | // @NotNull(message = "请选择快捷下发方式") |
| | | @NotNull(message = "请选择快捷下发方式") |
| | | private FastDistributeTypeEnum fastWay; |
| | | |
| | | /** |
| | | * 快速下发工单数量 |
| | | */ |
| | | @Min(value = 0, message = "下发最大数量应该大于1") |
| | | @Min(value = 1, message = "下发最大数量应该大于0") |
| | | private Integer fastNumLimit; |
| | | |
| | | /** |
| | | * 时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date start; |
| | | private LocalDateTime start; |
| | | |
| | | /** |
| | | * 时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date end; |
| | | private LocalDateTime end; |
| | | |
| | | @NotNull(message = "请选择故障类型") |
| | | private String errorType; |
| | | |
| | | } |
| | | |
| New file |
| | |
| | | package com.ycl.platform.domain.vo; |
| | | |
| | | import com.ycl.platform.base.AbsVo; |
| | | import com.ycl.platform.domain.entity.Notify; |
| | | import java.util.List; |
| | | import java.time.LocalDateTime; |
| | | import org.springframework.lang.NonNull; |
| | | import org.springframework.beans.BeanUtils; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 通知展示 |
| | | * |
| | | * @author xp |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | public class NotifyVO extends AbsVo { |
| | | |
| | | /** 通知类型 */ |
| | | private String notifyType; |
| | | |
| | | /** 通知内容 */ |
| | | private String content; |
| | | |
| | | /** 通知谁 */ |
| | | private Integer notifyWho; |
| | | |
| | | /** 已读 */ |
| | | private String readed; |
| | | |
| | | /** 紧急 */ |
| | | private String urgent; |
| | | |
| | | /** 工单ID */ |
| | | private Integer workOrderId; |
| | | |
| | | public static NotifyVO getVoByEntity(@NonNull Notify entity, NotifyVO vo) { |
| | | if(vo == null) { |
| | | vo = new NotifyVO(); |
| | | } |
| | | BeanUtils.copyProperties(entity, vo); |
| | | return vo; |
| | | } |
| | | |
| | | } |
| | |
| | | /** 工单来源 */ |
| | | private String source; |
| | | |
| | | /** |
| | | * 点位 |
| | | */ |
| | | private Integer pointId; |
| | | |
| | | /** 故障类型 */ |
| | | private String errorType; |
| | | |
| | |
| | | @Excel(name = "备注") |
| | | private String remark; |
| | | |
| | | private Integer workOrderCount; |
| | | |
| | | public static YwUnitVO getVoByEntity(@NonNull YwUnit entity, YwUnitVO vo) { |
| | | if(vo == null) { |
| | | vo = new YwUnitVO(); |
| | |
| | | |
| | | /** |
| | | * Entity基类 |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public class BaseEntity implements Serializable |
| | |
| | | |
| | | /** 搜索值 */ |
| | | @JsonIgnore |
| | | @TableField(exist = false) |
| | | private String searchValue; |
| | | |
| | | /** 创建者 */ |
| | | @TableField(exist = false) |
| | | private String createBy; |
| | | |
| | | /** 创建时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(exist = false) |
| | | private Date createTime; |
| | | |
| | | /** 更新者 */ |
| | |
| | | log.info("(♥◠‿◠)ノ゙ 自贡运维平台启动成功 ლ(´ڡ`ლ)゙"); |
| | | try { |
| | | WebsocketServer.runWebsocket(); |
| | | log.info("websocket启动成功"); |
| | | |
| | | } catch (Exception e) { |
| | | log.info("websocket启动失败"); |
| | | } |
| | |
| | | /** |
| | | * 查询核算规则列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('calculate:rule:list')") |
| | | @PreAuthorize("@ss.hasPermi('calculate:rule:list')") |
| | | @GetMapping("/list") |
| | | public AjaxResult list(CalculateRule calculateRule) |
| | | { |
| | |
| | | /** |
| | | * 获取核算规则详细信息 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('calculate:rule:query')") |
| | | @PreAuthorize("@ss.hasPermi('calculate:rule:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | |
| | | /** |
| | | * 查询考核结果列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:result:list')") |
| | | @PreAuthorize("@ss.hasPermi('system:result:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(CheckResult checkResult) |
| | | { |
| | |
| | | /** |
| | | * 获取考核结果详细信息 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:result:query')") |
| | | @PreAuthorize("@ss.hasPermi('system:result:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | |
| | | |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.system.domain.group.Add; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | |
| | | |
| | | @PostMapping |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | @PreAuthorize("@ss.hasPermi('system:region:add')") |
| | | public Result add(@RequestBody @Validated(Add.class) RegionForm form) { |
| | | return regionService.add(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | @PreAuthorize("@ss.hasPermi('system:region:edit')") |
| | | public Result update(@RequestBody @Validated(Update.class) RegionForm form) { |
| | | return regionService.update(form); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "ID删除", notes = "ID删除") |
| | | @PreAuthorize("@ss.hasPermi('system:region:remove')") |
| | | public Result removeById(@PathVariable("id") String id) { |
| | | return regionService.removeById(id); |
| | | } |
| | | |
| | | @DeleteMapping("/batch") |
| | | @ApiOperation(value = "批量删除", notes = "批量删除") |
| | | @PreAuthorize("@ss.hasPermi('system:region:remove')") |
| | | public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) { |
| | | return regionService.remove(ids); |
| | | } |
| | | |
| | | @PostMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | @PreAuthorize("@ss.hasPermi('system:region:page')") |
| | | public Result page(@RequestBody RegionQuery query) { |
| | | return regionService.page(query); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | @PreAuthorize("@ss.hasPermi('system:region:query')") |
| | | public Result detail(@PathVariable("id") String id) { |
| | | return regionService.detail(id); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | | @PreAuthorize("@ss.hasPermi('system:region:list')") |
| | | public Result list() { |
| | | return regionService.all(); |
| | | } |
| | |
| | | import com.ycl.system.domain.group.Add; |
| | | import com.ycl.utils.poi.ExcelUtil; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | |
| | | |
| | | @PostMapping |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | @PreAuthorize("@ss.hasPermi('system:report:add')") |
| | | public Result add(@RequestBody @Validated(Add.class) ReportForm form) { |
| | | return reportService.add(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | @PreAuthorize("@ss.hasPermi('system:report:edit')") |
| | | public Result update(@RequestBody @Validated(Update.class) ReportForm form) { |
| | | return reportService.update(form); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "ID删除", notes = "ID删除") |
| | | @PreAuthorize("@ss.hasPermi('system:report:remove')") |
| | | public Result removeById(@PathVariable("id") String id) { |
| | | return reportService.removeById(id); |
| | | } |
| | | |
| | | @DeleteMapping("/batch") |
| | | @ApiOperation(value = "批量删除", notes = "批量删除") |
| | | @PreAuthorize("@ss.hasPermi('system:report:remove')") |
| | | public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) { |
| | | return reportService.remove(ids); |
| | | } |
| | | |
| | | @PostMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | @PreAuthorize("@ss.hasPermi('system:report:page')") |
| | | public Result page(@RequestBody ReportQuery query) { |
| | | return reportService.page(query); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | @PreAuthorize("@ss.hasPermi('system:report:query')") |
| | | public Result detail(@PathVariable("id") String id) { |
| | | return reportService.detail(id); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | | @PreAuthorize("@ss.hasPermi('system:report:list')") |
| | | public Result list() { |
| | | return reportService.all(); |
| | | } |
| | | |
| | | @PostMapping("/export") |
| | | @ApiOperation(value = "导出", notes = "导出") |
| | | @PreAuthorize("@ss.hasPermi('system:report:export')") |
| | | public void export(HttpServletResponse response, ReportQuery query) |
| | | { |
| | | List<ReportVO> list = reportService.export(query); |
| | |
| | | /** |
| | | * 查询【请填写功能名称】列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:contract:list')") |
| | | @PreAuthorize("@ss.hasPermi('system:contract:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(TContract tContract) |
| | | { |
| | |
| | | /** |
| | | * 导出【请填写功能名称】列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:contract:export')") |
| | | @PreAuthorize("@ss.hasPermi('system:contract:export')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, TContract tContract) |
| | |
| | | /** |
| | | * 获取【请填写功能名称】详细信息 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:contract:query')") |
| | | @PreAuthorize("@ss.hasPermi('system:contract:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | |
| | | /** |
| | | * 新增【请填写功能名称】 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:contract:add')") |
| | | @PreAuthorize("@ss.hasPermi('system:contract:add')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody TContract tContract) |
| | |
| | | /** |
| | | * 修改【请填写功能名称】 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:contract:edit')") |
| | | @PreAuthorize("@ss.hasPermi('system:contract:edit')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody TContract tContract) |
| | |
| | | /** |
| | | * 删除【请填写功能名称】 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:contract:remove')") |
| | | @PreAuthorize("@ss.hasPermi('system:contract:remove')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | |
| | | import enumeration.BusinessType; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | |
| | | /** |
| | | * 查询设备资产列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:monitor:list')") |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(TMonitor tMonitor) |
| | | { |
| | |
| | | /** |
| | | * 导出设备资产列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:monitor:export')") |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:export')") |
| | | @Log(title = "设备资产", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, TMonitor tMonitor) |
| | |
| | | /** |
| | | * 获取设备资产详细信息 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:monitor:query')") |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | |
| | | /** |
| | | * 新增设备资产 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:monitor:add')") |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:add')") |
| | | @Log(title = "设备资产", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody TMonitor tMonitor) |
| | |
| | | /** |
| | | * 修改设备资产 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:monitor:edit')") |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:edit')") |
| | | @Log(title = "设备资产", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody TMonitor tMonitor) |
| | |
| | | /** |
| | | * 删除设备资产 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:monitor:remove')") |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:remove')") |
| | | @Log(title = "设备资产", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | |
| | | /** |
| | | * 获取视频设备统计数 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:list')") |
| | | @GetMapping("/getVideoCount/{cameraFunType}") |
| | | public AjaxResult getVideoCount(@PathVariable String cameraFunType) |
| | | { |
| | |
| | | /** |
| | | * 获取异常恢复视频设备统计数 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:list')") |
| | | @GetMapping("/recoveryException") |
| | | public AjaxResult recoveryException() |
| | | { |
| | |
| | | /** |
| | | * 查询设备资产列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:video:list')") |
| | | @PreAuthorize("@ss.hasPermi('system:video:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(TMonitorVideo tMonitorVideo) |
| | | { |
| | |
| | | /** |
| | | * 导出设备资产列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:video:export')") |
| | | @PreAuthorize("@ss.hasPermi('system:video:export')") |
| | | @Log(title = "设备资产", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, TMonitorVideo tMonitorVideo) |
| | |
| | | /** |
| | | * 获取设备资产详细信息 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:video:query')") |
| | | @PreAuthorize("@ss.hasPermi('system:video:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | |
| | | /** |
| | | * 新增设备资产 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:video:add')") |
| | | @PreAuthorize("@ss.hasPermi('system:video:add')") |
| | | @Log(title = "设备资产", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody TMonitorVideo tMonitorVideo) |
| | |
| | | /** |
| | | * 修改设备资产 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:video:edit')") |
| | | @PreAuthorize("@ss.hasPermi('system:video:edit')") |
| | | @Log(title = "设备资产", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody TMonitorVideo tMonitorVideo) |
| | |
| | | /** |
| | | * 删除设备资产 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:video:remove')") |
| | | @PreAuthorize("@ss.hasPermi('system:video:remove')") |
| | | @Log(title = "设备资产", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | |
| | | import enumeration.BusinessType; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | |
| | | /** |
| | | * 查询平台运行监控列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('platform:platform:list')") |
| | | @PreAuthorize("@ss.hasPermi('platform:platform:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(TPlatform tPlatform) { |
| | | startPage(); |
| | |
| | | /** |
| | | * 导出平台运行监控列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('platform:platform:export')") |
| | | @PreAuthorize("@ss.hasPermi('platform:platform:export')") |
| | | @Log(title = "平台运行监控", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, TPlatform tPlatform) { |
| | |
| | | /** |
| | | * 获取平台运行监控详细信息 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('platform:platform:query')") |
| | | @PreAuthorize("@ss.hasPermi('platform:platform:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(tPlatformService.selectTPlatformById(id)); |
| | |
| | | /** |
| | | * 新增平台运行监控 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('platform:platform:add')") |
| | | @PreAuthorize("@ss.hasPermi('platform:platform:add')") |
| | | @Log(title = "平台运行监控", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody TPlatform tPlatform) { |
| | |
| | | /** |
| | | * 修改平台运行监控 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('platform:platform:edit')") |
| | | @PreAuthorize("@ss.hasPermi('platform:platform:edit')") |
| | | @Log(title = "平台运行监控", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody TPlatform tPlatform) { |
| | |
| | | /** |
| | | * 删除平台运行监控 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('platform:platform:remove')") |
| | | @PreAuthorize("@ss.hasPermi('platform:platform:remove')") |
| | | @Log(title = "平台运行监控", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | |
| | | /** |
| | | * 查询卡口过车数据一致性列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('platform:platform:list')") |
| | | @PreAuthorize("@ss.hasPermi('platform:platform:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(VehicleDataMonitor vehicleDataMonitor) { |
| | | startPage(); |
| | |
| | | /** |
| | | * 获取卡口过车数据一致性详细信息 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('platform:platform:query')") |
| | | @PreAuthorize("@ss.hasPermi('platform:platform:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Integer id) { |
| | | return success(vehicleDataMonitorService.selectVehicleDataMonitorById(id)); |
| | |
| | | /** |
| | | * 新增卡口过车数据一致性 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('platform:platform:add')") |
| | | @PreAuthorize("@ss.hasPermi('platform:platform:add')") |
| | | @Log(title = "卡口过车数据一致性", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody VehicleDataMonitor vehicleDataMonitor) { |
| | |
| | | /** |
| | | * 修改卡口过车数据一致性 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('platform:platform:edit')") |
| | | @PreAuthorize("@ss.hasPermi('platform:platform:edit')") |
| | | @Log(title = "卡口过车数据一致性", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody VehicleDataMonitor vehicleDataMonitor) { |
| | |
| | | /** |
| | | * 删除卡口过车数据一致性 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('platform:platform:remove')") |
| | | @PreAuthorize("@ss.hasPermi('platform:platform:remove')") |
| | | @Log(title = "卡口过车数据一致性", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Integer[] ids) { |
| | |
| | | |
| | | import com.ycl.platform.domain.form.*; |
| | | import com.ycl.platform.domain.query.DistributeWorkOrderQuery; |
| | | import com.ycl.platform.domain.query.WorkOrderQuery; |
| | | import com.ycl.platform.domain.vo.DistributeWorkOrderVO; |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.system.domain.group.Add; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.ycl.platform.service.WorkOrderService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.platform.domain.query.WorkOrderQuery; |
| | | import com.ycl.system.domain.group.Add; |
| | | import com.ycl.system.domain.group.Update; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 工单 前端控制器 |
| | |
| | | |
| | | @PostMapping |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | @PreAuthorize("@ss.hasPermi('work:order:add')") |
| | | public Result add(@RequestBody @Validated(Add.class) WorkOrderForm form) { |
| | | return workOrderService.add(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | @PreAuthorize("@ss.hasPermi('work:order:edit')") |
| | | public Result update(@RequestBody @Validated(Update.class) WorkOrderForm form) { |
| | | return workOrderService.update(form); |
| | | } |
| | | |
| | | @PutMapping("/auditing") |
| | | @ApiOperation(value = "审核", notes = "工单审核") |
| | | @PreAuthorize("@ss.hasPermi('work:order:audit')") |
| | | public Result auditing(@RequestBody @Validated(Update.class) WorkOrderAuditingForm form) { |
| | | return workOrderService.auditing(form); |
| | | } |
| | |
| | | @ApiOperation(value = "运维情况", notes = "运维情况") |
| | | public Result ywCondition(@RequestBody @Validated(Update.class) WorkOrderYWConditionForm form) { |
| | | return workOrderService.ywCondition(form); |
| | | } |
| | | |
| | | @GetMapping("/yw-condition/{id}") |
| | | @ApiOperation(value = "运维情况", notes = "运维情况") |
| | | public Result ywCondition(@PathVariable @Validated(Update.class) String id) { |
| | | return workOrderService.selectYwConditionByYwId(id); |
| | | } |
| | | |
| | | @GetMapping("/yw-condition-list/{id}") |
| | | @ApiOperation(value = "运维情况记录", notes = "运维情况记录") |
| | | public Result ywConditionList(@PathVariable @Validated(Update.class) String id) { |
| | | return workOrderService.selectYwConditionListByYwId(id); |
| | | } |
| | | |
| | | @GetMapping("/yw-auditing-list/{id}") |
| | | @ApiOperation(value = "运维审核记录", notes = "运维审核记录") |
| | | public Result ywAuditingByYwId(@PathVariable @Validated(Update.class) String id) { |
| | | return workOrderService.selectYwAuditingListByYwId(id); |
| | | } |
| | | |
| | | @PutMapping("/yw-result") |
| | |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "ID删除", notes = "ID删除") |
| | | @PreAuthorize("@ss.hasPermi('work:order:remove')") |
| | | public Result removeById(@PathVariable("id") String id) { |
| | | return workOrderService.removeById(id); |
| | | } |
| | | |
| | | @DeleteMapping("/batch") |
| | | @ApiOperation(value = "批量删除", notes = "批量删除") |
| | | @PreAuthorize("@ss.hasPermi('work:order:remove')") |
| | | public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) { |
| | | return workOrderService.remove(ids); |
| | | } |
| | | |
| | | @PostMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | @PreAuthorize("@ss.hasPermi('work:order:page')") |
| | | public Result page(@RequestBody WorkOrderQuery query) { |
| | | return workOrderService.page(query); |
| | | } |
| | | |
| | | @PostMapping("/distribute/page") |
| | | @ApiOperation(value = "下发分页", notes = "下发分页") |
| | | @PreAuthorize("@ss.hasPermi('work:order:distribute')") |
| | | public Result distributePage(@RequestBody DistributeWorkOrderQuery query) { |
| | | return workOrderService.distributePage(query); |
| | | } |
| | | |
| | | @PostMapping("/distribute/fast") |
| | | @ApiOperation(value = "快速下发", notes = "快速下发") |
| | | @PreAuthorize("@ss.hasPermi('work:order:distribute')") |
| | | public Result distributeFast(@RequestBody @Validated DistributeWorkOrderVO data) { |
| | | return workOrderService.distributeFast(data); |
| | | } |
| | | |
| | | @PostMapping("/distribute/ids") |
| | | @ApiOperation(value = "下发选择", notes = "下发选择") |
| | | @PreAuthorize("@ss.hasPermi('work:order:distribute')") |
| | | public Result selectedIdsDistribute(@RequestBody DistributeWorkOrderQuery query) { |
| | | return workOrderService.selectedIdsDistribute(query); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | @PreAuthorize("@ss.hasPermi('work:order:query')") |
| | | public Result detail(@PathVariable("id") String id) { |
| | | return workOrderService.detail(id); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | | @PreAuthorize("@ss.hasPermi('work:order:list')") |
| | | public Result list() { |
| | | return workOrderService.all(); |
| | | } |
| | |
| | | |
| | | @PostMapping |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | @PreAuthorize("@ss.hasPermi('unit:people:add')") |
| | | public Result add(@RequestBody @Validated(Add.class) YwPeopleForm form) { |
| | | return ywPeopleService.add(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | @PreAuthorize("@ss.hasPermi('unit:people:edit')") |
| | | public Result update(@RequestBody @Validated(Update.class) YwPeopleForm form) { |
| | | return ywPeopleService.update(form); |
| | | } |
| | | |
| | | @DeleteMapping("/{ids}") |
| | | @ApiOperation(value = "批量删除", notes = "批量删除") |
| | | @PreAuthorize("@ss.hasPermi('unit:people:remove')") |
| | | public Result remove(@PathVariable String ids) { |
| | | return ywPeopleService.remove(Arrays.asList(ids.split(","))); |
| | | } |
| | | |
| | | // @PreAuthorize("@ss.hasPermi('unit:people:page')") |
| | | @GetMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | @PreAuthorize("@ss.hasPermi('unit:people:page')") |
| | | public Result page(YwPeopleQuery query) { |
| | | return ywPeopleService.page(query); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | @PreAuthorize("@ss.hasPermi('unit:people:query')") |
| | | public Result detail(@PathVariable("id") String id) { |
| | | return ywPeopleService.detail(id); |
| | | } |
| | |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | | @PreAuthorize("@ss.hasPermi('unit:people:list')") |
| | | public Result list() { |
| | | return ywPeopleService.all(); |
| | | } |
| | |
| | | |
| | | @PostMapping |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | @PreAuthorize("@ss.hasPermi('point:add')") |
| | | public Result add(@RequestBody @Validated(Add.class) YwPointForm form) { |
| | | return ywPointService.add(form); |
| | | } |
| | | |
| | | @PostMapping("/batch") |
| | | @ApiOperation(value = "批量添加", notes = "批量添加") |
| | | @PreAuthorize("@ss.hasPermi('point:add')") |
| | | public Result batchAdd(@RequestBody @NotEmpty(message = "数据不能为空") List<YwPointForm> form) { |
| | | return ywPointService.batchAdd(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | @PreAuthorize("@ss.hasPermi('point:edit')") |
| | | public Result update(@RequestBody @Validated(Update.class) YwPointForm form) { |
| | | return ywPointService.update(form); |
| | | } |
| | | |
| | | @PutMapping("/batch") |
| | | @ApiOperation(value = "批量修改运维单位", notes = "批量修改运维单位") |
| | | @PreAuthorize("@ss.hasPermi('point:edit')") |
| | | public Result batchEdit(@RequestBody @Validated BatchEditPointForm form) { |
| | | return ywPointService.batchEdit(form); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "ID删除", notes = "ID删除") |
| | | @PreAuthorize("@ss.hasPermi('point:remove')") |
| | | public Result removeById(@PathVariable("id") String id) { |
| | | return ywPointService.removeById(id); |
| | | } |
| | | |
| | | @DeleteMapping("/batch") |
| | | @ApiOperation(value = "批量删除", notes = "批量删除") |
| | | @PreAuthorize("@ss.hasPermi('point:remove')") |
| | | public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) { |
| | | return ywPointService.remove(ids); |
| | | } |
| | | |
| | | // @PreAuthorize("@ss.hasPermi('point:page')") |
| | | @GetMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | @PreAuthorize("@ss.hasPermi('point:page')") |
| | | public Result page(YwPointQuery query) { |
| | | return ywPointService.page(query); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | @PreAuthorize("@ss.hasPermi('point:query')") |
| | | public Result detail(@PathVariable("id") String id) { |
| | | return ywPointService.detail(id); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | | @PreAuthorize("@ss.hasPermi('point:list')") |
| | | public Result list() { |
| | | return ywPointService.all(); |
| | | } |
| | |
| | | |
| | | import annotation.Log; |
| | | import com.ycl.platform.domain.entity.YwThreshold; |
| | | import com.ycl.platform.domain.form.CarThresholdForm; |
| | | import com.ycl.platform.domain.form.FaceThresholdForm; |
| | | import com.ycl.platform.domain.form.VideoThresholdForm; |
| | | import com.ycl.platform.service.IYwThresholdService; |
| | | import com.ycl.system.AjaxResult; |
| | | import com.ycl.system.controller.BaseController; |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.system.page.TableDataInfo; |
| | | import com.ycl.utils.poi.ExcelUtil; |
| | | import enumeration.BusinessType; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | |
| | | * @date 2024-03-25 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/ycl/threshold") |
| | | @RequestMapping("/threshold") |
| | | public class YwThresholdController extends BaseController { |
| | | @Autowired |
| | | private IYwThresholdService ywThresholdService; |
| | |
| | | /** |
| | | * 查询运维阈值列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('ycl:threshold:list')") |
| | | @PreAuthorize("@ss.hasPermi('ycl:threshold:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(YwThreshold ywThreshold) { |
| | | startPage(); |
| | |
| | | /** |
| | | * 导出运维阈值列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('ycl:threshold:export')") |
| | | @PreAuthorize("@ss.hasPermi('ycl:threshold:export')") |
| | | @Log(title = "运维阈值", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, YwThreshold ywThreshold) { |
| | |
| | | /** |
| | | * 获取运维阈值详细信息 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('ycl:threshold:query')") |
| | | @PreAuthorize("@ss.hasPermi('ycl:threshold:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Integer id) { |
| | | return success(ywThresholdService.selectYwThresholdById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增运维阈值 |
| | | * 获取人脸配置 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('ycl:threshold:add')") |
| | | @Log(title = "运维阈值", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody YwThreshold ywThreshold) { |
| | | return toAjax(ywThresholdService.insertYwThreshold(ywThreshold)); |
| | | // @PreAuthorize("@ss.hasPermi('ycl:threshold:query')") |
| | | @GetMapping(value = "/face/{id}") |
| | | public AjaxResult getFace(@PathVariable("id") Integer id) { |
| | | return success(ywThresholdService.getFace(id)); |
| | | } |
| | | |
| | | /** |
| | | * 修改运维阈值 |
| | | * 获取车辆配置 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('ycl:threshold:edit')") |
| | | @Log(title = "运维阈值", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody YwThreshold ywThreshold) { |
| | | return toAjax(ywThresholdService.updateYwThreshold(ywThreshold)); |
| | | // @PreAuthorize("@ss.hasPermi('ycl:threshold:query')") |
| | | @GetMapping(value = "/car/{id}") |
| | | public AjaxResult getCar(@PathVariable("id") Integer id) { |
| | | return success(ywThresholdService.getCar(id)); |
| | | } |
| | | |
| | | /** |
| | | * 删除运维阈值 |
| | | * 获取视频配置 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('ycl:threshold:remove')") |
| | | @Log(title = "运维阈值", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Integer[] ids) { |
| | | return toAjax(ywThresholdService.deleteYwThresholdByIds(ids)); |
| | | // @PreAuthorize("@ss.hasPermi('ycl:threshold:query')") |
| | | @GetMapping(value = "/video/{id}") |
| | | public AjaxResult getVideo(@PathVariable("id") Integer id) { |
| | | return success(ywThresholdService.getVideo(id)); |
| | | } |
| | | |
| | | /** |
| | | * 修改人脸阈值 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('ycl:threshold:edit')") |
| | | @Log(title = "修改人脸运维阈值", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/face") |
| | | public AjaxResult editFace(@RequestBody @Validated FaceThresholdForm form) { |
| | | return toAjax(ywThresholdService.editFace(form)); |
| | | } |
| | | |
| | | /** |
| | | * 修改车辆阈值 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('ycl:threshold:edit')") |
| | | @Log(title = "修改车辆阈值", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/car") |
| | | public AjaxResult editCar(@RequestBody @Validated CarThresholdForm form) { |
| | | return toAjax(ywThresholdService.editCar(form)); |
| | | } |
| | | |
| | | /** |
| | | * 修改视频阈值 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('ycl:threshold:edit')") |
| | | @Log(title = "修改视频阈值", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/video") |
| | | public AjaxResult editVideo(@RequestBody @Validated VideoThresholdForm form) { |
| | | return toAjax(ywThresholdService.editVideo(form)); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @PostMapping |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | @PreAuthorize("@ss.hasPermi('unit:add')") |
| | | public Result add(@RequestBody @Validated(Add.class) YwUnitForm form) { |
| | | return ywUnitService.add(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | @PreAuthorize("@ss.hasPermi('unit:edit')") |
| | | public Result update(@RequestBody @Validated(Update.class) YwUnitForm form) { |
| | | return ywUnitService.update(form); |
| | | } |
| | | |
| | | @DeleteMapping("/{ids}") |
| | | @ApiOperation(value = "批量删除", notes = "批量删除") |
| | | @PreAuthorize("@ss.hasPermi('unit:remove')") |
| | | public Result remove(@PathVariable String ids) { |
| | | return ywUnitService.remove(Arrays.asList(ids.split(","))); |
| | | } |
| | |
| | | // @PreAuthorize("@ss.hasPermi('unit:list')") |
| | | @PostMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | @PreAuthorize("@ss.hasPermi('unit:page')") |
| | | public Result page(@RequestBody YwUnitQuery query) { |
| | | return ywUnitService.page(query); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | @PreAuthorize("@ss.hasPermi('unit:query')") |
| | | public Result detail(@PathVariable("id") String id) { |
| | | return ywUnitService.detail(id); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | | @PreAuthorize("@ss.hasPermi('unit:list')") |
| | | public Result list() { |
| | | return ywUnitService.all(); |
| | | } |
| | | |
| | | @GetMapping("/work/list") |
| | | @ApiOperation(value = "工单列表", notes = "工单列表") |
| | | public Result workList() { |
| | | return ywUnitService.workList(); |
| | | } |
| | | |
| | | @PostMapping("/export") |
| | | @ApiOperation(value = "导出", notes = "导出") |
| | | @PreAuthorize("@ss.hasPermi('unit:export')") |
| | | public void export(HttpServletResponse response, YwUnitQuery query) |
| | | { |
| | | List<YwUnitVO> list = ywUnitService.export(query); |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.CalculateRecord; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-04-03 |
| | | */ |
| | | public interface CalculateRecordMapper |
| | | public interface CalculateRecordMapper extends BaseMapper<CalculateRecord> |
| | | { |
| | | /** |
| | | * 查询核算记录 |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.CalculateRule; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-04-03 |
| | | */ |
| | | public interface CalculateRuleMapper |
| | | public interface CalculateRuleMapper extends BaseMapper<CalculateRule> |
| | | { |
| | | /** |
| | | * 查询核算规则 |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.CheckPublish; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-04-01 |
| | | */ |
| | | public interface CheckPublishMapper |
| | | public interface CheckPublishMapper extends BaseMapper<CheckPublish> |
| | | { |
| | | /** |
| | | * 查询考核发布 |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.CheckResult; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-04-01 |
| | | */ |
| | | public interface CheckResultMapper |
| | | public interface CheckResultMapper extends BaseMapper<CheckResult> |
| | | { |
| | | /** |
| | | * 查询考核结果 |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.CheckRule; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-04-15 |
| | | */ |
| | | public interface CheckRuleMapper |
| | | public interface CheckRuleMapper extends BaseMapper<CheckRule> |
| | | { |
| | | /** |
| | | * 查询考核规则 |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.CheckScore; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-04-01 |
| | | */ |
| | | public interface CheckScoreMapper |
| | | public interface CheckScoreMapper extends BaseMapper<CheckScore> |
| | | { |
| | | /** |
| | | * 查询考核积分明细 |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.DefaultPublish; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-04-01 |
| | | */ |
| | | public interface DefaultPublishMapper |
| | | public interface DefaultPublishMapper extends BaseMapper<DefaultPublish> |
| | | { |
| | | /** |
| | | * 查询合同考核发布 |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.DefaultResult; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-04-01 |
| | | */ |
| | | public interface DefaultResultMapper |
| | | public interface DefaultResultMapper extends BaseMapper<DefaultResult> |
| | | { |
| | | /** |
| | | * 查询合同考核结果 |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.DefaultRule; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-04-01 |
| | | */ |
| | | public interface DefaultRuleMapper |
| | | public interface DefaultRuleMapper extends BaseMapper<DefaultRule> |
| | | { |
| | | /** |
| | | * 查询违约规则 |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.DefaultScore; |
| | | |
| | | /** |
| | |
| | | * @author ruoyi |
| | | * @date 2024-04-01 |
| | | */ |
| | | public interface DefaultScoreMapper |
| | | public interface DefaultScoreMapper extends BaseMapper<DefaultScore> |
| | | { |
| | | /** |
| | | * 查询合同打分 |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.DefaultTemplate; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-04-01 |
| | | */ |
| | | public interface DefaultTemplateMapper |
| | | public interface DefaultTemplateMapper extends BaseMapper<DefaultTemplate> |
| | | { |
| | | /** |
| | | * 查询违约规则模板 |
| New file |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.ycl.platform.domain.entity.Notify; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.vo.NotifyVO; |
| | | import com.ycl.platform.domain.form.NotifyForm; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * 通知 Mapper 接口 |
| | | * |
| | | * @author xp |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Mapper |
| | | public interface NotifyMapper extends BaseMapper<Notify> { |
| | | |
| | | } |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.TContract; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-03-12 |
| | | */ |
| | | public interface TContractMapper |
| | | public interface TContractMapper extends BaseMapper<TContract> |
| | | { |
| | | /** |
| | | * 查询【请填写功能名称】 |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | |
| | |
| | | * @author ruoyi |
| | | * @date 2024-03-04 |
| | | */ |
| | | public interface TMonitorMapper |
| | | public interface TMonitorMapper extends BaseMapper<TMonitor> |
| | | { |
| | | /** |
| | | * 查询设备资产 |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.TMonitorVideo; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-03-19 |
| | | */ |
| | | public interface TMonitorVideoMapper |
| | | public interface TMonitorVideoMapper extends BaseMapper<TMonitorVideo> |
| | | { |
| | | /** |
| | | * 查询设备资产 |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.TPlatform; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author gonghl |
| | | * @date 2024-04-10 |
| | | */ |
| | | public interface TPlatformMapper { |
| | | public interface TPlatformMapper extends BaseMapper<TPlatform> { |
| | | /** |
| | | * 查询平台运行监控 |
| | | * |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.VehicleDataMonitor; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author gonghl |
| | | * @date 2024-03-19 |
| | | */ |
| | | public interface VehicleDataMonitorMapper { |
| | | public interface VehicleDataMonitorMapper extends BaseMapper<VehicleDataMonitor> { |
| | | /** |
| | | * 查询卡口过车数据一致性 |
| | | * |
| New file |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.WorkOrderDistributeRecord; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 工单下发 Mapper 接口 |
| | | * |
| | | * @author gonghl |
| | | * @since 2024-04-17 |
| | | */ |
| | | @Mapper |
| | | public interface WorkOrderDistributeRecordMapper extends BaseMapper<WorkOrderDistributeRecord> { |
| | | |
| | | void insertBatch(List<WorkOrderDistributeRecord> list); |
| | | } |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.entity.YwThreshold; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author gonghl |
| | | * @date 2024-03-25 |
| | | */ |
| | | public interface YwThresholdMapper { |
| | | public interface YwThresholdMapper extends BaseMapper<YwThreshold> { |
| | | /** |
| | | * 查询运维阈值 |
| | | * |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | import com.ycl.platform.domain.entity.YwUnit; |
| | | import com.ycl.platform.domain.vo.YwUnitVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 运维单位 Mapper 接口 |
| | |
| | | @Mapper |
| | | public interface YwUnitMapper extends BaseMapper<YwUnit> { |
| | | |
| | | /** |
| | | * 运维单位列表统计 |
| | | * @return 数据 |
| | | */ |
| | | List<YwUnitVO> workList(); |
| | | } |
| | |
| | | package com.ycl.platform.service; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.dto.CarDTO; |
| | | import com.ycl.platform.domain.dto.FaceDTO; |
| | | import com.ycl.platform.domain.dto.VideoDTO; |
| | | import com.ycl.platform.domain.entity.YwThreshold; |
| | | import com.ycl.platform.domain.form.CarThresholdForm; |
| | | import com.ycl.platform.domain.form.FaceThresholdForm; |
| | | import com.ycl.platform.domain.form.VideoThresholdForm; |
| | | import com.ycl.platform.mapper.YwThresholdMapper; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteYwThresholdById(Integer id); |
| | | |
| | | /** |
| | | * 修改人脸阈值 |
| | | * |
| | | * @param form |
| | | * @return |
| | | */ |
| | | int editFace(FaceThresholdForm form); |
| | | |
| | | /** |
| | | * 修改车辆阈值 |
| | | * |
| | | * @param form |
| | | * @return |
| | | */ |
| | | int editCar(CarThresholdForm form); |
| | | |
| | | /** |
| | | * 修改视频阈值 |
| | | * |
| | | * @param form |
| | | * @return |
| | | */ |
| | | int editVideo(VideoThresholdForm form); |
| | | |
| | | /** |
| | | * 检查人脸数据是否要生成工单 |
| | | * |
| | | * @param faceList 人脸数据 |
| | | * @return 是否生成工单 |
| | | */ |
| | | Boolean checkFace(List<FaceDTO> faceList); |
| | | |
| | | /** |
| | | * 检查车辆数据是否要生成工单 |
| | | * |
| | | * @param carList 车辆数据 |
| | | * @return 是否生成工单 |
| | | */ |
| | | Boolean checkCar(List<CarDTO> carList); |
| | | |
| | | /** |
| | | * 检查视频数据是否要生成工单 |
| | | * |
| | | * @param videoList |
| | | * @return 是否生成工单 |
| | | */ |
| | | Boolean checkVideo(List<VideoDTO> videoList); |
| | | |
| | | /** |
| | | * 获取人脸配置 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | FaceThresholdForm getFace(Integer id); |
| | | |
| | | /** |
| | | * 获取车辆配置 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | CarThresholdForm getCar(Integer id); |
| | | |
| | | /** |
| | | * 获取视频配置 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | VideoThresholdForm getVideo(Integer id); |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.service; |
| | | |
| | | import com.ycl.platform.domain.entity.Notify; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.platform.domain.form.NotifyForm; |
| | | import com.ycl.platform.domain.query.NotifyQuery; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 通知 服务类 |
| | | * |
| | | * @author xp |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface NotifyService extends IService<Notify> { |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result add(NotifyForm form); |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result update(NotifyForm form); |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | Result remove(List<String> ids); |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result removeById(String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Result page(NotifyQuery query); |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result detail(String id); |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | Result all(); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | Result distributeFast(DistributeWorkOrderVO data); |
| | | |
| | | /** |
| | | * 获取工单运维情况 |
| | | * @param id 工单id |
| | | * @return 工单运维情况 |
| | | */ |
| | | Result selectYwConditionByYwId(String id); |
| | | |
| | | /** |
| | | * 获取工单运维情况记录 |
| | | * @param id 工单id |
| | | * @return 工单运维情况记录 |
| | | */ |
| | | Result selectYwConditionListByYwId(String id); |
| | | |
| | | /** |
| | | * 获取工单运维审核记录 |
| | | * @param id 工单id |
| | | * @return 工单运维审核记录 |
| | | */ |
| | | Result selectYwAuditingListByYwId(String id); |
| | | |
| | | /** |
| | | * 批量下发 |
| | | * @param ids id |
| | | * @return 结果 |
| | | */ |
| | | Result selectedIdsDistribute(DistributeWorkOrderQuery query); |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<YwUnitVO> export(YwUnitQuery query); |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | Result workList(); |
| | | } |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.CalculateRecord; |
| | | import com.ycl.platform.mapper.CalculateRecordMapper; |
| | | import com.ycl.platform.service.ICalculateRecordService; |
| | |
| | | * @date 2024-04-03 |
| | | */ |
| | | @Service |
| | | public class CalculateRecordServiceImpl implements ICalculateRecordService |
| | | public class CalculateRecordServiceImpl extends ServiceImpl<CalculateRecordMapper, CalculateRecord> implements ICalculateRecordService |
| | | { |
| | | @Autowired |
| | | private CalculateRecordMapper calculateRecordMapper; |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.CalculateRule; |
| | | import com.ycl.platform.mapper.CalculateRuleMapper; |
| | | import com.ycl.platform.service.ICalculateRuleService; |
| | |
| | | * @date 2024-04-03 |
| | | */ |
| | | @Service |
| | | public class CalculateRuleServiceImpl implements ICalculateRuleService |
| | | public class CalculateRuleServiceImpl extends ServiceImpl<CalculateRuleMapper, CalculateRule> implements ICalculateRuleService |
| | | { |
| | | @Autowired |
| | | private CalculateRuleMapper calculateRuleMapper; |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.CheckResult; |
| | | import com.ycl.platform.mapper.CheckResultMapper; |
| | | import com.ycl.platform.service.ICheckResultService; |
| | |
| | | * @date 2024-04-01 |
| | | */ |
| | | @Service |
| | | public class CheckResultServiceImpl implements ICheckResultService |
| | | public class CheckResultServiceImpl extends ServiceImpl<CheckResultMapper, CheckResult> implements ICheckResultService |
| | | { |
| | | @Autowired |
| | | private CheckResultMapper checkResultMapper; |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.CheckRule; |
| | | import com.ycl.platform.domain.vo.CheckRuleVO; |
| | | import com.ycl.platform.mapper.CheckRuleMapper; |
| | |
| | | * @date 2024-04-15 |
| | | */ |
| | | @Service |
| | | public class CheckRuleServiceImpl implements ICheckRuleService |
| | | public class CheckRuleServiceImpl extends ServiceImpl<CheckRuleMapper, CheckRule> implements ICheckRuleService |
| | | { |
| | | @Autowired |
| | | private CheckRuleMapper checkRuleMapper; |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.CheckScore; |
| | | import com.ycl.platform.mapper.CheckScoreMapper; |
| | | import com.ycl.platform.service.ICheckScoreService; |
| | |
| | | * @date 2024-04-01 |
| | | */ |
| | | @Service |
| | | public class CheckScoreServiceImpl implements ICheckScoreService |
| | | public class CheckScoreServiceImpl extends ServiceImpl<CheckScoreMapper, CheckScore> implements ICheckScoreService |
| | | { |
| | | @Autowired |
| | | private CheckScoreMapper checkScoreMapper; |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.DefaultPublish; |
| | | import com.ycl.platform.mapper.DefaultPublishMapper; |
| | | import com.ycl.platform.service.IDefaultPublishService; |
| | |
| | | * @date 2024-04-01 |
| | | */ |
| | | @Service |
| | | public class DefaultPublishServiceImpl implements IDefaultPublishService |
| | | public class DefaultPublishServiceImpl extends ServiceImpl<DefaultPublishMapper, DefaultPublish> implements IDefaultPublishService |
| | | { |
| | | @Autowired |
| | | private DefaultPublishMapper defaultPublishMapper; |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.DefaultResult; |
| | | import com.ycl.platform.mapper.DefaultResultMapper; |
| | | import com.ycl.platform.service.IDefaultResultService; |
| | |
| | | * @date 2024-04-01 |
| | | */ |
| | | @Service |
| | | public class DefaultResultServiceImpl implements IDefaultResultService |
| | | public class DefaultResultServiceImpl extends ServiceImpl<DefaultResultMapper, DefaultResult> implements IDefaultResultService |
| | | { |
| | | @Autowired |
| | | private DefaultResultMapper defaultResultMapper; |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.DefaultRule; |
| | | import com.ycl.platform.mapper.DefaultRuleMapper; |
| | | import com.ycl.platform.service.IDefaultRuleService; |
| | |
| | | * @date 2024-04-01 |
| | | */ |
| | | @Service |
| | | public class DefaultRuleServiceImpl implements IDefaultRuleService |
| | | public class DefaultRuleServiceImpl extends ServiceImpl<DefaultRuleMapper, DefaultRule> implements IDefaultRuleService |
| | | { |
| | | @Autowired |
| | | private DefaultRuleMapper defaultRuleMapper; |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.DefaultScore; |
| | | import com.ycl.platform.mapper.DefaultScoreMapper; |
| | | import com.ycl.platform.service.IDefaultScoreService; |
| | |
| | | * @date 2024-04-01 |
| | | */ |
| | | @Service |
| | | public class DefaultScoreServiceImpl implements IDefaultScoreService |
| | | public class DefaultScoreServiceImpl extends ServiceImpl<DefaultScoreMapper, DefaultScore> implements IDefaultScoreService |
| | | { |
| | | @Autowired |
| | | private DefaultScoreMapper defaultScoreMapper; |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.DefaultTemplate; |
| | | import com.ycl.platform.mapper.DefaultTemplateMapper; |
| | | import com.ycl.platform.service.IDefaultTemplateService; |
| | |
| | | * @date 2024-04-01 |
| | | */ |
| | | @Service |
| | | public class DefaultTemplateServiceImpl implements IDefaultTemplateService |
| | | public class DefaultTemplateServiceImpl extends ServiceImpl<DefaultTemplateMapper, DefaultTemplate> implements IDefaultTemplateService |
| | | { |
| | | @Autowired |
| | | private DefaultTemplateMapper defaultTemplateMapper; |
| New file |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.ycl.platform.domain.entity.Notify; |
| | | import com.ycl.platform.mapper.NotifyMapper; |
| | | import com.ycl.platform.service.NotifyService; |
| | | import com.ycl.system.Result; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.form.NotifyForm; |
| | | import com.ycl.platform.domain.vo.NotifyVO; |
| | | import com.ycl.platform.domain.query.NotifyQuery; |
| | | import java.util.List; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.system.page.PageUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.security.core.context.SecurityContextHolder; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.Assert; |
| | | import java.util.ArrayList; |
| | | import java.util.stream.Collectors; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | /** |
| | | * 通知 服务实现类 |
| | | * |
| | | * @author xp |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class NotifyServiceImpl extends ServiceImpl<NotifyMapper, Notify> implements NotifyService { |
| | | |
| | | private final NotifyMapper notifyMapper; |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result add(NotifyForm form) { |
| | | Notify entity = NotifyForm.getEntityByForm(form, null); |
| | | if(baseMapper.insert(entity) > 0) { |
| | | return Result.ok("添加成功"); |
| | | } |
| | | return Result.error("添加失败"); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result update(NotifyForm form) { |
| | | |
| | | Notify entity = baseMapper.selectById(form.getId()); |
| | | |
| | | // 为空抛IllegalArgumentException,做全局异常处理 |
| | | Assert.notNull(entity, "记录不存在"); |
| | | BeanUtils.copyProperties(form, entity); |
| | | if (baseMapper.updateById(entity) > 0) { |
| | | return Result.ok("修改成功"); |
| | | } |
| | | return Result.error("修改失败"); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result remove(List<String> ids) { |
| | | if(baseMapper.deleteBatchIds(ids) > 0) { |
| | | return Result.ok("删除成功"); |
| | | } |
| | | return Result.error("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result removeById(String id) { |
| | | if(baseMapper.deleteById(id) > 0) { |
| | | return Result.ok("删除成功"); |
| | | } |
| | | return Result.error("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result page(NotifyQuery query) { |
| | | |
| | | IPage<Notify> page = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .orderByDesc(Notify::getCreateTime) |
| | | .page(PageUtil.getPage(query, Notify.class)); |
| | | |
| | | List<NotifyVO> vos = page.getRecords().stream() |
| | | .map( |
| | | entity -> NotifyVO.getVoByEntity(entity, null) |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos).total(page.getTotal()); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result detail(String id) { |
| | | |
| | | Notify entity = baseMapper.selectById(id); |
| | | Assert.notNull(entity, "记录不存在"); |
| | | NotifyVO vo = NotifyVO.getVoByEntity(entity, null); |
| | | return Result.ok().data(vo); |
| | | } |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result all() { |
| | | List<Notify> entities = baseMapper.selectList(null); |
| | | List<NotifyVO> vos = entities.stream() |
| | | .map( |
| | | entity -> NotifyVO.getVoByEntity(entity, null) |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | } |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.TContract; |
| | | import com.ycl.platform.mapper.TContractMapper; |
| | | import com.ycl.platform.service.ITContractService; |
| | |
| | | * @date 2024-03-12 |
| | | */ |
| | | @Service |
| | | public class TContractServiceImpl implements ITContractService |
| | | public class TContractServiceImpl extends ServiceImpl<TContractMapper, TContract> implements ITContractService |
| | | { |
| | | @Autowired |
| | | private TContractMapper tContractMapper; |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | import com.ycl.platform.mapper.TMonitorMapper; |
| | |
| | | * @date 2024-03-04 |
| | | */ |
| | | @Service |
| | | public class TMonitorServiceImpl implements ITMonitorService |
| | | public class TMonitorServiceImpl extends ServiceImpl<TMonitorMapper, TMonitor> implements ITMonitorService |
| | | { |
| | | @Autowired |
| | | private TMonitorMapper tMonitorMapper; |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.TMonitorVideo; |
| | | import com.ycl.platform.mapper.TMonitorVideoMapper; |
| | | import com.ycl.platform.service.ITMonitorVideoService; |
| | |
| | | * @date 2024-03-19 |
| | | */ |
| | | @Service |
| | | public class TMonitorVideoServiceImpl implements ITMonitorVideoService |
| | | public class TMonitorVideoServiceImpl extends ServiceImpl<TMonitorVideoMapper, TMonitorVideo> implements ITMonitorVideoService |
| | | { |
| | | @Autowired |
| | | private TMonitorVideoMapper tMonitorVideoMapper; |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.TPlatform; |
| | | import com.ycl.platform.mapper.TPlatformMapper; |
| | | import com.ycl.platform.service.ITPlatformService; |
| | |
| | | * @date 2024-04-10 |
| | | */ |
| | | @Service |
| | | public class TPlatformServiceImpl implements ITPlatformService { |
| | | public class TPlatformServiceImpl extends ServiceImpl<TPlatformMapper, TPlatform> implements ITPlatformService { |
| | | @Autowired |
| | | private TPlatformMapper tPlatformMapper; |
| | | |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.VehicleDataMonitor; |
| | | import com.ycl.platform.mapper.VehicleDataMonitorMapper; |
| | | import com.ycl.platform.service.IVehicleDataMonitorService; |
| | |
| | | * @date 2024-03-19 |
| | | */ |
| | | @Service |
| | | public class VehicleDataMonitorServiceImpl implements IVehicleDataMonitorService { |
| | | public class VehicleDataMonitorServiceImpl extends ServiceImpl<VehicleDataMonitorMapper, VehicleDataMonitor> implements IVehicleDataMonitorService { |
| | | @Autowired |
| | | private VehicleDataMonitorMapper vehicleDataMonitorMapper; |
| | | |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.exception.ServiceException; |
| | | import com.ycl.platform.domain.entity.*; |
| | | import com.ycl.platform.domain.form.*; |
| | | import com.ycl.platform.domain.query.DistributeWorkOrderQuery; |
| | | import com.ycl.platform.domain.query.WorkOrderQuery; |
| | | import com.ycl.platform.domain.vo.DistributeWorkOrderVO; |
| | | import com.ycl.platform.domain.vo.WorkOrderVO; |
| | | import com.ycl.platform.mapper.*; |
| | | import com.ycl.platform.service.NotifyService; |
| | | import com.ycl.platform.service.WorkOrderService; |
| | | import com.ycl.system.Result; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.vo.WorkOrderVO; |
| | | import com.ycl.platform.domain.query.WorkOrderQuery; |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.system.model.LoginUser; |
| | | import com.ycl.system.page.PageUtil; |
| | | import com.ycl.utils.DateUtils; |
| | | import enumeration.general.FastDistributeTypeEnum; |
| | | import com.ycl.utils.SecurityUtils; |
| | | import com.ycl.utils.redis.RedisCache; |
| | | import enumeration.general.NotifyTypeEnum; |
| | | import enumeration.general.WorkOrderDistributeWayEnum; |
| | | import enumeration.general.WorkOrderStatusEnum; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.Assert; |
| | | import java.util.ArrayList; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 工单 服务实现类 |
| | |
| | | private final YwPeopleMapper ywPeopleMapper; |
| | | private final WorkOrderAuditingRecordMapper workOrderAuditingRecordMapper; |
| | | private final WorkOrderYwConditionRecordMapper workOrderYwConditionRecordMapper; |
| | | private final NotifyService notifyService; |
| | | private final WorkOrderDistributeRecordMapper workOrderDistributeRecordMapper; |
| | | |
| | | private final String DISTRIBUTE_LOCK_KEY = "distributeLock"; |
| | | |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | | |
| | | /** |
| | | * 添加 |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Result auditing(WorkOrderAuditingForm form) { |
| | | WorkOrder workOrder = baseMapper.selectById(form.getId()); |
| | | if (Objects.isNull(workOrder)) { |
| | | throw new ServiceException("工单不存在"); |
| | | } |
| | | // 工单状态 |
| | | if ("pass".equals(form.getAuditingResult())) { |
| | | workOrder.setStatus(WorkOrderStatusEnum.FINISH); |
| | | } else { |
| | | workOrder.setStatus(WorkOrderStatusEnum.AUDITING); |
| | | } |
| | | workOrder.setStatus(form.getAuditingResult()); |
| | | baseMapper.updateById(workOrder); |
| | | // 添加一条审核记录 |
| | | WorkOrderAuditingRecord workOrderAuditingRecord = new WorkOrderAuditingRecord(); |
| | | workOrderAuditingRecord.setWorkOrderId(workOrder.getId()); |
| | | workOrderAuditingRecord.setAuditingUser(1); |
| | | workOrderAuditingRecord.setResult(form.getAuditingResult()); |
| | | workOrderAuditingRecord.setAuditingUser(SecurityUtils.getLoginUser().getUserId().intValue()); |
| | | workOrderAuditingRecord.setResult(form.getAuditingResult().getDesc()); |
| | | workOrderAuditingRecord.setRemark(form.getAuditingRemark()); |
| | | workOrderAuditingRecordMapper.insert(workOrderAuditingRecord); |
| | | // 添加新通知 |
| | | try { |
| | | Notify notify = new Notify(NotifyTypeEnum.WORK_ORDER, form.getAuditingResult().getDesc(), workOrder.getYwPeopleId(), "0", "0", workOrder.getId()); |
| | | notifyService.save(notify); |
| | | } catch (Exception e) { |
| | | return Result.error("审核成功,通知运维人员失败"); |
| | | } |
| | | return Result.ok("操作成功"); |
| | | } |
| | | |
| | |
| | | throw new ServiceException("工单不存在"); |
| | | } |
| | | // 工单状态 |
| | | // workOrder.setStatus("commit-condition"); |
| | | workOrder.setStatus(WorkOrderStatusEnum.YW_HANDLE); |
| | | baseMapper.updateById(workOrder); |
| | | // 添加一条运维情况记录 |
| | | WorkOrderYwConditionRecord workOrderYwConditionRecord = new WorkOrderYwConditionRecord(); |
| | | workOrderYwConditionRecord.setWorkOrderId(workOrder.getId()); |
| | | workOrderYwConditionRecord.setCommitUser(1); |
| | | workOrderYwConditionRecord.setCommitUser(SecurityUtils.getLoginUser().getUserId().intValue()); |
| | | workOrderYwConditionRecord.setYwCondition(form.getYwCondition()); |
| | | workOrderYwConditionRecord.setYwProofMaterials(form.getYwProofMaterials()); |
| | | workOrderYwConditionRecordMapper.insert(workOrderYwConditionRecord); |
| | | return Result.ok("操作成功"); |
| | | } |
| | | |
| | | @Override |
| | | public Result selectYwConditionByYwId(String id) { |
| | | return Result.ok().data( |
| | | new LambdaQueryChainWrapper<>(workOrderYwConditionRecordMapper) |
| | | .eq(WorkOrderYwConditionRecord::getWorkOrderId, id) |
| | | .orderByAsc(WorkOrderYwConditionRecord::getCreateTime) |
| | | .last("limit 1") |
| | | .one()); |
| | | } |
| | | |
| | | @Override |
| | | public Result selectYwConditionListByYwId(String id) { |
| | | return Result.ok().data( |
| | | new LambdaQueryChainWrapper<>(workOrderYwConditionRecordMapper) |
| | | .eq(WorkOrderYwConditionRecord::getWorkOrderId, id) |
| | | .orderByAsc(WorkOrderYwConditionRecord::getCreateTime) |
| | | .list()); |
| | | } |
| | | |
| | | @Override |
| | | public Result selectYwAuditingListByYwId(String id) { |
| | | return Result.ok().data( |
| | | new LambdaQueryChainWrapper<>(workOrderAuditingRecordMapper) |
| | | .eq(WorkOrderAuditingRecord::getWorkOrderId, id) |
| | | .orderByAsc(WorkOrderAuditingRecord::getCreateTime) |
| | | .list()); |
| | | } |
| | | |
| | | @Override |
| | |
| | | public Result page(WorkOrderQuery query) { |
| | | IPage<WorkOrder> page = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .eq(StringUtils.hasText(query.getWorkOrderNo()), WorkOrder::getWorkOrderNo, query.getWorkOrderNo()) |
| | | .ne(WorkOrder::getStatus, WorkOrderStatusEnum.WAIT_DISTRIBUTE) |
| | | .eq(StringUtils.hasText(query.getStatus().getValue()), WorkOrder::getStatus, query.getStatus()) |
| | | .eq(StringUtils.hasText(query.getErrorType()), WorkOrder::getErrorType, query.getErrorType()) |
| | | .between(Objects.nonNull(query.getStart()) && Objects.nonNull(query.getEnd()), |
| | | WorkOrder::getYwHandleTime, |
| | | DateUtils.getDayStart(query.getStart()), |
| | |
| | | |
| | | @Override |
| | | public Result distributeFast(DistributeWorkOrderVO data) { |
| | | List<WorkOrder> willDistributeList = new ArrayList<>(32); |
| | | // 如果是自定义时间范围 |
| | | if (FastDistributeTypeEnum.CUSTOM == data.getFastWay()) { |
| | | // 获取当前时间 |
| | | LocalDateTime now = LocalDateTime.now(ZoneId.systemDefault()); |
| | | switch (data.getFastWay()) { |
| | | case LAST_HALF_HOUR: |
| | | data.setStart(now.minusMinutes(30)); |
| | | data.setEnd(now); |
| | | break; |
| | | case LAST_HOUR: |
| | | data.setStart(now.minusHours(1)); |
| | | data.setEnd(now); |
| | | break; |
| | | case LAST_TWO_HOUR: |
| | | data.setStart(now.minusHours(2)); |
| | | data.setEnd(now); |
| | | break; |
| | | case LAST_DAY: |
| | | data.setStart(now.minusDays(1)); |
| | | data.setEnd(now); |
| | | break; |
| | | } |
| | | |
| | | // 查询符合条件的工单 |
| | | List<Integer> ids = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .eq(WorkOrder::getStatus, WorkOrderStatusEnum.WAIT_DISTRIBUTE) |
| | | .eq(Objects.nonNull(data.getUnitId()), WorkOrder::getUnitId, data.getUnitId()) |
| | | .eq(WorkOrder::getErrorType, data.getErrorType()) |
| | | .between(WorkOrder::getCreateTime, data.getStart(), data.getEnd()) |
| | | .orderByDesc(WorkOrder::getCreateTime) |
| | | .last("limit " + data.getFastNumLimit()) |
| | | .list() |
| | | .stream() |
| | | .map(WorkOrder::getId) |
| | | .toList(); |
| | | |
| | | if (ids.isEmpty()) { |
| | | return Result.error("没有符合条件的工单"); |
| | | } |
| | | if (!getDistributeLock()) { |
| | | return Result.error("此刻有人下发中,为避免冲突,请稍后重试"); |
| | | } |
| | | try { |
| | | new LambdaUpdateChainWrapper<>(baseMapper) |
| | | .set(WorkOrder::getStatus, WorkOrderStatusEnum.DISTRIBUTED) |
| | | .in(WorkOrder::getId, ids) |
| | | .update(); |
| | | addDistributeRecord(ids, WorkOrderDistributeWayEnum.FAST_DISTRIBUTE); |
| | | return Result.ok("成功下发" + ids.size() + "条工单"); |
| | | } catch (Exception e) { |
| | | return Result.error("操作失败"); |
| | | } finally { |
| | | distributeUnLock(); |
| | | } |
| | | } |
| | | |
| | | new LambdaUpdateChainWrapper<>(baseMapper) |
| | | .set(WorkOrder::getStatus, WorkOrderStatusEnum.DISTRIBUTED) |
| | | .update(); |
| | | @Override |
| | | public Result selectedIdsDistribute(DistributeWorkOrderQuery query) { |
| | | WorkOrderDistributeWayEnum distributeWayEnum = WorkOrderDistributeWayEnum.SELECTED_DISTRIBUTE; |
| | | if (!getDistributeLock()) { |
| | | return Result.error("此刻有人下发中,为避免冲突,请稍后重试"); |
| | | } |
| | | try { |
| | | if (query.getIds().isEmpty()) { |
| | | query.setIds(new LambdaQueryChainWrapper<>(baseMapper) |
| | | .eq(WorkOrder::getStatus, WorkOrderStatusEnum.WAIT_DISTRIBUTE) |
| | | .eq(Objects.nonNull(query.getUnitId()), WorkOrder::getUnitId, query.getUnitId()) |
| | | .select(WorkOrder::getId) |
| | | .list() |
| | | .stream() |
| | | .map(WorkOrder::getId) |
| | | .collect(Collectors.toList())); |
| | | distributeWayEnum = WorkOrderDistributeWayEnum.ALL_DISTRIBUTE; |
| | | } |
| | | if (query.getIds().isEmpty()) { |
| | | return Result.error("没有工单待下发"); |
| | | } |
| | | new LambdaUpdateChainWrapper<>(baseMapper) |
| | | .set(WorkOrder::getStatus, WorkOrderStatusEnum.DISTRIBUTED) |
| | | .in(WorkOrder::getId, query.getIds()) |
| | | .update(); |
| | | addDistributeRecord(query.getIds(), distributeWayEnum); |
| | | return Result.ok("成功下发" + query.getIds().size() + "条工单"); |
| | | } catch (Exception e) { |
| | | return Result.error("操作失败"); |
| | | } finally { |
| | | distributeUnLock(); |
| | | } |
| | | } |
| | | |
| | | return Result.ok("操作成功"); |
| | | /** |
| | | * 申请工单下发锁 |
| | | * @return 工单下发锁申请结果 |
| | | */ |
| | | public synchronized Boolean getDistributeLock() { |
| | | if (Objects.isNull(redisCache.getCacheObject(DISTRIBUTE_LOCK_KEY))) { |
| | | redisCache.setCacheObject(DISTRIBUTE_LOCK_KEY, "1"); |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 工单下发锁释放 |
| | | */ |
| | | public synchronized void distributeUnLock() { |
| | | redisCache.deleteObject(DISTRIBUTE_LOCK_KEY); |
| | | } |
| | | |
| | | /** |
| | | * 添加工单下发记录 |
| | | * @param ids 工单id |
| | | */ |
| | | private void addDistributeRecord(List<Integer> ids, WorkOrderDistributeWayEnum distributeWay) { |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | workOrderDistributeRecordMapper.insertBatch( |
| | | ids.stream() |
| | | .map(id -> new WorkOrderDistributeRecord(id, loginUser.getUserId(), distributeWay)) |
| | | .toList() |
| | | ); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.dto.CarDTO; |
| | | import com.ycl.platform.domain.dto.FaceDTO; |
| | | import com.ycl.platform.domain.dto.VideoDTO; |
| | | import com.ycl.platform.domain.entity.YwThreshold; |
| | | import com.ycl.platform.domain.form.CarThresholdForm; |
| | | import com.ycl.platform.domain.form.FaceThresholdForm; |
| | | import com.ycl.platform.domain.form.VideoThresholdForm; |
| | | import com.ycl.platform.mapper.YwThresholdMapper; |
| | | import com.ycl.platform.service.IYwThresholdService; |
| | | import com.ycl.utils.DateUtils; |
| | | import enumeration.general.BusinessTypeEnum; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 运维阈值Service业务层处理 |
| | |
| | | * @date 2024-03-25 |
| | | */ |
| | | @Service |
| | | public class YwThresholdServiceImpl implements IYwThresholdService { |
| | | @Autowired |
| | | private YwThresholdMapper ywThresholdMapper; |
| | | @RequiredArgsConstructor |
| | | public class YwThresholdServiceImpl extends ServiceImpl<YwThresholdMapper, YwThreshold> implements IYwThresholdService { |
| | | |
| | | private final YwThresholdMapper ywThresholdMapper; |
| | | |
| | | /** |
| | | * 查询运维阈值 |
| | |
| | | public int deleteYwThresholdById(Integer id) { |
| | | return ywThresholdMapper.deleteYwThresholdById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int editFace(FaceThresholdForm form) { |
| | | YwThreshold ywThreshold = baseMapper.selectById(form.getId()); |
| | | if (Objects.isNull(ywThreshold)) { |
| | | throw new RuntimeException("数据不存在"); |
| | | } |
| | | BeanUtils.copyProperties(form, ywThreshold); |
| | | // ywThreshold.setIndicator(JSON.toJSONString(form)); |
| | | return baseMapper.updateById(ywThreshold); |
| | | } |
| | | |
| | | @Override |
| | | public int editCar(CarThresholdForm form) { |
| | | YwThreshold ywThreshold = baseMapper.selectById(form.getId()); |
| | | if (Objects.isNull(ywThreshold)) { |
| | | throw new RuntimeException("数据不存在"); |
| | | } |
| | | BeanUtils.copyProperties(form, ywThreshold); |
| | | // ywThreshold.setIndicator(JSON.toJSONString(form)); |
| | | return baseMapper.updateById(ywThreshold); |
| | | } |
| | | |
| | | @Override |
| | | public int editVideo(VideoThresholdForm form) { |
| | | YwThreshold ywThreshold = baseMapper.selectById(form.getId()); |
| | | if (Objects.isNull(ywThreshold)) { |
| | | throw new RuntimeException("数据不存在"); |
| | | } |
| | | BeanUtils.copyProperties(form, ywThreshold); |
| | | // ywThreshold.setIndicator(JSON.toJSONString(form)); |
| | | return baseMapper.updateById(ywThreshold); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean checkFace(List<FaceDTO> faceList) { |
| | | YwThreshold faceEntity = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .eq(YwThreshold::getMonitorType, BusinessTypeEnum.FACE) |
| | | .one(); |
| | | if (Objects.isNull(faceEntity)) { |
| | | throw new RuntimeException("请配置人脸的工单阈值"); |
| | | } |
| | | // todo 遍历条件,生成工单 |
| | | return Boolean.FALSE; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean checkCar(List<CarDTO> faceList) { |
| | | YwThreshold carEntity = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .eq(YwThreshold::getMonitorType, BusinessTypeEnum.CAR) |
| | | .one(); |
| | | if (Objects.isNull(carEntity)) { |
| | | throw new RuntimeException("请配置车辆的工单阈值"); |
| | | } |
| | | // todo 遍历条件,生成工单 |
| | | return Boolean.FALSE; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean checkVideo(List<VideoDTO> faceList) { |
| | | YwThreshold videoEntity = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .eq(YwThreshold::getMonitorType, BusinessTypeEnum.VIDEO) |
| | | .one(); |
| | | if (Objects.isNull(videoEntity)) { |
| | | throw new RuntimeException("请配置视频的工单阈值"); |
| | | } |
| | | // todo 遍历条件,生成工单 |
| | | return Boolean.FALSE; |
| | | } |
| | | |
| | | @Override |
| | | public FaceThresholdForm getFace(Integer id) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public CarThresholdForm getCar(Integer id) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public VideoThresholdForm getVideo(Integer id) { |
| | | YwThreshold result = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .select(YwThreshold::getImageQuality, |
| | | YwThreshold::getId, |
| | | YwThreshold::getMonitorType, |
| | | YwThreshold::getImageQualityAuto, |
| | | YwThreshold::getVideoQuality, |
| | | YwThreshold::getVideoQualityAuto, |
| | | YwThreshold::getAnnotationAccuracy, |
| | | YwThreshold::getAnnotationAccuracyAuto) |
| | | .eq(YwThreshold::getId, id) |
| | | .eq(YwThreshold::getMonitorType, BusinessTypeEnum.VIDEO) |
| | | .one(); |
| | | VideoThresholdForm form = new VideoThresholdForm(); |
| | | BeanUtils.copyProperties(result, form); |
| | | return form; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Result workList() { |
| | | List<YwUnitVO> entities = baseMapper.workList(); |
| | | return Result.ok().data(entities); |
| | | } |
| | | |
| | | @Override |
| | | public List<YwUnitVO> export(YwUnitQuery query) { |
| | | // 分页条件查询你 |
| | | IPage<YwUnit> page = new LambdaQueryChainWrapper<>(baseMapper) |
| New file |
| | |
| | | package com.ycl.properties; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.InitializingBean; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 请求相关配置 |
| | | * |
| | | * @author:xp |
| | | * @date:2024/4/18 15:12 |
| | | */ |
| | | @Configuration |
| | | @ConfigurationProperties(prefix = "request") |
| | | public class RequestProperties implements InitializingBean { |
| | | |
| | | /** 请求重试次数 */ |
| | | private Integer retry; |
| | | |
| | | /** 优云地址 */ |
| | | private String youYunDomain; |
| | | |
| | | /** 海康地址 */ |
| | | private String haiKangDomain; |
| | | |
| | | public Integer getRetry() { |
| | | return retry; |
| | | } |
| | | |
| | | public void setRetry(Integer retry) { |
| | | this.retry = retry; |
| | | } |
| | | |
| | | public String getYouYunDomain() { |
| | | return youYunDomain; |
| | | } |
| | | |
| | | public void setYouYunDomain(String youYunDomain) { |
| | | this.youYunDomain = youYunDomain; |
| | | } |
| | | |
| | | public String getHaiKangDomain() { |
| | | return haiKangDomain; |
| | | } |
| | | |
| | | public void setHaiKangDomain(String haiKangDomain) { |
| | | this.haiKangDomain = haiKangDomain; |
| | | } |
| | | |
| | | @Override |
| | | public void afterPropertiesSet() { |
| | | if (Objects.isNull(retry)) { |
| | | throw new IllegalArgumentException("请配置请求重试次数"); |
| | | } |
| | | if (StringUtils.isBlank(youYunDomain)) { |
| | | throw new IllegalArgumentException("请配置优云IP或域名"); |
| | | } |
| | | if (StringUtils.isBlank(youYunDomain)) { |
| | | throw new IllegalArgumentException("请配置海康IP或域名"); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package com.ycl.task; |
| | | |
| | | import com.ycl.platform.domain.entity.WorkOrder; |
| | | import com.ycl.properties.RequestProperties; |
| | | import com.ycl.utils.http.RetryHttpUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * @author:xp |
| | | * @date:2024/4/18 15:26 |
| | | */ |
| | | @Component("testJob") |
| | | @RequiredArgsConstructor |
| | | public class TestRequestJob { |
| | | |
| | | private final RequestProperties properties; |
| | | private final RetryHttpUtil retryHttpUtil; |
| | | |
| | | public void test() { |
| | | WorkOrder workOrder = retryHttpUtil.get("http://www.baidu.com/aa", "123", WorkOrder.class); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.utils.http; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.ycl.properties.RequestProperties; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.http.HttpEntity; |
| | | import org.apache.http.HttpResponse; |
| | | import org.apache.http.client.HttpClient; |
| | | import org.apache.http.client.methods.HttpGet; |
| | | import org.apache.http.client.methods.HttpPost; |
| | | import org.apache.http.entity.StringEntity; |
| | | import org.apache.http.impl.client.DefaultHttpRequestRetryHandler; |
| | | import org.apache.http.impl.client.HttpClientBuilder; |
| | | import org.apache.http.util.EntityUtils; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * 请求可重试 |
| | | * |
| | | * @author:xp |
| | | * @date:2024/4/18 14:30 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | @RequiredArgsConstructor |
| | | public class RetryHttpUtil { |
| | | |
| | | private final RequestProperties requestProperties; |
| | | |
| | | /** |
| | | * get请求 |
| | | * |
| | | * @param url 请求地址(带参数) |
| | | * @param token token |
| | | * @param returnType 响应数据类型 |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | public <T> T get(String url, String token, Class<T> returnType) { |
| | | HttpClient httpClient = HttpClientBuilder |
| | | .create() |
| | | .setRetryHandler(new DefaultHttpRequestRetryHandler(requestProperties.getRetry(), true)) |
| | | .build(); |
| | | try { |
| | | HttpGet request = new HttpGet(url); |
| | | request.setHeader("Authorization", "Bearer " + token); |
| | | HttpResponse response = httpClient.execute(request); |
| | | int statusCode = response.getStatusLine().getStatusCode(); |
| | | if (statusCode >= 200 && statusCode < 300) { |
| | | // 请求成功 |
| | | HttpEntity entity = response.getEntity(); |
| | | // json字符串转响应数据 |
| | | String responseBody = EntityUtils.toString(entity); |
| | | T t = JSON.parseObject(responseBody, returnType); |
| | | EntityUtils.consume(entity); |
| | | return t; |
| | | } else { |
| | | // 请求失败 |
| | | log.error("Request failed with status code: " + statusCode); |
| | | } |
| | | } catch (IOException e) { |
| | | // 请求发生异常 |
| | | log.error("Request failed with exception: " + e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * post请求 |
| | | * |
| | | * @param url 请求地址 |
| | | * @param data 请求体参数 |
| | | * @param token token |
| | | * @param returnType 返回的数据类型 |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | public <T> T post(String url, Object data, String token, Class<T> returnType) { |
| | | HttpClient httpClient = HttpClientBuilder |
| | | .create() |
| | | .setRetryHandler(new DefaultHttpRequestRetryHandler(requestProperties.getRetry(), true)) |
| | | .build(); |
| | | try { |
| | | HttpPost request = new HttpPost(url); |
| | | request.setHeader("Authorization", "Bearer " + token); |
| | | request.setHeader("Content-Type", "application/json;charset=UTF-8"); |
| | | StringEntity stringEntity = new StringEntity(JSON.toJSONString(data)); |
| | | request.setEntity(stringEntity); |
| | | HttpResponse response = httpClient.execute(request); |
| | | int statusCode = response.getStatusLine().getStatusCode(); |
| | | if (statusCode >= 200 && statusCode < 300) { |
| | | // 请求成功 |
| | | HttpEntity entity = response.getEntity(); |
| | | // json字符串转响应数据 |
| | | String responseBody = EntityUtils.toString(entity); |
| | | T t = JSON.parseObject(responseBody, returnType); |
| | | EntityUtils.consume(entity); |
| | | return t; |
| | | } else { |
| | | // 请求失败 |
| | | log.error("Request failed with status code: " + statusCode); |
| | | } |
| | | } catch (IOException e) { |
| | | // 请求发生异常 |
| | | log.error("Request failed with exception: " + e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | import io.netty.channel.socket.nio.NioServerSocketChannel; |
| | | import io.netty.handler.codec.http.HttpServerCodec; |
| | | import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * webscoket 服务 |
| | |
| | | * @author:xp |
| | | * @date:2024/4/11 17:47 |
| | | */ |
| | | @Slf4j |
| | | public class WebsocketServer { |
| | | |
| | | public static void runWebsocket() throws Exception { |
| | |
| | | |
| | | // 绑定服务器到指定的端口,并且等待绑定操作完成。 |
| | | ChannelFuture f = b.bind(8084).sync(); |
| | | |
| | | log.info("websocket启动成功"); |
| | | // 等待服务器的通道关闭。 |
| | | f.channel().closeFuture().sync(); |
| | | } finally { |
| | | workerGroup.shutdownGracefully(); |
| | | bossGroup.shutdownGracefully(); |
| | | log.info("websocket关闭"); |
| | | } |
| | | } |
| | | |
| | |
| | | excludes: /system/notice |
| | | # 匹配链接 |
| | | urlPatterns: /system/*,/monitor/*,/tool/* |
| | | |
| | | # 拉取数据请求配置 |
| | | request: |
| | | retry: 4 # 最大重试次数 |
| | | youYunDomain: 123.123.123.5 # 优云地址 |
| | | haiKangDomain: 123.123.123.1 # 海康地址 |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.platform.mapper.NotifyMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.platform.domain.vo.NotifyVO"> |
| | | <result column="id" property="id" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="notify_type" property="notifyType" /> |
| | | <result column="content" property="content" /> |
| | | <result column="notify_who" property="notifyWho" /> |
| | | <result column="readed" property="readed" /> |
| | | <result column="urgent" property="urgent" /> |
| | | <result column="work_order_id" property="workOrderId" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.platform.mapper.WorkOrderDistributeRecordMapper"> |
| | | |
| | | |
| | | <insert id="insertBatch"> |
| | | insert into t_work_order_distribute_record (work_order_id, user_id, create_time, deleted, distribute_way) |
| | | values |
| | | <foreach collection="list" item="item" separator=","> |
| | | (#{item.workOrderId}, #{item.userId}, now(), '0', #{item.distributeWay}) |
| | | </foreach> |
| | | </insert> |
| | | </mapper> |
| | |
| | | <resultMap type="YwThreshold" id="YwThresholdResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="monitorType" column="monitor_type"/> |
| | | <result property="timeout" column="timeout"/> |
| | | <result property="indicator" column="indicator"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="deleted" column="deleted"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectYwThresholdVo"> |
| | | select id, monitor_type, timeout, indicator, create_time, update_time, deleted |
| | | select id, monitor_type, create_time, update_time, deleted |
| | | from t_yw_threshold |
| | | </sql> |
| | | |
| | |
| | | insert into t_yw_threshold |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="monitorType != null and monitorType != ''">monitor_type,</if> |
| | | <if test="timeout != null">timeout,</if> |
| | | <if test="indicator != null">indicator,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="deleted != null">deleted,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="monitorType != null and monitorType != ''">#{monitorType},</if> |
| | | <if test="timeout != null">#{timeout},</if> |
| | | <if test="indicator != null">#{indicator},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="deleted != null">#{deleted},</if> |
| | |
| | | update t_yw_threshold |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="monitorType != null and monitorType != ''">monitor_type = #{monitorType},</if> |
| | | <if test="timeout != null">timeout = #{timeout},</if> |
| | | <if test="indicator != null">indicator = #{indicator},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="deleted != null">deleted = #{deleted},</if> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | | </mapper> |
| | |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <select id="workList" resultType="com.ycl.platform.domain.vo.YwUnitVO"> |
| | | SELECT |
| | | a.*, |
| | | COUNT(b.id) AS work_order_count |
| | | FROM |
| | | t_yw_unit a |
| | | LEFT JOIN |
| | | t_work_order b ON a.id = b.unit_id AND b.deleted = 0 AND b.status = 'WAIT_DISTRIBUTE' |
| | | WHERE |
| | | a.deleted = 0 |
| | | GROUP BY |
| | | a.id; |
| | | </select> |
| | | |
| | | <insert id="insertYwUnit" parameterType="YwUnit" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into t_yw_unit |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |