Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -0,0 +1,29 @@
|
|||||||
|
package com.njcn.advance.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
* Advacne枚举
|
||||||
|
* @author cdf
|
||||||
|
* @date 2021/6/21
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum AdvanceResponseEnum {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A00500 ~ A01550 用于终端模块的枚举
|
||||||
|
*/
|
||||||
|
PROJECT_COMMON_ERROR("A00500","同一用户下项目名不能相同"),
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
private final String code;
|
||||||
|
|
||||||
|
private final String message;
|
||||||
|
|
||||||
|
AdvanceResponseEnum(String code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.njcn.advance.pojo.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2022/11/11 15:20【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AppProjectAddParm {
|
||||||
|
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="项目名称")
|
||||||
|
@NotBlank(message="项目名称不能为空!")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@NotBlank(message="项目类型不能为空!")
|
||||||
|
private String projectType;
|
||||||
|
/**
|
||||||
|
* 关联用户Id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="关联用户Id")
|
||||||
|
@NotBlank(message="关联用户Id不能为空!")
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地市Id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="地市")
|
||||||
|
@NotBlank(message="地市不能为空!")
|
||||||
|
private String area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中心点经度
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="中心点经度")
|
||||||
|
private BigDecimal lng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中心点纬度
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="中心点纬度")
|
||||||
|
private BigDecimal lat;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "拓扑图文件")
|
||||||
|
@NotNull(message="拓扑图文件不能为空!")
|
||||||
|
private MultipartFile[] files;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package com.njcn.advance.pojo.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2022/11/11 15:20【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AppProjectAuditParm {
|
||||||
|
|
||||||
|
@NotNull(message="项目id不能为空!")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="项目名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联用户Id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="关联用户Id")
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地市Id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="地市")
|
||||||
|
private String area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中心点经度
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="中心点经度")
|
||||||
|
private BigDecimal lng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中心点纬度
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="中心点纬度")
|
||||||
|
private BigDecimal lat;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="0:删除 1:正常")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.njcn.advance.pojo.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2022/11/11 15:20【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AppProjectQueryParm {
|
||||||
|
|
||||||
|
@NotNull(message="当前页不能为空!")
|
||||||
|
@Min(value = 1, message = "当前页不能为0")
|
||||||
|
@ApiModelProperty(value = "当前页",name = "currentPage",dataType ="Integer",required = true)
|
||||||
|
private Integer currentPage;
|
||||||
|
/**显示条数*/
|
||||||
|
@NotNull(message="显示条数不能为空!")
|
||||||
|
@ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true)
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="项目Id")
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="起始时间")
|
||||||
|
// @NotNull(message="起始时间不能为空!")
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="结束时间")
|
||||||
|
// @NotNull(message="结束时间不能为空!")
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="模糊查询条件")
|
||||||
|
private String searchValue;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.njcn.advance.pojo.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:24【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目拓扑图关系表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AppTopologyDiagramAddParm {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拓扑图名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "拓扑图名称")
|
||||||
|
@NotBlank(message="拓扑图名称不能为空!")
|
||||||
|
private String topologyDiagramName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目Id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "项目Id")
|
||||||
|
@NotBlank(message="项目Id不能为空!")
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拓扑图文件
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "拓扑图文件")
|
||||||
|
@NotNull(message="拓扑图文件不能为空!")
|
||||||
|
private MultipartFile file;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.njcn.advance.pojo.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:24【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目拓扑图关系表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AppTopologyDiagramAuditParm {
|
||||||
|
@ApiModelProperty(value = "拓扑图id")
|
||||||
|
@NotBlank(message="拓扑图id不能为空!")
|
||||||
|
private String id;
|
||||||
|
/**
|
||||||
|
* 拓扑图名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "拓扑图名称")
|
||||||
|
private String topologyDiagramName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目Id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "项目Id")
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拓扑图文件
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "拓扑图文件")
|
||||||
|
private MultipartFile file;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="0:删除 1:正常")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.njcn.advance.pojo.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2022/11/11 15:20【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AppTopologyDiagramQueryParm {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value="拓扑图Id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="拓扑图名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value="项目Id")
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.njcn.advance.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:18【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 项目拓扑图关系表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "cs_line_topology_diagram")
|
||||||
|
public class AppLineTopologyDiagramPO extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 拓扑图Id
|
||||||
|
*/
|
||||||
|
@MppMultiId(value = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拓扑图名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0:删除 1:正常
|
||||||
|
*/
|
||||||
|
@TableField(value = "status")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
package com.njcn.advance.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:24【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 项目表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "cs_project")
|
||||||
|
public class AppProjectPO extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 项目Id
|
||||||
|
*/
|
||||||
|
@MppMultiId(value = "id")
|
||||||
|
private String id;
|
||||||
|
/**
|
||||||
|
* 项目类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "project_type")
|
||||||
|
private String projectType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联用户Id
|
||||||
|
*/
|
||||||
|
@TableField(value = "user_id")
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地市Id
|
||||||
|
*/
|
||||||
|
@TableField(value = "area")
|
||||||
|
private String area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中心点经度
|
||||||
|
*/
|
||||||
|
@TableField(value = "lng")
|
||||||
|
private BigDecimal lng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中心点纬度
|
||||||
|
*/
|
||||||
|
@TableField(value = "lat")
|
||||||
|
private BigDecimal lat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0:删除 1:正常
|
||||||
|
*/
|
||||||
|
@TableField(value = "status")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@TableField(value = "description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.njcn.advance.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:24【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 项目拓扑图关系表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "cs_topology_diagram")
|
||||||
|
public class AppTopologyDiagramPO extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 拓扑图Id
|
||||||
|
*/
|
||||||
|
@MppMultiId(value = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拓扑图名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件大小(kb)
|
||||||
|
*/
|
||||||
|
@TableField(value = "file_size")
|
||||||
|
private Integer fileSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目Id
|
||||||
|
*/
|
||||||
|
@TableField(value = "project_id")
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拓扑图文件路径
|
||||||
|
*/
|
||||||
|
@TableField(value = "file_path")
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0:删除 1:正常
|
||||||
|
*/
|
||||||
|
@TableField(value = "status")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
package com.njcn.advance.pojo.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:24【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AppProjectVO {
|
||||||
|
/**
|
||||||
|
* 项目Id
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
private String projectType;
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联用户Id
|
||||||
|
*/
|
||||||
|
private String userId;
|
||||||
|
/**
|
||||||
|
* 用户名称
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区域名称
|
||||||
|
*/
|
||||||
|
private String area;
|
||||||
|
/**
|
||||||
|
* 拓扑图路径
|
||||||
|
*/
|
||||||
|
private List<String> topologyDiagramPaths;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中心点经度
|
||||||
|
*/
|
||||||
|
private BigDecimal lng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中心点纬度
|
||||||
|
*/
|
||||||
|
private BigDecimal lat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0:删除 1:正常
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建用户
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户
|
||||||
|
*/
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.njcn.advance.pojo.vo;
|
||||||
|
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:24【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目拓扑图关系表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AppTopologyDiagramVO extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 拓扑图Id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "拓扑图Id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拓扑图名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "拓扑图名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件大小(kb)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "文件大小")
|
||||||
|
private Integer fileSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目Id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "项目Id")
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拓扑图文件路径
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "拓扑图文件路径")
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0:删除 1:正常
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "status")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -10,6 +10,35 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>advance-api</artifactId>
|
<artifactId>advance-api</artifactId>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>common-core</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>common-db</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>common-poi</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.jeffreyning</groupId>
|
||||||
|
<artifactId>mybatisplus-plus</artifactId>
|
||||||
|
<version>1.5.1-RELEASE</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>8</maven.compiler.source>
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
|||||||
@@ -15,6 +15,11 @@
|
|||||||
<artifactId>common-web</artifactId>
|
<artifactId>common-web</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>common-db</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>common-swagger</artifactId>
|
<artifactId>common-swagger</artifactId>
|
||||||
@@ -43,7 +48,13 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>common-influxDB</artifactId>
|
<artifactId>advance-api</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>common-oss</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.njcn.advance.controller.project;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.njcn.advance.pojo.param.AppProjectAddParm;
|
||||||
|
import com.njcn.advance.pojo.param.AppProjectAuditParm;
|
||||||
|
import com.njcn.advance.pojo.param.AppProjectQueryParm;
|
||||||
|
import com.njcn.advance.pojo.vo.AppProjectVO;
|
||||||
|
import com.njcn.advance.service.AppProjectService;
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:54【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/project")
|
||||||
|
@Api(tags = " 项目管理")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class AppProjectController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
|
private final AppProjectService appProjectService;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/queryProject")
|
||||||
|
@ApiOperation("项目查询")
|
||||||
|
@ApiImplicitParam(name = "appProjectQueryParm", value = "项目查询参数", required = true)
|
||||||
|
public HttpResult<IPage<AppProjectVO>> queryProject(@Validated @RequestBody AppProjectQueryParm appProjectQueryParm){
|
||||||
|
String methodDescribe = getMethodDescribe("queryProject");
|
||||||
|
|
||||||
|
IPage<AppProjectVO> appProjectVOIPage = appProjectService.queryProject (appProjectQueryParm);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, appProjectVOIPage, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/addAppProject")
|
||||||
|
@ApiOperation("新增项目")
|
||||||
|
public HttpResult<Boolean> addAppProject(@Validated AppProjectAddParm appProjectAddParm){
|
||||||
|
String methodDescribe = getMethodDescribe("addAppProject");
|
||||||
|
|
||||||
|
Boolean flag = appProjectService.addAppProject(appProjectAddParm);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||||
|
}
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/auditAppProject")
|
||||||
|
@ApiOperation("修改/删除项目")
|
||||||
|
@ApiImplicitParam(name = "appProjectAuditParm", value = "修改项目参数", required = true)
|
||||||
|
public HttpResult<Boolean> auditAppProject(@Validated @RequestBody AppProjectAuditParm appProjectAuditParm){
|
||||||
|
String methodDescribe = getMethodDescribe("auditAppProject");
|
||||||
|
|
||||||
|
Boolean flag = appProjectService.AuditAppProject(appProjectAuditParm);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
package com.njcn.advance.controller.project;
|
||||||
|
|
||||||
|
import com.njcn.advance.pojo.param.AppTopologyDiagramAddParm;
|
||||||
|
import com.njcn.advance.pojo.param.AppTopologyDiagramAuditParm;
|
||||||
|
import com.njcn.advance.pojo.param.AppTopologyDiagramQueryParm;
|
||||||
|
import com.njcn.advance.pojo.vo.AppTopologyDiagramVO;
|
||||||
|
import com.njcn.advance.service.AppTopologyDiagramService;
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 15:31【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/topologyDiagram")
|
||||||
|
@Api(tags = " 项目拓扑图")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class AppTopologyController extends BaseController {
|
||||||
|
|
||||||
|
private final AppTopologyDiagramService appTopologyDiagramService;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/addAppTopologyDiagram")
|
||||||
|
@ApiOperation("新增拓扑图")
|
||||||
|
// @ApiImplicitParam(name = "appTopologyDiagramAddParm", value = "新增项目参数", required = true)
|
||||||
|
public HttpResult<Boolean> addAppTopologyDiagram(@Validated AppTopologyDiagramAddParm appTopologyDiagramAddParm){
|
||||||
|
String methodDescribe = getMethodDescribe("addAppTopologyDiagram");
|
||||||
|
|
||||||
|
Boolean flag = appTopologyDiagramService.addAppTopologyDiagram(appTopologyDiagramAddParm);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/AuditAppTopologyDiagram")
|
||||||
|
@ApiOperation("修改拓扑图")
|
||||||
|
public HttpResult<Boolean> AuditAppTopologyDiagram(@Validated AppTopologyDiagramAuditParm appTopologyDiagramAuditParm){
|
||||||
|
String methodDescribe = getMethodDescribe("addAppProject");
|
||||||
|
|
||||||
|
Boolean flag = appTopologyDiagramService.AuditAppTopologyDiagram(appTopologyDiagramAuditParm);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/queryAppTopologyDiagram")
|
||||||
|
@ApiOperation("查询拓扑图")
|
||||||
|
public HttpResult<List<AppTopologyDiagramVO>> queryAppTopologyDiagram(@Validated @RequestBody AppTopologyDiagramQueryParm appTopologyDiagramAuditParm){
|
||||||
|
String methodDescribe = getMethodDescribe("queryAppTopologyDiagram");
|
||||||
|
|
||||||
|
List<AppTopologyDiagramVO> appTopologyDiagramVOList = appTopologyDiagramService.queryAppTopologyDiagram(appTopologyDiagramAuditParm);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, appTopologyDiagramVOList, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.njcn.advance.mapper;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||||
|
import com.njcn.advance.pojo.po.AppLineTopologyDiagramPO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:18【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface AppLineTopologyDiagramMapper extends MppBaseMapper<AppLineTopologyDiagramPO> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package com.njcn.advance.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||||
|
import com.njcn.advance.pojo.param.AppProjectQueryParm;
|
||||||
|
import com.njcn.advance.pojo.po.AppProjectPO;
|
||||||
|
import com.njcn.advance.pojo.vo.AppProjectVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:24【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface AppProjectMapper extends MppBaseMapper<AppProjectPO> {
|
||||||
|
@Select (
|
||||||
|
{"<script>",
|
||||||
|
"SELECT\n" +
|
||||||
|
"\ta.id id,\n" +
|
||||||
|
"\ta.`name` name,\n" +
|
||||||
|
"\ta.user_id user_id,\n" +
|
||||||
|
"\t\"username\" user_name,\n" +
|
||||||
|
"\ta.area area,\n" +
|
||||||
|
// "\tb.file_path topologyDiagramPath,\n" +
|
||||||
|
"\ta.lng lng,\n" +
|
||||||
|
"\ta.lat lat,\n" +
|
||||||
|
"\ta.`status` STATUS,\n" +
|
||||||
|
"\ta.create_by create_by,\n" +
|
||||||
|
"\ta.create_time create_time,\n" +
|
||||||
|
"\ta.update_by update_by,\n" +
|
||||||
|
"\ta.update_time update_time\n" +
|
||||||
|
"FROM\n" +
|
||||||
|
"\tcs_project a\n" +
|
||||||
|
"LEFT JOIN cs_topology_diagram b ON a.id = b.project_id\n" +
|
||||||
|
"WHERE\n" +
|
||||||
|
"\t1 = 1 AND a.status=\"1\"\n" ,
|
||||||
|
"<when test='temp.projectId!=null and temp.projectId!=\"\"'>",
|
||||||
|
"AND a.id = #{temp.projectId} "+
|
||||||
|
"</when>",
|
||||||
|
"<when test='temp.endTime!=null and temp.endTime!=\"\"'>",
|
||||||
|
"AND a.create_time <= #{temp.endTime}" +
|
||||||
|
"</when>",
|
||||||
|
"<when test='temp.startTime!=null and temp.startTime!=\"\"'>",
|
||||||
|
"AND a.create_time >= #{temp.startTime}" +
|
||||||
|
"</when>",
|
||||||
|
"<when test='temp.searchValue!=null and temp.searchValue!=\"\"'>",
|
||||||
|
"AND a.`name` like concat('%',#{temp.searchValue},'%')",
|
||||||
|
"</when>",
|
||||||
|
"</script>"}
|
||||||
|
)
|
||||||
|
Page<AppProjectVO> getPageVo(Page<AppProjectVO> returnpage, @Param("temp")AppProjectQueryParm appProjectQueryParm);
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.njcn.advance.mapper;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||||
|
import com.njcn.advance.pojo.po.AppTopologyDiagramPO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:24【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface AppTopologyDiagramMapper extends MppBaseMapper<AppTopologyDiagramPO> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?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.njcn.advance.mapper.AppLineTopologyDiagramMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.advance.pojo.po.AppLineTopologyDiagramPO">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table app_line_topology_diagram-->
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="line_id" jdbcType="VARCHAR" property="lineId" />
|
||||||
|
<result column="status" jdbcType="TINYINT" property="status" />
|
||||||
|
<result column="create_by" jdbcType="CHAR" property="createBy" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_by" jdbcType="CHAR" property="updateBy" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, line_id, `status`, create_by, create_time, update_by, update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?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.njcn.advance.mapper.AppProjectMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.advance.pojo.po.AppProjectPO">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table app_project-->
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
|
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
||||||
|
<result column="area_id" jdbcType="VARCHAR" property="areaId" />
|
||||||
|
<result column="lng" jdbcType="DECIMAL" property="lng" />
|
||||||
|
<result column="lat" jdbcType="DECIMAL" property="lat" />
|
||||||
|
<result column="status" jdbcType="TINYINT" property="status" />
|
||||||
|
<result column="create_by" jdbcType="CHAR" property="createBy" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_by" jdbcType="CHAR" property="updateBy" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, `name`, user_id, area_id, lng, lat, `status`, create_by, create_time, update_by,
|
||||||
|
update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<?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.njcn.advance.mapper.AppTopologyDiagramMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.advance.pojo.po.AppTopologyDiagramPO">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table app_topology_diagram-->
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
|
<result column="file_size" jdbcType="INTEGER" property="fileSize" />
|
||||||
|
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||||
|
<result column="file_path" jdbcType="VARCHAR" property="filePath" />
|
||||||
|
<result column="status" jdbcType="TINYINT" property="status" />
|
||||||
|
<result column="create_by" jdbcType="CHAR" property="createBy" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_by" jdbcType="CHAR" property="updateBy" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, `name`, file_size, project_id, file_path, `status`, create_by, create_time, update_by,
|
||||||
|
update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.njcn.advance.service;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||||
|
import com.njcn.advance.pojo.po.AppLineTopologyDiagramPO;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:18【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface AppLineTopologyDiagramService extends IMppService<AppLineTopologyDiagramPO> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.njcn.advance.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||||
|
import com.njcn.advance.pojo.param.AppProjectAddParm;
|
||||||
|
import com.njcn.advance.pojo.param.AppProjectAuditParm;
|
||||||
|
import com.njcn.advance.pojo.param.AppProjectQueryParm;
|
||||||
|
import com.njcn.advance.pojo.po.AppProjectPO;
|
||||||
|
import com.njcn.advance.pojo.vo.AppProjectVO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:24【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface AppProjectService extends IMppService<AppProjectPO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: addOrAuditPlan
|
||||||
|
* @Param: [appProjectAddOrAuditParm]
|
||||||
|
* @return: java.lang.Boolean
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2023/3/27
|
||||||
|
*/
|
||||||
|
Boolean addAppProject(AppProjectAddParm appProjectAddOrAuditParm);
|
||||||
|
/**
|
||||||
|
* @Description: AuditAppProject
|
||||||
|
* @Param: [appProjectAuditParm]
|
||||||
|
* @return: java.lang.Boolean
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2023/3/27
|
||||||
|
*/
|
||||||
|
Boolean AuditAppProject(AppProjectAuditParm appProjectAuditParm);
|
||||||
|
/**
|
||||||
|
* @Description: queryProject
|
||||||
|
* @Param: [appProjectQueryParm]
|
||||||
|
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.njcn.advance.pojo.vo.AppProjectVO>
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2023/3/28
|
||||||
|
*/
|
||||||
|
IPage<AppProjectVO> queryProject(AppProjectQueryParm appProjectQueryParm);
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.njcn.advance.service;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||||
|
import com.njcn.advance.pojo.param.AppTopologyDiagramAddParm;
|
||||||
|
import com.njcn.advance.pojo.param.AppTopologyDiagramAuditParm;
|
||||||
|
import com.njcn.advance.pojo.param.AppTopologyDiagramQueryParm;
|
||||||
|
import com.njcn.advance.pojo.po.AppTopologyDiagramPO;
|
||||||
|
import com.njcn.advance.pojo.vo.AppTopologyDiagramVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:24【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface AppTopologyDiagramService extends IMppService<AppTopologyDiagramPO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: addAppTopologyDiagram
|
||||||
|
* @Param: [appTopologyDiagramAddParm]
|
||||||
|
* @return: java.lang.Boolean
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2023/3/27
|
||||||
|
*/
|
||||||
|
Boolean addAppTopologyDiagram(AppTopologyDiagramAddParm appTopologyDiagramAddParm);
|
||||||
|
/**
|
||||||
|
* @Description: AuditAppTopologyDiagram
|
||||||
|
* @Param: [appTopologyDiagramAuditParm]
|
||||||
|
* @return: java.lang.Boolean
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2023/3/27
|
||||||
|
*/
|
||||||
|
Boolean AuditAppTopologyDiagram(AppTopologyDiagramAuditParm appTopologyDiagramAuditParm);
|
||||||
|
/**
|
||||||
|
* @Description: queryAppTopologyDiagram
|
||||||
|
* @Param: [appTopologyDiagramAuditParm]
|
||||||
|
* @return: java.util.List<com.njcn.advance.pojo.vo.AppTopologyDiagramVO>
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2023/3/29
|
||||||
|
*/
|
||||||
|
List<AppTopologyDiagramVO> queryAppTopologyDiagram(AppTopologyDiagramQueryParm appTopologyDiagramAuditParm);
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.njcn.advance.service.impl;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
|
import com.njcn.advance.mapper.AppLineTopologyDiagramMapper;
|
||||||
|
import com.njcn.advance.pojo.po.AppLineTopologyDiagramPO;
|
||||||
|
import com.njcn.advance.service.AppLineTopologyDiagramService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:18【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class AppLineTopologyDiagramServiceImpl extends MppServiceImpl<AppLineTopologyDiagramMapper, AppLineTopologyDiagramPO> implements AppLineTopologyDiagramService {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
package com.njcn.advance.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
|
import com.njcn.advance.enums.AdvanceResponseEnum;
|
||||||
|
import com.njcn.advance.mapper.AppProjectMapper;
|
||||||
|
import com.njcn.advance.pojo.param.*;
|
||||||
|
import com.njcn.advance.pojo.po.AppProjectPO;
|
||||||
|
import com.njcn.advance.pojo.vo.AppProjectVO;
|
||||||
|
import com.njcn.advance.pojo.vo.AppTopologyDiagramVO;
|
||||||
|
import com.njcn.advance.service.AppProjectService;
|
||||||
|
import com.njcn.advance.service.AppTopologyDiagramService;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.oss.utils.FileStorageUtil;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:24【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AppProjectServiceImpl extends MppServiceImpl<AppProjectMapper, AppProjectPO> implements AppProjectService {
|
||||||
|
|
||||||
|
private final AppProjectMapper appProjectMapper;
|
||||||
|
private final AppTopologyDiagramService appTopologyDiagramService;
|
||||||
|
private final FileStorageUtil fileStorageUtil;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean addAppProject(AppProjectAddParm appProjectAddOrAuditParm) {
|
||||||
|
AppProjectPO appProjectPO = new AppProjectPO ( );
|
||||||
|
Boolean result = checkName (appProjectAddOrAuditParm.getUserId ( ), appProjectAddOrAuditParm.getName ( ));
|
||||||
|
if (result) {
|
||||||
|
throw new BusinessException (AdvanceResponseEnum.PROJECT_COMMON_ERROR);
|
||||||
|
}
|
||||||
|
BeanUtils.copyProperties (appProjectAddOrAuditParm, appProjectPO);
|
||||||
|
appProjectPO.setStatus ("1");
|
||||||
|
boolean save = this.save (appProjectPO);
|
||||||
|
for (int i = 0; i < appProjectAddOrAuditParm.getFiles ( ).length; i++) {
|
||||||
|
|
||||||
|
AppTopologyDiagramAddParm appTopologyDiagramAddParm = new AppTopologyDiagramAddParm ( );
|
||||||
|
appTopologyDiagramAddParm.setProjectId (appProjectPO.getId ( ));
|
||||||
|
appTopologyDiagramAddParm.setTopologyDiagramName (appProjectAddOrAuditParm.getFiles ( )[i].getOriginalFilename ( ));
|
||||||
|
appTopologyDiagramAddParm.setFile (appProjectAddOrAuditParm.getFiles ( )[i]);
|
||||||
|
appTopologyDiagramService.addAppTopologyDiagram (appTopologyDiagramAddParm);
|
||||||
|
}
|
||||||
|
return save;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Boolean checkName(String userId, String name) {
|
||||||
|
QueryWrapper<AppProjectPO> queryWrapper = new QueryWrapper ( );
|
||||||
|
queryWrapper.select ("1").
|
||||||
|
eq ("status", "1").
|
||||||
|
eq ("user_id", userId).
|
||||||
|
eq ("name", name);
|
||||||
|
Integer integer = appProjectMapper.selectCount (queryWrapper);
|
||||||
|
return integer > 0 ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean AuditAppProject(AppProjectAuditParm appProjectAuditParm) {
|
||||||
|
AppProjectPO appProjectPO = new AppProjectPO ( );
|
||||||
|
|
||||||
|
QueryWrapper<AppProjectPO> queryWrapper = new QueryWrapper ( );
|
||||||
|
queryWrapper.eq ("id", appProjectAuditParm.getId ( ));
|
||||||
|
AppProjectPO appProjectPO1 = appProjectMapper.selectOne (queryWrapper);
|
||||||
|
if (appProjectAuditParm.getUserId ( ) != null || appProjectAuditParm.getName ( ) != null) {
|
||||||
|
Boolean result = checkName (appProjectAuditParm.getUserId ( ) != null ? appProjectAuditParm.getUserId ( ) : appProjectPO1.getUserId ( ),
|
||||||
|
appProjectAuditParm.getName ( ) != null ? appProjectAuditParm.getName ( ) : appProjectPO1.getName ( ));
|
||||||
|
if (result) {
|
||||||
|
throw new BusinessException (AdvanceResponseEnum.PROJECT_COMMON_ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BeanUtils.copyProperties (appProjectAuditParm, appProjectPO);
|
||||||
|
UpdateWrapper<AppProjectPO> updateWrapper = new UpdateWrapper ( );
|
||||||
|
updateWrapper.eq ("id", appProjectAuditParm.getId ( ));
|
||||||
|
|
||||||
|
int i = appProjectMapper.update (appProjectPO, updateWrapper);
|
||||||
|
Boolean result = checkName (appProjectPO.getUserId ( ), appProjectPO.getName ( ));
|
||||||
|
if (result) {
|
||||||
|
throw new BusinessException (AdvanceResponseEnum.PROJECT_COMMON_ERROR);
|
||||||
|
}
|
||||||
|
return i == 1 ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<AppProjectVO> queryProject(AppProjectQueryParm appProjectQueryParm) {
|
||||||
|
|
||||||
|
Page<AppProjectVO> returnpage = new Page<> (appProjectQueryParm.getCurrentPage ( ), appProjectQueryParm.getPageSize ( ));
|
||||||
|
returnpage = appProjectMapper.getPageVo (returnpage, appProjectQueryParm);
|
||||||
|
Page<AppProjectPO> appProjectPOPage = new Page<> (appProjectQueryParm.getCurrentPage ( ), appProjectQueryParm.getPageSize ( ));
|
||||||
|
QueryWrapper<AppProjectPO> queryWrapper = new QueryWrapper ( );
|
||||||
|
queryWrapper.eq ("status", "1").
|
||||||
|
eq (StringUtils.isNotBlank (appProjectQueryParm.getProjectId ( )), "id", appProjectQueryParm.getProjectId ( )).
|
||||||
|
le (StringUtils.isNotBlank (appProjectQueryParm.getEndTime ( )), "create_time", appProjectQueryParm.getEndTime ( )).
|
||||||
|
ge (StringUtils.isNotBlank (appProjectQueryParm.getStartTime ( )), "create_time", appProjectQueryParm.getStartTime ( )).
|
||||||
|
like (StringUtils.isNotBlank (appProjectQueryParm.getSearchValue ( )), "name", appProjectQueryParm.getSearchValue ( ));
|
||||||
|
Page<AppProjectPO> appProjectPOPage1 = appProjectMapper.selectPage (appProjectPOPage, queryWrapper);
|
||||||
|
List<AppProjectVO> collect = appProjectPOPage1.getRecords ( ).stream ( ).map (temp -> {
|
||||||
|
AppProjectVO vo = new AppProjectVO ( );
|
||||||
|
BeanUtils.copyProperties (temp, vo);
|
||||||
|
AppTopologyDiagramQueryParm appTopologyDiagramQueryParm = new AppTopologyDiagramQueryParm ( );
|
||||||
|
appTopologyDiagramQueryParm.setProjectId (vo.getId ( ));
|
||||||
|
List<AppTopologyDiagramVO> appTopologyDiagramVOList = appTopologyDiagramService.queryAppTopologyDiagram (appTopologyDiagramQueryParm);
|
||||||
|
List<String> collect1 = appTopologyDiagramVOList.stream ( ).map (AppTopologyDiagramVO::getFilePath).collect (Collectors.toList ( ));
|
||||||
|
vo.setTopologyDiagramPaths (collect1);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
).collect (Collectors.toList ( ));
|
||||||
|
return returnpage;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
package com.njcn.advance.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
|
import com.google.common.base.Objects;
|
||||||
|
import com.njcn.advance.mapper.AppTopologyDiagramMapper;
|
||||||
|
import com.njcn.advance.pojo.param.AppTopologyDiagramAddParm;
|
||||||
|
import com.njcn.advance.pojo.param.AppTopologyDiagramAuditParm;
|
||||||
|
import com.njcn.advance.pojo.param.AppTopologyDiagramQueryParm;
|
||||||
|
import com.njcn.advance.pojo.po.AppTopologyDiagramPO;
|
||||||
|
import com.njcn.advance.pojo.vo.AppTopologyDiagramVO;
|
||||||
|
import com.njcn.advance.service.AppTopologyDiagramService;
|
||||||
|
import com.njcn.oss.constant.OssPath;
|
||||||
|
import com.njcn.oss.utils.FileStorageUtil;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/3/27 10:24【需求编号】d
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AppTopologyDiagramServiceImpl extends MppServiceImpl<AppTopologyDiagramMapper, AppTopologyDiagramPO> implements AppTopologyDiagramService {
|
||||||
|
|
||||||
|
|
||||||
|
private final FileStorageUtil fileStorageUtil;
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = {Exception.class})
|
||||||
|
public Boolean addAppTopologyDiagram(AppTopologyDiagramAddParm appTopologyDiagramAddParm) {
|
||||||
|
AppTopologyDiagramPO appTopologyDiagramPO = new AppTopologyDiagramPO();
|
||||||
|
|
||||||
|
MultipartFile file = appTopologyDiagramAddParm.getFile ( );
|
||||||
|
long size = file.getSize ( );
|
||||||
|
String filePath = fileStorageUtil.uploadMultipart (file, OssPath.TOPOLOGY);
|
||||||
|
appTopologyDiagramPO.setFilePath (filePath);
|
||||||
|
appTopologyDiagramPO.setProjectId (appTopologyDiagramAddParm.getProjectId ());
|
||||||
|
appTopologyDiagramPO.setName (appTopologyDiagramAddParm.getTopologyDiagramName ());
|
||||||
|
appTopologyDiagramPO.setFileSize (Integer.valueOf (size+""));
|
||||||
|
appTopologyDiagramPO.setStatus ("1");
|
||||||
|
boolean save = this.save (appTopologyDiagramPO);
|
||||||
|
return save;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean AuditAppTopologyDiagram(AppTopologyDiagramAuditParm appTopologyDiagramAuditParm) {
|
||||||
|
AppTopologyDiagramPO appTopologyDiagramPO = new AppTopologyDiagramPO();
|
||||||
|
if(!Objects.equal (appTopologyDiagramAuditParm.getFile (),null )){
|
||||||
|
MultipartFile file = appTopologyDiagramAuditParm.getFile ( );
|
||||||
|
long size = file.getSize ( );
|
||||||
|
String filePath = fileStorageUtil.uploadMultipart (file, OssPath.TOPOLOGY);
|
||||||
|
appTopologyDiagramPO.setFilePath (filePath);
|
||||||
|
appTopologyDiagramPO.setFileSize (Integer.valueOf (size+""));
|
||||||
|
}
|
||||||
|
if(appTopologyDiagramAuditParm.getProjectId ()!=null&&appTopologyDiagramAuditParm.getProjectId ()!=""){
|
||||||
|
appTopologyDiagramPO.setProjectId (appTopologyDiagramAuditParm.getProjectId ());
|
||||||
|
}
|
||||||
|
if(appTopologyDiagramAuditParm.getTopologyDiagramName ()!=null&&appTopologyDiagramAuditParm.getTopologyDiagramName ()!=""){
|
||||||
|
appTopologyDiagramPO.setName (appTopologyDiagramAuditParm.getTopologyDiagramName ());
|
||||||
|
}
|
||||||
|
if(appTopologyDiagramAuditParm.getStatus ()!=null&&appTopologyDiagramAuditParm.getTopologyDiagramName ()!=""){
|
||||||
|
appTopologyDiagramPO.setStatus (appTopologyDiagramAuditParm.getStatus ());
|
||||||
|
}
|
||||||
|
UpdateWrapper<AppTopologyDiagramPO> updateWrapper = new UpdateWrapper ();
|
||||||
|
updateWrapper.eq ("id",appTopologyDiagramAuditParm.getId ());
|
||||||
|
boolean update = this.update (appTopologyDiagramPO, updateWrapper);
|
||||||
|
return update;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AppTopologyDiagramVO> queryAppTopologyDiagram(AppTopologyDiagramQueryParm appTopologyDiagramAuditParm) {
|
||||||
|
QueryWrapper<AppTopologyDiagramPO> queryWrapper = new QueryWrapper ();
|
||||||
|
queryWrapper.eq ("status","1").
|
||||||
|
eq (StringUtils.isNotBlank (appTopologyDiagramAuditParm.getId ()),"id",appTopologyDiagramAuditParm.getId ()).
|
||||||
|
eq (StringUtils.isNotBlank (appTopologyDiagramAuditParm.getProjectId ()),"project_id",appTopologyDiagramAuditParm.getProjectId ()).
|
||||||
|
like (StringUtils.isNotBlank (appTopologyDiagramAuditParm.getName ()),"name", appTopologyDiagramAuditParm.getName ());
|
||||||
|
List<AppTopologyDiagramPO> list = this.list (queryWrapper);
|
||||||
|
List<AppTopologyDiagramVO> collect = list.stream ( ).map (temp -> {
|
||||||
|
AppTopologyDiagramVO vo = new AppTopologyDiagramVO ( );
|
||||||
|
BeanUtils.copyProperties (temp, vo);
|
||||||
|
vo.setFilePath (fileStorageUtil.getFileUrl (vo.getFilePath ()));
|
||||||
|
return vo;
|
||||||
|
}).collect (Collectors.toList ( ));
|
||||||
|
return collect;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -47,4 +47,9 @@ public interface OssPath {
|
|||||||
* 终端检测监督管理 检测报告
|
* 终端检测监督管理 检测报告
|
||||||
*/
|
*/
|
||||||
String TEST_REPORT = "testReport/";
|
String TEST_REPORT = "testReport/";
|
||||||
|
|
||||||
|
/***
|
||||||
|
* app拓扑图文件
|
||||||
|
*/
|
||||||
|
String TOPOLOGY = "topology/";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,8 @@ public class Knife4jSwaggerConfig {
|
|||||||
"com.njcn.event.controller",
|
"com.njcn.event.controller",
|
||||||
"com.njcn.energy.controller",
|
"com.njcn.energy.controller",
|
||||||
"com.njcn.quality.controller",
|
"com.njcn.quality.controller",
|
||||||
"com.njcn.process.controller"
|
"com.njcn.process.controller",
|
||||||
|
"com.njcn.advance.controller"
|
||||||
)
|
)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
List<GrantType> grantTypes = new ArrayList<>();
|
List<GrantType> grantTypes = new ArrayList<>();
|
||||||
|
|||||||
@@ -227,6 +227,9 @@ public class COverlimit {
|
|||||||
case "515kV":
|
case "515kV":
|
||||||
uL = 535.0f;
|
uL = 535.0f;
|
||||||
break;
|
break;
|
||||||
|
case "800kV":
|
||||||
|
uL = 825.0f;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,11 @@ package com.njcn.device.pq.mapper;
|
|||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.device.pq.pojo.po.LineDataIntegrity;
|
||||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -14,4 +18,11 @@ import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
|||||||
*/
|
*/
|
||||||
public interface RStatIntegrityDMapper extends BaseMapper<RStatIntegrityD> {
|
public interface RStatIntegrityDMapper extends BaseMapper<RStatIntegrityD> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取监测点数据完整性
|
||||||
|
* @author cdf
|
||||||
|
* @date 2023/3/29
|
||||||
|
*/
|
||||||
|
List<LineDataIntegrity> getLineIntegrityRate(@Param("lineIds")List<String> lineIds,@Param("startTime")String startTime,@Param("endTime")String endTime);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?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.njcn.device.pq.mapper.TerminalOnlineRateDataMapper">
|
||||||
|
|
||||||
|
<select id="getLineIntegrityRate" resultType="LineDataIntegrity">
|
||||||
|
select line_index lineId,avg(real_time/due_time) integrityData
|
||||||
|
from r_stat_integrity_d
|
||||||
|
where line_index in
|
||||||
|
<foreach collection="lineIds" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
and time_id between #{startTime} and #{endTime}
|
||||||
|
group by line_index
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="getDevOnlineByDevIds" resultType="TerminalOnlineRateData">
|
<select id="getDevOnlineByDevIds" resultType="TerminalOnlineRateData">
|
||||||
select dev_index,avg(offline_min) offlineRate
|
select dev_index devId,avg(online_min/(online_min+offline_min)) onlineRate
|
||||||
from r_stat_onlinerate_d
|
from r_stat_onlinerate_d
|
||||||
where dev_index in
|
where dev_index in
|
||||||
<foreach collection="devIds" item="item" open="(" close=")" separator=",">
|
<foreach collection="devIds" item="item" open="(" close=")" separator=",">
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.njcn.device.pq.api.AlarmClient;
|
|||||||
import com.njcn.device.pq.enums.DeviceResponseEnum;
|
import com.njcn.device.pq.enums.DeviceResponseEnum;
|
||||||
import com.njcn.device.pq.enums.LineBaseEnum;
|
import com.njcn.device.pq.enums.LineBaseEnum;
|
||||||
import com.njcn.device.pq.mapper.LineIntegrityDataMapper;
|
import com.njcn.device.pq.mapper.LineIntegrityDataMapper;
|
||||||
|
import com.njcn.device.pq.mapper.RStatIntegrityDMapper;
|
||||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||||
import com.njcn.device.pq.pojo.param.LineIntegrityDataParam;
|
import com.njcn.device.pq.pojo.param.LineIntegrityDataParam;
|
||||||
import com.njcn.device.pq.pojo.po.LineDataIntegrity;
|
import com.njcn.device.pq.pojo.po.LineDataIntegrity;
|
||||||
@@ -54,6 +55,8 @@ public class LineIntegrityDataServiceImpl extends ServiceImpl<LineIntegrityDataM
|
|||||||
|
|
||||||
private final GeneralDeviceService generalDeviceService;
|
private final GeneralDeviceService generalDeviceService;
|
||||||
|
|
||||||
|
private final RStatIntegrityDMapper rStatIntegrityDMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 监测点数据完整性
|
* 监测点数据完整性
|
||||||
*
|
*
|
||||||
@@ -105,13 +108,9 @@ public class LineIntegrityDataServiceImpl extends ServiceImpl<LineIntegrityDataM
|
|||||||
// 通过供电公司索引查询省会
|
// 通过供电公司索引查询省会
|
||||||
List<LineIntegrityDataVO> proList = lineIntegrityDataMapper.getProvinceList(gdIds);
|
List<LineIntegrityDataVO> proList = lineIntegrityDataMapper.getProvinceList(gdIds);
|
||||||
|
|
||||||
|
List<LineDataIntegrity> percentageOfCompleteDatas = rStatIntegrityDMapper.getLineIntegrityRate(generalDeviceDTO.getLineIndexes(),lineIntegrityDataParam.getSearchBeginTime(), lineIntegrityDataParam.getSearchEndTime());
|
||||||
|
|
||||||
|
|
||||||
// 通过工具类得到查询influxdb的条件(相当于mysql中的in)
|
|
||||||
StringBuilder lineIdsForInfluxdb = InfluxDBCommUtils.assToInfluxParam(generalDeviceDTO.getLineIndexes());
|
|
||||||
// 通过监测点id集合查询influxdb监测点数据完整性
|
|
||||||
List<LineDataIntegrity> percentageOfCompleteDatas = getPercentageOfCompleteData(lineIntegrityDataParam.getSearchBeginTime(), lineIntegrityDataParam.getSearchEndTime(), lineIdsForInfluxdb);
|
|
||||||
|
|
||||||
|
|
||||||
for (LineIntegrityDataVO lineDataIntegrity : lineList) {
|
for (LineIntegrityDataVO lineDataIntegrity : lineList) {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class TerminalOnlineRateDataServiceImpl implements TerminalOnlineRateData
|
|||||||
|
|
||||||
private final DicDataFeignClient dicDataFeignClient;
|
private final DicDataFeignClient dicDataFeignClient;
|
||||||
|
|
||||||
private final IRStatOnlinerateDService irStatOnlinerateDService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端在线率列表
|
* 终端在线率列表
|
||||||
@@ -188,40 +188,6 @@ public class TerminalOnlineRateDataServiceImpl implements TerminalOnlineRateData
|
|||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 从influxdb中获取完整数据百分比
|
|
||||||
*
|
|
||||||
* @param startTime 查询开始时间
|
|
||||||
* @param endTime 查询结束时间
|
|
||||||
* @param deviceIndexes 终端id索引集合
|
|
||||||
*/
|
|
||||||
private List<TerminalOnlineRateData> getPercentageOfOnlineRate(String startTime, String endTime, StringBuilder deviceIndexes) {
|
|
||||||
|
|
||||||
//组装sql语句
|
|
||||||
StringBuilder queryCriteria = new StringBuilder();
|
|
||||||
// 构造sql查询条件
|
|
||||||
queryCriteria.append(deviceIndexes)
|
|
||||||
.append(" and ")
|
|
||||||
.append(InfluxDBPublicParam.TIME)
|
|
||||||
.append(" >= '")
|
|
||||||
.append(startTime)
|
|
||||||
.append(InfluxDBPublicParam.START_TIME)
|
|
||||||
.append("' and ")
|
|
||||||
.append(InfluxDBPublicParam.TIME)
|
|
||||||
.append(" <= '")
|
|
||||||
.append(endTime)
|
|
||||||
.append(InfluxDBPublicParam.END_TIME)
|
|
||||||
.append("'");
|
|
||||||
//sql语句
|
|
||||||
String sql = "SELECT mean(online_rate) as online_rate FROM pqs_onlinerate WHERE " + queryCriteria + " group by dev_id " + InfluxDBPublicParam.TIME_ZONE;
|
|
||||||
// 结果集
|
|
||||||
QueryResult results = influxDbUtils.query(sql);
|
|
||||||
|
|
||||||
// 结果集映射到对象中
|
|
||||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
|
||||||
// 返回结果
|
|
||||||
return resultMapper.toPOJO(results, TerminalOnlineRateData.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user