系统配置
This commit is contained in:
@@ -0,0 +1,77 @@
|
|||||||
|
package com.njcn.csdevice.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/7/10 18:30【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "cs_line_topology_template")
|
||||||
|
public class CsLineTopologyTemplate extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 拓扑图Id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.INPUT)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点Id
|
||||||
|
*/
|
||||||
|
@TableField(value = "line_postion")
|
||||||
|
private String linePostion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0:删除 1:正常
|
||||||
|
*/
|
||||||
|
@TableField(value = "`status`")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中心点经度
|
||||||
|
*/
|
||||||
|
@TableField(value = "lng")
|
||||||
|
@ApiModelProperty(value="中心点经度")
|
||||||
|
private BigDecimal lng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中心点纬度
|
||||||
|
*/
|
||||||
|
@TableField(value = "lat")
|
||||||
|
@ApiModelProperty(value="中心点纬度")
|
||||||
|
private BigDecimal lat;
|
||||||
|
|
||||||
|
public static final String COL_ID = "id";
|
||||||
|
|
||||||
|
public static final String COL_LINE_ID = "line_postion";
|
||||||
|
|
||||||
|
public static final String COL_STATUS = "status";
|
||||||
|
|
||||||
|
public static final String COL_CREATE_BY = "create_by";
|
||||||
|
|
||||||
|
public static final String COL_CREATE_TIME = "create_time";
|
||||||
|
|
||||||
|
public static final String COL_UPDATE_BY = "update_by";
|
||||||
|
|
||||||
|
public static final String COL_UPDATE_TIME = "update_time";
|
||||||
|
|
||||||
|
public static final String COL_LNG = "lng";
|
||||||
|
|
||||||
|
public static final String COL_LAT = "lat";
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package com.njcn.csdevice.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/7/10 18:30【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "cs_topology_diagram_template")
|
||||||
|
public class CsTopologyDiagramTemplate extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 拓扑图模板Id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拓扑图模板名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "`name`")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拓扑图文件路径
|
||||||
|
*/
|
||||||
|
@TableField(value = "file_path")
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(0:删除 1:正常)
|
||||||
|
*/
|
||||||
|
@TableField(value = "`status`")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static final String COL_ID = "id";
|
||||||
|
|
||||||
|
public static final String COL_NAME = "name";
|
||||||
|
|
||||||
|
public static final String COL_FILE_PATH = "file_path";
|
||||||
|
|
||||||
|
public static final String COL_STATUS = "status";
|
||||||
|
|
||||||
|
public static final String COL_CREATE_BY = "create_by";
|
||||||
|
|
||||||
|
public static final String COL_CREATE_TIME = "create_time";
|
||||||
|
|
||||||
|
public static final String COL_UPDATE_BY = "update_by";
|
||||||
|
|
||||||
|
public static final String COL_UPDATE_TIME = "update_time";
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.njcn.csdevice.controller.project;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
|
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.csdevice.pojo.param.AppTopologyDiagramQueryPageParm;
|
||||||
|
import com.njcn.csdevice.pojo.param.AppTopologyDiagramQueryParm;
|
||||||
|
import com.njcn.csdevice.pojo.vo.AppTopologyDiagramVO;
|
||||||
|
import com.njcn.csdevice.pojo.vo.CsTopologyDiagramTemplateVO;
|
||||||
|
import com.njcn.csdevice.service.CsTopologyDiagramTemplateService;
|
||||||
|
import com.njcn.minioss.bo.MinIoUploadResDTO;
|
||||||
|
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.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (cs_line_topology_template)表控制层
|
||||||
|
*
|
||||||
|
* @author xxxxx
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@Slf4j
|
||||||
|
@RequestMapping("/topologyTemplate")
|
||||||
|
@Api(tags = " 拓扑图-监测点")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class TopologyTemplateController extends BaseController {
|
||||||
|
|
||||||
|
private final CsTopologyDiagramTemplateService csTopologyDiagramTemplateService;
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPLOAD)
|
||||||
|
@PostMapping("/uploadImage")
|
||||||
|
@ApiOperation("上传模板底图")
|
||||||
|
@ApiImplicitParam(name = "file", value = "底图文件", required = true)
|
||||||
|
public HttpResult<MinIoUploadResDTO> uploadImage(@RequestParam("file") MultipartFile issuesFile){
|
||||||
|
String methodDescribe = getMethodDescribe("uploadImage");
|
||||||
|
String filePath = csTopologyDiagramTemplateService.uploadImage(issuesFile);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,new MinIoUploadResDTO(issuesFile.getOriginalFilename(),filePath), methodDescribe);
|
||||||
|
}
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/queryImage")
|
||||||
|
@ApiOperation("查询拓扑图模板")
|
||||||
|
public HttpResult<List<CsTopologyDiagramTemplateVO>> queryImage(){
|
||||||
|
String methodDescribe = getMethodDescribe("queryImage");
|
||||||
|
|
||||||
|
List<CsTopologyDiagramTemplateVO> list = csTopologyDiagramTemplateService.queryImage();
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?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.csdevice.mapper.CsLineTopologyTemplateMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.csdevice.pojo.po.CsLineTopologyTemplate">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table cs_line_topology_template-->
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<id column="line_id" jdbcType="VARCHAR" property="lineId" />
|
||||||
|
<result column="status" jdbcType="BIT" property="status" />
|
||||||
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="lng" jdbcType="DECIMAL" property="lng" />
|
||||||
|
<result column="lat" jdbcType="DECIMAL" property="lat" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, line_id, `status`, create_by, create_time, update_by, update_time, lng, lat
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?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.csdevice.mapper.CsTopologyDiagramTemplateMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.csdevice.pojo.po.CsTopologyDiagramTemplate">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table cs_topology_diagram_template-->
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
|
<result column="file_path" jdbcType="VARCHAR" property="filePath" />
|
||||||
|
<result column="status" jdbcType="BIT" property="status" />
|
||||||
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, `name`, file_path, `status`, create_by, create_time, update_by, update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user