电压线路修改

dev
liuguijing 1 year ago
parent 89277e21a9
commit 24770b8254

@ -27,21 +27,24 @@ import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.constraints.NotNull;
import java.util.List;
@Api(value = "电压等级接口", tags = "电压等级接口描述")
@RestController
@Slf4j
@RequestMapping("dy")
public class DyLevelController extends BaseController {
@Autowired
DyLevelService dyLevelService;
@ApiOperation(value = "获取电压等级树状列表接口", notes = "获取电压等级树状列表接口", httpMethod = "POST")
@ApiOperation(value = "增加电压", notes = "增加电压", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getdyTreeList")
@Log(title = "获取电压等级树状列表接口", type = "查询")
public ResponseReult<DyLineTreeListModel> getdyTreeList(@RequestBody @Validated DyTreeListVo vo) {
ServiceBody<DyLineTreeListModel> serviceBody = dyLevelService.getdyTreeList(vo);
@RequestMapping("/add")
@Log(title = "增加电压", type = "查询")
public ResponseReult<String> addDy(@RequestBody DyLevel vo) {
ServiceBody<String> serviceBody = dyLevelService.add(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
@ -49,12 +52,12 @@ public class DyLevelController extends BaseController {
}
}
@ApiOperation(value = "郑州测试获取电压等级树状列表接口", notes = "郑州测试获取电压等级树状列表接口", httpMethod = "POST")
@ApiOperation(value = "删除电压", notes = "删除电压", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getzzdyTreeList")
@Log(title = "郑州测试获取电压等级树状列表接口", type = "查询")
public ResponseReult<DyLineTreeListModel> getzzdyTreeList(@RequestBody @Validated DyListVo vo) {
ServiceBody<DyLineTreeListModel> serviceBody = dyLevelService.getzzdyTreeList(vo.getType(),vo.getLineid());
@RequestMapping("/delete")
@Log(title = "删除电压", type = "查询")
public ResponseReult<String> deleteDy(@Validated @NotNull(message = "id不能为空!") Integer vo) {
ServiceBody<String> serviceBody = dyLevelService.delete(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
@ -62,12 +65,12 @@ public class DyLevelController extends BaseController {
}
}
@ApiOperation(value = "获取电压等级列表", notes = "获取电压等级列表", httpMethod = "POST")
@ApiOperation(value = "修改电压", notes = "修改电压", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getdyList")
@Log(title = "获取电压等级列表", type = "查询")
public ResponseReult<List<DyLevel>> getdyList() {
ServiceBody<List<DyLevel>> serviceBody = dyLevelService.getdyList();
@RequestMapping("/update")
@Log(title = "修改电压", type = "查询")
public ResponseReult<String> update(@RequestBody DyLevel vo) {
ServiceBody<String> serviceBody = dyLevelService.update(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
@ -75,13 +78,12 @@ public class DyLevelController extends BaseController {
}
}
@ApiOperation(value = "根据电压或者线路获取所有杆塔和最新照片", notes = "根据电压或者线路获取所有杆塔和最新照片", httpMethod = "POST")
@ApiOperation(value = "查询电压", notes = "查询电压", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getTowerAndPhotoList")
@Log(title = "根据电压或者线路获取所有杆塔和最新照片", type = "查询")
public ResponseReult<TerminalPhotosModel> getLastTowerList(@RequestHeader HttpHeaders headers, @RequestBody LastTowerVo vo) {
String requestIp = HeaderUtil.getRequestIp(headers);
ServiceBody<TerminalPhotosModel> serviceBody = dyLevelService.getLastTowerList(requestIp,vo);
@RequestMapping("/listAll")
@Log(title = "查询电压", type = "查询")
public ResponseReult<List<DyLevel>> listAll() {
ServiceBody<List<DyLevel>> serviceBody = dyLevelService.listAll();
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {

@ -0,0 +1,93 @@
package com.shxy.xymanager_admin.controller;
import com.shxy.xymanager_common.annotation.Log;
import com.shxy.xymanager_common.base.BaseController;
import com.shxy.xymanager_common.base.ResponseReult;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.bean.ServiceStatus;
import com.shxy.xymanager_common.entity.DyLevel;
import com.shxy.xymanager_common.model.DyLineTreeListModel;
import com.shxy.xymanager_common.model.TerminalPhotosModel;
import com.shxy.xymanager_common.util.xinyin.HeaderUtil;
import com.shxy.xymanager_common.vo.DyListVo;
import com.shxy.xymanager_common.vo.DyTreeListVo;
import com.shxy.xymanager_common.vo.LastTowerVo;
import com.shxy.xymanager_service.service.DyLevelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.constraints.NotNull;
import java.util.List;
@Api(value = "电压等级接口", tags = "电压等级接口描述")
@RestController
@Slf4j
public class DyTreeController extends BaseController {
@Autowired
DyLevelService dyLevelService;
@ApiOperation(value = "获取电压等级树状列表接口", notes = "获取电压等级树状列表接口", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getdyTreeList")
@Log(title = "获取电压等级树状列表接口", type = "查询")
public ResponseReult<DyLineTreeListModel> getdyTreeList(@RequestBody @Validated DyTreeListVo vo) {
ServiceBody<DyLineTreeListModel> serviceBody = dyLevelService.getdyTreeList(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
}
}
@ApiOperation(value = "郑州测试获取电压等级树状列表接口", notes = "郑州测试获取电压等级树状列表接口", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getzzdyTreeList")
@Log(title = "郑州测试获取电压等级树状列表接口", type = "查询")
public ResponseReult<DyLineTreeListModel> getzzdyTreeList(@RequestBody @Validated DyListVo vo) {
ServiceBody<DyLineTreeListModel> serviceBody = dyLevelService.getzzdyTreeList(vo.getType(), vo.getLineid());
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
}
}
@ApiOperation(value = "获取电压等级列表", notes = "获取电压等级列表", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getdyList")
@Log(title = "获取电压等级列表", type = "查询")
public ResponseReult<List<DyLevel>> getdyList() {
ServiceBody<List<DyLevel>> serviceBody = dyLevelService.getdyList();
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
}
}
@ApiOperation(value = "根据电压或者线路获取所有杆塔和最新照片", notes = "根据电压或者线路获取所有杆塔和最新照片", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getTowerAndPhotoList")
@Log(title = "根据电压或者线路获取所有杆塔和最新照片", type = "查询")
public ResponseReult<TerminalPhotosModel> getLastTowerList(@RequestHeader HttpHeaders headers, @RequestBody LastTowerVo vo) {
String requestIp = HeaderUtil.getRequestIp(headers);
ServiceBody<TerminalPhotosModel> serviceBody = dyLevelService.getLastTowerList(requestIp, vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
}
}
}

@ -415,52 +415,52 @@ public class TerminalPhotoExample {
return (Criteria) this;
}
public Criteria andMediaTypeEqualTo(Byte value) {
public Criteria andMediaTypeEqualTo(Integer value) {
addCriterion("media_type =", value, "mediaType");
return (Criteria) this;
}
public Criteria andMediaTypeNotEqualTo(Byte value) {
public Criteria andMediaTypeNotEqualTo(Integer value) {
addCriterion("media_type <>", value, "mediaType");
return (Criteria) this;
}
public Criteria andMediaTypeGreaterThan(Byte value) {
public Criteria andMediaTypeGreaterThan(Integer value) {
addCriterion("media_type >", value, "mediaType");
return (Criteria) this;
}
public Criteria andMediaTypeGreaterThanOrEqualTo(Byte value) {
public Criteria andMediaTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("media_type >=", value, "mediaType");
return (Criteria) this;
}
public Criteria andMediaTypeLessThan(Byte value) {
public Criteria andMediaTypeLessThan(Integer value) {
addCriterion("media_type <", value, "mediaType");
return (Criteria) this;
}
public Criteria andMediaTypeLessThanOrEqualTo(Byte value) {
public Criteria andMediaTypeLessThanOrEqualTo(Integer value) {
addCriterion("media_type <=", value, "mediaType");
return (Criteria) this;
}
public Criteria andMediaTypeIn(List<Byte> values) {
public Criteria andMediaTypeIn(List<Integer> values) {
addCriterion("media_type in", values, "mediaType");
return (Criteria) this;
}
public Criteria andMediaTypeNotIn(List<Byte> values) {
public Criteria andMediaTypeNotIn(List<Integer> values) {
addCriterion("media_type not in", values, "mediaType");
return (Criteria) this;
}
public Criteria andMediaTypeBetween(Byte value1, Byte value2) {
public Criteria andMediaTypeBetween(Integer value1, Integer value2) {
addCriterion("media_type between", value1, value2, "mediaType");
return (Criteria) this;
}
public Criteria andMediaTypeNotBetween(Byte value1, Byte value2) {
public Criteria andMediaTypeNotBetween(Integer value1, Integer value2) {
addCriterion("media_type not between", value1, value2, "mediaType");
return (Criteria) this;
}

@ -0,0 +1,67 @@
package com.shxy.xymanager_common.entity;
import java.io.Serializable;
public class TerminalPhotoMarkPaths implements Serializable {
private Integer id;
private Integer markId;
private Float x1;
private Float y1;
private Float x2;
private Float y2;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getMarkId() {
return markId;
}
public void setMarkId(Integer markId) {
this.markId = markId;
}
public Float getX1() {
return x1;
}
public void setX1(Float x1) {
this.x1 = x1;
}
public Float getY1() {
return y1;
}
public void setY1(Float y1) {
this.y1 = y1;
}
public Float getX2() {
return x2;
}
public void setX2(Float x2) {
this.x2 = x2;
}
public Float getY2() {
return y2;
}
public void setY2(Float y2) {
this.y2 = y2;
}
}

@ -0,0 +1,98 @@
package com.shxy.xymanager_common.entity;
import java.io.Serializable;
import java.util.Date;
public class TerminalPhotoMarks implements Serializable {
private Integer id;
private Integer termId;
private Byte channelId;
private Integer width;
private Integer height;
private String color;
private Byte boderWidth;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getTermId() {
return termId;
}
public void setTermId(Integer termId) {
this.termId = termId;
}
public Byte getChannelId() {
return channelId;
}
public void setChannelId(Byte channelId) {
this.channelId = channelId;
}
public Integer getWidth() {
return width;
}
public void setWidth(Integer width) {
this.width = width;
}
public Integer getHeight() {
return height;
}
public void setHeight(Integer height) {
this.height = height;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color == null ? null : color.trim();
}
public Byte getBoderWidth() {
return boderWidth;
}
public void setBoderWidth(Byte boderWidth) {
this.boderWidth = boderWidth;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}

@ -0,0 +1,17 @@
package com.shxy.xymanager_dao.dao;
import com.shxy.xymanager_common.entity.TerminalPhotoMarkPaths;
public interface TerminalPhotoMarkPathsDao {
int deleteByPrimaryKey(Integer id);
int insert(TerminalPhotoMarkPaths record);
int insertSelective(TerminalPhotoMarkPaths record);
TerminalPhotoMarkPaths selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(TerminalPhotoMarkPaths record);
int updateByPrimaryKey(TerminalPhotoMarkPaths record);
}

@ -0,0 +1,17 @@
package com.shxy.xymanager_dao.dao;
import com.shxy.xymanager_common.entity.TerminalPhotoMarks;
public interface TerminalPhotoMarksDao {
int deleteByPrimaryKey(Integer id);
int insert(TerminalPhotoMarks record);
int insertSelective(TerminalPhotoMarks record);
TerminalPhotoMarks selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(TerminalPhotoMarks record);
int updateByPrimaryKey(TerminalPhotoMarks record);
}

@ -122,12 +122,12 @@
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<table tableName="v_dy_line_tower_terminals"
domainObjectName="View_Dy_Line_Tower_Terminals"
mapperName="View_Dy_Line_Tower_TerminalsDao"
>
<!-- <property name="useActualColumnNames" value="false"/>-->
</table>
<!-- <table tableName="v_dy_line_tower_terminals"-->
<!-- domainObjectName="View_Dy_Line_Tower_Terminals"-->
<!-- mapperName="View_Dy_Line_Tower_TerminalsDao"-->
<!-- >-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<!-- <table tableName="terminal_channel_mapper"-->
@ -195,13 +195,21 @@
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<!-- <table tableName="terminal_positions"-->
<!-- domainObjectName="TerminalPositions"-->
<!-- mapperName="TerminalPositionsDao"-->
<!-- enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"-->
<!-- enableSelectByExample="false" selectByExampleQueryId="false">-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<!-- <table tableName="terminal_photo_mark_paths"-->
<!-- domainObjectName="TerminalPhotoMarkPaths"-->
<!-- mapperName="TerminalPhotoMarkPathsDao"-->
<!-- enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"-->
<!-- enableSelectByExample="false" selectByExampleQueryId="false">-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<table tableName="terminal_photo_marks"
domainObjectName="TerminalPhotoMarks"
mapperName="TerminalPhotoMarksDao"
enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false">
<!-- <property name="useActualColumnNames" value="false"/>-->
</table>
<!-- <table tableName="resolution"-->
<!-- domainObjectName="Resolution"-->

@ -7,7 +7,7 @@
<result column="channel_id" jdbcType="TINYINT" property="channelId" />
<result column="preset_id" jdbcType="TINYINT" property="presetId" />
<result column="orginal_id" jdbcType="INTEGER" property="orginalId" />
<result column="media_type" jdbcType="TINYINT" property="mediaType" />
<result column="media_type" jdbcType="INTEGER" property="mediaType" />
<result column="photo_time" jdbcType="BIGINT" property="photoTime" />
<result column="path" jdbcType="VARCHAR" property="path" />
<result column="thumb" jdbcType="VARCHAR" property="thumb" />

@ -0,0 +1,104 @@
<?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.shxy.xymanager_dao.dao.TerminalPhotoMarkPathsDao">
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.TerminalPhotoMarkPaths">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="mark_id" jdbcType="INTEGER" property="markId" />
<result column="x1" jdbcType="REAL" property="x1" />
<result column="y1" jdbcType="REAL" property="y1" />
<result column="x2" jdbcType="REAL" property="x2" />
<result column="y2" jdbcType="REAL" property="y2" />
</resultMap>
<sql id="Base_Column_List">
id, mark_id, x1, y1, x2, y2
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from terminal_photo_mark_paths
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from terminal_photo_mark_paths
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalPhotoMarkPaths">
insert into terminal_photo_mark_paths (id, mark_id, x1,
y1, x2, y2)
values (#{id,jdbcType=INTEGER}, #{markId,jdbcType=INTEGER}, #{x1,jdbcType=REAL},
#{y1,jdbcType=REAL}, #{x2,jdbcType=REAL}, #{y2,jdbcType=REAL})
</insert>
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.TerminalPhotoMarkPaths">
insert into terminal_photo_mark_paths
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="markId != null">
mark_id,
</if>
<if test="x1 != null">
x1,
</if>
<if test="y1 != null">
y1,
</if>
<if test="x2 != null">
x2,
</if>
<if test="y2 != null">
y2,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="markId != null">
#{markId,jdbcType=INTEGER},
</if>
<if test="x1 != null">
#{x1,jdbcType=REAL},
</if>
<if test="y1 != null">
#{y1,jdbcType=REAL},
</if>
<if test="x2 != null">
#{x2,jdbcType=REAL},
</if>
<if test="y2 != null">
#{y2,jdbcType=REAL},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.TerminalPhotoMarkPaths">
update terminal_photo_mark_paths
<set>
<if test="markId != null">
mark_id = #{markId,jdbcType=INTEGER},
</if>
<if test="x1 != null">
x1 = #{x1,jdbcType=REAL},
</if>
<if test="y1 != null">
y1 = #{y1,jdbcType=REAL},
</if>
<if test="x2 != null">
x2 = #{x2,jdbcType=REAL},
</if>
<if test="y2 != null">
y2 = #{y2,jdbcType=REAL},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.TerminalPhotoMarkPaths">
update terminal_photo_mark_paths
set mark_id = #{markId,jdbcType=INTEGER},
x1 = #{x1,jdbcType=REAL},
y1 = #{y1,jdbcType=REAL},
x2 = #{x2,jdbcType=REAL},
y2 = #{y2,jdbcType=REAL}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

@ -0,0 +1,165 @@
<?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.shxy.xymanager_dao.dao.TerminalPhotoMarksDao">
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.TerminalPhotoMarks">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="term_id" jdbcType="INTEGER" property="termId"/>
<result column="channel_id" jdbcType="TINYINT" property="channelId"/>
<result column="width" jdbcType="INTEGER" property="width"/>
<result column="height" jdbcType="INTEGER" property="height"/>
<result column="color" jdbcType="VARCHAR" property="color"/>
<result column="boder_width" jdbcType="TINYINT" property="boderWidth"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap>
<sql id="Base_Column_List">
id, term_id, channel_id, width, height, color, boder_width, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from terminal_photo_marks
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from terminal_photo_marks
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalPhotoMarks">
insert into terminal_photo_marks (id, term_id, channel_id,
width, height, color,
boder_width, create_time, update_time
)
values (#{id,jdbcType=INTEGER}, #{termId,jdbcType=INTEGER}, #{channelId,jdbcType=TINYINT},
#{width,jdbcType=INTEGER}, #{height,jdbcType=INTEGER}, #{color,jdbcType=VARCHAR},
#{boderWidth,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.TerminalPhotoMarks">
insert into terminal_photo_marks
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="termId != null">
term_id,
</if>
<if test="channelId != null">
channel_id,
</if>
<if test="width != null">
width,
</if>
<if test="height != null">
height,
</if>
<if test="color != null">
color,
</if>
<if test="boderWidth != null">
boder_width,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="termId != null">
#{termId,jdbcType=INTEGER},
</if>
<if test="channelId != null">
#{channelId,jdbcType=TINYINT},
</if>
<if test="width != null">
#{width,jdbcType=INTEGER},
</if>
<if test="height != null">
#{height,jdbcType=INTEGER},
</if>
<if test="color != null">
#{color,jdbcType=VARCHAR},
</if>
<if test="boderWidth != null">
#{boderWidth,jdbcType=TINYINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.TerminalPhotoMarks">
update terminal_photo_marks
<set>
<if test="termId != null">
term_id = #{termId,jdbcType=INTEGER},
</if>
<if test="channelId != null">
channel_id = #{channelId,jdbcType=TINYINT},
</if>
<if test="width != null">
width = #{width,jdbcType=INTEGER},
</if>
<if test="height != null">
height = #{height,jdbcType=INTEGER},
</if>
<if test="color != null">
color = #{color,jdbcType=VARCHAR},
</if>
<if test="boderWidth != null">
boder_width = #{boderWidth,jdbcType=TINYINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.TerminalPhotoMarks">
update terminal_photo_marks
set term_id = #{termId,jdbcType=INTEGER},
channel_id = #{channelId,jdbcType=TINYINT},
width = #{width,jdbcType=INTEGER},
height = #{height,jdbcType=INTEGER},
color = #{color,jdbcType=VARCHAR},
boder_width = #{boderWidth,jdbcType=TINYINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

@ -302,4 +302,29 @@ public class DyLevelServiceImpl implements DyLevelService {
return Asserts.success(model);
}
@Override
public ServiceBody<String> add(DyLevel vo) {
dyLevelDao.insertSelective(vo);
return Asserts.success("success");
}
@Override
public ServiceBody<String> delete(Integer vo) {
dyLevelDao.deleteByPrimaryKey(vo);
return Asserts.success("success");
}
@Override
public ServiceBody<String> update(DyLevel vo) {
dyLevelDao.updateByPrimaryKey(vo);
return Asserts.success("success");
}
@Override
public ServiceBody<List<DyLevel>> listAll() {
DyLevelExample example = new DyLevelExample();
List<DyLevel> dyLevels = dyLevelDao.selectByExample(example);
return Asserts.success(dyLevels);
}
}

@ -39,6 +39,7 @@ import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.validation.constraints.NotNull;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Date;
@ -508,6 +509,9 @@ public class TerminalServiceImpl implements TerminalService {
@Override
public ServiceBody<PhotoMarkModel> getCoordinate(String requestIp, MarkReqVo vo) {
Integer termId = vo.getTermId();
Integer channelId = vo.getChannelId();
Map<String, String> globalParams = cacheService.getGolobalMap();
String s = globalParams.get(GloableParamsType.ImgMark.value());
Integer integer = null;
@ -525,6 +529,16 @@ public class TerminalServiceImpl implements TerminalService {
String photoPath = TerminalUtils.getPhotoPath(0, requestIp, dto.getPath());
dto.setPath(photoPath);
}
PageUtils.SetPage(1, 1);
TerminalPhotoExample example = new TerminalPhotoExample();
TerminalPhotoExample.Criteria criteria = example.createCriteria();
criteria.andChannelIdEqualTo(channelId).andTermIdEqualTo(termId).andMediaTypeEqualTo(CommonStatus.DELETE.value());
example.setOrderByClause( "id desc");
terminalPhotoDao.selectByExample(example);
} else {
dto = terminalPhotoDao.selectPhotoWithoutPic(vo);
}

@ -45,4 +45,13 @@ public interface DyLevelService {
* @return
*/
ServiceBody<TerminalPhotosModel> getLastTowerList(String requestIp, LastTowerVo vo);
ServiceBody<String> add(DyLevel vo);
ServiceBody<String> delete(Integer vo);
ServiceBody<String> update(DyLevel vo);
ServiceBody<List<DyLevel>> listAll();
}

Loading…
Cancel
Save