Merge remote-tracking branch 'origin/master'
# Conflicts:
# ycl-server/src/main/java/com/ycl/task/PythonTask.java
| New file |
| | |
| | | package enumeration; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * 设备厂商 |
| | | * |
| | | * @author:xp |
| | | * @date:2024/8/26 19:37 |
| | | */ |
| | | @Getter |
| | | public enum DeviceType { |
| | | |
| | | HK(0, "海康"), |
| | | DH(1, "大华"), |
| | | YS(2, "宇视"), |
| | | ; |
| | | |
| | | private final Integer type; |
| | | |
| | | private final String desc; |
| | | |
| | | |
| | | DeviceType(Integer type, String desc) { |
| | | this.type = type; |
| | | this.desc = desc; |
| | | } |
| | | } |
| New file |
| | |
| | | package enumeration.converter; |
| | | |
| | | import com.alibaba.excel.converters.Converter; |
| | | import com.alibaba.excel.enums.CellDataTypeEnum; |
| | | import com.alibaba.excel.metadata.GlobalConfiguration; |
| | | import com.alibaba.excel.metadata.data.ReadCellData; |
| | | import com.alibaba.excel.metadata.data.WriteCellData; |
| | | import com.alibaba.excel.metadata.property.ExcelContentProperty; |
| | | import enumeration.general.AlarmCategoryEnum; |
| | | |
| | | /** |
| | | * @author gonghl |
| | | * @since 2024/8/26 下午 4:00 |
| | | */ |
| | | public class AlarmCategoryConverter implements Converter<AlarmCategoryEnum> { |
| | | |
| | | @Override |
| | | public Class<?> supportJavaTypeKey() { |
| | | return Converter.super.supportJavaTypeKey(); |
| | | } |
| | | |
| | | @Override |
| | | public CellDataTypeEnum supportExcelTypeKey() { |
| | | return Converter.super.supportExcelTypeKey(); |
| | | } |
| | | |
| | | @Override |
| | | public AlarmCategoryEnum convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { |
| | | String value = cellData.getStringValue(); |
| | | if (AlarmCategoryEnum.SSH.getDesc().equals(value)) { |
| | | return AlarmCategoryEnum.SSH; |
| | | } |
| | | if (AlarmCategoryEnum.TELNET.getDesc().equals(value)) { |
| | | return AlarmCategoryEnum.TELNET; |
| | | } |
| | | if (AlarmCategoryEnum.RDP.getDesc().equals(value)) { |
| | | return AlarmCategoryEnum.RDP; |
| | | } |
| | | if (AlarmCategoryEnum.FTP.getDesc().equals(value)) { |
| | | return AlarmCategoryEnum.FTP; |
| | | } |
| | | if (AlarmCategoryEnum.DATABASE.getDesc().equals(value)) { |
| | | return AlarmCategoryEnum.DATABASE; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public WriteCellData<AlarmCategoryEnum> convertToExcelData(AlarmCategoryEnum value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { |
| | | return new WriteCellData<>(value.getDesc()); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package enumeration.converter; |
| | | |
| | | import com.alibaba.excel.converters.Converter; |
| | | import com.alibaba.excel.enums.CellDataTypeEnum; |
| | | import com.alibaba.excel.metadata.GlobalConfiguration; |
| | | import com.alibaba.excel.metadata.data.ReadCellData; |
| | | import com.alibaba.excel.metadata.data.WriteCellData; |
| | | import com.alibaba.excel.metadata.property.ExcelContentProperty; |
| | | import enumeration.general.AlarmLevelEnum; |
| | | |
| | | /** |
| | | * @author gonghl |
| | | * @since 2024/8/26 下午 4:00 |
| | | */ |
| | | public class AlarmLevelConverter implements Converter<AlarmLevelEnum> { |
| | | |
| | | @Override |
| | | public Class<?> supportJavaTypeKey() { |
| | | return Converter.super.supportJavaTypeKey(); |
| | | } |
| | | |
| | | @Override |
| | | public CellDataTypeEnum supportExcelTypeKey() { |
| | | return Converter.super.supportExcelTypeKey(); |
| | | } |
| | | |
| | | @Override |
| | | public AlarmLevelEnum convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception { |
| | | String value = cellData.getStringValue(); |
| | | if (AlarmLevelEnum.LOW.getDesc().equals(value)) { |
| | | return AlarmLevelEnum.LOW; |
| | | } |
| | | if (AlarmLevelEnum.MIDDLE.getDesc().equals(value)) { |
| | | return AlarmLevelEnum.MIDDLE; |
| | | } |
| | | if (AlarmLevelEnum.HIGH.getDesc().equals(value)) { |
| | | return AlarmLevelEnum.HIGH; |
| | | } |
| | | if (AlarmLevelEnum.VERY_HIGH.getDesc().equals(value)) { |
| | | return AlarmLevelEnum.VERY_HIGH; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public WriteCellData<AlarmLevelEnum> convertToExcelData(AlarmLevelEnum value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception { |
| | | return new WriteCellData<>(value.getDesc()); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.alibaba.excel.metadata.data.WriteCellData; |
| | | import com.alibaba.excel.metadata.property.ExcelContentProperty; |
| | | import enumeration.general.RuleDeductCategoryEnum; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * 扣分类型枚举装换器 |
| | | * |
| | | * @author gonghl |
| | | */ |
| | | @Slf4j |
| | | public class RuleDeductCategoryConverter implements Converter<RuleDeductCategoryEnum> { |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public RuleDeductCategoryEnum convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception { |
| | | public RuleDeductCategoryEnum convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { |
| | | if (cellData.getStringValue().equals(RuleDeductCategoryEnum.DEDUCT_POINTS.getDesc())) { |
| | | return RuleDeductCategoryEnum.DEDUCT_POINTS; |
| | | } else if (cellData.getStringValue().equals(RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY.getDesc())) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public WriteCellData convertToExcelData(RuleDeductCategoryEnum value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception { |
| | | return new WriteCellData(value.getDesc()); |
| | | public WriteCellData<RuleDeductCategoryEnum> convertToExcelData(RuleDeductCategoryEnum value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { |
| | | return new WriteCellData<>(value.getDesc()); |
| | | } |
| | | } |
| New file |
| | |
| | | package enumeration.general; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.EnumValue; |
| | | import com.fasterxml.jackson.annotation.JsonValue; |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @author gonghl |
| | | * @since 2024/8/26 下午 3:47 |
| | | */ |
| | | @Getter |
| | | public enum AlarmCategoryEnum { |
| | | |
| | | SSH("1", "SSH弱口令", 2), |
| | | TELNET("2", "Telnet弱口令", 2), |
| | | RDP("3", "RDP弱口令", 2), |
| | | FTP("4", "FTP弱口令", 6), |
| | | DATABASE("5", "数据库弱口令", 6); |
| | | |
| | | @EnumValue |
| | | private final String value; |
| | | @JsonValue |
| | | private final String desc; |
| | | private final Integer score; |
| | | |
| | | AlarmCategoryEnum(String value, String desc, Integer score) { |
| | | this.value = value; |
| | | this.desc = desc; |
| | | this.score = score; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package enumeration.general; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.EnumValue; |
| | | import com.fasterxml.jackson.annotation.JsonValue; |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @author gonghl |
| | | * @since 2024/8/26 下午 3:47 |
| | | */ |
| | | @Getter |
| | | public enum AlarmLevelEnum { |
| | | |
| | | LOW("1", "低危"), |
| | | MIDDLE("2", "中危"), |
| | | HIGH("3", "高危"), |
| | | VERY_HIGH("4", "超危"); |
| | | |
| | | @EnumValue |
| | | private final String value; |
| | | @JsonValue |
| | | private final String desc; |
| | | |
| | | AlarmLevelEnum(String value, String desc) { |
| | | this.value = value; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(value = "create_time",fill = FieldFill.INSERT) |
| | | private Date createTime; |
| | | |
| | |
| | | @Excel(name = "部门id") |
| | | private Long deptId; |
| | | |
| | | private String deptName; |
| | | |
| | | /** 平台运行率 */ |
| | | @Excel(name = "平台运行率") |
| | | private BigDecimal platformOnline; |
| | |
| | | package com.ycl.platform.domain.entity; |
| | | |
| | | import annotation.Excel; |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ycl.system.entity.BaseEntity; |
| | | import enumeration.converter.AlarmCategoryConverter; |
| | | import enumeration.converter.AlarmLevelConverter; |
| | | import enumeration.general.AlarmCategoryEnum; |
| | | import enumeration.general.AlarmLevelEnum; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | * @date 2024-08-24 |
| | | */ |
| | | @Data |
| | | public class ImageResourceSecurityDetail extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | @ColumnWidth(20) |
| | | public class ImageResourceSecurityDetail { |
| | | |
| | | /** $column.columnComment */ |
| | | @ExcelIgnore |
| | | private Long id; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | @ExcelProperty("IP地址") |
| | | private String ip; |
| | | |
| | | /** 部门id */ |
| | | @Excel(name = "部门id") |
| | | /** |
| | | * 部门id |
| | | */ |
| | | @ExcelIgnore |
| | | private Long deptId; |
| | | |
| | | /** 报警类型 */ |
| | | @Excel(name = "报警类型") |
| | | private String alarmCategory; |
| | | @ExcelProperty("部门名称") |
| | | @TableField(exist = false) |
| | | private String deptName; |
| | | |
| | | /** 报警级别 */ |
| | | @Excel(name = "报警级别") |
| | | private Long alarmLevel; |
| | | /** |
| | | * 报警类型 |
| | | */ |
| | | @ExcelProperty(value = "报警类型", converter = AlarmCategoryConverter.class) |
| | | private AlarmCategoryEnum alarmCategory; |
| | | |
| | | /** 报警次数 */ |
| | | @Excel(name = "报警次数") |
| | | /** |
| | | * 报警级别 |
| | | */ |
| | | @ExcelProperty(value = "报警级别", converter = AlarmLevelConverter.class) |
| | | private AlarmLevelEnum alarmLevel; |
| | | |
| | | /** |
| | | * 报警次数 |
| | | */ |
| | | @ExcelProperty("报警次数") |
| | | private Long num; |
| | | |
| | | /** 报警时间 */ |
| | | /** |
| | | * 报警时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "报警时间", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ExcelProperty("报警时间") |
| | | private Date alarmTime; |
| | | |
| | | @ExcelIgnore |
| | | private LocalDateTime createTime; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ycl.system.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | |
| | | * @author ruoyi |
| | | * @date 2024-03-04 |
| | | */ |
| | | @Data |
| | | public class TMonitor extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | @Excel(name = "类型编码 : [131.摄像机编码;132.网络摄像机编码;]") |
| | | private Long lxbm; |
| | | |
| | | public void setInstalledTime(Date installedTime) { |
| | | this.installedTime = installedTime; |
| | | } |
| | | /** 设备厂商: 0海康 1大华 2宇视*/ |
| | | private Integer deviceType; |
| | | |
| | | public Date getInstalledTime() { |
| | | return installedTime; |
| | | } |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setSerialNumber(String serialNumber) |
| | | { |
| | | this.serialNumber = serialNumber; |
| | | } |
| | | |
| | | public String getSerialNumber() |
| | | { |
| | | return serialNumber; |
| | | } |
| | | public void setName(String name) |
| | | { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getName() |
| | | { |
| | | return name; |
| | | } |
| | | public void setSiteType(Long siteType) |
| | | { |
| | | this.siteType = siteType; |
| | | } |
| | | |
| | | public Long getSiteType() |
| | | { |
| | | return siteType; |
| | | } |
| | | public void setMacAddr(String macAddr) |
| | | { |
| | | this.macAddr = macAddr; |
| | | } |
| | | |
| | | public String getMacAddr() |
| | | { |
| | | return macAddr; |
| | | } |
| | | public void setIp(String ip) |
| | | { |
| | | this.ip = ip; |
| | | } |
| | | |
| | | public String getIp() |
| | | { |
| | | return ip; |
| | | } |
| | | public void setCameraFunType(String cameraFunType) |
| | | { |
| | | this.cameraFunType = cameraFunType; |
| | | } |
| | | |
| | | public String getCameraFunType() |
| | | { |
| | | return cameraFunType; |
| | | } |
| | | public void setLongitude(String longitude) |
| | | { |
| | | this.longitude = longitude; |
| | | } |
| | | |
| | | public String getLongitude() |
| | | { |
| | | return longitude; |
| | | } |
| | | public void setLatitude(String latitude) |
| | | { |
| | | this.latitude = latitude; |
| | | } |
| | | |
| | | public String getLatitude() |
| | | { |
| | | return latitude; |
| | | } |
| | | public void setCameraCaptureArea(String cameraCaptureArea) |
| | | { |
| | | this.cameraCaptureArea = cameraCaptureArea; |
| | | } |
| | | |
| | | public String getCameraCaptureArea() |
| | | { |
| | | return cameraCaptureArea; |
| | | } |
| | | public void setOnState(Long onState) |
| | | { |
| | | this.onState = onState; |
| | | } |
| | | |
| | | public Long getOnState() |
| | | { |
| | | return onState; |
| | | } |
| | | public void setCivilCode(String civilCode) |
| | | { |
| | | this.civilCode = civilCode; |
| | | } |
| | | |
| | | public String getCivilCode() |
| | | { |
| | | return civilCode; |
| | | } |
| | | public void setIntegratedDevice(Long integratedDevice) |
| | | { |
| | | this.integratedDevice = integratedDevice; |
| | | } |
| | | |
| | | public Long getIntegratedDevice() |
| | | { |
| | | return integratedDevice; |
| | | } |
| | | public void setCameraBrand(Long cameraBrand) |
| | | { |
| | | this.cameraBrand = cameraBrand; |
| | | } |
| | | |
| | | public Long getCameraBrand() |
| | | { |
| | | return cameraBrand; |
| | | } |
| | | public void setAddress(String address) |
| | | { |
| | | this.address = address; |
| | | } |
| | | |
| | | public String getAddress() |
| | | { |
| | | return address; |
| | | } |
| | | public void setNetWorking(Long netWorking) |
| | | { |
| | | this.netWorking = netWorking; |
| | | } |
| | | |
| | | public Long getNetWorking() |
| | | { |
| | | return netWorking; |
| | | } |
| | | public void setPublicSecurity(String publicSecurity) |
| | | { |
| | | this.publicSecurity = publicSecurity; |
| | | } |
| | | |
| | | public String getPublicSecurity() |
| | | { |
| | | return publicSecurity; |
| | | } |
| | | |
| | | public void setManagementUnit(String managementUnit) |
| | | { |
| | | this.managementUnit = managementUnit; |
| | | } |
| | | |
| | | public String getManagementUnit() |
| | | { |
| | | return managementUnit; |
| | | } |
| | | public void setMuContactInfo(String muContactInfo) |
| | | { |
| | | this.muContactInfo = muContactInfo; |
| | | } |
| | | |
| | | public String getMuContactInfo() |
| | | { |
| | | return muContactInfo; |
| | | } |
| | | public void setStorageDays(Long storageDays) |
| | | { |
| | | this.storageDays = storageDays; |
| | | } |
| | | |
| | | public Long getStorageDays() |
| | | { |
| | | return storageDays; |
| | | } |
| | | public void setMonitorAzimuth(Long monitorAzimuth) |
| | | { |
| | | this.monitorAzimuth = monitorAzimuth; |
| | | } |
| | | |
| | | public Long getMonitorAzimuth() |
| | | { |
| | | return monitorAzimuth; |
| | | } |
| | | public void setScenePhotoAddr(String scenePhotoAddr) |
| | | { |
| | | this.scenePhotoAddr = scenePhotoAddr; |
| | | } |
| | | |
| | | public String getScenePhotoAddr() |
| | | { |
| | | return scenePhotoAddr; |
| | | } |
| | | public void setModel(String model) |
| | | { |
| | | this.model = model; |
| | | } |
| | | |
| | | public String getModel() |
| | | { |
| | | return model; |
| | | } |
| | | public void setSiteVulgo(String siteVulgo) |
| | | { |
| | | this.siteVulgo = siteVulgo; |
| | | } |
| | | |
| | | public String getSiteVulgo() |
| | | { |
| | | return siteVulgo; |
| | | } |
| | | public void setCameraType(Long cameraType) |
| | | { |
| | | this.cameraType = cameraType; |
| | | } |
| | | |
| | | public Long getCameraType() |
| | | { |
| | | return cameraType; |
| | | } |
| | | public void setCameraLightType(Long cameraLightType) |
| | | { |
| | | this.cameraLightType = cameraLightType; |
| | | } |
| | | |
| | | public Long getCameraLightType() |
| | | { |
| | | return cameraLightType; |
| | | } |
| | | public void setEncodedFormat(Long encodedFormat) |
| | | { |
| | | this.encodedFormat = encodedFormat; |
| | | } |
| | | |
| | | public Long getEncodedFormat() |
| | | { |
| | | return encodedFormat; |
| | | } |
| | | public void setCameraDept(String cameraDept) |
| | | { |
| | | this.cameraDept = cameraDept; |
| | | } |
| | | |
| | | public String getCameraDept() |
| | | { |
| | | return cameraDept; |
| | | } |
| | | public void setHybm(String hybm) |
| | | { |
| | | this.hybm = hybm; |
| | | } |
| | | |
| | | public String getHybm() |
| | | { |
| | | return hybm; |
| | | } |
| | | public void setLxbm(Long lxbm) |
| | | { |
| | | this.lxbm = lxbm; |
| | | } |
| | | |
| | | public Long getLxbm() |
| | | { |
| | | return lxbm; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TMonitor{" + |
| | | "id=" + id + |
| | | ", serialNumber='" + serialNumber + '\'' + |
| | | ", name='" + name + '\'' + |
| | | ", siteType=" + siteType + |
| | | ", macAddr='" + macAddr + '\'' + |
| | | ", ip='" + ip + '\'' + |
| | | ", cameraFunType='" + cameraFunType + '\'' + |
| | | ", longitude='" + longitude + '\'' + |
| | | ", latitude='" + latitude + '\'' + |
| | | ", cameraCaptureArea='" + cameraCaptureArea + '\'' + |
| | | ", onState=" + onState + |
| | | ", civilCode='" + civilCode + '\'' + |
| | | ", integratedDevice=" + integratedDevice + |
| | | ", cameraBrand=" + cameraBrand + |
| | | ", address='" + address + '\'' + |
| | | ", netWorking=" + netWorking + |
| | | ", publicSecurity='" + publicSecurity + '\'' + |
| | | ", installedTime=" + installedTime + |
| | | ", managementUnit='" + managementUnit + '\'' + |
| | | ", muContactInfo='" + muContactInfo + '\'' + |
| | | ", storageDays=" + storageDays + |
| | | ", monitorAzimuth=" + monitorAzimuth + |
| | | ", scenePhotoAddr='" + scenePhotoAddr + '\'' + |
| | | ", model='" + model + '\'' + |
| | | ", siteVulgo='" + siteVulgo + '\'' + |
| | | ", cameraType=" + cameraType + |
| | | ", cameraLightType=" + cameraLightType + |
| | | ", encodedFormat=" + encodedFormat + |
| | | ", cameraDept='" + cameraDept + '\'' + |
| | | ", hybm='" + hybm + '\'' + |
| | | ", lxbm=" + lxbm + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("工单ID") |
| | | @TableField("work_order_id") |
| | | private Integer workOrderId; |
| | | @ApiModelProperty("工单号") |
| | | @TableField("work_order_no") |
| | | private String workOrderNo; |
| | | |
| | | @ApiModelProperty("审核人") |
| | | @TableField("auditing_user") |
| | |
| | | private Integer unitId; |
| | | |
| | | /** |
| | | * 故障类型 |
| | | */ |
| | | private List<String> errorTypeList; |
| | | |
| | | /** |
| | | * 工单id |
| | | */ |
| | | @JsonProperty("ids") |
| New file |
| | |
| | | package com.ycl.handler; |
| | | |
| | | import com.alibaba.excel.write.handler.SheetWriteHandler; |
| | | import com.alibaba.excel.write.handler.context.SheetWriteHandlerContext; |
| | | import org.apache.poi.ss.usermodel.DataValidation; |
| | | import org.apache.poi.ss.usermodel.DataValidationConstraint; |
| | | import org.apache.poi.ss.usermodel.DataValidationHelper; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.util.CellRangeAddressList; |
| | | |
| | | /** |
| | | * @author gonghl |
| | | * @since 2024/8/26 下午 1:38 |
| | | */ |
| | | public class ImageResourceHandler implements SheetWriteHandler { |
| | | |
| | | @Override |
| | | public void afterSheetCreate(SheetWriteHandlerContext context) { |
| | | Sheet sheet = context.getWriteSheetHolder().getSheet(); |
| | | // 区域/单位名称 |
| | | CellRangeAddressList cellRangeAddressList3 = new CellRangeAddressList(1, 9999, 1, 1); |
| | | DataValidationHelper helper3 = context.getWriteSheetHolder().getSheet().getDataValidationHelper(); |
| | | DataValidationConstraint constraint3 = helper3.createExplicitListConstraint(new String[]{"富顺县公安局", "大安区公安局", "自流井区公安局", "贡井区公安局", "荣县公安局", "自贡市公安局", "高新区公安局", "沿滩区公安局"}); |
| | | DataValidation dataValidation3 = helper3.createValidation(constraint3, cellRangeAddressList3); |
| | | // 报警类型 |
| | | CellRangeAddressList cellRangeAddressList = new CellRangeAddressList(1, 9999, 2, 2); |
| | | DataValidationHelper helper = context.getWriteSheetHolder().getSheet().getDataValidationHelper(); |
| | | DataValidationConstraint constraint = helper.createExplicitListConstraint(new String[]{"SSH弱口令", "Telnet弱口令", "RDP弱口令", "FTP弱口令", "数据库弱口令"}); |
| | | DataValidation dataValidation = helper.createValidation(constraint, cellRangeAddressList); |
| | | // 报警级别 |
| | | CellRangeAddressList cellRangeAddressList2 = new CellRangeAddressList(1, 9999, 3, 3); |
| | | DataValidationHelper helper2 = context.getWriteSheetHolder().getSheet().getDataValidationHelper(); |
| | | DataValidationConstraint constraint2 = helper2.createExplicitListConstraint(new String[]{"低危", "中危", "高危", "超危"}); |
| | | DataValidation dataValidation2 = helper2.createValidation(constraint2, cellRangeAddressList2); |
| | | sheet.addValidationData(dataValidation); |
| | | sheet.addValidationData(dataValidation2); |
| | | sheet.addValidationData(dataValidation3); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.ycl.system.AjaxResult; |
| | | import com.ycl.system.controller.BaseController; |
| | | 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.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ImageResourceSecurity imageResourceSecurity) |
| | | { |
| | | startPage(); |
| | | List<ImageResourceSecurity> list = imageResourceSecurityService.selectImageResourceSecurityList(imageResourceSecurity); |
| | | return getDataTable(list); |
| | | } |
| | |
| | | { |
| | | return toAjax(imageResourceSecurityService.updateImageResourceSecurity(imageResourceSecurity)); |
| | | } |
| | | |
| | | /** |
| | | * 导入模板 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('platform:security:list')") |
| | | @Log(title = "导入模板", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/importTemplate") |
| | | public void importTemplate(HttpServletResponse response) { |
| | | imageResourceSecurityService.importTemplate(response); |
| | | } |
| | | |
| | | /** |
| | | * 导入数据 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('platform:security:list')") |
| | | @Log(title = "导入", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/importData") |
| | | public AjaxResult importData(MultipartFile file) { |
| | | return toAjax(imageResourceSecurityService.importData(file)); |
| | | } |
| | | |
| | | } |
| | |
| | | return workOrderService.ywCondition(form); |
| | | } |
| | | |
| | | @GetMapping("/yw-condition/{id}") |
| | | @GetMapping("/yw-condition/{workOrderNo}") |
| | | @ApiOperation(value = "运维情况", notes = "运维情况") |
| | | public Result ywCondition(@PathVariable Integer id) { |
| | | return workOrderService.selectYwConditionByYwId(id); |
| | | public Result ywCondition(@PathVariable String workOrderNo) { |
| | | return workOrderService.selectYwConditionByYwId(workOrderNo); |
| | | } |
| | | |
| | | @GetMapping("/yw-auditing-list/{id}") |
| | | @GetMapping("/yw-auditing-list/{workOrderNo}") |
| | | @ApiOperation(value = "运维审核记录", notes = "运维审核记录") |
| | | public Result ywAuditingByYwId(@PathVariable @Validated(Update.class) String id) { |
| | | return workOrderService.selectYwAuditingListByYwId(id); |
| | | public Result ywAuditingByYwId(@PathVariable String workOrderNo) { |
| | | return workOrderService.selectYwAuditingListByYwId(workOrderNo); |
| | | } |
| | | |
| | | @PutMapping("/yw-result") |
| | |
| | | * @return 数据 |
| | | */ |
| | | CheckIndexVideo dashboard(DashboardQuery dashboardQuery); |
| | | |
| | | /** |
| | | * 查询视频指标概率数据带上部门名称 |
| | | * @return 视频指标概率数据集合 |
| | | */ |
| | | List<CheckIndexVideo> selectAndDeptName(); |
| | | } |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurityDetail; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteImageResourceSecurityDetailByIds(Long[] ids); |
| | | |
| | | /** |
| | | * 批量插入 |
| | | * @param list 数据 |
| | | */ |
| | | void saveBatch(ArrayList<ImageResourceSecurityDetail> list); |
| | | |
| | | /** |
| | | * 定时任务获取详情计算 |
| | | * @return 数据 |
| | | */ |
| | | @Select("select dept_id, alarm_category, alarm_level, num from t_image_resource_security_detail") |
| | | List<ImageResourceSecurityDetail> getList(); |
| | | } |
| | |
| | | |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurity; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteImageResourceSecurityByIds(Long[] ids); |
| | | |
| | | /** |
| | | * 批量保存 |
| | | * @param imageResourceSecurities 数据集合 |
| | | */ |
| | | void saveBatch(ArrayList<ImageResourceSecurity> imageResourceSecurities); |
| | | } |
| | |
| | | |
| | | void deleteAll(); |
| | | |
| | | /** |
| | | * 批量修改设备厂商类型 |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | int batchUpdateDeviceType(@Param("list") List<TMonitor> list); |
| | | } |
| | |
| | | /** |
| | | * 根据工单ID查询运维记录 |
| | | * |
| | | * @param workOrderId |
| | | * @param workOrderNo |
| | | * @return |
| | | */ |
| | | List<WorkOrderYwConditionRecordVO> selectYwConditionByYwId(@Param("workOrderId") Integer workOrderId); |
| | | List<WorkOrderYwConditionRecordVO> selectYwConditionByYwId(@Param("workOrderNo") String workOrderNo); |
| | | |
| | | /** |
| | | * 批量插入 |
| New file |
| | |
| | | package com.ycl.platform.service; |
| | | |
| | | import com.ycl.platform.domain.result.HK.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 海康检测 |
| | | * |
| | | * @author:xp |
| | | * @date:2024/8/24 17:45 |
| | | */ |
| | | public interface HKErrorTypeService { |
| | | |
| | | /** |
| | | * 抓拍数据量监测结果 车辆/人脸 |
| | | * |
| | | */ |
| | | void snapshotDataMonitorTaskCheck(List<SnapshotDataMonitorResult> dataList); |
| | | |
| | | |
| | | /** |
| | | * 采集设备属性监测结果(人脸) |
| | | * |
| | | */ |
| | | void monitorDetailTaskCheck(List<MonitoringDetailResult> dataList); |
| | | |
| | | |
| | | /** |
| | | * 卡口属性监测结果 |
| | | * |
| | | */ |
| | | void crossDetailTaskCheck(List<CrossDetailResult> dataList); |
| | | |
| | | |
| | | /** |
| | | * 数据完整性监测结果 |
| | | * |
| | | */ |
| | | void dataIntegrityMonitoringTaskCheck(List<DataIntegrityMonitoringResult> dataList); |
| | | |
| | | |
| | | /** |
| | | * 属性识别准确监测结果 |
| | | * |
| | | */ |
| | | void attrRecognitionMonitorTaskCheck(List<AttrRecognitionMonitorResult> dataList); |
| | | |
| | | |
| | | /** |
| | | * 抓拍数据时延监测结果 |
| | | * |
| | | */ |
| | | void snapshopDelayMonitorTaskCheck(List<SnapshotDelayMonitorResult> dataList); |
| | | |
| | | |
| | | /** |
| | | * 图片访问监测结果 |
| | | * |
| | | */ |
| | | void picAccessTaskCheck(List<PicAccessResult> dataList); |
| | | |
| | | |
| | | /** |
| | | * 车辆设备抽检指标监测结果 |
| | | * |
| | | */ |
| | | void vehicleDeviceSamplingTaskCheck(List<VehicleDeviceSamplingResult> dataList); |
| | | |
| | | |
| | | /** |
| | | * 人脸设备抽检指标监测结果 |
| | | * |
| | | */ |
| | | void faceDeviceSamplingTaskCheck(List<FaceDeviceSamplingResult> dataList); |
| | | } |
| | |
| | | package com.ycl.platform.service; |
| | | |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurity; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteImageResourceSecurityById(Long id); |
| | | |
| | | /** |
| | | * 导入模板 |
| | | * @param response 文件 |
| | | */ |
| | | void importTemplate(HttpServletResponse response); |
| | | |
| | | /** |
| | | * 导入数据 |
| | | * @param file 数据 |
| | | * @return 结果 |
| | | */ |
| | | Boolean importData(MultipartFile file); |
| | | |
| | | /** |
| | | * 批量保存 |
| | | * @param imageResourceSecurities 数据集合 |
| | | */ |
| | | void saveBatch(ArrayList<ImageResourceSecurity> imageResourceSecurities); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 获取工单运维情况 |
| | | * @param id 工单id |
| | | * @param workOrderNo 工单号 |
| | | * @return 工单运维情况 |
| | | */ |
| | | Result selectYwConditionByYwId(Integer id); |
| | | Result selectYwConditionByYwId(String workOrderNo); |
| | | |
| | | /** |
| | | * 获取工单运维审核记录 |
| | | * @param id 工单id |
| | | * @param workOrderNo 工单号 |
| | | * @return 工单运维审核记录 |
| | | */ |
| | | Result selectYwAuditingListByYwId(String id); |
| | | Result selectYwAuditingListByYwId(String workOrderNo); |
| | | |
| | | /** |
| | | * 批量下发 |
| New file |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.ycl.platform.domain.entity.WorkOrder; |
| | | import com.ycl.platform.domain.result.HK.*; |
| | | import com.ycl.platform.service.HKErrorTypeService; |
| | | import com.ycl.platform.service.WorkOrderService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author:xp |
| | | * @date:2024/8/24 17:58 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class HKErrorTypeServiceImpl implements HKErrorTypeService { |
| | | |
| | | private final WorkOrderService workOrderService; |
| | | |
| | | /** |
| | | * 抓拍数据量监测结果 车辆/人脸 |
| | | * |
| | | * @param dataList |
| | | */ |
| | | @Override |
| | | public void snapshotDataMonitorTaskCheck(List<SnapshotDataMonitorResult> dataList) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void monitorDetailTaskCheck(List<MonitoringDetailResult> dataList) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void crossDetailTaskCheck(List<CrossDetailResult> dataList) { |
| | | // dataList.stream().map(item -> { |
| | | // WorkOrder workOrder = new WorkOrder(); |
| | | // if (item.get) |
| | | // }) |
| | | } |
| | | |
| | | @Override |
| | | public void dataIntegrityMonitoringTaskCheck(List<DataIntegrityMonitoringResult> dataList) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void attrRecognitionMonitorTaskCheck(List<AttrRecognitionMonitorResult> dataList) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void snapshopDelayMonitorTaskCheck(List<SnapshotDelayMonitorResult> dataList) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void picAccessTaskCheck(List<PicAccessResult> dataList) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void vehicleDeviceSamplingTaskCheck(List<VehicleDeviceSamplingResult> dataList) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void faceDeviceSamplingTaskCheck(List<FaceDeviceSamplingResult> dataList) { |
| | | |
| | | } |
| | | } |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.read.listener.PageReadListener; |
| | | import com.ycl.handler.ImageResourceHandler; |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurity; |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurityDetail; |
| | | import com.ycl.platform.mapper.ImageResourceSecurityDetailMapper; |
| | | import com.ycl.platform.mapper.ImageResourceSecurityMapper; |
| | | import com.ycl.platform.service.IImageResourceSecurityService; |
| | | import com.ycl.system.entity.SysDept; |
| | | import com.ycl.system.service.ISysDeptService; |
| | | import com.ycl.utils.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.SneakyThrows; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @date 2024-08-24 |
| | | */ |
| | | @Service |
| | | public class ImageResourceSecurityServiceImpl implements IImageResourceSecurityService |
| | | { |
| | | @Autowired |
| | | private ImageResourceSecurityMapper imageResourceSecurityMapper; |
| | | @RequiredArgsConstructor |
| | | public class ImageResourceSecurityServiceImpl implements IImageResourceSecurityService { |
| | | |
| | | /** |
| | | * 查询platform |
| | | * |
| | | * @param id platform主键 |
| | | * @return platform |
| | | */ |
| | | private final ImageResourceSecurityMapper imageResourceSecurityMapper; |
| | | private final ImageResourceSecurityDetailMapper imageResourceSecurityDetailMapper; |
| | | private final ISysDeptService deptService; |
| | | |
| | | @Override |
| | | public ImageResourceSecurity selectImageResourceSecurityById(Long id) |
| | | { |
| | | public ImageResourceSecurity selectImageResourceSecurityById(Long id) { |
| | | return imageResourceSecurityMapper.selectImageResourceSecurityById(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询platform列表 |
| | | * |
| | | * @param imageResourceSecurity platform |
| | | * @return platform |
| | | */ |
| | | @Override |
| | | public List<ImageResourceSecurity> selectImageResourceSecurityList(ImageResourceSecurity imageResourceSecurity) |
| | | { |
| | | public List<ImageResourceSecurity> selectImageResourceSecurityList(ImageResourceSecurity imageResourceSecurity) { |
| | | return imageResourceSecurityMapper.selectImageResourceSecurityList(imageResourceSecurity); |
| | | } |
| | | |
| | | /** |
| | | * 新增platform |
| | | * |
| | | * @param imageResourceSecurity platform |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertImageResourceSecurity(ImageResourceSecurity imageResourceSecurity) |
| | | { |
| | | public int insertImageResourceSecurity(ImageResourceSecurity imageResourceSecurity) { |
| | | imageResourceSecurity.setCreateTime(DateUtils.getNowDate()); |
| | | return imageResourceSecurityMapper.insertImageResourceSecurity(imageResourceSecurity); |
| | | } |
| | | |
| | | /** |
| | | * 修改platform |
| | | * |
| | | * @param imageResourceSecurity platform |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateImageResourceSecurity(ImageResourceSecurity imageResourceSecurity) |
| | | { |
| | | public int updateImageResourceSecurity(ImageResourceSecurity imageResourceSecurity) { |
| | | return imageResourceSecurityMapper.updateImageResourceSecurity(imageResourceSecurity); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除platform |
| | | * |
| | | * @param ids 需要删除的platform主键 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteImageResourceSecurityByIds(Long[] ids) |
| | | { |
| | | public int deleteImageResourceSecurityByIds(Long[] ids) { |
| | | return imageResourceSecurityMapper.deleteImageResourceSecurityByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * 删除platform信息 |
| | | * |
| | | * @param id platform主键 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteImageResourceSecurityById(Long id) |
| | | { |
| | | public int deleteImageResourceSecurityById(Long id) { |
| | | return imageResourceSecurityMapper.deleteImageResourceSecurityById(id); |
| | | } |
| | | |
| | | @Override |
| | | @SneakyThrows |
| | | public void importTemplate(HttpServletResponse response) { |
| | | EasyExcel.write(response.getOutputStream(), ImageResourceSecurityDetail.class).sheet("模板").registerWriteHandler(new ImageResourceHandler()).doWrite(Collections.emptyList()); |
| | | } |
| | | |
| | | @Override |
| | | @SneakyThrows |
| | | public Boolean importData(MultipartFile file) { |
| | | ArrayList<ImageResourceSecurityDetail> list = new ArrayList<>(); |
| | | List<SysDept> sysDept = deptService.selectDeptList(new SysDept()); |
| | | EasyExcel.read(file.getInputStream(), ImageResourceSecurityDetail.class, new PageReadListener<ImageResourceSecurityDetail>(dataList -> { |
| | | for (ImageResourceSecurityDetail detail : dataList) { |
| | | SysDept sysDept1 = sysDept.stream().filter(dept -> dept.getDeptName().equals(detail.getDeptName())).findFirst().orElseThrow(() -> new RuntimeException(detail.getDeptName() + "不存在")); |
| | | detail.setDeptId(sysDept1.getDeptId()); |
| | | list.add(detail); |
| | | } |
| | | })).sheet().doRead(); |
| | | imageResourceSecurityDetailMapper.saveBatch(list); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public void saveBatch(ArrayList<ImageResourceSecurity> imageResourceSecurities) { |
| | | imageResourceSecurityMapper.saveBatch(imageResourceSecurities); |
| | | } |
| | | } |
| | |
| | | ywRecord.setCommitUser(1); |
| | | ywRecord.setYwCondition("故障类型更新,工单状态调整为待处理"); |
| | | ywRecord.setCreateTime(new Date()); |
| | | ywRecord.setSysMsg(Boolean.TRUE); |
| | | willAddMsg.add(ywRecord); |
| | | } |
| | | } else { |
| | |
| | | baseMapper.updateById(workOrder); |
| | | // 添加一条审核记录 |
| | | WorkOrderAuditingRecord workOrderAuditingRecord = new WorkOrderAuditingRecord(); |
| | | workOrderAuditingRecord.setWorkOrderId(workOrder.getId()); |
| | | workOrderAuditingRecord.setWorkOrderNo(workOrder.getWorkOrderNo()); |
| | | workOrderAuditingRecord.setAuditingUser(SecurityUtils.getLoginUser().getUserId().intValue()); |
| | | workOrderAuditingRecord.setResult(form.getAuditingResult().getDesc()); |
| | | workOrderAuditingRecord.setRemark(form.getAuditingRemark()); |
| | |
| | | if (list.isEmpty()) { |
| | | return Result.error("没有工单可以审核"); |
| | | } |
| | | List<Integer> ids = list.stream().map(WorkOrder::getId).collect(Collectors.toList()); |
| | | List<String> workOrderNoList = list.stream().map(WorkOrder::getWorkOrderNo).collect(Collectors.toList()); |
| | | List<String> serialNumbers = list.stream().map(WorkOrder::getSerialNumber).toList(); |
| | | // 工单状态 |
| | | LambdaUpdateWrapper<WorkOrder> lambdaUpdateWrapper = new LambdaUpdateWrapper<>(); |
| | | lambdaUpdateWrapper.in(WorkOrder::getId, ids); |
| | | lambdaUpdateWrapper.in(WorkOrder::getWorkOrderNo, workOrderNoList); |
| | | lambdaUpdateWrapper.set(WorkOrder::getStatus, form.getAuditingResult()); |
| | | baseMapper.update(lambdaUpdateWrapper); |
| | | // 添加多条审核记录 |
| | | List<WorkOrderAuditingRecord> workOrderAuditingRecords = new ArrayList<>(); |
| | | for (Integer id : ids) { |
| | | for (String workOrderNo : workOrderNoList) { |
| | | WorkOrderAuditingRecord workOrderAuditingRecord = new WorkOrderAuditingRecord(); |
| | | workOrderAuditingRecord.setWorkOrderId(id); |
| | | workOrderAuditingRecord.setWorkOrderNo(workOrderNo); |
| | | workOrderAuditingRecord.setAuditingUser(SecurityUtils.getLoginUser().getUserId().intValue()); |
| | | workOrderAuditingRecord.setResult(form.getAuditingResult().getDesc()); |
| | | workOrderAuditingRecord.setRemark(form.getAuditingRemark()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Result selectYwConditionByYwId(Integer id) { |
| | | List<WorkOrderYwConditionRecordVO> ywConditionList = workOrderYwConditionRecordMapper.selectYwConditionByYwId(id); |
| | | public Result selectYwConditionByYwId(String workOrderNo) { |
| | | List<WorkOrderYwConditionRecordVO> ywConditionList = workOrderYwConditionRecordMapper.selectYwConditionByYwId(workOrderNo); |
| | | ywConditionList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getSysMsg()) && item.getSysMsg()) { |
| | | item.setCommitUserName("系统消息"); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Result selectYwAuditingListByYwId(String id) { |
| | | public Result selectYwAuditingListByYwId(String workOrderNo) { |
| | | return Result.ok().data( |
| | | new LambdaQueryChainWrapper<>(workOrderAuditingRecordMapper) |
| | | .eq(WorkOrderAuditingRecord::getWorkOrderId, id) |
| | | .eq(WorkOrderAuditingRecord::getWorkOrderNo, workOrderNo) |
| | | .orderByAsc(WorkOrderAuditingRecord::getCreateTime) |
| | | .list()); |
| | | } |
| | |
| | | public String getFrameImgByDevice(String deviceId, String channelId) { |
| | | String url = String.format(this.rtspServer + "/start/%s/%s", deviceId, channelId); |
| | | String result = HttpUtils.sendGet(url); |
| | | log.error("拿到取流响应结果:" + result); |
| | | WVPResult wvpResult = JSON.parseObject(result, WVPResult.class); |
| | | if (0 == wvpResult.getCode()) { |
| | | log.error("请求成功"); |
| | | StreamContent data = (StreamContent) wvpResult.getData(); |
| | | log.error("拿到取流响应结果:" + data); |
| | | String rtspUrl = data.getRtsp(); |
| | | if (StringUtils.hasText(rtspUrl)) { |
| | | try { |
| | |
| | | } |
| | | |
| | | |
| | | //抓拍数据量监测结果 |
| | | // 抓拍数据量监测结果 |
| | | public void snapshotDataMonitorTask() { |
| | | log.info("开始执行抓拍数据量检测结果数据同步"); |
| | | /** 车辆数据 */ |
| | |
| | | //TODO:工单处理 |
| | | log.info("结束图片访问监测结果数据同步"); |
| | | } |
| | | |
| | | //车辆设备抽检指标监测结果 |
| | | public void vehicleDeviceSamplingTask() { |
| | | log.info("开始执行车辆设备抽检指标监测结果数据同步"); |
| New file |
| | |
| | | package com.ycl.task; |
| | | |
| | | import com.ycl.platform.domain.entity.CheckIndexVideo; |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurity; |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurityDetail; |
| | | import com.ycl.platform.mapper.CheckIndexVideoMapper; |
| | | import com.ycl.platform.mapper.ImageResourceSecurityDetailMapper; |
| | | import com.ycl.platform.service.IImageResourceSecurityService; |
| | | import com.ycl.utils.DateUtils; |
| | | import com.ycl.utils.DictUtils; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @author gonghl |
| | | * @since 2024/8/26 下午 4:43 |
| | | */ |
| | | @Component("ImageResourceSecurityTask") |
| | | @RequiredArgsConstructor |
| | | public class ImageResourceSecurityTask { |
| | | |
| | | private final IImageResourceSecurityService imageResourceSecurityService; |
| | | private final CheckIndexVideoMapper checkIndexVideoMapper; |
| | | private final ImageResourceSecurityDetailMapper imageResourceSecurityDetailMapper; |
| | | |
| | | /** |
| | | * 每天晚上1点执行 |
| | | */ |
| | | @Scheduled(cron = "0 0 1 * * ?") |
| | | public void calc() { |
| | | ArrayList<ImageResourceSecurity> imageResourceSecurities = new ArrayList<>(); |
| | | List<CheckIndexVideo> list = checkIndexVideoMapper.selectAndDeptName(); |
| | | List<ImageResourceSecurityDetail> detail = imageResourceSecurityDetailMapper.getList(); |
| | | |
| | | // 每个部门循环一次计算数据 |
| | | for (CheckIndexVideo checkIndexVideo : list) { |
| | | ImageResourceSecurity imageResourceSecurity = new ImageResourceSecurity(); |
| | | imageResourceSecurity.setDeptId(checkIndexVideo.getDeptId()); |
| | | // 直接取指标 |
| | | imageResourceSecurity.setPlatformOnline(checkIndexVideo.getPlatformOnline()); |
| | | imageResourceSecurity.setPropertyAccuracy(checkIndexVideo.getMonitorQualification()); |
| | | // 获取当前部门的detail进行计算 |
| | | List<ImageResourceSecurityDetail> detailList = detail.stream().filter(imageResourceSecurityDetail -> Objects.equals(imageResourceSecurityDetail.getDeptId(), checkIndexVideo.getDeptId())).toList(); |
| | | int score = 100; |
| | | int count = 0; |
| | | // 循环detail计算 |
| | | for (ImageResourceSecurityDetail imageResourceSecurityDetail : detailList) { |
| | | // 扣除分数 |
| | | score -= imageResourceSecurityDetail.getAlarmCategory().getScore(); |
| | | imageResourceSecurity.setWeakPassword(BigDecimal.valueOf(score)); |
| | | // 统计数量 |
| | | if (Integer.parseInt(imageResourceSecurityDetail.getAlarmLevel().getValue()) > 1) { |
| | | count++; |
| | | } |
| | | } |
| | | // 获取字典值-总数 |
| | | int onlineAssetsTotal = Integer.parseInt(DictUtils.getDictValue("online_assets_total", checkIndexVideo.getDeptName())); |
| | | imageResourceSecurity.setRiskProperty(BigDecimal.valueOf(count / onlineAssetsTotal)); |
| | | imageResourceSecurity.setCreateTime(DateUtils.getNowDate()); |
| | | imageResourceSecurities.add(imageResourceSecurity); |
| | | } |
| | | imageResourceSecurityService.saveBatch(imageResourceSecurities); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | import com.ycl.platform.domain.vo.DeviceInfoVO; |
| | | import com.ycl.platform.service.WorkOrderService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | |
| | | * @author:xp |
| | | * @date:2024/8/21 11:56 |
| | | */ |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | @Component("workOrderImgTask") |
| | | public class WorkOrderImgTask { |
| | |
| | | spring: |
| | | # 数据源配置 |
| | | datasource: |
| | | url: jdbc:mysql://101.35.247.188/zgyw?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowMultiQueries=true |
| | | url: jdbc:mysql://101.35.247.188/zgyw?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowMultiQueries=true&allowPublicKeyRetrieval=true |
| | | username: root |
| | | password: ycl@202466 |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | |
| | | spring.data: |
| | | redis: |
| | | # 地址 |
| | | host: 42.193.1.25 |
| | | #host: 42.193.1.25 |
| | | host: 127.0.0.1 |
| | | # 端口,默认为6379 |
| | | port: 6379 |
| | | password: ycl2018 |
| | | #password: ycl2018 |
| | | password: |
| | | # 数据库索引 |
| | | database: 0 |
| | | # 密码(如没有密码请注释掉) |
| | |
| | | retry: 4 # 最大重试次数 |
| | | youYunDomain: http://51.92.65.56 # 优云地址 |
| | | haiKangDomain: 51.92.65.48 # 海康地址 |
| | | pythonDomain: 11 # python脚本地址 |
| | | |
| | | youYun: |
| | | tenantId: e10adc3949ba59abbe56e057f20f88dd |
| | |
| | | retry: 4 # 最大重试次数 |
| | | youYunDomain: http://51.92.65.56 # 优云地址 |
| | | haiKangDomain: 51.92.65.48 # 海康地址 |
| | | pythonDomain: 11 # python脚本地址 |
| | | |
| | | youYun: |
| | | tenantId: e10adc3949ba59abbe56e057f20f88dd |
| | |
| | | LIMIT 1 |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectAndDeptName" resultType="com.ycl.platform.domain.entity.CheckIndexVideo"> |
| | | WITH temp AS ( |
| | | SELECT |
| | | r.dept_id, |
| | | r.platform_online, |
| | | r.monitor_qualification, |
| | | d.area, |
| | | ROW_NUMBER() OVER(PARTITION BY r.dept_id ORDER BY r.create_time DESC) AS rn |
| | | FROM |
| | | t_check_index_video r |
| | | JOIN |
| | | sys_dept d ON r.dept_id = d.dept_id |
| | | ) |
| | | SELECT |
| | | dept_id, |
| | | area as deptName, |
| | | platform_online, |
| | | monitor_qualification |
| | | FROM |
| | | temp |
| | | WHERE |
| | | rn = 1; |
| | | </select> |
| | | </mapper> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectImageResourceSecurityDetailVo"> |
| | | select id, |
| | | SELECT id, |
| | | ip, |
| | | dept_id, |
| | | alarm_category, |
| | |
| | | num, |
| | | alarm_time, |
| | | create_time |
| | | from t_image_resource_security_detail |
| | | FROM t_image_resource_security_detail |
| | | </sql> |
| | | |
| | | <select id="selectImageResourceSecurityDetailList" resultMap="ImageResourceSecurityDetailResult"> |
| | | <include refid="selectImageResourceSecurityDetailVo"/> |
| | | <select id="selectImageResourceSecurityDetailList" resultType="com.ycl.platform.domain.entity.ImageResourceSecurityDetail"> |
| | | select id, |
| | | ip, |
| | | a.dept_id, |
| | | dept_name, |
| | | alarm_category, |
| | | alarm_level, |
| | | num, |
| | | alarm_time, |
| | | a.create_time |
| | | from t_image_resource_security_detail a |
| | | LEFT JOIN sys_dept b ON a.dept_id = b.dept_id AND b.del_flag = 0 |
| | | <where> |
| | | <if test="ip != null and ip != ''">and ip = #{ip}</if> |
| | | <if test="deptId != null ">and dept_id = #{deptId}</if> |
| | | <if test="deptId != null ">and a.dept_id = #{deptId}</if> |
| | | <if test="alarmCategory != null and alarmCategory != ''">and alarm_category = #{alarmCategory}</if> |
| | | <if test="alarmLevel != null ">and alarm_level = #{alarmLevel}</if> |
| | | <if test="num != null ">and num = #{num}</if> |
| | |
| | | </select> |
| | | |
| | | <select id="selectImageResourceSecurityDetailById"> |
| | | resultMap="ImageResourceSecurityDetailResult"> |
| | | resultMap="ImageResourceSecurityDetailResult"> |
| | | <include refid="selectImageResourceSecurityDetailVo"/> |
| | | where id = #{id} |
| | | </select> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <insert id="saveBatch"> |
| | | INSERT INTO t_image_resource_security_detail (ip, dept_id, alarm_category, alarm_level, num, alarm_time, create_time) VALUES |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | (#{item.ip}, #{item.deptId}, #{item.alarmCategory}, #{item.alarmLevel}, #{item.num}, #{item.alarmTime}, NOW()) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <update id="updateImageResourceSecurityDetail"> |
| | | update t_image_resource_security_detail |
| | | <trim prefix="SET" suffixOverrides=","> |
| | |
| | | </update> |
| | | |
| | | <delete id="deleteImageResourceSecurityDetailById"> |
| | | delete |
| | | from t_image_resource_security_detail |
| | | where id = #{id} |
| | | DELETE |
| | | FROM t_image_resource_security_detail |
| | | WHERE id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteImageResourceSecurityDetailByIds"> |
| | |
| | | <?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"> |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.platform.mapper.ImageResourceSecurityMapper"> |
| | | |
| | | <resultMap type="com.ycl.platform.domain.entity.ImageResourceSecurity" id="ImageResourceSecurityResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="deptId" column="dept_id" /> |
| | | <result property="platformOnline" column="platform_online" /> |
| | | <result property="propertyAccuracy" column="property_accuracy" /> |
| | | <result property="weakPassword" column="weak_password" /> |
| | | <result property="riskProperty" column="risk_property" /> |
| | | <result property="boundaryIntegrity" column="boundary_integrity" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="id" column="id"/> |
| | | <result property="deptId" column="dept_id"/> |
| | | <result property="platformOnline" column="platform_online"/> |
| | | <result property="propertyAccuracy" column="property_accuracy"/> |
| | | <result property="weakPassword" column="weak_password"/> |
| | | <result property="riskProperty" column="risk_property"/> |
| | | <result property="boundaryIntegrity" column="boundary_integrity"/> |
| | | <result property="createTime" column="create_time"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectImageResourceSecurityVo"> |
| | | select id, dept_id, platform_online, property_accuracy, weak_password, risk_property, boundary_integrity, create_time from t_image_resource_security |
| | | SELECT id, |
| | | dept_id, |
| | | platform_online, |
| | | property_accuracy, |
| | | weak_password, |
| | | risk_property, |
| | | boundary_integrity, |
| | | create_time |
| | | FROM t_image_resource_security |
| | | </sql> |
| | | |
| | | <select id="selectImageResourceSecurityList" resultMap="ImageResourceSecurityResult"> |
| | | <include refid="selectImageResourceSecurityVo"/> |
| | | <select id="selectImageResourceSecurityList" resultType="com.ycl.platform.domain.entity.ImageResourceSecurity"> |
| | | select id, a.dept_id, area AS deptName, platform_online, property_accuracy, weak_password, risk_property, boundary_integrity from t_image_resource_security a |
| | | LEFT JOIN sys_dept b ON a.dept_id = b.dept_id AND b.del_flag = 0 |
| | | <where> |
| | | <if test="deptId != null "> and dept_id = #{deptId}</if> |
| | | <if test="platformOnline != null "> and platform_online = #{platformOnline}</if> |
| | | <if test="propertyAccuracy != null "> and property_accuracy = #{propertyAccuracy}</if> |
| | | <if test="weakPassword != null "> and weak_password = #{weakPassword}</if> |
| | | <if test="riskProperty != null "> and risk_property = #{riskProperty}</if> |
| | | <if test="boundaryIntegrity != null "> and boundary_integrity = #{boundaryIntegrity}</if> |
| | | <if test="platformOnline != null ">and platform_online = #{platformOnline}</if> |
| | | <if test="propertyAccuracy != null ">and property_accuracy = #{propertyAccuracy}</if> |
| | | <if test="weakPassword != null ">and weak_password = #{weakPassword}</if> |
| | | <if test="riskProperty != null ">and risk_property = #{riskProperty}</if> |
| | | <if test="boundaryIntegrity != null ">and boundary_integrity = #{boundaryIntegrity}</if> |
| | | </where> |
| | | ORDER BY a.create_time DESC |
| | | limit 7 |
| | | </select> |
| | | |
| | | <select id="selectImageResourceSecurityById" resultMap="ImageResourceSecurityResult"> |
| | |
| | | <if test="riskProperty != null">risk_property,</if> |
| | | <if test="boundaryIntegrity != null">boundary_integrity,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | </trim> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="deptId != null">#{deptId},</if> |
| | | <if test="platformOnline != null">#{platformOnline},</if> |
| | |
| | | <if test="riskProperty != null">#{riskProperty},</if> |
| | | <if test="boundaryIntegrity != null">#{boundaryIntegrity},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | </trim> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <insert id="saveBatch"> |
| | | insert into t_image_resource_security (dept_id, platform_online, property_accuracy, weak_password, risk_property, boundary_integrity, create_time) VALUES |
| | | <foreach collection="list" item="item" separator=","> |
| | | (#{item.deptId}, #{item.platformOnline}, #{item.propertyAccuracy}, #{item.weakPassword}, #{item.riskProperty}, #{item.boundaryIntegrity}, #{item.createTime}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <update id="updateImageResourceSecurity"> |
| | |
| | | </update> |
| | | |
| | | <delete id="deleteImageResourceSecurityById"> |
| | | delete from t_image_resource_security where id = #{id} |
| | | DELETE |
| | | FROM t_image_resource_security |
| | | WHERE id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteImageResourceSecurityByIds"> |
| | |
| | | <result property="cameraDept" column="camera_dept"/> |
| | | <result property="hybm" column="hybm"/> |
| | | <result property="lxbm" column="lxbm"/> |
| | | <result property="deviceType" column="device_type"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectTMonitorVo"> |
| | |
| | | encoded_format, |
| | | camera_dept, |
| | | hybm, |
| | | lxbm |
| | | lxbm, |
| | | device_type |
| | | from t_monitor |
| | | </sql> |
| | | |
| | |
| | | <if test="cameraDept != null">camera_dept,</if> |
| | | <if test="hybm != null">hybm,</if> |
| | | <if test="lxbm != null">lxbm,</if> |
| | | <if test="deviceType != null">device_type,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="serialNumber != null and serialNumber != ''">#{serialNumber},</if> |
| | |
| | | <if test="cameraDept != null">#{cameraDept},</if> |
| | | <if test="hybm != null">#{hybm},</if> |
| | | <if test="lxbm != null">#{lxbm},</if> |
| | | <if test="deviceType != null">#{deviceType},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="batchUpdateDeviceType"> |
| | | <foreach collection="list" separator=";" item="item"> |
| | | UPDATE t_monitor |
| | | SET |
| | | update_time = #{item.updateTime}, |
| | | device_type = #{item.deviceType} |
| | | WHERE id = #{item.id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | <update id="updateTMonitor" parameterType="com.ycl.platform.domain.entity.TMonitor"> |
| | | update t_monitor |
| | |
| | | <if test="cameraDept != null">camera_dept = #{cameraDept},</if> |
| | | <if test="hybm != null">hybm = #{hybm},</if> |
| | | <if test="lxbm != null">lxbm = #{lxbm},</if> |
| | | <if test="deviceType != null">device_type = #{deviceType},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | FROM |
| | | t_work_order wo |
| | | INNER JOIN t_monitor tm ON wo.serial_number = tm.serial_number |
| | | LEFT JOIN t_yw_unit u ON wo.unit_id = u.id AND u.deleted = 0 |
| | | LEFT JOIN t_yw_people p ON wo.yw_people_id = p.id AND p.deleted = 0 |
| | | INNER JOIN t_work_order_error_type et ON wo.work_order_no = et.work_order_no |
| | | INNER JOIN sys_dict_data da ON da.dict_value = et.error_name AND da.dict_type = 'error_type' <if test="query.errorTypeList != null and query.errorTypeList.size() > 0">AND da.dict_value in <foreach |
| | | collection="query.errorTypeList" open="(" separator="," close=")" item="errorType">#{errorType}</foreach> </if> |
| | | LEFT JOIN t_yw_unit u ON wo.unit_id = u.id AND u.deleted = 0 |
| | | LEFT JOIN t_yw_people p ON wo.yw_people_id = p.id AND p.deleted = 0 |
| | | WHERE |
| | | wo.deleted = 0 |
| | | <if test="query.workOrderNo != null and query.workOrderNo != ''"> |
| | |
| | | |
| | | <select id="distributePage" resultType="com.ycl.platform.domain.vo.WorkOrderVO"> |
| | | SELECT |
| | | wo.*, |
| | | u.unit_name, |
| | | wo.id,wo.status, wo.work_order_no,wo.create_time, wo.unit_id, wo.yw_people_id, wo.yw_handle_time, wo.yw_result, wo.yw_check_result, wo.overtime, wo.deduct, |
| | | u.unit_name, |
| | | p.yw_person_name, |
| | | yp.province_tag, |
| | | yp.important_tag, |
| | | yp.important_command_image_tag, |
| | | odr.create_time as distributeTime, |
| | | su.nick_name as realName |
| | | su.nick_name as realName, |
| | | tm.name as source, |
| | | GROUP_CONCAT(DISTINCT da.dict_label ORDER BY da.dict_label SEPARATOR '、') AS errorType |
| | | FROM |
| | | t_work_order wo |
| | | INNER JOIN t_monitor tm ON wo.serial_number = tm.serial_number |
| | | INNER JOIN t_yw_point yp ON yp.serial_number = wo.serial_number AND yp.deleted = 0 |
| | | INNER JOIN t_work_order_error_type et ON wo.work_order_no = et.work_order_no |
| | | INNER JOIN sys_dict_data da ON da.dict_value = et.error_name AND da.dict_type = 'error_type' <if test="query.errorTypeList != null and query.errorTypeList.size() > 0">AND da.dict_value in <foreach |
| | | collection="query.errorTypeList" open="(" separator="," close=")" item="errorType">#{errorType}</foreach> </if> |
| | | LEFT JOIN t_yw_unit u ON wo.unit_id = u.id and u.deleted = 0 |
| | | LEFT JOIN t_yw_people p ON wo.yw_people_id = p.id and p.deleted = 0 |
| | | INNER JOIN t_yw_point yp ON yp.serial_number = wo.serial_number AND yp.deleted = 0 |
| | | LEFT JOIN t_work_order_distribute_record odr ON odr.work_order_no = wo.work_order_no AND odr.deleted = 0 |
| | | LEFT JOIN sys_user su ON su.user_id = odr.user_id |
| | | WHERE |
| | |
| | | <if test="query.status != null and query.status != ''"> |
| | | AND wo.status = #{query.status} |
| | | </if> |
| | | <if test="query.keyword != null and query.keyword != ''"> |
| | | AND (tm.name like concat('%', #{query.keyword}, '%') or tm.serial_number like concat('%', #{query.keyword}, '%')) |
| | | </if> |
| | | GROUP BY |
| | | wo.id, wo.status, wo.work_order_no,wo.create_time, wo.unit_id, wo.yw_people_id, tm.name, wo.yw_handle_time, wo.yw_result, wo.yw_check_result, wo.overtime, wo.deduct, |
| | | u.unit_name, |
| | | p.yw_person_name, |
| | | yp.province_tag, |
| | | yp.important_tag, |
| | | yp.important_command_image_tag, |
| | | odr.create_time, |
| | | su.nick_name |
| | | ORDER BY wo.create_time DESC |
| | | </select> |
| | | |
| | |
| | | <select id="hasErrorWorkOrderList" resultType="com.ycl.platform.domain.vo.DeviceInfoVO"> |
| | | SELECT |
| | | wo.id as workOrderId, |
| | | di.device_id, |
| | | di.channel_id |
| | | we.device_id, |
| | | wec.channel_id |
| | | FROM |
| | | t_work_order wo |
| | | INNER JOIN t_device_info di ON wo.serial_number = di.device_id |
| | | INNER JOIN wvp2.wvp_device we ON we.device_id = wo.serial_number |
| | | INNER JOIN wvp2.wvp_device_channel wec ON we.device_id = wec.device_id |
| | | </select> |
| | | |
| | | <insert id="addMany"> |
| | |
| | | <result column="yw_condition" property="ywCondition"/> |
| | | <result column="commit_user" property="commitUser"/> |
| | | <result column="nick_name" property="commitUserName"/> |
| | | <result column="sys_msg" property="sysMsg"/> |
| | | <result column="yw_proofMaterials" property="ywProofMaterials"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectYwConditionByYwId" resultMap="BaseResultMap"> |
| | | SELECT yw.id, yw.commit_user, yw.yw_condition, yw.yw_proofMaterials, yw.create_time, yw.sys_msg, su.nick_name |
| | | FROM t_work_order_yw_condition_record yw |
| | | INNER JOIN sys_user su ON yw.commit_user = su.user_id AND yw.deleted = 0 AND yw.work_order_no = #{workOrderId} |
| | | INNER JOIN sys_user su ON yw.commit_user = su.user_id AND yw.deleted = 0 AND yw.work_order_no = #{workOrderNo} |
| | | ORDER BY yw.create_time DESC |
| | | </select> |
| | | |