欣影管理平台装置通道表修改

jni
liuguijing 2 years ago
parent 53ed0e738b
commit c17dc9fb89

@ -8,10 +8,7 @@ import com.shxy.xymanager_common.bean.ServiceStatus;
import com.shxy.xymanager_common.model.DyLineTreeAndChannelListModel; import com.shxy.xymanager_common.model.DyLineTreeAndChannelListModel;
import com.shxy.xymanager_common.model.TerminalChannelListModel; import com.shxy.xymanager_common.model.TerminalChannelListModel;
import com.shxy.xymanager_common.model.TerminalChannelMapperListModel; import com.shxy.xymanager_common.model.TerminalChannelMapperListModel;
import com.shxy.xymanager_common.vo.TerminalChannelIdListVo; import com.shxy.xymanager_common.vo.*;
import com.shxy.xymanager_common.vo.TerminalChannelVo;
import com.shxy.xymanager_common.vo.TerminalIdVo;
import com.shxy.xymanager_common.vo.UpdateTerminalChannelVo;
import com.shxy.xymanager_service.service.TerminalChannelService; import com.shxy.xymanager_service.service.TerminalChannelService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -38,8 +35,8 @@ public class ChannelController extends BaseController {
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getChannelList") @RequestMapping("/getChannelList")
@Log(title = "获取所有通道列表", type = "查询") @Log(title = "获取所有通道列表", type = "查询")
public ResponseReult<TerminalChannelListModel> getChannelList() { public ResponseReult<TerminalChannelListModel> getChannelList(@RequestBody @Validated PageVo vo) {
ServiceBody<TerminalChannelListModel> serviceBody = terminalChannelService.getChannelList(); ServiceBody<TerminalChannelListModel> serviceBody = terminalChannelService.getChannelList(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) { if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData()); return ResponseReult.success(serviceBody.getData());
} else { } else {
@ -64,7 +61,7 @@ public class ChannelController 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 = "请求路径没有或页面跳转路径不对")}) @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/updateChannelList") @RequestMapping("/updateChannelList")
@Log(title = "修改通道列表", type = "查询") @Log(title = "修改通道列表", type = "修改")
public ResponseReult<String> updateChannelList(@RequestBody @Validated UpdateTerminalChannelVo vo) { public ResponseReult<String> updateChannelList(@RequestBody @Validated UpdateTerminalChannelVo vo) {
ServiceBody<String> serviceBody = terminalChannelService.updateChannelList(vo); ServiceBody<String> serviceBody = terminalChannelService.updateChannelList(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) { if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
@ -77,7 +74,7 @@ public class ChannelController 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 = "请求路径没有或页面跳转路径不对")}) @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/deleteChannelList") @RequestMapping("/deleteChannelList")
@Log(title = "获取通道列表", type = "查询") @Log(title = "删除通道接口", type = "修改")
public ResponseReult<String> deleteChannelList(@RequestBody @Validated TerminalChannelIdListVo vo) { public ResponseReult<String> deleteChannelList(@RequestBody @Validated TerminalChannelIdListVo vo) {
ServiceBody<String> serviceBody = terminalChannelService.deleteChannelList(vo); ServiceBody<String> serviceBody = terminalChannelService.deleteChannelList(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) { if (serviceBody.getCode() == ServiceStatus.SUCCESS) {

@ -42,4 +42,17 @@ public class TerminalPhotoController extends BaseController {
} }
@ApiOperation(value = "图片查询", notes = "图片查询接口", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getPhotoList")
@Log(title = "获取设备列表", type = "查询")
public ResponseReult<TerminalPhotoListModel> getPhotoList(@RequestBody @Validated TerminalAndChannelIdAndTimeVo vo) {
ServiceBody<TerminalPhotoListModel> serviceBody = terminalPhotoService.getTerminalPhotoList(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
}
}
} }

@ -13,7 +13,14 @@ import java.util.List;
@Data @Data
@ApiModel(value = "通道列表", description = "通道列表信息") @ApiModel(value = "通道列表", description = "通道列表信息")
public class TerminalChannelListModel implements Serializable { public class TerminalChannelListModel implements Serializable {
@ApiModelProperty(value = "总记录数", example = "120")
private long total;
@ApiModelProperty(value = "总页数", example = "120")
private int totalpage;
@ApiModelProperty(value = "当前页", example = "1")
private int currentpage;
@ApiModelProperty(value = "每页记录数", example = "1")
private int pagesize;
@ApiModelProperty(value = "通道列表对象", example = "[]") @ApiModelProperty(value = "通道列表对象", example = "[]")
private List<ChannelBean> list; private List<ChannelBean> list;

@ -13,17 +13,17 @@ public class TerminalChannelVo {
@NotNull(message = "装置列表不能缺少") @NotNull(message = "装置列表不能缺少")
@ApiModelProperty(value = "装置通道编号列表", example = "123455") @ApiModelProperty(value = "装置通道编号列表", example = "123455")
private List<Item> list; private List<ChannelItem> list;
@Data @Data
public static class Item { public static class ChannelItem {
@NotNull(message = "通道编号") @NotNull(message = "通道编号")
@ApiModelProperty(value = "装置编号", example = "123455") @ApiModelProperty(value = "装置编号", example = "123455")
private Integer id; private Integer id;
@NotNull(message = "通道编号不能缺少") @NotNull(message = "通道编号不能缺少")
@ApiModelProperty(value = "通道编号", example = "123455") @ApiModelProperty(value = "通道编号", example = "123455")
private Integer channelname; private String channelname;
@ApiModelProperty(value = "分辨率W", example = "123456") @ApiModelProperty(value = "分辨率W", example = "123456")
private Integer maxResolutionWidth; private Integer maxResolutionWidth;

@ -8,7 +8,7 @@ import javax.validation.constraints.NotNull;
import java.util.List; import java.util.List;
@Data @Data
@ApiModel(value = "通道对象", description = "通道对象描述") @ApiModel(value = "修改通道对象", description = "修改通道对象描述")
public class UpdateTerminalChannelVo { public class UpdateTerminalChannelVo {
@NotNull(message = "通道编号") @NotNull(message = "通道编号")

@ -104,13 +104,23 @@
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</delete> </delete>
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalChannels"> <insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalChannels">
insert into terminal_channels (id, term_id, channel_no, insert into terminal_channels (id, term_id,
channel_name, max_resolution_width, max_resolution_height channel_name, max_resolution_width, max_resolution_height
) )
values (#{id,jdbcType=INTEGER}, #{termId,jdbcType=INTEGER}, #{channelNo,jdbcType=TINYINT}, values (#{id,jdbcType=INTEGER}, #{termId,jdbcType=INTEGER},
#{channelName,jdbcType=VARCHAR}, #{maxResolutionWidth,jdbcType=INTEGER}, #{maxResolutionHeight,jdbcType=INTEGER} #{channelName,jdbcType=VARCHAR}, #{maxResolutionWidth,jdbcType=INTEGER}, #{maxResolutionHeight,jdbcType=INTEGER}
) )
</insert> </insert>
<insert id="insertList" >
insert into terminal_channels
(id,channel_name,max_resolution_width,max_resolution_height,status,create_time,update_time)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.id},#{item.channelName},#{item.maxResolutionWidth},#{item.maxResolutionHeight},#{status},#{createat},#{updateat})
</foreach>
</insert>
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.TerminalChannels"> <insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.TerminalChannels">
insert into terminal_channels insert into terminal_channels
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">

@ -3,6 +3,7 @@ package com.shxy.xymanager_service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions; import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import com.github.pagehelper.PageInfo;
import com.shxy.xymanager_common.bean.ServiceBody; import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.dto.DyLineAndTerminalAndChannelDto; import com.shxy.xymanager_common.dto.DyLineAndTerminalAndChannelDto;
import com.shxy.xymanager_common.dto.TermChannelAndMapperDto; import com.shxy.xymanager_common.dto.TermChannelAndMapperDto;
@ -12,10 +13,8 @@ import com.shxy.xymanager_common.exception.Asserts;
import com.shxy.xymanager_common.model.DyLineTreeAndChannelListModel; import com.shxy.xymanager_common.model.DyLineTreeAndChannelListModel;
import com.shxy.xymanager_common.model.TerminalChannelListModel; import com.shxy.xymanager_common.model.TerminalChannelListModel;
import com.shxy.xymanager_common.model.TerminalChannelMapperListModel; import com.shxy.xymanager_common.model.TerminalChannelMapperListModel;
import com.shxy.xymanager_common.vo.TerminalChannelIdListVo; import com.shxy.xymanager_common.page.PageUtils;
import com.shxy.xymanager_common.vo.TerminalChannelVo; import com.shxy.xymanager_common.vo.*;
import com.shxy.xymanager_common.vo.TerminalIdVo;
import com.shxy.xymanager_common.vo.UpdateTerminalChannelVo;
import com.shxy.xymanager_dao.dao.TerminalChannelsDao; import com.shxy.xymanager_dao.dao.TerminalChannelsDao;
import com.shxy.xymanager_service.service.TerminalChannelService; import com.shxy.xymanager_service.service.TerminalChannelService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -87,7 +86,10 @@ public class TerminalChannelServiceImpl implements TerminalChannelService {
* @return * @return
*/ */
@Override @Override
public ServiceBody<TerminalChannelListModel> getChannelList() { public ServiceBody<TerminalChannelListModel> getChannelList(PageVo vo) {
int pageindex = vo.getPageindex();
int pagesize = vo.getPagesize();
PageUtils.SetPage(pageindex, pagesize);
TerminalChannelListModel model = new TerminalChannelListModel(); TerminalChannelListModel model = new TerminalChannelListModel();
List<TerminalChannels> list = terminalChannelsDao.selectChannelList(); List<TerminalChannels> list = terminalChannelsDao.selectChannelList();
boolean empty = CollectionUtil.isEmpty(list); boolean empty = CollectionUtil.isEmpty(list);
@ -97,6 +99,17 @@ public class TerminalChannelServiceImpl implements TerminalChannelService {
List<TerminalChannelListModel.ChannelBean> channelBeans = BeanUtil.copyToList(list, TerminalChannelListModel.ChannelBean.class, CopyOptions.create().ignoreCase()); List<TerminalChannelListModel.ChannelBean> channelBeans = BeanUtil.copyToList(list, TerminalChannelListModel.ChannelBean.class, CopyOptions.create().ignoreCase());
model.setList(channelBeans); model.setList(channelBeans);
} }
PageInfo pageData = PageUtils.getPageData(list);
int currentpage = pageData.getPageNum();
model.setCurrentpage(currentpage);
long total = pageData.getTotal();
model.setTotal(total);
int pageSize = pageData.getPageSize();
model.setPagesize(pageSize);
int pages = pageData.getPages();
model.setTotalpage(pages);
return Asserts.success(model); return Asserts.success(model);
} }

@ -3,7 +3,7 @@ package com.shxy.xymanager_service.interaction;
public class Cma { public class Cma {
static { static {
System.setProperty("java.library.path", "./libs") System.setProperty("java.library.path", "./libs");
System.loadLibrary("xympj"); System.loadLibrary("xympj");
initCmaEnv(); initCmaEnv();
} }

@ -4,10 +4,7 @@ import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.model.DyLineTreeAndChannelListModel; import com.shxy.xymanager_common.model.DyLineTreeAndChannelListModel;
import com.shxy.xymanager_common.model.TerminalChannelListModel; import com.shxy.xymanager_common.model.TerminalChannelListModel;
import com.shxy.xymanager_common.model.TerminalChannelMapperListModel; import com.shxy.xymanager_common.model.TerminalChannelMapperListModel;
import com.shxy.xymanager_common.vo.TerminalChannelIdListVo; import com.shxy.xymanager_common.vo.*;
import com.shxy.xymanager_common.vo.TerminalChannelVo;
import com.shxy.xymanager_common.vo.TerminalIdVo;
import com.shxy.xymanager_common.vo.UpdateTerminalChannelVo;
/** /**
* *
@ -42,7 +39,7 @@ public interface TerminalChannelService {
* *
* @return * @return
*/ */
ServiceBody<TerminalChannelListModel> getChannelList(); ServiceBody<TerminalChannelListModel> getChannelList(PageVo vo);
/** /**
* *

Loading…
Cancel
Save