初始提交
This commit is contained in:
@ -0,0 +1,29 @@
|
||||
package com.mosty.sjzx;
|
||||
|
||||
import com.mosty.common.base.timeconsume.EnableTimeConsume;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
/**
|
||||
* 事件中心 微服务
|
||||
* @author zengbo
|
||||
* @date 2022/7/11 19:15 PM[
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@EnableTimeConsume
|
||||
//@ComponentScan("com.mosty")
|
||||
@EnableFeignClients(basePackages = "com.mosty.base.feign.service")
|
||||
@MapperScan("com.mosty.sjzx.mapper")
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication
|
||||
public class MostySjzxApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
SpringApplication.run(MostySjzxApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.mosty.sjzx.config;
|
||||
|
||||
import feign.RequestInterceptor;
|
||||
import feign.RequestTemplate;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@Configuration
|
||||
public class FeignConfig implements RequestInterceptor {
|
||||
|
||||
@Override
|
||||
public void apply(RequestTemplate requestTemplate) {
|
||||
ServletRequestAttributes attr = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
if (attr != null) {
|
||||
HttpServletRequest request = attr.getRequest();
|
||||
// 添加token
|
||||
requestTemplate.header("Authorization", request.getHeader("Authorization"));
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.mosty.sjzx.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 全局配置
|
||||
* @author kevin
|
||||
* @date 2022/5/25 1:56 上午
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Data
|
||||
@Configuration
|
||||
@ConfigurationProperties("exclude.path-patterns")
|
||||
public class GlobalYmlConfig {
|
||||
|
||||
/**
|
||||
* swagger 静态文件的放行列表
|
||||
*/
|
||||
private List<String> swagger;
|
||||
|
||||
}
|
120
mosty-sjzx/src/main/java/com/mosty/sjzx/config/WebMvcConfig.java
Normal file
120
mosty-sjzx/src/main/java/com/mosty/sjzx/config/WebMvcConfig.java
Normal file
@ -0,0 +1,120 @@
|
||||
package com.mosty.sjzx.config;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
|
||||
import com.mosty.common.token.SysUserInterceptor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
import org.springframework.web.servlet.config.annotation.*;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 单体服务拦截器
|
||||
* @author kevin
|
||||
* @date 2022/3/21 11:17 PM
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
@Slf4j
|
||||
public class WebMvcConfig implements WebMvcConfigurer, InitializingBean {
|
||||
|
||||
private static final String DEFAULT_TIME_FORMAT = "HH:mm:ss";
|
||||
private static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
|
||||
private static final String DEFAULT_DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
|
||||
|
||||
@Value("${server.servlet.context-path:/}")
|
||||
private String contextPath;
|
||||
|
||||
@Autowired
|
||||
private GlobalYmlConfig globalYmlConfig;
|
||||
|
||||
@Override
|
||||
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
|
||||
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
|
||||
ObjectMapper objectMapper = converter.getObjectMapper();
|
||||
// 生成JSON时,将所有Long转换成String
|
||||
SimpleModule simpleModule = new SimpleModule();
|
||||
//日期格式化
|
||||
simpleModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT)));
|
||||
simpleModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT)));
|
||||
simpleModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT)));
|
||||
simpleModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT)));
|
||||
simpleModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT)));
|
||||
simpleModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT)));
|
||||
objectMapper.registerModule(simpleModule);
|
||||
// 时间格式化
|
||||
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
objectMapper.configure(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN, true);
|
||||
objectMapper.configure(JsonGenerator.Feature.IGNORE_UNKNOWN, true);
|
||||
objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
|
||||
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||
// 设置格式化内容
|
||||
converter.setObjectMapper(objectMapper);
|
||||
converters.add(0, converter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
log.info("当前服务的 contextPath={}", contextPath);
|
||||
log.info("当前服务的 swaggerExcludePathPatterns={}", JSON.toJSONString(globalYmlConfig.getSwagger()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addViewControllers(ViewControllerRegistry registry) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
|
||||
configurer.defaultContentType(MediaType.APPLICATION_JSON);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(userInfoInterceptor()).addPathPatterns("/**")
|
||||
.excludePathPatterns(globalYmlConfig.getSwagger());
|
||||
log.info("初始化WebMvcConfig 监控拦截器SysUserInterceptor");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
if (!registry.hasMappingForPattern("/template/**")) {
|
||||
registry.addResourceHandler("/template/**").addResourceLocations("classpath:/template/");
|
||||
}
|
||||
registry.addResourceHandler("swagger-ui.html")
|
||||
.addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("docs.html")
|
||||
.addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("/webjars/**")
|
||||
.addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
WebMvcConfigurer.super.addResourceHandlers(registry);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public SysUserInterceptor userInfoInterceptor() {
|
||||
log.info("初始化WebMvcConfig 拦截器SysUserInterceptor");
|
||||
return new SysUserInterceptor();
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.mosty.sjzx.controller;
|
||||
|
||||
import com.mosty.base.model.query.sjzx.YszxNyQuery;
|
||||
import com.mosty.base.model.query.sjzx.YszxQuery;
|
||||
import com.mosty.common.base.domain.BaseController;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.sjzx.service.SgfxService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@AllArgsConstructor
|
||||
@RestController
|
||||
@Api(tags = "系统字典--原magic接口")
|
||||
@RequestMapping("/xtzd")
|
||||
public class AyController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private SgfxService sgfxService;
|
||||
|
||||
@GetMapping("/aylx")
|
||||
@ApiOperation(value = "案由类型")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> aylx(String code) {
|
||||
return ResponseResult.success(this.sgfxService.aylx(code));
|
||||
}
|
||||
|
||||
@GetMapping("/zzjg")
|
||||
@ApiOperation(value = "组织机构")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> zzjg() {
|
||||
return ResponseResult.success(this.sgfxService.zzjg());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,156 @@
|
||||
package com.mosty.sjzx.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.query.sjzx.YszxNyQuery;
|
||||
import com.mosty.base.model.query.sjzx.YszxQuery;
|
||||
import com.mosty.base.model.vo.sjzx.TbJqVo;
|
||||
import com.mosty.common.base.domain.BaseController;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.sjzx.service.SgfxService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@AllArgsConstructor
|
||||
@RestController
|
||||
@Api(tags = "四高分析相关接口--原magic接口")
|
||||
@RequestMapping("/sgfx")
|
||||
public class SgfxController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private SgfxService sgfxService;
|
||||
|
||||
@GetMapping("/gflx/jmjq")
|
||||
@ApiOperation(value = "日统计-街面警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> jmjq(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.jmjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gflx/wffzjq")
|
||||
@ApiOperation(value = "日统计-违法犯罪警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> wffzjq(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.wffzjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gflx/zjq")
|
||||
@ApiOperation(value = "日统计-总警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> zjq(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.zjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gflx/yjmjq")
|
||||
@ApiOperation(value = "日统计-总警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> yjmjq(YszxNyQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.yjmjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gflx/yzwffzjq")
|
||||
@ApiOperation(value = "月统计-违法犯罪警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> yzwffzjq(YszxNyQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.yzwffzjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gflx/yzjq")
|
||||
@ApiOperation(value = "月统计-总警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> yzjq(YszxNyQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.yzjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gflx/zjmjq")
|
||||
@ApiOperation(value = "周统计-街面警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> zjmjq(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.zjmjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gflx/zwffzjq")
|
||||
@ApiOperation(value = "周统计-违法犯罪警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> zwffzjq(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.zwffzjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gflx/zzjq")
|
||||
@ApiOperation(value = "周统计-总警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> zzjq(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.zzjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gfsdfx/Jmjq")
|
||||
@ApiOperation(value = "日统计-街面警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> gfsdfxJmjq(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.gfsdfxJmjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gfsdfx/wffzjq")
|
||||
@ApiOperation(value = "日统计-违法犯罪警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> gfsdfxWffzjq(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.gfsdfxWffzjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gfsdfx/zjq")
|
||||
@ApiOperation(value = "日统计-违法犯罪警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> gfsdfxZjq(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.gfsdfxZjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gfsdfx/yjmjq")
|
||||
@ApiOperation(value = "月统计-街面警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> gfsdfxYjmjq(YszxNyQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.gfsdfxYjmjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gfsdfx/ywffzjq")
|
||||
@ApiOperation(value = "月统计-违法犯罪警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> ywffzjq(YszxNyQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.ywffzjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gfsdfx/yzjq")
|
||||
@ApiOperation(value = "月统计-总警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> gfsdfxYzjq(YszxNyQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.gfsdfxYzjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gfsdfx/zjmjq")
|
||||
@ApiOperation(value = "周统计-街面警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> gfsdfxZjmjq(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.gfsdfxZjmjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gfsdfx/zwffzjq")
|
||||
@ApiOperation(value = "周统计-街面警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> gfsdfxZwffzjq(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.gfsdfxZwffzjq(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/gfsdfx/zzjq")
|
||||
@ApiOperation(value = "周统计-总警情")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> gfsdfxZzjq(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.gfsdfxZzjq(dto));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,47 @@
|
||||
package com.mosty.sjzx.controller;
|
||||
|
||||
import com.mosty.base.model.dto.sjzx.TbCaseTypeDto;
|
||||
import com.mosty.base.model.entity.sjzx.TbCaseType;
|
||||
import com.mosty.common.base.domain.BaseController;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.sjzx.service.TbCaseTypeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 案由表控制层
|
||||
*
|
||||
* @author
|
||||
* @since 2022-09-13 20:44:48
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@RestController
|
||||
@Api(tags = "案由相关接口")
|
||||
@RequestMapping("/tbCase")
|
||||
public class TbCaseTypeController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private TbCaseTypeService tbCaseTypeService;
|
||||
|
||||
@ApiOperation(value = "根据code查询案由上级拼接")
|
||||
@GetMapping("/code")
|
||||
@JwtSysUser
|
||||
public ResponseResult<String> queryCaseByCode(TbCaseTypeDto dto) {
|
||||
return ResponseResult.success(tbCaseTypeService.queryCaseByCode(dto.getCode()));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据code查询案由信息")
|
||||
@GetMapping("/codeObj")
|
||||
@JwtSysUser
|
||||
public ResponseResult<TbCaseType> queryCaseObjByCode(TbCaseTypeDto dto) {
|
||||
return ResponseResult.success(tbCaseTypeService.queryCase(dto.getCode()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,391 @@
|
||||
package com.mosty.sjzx.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.sjzx.TbJqYjbjDto;
|
||||
import com.mosty.base.model.entity.lzother.VLz110Txj;
|
||||
import com.mosty.base.model.entity.sjzx.TbJqCjdb;
|
||||
import com.mosty.base.model.entity.xinzhi.GxCjdb;
|
||||
import com.mosty.base.model.entity.xinzhi.Jjdb;
|
||||
import com.mosty.base.model.query.sjzx.TbJqCjdbQuery;
|
||||
import com.mosty.base.model.query.sjzx.XftjQuery;
|
||||
import com.mosty.base.model.vo.xinzhi.GxAlarmAllVo;
|
||||
import com.mosty.common.base.domain.BaseController;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.entity.log.BusinessType;
|
||||
import com.mosty.common.base.entity.log.Log;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.base.model.entity.sjzx.TbJq;
|
||||
import com.mosty.base.model.query.sjzx.TbJqListQuery;
|
||||
import com.mosty.base.model.query.sjzx.TbJqPageListQuery;
|
||||
import com.mosty.base.model.vo.sjzx.GeohashQuery;
|
||||
import com.mosty.base.model.vo.sjzx.TbJqVo;
|
||||
import com.mosty.sjzx.service.TbJqService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.constraintvalidation.SupportedValidationTarget;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 警情表(TbJq)表控制层
|
||||
*
|
||||
* @author zhangHaiJun
|
||||
* @since 2022-07-13 20:44:48
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@RestController
|
||||
@Api(tags = "警情相关接口")
|
||||
@RequestMapping("/tbJq")
|
||||
public class TbJqController extends BaseController {
|
||||
|
||||
private final TbJqService tbJqService;
|
||||
|
||||
|
||||
@GetMapping("/getPageListLz")
|
||||
@ApiOperation(value = "查询警情数据泸州分页")
|
||||
@JwtSysUser
|
||||
public ResponseResult<IPage<TbJqVo>> getPageListLz(TbJqPageListQuery dto) {
|
||||
return ResponseResult.success(this.tbJqService.getPageListLz(dto));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getPageList")
|
||||
@ApiOperation(value = "查询警情数据分页")
|
||||
@JwtSysUser
|
||||
public ResponseResult<IPage<TbJqVo>> selectPageList(TbJqPageListQuery dto) {
|
||||
return ResponseResult.success(this.tbJqService.selectPageList(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/getListCjd")
|
||||
@ApiOperation(value = "查询处警单表")
|
||||
@JwtSysUser
|
||||
@Log(title = "查询处警单表", businessType = BusinessType.OTHER)
|
||||
public ResponseResult<List<TbJqCjdb>> getListCjd(String jjdbh) {
|
||||
return ResponseResult.success(this.tbJqService.getListCjd(jjdbh));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getList")
|
||||
@ApiOperation(value = "查询警情数据不分页")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<TbJqVo>> getList(TbJqListQuery dto) {
|
||||
return ResponseResult.success(this.tbJqService.getList(dto));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询单条数据")
|
||||
@GetMapping("{id}")
|
||||
public ResponseResult<TbJqVo> queryById(@PathVariable("id") String id) {
|
||||
return ResponseResult.success(this.tbJqService.queryById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("新增警情数据")
|
||||
@PostMapping
|
||||
@JwtSysUser
|
||||
public ResponseResult<TbJq> add(@RequestBody TbJq tbJq) {
|
||||
this.tbJqService.insert(tbJq);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("修改警情数据")
|
||||
@PutMapping
|
||||
@JwtSysUser
|
||||
public ResponseResult<TbJq> edit(@RequestBody TbJq tbJq) {
|
||||
this.tbJqService.update(tbJq);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("删除警情数据")
|
||||
@DeleteMapping
|
||||
@JwtSysUser
|
||||
public ResponseResult<Boolean> deleteById(String id) {
|
||||
return ResponseResult.success(this.tbJqService.deleteById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("获取警情坐标(热力图使用)")
|
||||
@GetMapping("getJqHotMap")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> getJqHotMap(TbJqListQuery dto) {
|
||||
return ResponseResult.success(this.tbJqService.getJqHotMap(dto));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getJqCount")
|
||||
@ApiOperation(value = "根据时间获取警情数量")
|
||||
@JwtSysUser
|
||||
public ResponseResult<Integer> getJqCount(TbJqListQuery dto) {
|
||||
return ResponseResult.success(this.tbJqService.getJqCount(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/getJqBy24h")
|
||||
@ApiOperation(value = "今日警情数量走势")
|
||||
@JwtSysUser
|
||||
public ResponseResult<Object> getJqBy24h(String ssbmdm) {
|
||||
return ResponseResult.success(this.tbJqService.getJqBy24h(ssbmdm));
|
||||
}
|
||||
|
||||
@GetMapping("/getZfgkList")
|
||||
@ApiOperation(value = "查询租房管控信息列表")
|
||||
@JwtSysUser
|
||||
public ResponseResult<IPage<TbJqVo>> getZfgkList(TbJqPageListQuery dto) {
|
||||
return ResponseResult.success(this.tbJqService.getZfgkList(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/getjrjqczfx")
|
||||
@ApiOperation(value = "今日警情处置分析")
|
||||
@JwtSysUser
|
||||
public ResponseResult<Object> getjrjqczfx(String ssbmdm) {
|
||||
return ResponseResult.success(this.tbJqService.getjrjqczfx(ssbmdm));
|
||||
}
|
||||
|
||||
@PostMapping("/addXzjq")
|
||||
@ApiOperation(value = "添加高新新稚警情信息到数据库中")
|
||||
public ResponseResult<Integer> addXzjq(@RequestBody GxAlarmAllVo entity) {
|
||||
return ResponseResult.success(this.tbJqService.addXzjq(entity));
|
||||
}
|
||||
|
||||
@PostMapping("/addRsJq")
|
||||
@ApiOperation(value = "添加仁寿警情信息到数据库中")
|
||||
public ResponseResult<Integer> addRsJq(@RequestBody TbJq entity) {
|
||||
return ResponseResult.success(this.tbJqService.addRsJq(entity));
|
||||
}
|
||||
|
||||
@PostMapping("/addXzJqCjdb")
|
||||
@ApiOperation(value = "添加新稚警情-处警单表到数据库中")
|
||||
public ResponseResult<Integer> addXzJqCjdb(@RequestBody GxCjdb cjdb) {
|
||||
return ResponseResult.success(this.tbJqService.addXzJqCjdb(cjdb));
|
||||
}
|
||||
|
||||
@PostMapping("/getStatistics")
|
||||
@ApiOperation(value = "APP警情统计")
|
||||
public ResponseResult<Map<String, Object>> getStatistics(@RequestBody TbJqListQuery dto) {
|
||||
return ResponseResult.success(this.tbJqService.getStatistics(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/getAllStatistics")
|
||||
@ApiOperation(value = "APP首页-所有警情统计")
|
||||
public ResponseResult<Map<String, Object>> getAllStatistics() {
|
||||
return ResponseResult.success(this.tbJqService.getAllStatistics());
|
||||
}
|
||||
|
||||
@GetMapping("/getJmjqStatistics")
|
||||
@ApiOperation(value = "APP首页-街面警情统计")
|
||||
public ResponseResult<Map<String, Object>> getJmjqStatistics() {
|
||||
return ResponseResult.success(this.tbJqService.getJmjqStatistics());
|
||||
}
|
||||
|
||||
@GetMapping("/getWffzStatistics")
|
||||
@ApiOperation(value = "APP首页-违法犯罪警情统计")
|
||||
public ResponseResult<Map<String, Object>> getWffzStatistics() {
|
||||
return ResponseResult.success(this.tbJqService.getWffzStatistics());
|
||||
}
|
||||
|
||||
@GetMapping("/getDqscStatistics")
|
||||
@ApiOperation(value = "APP首页-盗抢三车警情统计")
|
||||
public ResponseResult<Map<String, Object>> getDqscStatistics() {
|
||||
return ResponseResult.success(this.tbJqService.getDqscStatistics());
|
||||
}
|
||||
|
||||
@GetMapping("/jqtjDbFjjqzs")
|
||||
@ApiOperation(value = "APP警情分析-对比分析-分局警情走势图")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(value = "查询类型 1.今日 2.近一周 3.近一月 4.近三月", name = "type", dataType = "String"),
|
||||
@ApiImplicitParam(value = "分局代码", name = "ssfjdm", dataType = "String"),
|
||||
@ApiImplicitParam(value = "警情类型 1.总警情 2.街面警情 3.违法犯罪", name = "jqType", dataType = "String"),
|
||||
})
|
||||
public ResponseResult<Object> jqtjDbFjjqzs(String type, String ssfjdm, String jqType) {
|
||||
return ResponseResult.success(this.tbJqService.jqtjDbFjjqzs(type, ssfjdm, jqType));
|
||||
}
|
||||
|
||||
@GetMapping("/jqtjDbCqfjhb")
|
||||
@ApiOperation(value = "APP警情分析-对比分析-城区分局警情环比")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(value = "查询类型 1.今日 2.近一周 3.近一月 4.近三月", name = "type", dataType = "String"),
|
||||
@ApiImplicitParam(value = "警情类型 1.总警情 2.街面警情 3.违法犯罪", name = "jqType", dataType = "String"),
|
||||
})
|
||||
public ResponseResult<Object> jqtjDbCqfjhb(String type, String jqType) {
|
||||
return ResponseResult.success(this.tbJqService.jqtjDbCqfjhb(type, jqType));
|
||||
}
|
||||
|
||||
@GetMapping("/jqtjDbCqfjhbTable")
|
||||
@ApiOperation(value = "APP警情分析-对比分析-城区分局警情环比-列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(value = "查询类型 1.今日 2.近一周 3.近一月 4.近三月", name = "type", dataType = "String"),
|
||||
@ApiImplicitParam(value = "分局代码", name = "ssfjdm", dataType = "String"),
|
||||
@ApiImplicitParam(value = "警情类型 1.总警情 2.街面警情 3.违法犯罪", name = "jqType", dataType = "String"),
|
||||
})
|
||||
public ResponseResult<Object> jqtjDbCqfjhbTable(String type, String ssfjdm, String jqType) {
|
||||
return ResponseResult.success(this.tbJqService.jqtjDbCqfjhbTable(type, ssfjdm, jqType));
|
||||
}
|
||||
|
||||
@GetMapping("/jqtjDbPcsHb")
|
||||
@ApiOperation(value = "APP警情分析-对比分析-派出所总警情环比")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(value = "查询类型 1.今日 2.近一周 3.近一月 4.近三月", name = "type", dataType = "String"),
|
||||
@ApiImplicitParam(value = "分局代码", name = "ssfjdm", dataType = "String"),
|
||||
@ApiImplicitParam(value = "警情类型 1.总警情 2.街面警情 3.违法犯罪", name = "jqType", dataType = "String"),
|
||||
})
|
||||
public ResponseResult<Object> jqtjDbPcsHb(String type, String ssfjdm, String jqType) {
|
||||
return ResponseResult.success(this.tbJqService.jqtjDbPcsHb(type, ssfjdm, jqType));
|
||||
}
|
||||
|
||||
@GetMapping("/jqtjDbPcsHbTable")
|
||||
@ApiOperation(value = "APP警情分析-对比分析-派出所总警情环比-表格")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(value = "查询类型 1.今日 2.近一周 3.近一月 4.近三月", name = "type", dataType = "String"),
|
||||
@ApiImplicitParam(value = "分局代码", name = "ssfjdm", dataType = "String"),
|
||||
@ApiImplicitParam(value = "警情类型 1.总警情 2.街面警情 3.违法犯罪", name = "jqType", dataType = "String"),
|
||||
})
|
||||
public ResponseResult<Object> jqtjDbPcsHbTable(String type, String ssfjdm, String jqType) {
|
||||
return ResponseResult.success(this.tbJqService.jqtjDbPcsHbTable(type, ssfjdm, jqType));
|
||||
}
|
||||
|
||||
@GetMapping("/jqtjSgFirst")
|
||||
@ApiOperation(value = "APP警情分析-四高分析-第一个统计图")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(value = "查询类型 1.今日 2.近一周 3.近一月 4.近三月", name = "type", dataType = "String"),
|
||||
@ApiImplicitParam(value = "分局代码", name = "ssfjdm", dataType = "String"),
|
||||
@ApiImplicitParam(value = "警情类型 1.总警情 2.街面警情 3.违法犯罪", name = "jqType", dataType = "String"),
|
||||
@ApiImplicitParam(value = "时段类型 3,4,6,8", name = "sdlx", dataType = "String"),
|
||||
})
|
||||
public ResponseResult<Object> jqtjSgFirst(String type, String ssfjdm, String jqType, String sdlx) {
|
||||
return ResponseResult.success(this.tbJqService.jqtjSgFirst(type, ssfjdm, jqType, sdlx));
|
||||
}
|
||||
|
||||
@GetMapping("/getGljq")
|
||||
@ApiOperation(value = "APP首页-获取关联警情")
|
||||
public ResponseResult<List<TbJqVo>> getGljq(String jjdbh) {
|
||||
return ResponseResult.success(this.tbJqService.getGljq(jjdbh));
|
||||
}
|
||||
|
||||
@GetMapping("/getCjList")
|
||||
@ApiOperation(value = "APP获取警情的处警数据")
|
||||
public ResponseResult<IPage<TbJqCjdb>> getCjList(TbJqCjdbQuery dto) {
|
||||
return ResponseResult.success(this.tbJqService.getCjList(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/getLastJq")
|
||||
@ApiOperation(value = "APP获取警情的处警数据")
|
||||
public ResponseResult<TbJqVo> getLastJq() {
|
||||
return ResponseResult.success(this.tbJqService.getLastJq());
|
||||
}
|
||||
|
||||
@GetMapping("/getLastJqCjdb")
|
||||
@ApiOperation(value = "获取最新的一条处警单的数据")
|
||||
public ResponseResult<TbJqCjdb> getLastJqCjdb() {
|
||||
return ResponseResult.success(this.tbJqService.getLastJqCjdb());
|
||||
}
|
||||
|
||||
@PostMapping("/addRsCjdb")
|
||||
@ApiOperation(value = "添加仁寿处警单数据")
|
||||
public ResponseResult<Void> addRsCjdb(@RequestBody TbJqCjdb cjdb) {
|
||||
this.tbJqService.addRsCjdb(cjdb);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/situation")
|
||||
@ApiOperation(value = "转新稚警情接口(实发案)警情概况")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(value = "开始时间(yyyy-MM-dd HH:mm:ss)", name = "startTime", dataType = "String"),
|
||||
@ApiImplicitParam(value = "结束时间(yyyy-MM-dd HH:mm:ss)", name = "endTime", dataType = "String"),
|
||||
})
|
||||
public ResponseResult<JSONObject> situation(String startTime, String endTime) {
|
||||
return ResponseResult.success(this.tbJqService.situation(startTime, endTime));
|
||||
}
|
||||
|
||||
@GetMapping("/alarmSituation")
|
||||
@ApiOperation(value = "转新稚警情接口--警请态势")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(value = "开始时间(yyyy-MM-dd HH:mm:ss)", name = "startTime", dataType = "String"),
|
||||
@ApiImplicitParam(value = "结束时间(yyyy-MM-dd HH:mm:ss)", name = "endTime", dataType = "String"),
|
||||
})
|
||||
public ResponseResult<JSONObject> alarmSituation(String startTime, String endTime) {
|
||||
return ResponseResult.success(this.tbJqService.alarmSituation(startTime, endTime));
|
||||
}
|
||||
|
||||
@PostMapping("/addLzJq")
|
||||
@ApiOperation(value = "添加泸州警情信息到数据库中")
|
||||
public ResponseResult<Void> addLzJq(@RequestBody VLz110Txj lz110) {
|
||||
this.tbJqService.addLzJq(lz110);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/addLzHndJq")
|
||||
@ApiOperation(value = "添加泸州海能达警情信息到数据库中")
|
||||
public ResponseResult<Void> addLzHndJq(@RequestBody Jjdb jjdb) {
|
||||
System.out.println("添加泸州警情信息到数据库中--->" + JSONArray.toJSONString(jjdb));
|
||||
this.tbJqService.addYbJq(jjdb);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/addYbJq")
|
||||
@ApiOperation(value = "添加宜宾警情信息到数据库中")
|
||||
public ResponseResult<Void> addYbJq(@RequestBody Jjdb jjdb) {
|
||||
this.tbJqService.addYbJq(jjdb);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("泸州态势统计-警情与巡防工作对比分析")
|
||||
@PostMapping("/getJqAndXfTj")
|
||||
@JwtSysUser
|
||||
public ResponseResult<Map<String, Object>> getJqAndXfTj(XftjQuery dto) {
|
||||
return ResponseResult.success(tbJqService.getJqAndXfTj(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("泸州态势统计-警情与盘查工作对比分析")
|
||||
@PostMapping("/getJqAndPcTj")
|
||||
@JwtSysUser
|
||||
public ResponseResult<Map<String, Object>> getJqAndPcTj(XftjQuery dto) {
|
||||
return ResponseResult.success(tbJqService.getJqAndPcTj(dto));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("APP一键报警添加接口")
|
||||
@PostMapping("/addYjbj")
|
||||
@JwtSysUser
|
||||
public ResponseResult<Void> addYjbj(@RequestBody TbJqYjbjDto dto) {
|
||||
tbJqService.addYjbj(dto);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("修改警情处置状态")
|
||||
@PostMapping("/updateJqCzzt")
|
||||
public ResponseResult<Void> updateJqCzzt(@RequestParam("id") String id, @RequestParam("czzt") String czzt) {
|
||||
tbJqService.updateJqCzzt(id, czzt);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("查询没得经纬度的接警单编号")
|
||||
@GetMapping("/selectJjdbh")
|
||||
public ResponseResult<List<String>> selectJjdbh() {
|
||||
return ResponseResult.success(this.tbJqService.selectJjdbh());
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("修改警情经纬度")
|
||||
@PostMapping("/updateJqJwd")
|
||||
public ResponseResult<Void> updateJqJwd(@RequestBody Jjdb jjdb) {
|
||||
System.out.println("修改警情经纬度--->" + JSONArray.toJSONString(jjdb));
|
||||
this.tbJqService.updateJqJwd(jjdb);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("同步接警单号到reids")
|
||||
@GetMapping("/tbJjdhToRedis")
|
||||
public ResponseResult<Void> tbJjdhToRedis() {
|
||||
this.tbJqService.tbJjdhToRedis();
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,119 @@
|
||||
package com.mosty.sjzx.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.query.sjzx.TbSjQuery;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.entity.log.BusinessType;
|
||||
import com.mosty.common.base.entity.log.Log;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.base.model.dto.sjzx.TbSjDto;
|
||||
import com.mosty.base.model.dto.sjzx.TbSjQcszDto;
|
||||
import com.mosty.base.model.dto.sjzx.TbSjRzDto;
|
||||
import com.mosty.base.model.dto.sjzx.TbSjUpdateJwdDto;
|
||||
import com.mosty.base.model.entity.sjzx.TbSj;
|
||||
import com.mosty.base.model.query.sjzx.SearchDto;
|
||||
import com.mosty.sjzx.service.TbSjService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/11
|
||||
**/
|
||||
@AllArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("tbSj")
|
||||
@Api(tags = "事件相关接口")
|
||||
public class TbSjController {
|
||||
|
||||
@Resource
|
||||
private TbSjService tbSjService;
|
||||
|
||||
@GetMapping("/selectEventList")
|
||||
@ApiOperation(value = "大屏-地图-全局搜索")
|
||||
@JwtSysUser
|
||||
@Log(title = "大屏-地图-全局搜索", businessType = BusinessType.OTHER)
|
||||
public ResponseResult<Object> queryAll(SearchDto dto) {
|
||||
return ResponseResult.success(this.tbSjService.queryAll(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/getPageList")
|
||||
@ApiOperation(value = "查询事件列表")
|
||||
@JwtSysUser
|
||||
@Log(title = "查询事件列表", businessType = BusinessType.OTHER)
|
||||
public ResponseResult<IPage<TbSjDto>> getPageList(TbSjQuery dto) {
|
||||
return ResponseResult.success(this.tbSjService.getPageList(dto));
|
||||
}
|
||||
|
||||
@GetMapping("selectById")
|
||||
@ApiOperation(value = "id查询单条")
|
||||
@Log(title = "id查询单条", businessType = BusinessType.OTHER)
|
||||
@JwtSysUser
|
||||
public ResponseResult<TbSjDto> queryById(String id) {
|
||||
return ResponseResult.success(this.tbSjService.queryById(id));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "大屏-地图-手动新增事件")
|
||||
@Log(title = "新增事件信息", businessType = BusinessType.INSERT)
|
||||
@JwtSysUser
|
||||
public ResponseResult<TbSjDto> add(@RequestBody TbSj tbSj) {
|
||||
return ResponseResult.success(this.tbSjService.insert(tbSj));
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "事件-圈层设置")
|
||||
@JwtSysUser
|
||||
@Log(title = "事件-圈层设置", businessType = BusinessType.UPDATE)
|
||||
public ResponseResult<Void> editQc(@RequestBody TbSjQcszDto dto) {
|
||||
this.tbSjService.editQc(dto);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@PutMapping("updateJwd")
|
||||
@ApiOperation(value = "事件-修改定位")
|
||||
@JwtSysUser
|
||||
@Log(title = "事件-修改定位", businessType = BusinessType.UPDATE)
|
||||
public ResponseResult<Void> updateJwd(@RequestBody TbSjUpdateJwdDto dto) {
|
||||
this.tbSjService.updateJwd(dto);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@PutMapping("addSjRz")
|
||||
@ApiOperation(value = "事件-记录日志")
|
||||
@JwtSysUser
|
||||
@Log(title = "事件-记录日志", businessType = BusinessType.UPDATE)
|
||||
public ResponseResult<Void> addSjRz(@RequestBody TbSjRzDto dto) {
|
||||
this.tbSjService.addSjRz(dto);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "id删除数据")
|
||||
@JwtSysUser
|
||||
@Log(title = "id删除数据", businessType = BusinessType.UPDATE)
|
||||
public ResponseResult<Boolean> deleteById(String id) {
|
||||
return ResponseResult.success(this.tbSjService.deleteById(id));
|
||||
}
|
||||
|
||||
@PostMapping("finishDispose")
|
||||
@ApiOperation(value = "大屏-地图-完成处置")
|
||||
@Log(title = "大屏-地图-完成处置", businessType = BusinessType.UPDATE)
|
||||
@JwtSysUser
|
||||
public ResponseResult<Boolean> finishDispose(@RequestBody TbSj tbSj) {
|
||||
return ResponseResult.success(this.tbSjService.finishDispose(tbSj));
|
||||
}
|
||||
|
||||
@GetMapping("bxdCreate")
|
||||
@ApiOperation(value = "计算必巡点数据")
|
||||
public ResponseResult<Object> bxdCreate() {
|
||||
return ResponseResult.success(this.tbSjService.bxdCreate());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,45 @@
|
||||
package com.mosty.sjzx.controller;
|
||||
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.entity.log.BusinessType;
|
||||
import com.mosty.common.base.entity.log.Log;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.base.model.entity.sjzx.TbSjCyjl;
|
||||
import com.mosty.sjzx.service.TbSjCyjlService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("tbSjCyjl")
|
||||
public class TbSjCyjlController {
|
||||
|
||||
@Resource
|
||||
private TbSjCyjlService tbSjCyjlService;
|
||||
|
||||
@GetMapping("slectPolice")
|
||||
@ApiOperation("大屏-查询参与警力列表")
|
||||
@JwtSysUser
|
||||
@Log(title = "大屏-查询参与警力列表", businessType = BusinessType.OTHER)
|
||||
public ResponseResult queryAll() {
|
||||
return ResponseResult.success(this.tbSjCyjlService.queryAll());
|
||||
}
|
||||
|
||||
@ApiOperation("通过主键查询单条数据")
|
||||
@GetMapping("{id}")
|
||||
@JwtSysUser
|
||||
@Log(title = "通过主键查询单条数据", businessType = BusinessType.OTHER)
|
||||
public ResponseResult<TbSjCyjl> queryById(@PathVariable("id") String id) {
|
||||
return ResponseResult.success(this.tbSjCyjlService.queryById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("大屏-警力调度-参与警力")
|
||||
@PostMapping("/joinCopCount")
|
||||
@Log(title = "大屏-警力调度-参与警力", businessType = BusinessType.OTHER)
|
||||
public ResponseResult joinCopCount(@RequestBody TbSjCyjl tbSjCyjl) {
|
||||
return ResponseResult.success(tbSjCyjlService.joinCopCount(tbSjCyjl));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,51 @@
|
||||
package com.mosty.sjzx.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.sjzx.TbSjRzDto;
|
||||
import com.mosty.base.model.dto.sjzx.TbSjRzInsertDto;
|
||||
import com.mosty.base.model.entity.sjzx.TbSjRz;
|
||||
import com.mosty.base.model.query.jcgl.TbSjRzQuery;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.entity.log.BusinessType;
|
||||
import com.mosty.common.base.entity.log.Log;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.sjzx.service.TbSjRzService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/11
|
||||
**/
|
||||
@AllArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("tbSjRz")
|
||||
@Api(tags = "事件日志相关接口")
|
||||
public class TbSjRzController {
|
||||
|
||||
@Resource
|
||||
private TbSjRzService tbSjRzService;
|
||||
|
||||
@PostMapping("/saveRz")
|
||||
@ApiOperation(value = "新增事件日志记录")
|
||||
@JwtSysUser
|
||||
@Log(title = "新增事件日志记录", businessType = BusinessType.INSERT)
|
||||
public ResponseResult<Void> saveRz(@RequestBody TbSjRzInsertDto dto) {
|
||||
this.tbSjRzService.saveRz(dto);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/getPageList")
|
||||
@ApiOperation(value = "查询事件回溯列表")
|
||||
@JwtSysUser
|
||||
@Log(title = "查询事件回溯列表", businessType = BusinessType.OTHER)
|
||||
public ResponseResult<IPage<TbSjRzDto>> getPageList(TbSjRzQuery dto) {
|
||||
return ResponseResult.success(this.tbSjRzService.getPageList(dto));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,69 @@
|
||||
package com.mosty.sjzx.controller;
|
||||
|
||||
import com.mosty.base.model.dto.sjzx.TbSjSpbfDTO;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.entity.log.BusinessType;
|
||||
import com.mosty.common.base.entity.log.Log;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.base.model.entity.sjzx.TbSjSpbf;
|
||||
import com.mosty.sjzx.service.TbSjSpbfService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("tbSjSpbf")
|
||||
@Api("事件-视频播放日志")
|
||||
@AllArgsConstructor
|
||||
public class TbSjSpbfController {
|
||||
|
||||
@Resource
|
||||
private TbSjSpbfService tbSjSpbfService;
|
||||
|
||||
@ApiOperation("查询视频播放日志所有")
|
||||
@JwtSysUser
|
||||
@Log(title = "查询视频播放日志所有", businessType = BusinessType.OTHER)
|
||||
@GetMapping("All")
|
||||
public ResponseResult<List> queryAll() {
|
||||
return ResponseResult.success(this.tbSjSpbfService.queryAll());
|
||||
}
|
||||
|
||||
@ApiOperation("视频播放日志详情")
|
||||
@JwtSysUser
|
||||
@Log(title = "视频播放日志详情", businessType = BusinessType.OTHER)
|
||||
@GetMapping("{id}")
|
||||
public ResponseResult<TbSjSpbf> queryById(@PathVariable("id") String id) {
|
||||
return ResponseResult.success(this.tbSjSpbfService.queryById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("视频播放日志新增")
|
||||
@JwtSysUser
|
||||
@Log(title = "视频播放日志新增", businessType = BusinessType.INSERT)
|
||||
@PostMapping("add")
|
||||
public ResponseResult<TbSjSpbfDTO> add(@RequestBody TbSjSpbfDTO dto) {
|
||||
return ResponseResult.success(this.tbSjSpbfService.insert(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("视频播放日志修改")
|
||||
@JwtSysUser
|
||||
@Log(title = "视频播放日志修改", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("update")
|
||||
public ResponseResult<TbSjSpbf> edit(TbSjSpbf tbSjSpbf) {
|
||||
return ResponseResult.success(this.tbSjSpbfService.update(tbSjSpbf));
|
||||
}
|
||||
|
||||
@ApiOperation("视频播放日志删除")
|
||||
@JwtSysUser
|
||||
@Log(title = "视频播放日志删除", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("{id}")
|
||||
public ResponseResult<Boolean> deleteById(String id) {
|
||||
return ResponseResult.success(this.tbSjSpbfService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,143 @@
|
||||
package com.mosty.sjzx.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.query.sjzx.*;
|
||||
import com.mosty.common.base.domain.BaseController;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.sjzx.service.SgfxService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@AllArgsConstructor
|
||||
@RestController
|
||||
@Api(tags = "巡防统计--原magic接口")
|
||||
@RequestMapping("/xftj")
|
||||
public class XftjController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private SgfxService sgfxService;
|
||||
|
||||
@GetMapping("/jmjq/jrjqczfx")
|
||||
@ApiOperation(value = "今日警情处置分析")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> jrjqczfx(XftjQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.jrjqczfx(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/jmjq/jrjqslzs")
|
||||
@ApiOperation(value = "今日警情数量走势")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> jrjqslzs(XftjQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.jrjqslzs(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/jmjq/jrjqyj")
|
||||
@ApiOperation(value = "今日警情预警")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> jrjqyj(XftjQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.jrjqyj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/jmjq/jqlxtj")
|
||||
@ApiOperation(value = "警情类型统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> jqlxtj(XftjQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.jqlxtj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/jmjq/jqlb")
|
||||
@ApiOperation(value = "警情列表")
|
||||
@JwtSysUser
|
||||
public ResponseResult<IPage<Map<String, Object>>> jqlb(XftjJqlbQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.jqlb(dto));
|
||||
}
|
||||
|
||||
@PostMapping("/xfzytj/gzy/bmlbtj")
|
||||
@ApiOperation(value = "感知源-部门列表统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> gzybmlbtj(XftjJqlbQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.gzybmlbtj(dto));
|
||||
}
|
||||
|
||||
@PostMapping("/xfzytj/gzy/sblxtj")
|
||||
@ApiOperation(value = "设备类型统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> sblxtj(XftjQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.sblxtj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/xfzytj/gzy/sblb")
|
||||
@ApiOperation(value = "设备列表")
|
||||
@JwtSysUser
|
||||
public ResponseResult<IPage<Map<String, Object>>> sblb(XftjJqlbQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.sblb(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/xfzytj/jwz/bmlbtj")
|
||||
@ApiOperation(value = "部门列表统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> jwzbmlbtj(XftjJwzQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.jwzbmlbtj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/xfzytj/jwz/bmtjjwz")
|
||||
@ApiOperation(value = "根据部门统计警务站")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> bmtjjwz(XftjJwzQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.bmtjjwz(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/xfzytj/xfll/clbmtj")
|
||||
@ApiOperation(value = "根据部门统计警务站")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> clbmtj(XftjXfllQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.clbmtj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/xfzytj/xfll/fjbmtj")
|
||||
@ApiOperation(value = "辅警部门统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> fjbmtj(XftjXfllQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.fjbmtj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/xfzytj/xfll/mjbmtj")
|
||||
@ApiOperation(value = "民警部门统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> mjbmtj(XftjXfllQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.mjbmtj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/xfzytj/xfll/zttjz")
|
||||
@ApiOperation(value = "柱状图统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> zttjz(XftjXfllQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.zttjz(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/xfzytj/ydzb/lbtj")
|
||||
@ApiOperation(value = "移动装备--部门列表统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> lbtj(XftjYdzbQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.lbtj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/xfzytj/ydzb/bmtj")
|
||||
@ApiOperation(value = "移动装备--根据部门统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> bmtj(XftjYdzbQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.bmtj(dto));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,37 @@
|
||||
package com.mosty.sjzx.controller;
|
||||
|
||||
import com.mosty.base.model.query.sjzx.YszxQuery;
|
||||
import com.mosty.common.base.domain.BaseController;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.sjzx.service.SgfxService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@AllArgsConstructor
|
||||
@RestController
|
||||
@Api(tags = "重点关注--原magic接口")
|
||||
@RequestMapping("/zdgz")
|
||||
public class ZdgzController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private SgfxService sgfxService;
|
||||
|
||||
@GetMapping("/jqtj")
|
||||
@ApiOperation(value = "警情统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> zdgzJqtj(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.zdgzJqtj(dto));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,107 @@
|
||||
package com.mosty.sjzx.controller;
|
||||
|
||||
import com.mosty.base.model.query.sjzx.YszxNyQuery;
|
||||
import com.mosty.base.model.query.sjzx.YszxQuery;
|
||||
import com.mosty.common.base.domain.BaseController;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.sjzx.service.SgfxService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@AllArgsConstructor
|
||||
@RestController
|
||||
@Api(tags = "专题分析--原magic接口")
|
||||
@RequestMapping("/ztfx")
|
||||
public class ZtfxController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private SgfxService sgfxService;
|
||||
|
||||
@GetMapping("/afqsfx/rtj")
|
||||
@ApiOperation(value = "发案趋势分析-日统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> rtj(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.rtj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/afqsfx/ytj")
|
||||
@ApiOperation(value = "发案趋势分析-月统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> ytj(YszxNyQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.ytj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/afqsfx/ztj")
|
||||
@ApiOperation(value = "发案趋势分析-月统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> ztj(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.ztj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/fascryyj/scryyj")
|
||||
@ApiOperation(value = "日统计-三车人员预警")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> scryyj(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.scryyj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/fascryyj/yscryyj")
|
||||
@ApiOperation(value = "月统计-三车人员预警")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> yscryyj(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.yscryyj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/fascryyj/zscryyj")
|
||||
@ApiOperation(value = "周统计-三车人员预警")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> zscryyj(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.zscryyj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/pcsfafx/rtj")
|
||||
@ApiOperation(value = "派出所发案分析--日统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> pcsfafxRtj(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.pcsfafxRtj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/pcsfafx/ytj")
|
||||
@ApiOperation(value = "派出所发案分析--月统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> pcsfafxytj(YszxNyQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.pcsfafxytj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/pcsfafx/ztj")
|
||||
@ApiOperation(value = "派出所发案分析--周统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> pcsfafxztj(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.pcsfafxztj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/sjtj/ztsjtj")
|
||||
@ApiOperation(value = "专题分析-数据统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> ztsjtj(YszxQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.ztsjtj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/sjtj/yztsjtj")
|
||||
@ApiOperation(value = "专题分析-月数据统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> yztsjtj(YszxNyQuery dto) {
|
||||
return ResponseResult.success(this.sgfxService.yztsjtj(dto));
|
||||
}
|
||||
}
|
||||
|
||||
|
163
mosty-sjzx/src/main/java/com/mosty/sjzx/mapper/SgfxMapper.java
Normal file
163
mosty-sjzx/src/main/java/com/mosty/sjzx/mapper/SgfxMapper.java
Normal file
@ -0,0 +1,163 @@
|
||||
package com.mosty.sjzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface SgfxMapper {
|
||||
|
||||
@ApiOperation("日统计-街面警情")
|
||||
List<Map<String, Object>> jmjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("日统计-违法犯罪警情")
|
||||
List<Map<String, Object>> wffzjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("日统计-总情警")
|
||||
List<Map<String, Object>> zjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("月统计-街面警情")
|
||||
List<Map<String, Object>> yjmjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("月统计-违法犯罪警情")
|
||||
List<Map<String, Object>> yzwffzjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("月统计-总警情")
|
||||
List<Map<String, Object>> yzjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("周统计-街面警情")
|
||||
List<Map<String, Object>> zjmjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("周统计-违法犯罪警情")
|
||||
List<Map<String, Object>> zwffzjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("周统计-总警情")
|
||||
List<Map<String, Object>> zzjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("日统计-街面警情")
|
||||
List<Map<String, Object>> gfsdfxJmjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("日统计-违法犯罪警情")
|
||||
List<Map<String, Object>> gfsdfxWffzjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("日统计-总警情")
|
||||
List<Map<String, Object>> gfsdfxZjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("月统计-街面警情")
|
||||
List<Map<String, Object>> gfsdfxYjmjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("月统计-违法犯罪警情")
|
||||
List<Map<String, Object>> ywffzjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("月统计-总警情")
|
||||
List<Map<String, Object>> gfsdfxYzjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("周统计-街面警情")
|
||||
List<Map<String, Object>> gfsdfxZjmjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("周统计-违法犯罪警情")
|
||||
List<Map<String, Object>> gfsdfxZwffzjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("周统计-总警情")
|
||||
List<Map<String, Object>> gfsdfxZzjq(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("案由类型")
|
||||
List<Map<String, Object>> aylx(@Param("code") String code);
|
||||
|
||||
@ApiOperation("组织机构")
|
||||
List<Map<String, Object>> zzjg();
|
||||
|
||||
@ApiOperation("警情统计")
|
||||
List<Map<String, Object>> zdgzJqtj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("日统计")
|
||||
List<Map<String, Object>> rtj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("月统计")
|
||||
List<Map<String, Object>> ytj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("月统计")
|
||||
List<Map<String, Object>> ztj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("日统计-三车人员预警")
|
||||
List<Map<String, Object>> scryyj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("月统计-三车人员预警")
|
||||
List<Map<String, Object>> yscryyj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("周统计-三车人员预警")
|
||||
List<Map<String, Object>> zscryyj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("派出所发案分析--日统计")
|
||||
List<Map<String, Object>> pcsfafxRtj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("派出所发案分析--月统计")
|
||||
List<Map<String, Object>> pcsfafxytj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("派出所发案分析--周统计")
|
||||
List<Map<String, Object>> pcsfafxztj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("专题分析-数据统计")
|
||||
List<Map<String, Object>> ztsjtj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("专题分析-月数据统计")
|
||||
List<Map<String, Object>> yztsjtj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("今日警情处置分析")
|
||||
List<Map<String, Object>> jrjqczfx(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("今日警情数量走势")
|
||||
List<Map<String, Object>> jrjqslzs(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("今日警情预警")
|
||||
List<Map<String, Object>> jrjqyj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("警情类型统计")
|
||||
List<Map<String, Object>> jqlxtj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("警情数量")
|
||||
int jqlbCount(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("警情列表")
|
||||
List<Map<String, Object>> jqlb(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("设备类型统计")
|
||||
List<Map<String, Object>> sblxtj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("设备列表统计")
|
||||
int sblbCount(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("设备列表")
|
||||
List<Map<String, Object>> sblb(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("部门列表统计")
|
||||
List<Map<String, Object>> jwzbmlbtj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("根据部门统计警务站")
|
||||
List<Map<String, Object>> bmtjjwz(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("车辆部门统计")
|
||||
List<Map<String, Object>> clbmtj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("辅警部门统计")
|
||||
List<Map<String, Object>> fjbmtj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("民警部门统计")
|
||||
List<Map<String, Object>> mjbmtj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("柱状图统计")
|
||||
List<Map<String, Object>> zttjz(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("移动装备--部门列表统计")
|
||||
List<Map<String, Object>> lbtj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("移动装备--根据部门统计")
|
||||
List<Map<String, Object>> bmtj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("感知源-部门列表统计")
|
||||
List<Map<String, Object>> gzybmlbtj(Map<String, Object> map);
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.mosty.sjzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.sjzx.TbCaseType;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface TbCaseTypeMapper extends BaseMapper<TbCaseType> {
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.mosty.sjzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.sjzx.TbJqAll;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface TbJqAllMapper extends BaseMapper<TbJqAll> {
|
||||
|
||||
@ApiOperation("添加警情信息")
|
||||
Integer insertEntity(TbJqAll jqAll);
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.mosty.sjzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.sjzx.TbJqCjdb;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface TbJqCjdbMapper extends BaseMapper<TbJqCjdb> {
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.mosty.sjzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.sjzx.TbJqDz;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface TbJqDzMapper extends BaseMapper<TbJqDz> {
|
||||
|
||||
@ApiOperation("新增警情地址")
|
||||
void insertEntity(TbJqDz dz);
|
||||
}
|
122
mosty-sjzx/src/main/java/com/mosty/sjzx/mapper/TbJqMapper.java
Normal file
122
mosty-sjzx/src/main/java/com/mosty/sjzx/mapper/TbJqMapper.java
Normal file
@ -0,0 +1,122 @@
|
||||
package com.mosty.sjzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.hczx.TbHcBpcry;
|
||||
import com.mosty.base.model.entity.qwzx.TbQwXfbb;
|
||||
import com.mosty.base.model.entity.sjzx.TbJq;
|
||||
import com.mosty.base.model.dto.sjzx.TbJqGeohash;
|
||||
import com.mosty.base.model.entity.wzzx.TbWzSswz;
|
||||
import com.mosty.base.model.entity.wzzx.TbWzXfwz;
|
||||
import com.mosty.base.model.entity.xinzhi.Jjdb;
|
||||
import com.mosty.base.model.entity.yjzl.TbYjxx;
|
||||
import com.mosty.base.model.query.sjzx.TbJqListQuery;
|
||||
import com.mosty.base.model.query.yjzl.TbYjxxQuery;
|
||||
import com.mosty.base.model.vo.sjzx.GeohashQuery;
|
||||
import com.mosty.common.config.entity.SysDictItem;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 警情表(TbJq)表数据库访问层
|
||||
*
|
||||
* @author zhangHaiJun
|
||||
* @since 2022-07-13 20:44:48
|
||||
*/
|
||||
@Mapper
|
||||
public interface TbJqMapper extends BaseMapper<TbJq> {
|
||||
|
||||
|
||||
@ApiOperation("通过ID查询单条数据")
|
||||
TbJq queryById(String id);
|
||||
|
||||
@ApiOperation("新增数据")
|
||||
int insertEntity(TbJq tbJq);
|
||||
|
||||
@ApiOperation("修改数据")
|
||||
int updateEntity(TbJq tbJq);
|
||||
|
||||
@ApiOperation("通过主键删除数据")
|
||||
int deleteById(String id);
|
||||
|
||||
@ApiOperation("查询数据总数")
|
||||
int getCount(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("查询数据列表分页")
|
||||
List<TbJq> getListByPage(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("查询警情列表不分页")
|
||||
List<TbJq> getList(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("警情热力图")
|
||||
List<Map<String, Object>> getJqHotMap(Map<String, Object> map);
|
||||
|
||||
|
||||
@ApiOperation("查询租房管控数量")
|
||||
int getZfgkCount(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("查询租房管控列表")
|
||||
List<TbJq> getZfgkList(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("查询警情统计信息")
|
||||
List<Map<String, Object>> getStatistics(TbJqListQuery dto);
|
||||
|
||||
@ApiOperation("查询预警信息")
|
||||
List<Map<String, Object>> getYjxx30Day(@Param("kssj") String kssj, @Param("jssj") String jssj);
|
||||
|
||||
@ApiOperation("查询盘查人员信息")
|
||||
List<Map<String, Object>> getPcryList(@Param("kssj") String kssj, @Param("jssj") String jssj);
|
||||
|
||||
@ApiOperation("查询盘车车辆信息")
|
||||
List<Map<String, Object>> getPcclList(@Param("kssj") String kssj, @Param("jssj") String jssj);
|
||||
|
||||
@ApiOperation("警情统计")
|
||||
List<Map<String, Object>> getJqTj(@Param("kssj") String kssj);
|
||||
|
||||
@ApiOperation("警情统计(按时间)")
|
||||
List<Map<String, Object>> getJqTjByTime(@Param("kssj") String kssj, @Param("jssj") String jssj);
|
||||
|
||||
@ApiOperation("查询巡防位置")
|
||||
List<Map<String, Object>> getWzList(@Param("kssj") String kssj);
|
||||
|
||||
@ApiOperation("查询时间段类的报备数据")
|
||||
List<Map<String, Object>> getBbList(@Param("kssj") String kssj, @Param("jssj") String jssj);
|
||||
|
||||
@ApiOperation("查询盘查人员统计")
|
||||
List<Map<String, Object>> getPcryTj(@Param("kssj") String kssj);
|
||||
|
||||
@ApiOperation("查询盘查车辆统计")
|
||||
List<Map<String, Object>> getPcclTj(@Param("kssj") String kssj);
|
||||
|
||||
@ApiOperation("查询盘查重点人员数据")
|
||||
List<Map<String, Object>> getPcZdryTj(String kssj);
|
||||
|
||||
@ApiOperation("根据时间查询盘查人员统计")
|
||||
List<Map<String, Object>> getPcryByTime(@Param("kssj") String kssj, @Param("jssj") String jssj);
|
||||
|
||||
@ApiOperation("根据时间查询盘查车辆统计")
|
||||
List<Map<String, Object>> getPcclByTime(@Param("kssj") String kssj, @Param("jssj") String jssj);
|
||||
|
||||
@ApiOperation("根据时间查询重点人员信息")
|
||||
List<Map<String, Object>> getZdryByTime(@Param("kssj") String kssj, @Param("jssj") String jssj);
|
||||
|
||||
@ApiOperation("修改警情处置状态")
|
||||
void updateJqCzzt(@Param("id") String id, @Param("czzt") String czzt);
|
||||
|
||||
@ApiOperation("查询字典")
|
||||
SysDictItem selectDict(@Param("dictName") String dictName, @Param("dm") String dm);
|
||||
|
||||
@ApiOperation("查询没得经纬度的接警单编号")
|
||||
List<String> selectJjdbh(String jwd);
|
||||
|
||||
@ApiOperation("修改警情经纬度")
|
||||
void updateJqJwd(TbJq tbJq);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,29 @@
|
||||
package com.mosty.sjzx.mapper;
|
||||
|
||||
import com.mosty.base.model.entity.sjzx.TbSjCyjl;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 事件-参与警力表(TbSjCyjl)表数据库访问层
|
||||
*
|
||||
* @author zhangHaiJun
|
||||
* @since 2022-07-13 09:11:18
|
||||
*/
|
||||
@Mapper
|
||||
public interface TbSjCyjlMapper {
|
||||
|
||||
@ApiOperation("查询所有数据")
|
||||
List<TbSjCyjl> queryAll(@Param("useSql") String useSql);
|
||||
|
||||
@ApiOperation("通过ID查询单条数据")
|
||||
TbSjCyjl queryById(String id);
|
||||
|
||||
@ApiOperation("参与警力统计")
|
||||
Map<String,Integer> joinCopCount(@Param("t") TbSjCyjl tbSjCyjl);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,17 @@
|
||||
package com.mosty.sjzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.sjzx.TbSjDz;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/8/25
|
||||
**/
|
||||
@Mapper
|
||||
public interface TbSjDzMapper extends BaseMapper<TbSjDz> {
|
||||
|
||||
@ApiOperation("添加事件地址")
|
||||
void insertEntity(TbSjDz dz);
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.mosty.sjzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.sjzx.TbSj;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 事件表(TbSj)表数据库访问层
|
||||
*
|
||||
* @author zhangHaiJun
|
||||
* @since 2022-07-14 11:42:30
|
||||
*/
|
||||
@Mapper
|
||||
public interface TbSjMapper extends BaseMapper<TbSj> {
|
||||
|
||||
@ApiOperation("通过ID查询单条数据")
|
||||
TbSj queryById(String id);
|
||||
|
||||
@ApiOperation("新增数据")
|
||||
void insertEntity(TbSj tbSj);
|
||||
|
||||
@ApiOperation("修改数据")
|
||||
int updateEntity(TbSj tbSj);
|
||||
|
||||
@ApiOperation("通过主键删除数据")
|
||||
int deleteById(String id);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,14 @@
|
||||
package com.mosty.sjzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.sjzx.TbSjRz;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/8/25
|
||||
**/
|
||||
@Mapper
|
||||
public interface TbSjRzMapper extends BaseMapper<TbSjRz> {
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.mosty.sjzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.sjzx.TbSjSpbf;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 事件-视频播放表(TbSjSpbf)表数据库访问层
|
||||
*
|
||||
* @author zhangHaiJun
|
||||
* @since 2022-07-20 09:45:23
|
||||
*/
|
||||
@Mapper
|
||||
public interface TbSjSpbfMapper extends BaseMapper<TbSjSpbf> {
|
||||
|
||||
@ApiOperation("查询所有数据")
|
||||
List<TbSjSpbf> queryAll(@Param("useSql") String useSql);
|
||||
|
||||
@ApiOperation("通过ID查询单条数据")
|
||||
TbSjSpbf queryById(String id);
|
||||
|
||||
@ApiOperation("通过主键删除数据")
|
||||
int deleteById(String id);
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,14 @@
|
||||
package com.mosty.sjzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.sjzx.TbJqZxr;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/8/31
|
||||
**/
|
||||
@Mapper
|
||||
public interface TbjqZxrMapper extends BaseMapper<TbJqZxr> {
|
||||
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
package com.mosty.sjzx.mybatisplus;
|
||||
|
||||
import cn.hutool.http.HttpStatus;
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import com.mosty.common.base.util.IpUtil;
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* MybatisPlus注入处理器
|
||||
*
|
||||
* @author Lhh
|
||||
* @date 2021/4/25
|
||||
*/
|
||||
public class CreateAndUpdateMetaObjectHandler implements MetaObjectHandler {
|
||||
|
||||
@Override
|
||||
public void insertFill(MetaObject metaObject) {
|
||||
try {
|
||||
UserInfo userInfo = UserInfoManager.getUser();
|
||||
//根据属性名字设置要填充的值
|
||||
if (metaObject.hasGetter("xtCjip")) {
|
||||
if (metaObject.getValue("xtCjip") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjip", String.class, IpUtil.getIpAddress());
|
||||
}
|
||||
}
|
||||
//根据属性名字设置要填充的值
|
||||
if (metaObject.hasGetter("xtSjzt")) {
|
||||
if (metaObject.getValue("xtSjzt") == null) {
|
||||
this.strictInsertFill(metaObject, "xtSjzt", String.class, "1");
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtScbz")) {
|
||||
if (metaObject.getValue("xtScbz") == null) {
|
||||
this.strictInsertFill(metaObject, "xtScbz", String.class, "0");
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtCjsj")) {
|
||||
if (metaObject.getValue("xtCjsj") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjsj", Timestamp.class, new Timestamp(System.currentTimeMillis()));
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(userInfo)) {
|
||||
if (metaObject.hasGetter("xtCjrId")) {
|
||||
if (metaObject.getValue("xtCjrId") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjrId", String.class, String.valueOf(userInfo.userId));
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtCjr")) {
|
||||
if (metaObject.getValue("xtCjr") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjr", String.class, String.valueOf(userInfo.userName));
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtCjbmdm")) {
|
||||
if (metaObject.getValue("xtCjbmdm") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjbmdm", String.class, String.valueOf(userInfo.getDeptCode()));
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtCjbmmc")) {
|
||||
if (metaObject.getValue("xtCjbmmc") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjbmmc", String.class, userInfo.getDeptName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException("自动注入异常 => " + e.getMessage(), HttpStatus.HTTP_UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFill(MetaObject metaObject) {
|
||||
try {
|
||||
UserInfo userInfo = UserInfoManager.getUser();
|
||||
//根据属性名字设置要填充的值
|
||||
if (metaObject.hasGetter("xtZhgxrid")) {
|
||||
if (metaObject.getValue("xtZhgxrid") == null) {
|
||||
this.strictInsertFill(metaObject, "xtZhgxrid", String.class, IpUtil.getIpAddress());
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtZhgxsj")) {
|
||||
if (metaObject.getValue("xtZhgxsj") == null) {
|
||||
this.strictUpdateFill(metaObject, "xtZhgxsj", Timestamp.class, new Timestamp(System.currentTimeMillis()));
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(userInfo)) {
|
||||
if (metaObject.hasGetter("xtZhgxrid")) {
|
||||
if (metaObject.getValue("xtZhgxrid") == null) {
|
||||
this.strictUpdateFill(metaObject, "xtZhgxrid", String.class, String.valueOf(userInfo.userId));
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtZhgxr")) {
|
||||
if (metaObject.getValue("xtZhgxr") == null) {
|
||||
this.strictUpdateFill(metaObject, "xtZhgxr", String.class, userInfo.userName);
|
||||
}
|
||||
}
|
||||
|
||||
if (metaObject.hasGetter("xtZhgxbmdm")) {
|
||||
if (metaObject.getValue("xtZhgxbmdm") == null) {
|
||||
this.strictUpdateFill(metaObject, "xtZhgxbmdm", String.class, userInfo.getDeptCode());
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtZhgxbm")) {
|
||||
if (metaObject.getValue("xtZhgxbm") == null) {
|
||||
this.strictUpdateFill(metaObject, "xtZhgxbm", String.class, userInfo.getDeptName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException("自动注入异常 => " + e.getMessage(), HttpStatus.HTTP_UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.mosty.sjzx.mybatisplus;
|
||||
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
/**
|
||||
* mybatis-plus配置类
|
||||
*
|
||||
* @author Lhh
|
||||
*/
|
||||
@EnableTransactionManagement(proxyTargetClass = true)
|
||||
@Configuration
|
||||
@MapperScan("com.mosty.wqzx.mapper")
|
||||
public class MybatisPlusConfig {
|
||||
|
||||
/**
|
||||
* 元对象字段填充控制器
|
||||
* https://baomidou.com/guide/auto-fill-metainfo.html
|
||||
*/
|
||||
@Bean
|
||||
public MetaObjectHandler metaObjectHandler() {
|
||||
return new CreateAndUpdateMetaObjectHandler();
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
package com.mosty.sjzx.remote;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.mosty.base.model.dto.base.GetSsbmDto;
|
||||
import com.mosty.base.model.dto.base.SysDeptDTO;
|
||||
import com.mosty.base.feign.service.MostyBaseFeignService;
|
||||
import com.mosty.base.model.vo.base.DeptInfoVo;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 调用部门信息远程适配层
|
||||
*
|
||||
* @author kevin
|
||||
* @date 2022/7/6 10:37 上午
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TbBaseAdaptRemoteService {
|
||||
|
||||
|
||||
private final MostyBaseFeignService mostyBaseFeignService;
|
||||
|
||||
// 根据部门编码查询部门信息
|
||||
public DeptInfoVo getOrgByOrgcode(String orgCode) {
|
||||
if (StringUtils.isBlank(orgCode)) {
|
||||
return null;
|
||||
}
|
||||
ResponseResult<DeptInfoVo> responseResult = mostyBaseFeignService.getOrgByOrgcode(orgCode);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("调用部门编码查询部门信息异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("调用部门编码查询部门信息异常");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 查询分局下的所有的派出所信息
|
||||
public List<SysDeptDTO> getPcsByFxjdm(String orgCode) {
|
||||
if (StringUtils.isBlank(orgCode)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
ResponseResult<List<SysDeptDTO>> responseResult = mostyBaseFeignService.getPcsByFxjdm(orgCode);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询分局下的所有的派出所信息异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("查询分局下的所有的派出所信息异常");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 查询系统配置
|
||||
public String getValue(String pzj) {
|
||||
if (StringUtils.isBlank(pzj)) {
|
||||
return null;
|
||||
}
|
||||
ResponseResult<String> responseResult = mostyBaseFeignService.getValue(pzj);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询系统配置异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("查询系统配置异常");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 获取位置信息
|
||||
public String getLocation(String jd, String wd) {
|
||||
String address = "未知位置";
|
||||
ResponseResult<JSONObject> obj = this.mostyBaseFeignService.getLzAddress(jd, wd);
|
||||
if (obj != null && obj.getData() != null) {
|
||||
String city = StringUtils.isNotBlank(obj.getData().getString("state")) ? obj.getData().getString("state") : "";
|
||||
String region = StringUtils.isNotBlank(obj.getData().getString("region")) ? obj.getData().getString("region") : "";
|
||||
String district = StringUtils.isNotBlank(obj.getData().getString("district")) ? obj.getData().getString("district") : "";
|
||||
String suburb = StringUtils.isNotBlank(obj.getData().getString("suburb")) ? obj.getData().getString("suburb") : "";
|
||||
String town = StringUtils.isNotBlank(obj.getData().getString("town")) ? obj.getData().getString("town") : "";
|
||||
String road = StringUtils.isNotBlank(obj.getData().getString("road")) ? obj.getData().getString("road") : "";
|
||||
address = city + region + district + suburb + town + road;
|
||||
}
|
||||
return address;
|
||||
}
|
||||
// 获取权限查询条件
|
||||
public String getSsbm(String ssbmdm, String isChild) {
|
||||
GetSsbmDto dto = new GetSsbmDto(ssbmdm, isChild);
|
||||
ResponseResult<String> responseResult = mostyBaseFeignService.getSsbm(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("获取权限查询条件异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("获取权限查询条件异常");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.mosty.sjzx.remote;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.mosty.base.feign.service.MostyJcglFeignService;
|
||||
import com.mosty.base.model.dto.jcgl.TbJcglKfdDto;
|
||||
import com.mosty.base.model.dto.jcgl.TbJcglPzfzDto;
|
||||
import com.mosty.base.model.dto.jcgl.TbJcglXfllVo;
|
||||
import com.mosty.base.model.dto.jcgl.TbJcglXfqyDto;
|
||||
import com.mosty.base.model.entity.jcgl.TbJcglJwz;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/23
|
||||
* 外部调用基础管理接口
|
||||
**/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class TbJcglAdaptRemoteService {
|
||||
|
||||
@Resource
|
||||
private MostyJcglFeignService mostyJcglFeignService;
|
||||
|
||||
// 查询配置分值
|
||||
public List<TbJcglPzfzDto> getFzList() {
|
||||
ResponseResult<List<TbJcglPzfzDto>> responseResult = mostyJcglFeignService.getFzList();
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询配置分值失败 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("查询配置分值失败");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 添加计算出来的必巡点的数据
|
||||
public void createdBxd(List<Map<String, Object>> rList) {
|
||||
ResponseResult<Void> responseResult = mostyJcglFeignService.createdBxd(rList);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("添加计算出来的必巡点的数据失败 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("添加计算出来的必巡点的数据失败");
|
||||
}
|
||||
}
|
||||
|
||||
// 查询所有快反点数据
|
||||
public List<TbJcglKfdDto> getListKfdAll() {
|
||||
ResponseResult<List<TbJcglKfdDto>> responseResult = mostyJcglFeignService.getListKfdAll();
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询所有快反点数据失败 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("查询所有快反点数据失败");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 查询所有巡防区数据
|
||||
public List<TbJcglXfqyDto> getListXfqyAll() {
|
||||
ResponseResult<List<TbJcglXfqyDto>> responseResult = mostyJcglFeignService.getListXfqyAll();
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询所有巡防区数据失败 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("查询所有巡防区数据失败");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.mosty.sjzx.remote;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.mosty.base.feign.service.MostyLzotherFeignService;
|
||||
import com.mosty.base.model.dto.sjzx.TbJqDTO;
|
||||
import com.mosty.base.model.entity.lzother.VJcxx;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TbLzotherAdaptRemoteService {
|
||||
|
||||
private final MostyLzotherFeignService mostyLzotherFeignService;
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.mosty.sjzx.remote;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.mosty.base.feign.service.MostyQwzxFeignService;
|
||||
import com.mosty.base.model.dto.qwzx.TbQwXfbbQueryByJlDto;
|
||||
import com.mosty.base.model.entity.qwzx.TbQwXfbb;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 勤务中心远程调用
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TbQwzxAdaptRemoteService {
|
||||
|
||||
private final MostyQwzxFeignService mostyQwzxFeignService;
|
||||
|
||||
// 根据设备ID查询该设备所在的巡组
|
||||
public List<TbQwXfbb> getBbList(String sbid) {
|
||||
ResponseResult<List<TbQwXfbb>> responseResult = mostyQwzxFeignService.getBbList(sbid);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("获取巡组信息 失败 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("获取巡组信息异常!");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 查询报备信息
|
||||
public TbQwXfbb getBbxxInfo(String id) {
|
||||
ResponseResult<TbQwXfbb> responseResult = mostyQwzxFeignService.getBbxxInfo(id);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询报备信息 失败 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("查询报备信息异常!");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 查询范围内的最近的巡组信息
|
||||
public TbQwXfbb getBbxxByJi(TbQwXfbbQueryByJlDto dto) {
|
||||
ResponseResult<TbQwXfbb> responseResult = mostyQwzxFeignService.getBbxxByJi(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询范围内的最近的巡组信息 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("查询范围内的最近的巡组信息异常!");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 根据巡区获取报备id
|
||||
public List<TbQwXfbb> getBbidByXq(String xqid) {
|
||||
ResponseResult<List<TbQwXfbb>> responseResult = mostyQwzxFeignService.getBbidByXq(xqid);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询范围内的最近的巡组信息 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("查询范围内的最近的巡组信息异常!");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.mosty.sjzx.remote;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.mosty.base.feign.service.MostyRzzxFeignService;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TbRzSpbfAdaptRemoteService {
|
||||
|
||||
private final MostyRzzxFeignService mostyRzzxFeignService;
|
||||
|
||||
|
||||
/**
|
||||
* 修改视频结束时间
|
||||
* @param lyId 内容
|
||||
* @return
|
||||
*/
|
||||
public Boolean updateLyId(String lyId) {
|
||||
ResponseResult<Boolean> responseResult = mostyRzzxFeignService.updateLyId(lyId);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("修改失败Result = {}", JSON.toJSONString(responseResult));
|
||||
return null;
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.mosty.sjzx.remote;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.mosty.base.model.dto.sjzx.TbJqDTO;
|
||||
import com.mosty.base.feign.service.MostySjzxFeignService;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TbSjzxAdaptRemoteService {
|
||||
|
||||
private final MostySjzxFeignService mostySjzxFeignService;
|
||||
|
||||
/**
|
||||
* 查询预警数据
|
||||
* @param nr 内容
|
||||
* @return
|
||||
*/
|
||||
public List<TbJqDTO> selectVigilant(String nr) {
|
||||
ResponseResult<List<TbJqDTO>> responseResult = mostySjzxFeignService.selectVigilant(nr);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询预警数据异常Result = {}", JSON.toJSONString(responseResult));
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.mosty.sjzx.remote;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.mosty.base.feign.service.MostyWebSocketFeignService;
|
||||
import com.mosty.base.model.dto.websocket.WebSocketObject;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/23
|
||||
* websocket外部调用基础管理接口
|
||||
**/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class TbWebSocketAdaptRemoteService {
|
||||
|
||||
@Resource
|
||||
private MostyWebSocketFeignService mostyWebSocketFeignService;
|
||||
|
||||
// 发送websocket信息
|
||||
public void sendMessage(WebSocketObject obj) {
|
||||
ResponseResult<Void> responseResult = this.mostyWebSocketFeignService.sendMessage(obj);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("发送websocket信息异常 Result = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("发送websocket信息异常");
|
||||
}
|
||||
}
|
||||
|
||||
// 发送websocket信息
|
||||
public void sendBbMessage(WebSocketObject obj) {
|
||||
ResponseResult<Void> responseResult = this.mostyWebSocketFeignService.sendBbMessage(obj);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("发送websocket信息异常 Result = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("发送websocket信息异常");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.mosty.sjzx.remote;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.yjzl.TbYjxxDTO;
|
||||
import com.mosty.base.feign.service.MostyYjzlFeignService;
|
||||
import com.mosty.base.model.query.yjzl.TbYjxxQuery;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TbYjxxAdaptRemoteService {
|
||||
|
||||
private final MostyYjzlFeignService mostyYjzlFeignService;
|
||||
|
||||
// 查询预警信息
|
||||
public Object getPageList(TbYjxxQuery dto) {
|
||||
ResponseResult<IPage<TbYjxxDTO>> responseResult = mostyYjzlFeignService.getPageList(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询预警信息异常Result = {}", JSON.toJSONString(responseResult));
|
||||
return null;
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
package com.mosty.sjzx.remote;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.feign.service.MostyYjzlFeignService;
|
||||
import com.mosty.base.model.dto.yjzl.TbYjxxDTO;
|
||||
import com.mosty.base.model.dto.yjzl.TbZlxxInsertDto;
|
||||
import com.mosty.base.model.entity.yjzl.TbYjxx;
|
||||
import com.mosty.base.model.query.yjzl.TbYjxxQuery;
|
||||
import com.mosty.base.model.query.yjzl.TbZlxxQuery;
|
||||
import com.mosty.base.model.vo.yjzl.TbZlxxVo;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TbYjzlAdaptRrmoteService {
|
||||
|
||||
private final MostyYjzlFeignService mostyYjzlFeignService;
|
||||
|
||||
// 查询指令
|
||||
public Object selectInstructList(TbZlxxQuery dto) {
|
||||
ResponseResult<List<TbZlxxVo>> responseResult = mostyYjzlFeignService.selectInstructList(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询指令异常Result = {}", JSON.toJSONString(responseResult));
|
||||
return null;
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 查询预警信息
|
||||
public Object getPageList(TbYjxxQuery dto) {
|
||||
ResponseResult<IPage<TbYjxxDTO>> responseResult = mostyYjzlFeignService.getPageList(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询预警信息异常 Result = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("查询预警信息异常");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 查询预警信息
|
||||
public List<TbYjxx> getYjxx30Day(TbYjxxQuery dto) {
|
||||
ResponseResult<List<TbYjxx>> responseResult = mostyYjzlFeignService.getYjxx30Day(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询预警信息异常 Result = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("查询预警信息异常");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 添加指令信息
|
||||
public void addZl(TbZlxxInsertDto dto) {
|
||||
ResponseResult<Void> responseResult = mostyYjzlFeignService.addZl(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询预警信息异常 Result = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("查询预警信息异常");
|
||||
}
|
||||
}
|
||||
|
||||
// 警情转换成指令
|
||||
public void andJqZl(String ssbmid,String jqid,String bbids,String zlxflx) {
|
||||
ResponseResult<Void> responseResult = mostyYjzlFeignService.andJqZl(ssbmid,jqid,bbids,zlxflx);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("警情转换成指令异常 Result = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("警情转换成指令异常");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.mosty.sjzx.remote;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.mosty.base.feign.service.MostyYszxFeignService;
|
||||
import com.mosty.base.model.vo.yszx.TbYsDlQuery;
|
||||
import com.mosty.base.model.vo.yszx.TbYsGajgQuery;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
//import com.mosty.yszx.bean.vo.TbYsDlVo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* Created by 张海军 on 2022/7/14 19:50
|
||||
*
|
||||
* @ClassName this.tbYsDlRemoteService
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TbYszxAdapRemoteService {
|
||||
|
||||
private final MostyYszxFeignService mostyYszxFeignService;
|
||||
|
||||
// 查询地理要素
|
||||
public Object queryAll( TbYsDlQuery dto) {
|
||||
ResponseResult responseResult = this.mostyYszxFeignService.queryAll(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询地理要素异常Result = {}", JSON.toJSONString(responseResult));
|
||||
return null;
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 查询公安机关要素
|
||||
public Object getGajgAll( TbYsGajgQuery dto) {
|
||||
ResponseResult responseResult = this.mostyYszxFeignService.getGajgAll(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询公安机关要素异常Result = {}", JSON.toJSONString(responseResult));
|
||||
return null;
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
}
|
155
mosty-sjzx/src/main/java/com/mosty/sjzx/service/SgfxService.java
Normal file
155
mosty-sjzx/src/main/java/com/mosty/sjzx/service/SgfxService.java
Normal file
@ -0,0 +1,155 @@
|
||||
package com.mosty.sjzx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.query.sjzx.*;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface SgfxService {
|
||||
|
||||
@ApiOperation("日统计-街面警情")
|
||||
List<Map<String, Object>> jmjq(YszxQuery dto);
|
||||
|
||||
@ApiOperation("日统计-违法犯罪警情")
|
||||
List<Map<String, Object>> wffzjq(YszxQuery dto);
|
||||
|
||||
@ApiOperation("日统计-总警情")
|
||||
List<Map<String, Object>> zjq(YszxQuery dto);
|
||||
|
||||
@ApiOperation("月统计-街面警情")
|
||||
List<Map<String, Object>> yjmjq(YszxNyQuery dto);
|
||||
|
||||
@ApiOperation("月统计-违法犯罪警情")
|
||||
List<Map<String, Object>> yzwffzjq(YszxNyQuery dto);
|
||||
|
||||
@ApiOperation("月统计-总警情")
|
||||
List<Map<String, Object>> yzjq(YszxNyQuery dto);
|
||||
|
||||
@ApiOperation("周统计-街面警情")
|
||||
List<Map<String, Object>> zjmjq(YszxQuery dto);
|
||||
|
||||
@ApiOperation("周统计-违法犯罪警情")
|
||||
List<Map<String, Object>> zwffzjq(YszxQuery dto);
|
||||
|
||||
@ApiOperation("周统计-总警情")
|
||||
List<Map<String, Object>> zzjq(YszxQuery dto);
|
||||
|
||||
@ApiOperation("日统计-街面警情")
|
||||
List<Map<String, Object>> gfsdfxJmjq(YszxQuery dto);
|
||||
|
||||
@ApiOperation("日统计-违法犯罪警情")
|
||||
List<Map<String, Object>> gfsdfxWffzjq(YszxQuery dto);
|
||||
|
||||
@ApiOperation("日统计-总警情")
|
||||
List<Map<String, Object>> gfsdfxZjq(YszxQuery dto);
|
||||
|
||||
@ApiOperation("月统计-街面警情")
|
||||
List<Map<String, Object>> gfsdfxYjmjq(YszxNyQuery dto);
|
||||
|
||||
@ApiOperation("月统计-违法犯罪警情")
|
||||
List<Map<String, Object>> ywffzjq(YszxNyQuery dto);
|
||||
|
||||
@ApiOperation("月统计-总警情")
|
||||
List<Map<String, Object>> gfsdfxYzjq(YszxNyQuery dto);
|
||||
|
||||
@ApiOperation("周统计-街面警情")
|
||||
List<Map<String, Object>> gfsdfxZjmjq(YszxQuery dto);
|
||||
|
||||
@ApiOperation("周统计-违法犯罪警情")
|
||||
List<Map<String, Object>> gfsdfxZwffzjq(YszxQuery dto);
|
||||
|
||||
@ApiOperation("周统计-总警情")
|
||||
List<Map<String, Object>> gfsdfxZzjq(YszxQuery dto);
|
||||
|
||||
@ApiOperation("案由类型")
|
||||
List<Map<String, Object>> aylx(String code);
|
||||
|
||||
@ApiOperation("组织机构")
|
||||
List<Map<String, Object>> zzjg();
|
||||
|
||||
@ApiOperation("警情统计")
|
||||
List<Map<String, Object>> zdgzJqtj(YszxQuery dto);
|
||||
|
||||
@ApiOperation("日统计")
|
||||
List<Map<String, Object>> rtj(YszxQuery dto);
|
||||
|
||||
@ApiOperation("月统计")
|
||||
List<Map<String, Object>> ytj(YszxNyQuery dto);
|
||||
|
||||
@ApiOperation("周统计")
|
||||
List<Map<String, Object>> ztj(YszxQuery dto);
|
||||
|
||||
@ApiOperation("日统计-三车人员预警")
|
||||
List<Map<String, Object>> scryyj(YszxQuery dto);
|
||||
|
||||
@ApiOperation("月统计-三车人员预警")
|
||||
List<Map<String, Object>> yscryyj(YszxQuery dto);
|
||||
|
||||
@ApiOperation("周统计-三车人员预警")
|
||||
List<Map<String, Object>> zscryyj(YszxQuery dto);
|
||||
|
||||
@ApiOperation("派出所发案分析--日统计")
|
||||
List<Map<String, Object>> pcsfafxRtj(YszxQuery dto);
|
||||
|
||||
@ApiOperation("派出所发案分析--月统计")
|
||||
List<Map<String, Object>> pcsfafxytj(YszxNyQuery dto);
|
||||
|
||||
@ApiOperation("派出所发案分析--周统计")
|
||||
List<Map<String, Object>> pcsfafxztj(YszxQuery dto);
|
||||
|
||||
@ApiOperation("专题分析-数据统计")
|
||||
List<Map<String, Object>> ztsjtj(YszxQuery dto);
|
||||
|
||||
@ApiOperation("专题分析-月数据统计")
|
||||
List<Map<String, Object>> yztsjtj(YszxNyQuery dto);
|
||||
|
||||
@ApiOperation("今日警情处置分析")
|
||||
List<Map<String, Object>> jrjqczfx(XftjQuery dto);
|
||||
|
||||
@ApiOperation("今日警情数量走势")
|
||||
List<Map<String, Object>> jrjqslzs(XftjQuery dto);
|
||||
|
||||
@ApiOperation("今日警情预警")
|
||||
List<Map<String, Object>> jrjqyj(XftjQuery dto);
|
||||
|
||||
@ApiOperation("警情类型统计")
|
||||
List<Map<String, Object>> jqlxtj(XftjQuery dto);
|
||||
|
||||
@ApiOperation("警情列表")
|
||||
IPage<Map<String, Object>> jqlb(XftjJqlbQuery dto);
|
||||
|
||||
@ApiOperation("设备类型统计")
|
||||
List<Map<String, Object>> sblxtj(XftjQuery dto);
|
||||
|
||||
@ApiOperation("设备列表")
|
||||
IPage<Map<String, Object>> sblb(XftjJqlbQuery dto);
|
||||
|
||||
@ApiOperation("部门列表统计")
|
||||
List<Map<String, Object>> jwzbmlbtj(XftjJwzQuery dto);
|
||||
|
||||
@ApiOperation("根据部门统计警务站")
|
||||
List<Map<String, Object>> bmtjjwz(XftjJwzQuery dto);
|
||||
|
||||
@ApiOperation("车辆部门统计")
|
||||
List<Map<String, Object>> clbmtj(XftjXfllQuery dto);
|
||||
|
||||
@ApiOperation("辅警部门统计")
|
||||
List<Map<String, Object>> fjbmtj(XftjXfllQuery dto);
|
||||
|
||||
@ApiOperation("民警部门统计")
|
||||
List<Map<String, Object>> mjbmtj(XftjXfllQuery dto);
|
||||
|
||||
@ApiOperation("柱状图统计")
|
||||
List<Map<String, Object>> zttjz(XftjXfllQuery dto);
|
||||
|
||||
@ApiOperation("移动装备--部门列表统计")
|
||||
List<Map<String, Object>> lbtj(XftjYdzbQuery dto);
|
||||
|
||||
@ApiOperation("移动装备--根据部门统计")
|
||||
List<Map<String, Object>> bmtj(XftjYdzbQuery dto);
|
||||
|
||||
@ApiOperation("感知源-部门列表统计")
|
||||
List<Map<String, Object>> gzybmlbtj(XftjJqlbQuery dto);
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.mosty.sjzx.service;
|
||||
|
||||
import com.mosty.base.model.entity.sjzx.TbCaseType;
|
||||
|
||||
public interface TbCaseTypeService {
|
||||
|
||||
/**
|
||||
* 根据CODE查询案由上级
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public String queryCaseByCode(String code);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public TbCaseType queryCase(String code);
|
||||
|
||||
|
||||
}
|
162
mosty-sjzx/src/main/java/com/mosty/sjzx/service/TbJqService.java
Normal file
162
mosty-sjzx/src/main/java/com/mosty/sjzx/service/TbJqService.java
Normal file
@ -0,0 +1,162 @@
|
||||
package com.mosty.sjzx.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.sjzx.TbJqYjbjDto;
|
||||
import com.mosty.base.model.entity.lzother.VLz110Txj;
|
||||
import com.mosty.base.model.entity.sjzx.TbJq;
|
||||
import com.mosty.base.model.entity.sjzx.TbJqCjdb;
|
||||
import com.mosty.base.model.entity.xinzhi.GxCjdb;
|
||||
import com.mosty.base.model.entity.xinzhi.Jjdb;
|
||||
import com.mosty.base.model.query.sjzx.TbJqCjdbQuery;
|
||||
import com.mosty.base.model.query.sjzx.TbJqListQuery;
|
||||
import com.mosty.base.model.query.sjzx.TbJqPageListQuery;
|
||||
import com.mosty.base.model.query.sjzx.XftjQuery;
|
||||
import com.mosty.base.model.vo.sjzx.TbJqVo;
|
||||
import com.mosty.base.model.vo.xinzhi.GxAlarmAllVo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 警情表(TbJq)表服务接口
|
||||
*
|
||||
* @author zhangHaiJun
|
||||
* @since 2022-07-13 20:44:48
|
||||
*/
|
||||
public interface TbJqService {
|
||||
|
||||
@ApiOperation("通过ID查询单条数据")
|
||||
TbJqVo queryById(String id);
|
||||
|
||||
@ApiOperation("新增数据")
|
||||
int insert(TbJq tbJq);
|
||||
|
||||
@ApiOperation("修改数据")
|
||||
void update(TbJq tbJq);
|
||||
|
||||
@ApiOperation("通过主键删除数据")
|
||||
boolean deleteById(String id);
|
||||
|
||||
@ApiOperation("分页查询警情信息")
|
||||
IPage<TbJqVo> selectPageList(TbJqPageListQuery dto);
|
||||
|
||||
@ApiOperation("查询处警单表")
|
||||
List<TbJqCjdb> getListCjd(String jjdbh);
|
||||
|
||||
|
||||
@ApiOperation("分页查询警情信息")
|
||||
IPage<TbJqVo> getPageListLz(TbJqPageListQuery dto);
|
||||
|
||||
@ApiOperation("查询警情列表不分页")
|
||||
List<TbJqVo> getList(TbJqListQuery dto);
|
||||
|
||||
|
||||
@ApiOperation("获取警情坐标(热力图撒点使用)")
|
||||
List<Map<String, Object>> getJqHotMap(TbJqListQuery dto);
|
||||
|
||||
|
||||
@ApiOperation("根据时间获取警情数量")
|
||||
int getJqCount(TbJqListQuery dto);
|
||||
|
||||
@ApiOperation("今日警情数量走势")
|
||||
Object getJqBy24h(String ssbmdm);
|
||||
|
||||
@ApiOperation("查询租房管控信息")
|
||||
IPage<TbJqVo> getZfgkList(TbJqPageListQuery dto);
|
||||
|
||||
@ApiOperation("今日警情处置分析")
|
||||
Object getjrjqczfx(String ssbmdm);
|
||||
|
||||
@ApiOperation("添加新稚警情信息到数据库中")
|
||||
Integer addXzjq(GxAlarmAllVo entity);
|
||||
|
||||
@ApiOperation("APP警情统计")
|
||||
Map<String, Object> getStatistics(TbJqListQuery dto);
|
||||
|
||||
@ApiOperation("APP首页-所有统计")
|
||||
Map<String, Object> getAllStatistics();
|
||||
|
||||
@ApiOperation("APP首页-街面警情统计")
|
||||
Map<String, Object> getJmjqStatistics();
|
||||
|
||||
@ApiOperation("APP首页-违法犯罪警情统计")
|
||||
Map<String, Object> getWffzStatistics();
|
||||
|
||||
@ApiOperation("APP首页-盗抢三车警情统计")
|
||||
Map<String, Object> getDqscStatistics();
|
||||
|
||||
@ApiOperation("APP警情分析-对比分析-分局警情走势图")
|
||||
Object jqtjDbFjjqzs(String type, String ssfjdm, String jqType);
|
||||
|
||||
@ApiOperation("APP警情分析-对比分析-城区分局警情环比")
|
||||
Object jqtjDbCqfjhb(String type, String jqType);
|
||||
|
||||
@ApiOperation("APP警情分析-对比分析-城区分局警情环比-列表")
|
||||
Object jqtjDbCqfjhbTable(String type, String ssfjdm, String jqType);
|
||||
|
||||
@ApiOperation("APP警情分析-对比分析-派出所总警情环比")
|
||||
Object jqtjDbPcsHb(String type, String ssfjdm, String jqType);
|
||||
|
||||
@ApiOperation("APP警情分析-对比分析-派出所总警情环比-表格")
|
||||
Object jqtjDbPcsHbTable(String type, String ssfjdm, String jqType);
|
||||
|
||||
@ApiOperation("APP警情分析-四高分析-第一个统计图")
|
||||
Object jqtjSgFirst(String type, String ssfjdm, String jqType, String sdlx);
|
||||
|
||||
@ApiOperation("APP首页-获取关联警情")
|
||||
List<TbJqVo> getGljq(String jjdbh);
|
||||
|
||||
@ApiOperation("添加新稚警情-处警单表到数据库中")
|
||||
Integer addXzJqCjdb(GxCjdb cjdb);
|
||||
|
||||
@ApiOperation("APP获取警情的处警数据")
|
||||
IPage<TbJqCjdb> getCjList(TbJqCjdbQuery dto);
|
||||
|
||||
@ApiOperation("添加仁寿警情信息")
|
||||
int addRsJq(TbJq entity);
|
||||
|
||||
@ApiOperation("获取最新的一条警情信息")
|
||||
TbJqVo getLastJq();
|
||||
|
||||
@ApiOperation("获取最新一条的处警的数据")
|
||||
TbJqCjdb getLastJqCjdb();
|
||||
|
||||
@ApiOperation("添加仁寿处警单数据")
|
||||
void addRsCjdb(TbJqCjdb cjdb);
|
||||
|
||||
@ApiOperation("转新稚警情接口(实发案)警情概况")
|
||||
JSONObject situation(String startTime, String endTime);
|
||||
|
||||
@ApiOperation("转新稚警情接口--警请态势")
|
||||
JSONObject alarmSituation(String startTime, String endTime);
|
||||
|
||||
@ApiOperation("添加泸州警情到数据库中")
|
||||
void addLzJq(VLz110Txj lz110);
|
||||
|
||||
@ApiOperation("添加宜宾警情到数据库中")
|
||||
void addYbJq(Jjdb jjdb);
|
||||
|
||||
@ApiOperation("泸州态势统计-警情与巡防工作对比分析")
|
||||
Map<String, Object> getJqAndXfTj(XftjQuery dto);
|
||||
|
||||
@ApiOperation("泸州态势统计-警情与盘查工作对比分析")
|
||||
Map<String, Object> getJqAndPcTj(XftjQuery dto);
|
||||
|
||||
@ApiOperation("APP添加一键报警")
|
||||
void addYjbj(TbJqYjbjDto dto);
|
||||
|
||||
@ApiOperation("修改警情处置状态")
|
||||
void updateJqCzzt(String id, String czzt);
|
||||
|
||||
@ApiOperation("查询没得经纬度的接警单编号")
|
||||
List<String> selectJjdbh();
|
||||
|
||||
@ApiOperation("修改警情经纬度")
|
||||
void updateJqJwd(Jjdb jjdb);
|
||||
|
||||
@ApiOperation("同步接警单号到reids")
|
||||
void tbJjdhToRedis();
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package com.mosty.sjzx.service;
|
||||
|
||||
import com.mosty.base.model.entity.sjzx.TbSjCyjl;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TbSjCyjlService {
|
||||
|
||||
@ApiOperation("查询所有数据")
|
||||
List<TbSjCyjl> queryAll();
|
||||
|
||||
@ApiOperation("通过ID查询单条数据")
|
||||
TbSjCyjl queryById(String id);
|
||||
|
||||
@ApiOperation("参与警力统计")
|
||||
Object joinCopCount(TbSjCyjl tbSjCyjl);
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
package com.mosty.sjzx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.sjzx.TbSjRzDto;
|
||||
import com.mosty.base.model.dto.sjzx.TbSjRzInsertDto;
|
||||
import com.mosty.base.model.entity.sjzx.TbSjRz;
|
||||
import com.mosty.base.model.query.jcgl.TbSjRzQuery;
|
||||
|
||||
public interface TbSjRzService {
|
||||
|
||||
// 新增时间日志记录
|
||||
void saveRz(TbSjRzInsertDto dto);
|
||||
|
||||
// 查询事件日志列表
|
||||
IPage<TbSjRzDto> getPageList(TbSjRzQuery dto);
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.mosty.sjzx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.sjzx.TbSjDto;
|
||||
import com.mosty.base.model.dto.sjzx.TbSjQcszDto;
|
||||
import com.mosty.base.model.dto.sjzx.TbSjRzDto;
|
||||
import com.mosty.base.model.dto.sjzx.TbSjUpdateJwdDto;
|
||||
import com.mosty.base.model.entity.sjzx.TbSj;
|
||||
import com.mosty.base.model.query.sjzx.SearchDto;
|
||||
import com.mosty.base.model.query.sjzx.TbSjQuery;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @author zhangHaiJun
|
||||
* @since 2022-07-14 11:42:31
|
||||
*/
|
||||
public interface TbSjService {
|
||||
|
||||
@ApiOperation("大屏-地图-全局搜索")
|
||||
Object queryAll(SearchDto dto);
|
||||
|
||||
@ApiOperation("通过ID查询单条数据")
|
||||
TbSjDto queryById(String id);
|
||||
|
||||
@ApiOperation("新增数据")
|
||||
TbSjDto insert(TbSj tbSj);
|
||||
|
||||
@ApiOperation("大屏-地图-圈层设置")
|
||||
void editQc(TbSjQcszDto tbSj);
|
||||
|
||||
@ApiOperation("通过主键删除数据")
|
||||
boolean deleteById(String id);
|
||||
|
||||
@ApiOperation("大屏-地图-完成处置")
|
||||
Boolean finishDispose(TbSj tbSj);
|
||||
|
||||
@ApiOperation("大屏-地图-修改定位")
|
||||
void updateJwd(TbSjUpdateJwdDto dto);
|
||||
|
||||
@ApiOperation("事件-记录日志")
|
||||
void addSjRz(TbSjRzDto dto);
|
||||
|
||||
@ApiOperation("每天计算必巡点的数据")
|
||||
Object bxdCreate();
|
||||
|
||||
@ApiOperation("分页查询事件信息")
|
||||
IPage<TbSjDto> getPageList(TbSjQuery dto);
|
||||
}
|
||||
|
@ -0,0 +1,27 @@
|
||||
package com.mosty.sjzx.service;
|
||||
|
||||
import com.mosty.base.model.dto.sjzx.TbSjSpbfDTO;
|
||||
import com.mosty.base.model.entity.sjzx.TbSjSpbf;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TbSjSpbfService {
|
||||
|
||||
@ApiOperation("查询所有数据")
|
||||
List<TbSjSpbf> queryAll();
|
||||
|
||||
@ApiOperation("通过ID查询单条数据")
|
||||
TbSjSpbf queryById(String id);
|
||||
|
||||
@ApiOperation("新增数据")
|
||||
TbSjSpbfDTO insert(TbSjSpbfDTO dto);
|
||||
|
||||
@ApiOperation("修改数据")
|
||||
TbSjSpbf update(TbSjSpbf tbSjSpbf);
|
||||
|
||||
@ApiOperation("通过主键删除数据")
|
||||
boolean deleteById(String id);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,42 @@
|
||||
package com.mosty.sjzx.service.impl;
|
||||
|
||||
import com.mosty.base.model.dto.sjzx.BxdCreatedDto;
|
||||
import com.mosty.base.model.dto.sjzx.NeighborDTO;
|
||||
import com.mosty.base.utils.PositionUtil;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class DistanceRunnable implements Runnable {
|
||||
|
||||
private BxdCreatedDto point;
|
||||
private List<BxdCreatedDto> points;
|
||||
private List<NeighborDTO> neighborList;
|
||||
private long scope;
|
||||
|
||||
public DistanceRunnable(BxdCreatedDto point, List<BxdCreatedDto> points, List<NeighborDTO> neighborList, long scope) {
|
||||
super();
|
||||
this.point = point;
|
||||
this.points = points;
|
||||
this.neighborList = neighborList;
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Map<BxdCreatedDto, Long> map = new HashMap<>();
|
||||
for (BxdCreatedDto point2 : points) {
|
||||
if (point.equals(point2)) {
|
||||
continue;
|
||||
}
|
||||
long distance = PositionUtil.getDistance(point.getWd().doubleValue(), point.getJd().doubleValue(),
|
||||
point2.getWd().doubleValue(), point2.getJd().doubleValue());
|
||||
if (distance < scope) {
|
||||
map.put(point2, distance);
|
||||
}
|
||||
}
|
||||
neighborList.add(new NeighborDTO(point, map));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,427 @@
|
||||
package com.mosty.sjzx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mosty.base.model.query.sjzx.*;
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import com.mosty.common.util.PermissionsUtil;
|
||||
import com.mosty.sjzx.mapper.SgfxMapper;
|
||||
import com.mosty.sjzx.service.SgfxService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class SgfxServiceImpl implements SgfxService {
|
||||
|
||||
private final SgfxMapper sgfxMapper;
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> jmjq(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.jmjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> wffzjq(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.wffzjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> zjq(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.zjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> yjmjq(YszxNyQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.yjmjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> yzwffzjq(YszxNyQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.yzwffzjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> yzjq(YszxNyQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.yzjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> zjmjq(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.zjmjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> zwffzjq(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.zwffzjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> zzjq(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.zzjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> gfsdfxJmjq(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.gfsdfxJmjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> gfsdfxWffzjq(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.gfsdfxWffzjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> gfsdfxZjq(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.gfsdfxZjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> gfsdfxYjmjq(YszxNyQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.gfsdfxYjmjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> ywffzjq(YszxNyQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.ywffzjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> gfsdfxYzjq(YszxNyQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.gfsdfxYzjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> gfsdfxZjmjq(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.gfsdfxZjmjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> gfsdfxZwffzjq(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.gfsdfxZwffzjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> gfsdfxZzjq(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.gfsdfxZzjq(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> aylx(String code) {
|
||||
return this.sgfxMapper.aylx(code);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> zzjg() {
|
||||
return this.sgfxMapper.zzjg();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> zdgzJqtj(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.zdgzJqtj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> rtj(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.rtj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> ytj(YszxNyQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.ytj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> ztj(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.ztj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> scryyj(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.scryyj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> yscryyj(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.yscryyj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> zscryyj(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.zscryyj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> pcsfafxRtj(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.pcsfafxRtj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> pcsfafxytj(YszxNyQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.pcsfafxytj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> pcsfafxztj(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.pcsfafxztj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> ztsjtj(YszxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.ztsjtj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> yztsjtj(YszxNyQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.yztsjtj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> jrjqczfx(XftjQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.jrjqczfx(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> jrjqslzs(XftjQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.jrjqslzs(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> jrjqyj(XftjQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.jrjqyj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> jqlxtj(XftjQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.jqlxtj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<Map<String, Object>> jqlb(XftjJqlbQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
UserInfo user = UserInfoManager.get();
|
||||
map.put("pageIndex", (dto.getPageCurrent() - 1) * dto.getPageSize());
|
||||
map.put("pageSize", dto.getPageSize());
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
|
||||
map.put("dto", dto);
|
||||
int count = this.sgfxMapper.jqlbCount(map);
|
||||
List<Map<String, Object>> list = this.sgfxMapper.jqlb(map);
|
||||
IPage<Map<String, Object>> page = new Page<>(dto.getPageCurrent(), dto.getPageSize());
|
||||
page.setTotal(count);
|
||||
page.setRecords(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> sblxtj(XftjQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
UserInfo user = UserInfoManager.get();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.sblxtj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<Map<String, Object>> sblb(XftjJqlbQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
UserInfo user = UserInfoManager.get();
|
||||
map.put("pageIndex", (dto.getPageCurrent() - 1) * dto.getPageSize());
|
||||
map.put("pageSize", dto.getPageSize());
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
|
||||
map.put("dto", dto);
|
||||
int count = this.sgfxMapper.sblbCount(map);
|
||||
List<Map<String, Object>> list = this.sgfxMapper.sblb(map);
|
||||
IPage<Map<String, Object>> page = new Page<>(dto.getPageCurrent(), dto.getPageSize());
|
||||
page.setTotal(count);
|
||||
page.setRecords(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> jwzbmlbtj(XftjJwzQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
UserInfo user = UserInfoManager.get();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.jwzbmlbtj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> bmtjjwz(XftjJwzQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
UserInfo user = UserInfoManager.get();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.bmtjjwz(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> clbmtj(XftjXfllQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
UserInfo user = UserInfoManager.get();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.clbmtj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> fjbmtj(XftjXfllQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
UserInfo user = UserInfoManager.get();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.fjbmtj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> mjbmtj(XftjXfllQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
UserInfo user = UserInfoManager.get();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.mjbmtj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> zttjz(XftjXfllQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
UserInfo user = UserInfoManager.get();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.zttjz(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> lbtj(XftjYdzbQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
UserInfo user = UserInfoManager.get();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.lbtj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> bmtj(XftjYdzbQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
UserInfo user = UserInfoManager.get();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.bmtj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> gzybmlbtj(XftjJqlbQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
UserInfo user = UserInfoManager.get();
|
||||
map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
|
||||
map.put("dto", dto);
|
||||
return this.sgfxMapper.gzybmlbtj(map);
|
||||
}
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
package com.mosty.sjzx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mosty.base.model.dto.qwzx.TbQwBmjlbbCountDto;
|
||||
import com.mosty.base.model.entity.jcgl.TbJcglBxd;
|
||||
import com.mosty.base.model.entity.sjzx.TbCaseType;
|
||||
import com.mosty.sjzx.mapper.TbCaseTypeMapper;
|
||||
import com.mosty.sjzx.service.TbCaseTypeService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TbCaseTypeServiceImpl extends ServiceImpl<TbCaseTypeMapper, TbCaseType> implements TbCaseTypeService {
|
||||
|
||||
private TbCaseTypeMapper tbCaseTypeMapper;
|
||||
|
||||
@Override
|
||||
public String queryCaseByCode(String code) {
|
||||
List<TbCaseType> list = getCaseList(code);
|
||||
if(CollectionUtils.isEmpty(list)) {
|
||||
return "";
|
||||
}
|
||||
String oneCode = code.substring(0, 2) + "000000";
|
||||
String twoCode = code.substring(0, 4) + "0000";
|
||||
String threeCode = code.substring(0, 6) + "00";
|
||||
String oneCase = getCase(list, oneCode);
|
||||
String twoCase = getCase(list, twoCode);
|
||||
String threeCase = getCase(list, threeCode);
|
||||
String caseStr = "";
|
||||
if(StringUtils.isNotBlank(oneCase)) {
|
||||
caseStr = caseStr + oneCase + "-";
|
||||
}
|
||||
if(StringUtils.isNotBlank(twoCase)) {
|
||||
caseStr = caseStr + twoCase + "-";
|
||||
}
|
||||
if(StringUtils.isNotBlank(threeCase)) {
|
||||
caseStr = caseStr + threeCase + "-";
|
||||
}
|
||||
if(StringUtils.isNotBlank(caseStr) && !twoCase.equals(threeCase)) {
|
||||
caseStr = caseStr.substring(0, caseStr.length() - 1);
|
||||
}
|
||||
return caseStr;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TbCaseType queryCase(String code) {
|
||||
QueryWrapper<TbCaseType> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(TbCaseType::getCode, code);
|
||||
return tbCaseTypeMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取案由
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public List<TbCaseType> getCaseList(String code) {
|
||||
if(StringUtils.isNotBlank(code)) {
|
||||
String firstCode = code.substring(0, 2);
|
||||
QueryWrapper<TbCaseType> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().likeRight(TbCaseType::getCode, firstCode);
|
||||
return tbCaseTypeMapper.selectList(queryWrapper);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取案由
|
||||
* @param list
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public String getCase(List<TbCaseType> list, String code) {
|
||||
TbCaseType caseType = list.stream().filter(item -> item.getCode().equals(code)).findFirst().orElse(null);
|
||||
if(caseType != null) {
|
||||
return caseType.getName();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,41 @@
|
||||
package com.mosty.sjzx.service.impl;
|
||||
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import com.mosty.base.model.entity.sjzx.TbSjCyjl;
|
||||
import com.mosty.common.util.PermissionsUtil;
|
||||
import com.mosty.sjzx.mapper.TbSjCyjlMapper;
|
||||
import com.mosty.sjzx.service.TbSjCyjlService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 事件-参与警力表(TbSjCyjl)表服务实现类
|
||||
*
|
||||
* @author zhangHaiJun
|
||||
* @since 2022-07-13 09:11:18
|
||||
*/
|
||||
@Service("tbSjCyjlService")
|
||||
public class TbSjCyjlServiceImpl implements TbSjCyjlService {
|
||||
@Resource
|
||||
private TbSjCyjlMapper tbSjCyjlMapper;
|
||||
|
||||
@Override
|
||||
public List<TbSjCyjl> queryAll() {
|
||||
UserInfo user = UserInfoManager.get();
|
||||
return this.tbSjCyjlMapper.queryAll(PermissionsUtil.createSql("", user));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TbSjCyjl queryById(String id) {
|
||||
return this.tbSjCyjlMapper.queryById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object joinCopCount(TbSjCyjl tbSjCyjl) {
|
||||
return tbSjCyjlMapper.joinCopCount(tbSjCyjl);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,83 @@
|
||||
package com.mosty.sjzx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mosty.base.model.dto.sjzx.TbSjRzDto;
|
||||
import com.mosty.base.model.dto.sjzx.TbSjRzInsertDto;
|
||||
import com.mosty.base.model.entity.sjzx.TbSj;
|
||||
import com.mosty.base.model.entity.sjzx.TbSjRz;
|
||||
import com.mosty.base.model.query.jcgl.TbSjRzQuery;
|
||||
import com.mosty.base.utils.DateUtils;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import com.mosty.sjzx.mapper.TbSjRzMapper;
|
||||
import com.mosty.sjzx.service.TbSjRzService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TbSjRzServiceImpl extends ServiceImpl<TbSjRzMapper, TbSjRz>
|
||||
implements TbSjRzService {
|
||||
|
||||
@Override
|
||||
public void saveRz(TbSjRzInsertDto dto) {
|
||||
UserInfo user = UserInfoManager.get();
|
||||
TbSjRz rz = new TbSjRz();
|
||||
BeanUtils.copyProperties(dto, rz);
|
||||
Date time = new Date();
|
||||
rz.setCzsj(time);
|
||||
rz.setRzms(user.getDeptName() + "(" + user.getUserName() + ")于" +
|
||||
DateUtils.getQueryDateString(time, "02") + dto.getRzms());
|
||||
rz.setCzryId(String.valueOf(user.getUserId()));
|
||||
rz.setCzrySfzh(user.getIdEntityCard());
|
||||
rz.setCzryXm(user.getUserName());
|
||||
rz.setXtSjly("1");
|
||||
rz.setSsbm(user.getDeptName());
|
||||
rz.setSsbmid(String.valueOf(user.getDeptId()));
|
||||
rz.setSsbmdm(user.getDeptCode());
|
||||
rz.setSsxgaj(user.getFxjDeptName());
|
||||
rz.setSsxgajid(String.valueOf(user.getFxjDeptId()));
|
||||
rz.setSsxgajdm(user.getFxjDeptCode());
|
||||
rz.setSssgaj(user.getDszDeptName());
|
||||
rz.setSssgajid(String.valueOf(user.getDszDeptId()));
|
||||
rz.setSssgajdm(user.getDszDeptCode());
|
||||
this.baseMapper.insert(rz);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<TbSjRzDto> getPageList(TbSjRzQuery dto) {
|
||||
if (StringUtils.isBlank(dto.getSjId()))
|
||||
throw new BusinessException("sjId不能为空!");
|
||||
IPage<TbSjRz> page = this.baseMapper.selectPage(
|
||||
new Page<>(dto.getPageCurrent(), dto.getPageSize()),
|
||||
new LambdaQueryWrapper<TbSjRz>()
|
||||
.eq(TbSjRz::getSjId, dto.getSjId())
|
||||
.like(StringUtils.isNotBlank(dto.getRzms()), TbSjRz::getRzms, dto.getRzms())
|
||||
.orderByDesc(TbSjRz::getCzsj)
|
||||
);
|
||||
IPage<TbSjRzDto> resPage = new Page<>(dto.getPageCurrent(), dto.getPageSize());
|
||||
List<TbSjRzDto> resList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(page.getRecords())) {
|
||||
page.getRecords().forEach(item -> {
|
||||
TbSjRzDto res = new TbSjRzDto();
|
||||
BeanUtils.copyProperties(item, res);
|
||||
resList.add(res);
|
||||
});
|
||||
}
|
||||
resPage.setTotal(page.getTotal());
|
||||
resPage.setRecords(resList);
|
||||
return resPage;
|
||||
}
|
||||
}
|
@ -0,0 +1,708 @@
|
||||
package com.mosty.sjzx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mosty.base.model.dto.jcgl.TbJcglPzfzDto;
|
||||
import com.mosty.base.model.dto.sjzx.*;
|
||||
import com.mosty.base.model.entity.jcgl.TbJcglKhbm;
|
||||
import com.mosty.base.model.entity.jcgl.TbJcglPzfz;
|
||||
import com.mosty.base.model.entity.qwzx.TbQwXfBxfsq;
|
||||
import com.mosty.base.model.query.sjzx.TbSjQuery;
|
||||
import com.mosty.base.model.vo.base.DeptInfoVo;
|
||||
import com.mosty.base.model.vo.jcgl.TbJcglKhbmVo;
|
||||
import com.mosty.base.utils.GeoHashKit;
|
||||
import com.mosty.base.utils.JtsUtils;
|
||||
import com.mosty.base.utils.UUIDGenerator;
|
||||
import com.mosty.base.model.query.yjzl.TbYjxxQuery;
|
||||
import com.mosty.base.model.query.yjzl.TbZlxxQuery;
|
||||
import com.mosty.base.model.vo.yszx.TbYsDlQuery;
|
||||
import com.mosty.base.model.vo.yszx.TbYsGajgQuery;
|
||||
import com.mosty.base.model.entity.sjzx.*;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import com.mosty.common.base.util.DateUtils;
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import com.mosty.base.model.query.sjzx.SearchDto;
|
||||
import com.mosty.base.model.query.sjzx.TbJqPageListQuery;
|
||||
import com.mosty.common.util.PermissionsUtil;
|
||||
import com.mosty.sjzx.mapper.*;
|
||||
import com.mosty.sjzx.remote.*;
|
||||
import com.mosty.sjzx.service.TbJqService;
|
||||
import com.mosty.sjzx.service.TbSjService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 事件表(TbSj)表服务实现类
|
||||
*
|
||||
* @author zhangHaiJun
|
||||
* @since 2022-07-14 11:42:31
|
||||
*/
|
||||
@Service("tbSjService")
|
||||
@AllArgsConstructor
|
||||
public class TbSjServiceImpl implements TbSjService {
|
||||
private TbSjMapper tbSjMapper;
|
||||
private TbYszxAdapRemoteService tbYszxAdapRemoteService;
|
||||
private TbBaseAdaptRemoteService tbBaseAdaptRemoteService;
|
||||
private TbYjzlAdaptRrmoteService tbYjzlAdaptRrmoteService;
|
||||
private TbJcglAdaptRemoteService tbJcglAdaptRemoteService;
|
||||
private TbSjSpbfMapper tbSjSpbfMapper;
|
||||
private TbRzSpbfAdaptRemoteService tbRzSpbfAdaptRemoteService;
|
||||
private TbJqMapper tbJqMapper;
|
||||
private TbJqService tbJqService;
|
||||
private TbSjDzMapper tbSjDzMapper;
|
||||
private TbSjRzMapper tbSjRzMapper;
|
||||
|
||||
@Override
|
||||
public Object bxdCreate() {
|
||||
String kssj = com.mosty.base.utils.DateUtils.getQueryDateString(com.mosty.base.utils.DateUtils.getNextDate(new Date(), "D", -30), "01");
|
||||
String jssj = com.mosty.base.utils.DateUtils.getQueryDateString(new Date(), "01");
|
||||
// 查询最近30天的所有的警情数据
|
||||
List<TbJq> jqList = this.tbJqMapper.selectList(
|
||||
new LambdaQueryWrapper<TbJq>()
|
||||
.ge(TbJq::getBjrq, kssj)
|
||||
.le(TbJq::getBjrq, jssj)
|
||||
.last(" and jd is not null and wd is not null and bjlb is not null")
|
||||
);
|
||||
List<BxdCreatedDto> list = jqList.stream().map(item -> {
|
||||
BxdCreatedDto dto = new BxdCreatedDto();
|
||||
dto.setJd(item.getJd());
|
||||
dto.setWd(item.getWd());
|
||||
dto.setSsbmdm(item.getSsbmdm());
|
||||
if ("01000000".equals(item.getBjlb())) {
|
||||
dto.setPzlx("01");
|
||||
} else if ("02000000".equals(item.getBjlb())) {
|
||||
dto.setPzlx("02");
|
||||
} else {
|
||||
dto.setPzlx("03");
|
||||
}
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
// 查询最近30天的所有的预警数据
|
||||
List<Map<String, Object>> yjList = this.tbJqMapper.getYjxx30Day(kssj, jssj);
|
||||
list.addAll(yjList.stream().map(item -> {
|
||||
BxdCreatedDto dto = new BxdCreatedDto();
|
||||
dto.setJd(new BigDecimal(String.valueOf(item.get("jd"))));
|
||||
dto.setWd(new BigDecimal(String.valueOf(item.get("wd"))));
|
||||
String yjlx = String.valueOf(item.get("yj_lx"));
|
||||
if ("1".equals(yjlx)) {
|
||||
dto.setPzlx("04");
|
||||
} else if ("2".equals(yjlx)) {
|
||||
dto.setPzlx("05");
|
||||
} else if ("3".equals(yjlx)) {
|
||||
dto.setPzlx("06");
|
||||
}
|
||||
return dto;
|
||||
}).collect(Collectors.toList()));
|
||||
// 查询最近30天的所有的盘查人员数据
|
||||
List<Map<String, Object>> ryList = this.tbJqMapper.getPcryList(kssj, jssj);
|
||||
list.addAll(ryList.stream().map(item -> {
|
||||
BxdCreatedDto dto = new BxdCreatedDto();
|
||||
dto.setJd(new BigDecimal(String.valueOf(item.get("jd"))));
|
||||
dto.setWd(new BigDecimal(String.valueOf(item.get("wd"))));
|
||||
dto.setSsbmdm(String.valueOf(item.get("ssbmdm")));
|
||||
dto.setPzlx("07");
|
||||
return dto;
|
||||
}).collect(Collectors.toList()));
|
||||
// 查询最近30天的所有的盘查车辆数据
|
||||
List<Map<String, Object>> clList = this.tbJqMapper.getPcclList(kssj, jssj);
|
||||
list.addAll(clList.stream().map(item -> {
|
||||
BxdCreatedDto dto = new BxdCreatedDto();
|
||||
dto.setJd(new BigDecimal(String.valueOf(item.get("jd"))));
|
||||
dto.setWd(new BigDecimal(String.valueOf(item.get("wd"))));
|
||||
dto.setPzlx("08");
|
||||
dto.setSsbmdm(String.valueOf(item.get("ssbmdm")));
|
||||
return dto;
|
||||
}).collect(Collectors.toList()));
|
||||
return this.filterJwd(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<TbSjDto> getPageList(TbSjQuery dto) {
|
||||
// UserInfo user = UserInfoManager.get();
|
||||
// PermissionsUtil.queryWrapperUtil(qw, user);
|
||||
|
||||
QueryWrapper<TbSj> qw = new QueryWrapper<>();
|
||||
dto.setSsbmdm(this.tbBaseAdaptRemoteService.getSsbm(dto.getSsbmdm(), null));
|
||||
|
||||
IPage<TbSj> page = this.tbSjMapper.selectPage(
|
||||
new Page<>(dto.getPageCurrent(), dto.getPageSize()),
|
||||
qw.lambda()
|
||||
.eq(!StringUtils.isEmpty(dto.getSjFl()), TbSj::getSjFl, dto.getSjFl())
|
||||
.likeRight(!StringUtils.isEmpty(dto.getSsbmdm()), TbSj::getSsbmdm, dto.getSsbmdm())
|
||||
);
|
||||
IPage<TbSjDto> resPage = new Page<>(dto.getPageCurrent(), dto.getPageSize());
|
||||
List<TbSjDto> resList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(page.getRecords())) {
|
||||
page.getRecords().forEach(item -> {
|
||||
TbSjDto vo = new TbSjDto();
|
||||
BeanUtils.copyProperties(item, vo);
|
||||
resList.add(vo);
|
||||
});
|
||||
}
|
||||
resPage.setRecords(resList);
|
||||
resPage.setTotal(page.getTotal());
|
||||
return resPage;
|
||||
}
|
||||
|
||||
// 计算必巡点
|
||||
private Object filterJwd(List<BxdCreatedDto> points) {
|
||||
ScheduledExecutorService threadPool = Executors.newScheduledThreadPool(100);
|
||||
List<NeighborDTO> neighborList = Collections.synchronizedList(new ArrayList<>(30000));
|
||||
// 计算每个点一定范围内所有点坐标
|
||||
for (BxdCreatedDto point : points) {
|
||||
// 范围,从系统配置中获取,没有的话直接范围为500
|
||||
String fw = this.tbBaseAdaptRemoteService.getValue("BXDFW");
|
||||
int bxdfw = StringUtils.isNotBlank(fw) ? Integer.parseInt(fw) : 500;
|
||||
threadPool.execute(new DistanceRunnable(point, points, neighborList, bxdfw));
|
||||
}
|
||||
// 等待线程池执行完毕
|
||||
while (neighborList.size() != points.size()) {
|
||||
System.out.println(neighborList.size());
|
||||
}
|
||||
threadPool.shutdown();
|
||||
// 排序
|
||||
Collections.sort(neighborList);
|
||||
// 筛选(附近点位低于20个不进入计算)
|
||||
Map<BxdCreatedDto, Long> map = new HashMap<>();
|
||||
Iterator<NeighborDTO> it = neighborList.iterator();
|
||||
// 计算必巡点点位 默认20个点位开始计算
|
||||
String dw = this.tbBaseAdaptRemoteService.getValue("BXDDW");
|
||||
int bxddw = StringUtils.isNotBlank(dw) ? Integer.parseInt(dw) : 500;
|
||||
while (it.hasNext()) {
|
||||
NeighborDTO neighborDTO = it.next();
|
||||
Map<BxdCreatedDto, Long> neighbors = neighborDTO.getNeighbors();
|
||||
if (map.containsKey(neighborDTO.getPoint()) || neighbors.size() <= bxddw) {
|
||||
it.remove();
|
||||
}
|
||||
map.putAll(neighbors);
|
||||
}
|
||||
// 业务操作
|
||||
List<Map<String, Object>> rList = new ArrayList<>();
|
||||
// 查询重点区域的分值配置
|
||||
List<TbJcglPzfzDto> fzList = this.tbJcglAdaptRemoteService.getFzList();
|
||||
for (NeighborDTO item : neighborList) {
|
||||
BxdCreatedDto point = item.getPoint();
|
||||
Map<BxdCreatedDto, Long> neighbors = item.getNeighbors();
|
||||
int size = neighbors.size() + 1;
|
||||
int score = 0;
|
||||
int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0;
|
||||
for (BxdCreatedDto i : neighbors.keySet()) {
|
||||
score += this.getFz(fzList, i.getPzlx());
|
||||
switch (i.getPzlx()) {
|
||||
case "01":
|
||||
a++;
|
||||
break;
|
||||
case "02":
|
||||
b++;
|
||||
break;
|
||||
case "03":
|
||||
c++;
|
||||
break;
|
||||
case "04":
|
||||
d++;
|
||||
break;
|
||||
case "05":
|
||||
e++;
|
||||
break;
|
||||
case "06":
|
||||
f++;
|
||||
break;
|
||||
case "07":
|
||||
g++;
|
||||
break;
|
||||
case "08":
|
||||
h++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// // 获取分值阈值,超过阈值生成必巡点
|
||||
String yz = this.tbBaseAdaptRemoteService.getValue("BXDFZYZ");
|
||||
int fzyz = StringUtils.isNotBlank(yz) ? Integer.parseInt(yz) : 100;
|
||||
if (score >= fzyz) {
|
||||
String bz = String.format("刑事警情:%s个,行政警情:%s个 其他警情:%s个 人员预警:%s个 " +
|
||||
"车辆预警:%s个 事件预警:%s个 盘查重点人员:%s个 盘查重点车辆:%s个", a, b, c, d, e, f, g, h);
|
||||
System.err.println(bz);
|
||||
System.err.println("point: " + point.getJd() + ", " + point.getWd() + " n: " + size + " s:" + score);
|
||||
|
||||
Map<String, Object> mp = new HashMap<>();
|
||||
mp.put("jd", point.getJd());
|
||||
mp.put("wd", point.getWd());
|
||||
mp.put("score", size + 1);
|
||||
mp.put("bz", bz);
|
||||
mp.put("ssbmdm", item.getPoint().getSsbmdm());
|
||||
rList.add(mp);
|
||||
}
|
||||
}
|
||||
this.tbJcglAdaptRemoteService.createdBxd(rList);
|
||||
return rList;
|
||||
}
|
||||
|
||||
// 获取系统配置的分值
|
||||
private int getFz(List<TbJcglPzfzDto> fzList, String pzlx) {
|
||||
int score = -1;
|
||||
List<TbJcglPzfzDto> tempList = fzList.stream().filter(item -> pzlx.equals(item.getPzlx())).collect(Collectors.toList());
|
||||
if (tempList.size() > 0) {
|
||||
TbJcglPzfzDto dto = tempList.get(0);
|
||||
score = dto.getPzfz();
|
||||
}
|
||||
if (score == -1) {
|
||||
switch (pzlx) {
|
||||
case "01":
|
||||
case "02":
|
||||
case "04":
|
||||
case "05":
|
||||
case "07":
|
||||
case "08":
|
||||
score = 2;
|
||||
break;
|
||||
case "03":
|
||||
case "06":
|
||||
score = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return score;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object queryAll(SearchDto dto) {
|
||||
// UserInfo user = UserInfoManager.get();
|
||||
dto.setSsbmdm(this.tbBaseAdaptRemoteService.getSsbm(dto.getSsbmdm(), null));
|
||||
// 警情
|
||||
if ("01".equals(dto.getType())) {
|
||||
TbJqPageListQuery query = new TbJqPageListQuery();
|
||||
query.setPageNum(dto.getPageNum());
|
||||
query.setPageSize(dto.getPageSize());
|
||||
query.setBjnr(dto.getKeyword());
|
||||
return this.tbJqService.selectPageList(query);
|
||||
} else if ("02".equals(dto.getType())) {
|
||||
// 预警
|
||||
TbYjxxQuery query = new TbYjxxQuery();
|
||||
query.setPageNum(dto.getPageNum());
|
||||
query.setPageSize(dto.getPageSize());
|
||||
query.setYjNr(dto.getKeyword());
|
||||
return tbYjzlAdaptRrmoteService.getPageList(query);
|
||||
} else if ("03".equals(dto.getType())) {
|
||||
//指令
|
||||
TbZlxxQuery query = new TbZlxxQuery();
|
||||
query.setPageNum(dto.getPageNum());
|
||||
query.setPageSize(dto.getPageSize());
|
||||
query.setZlnr(dto.getKeyword());
|
||||
return tbYjzlAdaptRrmoteService.selectInstructList(query);
|
||||
} else if ("04".equals(dto.getType())) {
|
||||
// 事件
|
||||
QueryWrapper<TbSj> qw = new QueryWrapper<>();
|
||||
// PermissionsUtil.queryWrapperUtil(qw, user);
|
||||
|
||||
return this.tbSjMapper.selectPage(
|
||||
new Page<>(dto.getPageNum(), dto.getPageSize()),
|
||||
qw.lambda().eq(TbSj::getXtSjzt, "1")
|
||||
.like(TbSj::getSjNr, dto.getKeyword())
|
||||
.likeRight(StringUtils.isNotBlank(dto.getSsbmdm()), TbSj::getSsbmdm, dto.getSsbmdm())
|
||||
|
||||
);
|
||||
} else if ("05".equals(dto.getType())) {
|
||||
// 地理要素
|
||||
TbYsDlQuery query = new TbYsDlQuery();
|
||||
query.setPageNum(dto.getPageNum());
|
||||
query.setPageSize(dto.getPageSize());
|
||||
query.setJsnr(dto.getKeyword());
|
||||
return tbYszxAdapRemoteService.queryAll(query);
|
||||
} else if ("06".equals(dto.getType())) {
|
||||
// 公安机关
|
||||
TbYsGajgQuery query = new TbYsGajgQuery();
|
||||
query.setPageNum(dto.getPageNum());
|
||||
query.setPageSize(dto.getPageSize());
|
||||
query.setJsnr(dto.getKeyword());
|
||||
return tbYszxAdapRemoteService.getGajgAll(query);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TbSjDto queryById(String id) {
|
||||
TbSj sj = this.tbSjMapper.selectById(id);
|
||||
TbSjDto dto = new TbSjDto();
|
||||
BeanUtils.copyProperties(sj, dto);
|
||||
return dto;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public TbSjDto insert(TbSj tbSj) {
|
||||
TbSjDto dto = new TbSjDto();
|
||||
UserInfo user = UserInfoManager.get();
|
||||
// 查询来源id是否存在
|
||||
TbSj sj = this.tbSjMapper.selectOne(
|
||||
new QueryWrapper<TbSj>()
|
||||
.eq("yw_id", tbSj.getYwId())
|
||||
.eq("xt_sjzt", "1")
|
||||
.eq("sj_fl", tbSj.getSjFl()));
|
||||
if (null != sj) {
|
||||
BeanUtils.copyProperties(sj, dto);
|
||||
// 保存事件日志
|
||||
this.insertSjRz(sj, user);
|
||||
return dto;
|
||||
} else {
|
||||
if (!StringUtils.isBlank(tbSj.getYwId()) && !StringUtils.isBlank(tbSj.getSjFl())) {
|
||||
switch (tbSj.getSjFl()) {
|
||||
case "01":
|
||||
break;
|
||||
case "02":
|
||||
// 警情转事件
|
||||
this.jqTurnSj(tbSj, user);
|
||||
break;
|
||||
case "03":
|
||||
break;
|
||||
case "04":
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// 手动添加事件
|
||||
this.insertSj(tbSj, user);
|
||||
}
|
||||
}
|
||||
BeanUtils.copyProperties(tbSj, dto);
|
||||
return dto;
|
||||
}
|
||||
|
||||
// 手动添加事件
|
||||
private void insertSj(TbSj tbSj, UserInfo user) {
|
||||
tbSj.setQcHx(tbSj.getQcHx() != null && tbSj.getQcHx() != 0 ? tbSj.getQcHx() : 50);
|
||||
tbSj.setQcJj(tbSj.getQcJj() != null && tbSj.getQcJj() != 0 ? tbSj.getQcJj() : 150);
|
||||
tbSj.setQcGz(tbSj.getQcGz() != null && tbSj.getQcGz() != 0 ? tbSj.getQcGz() : 300);
|
||||
tbSj.setId(UUIDGenerator.getUUID());
|
||||
tbSj.setCzkssj(new Date());
|
||||
tbSj.setQcGxcs(0);
|
||||
tbSj.setSjFssj(new Date());
|
||||
tbSj.setQcGxsj(new Date());
|
||||
if (tbSj.getCsjd() != null && tbSj.getCswd() != null) {
|
||||
tbSj.setCszb(JtsUtils.getPoint(tbSj.getCsjd(), tbSj.getCswd()));
|
||||
tbSj.setCszbhash(GeoHashKit.encode(tbSj.getCsjd(), tbSj.getCswd()));
|
||||
tbSj.setDqjd(tbSj.getCsjd());
|
||||
tbSj.setDqwd(tbSj.getCswd());
|
||||
tbSj.setDqzb(JtsUtils.getPoint(tbSj.getCsjd(), tbSj.getCswd()));
|
||||
tbSj.setDqzbhash(GeoHashKit.encode(tbSj.getCsjd(), tbSj.getCswd()));
|
||||
}
|
||||
tbSj.setDqdz(tbSj.getCsdz());
|
||||
if (user != null) {
|
||||
tbSj.setSsbm(user.getDeptName());
|
||||
tbSj.setSsbmid(String.valueOf(user.getDeptId()));
|
||||
tbSj.setSsbmdm(user.getDeptCode());
|
||||
tbSj.setSsxgaj(user.getFxjDeptName());
|
||||
tbSj.setSsxgajid(String.valueOf(user.getFxjDeptId()));
|
||||
tbSj.setSsxgajdm(user.getFxjDeptCode());
|
||||
tbSj.setSssgaj(user.getDszDeptName());
|
||||
tbSj.setSssgajid(String.valueOf(user.getDszDeptId()));
|
||||
tbSj.setSssgajdm(user.getDszDeptCode());
|
||||
}
|
||||
tbSj.setXtSjly("1");
|
||||
tbSj.setSjFl("99");
|
||||
tbSj.setDqdzxzqh(tbSj.getCsdzxzqh());
|
||||
this.tbSjMapper.insertEntity(tbSj);
|
||||
// 添加地址信息
|
||||
this.insertSjdz(tbSj, user);
|
||||
// 保存事件日志
|
||||
this.insertSjRz(tbSj, user);
|
||||
}
|
||||
|
||||
// 警情转事件
|
||||
private void jqTurnSj(TbSj tbSj, UserInfo user) {
|
||||
TbJq tbjq = this.tbJqMapper.selectById(tbSj.getYwId());
|
||||
if (null != tbjq) {
|
||||
tbSj.setSjJb(tbjq.getJqjb());
|
||||
tbSj.setSjFssj(tbjq.getBjsj());
|
||||
tbSj.setSjNr(tbjq.getBjnr());
|
||||
tbSj.setCsjd(tbjq.getJd());
|
||||
tbSj.setSjBt("重大警情事件");
|
||||
tbSj.setBjrxm(tbjq.getBjrXm());
|
||||
tbSj.setBjrlxdh(tbjq.getBjdh());
|
||||
tbSj.setCswd(tbjq.getWd());
|
||||
tbSj.setDqjd(tbjq.getJd());
|
||||
tbSj.setDqwd(tbjq.getWd());
|
||||
tbSj.setCsdz(tbjq.getSfdz());
|
||||
if (tbjq.getJd() != null && tbjq.getWd() != null) {
|
||||
tbSj.setCszb(JtsUtils.getPoint(tbjq.getJd(), tbjq.getWd()));
|
||||
tbSj.setDqzb(JtsUtils.getPoint(tbjq.getJd(), tbjq.getWd()));
|
||||
tbSj.setCszbhash(GeoHashKit.encode(tbjq.getJd(), tbjq.getWd()));
|
||||
tbSj.setDqzbhash(GeoHashKit.encode(tbjq.getJd(), tbjq.getWd()));
|
||||
}
|
||||
tbSj.setCzkssj(new Date());
|
||||
DeptInfoVo dept = this.tbBaseAdaptRemoteService.getOrgByOrgcode(tbjq.getSsbmdm());
|
||||
tbSj.setSsbm(dept.getDeptname());
|
||||
tbSj.setSsbmid(dept.getDeptid());
|
||||
tbSj.setSsbmdm(dept.getDeptcode());
|
||||
tbSj.setSsxgajdm(dept.getFxjcode());
|
||||
tbSj.setSsxgajid(dept.getFxjid());
|
||||
tbSj.setSsxgaj(dept.getFxjname());
|
||||
tbSj.setSssgaj(dept.getDszname());
|
||||
tbSj.setSssgajdm(dept.getDszcode());
|
||||
tbSj.setSssgajid(dept.getDszid());
|
||||
}
|
||||
tbSj.setQcHx(tbSj.getQcHx() != null && tbSj.getQcHx() != 0 ? tbSj.getQcHx() : 50);
|
||||
tbSj.setQcJj(tbSj.getQcJj() != null && tbSj.getQcJj() != 0 ? tbSj.getQcJj() : 150);
|
||||
tbSj.setQcGz(tbSj.getQcGz() != null && tbSj.getQcGz() != 0 ? tbSj.getQcGz() : 300);
|
||||
tbSj.setId(UUIDGenerator.getUUID());
|
||||
tbSj.setCzkssj(new Date());
|
||||
tbSj.setQcGxcs(0);
|
||||
tbSj.setQcGxsj(new Date());
|
||||
if (tbSj.getCsjd() != null && tbSj.getCswd() != null) {
|
||||
tbSj.setCszb(JtsUtils.getPoint(tbSj.getCsjd(), tbSj.getCswd()));
|
||||
tbSj.setCszbhash(GeoHashKit.encode(tbSj.getCsjd(), tbSj.getCswd()));
|
||||
tbSj.setDqjd(tbSj.getCsjd());
|
||||
tbSj.setDqwd(tbSj.getCswd());
|
||||
tbSj.setDqzb(JtsUtils.getPoint(tbSj.getCsjd(), tbSj.getCswd()));
|
||||
tbSj.setDqzbhash(GeoHashKit.encode(tbSj.getCsjd(), tbSj.getCswd()));
|
||||
}
|
||||
tbSj.setDqdz(tbSj.getCsdz());
|
||||
tbSj.setXtSjly("1");
|
||||
tbSj.setDqdzxzqh(tbSj.getCsdzxzqh());
|
||||
this.tbSjMapper.insertEntity(tbSj);
|
||||
// 添加地址信息
|
||||
this.insertSjdz(tbSj, user);
|
||||
// 保存事件日志
|
||||
this.insertSjRz(tbSj, user);
|
||||
}
|
||||
|
||||
// 添加日志信息
|
||||
private void insertSjRz(TbSj tbSj, UserInfo user) {
|
||||
int count = this.tbSjRzMapper.selectCount(
|
||||
new LambdaQueryWrapper<TbSjRz>()
|
||||
.eq(TbSjRz::getSjId, tbSj.getId())
|
||||
.like(TbSjRz::getRzms, "进入事件处置")
|
||||
) + 1;
|
||||
TbSjRz rz = new TbSjRz();
|
||||
rz.setId(UUIDGenerator.getUUID());
|
||||
rz.setSjId(tbSj.getId());
|
||||
if (user != null) {
|
||||
rz.setRzms(DateUtils.getTime() + "," + user.getDeptName() +
|
||||
"(" + user.getUserName() + ")进入事件处置,准备开始处置事件,该事件第" + count + "次进入处置页面");
|
||||
rz.setCzryId(String.valueOf(user.getUserId()));
|
||||
rz.setCzryXm(user.getUserName());
|
||||
rz.setCzrySfzh(user.getIdEntityCard());
|
||||
rz.setSsbm(tbSj.getSsbm());
|
||||
rz.setSsbmdm(tbSj.getSsbmdm());
|
||||
rz.setSsxgaj(tbSj.getSsxgaj());
|
||||
rz.setSsxgajdm(tbSj.getSsxgajdm());
|
||||
rz.setSssgaj(tbSj.getSssgaj());
|
||||
rz.setSssgajdm(tbSj.getSssgajdm());
|
||||
rz.setSsbmid(tbSj.getSsbmid());
|
||||
rz.setSsxgajid(tbSj.getSsxgajid());
|
||||
rz.setSssgajid(tbSj.getSssgajid());
|
||||
} else {
|
||||
rz.setRzms(DateUtils.getTime() + "," + "进入事件处置,准备开始处置事件!!");
|
||||
}
|
||||
rz.setCzsj(new Date());
|
||||
rz.setXtSjly("1");
|
||||
this.tbSjRzMapper.insert(rz);
|
||||
}
|
||||
|
||||
// 添加地址信息
|
||||
private void insertSjdz(TbSj tbSj, UserInfo user) {
|
||||
TbSjDz dz = new TbSjDz();
|
||||
dz.setId(UUIDGenerator.getUUID());
|
||||
dz.setSjId(tbSj.getId());
|
||||
dz.setDztzSj(new Date());
|
||||
if (user != null) {
|
||||
dz.setDztzRyid(String.valueOf(user.getUserId()));
|
||||
dz.setDztzRysfzh(user.getIdEntityCard());
|
||||
dz.setDztzRyxm(user.getUserName());
|
||||
}
|
||||
if (tbSj.getCsjd() != null && tbSj.getCswd() != null) {
|
||||
dz.setJd(tbSj.getCsjd());
|
||||
dz.setWd(tbSj.getCswd());
|
||||
dz.setZb(JtsUtils.getPoint(tbSj.getCsjd(), tbSj.getCswd()));
|
||||
dz.setZbhash(GeoHashKit.encode(tbSj.getCsjd(), tbSj.getCswd()));
|
||||
dz.setDzxzqh(tbSj.getCsdzxzqh());
|
||||
dz.setDz(tbSj.getCsdz());
|
||||
}
|
||||
dz.setSsbm(tbSj.getSsbm());
|
||||
dz.setSsbmdm(tbSj.getSsbmdm());
|
||||
dz.setSsxgaj(tbSj.getSsxgaj());
|
||||
dz.setSsxgajdm(tbSj.getSsxgajdm());
|
||||
dz.setSssgaj(tbSj.getSssgaj());
|
||||
dz.setSssgajdm(tbSj.getSssgajdm());
|
||||
dz.setSsbmid(tbSj.getSsbmid());
|
||||
dz.setSsxgajid(tbSj.getSsxgajid());
|
||||
dz.setSssgajid(tbSj.getSssgajid());
|
||||
dz.setXtSjly("1");
|
||||
this.tbSjDzMapper.insertEntity(dz);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void editQc(TbSjQcszDto dto) {
|
||||
UserInfo user = UserInfoManager.get();
|
||||
TbSj sj = new TbSj();
|
||||
BeanUtils.copyProperties(dto, sj);
|
||||
TbSj entity = this.tbSjMapper.queryById(dto.getId());
|
||||
sj.setQcGxcs(entity.getQcGxcs() + 1);
|
||||
sj.setQcGxsj(new Date());
|
||||
this.tbSjMapper.updateEntity(sj);
|
||||
// 记录日志
|
||||
TbSjRz rz = new TbSjRz();
|
||||
rz.setId(UUIDGenerator.getUUID());
|
||||
rz.setSjId(entity.getId());
|
||||
if (user != null) {
|
||||
rz.setRzms(DateUtils.getTime() + "," + user.getDeptName() +
|
||||
"(" + user.getUserName() + ")设置了圈层距离,分别为核心圈:" + dto.getQcHx() +
|
||||
"米,警戒圈:" + dto.getQcJj() + "米,关注圈:" + dto.getQcGz() + "米。");
|
||||
rz.setCzryId(String.valueOf(user.getUserId()));
|
||||
rz.setCzryXm(user.getUserName());
|
||||
rz.setCzrySfzh(user.getIdEntityCard());
|
||||
rz.setSsbm(user.getDeptName());
|
||||
rz.setSsbmid(String.valueOf(user.getDeptId()));
|
||||
rz.setSsbmdm(user.getDeptCode());
|
||||
rz.setSsxgaj(user.getFxjDeptName());
|
||||
rz.setSsxgajid(String.valueOf(user.getFxjDeptId()));
|
||||
rz.setSsxgajdm(user.getFxjDeptCode());
|
||||
rz.setSssgaj(user.getDszDeptName());
|
||||
rz.setSssgajid(String.valueOf(user.getDszDeptId()));
|
||||
rz.setSssgajdm(user.getDszDeptCode());
|
||||
} else {
|
||||
rz.setRzms(DateUtils.getTime() +
|
||||
",设置了圈层距离,分别为核心圈:" + dto.getQcHx() +
|
||||
"米,警戒圈:" + dto.getQcJj() + "米,关注圈:" + dto.getQcGz() + "。");
|
||||
}
|
||||
rz.setCzsj(new Date());
|
||||
rz.setXtSjly("1");
|
||||
this.tbSjRzMapper.insert(rz);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateJwd(TbSjUpdateJwdDto dto) {
|
||||
UserInfo user = UserInfoManager.get();
|
||||
TbSj entity = this.tbSjMapper.queryById(dto.getId());
|
||||
if (entity != null) {
|
||||
entity.setDqjd(dto.getDqjd());
|
||||
entity.setDqwd(dto.getDqwd());
|
||||
entity.setDqdz(dto.getDqdz());
|
||||
entity.setDqdzxzqh(dto.getDqdzxzqh());
|
||||
if (dto.getDqjd() != null && dto.getDqwd() != null) {
|
||||
entity.setDqzb(JtsUtils.getPoint(dto.getDqjd(), dto.getDqwd()));
|
||||
entity.setDqzbhash(GeoHashKit.encode(dto.getDqjd(), dto.getDqwd()));
|
||||
}
|
||||
// 如果没有初始经纬度,这里将第一次设置的改为初始经纬度
|
||||
if (entity.getCsjd() == null || entity.getCswd() == null) {
|
||||
entity.setCsjd(dto.getDqjd());
|
||||
entity.setCswd(dto.getDqwd());
|
||||
entity.setCsdz(dto.getDqdz());
|
||||
entity.setCsdzxzqh(dto.getDqdzxzqh());
|
||||
entity.setCszb(JtsUtils.getPoint(dto.getDqjd(), dto.getDqwd()));
|
||||
entity.setCszbhash(GeoHashKit.encode(dto.getDqjd(), dto.getDqwd()));
|
||||
}
|
||||
this.tbSjMapper.updateEntity(entity);
|
||||
// 记录坐标变更
|
||||
TbSjDz dz = new TbSjDz();
|
||||
dz.setId(UUIDGenerator.getUUID());
|
||||
dz.setSjId(dto.getId());
|
||||
dz.setDztzSj(new Date());
|
||||
if (user != null) {
|
||||
dz.setDztzRyid(String.valueOf(user.getUserId()));
|
||||
dz.setDztzRysfzh(user.getIdEntityCard());
|
||||
dz.setDztzRyxm(user.getUserName());
|
||||
}
|
||||
dz.setJd(dto.getDqjd());
|
||||
dz.setWd(dto.getDqwd());
|
||||
if (dz.getJd() != null && dz.getWd() != null) {
|
||||
dz.setZb(JtsUtils.getPoint(dz.getJd(), dz.getWd()));
|
||||
dz.setZbhash(GeoHashKit.encode(dz.getJd(), dz.getWd()));
|
||||
if (user != null) {
|
||||
dz.setSsbm(user.getDeptName());
|
||||
dz.setSsbmid(String.valueOf(user.getDeptId()));
|
||||
dz.setSsbmdm(user.getDeptCode());
|
||||
dz.setSsxgaj(user.getFxjDeptName());
|
||||
dz.setSsxgajid(String.valueOf(user.getFxjDeptId()));
|
||||
dz.setSsxgajdm(user.getFxjDeptCode());
|
||||
dz.setSssgaj(user.getDszDeptName());
|
||||
dz.setSssgajid(String.valueOf(user.getDszDeptId()));
|
||||
dz.setSssgajdm(user.getDszDeptCode());
|
||||
}
|
||||
}
|
||||
dz.setXtSjly("1");
|
||||
this.tbSjDzMapper.insertEntity(dz);
|
||||
} else {
|
||||
throw new BusinessException("未查询到事件信息");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void addSjRz(TbSjRzDto dto) {
|
||||
UserInfo user = UserInfoManager.get();
|
||||
TbSjRz rz = new TbSjRz();
|
||||
rz.setId(UUIDGenerator.getUUID());
|
||||
if (user != null) {
|
||||
rz.setCzryId(String.valueOf(user.getUserId()));
|
||||
rz.setCzryXm(user.getUserName());
|
||||
rz.setCzrySfzh(user.getIdEntityCard());
|
||||
rz.setSsbm(user.getDeptName());
|
||||
rz.setSsbmid(String.valueOf(user.getDeptId()));
|
||||
rz.setSsbmdm(user.getDeptCode());
|
||||
rz.setSsxgaj(user.getFxjDeptName());
|
||||
rz.setSsxgajid(String.valueOf(user.getFxjDeptId()));
|
||||
rz.setSsxgajdm(user.getFxjDeptCode());
|
||||
rz.setSssgaj(user.getDszDeptName());
|
||||
rz.setSssgajid(String.valueOf(user.getDszDeptId()));
|
||||
rz.setSssgajdm(user.getDszDeptCode());
|
||||
}
|
||||
rz.setCzsj(new Date());
|
||||
rz.setXtSjly("1");
|
||||
this.tbSjRzMapper.insert(rz);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(String id) {
|
||||
return this.tbSjMapper.deleteById(id) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean finishDispose(TbSj dto) {
|
||||
TbSj tbSj = this.tbSjMapper.selectById(dto.getId());
|
||||
if (tbSj == null) throw new BusinessException("事件未找到!!");
|
||||
tbSj.setCzjssj(new Date());
|
||||
tbSj.setCzzt(dto.getCzzt());
|
||||
tbSj.setCzsm(dto.getCzsm());
|
||||
if (tbSj.getDqjd() != null && tbSj.getDqwd() != null) {
|
||||
tbSj.setDqzb(JtsUtils.getPoint(tbSj.getDqjd(), tbSj.getDqwd()));
|
||||
tbSj.setDqzbhash(GeoHashKit.encode(tbSj.getDqjd(), tbSj.getDqwd()));
|
||||
}
|
||||
|
||||
if (tbSj.getCsjd() != null && tbSj.getCswd() != null) {
|
||||
tbSj.setCszb(JtsUtils.getPoint(tbSj.getCsjd(), tbSj.getCswd()));
|
||||
tbSj.setCszbhash(GeoHashKit.encode(tbSj.getCsjd(), tbSj.getCswd()));
|
||||
}
|
||||
tbSjMapper.updateEntity(tbSj);
|
||||
//更新视频表的结束时间
|
||||
List<TbSjSpbf> sjsp = tbSjSpbfMapper.selectList(
|
||||
new QueryWrapper<TbSjSpbf>()
|
||||
.eq(StringUtils.isNotBlank(tbSj.getId()), "sj_id", tbSj.getId())
|
||||
.isNull("bfjssj")
|
||||
);
|
||||
if (!(sjsp != null && sjsp.size() > 0)) {
|
||||
TbSjSpbf tbSjSpbf = new TbSjSpbf();
|
||||
tbSjSpbf.setBfjssj(DateUtils.getNowDate());
|
||||
tbSjSpbfMapper.update(tbSjSpbf, new QueryWrapper<TbSjSpbf>()
|
||||
.eq(StringUtils.isNotBlank(tbSj.getId()), "sj_id", tbSj.getId()));
|
||||
}
|
||||
//修改日志
|
||||
tbRzSpbfAdaptRemoteService.updateLyId(tbSj.getId());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,63 @@
|
||||
package com.mosty.sjzx.service.impl;
|
||||
|
||||
import com.mosty.base.model.dto.sjzx.TbSjSpbfDTO;
|
||||
import com.mosty.base.model.entity.sjzx.TbSjSpbf;
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import com.mosty.common.util.PermissionsUtil;
|
||||
import com.mosty.sjzx.mapper.TbSjSpbfMapper;
|
||||
import com.mosty.sjzx.service.TbSjSpbfService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
@Service("tbSjSpbfService")
|
||||
public class TbSjSpbfServiceImpl implements TbSjSpbfService {
|
||||
@Resource
|
||||
private TbSjSpbfMapper tbSjSpbfMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<TbSjSpbf> queryAll() {
|
||||
return this.tbSjSpbfMapper.queryAll(PermissionsUtil.createSql("", UserInfoManager.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TbSjSpbf queryById(String id) {
|
||||
return this.tbSjSpbfMapper.queryById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TbSjSpbfDTO insert(TbSjSpbfDTO dto) {
|
||||
UserInfo user = UserInfoManager.get();
|
||||
TbSjSpbf tb = new TbSjSpbf();
|
||||
BeanUtils.copyProperties(dto, tb);
|
||||
tb.setSsbm(user.getDeptName());
|
||||
tb.setSsbmid(String.valueOf(user.getDeptId()));
|
||||
tb.setSsbmdm(user.getDeptCode());
|
||||
tb.setSsxgaj(user.getFxjDeptName());
|
||||
tb.setSsxgajid(String.valueOf(user.getFxjDeptId()));
|
||||
tb.setSsxgajdm(user.getFxjDeptCode());
|
||||
tb.setSssgaj(user.getDszDeptName());
|
||||
tb.setSssgajid(String.valueOf(user.getDszDeptId()));
|
||||
tb.setSssgajdm(user.getDszDeptCode());
|
||||
tb.setXtSjly("1");
|
||||
this.tbSjSpbfMapper.insert(tb);
|
||||
return dto;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TbSjSpbf update(TbSjSpbf tbSjSpbf) {
|
||||
this.tbSjSpbfMapper.updateById(tbSjSpbf);
|
||||
return this.queryById(tbSjSpbf.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(String id) {
|
||||
return this.tbSjSpbfMapper.deleteById(id) > 0;
|
||||
}
|
||||
}
|
||||
|
198
mosty-sjzx/src/main/java/com/mosty/sjzx/service/impl/Test.java
Normal file
198
mosty-sjzx/src/main/java/com/mosty/sjzx/service/impl/Test.java
Normal file
@ -0,0 +1,198 @@
|
||||
package com.mosty.sjzx.service.impl;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class Test {
|
||||
|
||||
|
||||
@JsonProperty("DispositionNotificationListObject")
|
||||
private DispositionNotificationListObjectDTO dispositionNotificationListObject;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class DispositionNotificationListObjectDTO {
|
||||
@JsonProperty("DispositionNotificationObject")
|
||||
private List<DispositionNotificationObjectDTO> dispositionNotificationObject;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class DispositionNotificationObjectDTO {
|
||||
@JsonProperty("PriorityLevel")
|
||||
private Integer priorityLevel;
|
||||
@JsonProperty("NotificationID")
|
||||
private String notificationID;
|
||||
@JsonProperty("DispositionID")
|
||||
private String dispositionID;
|
||||
@JsonProperty("ApplicantOrg")
|
||||
private String applicantOrg;
|
||||
@JsonProperty("DispositionFaceObject")
|
||||
private DispositionFaceObjectDTO dispositionFaceObject;
|
||||
@JsonProperty("TriggerTime")
|
||||
private String triggerTime;
|
||||
@JsonProperty("Title")
|
||||
private String title;
|
||||
@JsonProperty("Reason")
|
||||
private String reason;
|
||||
@JsonProperty("FaceObject")
|
||||
private FaceObjectDTO faceObject;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class DispositionFaceObjectDTO {
|
||||
@JsonProperty("FaceID")
|
||||
private String faceID;
|
||||
@JsonProperty("DepotId")
|
||||
private String depotId;
|
||||
@JsonProperty("DepotName")
|
||||
private String depotName;
|
||||
@JsonProperty("GenderCode")
|
||||
private Integer genderCode;
|
||||
@JsonProperty("InfoKind")
|
||||
private Integer infoKind;
|
||||
@JsonProperty("SourceID")
|
||||
private String sourceID;
|
||||
@JsonProperty("SubImageList")
|
||||
private SubImageListDTO subImageList;
|
||||
@JsonProperty("DepotType")
|
||||
private String depotType;
|
||||
@JsonProperty("Sid")
|
||||
private String sid;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class SubImageListDTO {
|
||||
@JsonProperty("SubImageInfoObject")
|
||||
private List<SubImageInfoObjectDTO> subImageInfoObject;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class SubImageInfoObjectDTO {
|
||||
@JsonProperty("Type")
|
||||
private Integer type;
|
||||
@JsonProperty("StoragePath")
|
||||
private String storagePath;
|
||||
@JsonProperty("EventSort")
|
||||
private Integer eventSort;
|
||||
@JsonProperty("Data")
|
||||
private String data;
|
||||
@JsonProperty("FileFormat")
|
||||
private String fileFormat;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class FaceObjectDTO {
|
||||
@JsonProperty("FaceAppearTime")
|
||||
private String faceAppearTime;
|
||||
@JsonProperty("Latitude")
|
||||
private Double latitude;
|
||||
@JsonProperty("SubImageList")
|
||||
private SubImageListDTO subImageList;
|
||||
@JsonProperty("CapStyle")
|
||||
private String capStyle;
|
||||
@JsonProperty("IsSuspectedTerrorist")
|
||||
private Integer isSuspectedTerrorist;
|
||||
@JsonProperty("RightBtmY")
|
||||
private Integer rightBtmY;
|
||||
@JsonProperty("IsCriminalInvolved")
|
||||
private Integer isCriminalInvolved;
|
||||
@JsonProperty("RightBtmX")
|
||||
private Integer rightBtmX;
|
||||
@JsonProperty("IsSuspiciousPerson")
|
||||
private Integer isSuspiciousPerson;
|
||||
@JsonProperty("Similaritydegree")
|
||||
private Double similaritydegree;
|
||||
@JsonProperty("LocationMarkTime")
|
||||
private String locationMarkTime;
|
||||
@JsonProperty("Age")
|
||||
private Integer age;
|
||||
@JsonProperty("FaceID")
|
||||
private String faceID;
|
||||
@JsonProperty("GenderCode")
|
||||
private String genderCode;
|
||||
@JsonProperty("EthicCode")
|
||||
private String ethicCode;
|
||||
@JsonProperty("AgeLowerLimit")
|
||||
private Integer ageLowerLimit;
|
||||
@JsonProperty("Attitude")
|
||||
private Integer attitude;
|
||||
@JsonProperty("QualityScore")
|
||||
private Double qualityScore;
|
||||
@JsonProperty("DeviceID")
|
||||
private String deviceID;
|
||||
@JsonProperty("SourceID")
|
||||
private String sourceID;
|
||||
@JsonProperty("IsVictim")
|
||||
private Integer isVictim;
|
||||
@JsonProperty("LeftTopY")
|
||||
private Integer leftTopY;
|
||||
@JsonProperty("LeftTopX")
|
||||
private Integer leftTopX;
|
||||
@JsonProperty("Longitude")
|
||||
private Double longitude;
|
||||
@JsonProperty("FaceDisAppearTime")
|
||||
private String faceDisAppearTime;
|
||||
@JsonProperty("IsDriver")
|
||||
private Integer isDriver;
|
||||
@JsonProperty("IsForeigner")
|
||||
private Integer isForeigner;
|
||||
@JsonProperty("InfoKind")
|
||||
private Integer infoKind;
|
||||
@JsonProperty("AgeUpLimit")
|
||||
private Integer ageUpLimit;
|
||||
@JsonProperty("GlassStyle")
|
||||
private String glassStyle;
|
||||
@JsonProperty("MaskStyle")
|
||||
private Integer maskStyle;
|
||||
@JsonProperty("CoatColor")
|
||||
private String coatColor;
|
||||
@JsonProperty("ShotTime")
|
||||
private String shotTime;
|
||||
@JsonProperty("IsDetainees")
|
||||
private Integer isDetainees;
|
||||
@JsonProperty("DeviceName")
|
||||
private String deviceName;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class SubImageListDTO {
|
||||
@JsonProperty("SubImageInfoObject")
|
||||
private List<SubImageInfoObjectDTO> subImageInfoObject;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class SubImageInfoObjectDTO {
|
||||
@JsonProperty("Type")
|
||||
private String type;
|
||||
@JsonProperty("StoragePath")
|
||||
private String storagePath;
|
||||
@JsonProperty("DeviceID")
|
||||
private String deviceID;
|
||||
@JsonProperty("ImageID")
|
||||
private String imageID;
|
||||
@JsonProperty("EventSort")
|
||||
private Integer eventSort;
|
||||
@JsonProperty("Data")
|
||||
private String data;
|
||||
@JsonProperty("Height")
|
||||
private Integer height;
|
||||
@JsonProperty("ShotTime")
|
||||
private String shotTime;
|
||||
@JsonProperty("FileFormat")
|
||||
private String fileFormat;
|
||||
@JsonProperty("Width")
|
||||
private Integer width;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.mosty.sjzx.task;
|
||||
|
||||
import com.mosty.common.base.util.DateUtils;
|
||||
import com.mosty.sjzx.mapper.TbSjMapper;
|
||||
import com.mosty.sjzx.service.TbSjService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 每天凌晨0点计算所有的警情、预警、
|
||||
* 盘查数据,获取经纬度信息
|
||||
*
|
||||
* @author dw
|
||||
* @since 2022/8/6
|
||||
**/
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class BxdCreateTask {
|
||||
|
||||
private final TbSjService tbSjService;
|
||||
|
||||
@Scheduled(cron = "0 0 0 * * ?")
|
||||
@Transactional
|
||||
public void run() {
|
||||
this.tbSjService.bxdCreate();
|
||||
}
|
||||
}
|
16
mosty-sjzx/src/main/java/com/mosty/sjzx/task/TbJqTask.java
Normal file
16
mosty-sjzx/src/main/java/com/mosty/sjzx/task/TbJqTask.java
Normal file
@ -0,0 +1,16 @@
|
||||
package com.mosty.sjzx.task;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class TbJqTask {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user