commit
afd06b7d18
16
pom.xml
16
pom.xml
|
|
@ -36,6 +36,22 @@
|
||||||
<version>3.3.2</version>
|
<version>3.3.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
<artifactId>junit-jupiter</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-test</artifactId>
|
||||||
|
<version>6.1.1</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import com.gunshi.project.xyt.service.ProtocolInfoService;
|
||||||
import com.gunshi.project.xyt.so.BzProtocolInfoSo;
|
import com.gunshi.project.xyt.so.BzProtocolInfoSo;
|
||||||
import com.gunshi.project.xyt.validate.markers.Insert;
|
import com.gunshi.project.xyt.validate.markers.Insert;
|
||||||
import com.gunshi.project.xyt.validate.markers.Update;
|
import com.gunshi.project.xyt.validate.markers.Update;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
@ -24,7 +25,7 @@ import java.util.Date;
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/protocolInfo")
|
@RequestMapping("/protocolInfo")
|
||||||
@Tag(name = "协议信息")
|
@Tag(name = "系统管理-统一接收-协议管理")
|
||||||
public class BzProtocolInfoController {
|
public class BzProtocolInfoController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private BzProtocolInfoAutoDao dao;
|
private BzProtocolInfoAutoDao dao;
|
||||||
|
|
@ -32,6 +33,7 @@ public class BzProtocolInfoController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProtocolInfoService service;
|
private ProtocolInfoService service;
|
||||||
|
|
||||||
|
@Operation(summary = "新增协议信息")
|
||||||
@PostMapping("/save")
|
@PostMapping("/save")
|
||||||
public R<Boolean> save(@Validated({Insert.class}) @RequestBody BzProtocolInfo entity) {
|
public R<Boolean> save(@Validated({Insert.class}) @RequestBody BzProtocolInfo entity) {
|
||||||
// todo 无论是数据库设置默认值为GETDATE()还是使用注解fill = FieldFill.INSERT都不能自动插入当前时间
|
// todo 无论是数据库设置默认值为GETDATE()还是使用注解fill = FieldFill.INSERT都不能自动插入当前时间
|
||||||
|
|
@ -40,21 +42,25 @@ public class BzProtocolInfoController {
|
||||||
return R.ok(dao.save(entity));
|
return R.ok(dao.save(entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "更新协议信息")
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public R<Boolean> update(@Validated({Update.class}) @RequestBody BzProtocolInfo entity) {
|
public R<Boolean> update(@Validated({Update.class}) @RequestBody BzProtocolInfo entity) {
|
||||||
return R.ok(dao.updateById(entity));
|
return R.ok(dao.updateById(entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "删除协议信息")
|
||||||
@GetMapping("/delete/{id}")
|
@GetMapping("/delete/{id}")
|
||||||
public R<Boolean> delete(@PathVariable String id) {
|
public R<Boolean> delete(@PathVariable String id) {
|
||||||
return R.ok(dao.removeById(id));
|
return R.ok(dao.removeById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "按id查询接口")
|
||||||
@GetMapping("/get/{id}")
|
@GetMapping("/get/{id}")
|
||||||
public R<BzProtocolInfo> getById(@PathVariable("id") String id) {
|
public R<BzProtocolInfo> getById(@PathVariable("id") String id) {
|
||||||
return R.ok(dao.getById(id));
|
return R.ok(dao.getById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "分页查询接口")
|
||||||
@PostMapping("/page")
|
@PostMapping("/page")
|
||||||
public R<Page<BzProtocolInfo>> page(@Validated @RequestBody BzProtocolInfoSo so) {
|
public R<Page<BzProtocolInfo>> page(@Validated @RequestBody BzProtocolInfoSo so) {
|
||||||
return R.ok(service.page(so));
|
return R.ok(service.page(so));
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import com.gunshi.project.xyt.validate.markers.QueryPage;
|
||||||
import com.gunshi.project.xyt.validate.markers.QueryTimeRange;
|
import com.gunshi.project.xyt.validate.markers.QueryTimeRange;
|
||||||
import com.gunshi.project.xyt.validate.markers.Update;
|
import com.gunshi.project.xyt.validate.markers.Update;
|
||||||
import com.gunshi.project.xyt.vo.BzServiceResourceMonitorVo;
|
import com.gunshi.project.xyt.vo.BzServiceResourceMonitorVo;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -33,7 +34,7 @@ import java.util.Date;
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/serviceResource")
|
@RequestMapping("/serviceResource")
|
||||||
@Tag(name = "服务资源及监控")
|
@Tag(name = "系统管理-数据共享服务-服务资源及监控")
|
||||||
public class BzServiceResourceController {
|
public class BzServiceResourceController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
@ -45,6 +46,7 @@ public class BzServiceResourceController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private BzServiceResourceTypeAutoDao serviceTypeDao;
|
private BzServiceResourceTypeAutoDao serviceTypeDao;
|
||||||
|
|
||||||
|
@Operation(summary = "新增服务资源")
|
||||||
@PostMapping("/save")
|
@PostMapping("/save")
|
||||||
public R<Boolean> save(@Validated(Insert.class) @RequestBody BzServiceResource entity) {
|
public R<Boolean> save(@Validated(Insert.class) @RequestBody BzServiceResource entity) {
|
||||||
entity.setId(IdWorker.getIdStr());
|
entity.setId(IdWorker.getIdStr());
|
||||||
|
|
@ -53,6 +55,7 @@ public class BzServiceResourceController {
|
||||||
return R.ok(serviceResourceDao.save(entity));
|
return R.ok(serviceResourceDao.save(entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "更新服务资源")
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public R<Boolean> update(@Validated(Update.class) @RequestBody BzServiceResource entity) {
|
public R<Boolean> update(@Validated(Update.class) @RequestBody BzServiceResource entity) {
|
||||||
BzServiceResource byId = serviceResourceDao.getById(entity.getId());
|
BzServiceResource byId = serviceResourceDao.getById(entity.getId());
|
||||||
|
|
@ -64,11 +67,13 @@ public class BzServiceResourceController {
|
||||||
return R.ok(serviceResourceDao.updateById(entity));
|
return R.ok(serviceResourceDao.updateById(entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "删除服务资源")
|
||||||
@GetMapping("/delete/{id}")
|
@GetMapping("/delete/{id}")
|
||||||
public R<Boolean> delete(@PathVariable("id") String id) {
|
public R<Boolean> delete(@PathVariable("id") String id) {
|
||||||
return R.ok(serviceMonitorService.removeById(id));
|
return R.ok(serviceMonitorService.removeById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "分页查询服务资源")
|
||||||
@PostMapping("/page")
|
@PostMapping("/page")
|
||||||
public R<Page<BzServiceResource>> page(
|
public R<Page<BzServiceResource>> page(
|
||||||
@Validated({QueryPage.class, QueryTimeRange.class}) @RequestBody BzServiceResourceSo so
|
@Validated({QueryPage.class, QueryTimeRange.class}) @RequestBody BzServiceResourceSo so
|
||||||
|
|
@ -86,6 +91,7 @@ public class BzServiceResourceController {
|
||||||
return R.ok(page);
|
return R.ok(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "分页查询服务资源监控")
|
||||||
@PostMapping("/monitor/page")
|
@PostMapping("/monitor/page")
|
||||||
public R<Page<BzServiceResourceMonitorVo>> pageMonitorR(
|
public R<Page<BzServiceResourceMonitorVo>> pageMonitorR(
|
||||||
@Validated({QueryPage.class, QueryTimeRange.class}) @RequestBody BzServiceResourceSo so
|
@Validated({QueryPage.class, QueryTimeRange.class}) @RequestBody BzServiceResourceSo so
|
||||||
|
|
@ -94,22 +100,26 @@ public class BzServiceResourceController {
|
||||||
return R.ok(page);
|
return R.ok(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "新增服务资源类型")
|
||||||
@PostMapping("/type/save")
|
@PostMapping("/type/save")
|
||||||
public R<Boolean> saveType(@Validated(Insert.class) @RequestBody BzServiceResourceType entity) {
|
public R<Boolean> saveType(@Validated(Insert.class) @RequestBody BzServiceResourceType entity) {
|
||||||
entity.setId(IdWorker.getIdStr());
|
entity.setId(IdWorker.getIdStr());
|
||||||
return R.ok(serviceTypeDao.save(entity));
|
return R.ok(serviceTypeDao.save(entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "更新服务资源类型")
|
||||||
@PostMapping("/type/update")
|
@PostMapping("/type/update")
|
||||||
public R<Boolean> updateType(@Validated(Update.class) @RequestBody BzServiceResourceType entity) {
|
public R<Boolean> updateType(@Validated(Update.class) @RequestBody BzServiceResourceType entity) {
|
||||||
return R.ok(serviceTypeDao.updateById(entity));
|
return R.ok(serviceTypeDao.updateById(entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "删除服务资源类型")
|
||||||
@GetMapping("/type/delete/{id}")
|
@GetMapping("/type/delete/{id}")
|
||||||
public R<Boolean> deleteType(@PathVariable("id") String id) {
|
public R<Boolean> deleteType(@PathVariable("id") String id) {
|
||||||
return R.ok(serviceTypeDao.removeById(id));
|
return R.ok(serviceTypeDao.removeById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "分页查询服务资源类型")
|
||||||
@PostMapping("/type/page")
|
@PostMapping("/type/page")
|
||||||
public R<Page<BzServiceResourceType>> pageType(
|
public R<Page<BzServiceResourceType>> pageType(
|
||||||
@Validated({QueryPage.class}) @RequestBody BzServiceResourceTypeSo so
|
@Validated({QueryPage.class}) @RequestBody BzServiceResourceTypeSo so
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.gunshi.project.xyt.entity.basedata;
|
||||||
|
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import com.gunshi.project.xyt.model.StCameraAreaB;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Sun Lejun
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2024/1/24
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class StCameraAreaTreeVo extends StCameraAreaB implements Serializable {
|
||||||
|
@Schema(description="子对象")
|
||||||
|
private List<StCameraAreaTreeVo> children = Lists.newArrayList();
|
||||||
|
@Schema(description="监控点列表")
|
||||||
|
private List<StCameraVo> cameraList = Lists.newArrayList();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.gunshi.project.xyt.entity.basedata;
|
||||||
|
|
||||||
|
import com.gunshi.project.xyt.model.StCameraAreaB;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Sun Lejun
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2024/1/24
|
||||||
|
*/
|
||||||
|
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public class StCameraAreaVo extends StCameraAreaB implements Serializable {
|
||||||
|
@Schema(description="上级区域名称")
|
||||||
|
private String pidName;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.gunshi.project.xyt.entity.basedata;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Sun Lejun
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2024/1/25
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "视频点查询对象")
|
||||||
|
public class StCameraSearch implements Serializable {
|
||||||
|
@Schema(description="关键词:名称")
|
||||||
|
private String keyword;
|
||||||
|
|
||||||
|
@Schema(description="监控点类型")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long camType;
|
||||||
|
|
||||||
|
@Schema(description="页码")
|
||||||
|
private int page=1;
|
||||||
|
|
||||||
|
@Schema(description="每页条数")
|
||||||
|
private int pageSize=999;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.gunshi.project.xyt.entity.basedata;
|
||||||
|
|
||||||
|
import com.gunshi.project.xyt.model.StCameraB;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Sun Lejun
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2024/1/25
|
||||||
|
*/
|
||||||
|
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Schema(description = "视频点信息返回值")
|
||||||
|
public class StCameraVo extends StCameraB {
|
||||||
|
@Schema(description = "视频区域名称")
|
||||||
|
private String camArNm;
|
||||||
|
@Schema(description = "视频类型名称")
|
||||||
|
private String camTypeNm;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.gunshi.project.xyt.entity.basedata;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Sun Lejun
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2024/1/25
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SysDictSearch {
|
||||||
|
@Schema(description="关键词:名称,编码")
|
||||||
|
private String keyword;
|
||||||
|
|
||||||
|
@Schema(description="页码")
|
||||||
|
private int page=1;
|
||||||
|
|
||||||
|
@Schema(description="每页条数")
|
||||||
|
private int pageSize=999;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.gunshi.project.xyt.entity.basedata;
|
||||||
|
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import com.gunshi.project.xyt.model.SysDictB;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Sun Lejun
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2024/1/25
|
||||||
|
*/
|
||||||
|
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class SysDictVo extends SysDictB implements Serializable {
|
||||||
|
@Schema(description="子类")
|
||||||
|
private List<SysDictVo> children = Lists.newArrayList();
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.gunshi.project.xyt.mapper;
|
package com.gunshi.project.xyt.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.gunshi.project.xyt.entity.basedata.StCameraAreaTreeVo;
|
||||||
|
import com.gunshi.project.xyt.entity.basedata.StCameraAreaVo;
|
||||||
import com.gunshi.project.xyt.model.StCameraAreaB;
|
import com.gunshi.project.xyt.model.StCameraAreaB;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
@ -9,4 +11,8 @@ import org.apache.ibatis.annotations.Param;
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface StCameraAreaBMapper extends BaseMapper<StCameraAreaB> {
|
public interface StCameraAreaBMapper extends BaseMapper<StCameraAreaB> {
|
||||||
int batchInsert(@Param("list") List<StCameraAreaB> list);
|
int batchInsert(@Param("list") List<StCameraAreaB> list);
|
||||||
|
|
||||||
|
List<StCameraAreaVo> queryStCameraAreaBList(@Param("name") String name);
|
||||||
|
|
||||||
|
List<StCameraAreaTreeVo> queryStCameraAreaBTree();
|
||||||
}
|
}
|
||||||
|
|
@ -1,12 +1,39 @@
|
||||||
package com.gunshi.project.xyt.mapper;
|
package com.gunshi.project.xyt.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.gunshi.project.xyt.entity.basedata.StCameraSearch;
|
||||||
|
import com.gunshi.project.xyt.entity.basedata.StCameraVo;
|
||||||
import com.gunshi.project.xyt.model.StCameraB;
|
import com.gunshi.project.xyt.model.StCameraB;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface StCameraBMapper extends BaseMapper<StCameraB> {
|
public interface StCameraBMapper extends BaseMapper<StCameraB> {
|
||||||
int batchInsert(@Param("list") List<StCameraB> list);
|
int batchInsert(@Param("list") List<StCameraB> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查视频序列化和名称是否存在
|
||||||
|
* @param stCameraB 视频信息
|
||||||
|
* @return true 存在 false 不存在
|
||||||
|
*/
|
||||||
|
boolean chechExists(@Param("obj") StCameraB stCameraB);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按查询条件查询视频列表
|
||||||
|
* @param page 分页信息
|
||||||
|
* @param obj 查询条件
|
||||||
|
* @return 视频列表
|
||||||
|
*/
|
||||||
|
Page<StCameraVo> queryBySearch(Page<StCameraVo> page, @Param("obj") StCameraSearch obj);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有视频
|
||||||
|
* @return 视频列表
|
||||||
|
*/
|
||||||
|
List<StCameraVo> getAll();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,12 +1,37 @@
|
||||||
package com.gunshi.project.xyt.mapper;
|
package com.gunshi.project.xyt.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.gunshi.db.dao.IMapper;
|
||||||
|
import com.gunshi.project.xyt.entity.basedata.SysDictSearch;
|
||||||
|
import com.gunshi.project.xyt.entity.basedata.SysDictVo;
|
||||||
import com.gunshi.project.xyt.model.SysDictB;
|
import com.gunshi.project.xyt.model.SysDictB;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface SysDictBMapper extends BaseMapper<SysDictB> {
|
public interface SysDictBMapper extends IMapper<SysDictB> {
|
||||||
int batchInsert(@Param("list") List<SysDictB> list);
|
int batchInsert(@Param("list") List<SysDictB> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查顶层的字典,编码和名称是否存在
|
||||||
|
* @param sysDictB 字典信息
|
||||||
|
* @return true存在 false不存在
|
||||||
|
*/
|
||||||
|
boolean checkExistCodeAndName(@Param("obj") SysDictB sysDictB);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据名称和编码查询PID和ID
|
||||||
|
* @param search 查询条件
|
||||||
|
* @return PID和ID
|
||||||
|
*/
|
||||||
|
Page<SysDictB> queryPidBySearch(Page<Long> page, @Param("obj") SysDictSearch search);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据PID和ID查询字典记录
|
||||||
|
* @param id 字典ID or PID
|
||||||
|
* @return 字典
|
||||||
|
*/
|
||||||
|
List<SysDictVo> queryByPidOrIds(@Param("obj") List<Long> id);
|
||||||
}
|
}
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
package com.gunshi.project.xyt.model;
|
package com.gunshi.project.xyt.model;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -26,6 +29,7 @@ public class StCameraAreaB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableId(value = "CAM_AR_ID", type = IdType.INPUT)
|
@TableId(value = "CAM_AR_ID", type = IdType.INPUT)
|
||||||
@Schema(description="视频区域ID, 新增时候不需要,修改时候需要")
|
@Schema(description="视频区域ID, 新增时候不需要,修改时候需要")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long camArId;
|
private Long camArId;
|
||||||
|
|
||||||
@TableField(value = "CAM_AR_NM")
|
@TableField(value = "CAM_AR_NM")
|
||||||
|
|
@ -37,6 +41,7 @@ public class StCameraAreaB implements Serializable {
|
||||||
@TableField(value = "PID")
|
@TableField(value = "PID")
|
||||||
@Schema(description="父ID")
|
@Schema(description="父ID")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long pid;
|
private Long pid;
|
||||||
|
|
||||||
@TableField(value = "SORT_ON")
|
@TableField(value = "SORT_ON")
|
||||||
|
|
@ -54,7 +59,7 @@ public class StCameraAreaB implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
@TableField(value = "COMMENTS")
|
@TableField(value = "COMMENTS", updateStrategy= FieldStrategy.ALWAYS)
|
||||||
@Schema(description="备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
@Schema(description="备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||||
@Size(max = 200)
|
@Size(max = 200)
|
||||||
private String comments;
|
private String comments;
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,27 @@
|
||||||
package com.gunshi.project.xyt.model;
|
package com.gunshi.project.xyt.model;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import jakarta.validation.constraints.Size;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 视频点信息
|
* 视频点信息
|
||||||
*/
|
*/
|
||||||
@Schema(description="视频点信息")
|
@Schema(description = "视频点信息")
|
||||||
@Data
|
@Data
|
||||||
@TableName(value = "dbo.ST_CAMERA_B")
|
@TableName(value = "dbo.ST_CAMERA_B")
|
||||||
public class StCameraB implements Serializable {
|
public class StCameraB implements Serializable {
|
||||||
|
|
@ -22,7 +29,8 @@ public class StCameraB implements Serializable {
|
||||||
* 视频点id
|
* 视频点id
|
||||||
*/
|
*/
|
||||||
@TableId(value = "CAM_ID", type = IdType.INPUT)
|
@TableId(value = "CAM_ID", type = IdType.INPUT)
|
||||||
@Schema(description="视频点id")
|
@Schema(description="视频点id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long camId;
|
private Long camId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -30,6 +38,8 @@ public class StCameraB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "CAM_NM")
|
@TableField(value = "CAM_NM")
|
||||||
@Schema(description="视频点名称")
|
@Schema(description="视频点名称")
|
||||||
|
@NotBlank
|
||||||
|
@Size(max = 200)
|
||||||
private String camNm;
|
private String camNm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -37,13 +47,15 @@ public class StCameraB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "CAM_TYPE")
|
@TableField(value = "CAM_TYPE")
|
||||||
@Schema(description="监控点类型")
|
@Schema(description="监控点类型")
|
||||||
|
@NotNull
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long camType;
|
private Long camType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通道号
|
* 通道号
|
||||||
*/
|
*/
|
||||||
@TableField(value = "CAM_CH")
|
@TableField(value = "CAM_CH", updateStrategy= FieldStrategy.ALWAYS)
|
||||||
@Schema(description="通道号")
|
@Schema(description="通道号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||||
private Integer camCh;
|
private Integer camCh;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -51,6 +63,8 @@ public class StCameraB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "CAM_AR_ID")
|
@TableField(value = "CAM_AR_ID")
|
||||||
@Schema(description="所在区域")
|
@Schema(description="所在区域")
|
||||||
|
@NotNull
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long camArId;
|
private Long camArId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -58,6 +72,8 @@ public class StCameraB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "CAM_URL")
|
@TableField(value = "CAM_URL")
|
||||||
@Schema(description="摄像头连接地址 IP和端口")
|
@Schema(description="摄像头连接地址 IP和端口")
|
||||||
|
@NotNull
|
||||||
|
@Size(max = 200)
|
||||||
private String camUrl;
|
private String camUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -65,6 +81,7 @@ public class StCameraB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "CAM_SN")
|
@TableField(value = "CAM_SN")
|
||||||
@Schema(description="视频序列号")
|
@Schema(description="视频序列号")
|
||||||
|
@NotBlank
|
||||||
private String camSn;
|
private String camSn;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -72,6 +89,7 @@ public class StCameraB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "LGTD")
|
@TableField(value = "LGTD")
|
||||||
@Schema(description="经度")
|
@Schema(description="经度")
|
||||||
|
@NotNull
|
||||||
private BigDecimal lgtd;
|
private BigDecimal lgtd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -79,27 +97,29 @@ public class StCameraB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "LTTD")
|
@TableField(value = "LTTD")
|
||||||
@Schema(description="纬度")
|
@Schema(description="纬度")
|
||||||
|
@NotNull
|
||||||
private BigDecimal lttd;
|
private BigDecimal lttd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
@TableField(value = "COMMENTS")
|
@TableField(value = "COMMENTS", updateStrategy= FieldStrategy.ALWAYS)
|
||||||
@Schema(description="备注")
|
@Schema(description="备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||||
|
@Size(max = 200)
|
||||||
private String comments;
|
private String comments;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新建时间
|
* 新建时间
|
||||||
*/
|
*/
|
||||||
@TableField(value = "CREATE_TM")
|
@TableField(value = "CREATE_TM")
|
||||||
@Schema(description="新建时间")
|
@Schema(description="新建时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||||
private Date createTm;
|
private Date createTm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改时间
|
* 修改时间
|
||||||
*/
|
*/
|
||||||
@TableField(value = "TM")
|
@TableField(value = "TM")
|
||||||
@Schema(description="修改时间")
|
@Schema(description="修改时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||||
private Date tm;
|
private Date tm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -107,8 +127,17 @@ public class StCameraB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "[STATUS]")
|
@TableField(value = "[STATUS]")
|
||||||
@Schema(description="状态 1:启用 0:禁用")
|
@Schema(description="状态 1:启用 0:禁用")
|
||||||
|
@NotNull
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页默认显示 1:显示 0:不显示
|
||||||
|
*/
|
||||||
|
@TableField(value = "DEFAULT_SHOW")
|
||||||
|
@Schema(description = "首页默认显示 1:显示 0:不显示")
|
||||||
|
@NotNull
|
||||||
|
private Integer defaultShow;
|
||||||
|
|
||||||
public static final String COL_CAM_ID = "CAM_ID";
|
public static final String COL_CAM_ID = "CAM_ID";
|
||||||
|
|
||||||
public static final String COL_CAM_NM = "CAM_NM";
|
public static final String COL_CAM_NM = "CAM_NM";
|
||||||
|
|
@ -134,4 +163,6 @@ public class StCameraB implements Serializable {
|
||||||
public static final String COL_TM = "TM";
|
public static final String COL_TM = "TM";
|
||||||
|
|
||||||
public static final String COL_STATUS = "STATUS";
|
public static final String COL_STATUS = "STATUS";
|
||||||
|
|
||||||
|
public static final String COL_DEFAULT_SHOW = "DEFAULT_SHOW";
|
||||||
}
|
}
|
||||||
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -23,6 +25,7 @@ public class StDamB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableId(value = "DAM_ID", type = IdType.INPUT)
|
@TableId(value = "DAM_ID", type = IdType.INPUT)
|
||||||
@Schema(description="大坝ID")
|
@Schema(description="大坝ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long damId;
|
private Long damId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -114,6 +117,7 @@ public class StDamB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "DAM_TYPE_MAT")
|
@TableField(value = "DAM_TYPE_MAT")
|
||||||
@Schema(description="大坝材料类型 DICT_ID")
|
@Schema(description="大坝材料类型 DICT_ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long damTypeMat;
|
private Long damTypeMat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -121,6 +125,7 @@ public class StDamB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "DAM_TYPE_STR")
|
@TableField(value = "DAM_TYPE_STR")
|
||||||
@Schema(description="大坝结构类型 DICT_ID")
|
@Schema(description="大坝结构类型 DICT_ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long damTypeStr;
|
private Long damTypeStr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -184,6 +189,7 @@ public class StDamB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "SDI")
|
@TableField(value = "SDI")
|
||||||
@Schema(description="抗震设计烈度 dict_id")
|
@Schema(description="抗震设计烈度 dict_id")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long sdi;
|
private Long sdi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -23,6 +25,7 @@ public class StEqptB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableId(value = "WMEQ_ID", type = IdType.INPUT)
|
@TableId(value = "WMEQ_ID", type = IdType.INPUT)
|
||||||
@Schema(description="量水设施ID")
|
@Schema(description="量水设施ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long wmeqId;
|
private Long wmeqId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -65,6 +68,7 @@ public class StEqptB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "MEASURE")
|
@TableField(value = "MEASURE")
|
||||||
@Schema(description="设施类别 字典id")
|
@Schema(description="设施类别 字典id")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long measure;
|
private Long measure;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -23,6 +25,7 @@ public class StGateB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableId(value = "GATE_ID", type = IdType.INPUT)
|
@TableId(value = "GATE_ID", type = IdType.INPUT)
|
||||||
@Schema(description="闸阀ID")
|
@Schema(description="闸阀ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long gateId;
|
private Long gateId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -65,6 +68,7 @@ public class StGateB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "GATE_TP")
|
@TableField(value = "GATE_TP")
|
||||||
@Schema(description="产品类型 dict_id")
|
@Schema(description="产品类型 dict_id")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long gateTp;
|
private Long gateTp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -22,6 +24,7 @@ public class StGateBFile implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "GATE_ID")
|
@TableField(value = "GATE_ID")
|
||||||
@Schema(description="闸阀ID")
|
@Schema(description="闸阀ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long gateId;
|
private Long gateId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -29,6 +32,7 @@ public class StGateBFile implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "FILE_ID")
|
@TableField(value = "FILE_ID")
|
||||||
@Schema(description="文件ID")
|
@Schema(description="文件ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long fileId;
|
private Long fileId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -22,6 +24,7 @@ public class StMoncrB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableId(value = "CR_ID", type = IdType.INPUT)
|
@TableId(value = "CR_ID", type = IdType.INPUT)
|
||||||
@Schema(description="断面ID")
|
@Schema(description="断面ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long crId;
|
private Long crId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -43,6 +46,7 @@ public class StMoncrB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "CR_IMG_ID")
|
@TableField(value = "CR_IMG_ID")
|
||||||
@Schema(description="断面平面图 文件ID")
|
@Schema(description="断面平面图 文件ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long crImgId;
|
private Long crImgId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -23,6 +25,7 @@ public class StResB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableId(value = "RES_ID", type = IdType.INPUT)
|
@TableId(value = "RES_ID", type = IdType.INPUT)
|
||||||
@Schema(description="水库id")
|
@Schema(description="水库id")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long resId;
|
private Long resId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -254,6 +257,7 @@ public class StResB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "ENG_SCAL")
|
@TableField(value = "ENG_SCAL")
|
||||||
@Schema(description="水库规模 dict_id")
|
@Schema(description="水库规模 dict_id")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long engScal;
|
private Long engScal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -275,6 +279,7 @@ public class StResB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "ENG_GRAD")
|
@TableField(value = "ENG_GRAD")
|
||||||
@Schema(description="工程等别 dict_id")
|
@Schema(description="工程等别 dict_id")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long engGrad;
|
private Long engGrad;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -366,6 +371,7 @@ public class StResB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "RES_TYPE")
|
@TableField(value = "RES_TYPE")
|
||||||
@Schema(description="水库类型 dict_id")
|
@Schema(description="水库类型 dict_id")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long resType;
|
private Long resType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -471,6 +477,7 @@ public class StResB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "LVBSLV")
|
@TableField(value = "LVBSLV")
|
||||||
@Schema(description="水准基面")
|
@Schema(description="水准基面")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long lvbslv;
|
private Long lvbslv;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -22,6 +24,7 @@ public class StResFileRef implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableId(value = "ID", type = IdType.INPUT)
|
@TableId(value = "ID", type = IdType.INPUT)
|
||||||
@Schema(description="id")
|
@Schema(description="id")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -29,6 +32,7 @@ public class StResFileRef implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "RES_ID")
|
@TableField(value = "RES_ID")
|
||||||
@Schema(description="水库ID")
|
@Schema(description="水库ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long resId;
|
private Long resId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -43,6 +47,7 @@ public class StResFileRef implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "FILE_ID")
|
@TableField(value = "FILE_ID")
|
||||||
@Schema(description="文件ID")
|
@Schema(description="文件ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long fileId;
|
private Long fileId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -22,6 +24,7 @@ public class StResPersonRef implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableId(value = "ID", type = IdType.INPUT)
|
@TableId(value = "ID", type = IdType.INPUT)
|
||||||
@Schema(description="id")
|
@Schema(description="id")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -29,6 +32,7 @@ public class StResPersonRef implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "RES_ID")
|
@TableField(value = "RES_ID")
|
||||||
@Schema(description="水库ID")
|
@Schema(description="水库ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long resId;
|
private Long resId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -22,6 +24,7 @@ public class StResStcdRef implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableId(value = "RES_ID", type = IdType.INPUT)
|
@TableId(value = "RES_ID", type = IdType.INPUT)
|
||||||
@Schema(description="水库ID")
|
@Schema(description="水库ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long resId;
|
private Long resId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -23,6 +25,7 @@ public class StRvB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableId(value = "RV_ID", type = IdType.INPUT)
|
@TableId(value = "RV_ID", type = IdType.INPUT)
|
||||||
@Schema(description="河流ID")
|
@Schema(description="河流ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long rvId;
|
private Long rvId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -93,6 +96,7 @@ public class StRvB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "RV_TYPE")
|
@TableField(value = "RV_TYPE")
|
||||||
@Schema(description="河流类型 dict_id")
|
@Schema(description="河流类型 dict_id")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long rvType;
|
private Long rvType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -100,6 +104,7 @@ public class StRvB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "RV_GRAD")
|
@TableField(value = "RV_GRAD")
|
||||||
@Schema(description="河流级别 dict_id")
|
@Schema(description="河流级别 dict_id")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long rvGrad;
|
private Long rvGrad;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -107,6 +112,7 @@ public class StRvB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "BANK")
|
@TableField(value = "BANK")
|
||||||
@Schema(description="岸别 dict_id")
|
@Schema(description="岸别 dict_id")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long bank;
|
private Long bank;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -23,6 +25,7 @@ public class StSpgPztb implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableId(value = "ID", type = IdType.INPUT)
|
@TableId(value = "ID", type = IdType.INPUT)
|
||||||
@Schema(description="id")
|
@Schema(description="id")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -338,6 +341,7 @@ public class StSpgPztb implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "SKETCH_MAP")
|
@TableField(value = "SKETCH_MAP")
|
||||||
@Schema(description="埋设示意图 文件ID")
|
@Schema(description="埋设示意图 文件ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long sketchMap;
|
private Long sketchMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -23,6 +25,7 @@ public class StSpgSpprmp implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableId(value = "ID", type = IdType.INPUT)
|
@TableId(value = "ID", type = IdType.INPUT)
|
||||||
@Schema(description="主键")
|
@Schema(description="主键")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -184,6 +187,7 @@ public class StSpgSpprmp implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "SKETCH_MAP")
|
@TableField(value = "SKETCH_MAP")
|
||||||
@Schema(description="埋设示意图 文件ID")
|
@Schema(description="埋设示意图 文件ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long sketchMap;
|
private Long sketchMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -268,6 +270,7 @@ public class StStbprpB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "PROTOCOLS")
|
@TableField(value = "PROTOCOLS")
|
||||||
@Schema(description="归属协议")
|
@Schema(description="归属协议")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long protocols;
|
private Long protocols;
|
||||||
|
|
||||||
public static final String COL_STCD = "STCD";
|
public static final String COL_STCD = "STCD";
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -23,6 +25,7 @@ public class StZvarlB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "RES_ID")
|
@TableField(value = "RES_ID")
|
||||||
@Schema(description="水库ID")
|
@Schema(description="水库ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long resId;
|
private Long resId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,16 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import jakarta.validation.constraints.Size;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -21,7 +27,8 @@ public class SysDictB implements Serializable {
|
||||||
* ID
|
* ID
|
||||||
*/
|
*/
|
||||||
@TableId(value = "ID", type = IdType.INPUT)
|
@TableId(value = "ID", type = IdType.INPUT)
|
||||||
@Schema(description="ID")
|
@Schema(description="ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -29,6 +36,8 @@ public class SysDictB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "DICT_NM")
|
@TableField(value = "DICT_NM")
|
||||||
@Schema(description="字典名称")
|
@Schema(description="字典名称")
|
||||||
|
@NotBlank
|
||||||
|
@Size(max = 200)
|
||||||
private String dictNm;
|
private String dictNm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -36,6 +45,8 @@ public class SysDictB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "DICT_CD")
|
@TableField(value = "DICT_CD")
|
||||||
@Schema(description="字典编码")
|
@Schema(description="字典编码")
|
||||||
|
@NotBlank
|
||||||
|
@Size(max = 100)
|
||||||
private String dictCd;
|
private String dictCd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -43,6 +54,8 @@ public class SysDictB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "PID")
|
@TableField(value = "PID")
|
||||||
@Schema(description="父id")
|
@Schema(description="父id")
|
||||||
|
@NotNull
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long pid;
|
private Long pid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -50,20 +63,21 @@ public class SysDictB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "SORT_ON")
|
@TableField(value = "SORT_ON")
|
||||||
@Schema(description="排序字段")
|
@Schema(description="排序字段")
|
||||||
|
@NotNull
|
||||||
private Integer sortOn;
|
private Integer sortOn;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
@TableField(value = "CREATE_TM")
|
@TableField(value = "CREATE_TM")
|
||||||
@Schema(description="创建时间")
|
@Schema(description="创建时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||||
private Date createTm;
|
private Date createTm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改时间
|
* 修改时间
|
||||||
*/
|
*/
|
||||||
@TableField(value = "TM")
|
@TableField(value = "TM")
|
||||||
@Schema(description="修改时间")
|
@Schema(description="修改时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||||
private Date tm;
|
private Date tm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -71,6 +85,7 @@ public class SysDictB implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "[STATUS]")
|
@TableField(value = "[STATUS]")
|
||||||
@Schema(description="状态 1:启用 0:禁用")
|
@Schema(description="状态 1:启用 0:禁用")
|
||||||
|
@NotNull
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
public static final String COL_ID = "ID";
|
public static final String COL_ID = "ID";
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,18 @@ package com.gunshi.project.xyt.service;
|
||||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import com.gunshi.core.result.BusinessResult;
|
import com.gunshi.project.xyt.entity.basedata.StCameraAreaTreeVo;
|
||||||
import com.gunshi.core.result.exception.BusinessException;
|
import com.gunshi.project.xyt.entity.basedata.StCameraAreaVo;
|
||||||
|
import com.gunshi.project.xyt.entity.basedata.StCameraVo;
|
||||||
import com.gunshi.project.xyt.mapper.StCameraAreaBMapper;
|
import com.gunshi.project.xyt.mapper.StCameraAreaBMapper;
|
||||||
|
import com.gunshi.project.xyt.mapper.StCameraBMapper;
|
||||||
import com.gunshi.project.xyt.model.StCameraAreaB;
|
import com.gunshi.project.xyt.model.StCameraAreaB;
|
||||||
|
import com.gunshi.util.common.tree.TreeUtil;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.bind.MethodArgumentNotValidException;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -24,17 +28,45 @@ import java.util.Objects;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@DSTransactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Data
|
@Data
|
||||||
public class BaseDataService {
|
public class StCameraAreaService {
|
||||||
private final StCameraAreaBMapper stCameraAreaBMapper;
|
private final StCameraAreaBMapper stCameraAreaBMapper;
|
||||||
|
private final StCameraBMapper stCameraBMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据视频区域ID查询视频区域
|
||||||
|
* @param camArId 视频区域ID
|
||||||
|
* @return 视频区域
|
||||||
|
*/
|
||||||
|
public StCameraAreaB queryById(Long camArId) {
|
||||||
|
return stCameraAreaBMapper.selectById(camArId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<StCameraAreaTreeVo> queryTree() {
|
||||||
|
List<StCameraAreaTreeVo> list = stCameraAreaBMapper.queryStCameraAreaBTree();
|
||||||
|
List<StCameraVo> all = stCameraBMapper.getAll();
|
||||||
|
list.forEach(t -> {
|
||||||
|
List<StCameraVo> cameraList = t.getCameraList();
|
||||||
|
all.forEach(a -> {
|
||||||
|
if (Objects.equals(a.getCamArId(), t.getCamArId())) {
|
||||||
|
cameraList.add(a);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return TreeUtil.list2ListTree(list, Long.valueOf(0L),
|
||||||
|
StCameraAreaTreeVo::getCamArId, StCameraAreaTreeVo::getPid,
|
||||||
|
StCameraAreaTreeVo::setChildren, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<StCameraAreaB> queryStCameraAreaBList() {
|
/**
|
||||||
QueryWrapper<StCameraAreaB> queryWrapper = new QueryWrapper<>();
|
* 查询视频区域列表
|
||||||
queryWrapper.eq(StCameraAreaB.COL_STATUS, 1);
|
* @return 视频区域列表
|
||||||
queryWrapper.orderByAsc(StCameraAreaB.COL_SORT_ON);
|
*/
|
||||||
return stCameraAreaBMapper.selectList(queryWrapper);
|
public List<StCameraAreaVo> queryListByName(String name) {
|
||||||
|
return stCameraAreaBMapper.queryStCameraAreaBList(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -42,14 +74,14 @@ public class BaseDataService {
|
||||||
*
|
*
|
||||||
* @param stCameraAreaB 视频区域
|
* @param stCameraAreaB 视频区域
|
||||||
*/
|
*/
|
||||||
public void insertStCameraAreaB(StCameraAreaB stCameraAreaB) {
|
public void insert(@Valid StCameraAreaB stCameraAreaB) {
|
||||||
checkStCameraAreaB(stCameraAreaB);
|
checkStCameraAreaB(stCameraAreaB);
|
||||||
|
|
||||||
QueryWrapper<StCameraAreaB> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<StCameraAreaB> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq(StCameraAreaB.COL_PID, stCameraAreaB.getPid());
|
queryWrapper.eq(StCameraAreaB.COL_PID, stCameraAreaB.getPid());
|
||||||
queryWrapper.eq(StCameraAreaB.COL_STATUS, 1);
|
queryWrapper.eq(StCameraAreaB.COL_STATUS, 1);
|
||||||
queryWrapper.orderByAsc(StCameraAreaB.COL_SORT_ON);
|
queryWrapper.orderByDesc(StCameraAreaB.COL_SORT_ON);
|
||||||
StCameraAreaB first = stCameraAreaBMapper.selectList(queryWrapper).getFirst();
|
StCameraAreaB first = stCameraAreaBMapper.selectOne(queryWrapper, false);
|
||||||
if (Objects.isNull(first)) {
|
if (Objects.isNull(first)) {
|
||||||
stCameraAreaB.setSortOn(1);
|
stCameraAreaB.setSortOn(1);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -69,7 +101,7 @@ public class BaseDataService {
|
||||||
*
|
*
|
||||||
* @param stCameraAreaB 视频区域
|
* @param stCameraAreaB 视频区域
|
||||||
*/
|
*/
|
||||||
public void updateStCameraAreaB(StCameraAreaB stCameraAreaB) {
|
public void update(@Valid StCameraAreaB stCameraAreaB) {
|
||||||
Long camArId = stCameraAreaB.getCamArId();
|
Long camArId = stCameraAreaB.getCamArId();
|
||||||
QueryWrapper<StCameraAreaB> queryWrapper2 = new QueryWrapper<>();
|
QueryWrapper<StCameraAreaB> queryWrapper2 = new QueryWrapper<>();
|
||||||
queryWrapper2.eq(StCameraAreaB.COL_CAM_AR_ID, camArId);
|
queryWrapper2.eq(StCameraAreaB.COL_CAM_AR_ID, camArId);
|
||||||
|
|
@ -108,4 +140,5 @@ public class BaseDataService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
package com.gunshi.project.xyt.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.gunshi.project.xyt.entity.basedata.StCameraSearch;
|
||||||
|
import com.gunshi.project.xyt.entity.basedata.StCameraVo;
|
||||||
|
import com.gunshi.project.xyt.mapper.StCameraAreaBMapper;
|
||||||
|
import com.gunshi.project.xyt.mapper.StCameraBMapper;
|
||||||
|
import com.gunshi.project.xyt.model.StCameraAreaB;
|
||||||
|
import com.gunshi.project.xyt.model.StCameraB;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Sun Lejun
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2024/1/25
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Data
|
||||||
|
public class StCameraService {
|
||||||
|
private final StCameraBMapper stCameraBMapper;
|
||||||
|
private final StCameraAreaBMapper stCameraAreaBMapper;
|
||||||
|
|
||||||
|
public StCameraB queryById(Long camId) {
|
||||||
|
return stCameraBMapper.selectById(camId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Page<StCameraVo> queryBySearch(StCameraSearch stCameraSearch){
|
||||||
|
Page<StCameraVo> page = new Page<>(stCameraSearch.getPage(), stCameraSearch.getPageSize());
|
||||||
|
return stCameraBMapper.queryBySearch(page, stCameraSearch);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增视频
|
||||||
|
* @param stCameraB 视频信息
|
||||||
|
*/
|
||||||
|
public void insert(@Valid StCameraB stCameraB) {
|
||||||
|
checkUnique(stCameraB);
|
||||||
|
checkAreaExist(stCameraB);
|
||||||
|
stCameraB.setCamId(IdWorker.getId());
|
||||||
|
stCameraB.setCreateTm(new Date());
|
||||||
|
stCameraB.setTm(new Date());
|
||||||
|
stCameraBMapper.insert(stCameraB);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改视频
|
||||||
|
* @param stCameraB 视频信息
|
||||||
|
*/
|
||||||
|
public void update(@Valid StCameraB stCameraB) {
|
||||||
|
checkExist(stCameraB);
|
||||||
|
checkUnique(stCameraB);
|
||||||
|
checkAreaExist(stCameraB);
|
||||||
|
stCameraB.setTm(new Date());
|
||||||
|
stCameraBMapper.updateById(stCameraB);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查视频参数唯一性
|
||||||
|
* @param stCameraB 视频信息
|
||||||
|
*/
|
||||||
|
private void checkUnique(StCameraB stCameraB){
|
||||||
|
boolean exists = stCameraBMapper.chechExists(stCameraB);
|
||||||
|
if (exists){
|
||||||
|
throw new IllegalArgumentException("视频名称或序列号已存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查视频ID是否存在
|
||||||
|
* @param stCameraB 视频信息
|
||||||
|
*/
|
||||||
|
private void checkExist(StCameraB stCameraB){
|
||||||
|
QueryWrapper<StCameraB> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq(StCameraB.COL_CAM_ID, stCameraB.getCamId());
|
||||||
|
boolean exists = stCameraBMapper.exists(queryWrapper);
|
||||||
|
if (!exists){
|
||||||
|
throw new IllegalArgumentException("视频ID不存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查视频区域ID是否存在
|
||||||
|
* @param stCameraB 视频信息
|
||||||
|
*/
|
||||||
|
private void checkAreaExist(StCameraB stCameraB){
|
||||||
|
QueryWrapper<StCameraAreaB> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq(StCameraAreaB.COL_CAM_AR_ID, stCameraB.getCamArId());
|
||||||
|
boolean exists = stCameraAreaBMapper.exists(queryWrapper);
|
||||||
|
if (!exists){
|
||||||
|
throw new IllegalArgumentException("视频区域ID不存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,141 @@
|
||||||
|
package com.gunshi.project.xyt.service;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.gunshi.db.dao.BaseOrderDao;
|
||||||
|
import com.gunshi.project.xyt.entity.basedata.SysDictSearch;
|
||||||
|
import com.gunshi.project.xyt.entity.basedata.SysDictVo;
|
||||||
|
import com.gunshi.project.xyt.mapper.SysDictBMapper;
|
||||||
|
import com.gunshi.project.xyt.model.SysDictB;
|
||||||
|
import com.gunshi.util.common.tree.TreeUtil;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Sun Lejun
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2024/1/25
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public class SysDictService extends BaseOrderDao<SysDictBMapper, SysDictB> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询字典
|
||||||
|
* @param id 字典ID
|
||||||
|
* @return 字典
|
||||||
|
*/
|
||||||
|
public SysDictB queryById(Long id) {
|
||||||
|
return this.getBaseMapper().selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据名称或者编码查询字典
|
||||||
|
* @param search 查询条件
|
||||||
|
* @return 字典tree
|
||||||
|
*/
|
||||||
|
public Page<SysDictVo> queryBySearch(SysDictSearch search) {
|
||||||
|
|
||||||
|
//构建分页对象
|
||||||
|
Page<Long> page = new Page<>(search.getPage(), search.getPageSize());
|
||||||
|
//按PID和ID进行分页查询
|
||||||
|
Page<SysDictB> sysDictVoPage = this.getBaseMapper().queryPidBySearch(page, search);
|
||||||
|
long total = sysDictVoPage.getTotal();
|
||||||
|
long current = sysDictVoPage.getCurrent();
|
||||||
|
if(total == 0) {
|
||||||
|
return new Page<>(current, search.getPageSize());
|
||||||
|
}
|
||||||
|
//拿出查询出来的PID和ID,获取完整的记录
|
||||||
|
List<SysDictB> records = sysDictVoPage.getRecords();
|
||||||
|
List<Long> list = records.stream().map(SysDictB::getId).toList();
|
||||||
|
List<SysDictVo> sysDictVos = this.getBaseMapper().queryByPidOrIds(list);
|
||||||
|
//转换成tree
|
||||||
|
List<SysDictVo> tree = TreeUtil.list2ListTree(sysDictVos, 0L, SysDictVo::getId, SysDictVo::getPid, SysDictVo::setChildren, null);
|
||||||
|
//构建返回对象
|
||||||
|
Page<SysDictVo> result = new Page<>(search.getPage(), search.getPageSize());
|
||||||
|
result.setCurrent(current);
|
||||||
|
result.setTotal(total);
|
||||||
|
result.setRecords(tree);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增字典
|
||||||
|
* @param sysDictB 字典信息
|
||||||
|
*/
|
||||||
|
public void insert(@Valid SysDictB sysDictB) {
|
||||||
|
checkExistCodeAndName(sysDictB);
|
||||||
|
sysDictB.setId(IdWorker.getId());
|
||||||
|
sysDictB.setStatus(1);
|
||||||
|
sysDictB.setCreateTm(new Date());
|
||||||
|
sysDictB.setTm(new Date());
|
||||||
|
this.getBaseMapper().insert(sysDictB);
|
||||||
|
resort(sysDictB);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新字典
|
||||||
|
* @param sysDictB 字典信息
|
||||||
|
*/
|
||||||
|
public void update(@Valid SysDictB sysDictB) {
|
||||||
|
checkExistById(sysDictB);
|
||||||
|
checkExistCodeAndName(sysDictB);
|
||||||
|
sysDictB.setTm(new Date());
|
||||||
|
|
||||||
|
if(sysDictB.getStatus() == 0L){
|
||||||
|
sysDictB.setSortOn(999);
|
||||||
|
}
|
||||||
|
this.getBaseMapper().updateById(sysDictB);
|
||||||
|
resort(sysDictB);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查字典编码和名称是否存在
|
||||||
|
* @param sysDictB 字典信息
|
||||||
|
*/
|
||||||
|
public void checkExistCodeAndName(SysDictB sysDictB) {
|
||||||
|
if (sysDictB.getPid() != 0L) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
boolean exist = this.getBaseMapper().checkExistCodeAndName(sysDictB);
|
||||||
|
if (exist) {
|
||||||
|
throw new IllegalArgumentException("顶层字典编码或名称已存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查字典是否存在
|
||||||
|
* @param sysDictB 字典信息
|
||||||
|
*/
|
||||||
|
public void checkExistById(SysDictB sysDictB) {
|
||||||
|
QueryWrapper<SysDictB> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq(SysDictB.COL_ID, sysDictB.getId());
|
||||||
|
boolean exists = this.exists(queryWrapper);
|
||||||
|
if (!exists) {
|
||||||
|
throw new IllegalArgumentException("字典不存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重新给字典排序
|
||||||
|
* @param sysDictB
|
||||||
|
*/
|
||||||
|
private void resort(SysDictB sysDictB){
|
||||||
|
Long pid = sysDictB.getPid();
|
||||||
|
QueryWrapper<SysDictB> queryWrapper2 = new QueryWrapper<>();
|
||||||
|
queryWrapper2.eq(SysDictB.COL_PID, pid);
|
||||||
|
super.updateOrder(queryWrapper2, SysDictB::getSortOn, SysDictB::setSortOn, sysDictB, SysDictB::getId, t -> t.setTm(new Date()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -28,4 +28,23 @@
|
||||||
#{item.createTm,jdbcType=TIMESTAMP}, #{item.tm,jdbcType=TIMESTAMP})
|
#{item.createTm,jdbcType=TIMESTAMP}, #{item.tm,jdbcType=TIMESTAMP})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<select id="queryStCameraAreaBList" resultType="com.gunshi.project.xyt.entity.basedata.StCameraAreaVo">
|
||||||
|
select t1.CAM_AR_ID, t1.CAM_AR_NM, t1.PID, t1.SORT_ON, t1.[STATUS], t1.COMMENTS, t1.CREATE_TM, t1.TM,
|
||||||
|
t2.CAM_AR_NM PID_NAME
|
||||||
|
from ST_CAMERA_AREA_B t1
|
||||||
|
left join ST_CAMERA_AREA_B t2 on t1.pid=t2.CAM_AR_ID
|
||||||
|
<where>
|
||||||
|
<if test="name!=null and name!=''">
|
||||||
|
t1.CAM_AR_NM like CONCAT('%',#{name},'%')
|
||||||
|
</if>
|
||||||
|
and t1.STATUS=1
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="queryStCameraAreaBTree" resultType="com.gunshi.project.xyt.entity.basedata.StCameraAreaTreeVo">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from ST_CAMERA_AREA_B where STATUS=1 order by SORT_ON
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -17,24 +17,92 @@
|
||||||
<result column="CREATE_TM" jdbcType="TIMESTAMP" property="createTm" />
|
<result column="CREATE_TM" jdbcType="TIMESTAMP" property="createTm" />
|
||||||
<result column="TM" jdbcType="TIMESTAMP" property="tm" />
|
<result column="TM" jdbcType="TIMESTAMP" property="tm" />
|
||||||
<result column="STATUS" jdbcType="INTEGER" property="status" />
|
<result column="STATUS" jdbcType="INTEGER" property="status" />
|
||||||
|
<result column="DEFAULT_SHOW" jdbcType="INTEGER" property="defaultShow" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
CAM_ID, CAM_NM, CAM_TYPE, CAM_CH, CAM_AR_ID, CAM_URL, CAM_SN, LGTD, LTTD, COMMENTS,
|
CAM_ID, CAM_NM, CAM_TYPE, CAM_CH, CAM_AR_ID, CAM_URL, CAM_SN, LGTD, LTTD, COMMENTS,
|
||||||
CREATE_TM, TM, [STATUS]
|
CREATE_TM, TM, [STATUS], DEFAULT_SHOW
|
||||||
</sql>
|
</sql>
|
||||||
<insert id="batchInsert" parameterType="map">
|
<insert id="batchInsert" parameterType="map">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
insert into dbo.ST_CAMERA_B
|
insert into dbo.ST_CAMERA_B
|
||||||
(CAM_ID, CAM_NM, CAM_TYPE, CAM_CH, CAM_AR_ID, CAM_URL, CAM_SN, LGTD, LTTD, COMMENTS,
|
(CAM_ID, CAM_NM, CAM_TYPE, CAM_CH, CAM_AR_ID, CAM_URL, CAM_SN, LGTD, LTTD, COMMENTS,
|
||||||
CREATE_TM, TM, [STATUS])
|
CREATE_TM, TM, [STATUS], DEFAULT_SHOW)
|
||||||
values
|
values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(#{item.camId,jdbcType=BIGINT}, #{item.camNm,jdbcType=VARCHAR}, #{item.camType,jdbcType=BIGINT},
|
(#{item.camId,jdbcType=BIGINT}, #{item.camNm,jdbcType=VARCHAR}, #{item.camType,jdbcType=BIGINT},
|
||||||
#{item.camCh,jdbcType=INTEGER}, #{item.camArId,jdbcType=BIGINT}, #{item.camUrl,jdbcType=VARCHAR},
|
#{item.camCh,jdbcType=INTEGER}, #{item.camArId,jdbcType=BIGINT}, #{item.camUrl,jdbcType=VARCHAR},
|
||||||
#{item.camSn,jdbcType=VARCHAR}, #{item.lgtd,jdbcType=DECIMAL}, #{item.lttd,jdbcType=DECIMAL},
|
#{item.camSn,jdbcType=VARCHAR}, #{item.lgtd,jdbcType=DECIMAL}, #{item.lttd,jdbcType=DECIMAL},
|
||||||
#{item.comments,jdbcType=VARCHAR}, #{item.createTm,jdbcType=TIMESTAMP}, #{item.tm,jdbcType=TIMESTAMP},
|
#{item.comments,jdbcType=VARCHAR}, #{item.createTm,jdbcType=TIMESTAMP}, #{item.tm,jdbcType=TIMESTAMP},
|
||||||
#{item.status,jdbcType=INTEGER})
|
#{item.status,jdbcType=INTEGER}, #{item.defaultShow,jdbcType=INTEGER})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<select id="chechExists" resultType="boolean">
|
||||||
|
select case when exists(
|
||||||
|
select 1 from ST_CAMERA_B
|
||||||
|
where (CAM_NM=#{obj.camNm} or CAM_SN=#{obj.camSn})
|
||||||
|
and STATUS=1
|
||||||
|
<if test='obj.camId!=null'>
|
||||||
|
and CAM_ID!=#{obj.camId}
|
||||||
|
</if>
|
||||||
|
) then 1 else 0 end
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="queryBySearch" resultType="com.gunshi.project.xyt.entity.basedata.StCameraVo">
|
||||||
|
select t1.CAM_ID,
|
||||||
|
t1.CAM_NM,
|
||||||
|
t1.CAM_TYPE,
|
||||||
|
t1.CAM_CH,
|
||||||
|
t1.CAM_AR_ID,
|
||||||
|
t1.CAM_URL,
|
||||||
|
t1.CAM_SN,
|
||||||
|
t1.LGTD,
|
||||||
|
t1.LTTD,
|
||||||
|
t1.COMMENTS,
|
||||||
|
t1.CREATE_TM,
|
||||||
|
t1.TM,
|
||||||
|
t1.STATUS,
|
||||||
|
t1.DEFAULT_SHOW,
|
||||||
|
SCAB.CAM_AR_NM CAM_AR_NM,
|
||||||
|
SDB.DICT_NM CAM_TYPE_NM
|
||||||
|
from ST_CAMERA_B t1
|
||||||
|
left join dbo.ST_CAMERA_AREA_B SCAB on t1.CAM_AR_ID = SCAB.CAM_AR_ID
|
||||||
|
left join dbo.SYS_DICT_B SDB on t1.CAM_TYPE = SDB.ID
|
||||||
|
<where>
|
||||||
|
<if test="obj.keyword != null and obj.keyword != ''">
|
||||||
|
and (t1.CAM_NM like concat('%', #{obj.keyword}, '%') or t1.CAM_SN like concat('%', #{obj.keyword}, '%'))
|
||||||
|
</if>
|
||||||
|
<if test="obj.camType != null">
|
||||||
|
and t1.CAM_TYPE = #{obj.camType}
|
||||||
|
</if>
|
||||||
|
and t1.STATUS = 1
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getAll" resultType="com.gunshi.project.xyt.entity.basedata.StCameraVo">
|
||||||
|
select t1.CAM_ID,
|
||||||
|
t1.CAM_NM,
|
||||||
|
t1.CAM_TYPE,
|
||||||
|
t1.CAM_CH,
|
||||||
|
t1.CAM_AR_ID,
|
||||||
|
t1.CAM_URL,
|
||||||
|
t1.CAM_SN,
|
||||||
|
t1.LGTD,
|
||||||
|
t1.LTTD,
|
||||||
|
t1.COMMENTS,
|
||||||
|
t1.CREATE_TM,
|
||||||
|
t1.TM,
|
||||||
|
t1.STATUS,
|
||||||
|
t1.DEFAULT_SHOW,
|
||||||
|
SCAB.CAM_AR_NM CAM_AR_NM,
|
||||||
|
SDB.DICT_NM CAM_TYPE_NM
|
||||||
|
from ST_CAMERA_B t1
|
||||||
|
left join dbo.ST_CAMERA_AREA_B SCAB on t1.CAM_AR_ID = SCAB.CAM_AR_ID
|
||||||
|
left join dbo.SYS_DICT_B SDB on t1.CAM_TYPE = SDB.ID
|
||||||
|
<where>
|
||||||
|
and t1.STATUS = 1
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -28,4 +28,61 @@
|
||||||
#{item.tm,jdbcType=TIMESTAMP}, #{item.status,jdbcType=INTEGER})
|
#{item.tm,jdbcType=TIMESTAMP}, #{item.status,jdbcType=INTEGER})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<select id="checkExistCodeAndName" resultType="boolean">
|
||||||
|
select case when
|
||||||
|
exists(select 1
|
||||||
|
from dbo.SYS_DICT_B where (DICT_NM = #{obj.dictNm} or DICT_CD = #{obj.dictCd})
|
||||||
|
and STATUS = 1
|
||||||
|
and PID = 0
|
||||||
|
<if test='obj.id != null'>
|
||||||
|
and ID != #{obj.id}
|
||||||
|
</if>
|
||||||
|
) then 1
|
||||||
|
else 0 end
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="queryPidBySearch" resultType="com.gunshi.project.xyt.model.SysDictB">
|
||||||
|
select ID from (
|
||||||
|
(select ID as ID
|
||||||
|
from SYS_DICT_B
|
||||||
|
<where>
|
||||||
|
<if test="obj.keyword != null and obj.keyword != ''">
|
||||||
|
and (DICT_NM like concat('%', #{obj.keyword}, '%') or DICT_CD like concat('%', #{obj.keyword}, '%'))
|
||||||
|
</if>
|
||||||
|
and PID = 0
|
||||||
|
and STATUS = 1
|
||||||
|
</where>
|
||||||
|
)
|
||||||
|
union
|
||||||
|
(select PID as ID
|
||||||
|
from SYS_DICT_B
|
||||||
|
<where>
|
||||||
|
<if test="obj.keyword != null and obj.keyword != ''">
|
||||||
|
and (DICT_NM like concat('%', #{obj.keyword}, '%') or DICT_CD like concat('%', #{obj.keyword}, '%'))
|
||||||
|
</if>
|
||||||
|
<![CDATA[
|
||||||
|
and PID <> 0]]>
|
||||||
|
and STATUS = 1
|
||||||
|
</where>
|
||||||
|
)
|
||||||
|
) temp_table
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="queryByPidOrIds" resultType="com.gunshi.project.xyt.entity.basedata.SysDictVo">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
from SYS_DICT_B a
|
||||||
|
<where>
|
||||||
|
PID in
|
||||||
|
<foreach item="it" collection="obj" separator="," open="(" close=")">
|
||||||
|
#{it}
|
||||||
|
</foreach>
|
||||||
|
or ID in
|
||||||
|
<foreach item="it" collection="obj" separator="," open="(" close=")">
|
||||||
|
#{it}
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
order by SORT_ON
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
package com.gunshi.project.xyt.service;
|
||||||
|
|
||||||
|
import com.gunshi.project.xyt.Main;
|
||||||
|
import com.gunshi.project.xyt.entity.basedata.StCameraAreaTreeVo;
|
||||||
|
import com.gunshi.project.xyt.entity.basedata.StCameraAreaVo;
|
||||||
|
import com.gunshi.project.xyt.model.StCameraAreaB;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
|
import ru.olegcherednik.jackson_utils.JacksonUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
@ContextConfiguration(classes = Main.class)
|
||||||
|
@Slf4j
|
||||||
|
class StCameraAreaServiceTest {
|
||||||
|
@Autowired
|
||||||
|
private StCameraAreaService stCameraAreaService;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void queryStCameraAreaBList() {
|
||||||
|
List<StCameraAreaVo> list1 = stCameraAreaService.queryListByName("公路");
|
||||||
|
log.info("{}", list1);
|
||||||
|
List<StCameraAreaVo> list2 = stCameraAreaService.queryListByName("");
|
||||||
|
log.info("{}", list2);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void insertStCameraAreaB() {
|
||||||
|
StCameraAreaB stCameraAreaB = new StCameraAreaB();
|
||||||
|
stCameraAreaB.setCamArNm("公路2");
|
||||||
|
stCameraAreaB.setPid(0L);
|
||||||
|
stCameraAreaB.setStatus(1);
|
||||||
|
stCameraAreaB.setComments("备注2");
|
||||||
|
stCameraAreaService.insert(stCameraAreaB);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void insertStCameraAreaB2() {
|
||||||
|
StCameraAreaB stCameraAreaB = new StCameraAreaB();
|
||||||
|
stCameraAreaB.setCamArNm("公路1-1");
|
||||||
|
stCameraAreaB.setPid(1750075892207497218L);
|
||||||
|
stCameraAreaB.setStatus(1);
|
||||||
|
stCameraAreaB.setComments("备注");
|
||||||
|
stCameraAreaService.insert(stCameraAreaB);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void updateStCameraAreaB() {
|
||||||
|
StCameraAreaB stCameraAreaB = stCameraAreaService.queryById(1750077729811742721L);
|
||||||
|
stCameraAreaB.setComments(null);
|
||||||
|
stCameraAreaService.update(stCameraAreaB);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void queryStCameraAreaBTree() {
|
||||||
|
List<StCameraAreaTreeVo> list = stCameraAreaService.queryTree();
|
||||||
|
log.info("{}", JacksonUtils.writeValue(list));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.gunshi.project.xyt.service;
|
||||||
|
|
||||||
|
import com.gunshi.project.xyt.Main;
|
||||||
|
import com.gunshi.project.xyt.entity.basedata.StCameraSearch;
|
||||||
|
import com.gunshi.project.xyt.model.StCameraB;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
|
import ru.olegcherednik.jackson_utils.JacksonUtils;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
@ContextConfiguration(classes = Main.class)
|
||||||
|
@Slf4j
|
||||||
|
class StCameraServiceTest {
|
||||||
|
@Autowired
|
||||||
|
private StCameraService stCameraService;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void insert() {
|
||||||
|
StCameraB stCameraB = new StCameraB();
|
||||||
|
stCameraB.setCamNm("大坝1-1左1");
|
||||||
|
stCameraB.setCamSn("12345678912");
|
||||||
|
stCameraB.setCamArId(1001L);
|
||||||
|
stCameraB.setCamType(1L);
|
||||||
|
stCameraB.setStatus(1);
|
||||||
|
stCameraB.setCamUrl("rtsp://172.16.0.1:1080");
|
||||||
|
stCameraB.setComments("备注");
|
||||||
|
stCameraB.setDefaultShow(0);
|
||||||
|
stCameraB.setLgtd(BigDecimal.valueOf(101.1511d));
|
||||||
|
stCameraB.setLttd(BigDecimal.valueOf(23.1511d));
|
||||||
|
stCameraService.insert(stCameraB);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void update() {
|
||||||
|
StCameraB stCameraB = stCameraService.queryById(1750353808199888897L);
|
||||||
|
stCameraB.setCamNm("大坝顶左1-1");
|
||||||
|
stCameraB.setCamCh(1);
|
||||||
|
stCameraB.setComments(null);
|
||||||
|
stCameraService.update(stCameraB);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void queryBySearch() {
|
||||||
|
StCameraSearch stCameraSearch = new StCameraSearch();
|
||||||
|
stCameraSearch.setKeyword("1-1");
|
||||||
|
|
||||||
|
log.info("{}", JacksonUtils.writeValue(stCameraService.queryBySearch(stCameraSearch)));
|
||||||
|
|
||||||
|
stCameraSearch = new StCameraSearch();
|
||||||
|
stCameraSearch.setKeyword("1-1");
|
||||||
|
stCameraSearch.setCamType(2L);
|
||||||
|
log.info("{}", JacksonUtils.writeValue(stCameraService.queryBySearch(stCameraSearch)));
|
||||||
|
|
||||||
|
stCameraSearch = new StCameraSearch();
|
||||||
|
stCameraSearch.setKeyword("1-1");
|
||||||
|
stCameraSearch.setCamType(1L);
|
||||||
|
stCameraSearch.setPage(1);
|
||||||
|
stCameraSearch.setPageSize(10);
|
||||||
|
log.info("{}", JacksonUtils.writeValue(stCameraService.queryBySearch(stCameraSearch)));
|
||||||
|
|
||||||
|
stCameraSearch = new StCameraSearch();
|
||||||
|
stCameraSearch.setKeyword("1-1");
|
||||||
|
stCameraSearch.setCamType(1L);
|
||||||
|
stCameraSearch.setPage(1);
|
||||||
|
stCameraSearch.setPageSize(1);
|
||||||
|
log.info("{}", JacksonUtils.writeValue(stCameraService.queryBySearch(stCameraSearch)));
|
||||||
|
|
||||||
|
stCameraSearch = new StCameraSearch();
|
||||||
|
stCameraSearch.setKeyword("1-1");
|
||||||
|
stCameraSearch.setCamType(1L);
|
||||||
|
stCameraSearch.setPage(2);
|
||||||
|
stCameraSearch.setPageSize(10);
|
||||||
|
log.info("{}", JacksonUtils.writeValue(stCameraService.queryBySearch(stCameraSearch)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.gunshi.project.xyt.service;
|
||||||
|
|
||||||
|
import com.gunshi.project.xyt.Main;
|
||||||
|
import com.gunshi.project.xyt.entity.basedata.SysDictSearch;
|
||||||
|
import com.gunshi.project.xyt.model.SysDictB;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
|
import ru.olegcherednik.jackson_utils.JacksonUtils;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
@ContextConfiguration(classes = Main.class)
|
||||||
|
@Slf4j
|
||||||
|
class SysDictServiceTest {
|
||||||
|
@Autowired
|
||||||
|
private SysDictService sysDictService;
|
||||||
|
@Test
|
||||||
|
void insert() {
|
||||||
|
SysDictB sysDictB = new SysDictB();
|
||||||
|
sysDictB.setDictNm("测试类型");
|
||||||
|
sysDictB.setDictCd("2");
|
||||||
|
sysDictB.setPid(1750409373064220673L);
|
||||||
|
sysDictB.setSortOn(1);
|
||||||
|
sysDictB.setStatus(1);
|
||||||
|
sysDictService.insert(sysDictB);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void update() {
|
||||||
|
SysDictB sysDictB = sysDictService.queryById(1750400498717966338L);
|
||||||
|
sysDictB.setSortOn(1);
|
||||||
|
sysDictService.update(sysDictB);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void queryBySearch() {
|
||||||
|
SysDictSearch sysDictSearch = new SysDictSearch();
|
||||||
|
sysDictSearch.setKeyword("");
|
||||||
|
sysDictSearch.setPage(1);
|
||||||
|
sysDictSearch.setPageSize(10);
|
||||||
|
log.info("{}", JacksonUtils.writeValue(sysDictService.queryBySearch(sysDictSearch)));
|
||||||
|
|
||||||
|
sysDictSearch = new SysDictSearch();
|
||||||
|
sysDictSearch.setKeyword("类型");
|
||||||
|
sysDictSearch.setPage(1);
|
||||||
|
sysDictSearch.setPageSize(10);
|
||||||
|
log.info("{}", JacksonUtils.writeValue(sysDictService.queryBySearch(sysDictSearch)));
|
||||||
|
|
||||||
|
sysDictSearch = new SysDictSearch();
|
||||||
|
sysDictSearch.setKeyword("类型");
|
||||||
|
sysDictSearch.setPage(1);
|
||||||
|
sysDictSearch.setPageSize(1);
|
||||||
|
log.info("{}", JacksonUtils.writeValue(sysDictService.queryBySearch(sysDictSearch)));
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue