装置分辨率功能

jni
liuguijing 2 years ago
parent 64cf4d6f1d
commit d7f0900a83

@ -5,10 +5,7 @@ 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.model.DyLineTreeAndChannelListModel;
import com.shxy.xymanager_common.model.TerminalAllChannelListModel;
import com.shxy.xymanager_common.model.TerminalChannelListModel;
import com.shxy.xymanager_common.model.TerminalChannelMapperListModel;
import com.shxy.xymanager_common.model.*;
import com.shxy.xymanager_common.vo.*;
import com.shxy.xymanager_service.service.TermSetService;
import com.shxy.xymanager_service.service.TerminalChannelService;
@ -44,4 +41,17 @@ public class TermSetController extends BaseController {
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("/getResolutionList")
@Log(title = "获取分辨率代码", type = "查询")
public ResponseReult<ResolutionModel> getResolutionList() {
ServiceBody<ResolutionModel> serviceBody = termSetService.getResolutionList();
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
}
}
}

@ -50,7 +50,8 @@ public class TerminalPhotoController extends BaseController {
@RequestMapping("/getLatestPhoto")
@Log(title = "获取最新图片", type = "查询")
public ResponseReult<Date> getLatestPhoto(@RequestBody @Validated TerminalPhotoVo vo) {
ServiceBody<Date> serviceBody = terminalPhotoService.getLatestPhoto(vo);
ServiceBody<Date> latestPhoto = terminalPhotoService.getLatestPhoto(vo);
ServiceBody<Date> serviceBody = latestPhoto;
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {

@ -0,0 +1,16 @@
package com.shxy.xymanager_common.entity;
import lombok.Data;
import java.io.Serializable;
@Data
public class Resolution implements Serializable {
private Integer id;
private String name;
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,31 @@
package com.shxy.xymanager_common.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
*
*/
@Data
@ApiModel(value = "分辨率返回对象", description = "分辨率返回对象")
public class ResolutionModel implements Serializable {
@ApiModelProperty(value = "分辨率列表", example = "[]")
private List<ResolutionBean> list;
@Data
public static class ResolutionBean {
@ApiModelProperty(value = "编号", example = "120")
private Integer id;
@ApiModelProperty(value = "名称编号", example = "120")
private String name;
}
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,14 @@
package com.shxy.xymanager_dao.dao;
import com.shxy.xymanager_common.entity.Resolution;
import java.util.List;
public interface TerminalResolutionDao {
List<Resolution> selectAllList();
int insert(Resolution record);
int insertSelective(Resolution record);
}

@ -144,13 +144,20 @@
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<table tableName="terminal_positions"
domainObjectName="TerminalPositions"
mapperName="TerminalPositionsDao"
<!-- <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="resolution"
domainObjectName="Resolution"
mapperName="TerminalResolutionDao"
enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false">
<!-- <property name="useActualColumnNames" value="false"/>-->
</table>
</context>
</generatorConfiguration>

@ -0,0 +1,36 @@
<?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.TerminalResolutionDao">
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.Resolution">
<result column="id" jdbcType="INTEGER" property="id"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
</resultMap>
<select id="selectAllList" resultMap="BaseResultMap">
select
id,name
from resolution
</select>
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.Resolution">
insert into resolution (id, name)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.Resolution">
insert into resolution
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
</trim>
</insert>
</mapper>

@ -1,15 +1,22 @@
package com.shxy.xymanager_service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.constant.Constants;
import com.shxy.xymanager_common.entity.Resolution;
import com.shxy.xymanager_common.exception.Asserts;
import com.shxy.xymanager_common.model.ResolutionModel;
import com.shxy.xymanager_common.util.ProcessExecUtils;
import com.shxy.xymanager_common.vo.TerminalIdVo;
import com.shxy.xymanager_common.vo.TerminalReqPhotoTimeVo;
import com.shxy.xymanager_dao.dao.TerminalResolutionDao;
import com.shxy.xymanager_dao.dao.TowerDao;
import com.shxy.xymanager_service.service.TermSetService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
@ -21,6 +28,8 @@ import org.springframework.stereotype.Service;
@Service
public class TermSetServiceImpl implements TermSetService {
@Autowired
private TerminalResolutionDao terminalResolutionDao;
@Override
public ServiceBody<Integer> alarmMark(TerminalIdVo vo) {
@ -37,5 +46,18 @@ public class TermSetServiceImpl implements TermSetService {
return Asserts.success(Integer.parseInt(Constants.REQUEST_ID.toString()));
}
/**
*
* @return
*/
@Override
public ServiceBody<ResolutionModel> getResolutionList() {
ResolutionModel model = new ResolutionModel();
List<Resolution> beans = terminalResolutionDao.selectAllList();
List<ResolutionModel.ResolutionBean> list = BeanUtil.copyToList(beans, ResolutionModel.ResolutionBean.class);
model.setList(list);
return Asserts.success(model);
}
}

@ -1,10 +1,7 @@
package com.shxy.xymanager_service.service;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.model.DyLineTreeAndChannelListModel;
import com.shxy.xymanager_common.model.TerminalAllChannelListModel;
import com.shxy.xymanager_common.model.TerminalChannelListModel;
import com.shxy.xymanager_common.model.TerminalChannelMapperListModel;
import com.shxy.xymanager_common.model.*;
import com.shxy.xymanager_common.vo.*;
/**
@ -24,4 +21,9 @@ public interface TermSetService {
ServiceBody<Integer> selectPhotoTimeGet(TerminalIdVo vo);
/**
*
* @return
*/
ServiceBody<ResolutionModel> getResolutionList();
}

Loading…
Cancel
Save