diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyLevelController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyLevelController.java index b62d2ec..c32e802 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyLevelController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyLevelController.java @@ -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 getdyTreeList(@RequestBody @Validated DyTreeListVo vo) { - ServiceBody serviceBody = dyLevelService.getdyTreeList(vo); + @RequestMapping("/add") + @Log(title = "增加电压", type = "查询") + public ResponseReult addDy(@RequestBody DyLevel vo) { + ServiceBody 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 getzzdyTreeList(@RequestBody @Validated DyListVo vo) { - ServiceBody serviceBody = dyLevelService.getzzdyTreeList(vo.getType(),vo.getLineid()); + @RequestMapping("/delete") + @Log(title = "删除电压", type = "查询") + public ResponseReult deleteDy(@Validated @NotNull(message = "id不能为空!") Integer vo) { + ServiceBody 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> getdyList() { - ServiceBody> serviceBody = dyLevelService.getdyList(); + @RequestMapping("/update") + @Log(title = "修改电压", type = "查询") + public ResponseReult update(@RequestBody DyLevel vo) { + ServiceBody 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 getLastTowerList(@RequestHeader HttpHeaders headers, @RequestBody LastTowerVo vo) { - String requestIp = HeaderUtil.getRequestIp(headers); - ServiceBody serviceBody = dyLevelService.getLastTowerList(requestIp,vo); + @RequestMapping("/listAll") + @Log(title = "查询电压", type = "查询") + public ResponseReult> listAll() { + ServiceBody> serviceBody = dyLevelService.listAll(); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { return ResponseReult.success(serviceBody.getData()); } else { diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyTreeController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyTreeController.java new file mode 100644 index 0000000..60ba578 --- /dev/null +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyTreeController.java @@ -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 getdyTreeList(@RequestBody @Validated DyTreeListVo vo) { + ServiceBody 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 getzzdyTreeList(@RequestBody @Validated DyListVo vo) { + ServiceBody 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> getdyList() { + ServiceBody> 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 getLastTowerList(@RequestHeader HttpHeaders headers, @RequestBody LastTowerVo vo) { + String requestIp = HeaderUtil.getRequestIp(headers); + ServiceBody serviceBody = dyLevelService.getLastTowerList(requestIp, vo); + if (serviceBody.getCode() == ServiceStatus.SUCCESS) { + return ResponseReult.success(serviceBody.getData()); + } else { + return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg()); + } + } + +} diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPhotoExample.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPhotoExample.java index 5eb397b..d34c601 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPhotoExample.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPhotoExample.java @@ -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 values) { + public Criteria andMediaTypeIn(List values) { addCriterion("media_type in", values, "mediaType"); return (Criteria) this; } - public Criteria andMediaTypeNotIn(List values) { + public Criteria andMediaTypeNotIn(List 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; } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPhotoMarkPaths.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPhotoMarkPaths.java new file mode 100644 index 0000000..e76a5e8 --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPhotoMarkPaths.java @@ -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; + } +} \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPhotoMarks.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPhotoMarks.java new file mode 100644 index 0000000..bd21168 --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPhotoMarks.java @@ -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; + } +} \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/PhotoMarkModel.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/PhotoMarkModel.java index 5a24e12..4bbdfa9 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/PhotoMarkModel.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/PhotoMarkModel.java @@ -16,35 +16,35 @@ import java.util.List; @ApiModel(value = "获取绘制信息", description = "获取绘制信息") public class PhotoMarkModel implements Serializable { - @ApiModelProperty(value = "通道编号", example = "213") - private Integer termId; + @ApiModelProperty(value = "通道编号", example = "213") + private Integer termId; - @ApiModelProperty(value = "绘制ID", example = "213") - private Integer markId; + @ApiModelProperty(value = "绘制ID", example = "213") + private Integer markId; - @NotNull(message = "通道编号") - @ApiModelProperty(value = "通道编号", example = "213") - private Integer channelId; + @NotNull(message = "通道编号") + @ApiModelProperty(value = "通道编号", example = "213") + private Integer channelId; - @ApiModelProperty(value = "参考图片宽", example = "213") - private Integer width; + @ApiModelProperty(value = "参考图片宽", example = "213") + private Integer width; - @ApiModelProperty(value = "参考图片高", example = "213") - private Integer height; + @ApiModelProperty(value = "参考图片高", example = "213") + private Integer height; - @ApiModelProperty(value = "线条颜色", example = "213") - private String color; + @ApiModelProperty(value = "线条颜色", example = "213") + private String color; - @ApiModelProperty(value = "线条宽度", example = "213") - private Short boderWidth; + @ApiModelProperty(value = "线条宽度", example = "213") + private Short boderWidth; - @ApiModelProperty(value = "图片地址", example = "213") - private String path; + @ApiModelProperty(value = "图片地址", example = "213") + private String path; - @ApiModelProperty(value = "通道编号和名称", example = "213") - private List list; + @ApiModelProperty(value = "通道编号和名称", example = "213") + private List list; - @ApiModelProperty(value = "", example = "0--关 1---开启") - private Integer markEnable; + @ApiModelProperty(value = "", example = "0--关 1---开启") + private Integer markEnable; } diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoMarkPathsDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoMarkPathsDao.java new file mode 100644 index 0000000..bc8e857 --- /dev/null +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoMarkPathsDao.java @@ -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); +} \ No newline at end of file diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoMarksDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoMarksDao.java new file mode 100644 index 0000000..7565d95 --- /dev/null +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoMarksDao.java @@ -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); +} \ No newline at end of file diff --git a/xymanager_dao/src/main/resources/generatorConfig.xml b/xymanager_dao/src/main/resources/generatorConfig.xml index 2143119..7643b5c 100644 --- a/xymanager_dao/src/main/resources/generatorConfig.xml +++ b/xymanager_dao/src/main/resources/generatorConfig.xml @@ -122,12 +122,12 @@ - - -
+ + + + + + @@ -195,13 +195,21 @@ - - - - - - - + + + + + + + + + + +
diff --git a/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml index d769ea8..b98dad4 100644 --- a/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml +++ b/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml @@ -7,7 +7,7 @@ - + diff --git a/xymanager_dao/src/main/resources/mappers/TerminalPhotoMarkPathsDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalPhotoMarkPathsDao.xml new file mode 100644 index 0000000..c742672 --- /dev/null +++ b/xymanager_dao/src/main/resources/mappers/TerminalPhotoMarkPathsDao.xml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + id, mark_id, x1, y1, x2, y2 + + + + delete from terminal_photo_mark_paths + where id = #{id,jdbcType=INTEGER} + + + 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 into terminal_photo_mark_paths + + + id, + + + mark_id, + + + x1, + + + y1, + + + x2, + + + y2, + + + + + #{id,jdbcType=INTEGER}, + + + #{markId,jdbcType=INTEGER}, + + + #{x1,jdbcType=REAL}, + + + #{y1,jdbcType=REAL}, + + + #{x2,jdbcType=REAL}, + + + #{y2,jdbcType=REAL}, + + + + + update terminal_photo_mark_paths + + + 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 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} + + \ No newline at end of file diff --git a/xymanager_dao/src/main/resources/mappers/TerminalPhotoMarksDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalPhotoMarksDao.xml new file mode 100644 index 0000000..5ce089a --- /dev/null +++ b/xymanager_dao/src/main/resources/mappers/TerminalPhotoMarksDao.xml @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + id, term_id, channel_id, width, height, color, boder_width, create_time, update_time + + + + + + + + + + delete from terminal_photo_marks + where id = #{id,jdbcType=INTEGER} + + + + + + + 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 into terminal_photo_marks + + + id, + + + term_id, + + + channel_id, + + + width, + + + height, + + + color, + + + boder_width, + + + create_time, + + + update_time, + + + + + #{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}, + + + + + update terminal_photo_marks + + + 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 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} + + + + + + \ No newline at end of file diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/DyLevelServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/DyLevelServiceImpl.java index 3ed01a7..30cf500 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/DyLevelServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/DyLevelServiceImpl.java @@ -302,4 +302,29 @@ public class DyLevelServiceImpl implements DyLevelService { return Asserts.success(model); } + @Override + public ServiceBody add(DyLevel vo) { + dyLevelDao.insertSelective(vo); + return Asserts.success("success"); + } + + @Override + public ServiceBody delete(Integer vo) { + dyLevelDao.deleteByPrimaryKey(vo); + return Asserts.success("success"); + } + + @Override + public ServiceBody update(DyLevel vo) { + dyLevelDao.updateByPrimaryKey(vo); + return Asserts.success("success"); + } + + @Override + public ServiceBody> listAll() { + DyLevelExample example = new DyLevelExample(); + List dyLevels = dyLevelDao.selectByExample(example); + return Asserts.success(dyLevels); + } + } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java index afa9c1c..cec78cc 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java @@ -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 getCoordinate(String requestIp, MarkReqVo vo) { + + Integer termId = vo.getTermId(); + Integer channelId = vo.getChannelId(); Map 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); } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/DyLevelService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/DyLevelService.java index 3647efe..f1fe00d 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/DyLevelService.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/DyLevelService.java @@ -45,4 +45,13 @@ public interface DyLevelService { * @return */ ServiceBody getLastTowerList(String requestIp, LastTowerVo vo); + + ServiceBody add(DyLevel vo); + + ServiceBody delete(Integer vo); + + ServiceBody update(DyLevel vo); + + ServiceBody> listAll(); + }