1
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 {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
77
mosty-sjzx/src/main/resources/application.yml
Normal file
77
mosty-sjzx/src/main/resources/application.yml
Normal file
@ -0,0 +1,77 @@
|
||||
ribbon:
|
||||
ReadTimeout: 6000000
|
||||
ConnectTimeout: 6000000
|
||||
|
||||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 100MB
|
||||
max-request-size: 100MB
|
||||
jackson:
|
||||
serialization:
|
||||
write-dates-as-timestamps: false
|
||||
# # 格式化返回时间 yyyy-MM-dd HH:mm:ss
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
time-zone: GMT+8
|
||||
datasource:
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://192.168.200.131:3306/mosty_sjzx?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: mosty888
|
||||
hikari:
|
||||
minimum-idle: 10 # ??????????10???0???maximum-pool-size??????maximum-pool-size
|
||||
maximum-pool-size: 20 # ??????????0????????10??????1?????minimum-idle??
|
||||
idle-timeout: 500000 # ????????????600000?10????????max-lifetime?max-lifetime>0??????0????0???10???????10??
|
||||
max-lifetime: 540000 # ????????????0???30??????????30??.?????mysql????????
|
||||
connection-timeout: 60000 # ????????????250????????????30?
|
||||
connection-test-query: SELECT 1 # ???????????????
|
||||
# Redis数据库索引(默认为0)
|
||||
# Redis数据库索引(默认为0)
|
||||
redis:
|
||||
database: 8
|
||||
# Redis服务器地址
|
||||
host: 192.168.200.131
|
||||
# Redis服务器连接端口
|
||||
port: 6379
|
||||
# Redis服务器连接密码(默认为空)
|
||||
password: mosty888
|
||||
# 连接超时时间(毫秒)
|
||||
timeout: 2000
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 50
|
||||
|
||||
swagger:
|
||||
host: 80.155.0.84
|
||||
port: 80
|
||||
|
||||
mybatis-plus:
|
||||
global-config:
|
||||
db-config:
|
||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
magic-api:
|
||||
web: /magic/web
|
||||
#配置文件存储位置。当以classpath开头时,为只读模式
|
||||
resource:
|
||||
# location: /data/magic-api
|
||||
type: database
|
||||
table-name: magic_api # 数据库中的表名
|
||||
prefix: /magic-api # 前缀
|
||||
datasource:
|
||||
response-code:
|
||||
success: 10000
|
||||
exclude:
|
||||
pathPatterns:
|
||||
swagger:
|
||||
- /swagger-resources/**
|
||||
- /webjars/**
|
||||
- /v2/**
|
||||
- /swagger-ui.html/**
|
||||
- /docs.html/**
|
||||
-
|
||||
config:
|
||||
orgCode: 510600000000
|
39
mosty-sjzx/src/main/resources/bootstrap.yml
Normal file
39
mosty-sjzx/src/main/resources/bootstrap.yml
Normal file
@ -0,0 +1,39 @@
|
||||
server:
|
||||
port: 8016
|
||||
servlet:
|
||||
context-path: /mosty-sjzx/
|
||||
spring:
|
||||
application:
|
||||
name: mosty-sjzx
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
namespace: 657d1843-b590-41ac-b5e7-5d261bf00de9
|
||||
server-addr: 192.168.200.131:8848
|
||||
register-enabled: true
|
||||
|
||||
|
||||
# 开启健康监控
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
auditevents:
|
||||
enabled: true
|
||||
|
||||
#swagger:
|
||||
# enable: true
|
||||
# title: 基础微服务
|
||||
# version: 1.0.0
|
||||
# name: 基础微服务
|
||||
# url: ''
|
||||
# email: ''
|
||||
|
||||
# 日志
|
||||
#logging:
|
||||
# file: /application/applogs/admin.log
|
||||
|
114
mosty-sjzx/src/main/resources/logback-spring.xml
Normal file
114
mosty-sjzx/src/main/resources/logback-spring.xml
Normal file
@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<jmxConfigurator/>
|
||||
<property name="PROJECT_NAME" value="msxf-retail-sort" />
|
||||
<property name="LOG_FILE_INFO" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/msxf-retail-sort-info.log" />
|
||||
<property name="LOG_FILE_WARN" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/msxf-retail-sort-warn.log" />
|
||||
<property name="LOG_FILE_ERR" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/msxf-retail-sort-error.log" />
|
||||
<property name="LOG_BUSINESS" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/business/business-2de.log"/>
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
|
||||
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />
|
||||
<contextName>${PROJECT_NAME}</contextName>
|
||||
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
<appender name="LOG_FILE_INFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>INFO</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
<file>${LOG_FILE_INFO}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_FILE_INFO}-7de.%d{yyyy-MM-dd}.%i</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>1024MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
<appender name="LOG_FILE_WARN"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>WARN</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
<file>${LOG_FILE_WARN}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_FILE_WARN}-30de.%d{yyyy-MM-dd}.%i</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>1024MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
<appender name="LOG_FILE_ERROR"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>ERROR</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
<file>${LOG_FILE_ERR}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_FILE_ERR}.%d{yyyy-MM-dd}.%i</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>512MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
<!--添加监控日志 -->
|
||||
<appender name="business-log-appender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>info</level>
|
||||
</filter>
|
||||
<file>${LOG_BUSINESS}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_BUSINESS}.%d{yyyy-MM-dd}.%i
|
||||
</fileNamePattern>
|
||||
<maxFileSize>1024MB</maxFileSize>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="business-log" additivity="false" level="info">
|
||||
<appender-ref ref="business-log-appender"/>
|
||||
<appender-ref ref="CONSOLE" />
|
||||
</logger>
|
||||
<!-- show parameters for hibernate sql 专为 Hibernate 定制 -->
|
||||
<logger name="logging.level.jdbc" level="INFO" />
|
||||
<logger name="logging.level.jdbc.sqlonly" level="INFO" />
|
||||
<logger name="org.springframework" level="INFO" additivity="true" />
|
||||
<Logger name="jdbc.sqlonly" level="info" />
|
||||
<Logger name="jdbc.sqltiming" level="warn" />
|
||||
<Logger name="jdbc.audit" level="warn" />
|
||||
<Logger name="jdbc.resultset" level="warn" />
|
||||
<Logger name="jdbc.resultsettable" level="warn" />
|
||||
<logger name="jdbc.connection" level="warn" />
|
||||
<Logger name="log4jdbc.debug" level="warn" />
|
||||
<Logger name="org.apache.kafka.clients.NetworkClient" level="ERROR" />
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="CONSOLE" />
|
||||
<appender-ref ref="LOG_FILE_INFO" />
|
||||
<appender-ref ref="LOG_FILE_WARN" />
|
||||
<appender-ref ref="LOG_FILE_ERROR" />
|
||||
</root>
|
||||
</configuration>
|
740
mosty-sjzx/src/main/resources/mapper/SgfxMapper.xml
Normal file
740
mosty-sjzx/src/main/resources/mapper/SgfxMapper.xml
Normal file
@ -0,0 +1,740 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.mosty.sjzx.mapper.SgfxMapper">
|
||||
<select id="jmjq" resultType="java.util.Map">
|
||||
select ay,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq>=#{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
and (ay like '0111%' or ay like '0112%' or ay like '0114%' or ay='01130100' or ay like '0203%'
|
||||
or ay='02040100' or ay like '0205%')
|
||||
${useSql}
|
||||
group by ay order by sl desc
|
||||
</select>
|
||||
|
||||
<select id="wffzjq" resultType="java.util.Map">
|
||||
select ay,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
and (ay like '01%' or ay like '02%')
|
||||
${useSql}
|
||||
group by ay order by sl desc
|
||||
</select>
|
||||
|
||||
<select id="zjq" resultType="java.util.Map">
|
||||
select ay,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq>=#{dto.ksrq} and jqfsksrq <=#{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
group by ay order by sl desc
|
||||
</select>
|
||||
|
||||
<select id="yjmjq" resultType="java.util.Map">
|
||||
select ay,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksny>=#{dto.ksny} and jqfsksny <= #{dto.jsny}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
and (ay like '0111%' or ay like '0112%' or ay like '0114%' or ay='01130100' or
|
||||
ay like '0203%' or ay='02040100' or ay like '0205%')
|
||||
${useSql}
|
||||
</select>
|
||||
|
||||
<select id="yzwffzjq" resultType="java.util.Map">
|
||||
select ay,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksny >= #{dto.ksny} and jqfsksny <= #{dto.jsny}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
and (ay like '01%' or ay like '02%')
|
||||
${useSql}
|
||||
group by ay order by sl desc
|
||||
</select>
|
||||
|
||||
<select id="yzjq" resultType="java.util.Map">
|
||||
select ay,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksny>=#{dto.ksny} and jqfsksny <=#{dto.jsny}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
group by ay order by sl desc
|
||||
</select>
|
||||
|
||||
<select id="zjmjq" resultType="java.util.Map">
|
||||
select ay,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq>=#{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
and (ay like '0111%' or ay like '0112%' or ay like '0114%' or ay='01130100' or ay like '0203%' or
|
||||
ay='02040100' or ay like '0205%')
|
||||
${useSql}
|
||||
group by ay order by sl desc
|
||||
</select>
|
||||
|
||||
<select id="zwffzjq" resultType="java.util.Map">
|
||||
select ay,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
and (ay like '01%' or ay like '02%')
|
||||
${useSql}
|
||||
group by ay order by sl desc
|
||||
</select>
|
||||
|
||||
<select id="zzjq" resultType="java.util.Map">
|
||||
select ay,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
group by ay order by sl desc
|
||||
</select>
|
||||
|
||||
<select id="gfsdfxJmjq" resultType="java.util.Map">
|
||||
select jqfsksxs,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
and (ay like '0111%' or ay like '0112%' or ay like '0114%' or ay='01130100'
|
||||
or ay like '0203%' or ay='02040100' or ay like '0205%')
|
||||
${useSql}
|
||||
</select>
|
||||
|
||||
<select id="gfsdfxWffzjq" resultType="java.util.Map">
|
||||
select jqfsksxs,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
and (ay like '01%' or ay like '02%')
|
||||
${useSql}
|
||||
group by jqfsksxs order by jqfsksxs
|
||||
</select>
|
||||
|
||||
<select id="gfsdfxZjq" resultType="java.util.Map">
|
||||
select jqfsksxs,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
group by jqfsksxs order by jqfsksxs
|
||||
</select>
|
||||
|
||||
<select id="gfsdfxYjmjq" resultType="java.util.Map">
|
||||
select jqfsksxs,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksny >= #{dto.ksny} and jqfsksny <= #{dto.jsny}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
and (ay like '0111%' or ay like '0112%' or ay like '0114%' or ay='01130100' or
|
||||
ay like '0203%' or ay='02040100' or ay like '0205%')
|
||||
${useSql}
|
||||
</select>
|
||||
|
||||
<select id="ywffzjq" resultType="java.util.Map">
|
||||
select jqfsksxs,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksny >= #{dto.ksny} and jqfsksny <= #{dto.jsny}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
and (ay like '01%' or ay like '02%')
|
||||
${useSql}
|
||||
group by jqfsksxs order by jqfsksxs
|
||||
</select>
|
||||
|
||||
<select id="gfsdfxYzjq" resultType="java.util.Map">
|
||||
select jqfsksxs,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksny >= #{dto.ksny} and jqfsksny <= #{dto.jsny}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
group by jqfsksxs order by jqfsksxs
|
||||
</select>
|
||||
|
||||
<select id="gfsdfxZjmjq" resultType="java.util.Map">
|
||||
select jqfsksxs,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
and (ay like '0111%' or ay like '0112%' or ay like '0114%' or ay='01130100' or ay
|
||||
like '0203%' or ay='02040100' or ay like '0205%')
|
||||
${useSql}
|
||||
group by jqfsksxs order by jqfsksxs
|
||||
</select>
|
||||
|
||||
<select id="gfsdfxZwffzjq" resultType="java.util.Map">
|
||||
select jqfsksxs,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
and (ay like '01%' or ay like '02%')
|
||||
${useSql}
|
||||
group by jqfsksxs order by jqfsksxs
|
||||
</select>
|
||||
|
||||
<select id="gfsdfxZzjq" resultType="java.util.Map">
|
||||
select jqfsksxs,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
group by jqfsksxs order by jqfsksxs asc
|
||||
</select>
|
||||
|
||||
<select id="aylx" resultType="java.util.Map">
|
||||
select * from tb_case_type
|
||||
<if test="code != null and code != ''">
|
||||
where code like concat('%',#{code},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="zzjg" resultType="java.util.Map">
|
||||
select id, org_code, org_name, root_path, org_type, org_type_name, org_short_name
|
||||
from mosty_base.sys_dept
|
||||
order by org_code
|
||||
</select>
|
||||
|
||||
<select id="zdgzJqtj" resultType="java.util.Map">
|
||||
select
|
||||
COALESCE(sum(xt_sjzt='1'),0) as zjq,
|
||||
COALESCE(sum(xt_sjzt='1' and sfzdjq='1'), 0) as zdjq,
|
||||
COALESCE(sum(xt_sjzt='1' and ay like '01%' or ay like '02%'),0) as wffz,
|
||||
COALESCE(sum(xt_sjzt='1' and ay like '0111%' or ay like '0112%' or ay like '0114%' or ay='01130100' or
|
||||
ay like '0203%' or ay='02040100' or ay like '0205%'), 0) as jmjq
|
||||
from mosty_sjzx.tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
</select>
|
||||
|
||||
<select id="rtj" resultType="java.util.Map">
|
||||
select jqfsksrq,bjlb,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
and (ay='01120400' or ay='01120800' or ay='0203200' or ay='02030300')
|
||||
</select>
|
||||
|
||||
<select id="ytj" resultType="java.util.Map">
|
||||
select jqfsksny,bjlb,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksny >= #{dto.ksny} and jqfsksny <= #{dto.jsny}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
group by jqfsksny,bjlb order by jqfsksny
|
||||
</select>
|
||||
|
||||
<select id="ztj" resultType="java.util.Map">
|
||||
select jqfskszs, bjlb,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
and (ay='01120400' or ay='01120800' or ay='0203200' or ay='02030300')
|
||||
group by jqfskszs, bjlb order by jqfskszs
|
||||
</select>
|
||||
|
||||
<select id="scryyj" resultType="java.util.Map">
|
||||
select jqfsksxs,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
and (ay='01120400' or ay='01120800' or ay='0203200' or ay='02030300')
|
||||
group by jqfsksxs order by jqfsksxs asc
|
||||
</select>
|
||||
|
||||
<select id="yscryyj" resultType="java.util.Map">
|
||||
select jqfsksxs,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksny >= #{dto.ksny} and jqfsksny <= #{dto.jsny}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
and (ay='01120400' or ay='01120800' or ay='0203200' or ay='02030300')
|
||||
group by jqfsksxs order by jqfsksxs asc
|
||||
</select>
|
||||
|
||||
<select id="zscryyj" resultType="java.util.Map">
|
||||
select jqfsksxs,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
and (ay='01120400' or ay='01120800' or ay='0203200' or ay='02030300')
|
||||
group by jqfsksxs order by jqfsksxs asc
|
||||
</select>
|
||||
|
||||
<select id="pcsfafxRtj" resultType="java.util.Map">
|
||||
select ssbmdm,jqfsksrq,bjlb,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
and (ay='01120400' or ay='01120800' or ay='0203200' or ay='02030300')
|
||||
group by ssbmdm,jqfsksrq,bjlb
|
||||
</select>
|
||||
|
||||
<select id="pcsfafxytj" resultType="java.util.Map">
|
||||
select ssbmdm,jqfsksny,bjlb,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksny >= #{dto.ksny} and jqfsksny <= #{dto.jsny}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
and (ay='01120400' or ay='01120800' or ay='0203200' or ay='02030300')
|
||||
group by ssbmdm,jqfsksny,bjlb
|
||||
</select>
|
||||
|
||||
<select id="pcsfafxztj" resultType="java.util.Map">
|
||||
select ssbmdm,jqfskszs,bjlb,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
and (ay='01120400' or ay='01120800' or ay='0203200' or ay='02030300')
|
||||
group by ssbmdm,jqfskszs,bjlb
|
||||
</select>
|
||||
|
||||
<select id="ztsjtj" resultType="java.util.Map">
|
||||
select bjlb,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksrq >= #{dto.ksrq} and jqfsksrq <= #{dto.jsrq}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
and (ay='01120400' or ay='01120800' or ay='0203200' or ay='02030300')
|
||||
group by bjlb order by sl desc
|
||||
</select>
|
||||
|
||||
<select id="yztsjtj" resultType="java.util.Map">
|
||||
select bjlb,count(1) as sl from tb_jq
|
||||
where xt_sjzt='1' and jqfsksny >= #{dto.ksny} and jqfsksny <= #{dto.jsny}
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.ssxgajdm != null and dto.ssxgajdm != ''">
|
||||
and ssxgajdm = #{dto.ssxgajdm}
|
||||
</if>
|
||||
${useSql}
|
||||
and (ay='01120400' or ay='01120800' or ay='0203200' or ay='02030300')
|
||||
</select>
|
||||
|
||||
<select id="jrjqczfx" resultType="java.util.Map">
|
||||
select czzt, count(1) as sl from mosty_sjzx.tb_jq where
|
||||
xt_sjzt = '1' and xt_scbz = '0' and czzt is not null
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and jqfsksrq >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.jssj != nul and dto.jssj != ''">
|
||||
and jqfsksrq <= #{dto.jssj}
|
||||
</if>
|
||||
<if test="dto.ssbmdm != nul and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
${useSql}
|
||||
group by czzt order by sl desc
|
||||
</select>
|
||||
|
||||
<select id="jrjqslzs" resultType="java.util.Map">
|
||||
select jqfsksxs, count(1) as sl from mosty_sjzx.tb_jq where
|
||||
xt_sjzt = '1' and xt_scbz = '0' and jqfsksxs is not null
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and jqfsksrq >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.jssj != nul and dto.jssj != ''">
|
||||
and jqfsksrq <= #{dto.jssj}
|
||||
</if>
|
||||
<if test="dto.ssbmdm != nul and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
${useSql}
|
||||
group by jqfsksxs order by jqfsksxs asc
|
||||
</select>
|
||||
|
||||
<select id="jrjqyj" resultType="java.util.Map">
|
||||
select count(1) as sl from mosty_sjzx.tb_jq where
|
||||
xt_sjzt = '1' and xt_scbz = '0'
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and jqfsksrq >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.jssj != nul and dto.jssj != ''">
|
||||
and jqfsksrq <= #{dto.jssj}
|
||||
</if>
|
||||
<if test="dto.ssbmdm != nul and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
${useSql}
|
||||
</select>
|
||||
|
||||
<select id="jqlxtj" resultType="java.util.Map">
|
||||
select bjlxmc, count(1) as sl from mosty_sjzx.tb_jq where
|
||||
xt_sjzt = '1' and xt_scbz = '0' and bjlxmc is not null
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and jqfsksrq >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.jssj != nul and dto.jssj != ''">
|
||||
and jqfsksrq <= #{dto.jssj}
|
||||
</if>
|
||||
<if test="dto.ssbmdm != nul and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
${useSql}
|
||||
group by bjlxmc order by sl desc
|
||||
</select>
|
||||
|
||||
<select id="jqlbCount" resultType="int">
|
||||
select count(1) from mosty_sjzx.tb_jq where
|
||||
xt_sjzt = '1' and xt_scbz = '0'
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and jqfsksrq >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.jssj != nul and dto.jssj != ''">
|
||||
and jqfsksrq <= #{dto.jssj}
|
||||
</if>
|
||||
<if test="dto.ssbmdm != nul and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.bjrXm != nul and dto.bjrXm != ''">
|
||||
and bjr_xm like concat('%',#{dto.bjrXm},'%')
|
||||
</if>
|
||||
<if test="dto.bjnr != nul and dto.bjnr != ''">
|
||||
and bjnr like concat('%',#{dto.bjnr},'%')
|
||||
</if>
|
||||
${useSql}
|
||||
</select>
|
||||
|
||||
<select id="jqlb" resultType="java.util.Map">
|
||||
select * from mosty_sjzx.tb_jq where
|
||||
xt_sjzt = '1' and xt_scbz = '0'
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and jqfsksrq >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.jssj != nul and dto.jssj != ''">
|
||||
and jqfsksrq <= #{dto.jssj}
|
||||
</if>
|
||||
<if test="dto.ssbmdm != nul and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
<if test="dto.bjrXm != nul and dto.bjrXm != ''">
|
||||
and bjr_xm like concat('%',#{dto.bjrXm},'%')
|
||||
</if>
|
||||
<if test="dto.bjnr != nul and dto.bjnr != ''">
|
||||
and bjnr like concat('%',#{dto.bjnr},'%')
|
||||
</if>
|
||||
${useSql}
|
||||
order by jqfskssj desc
|
||||
limit #{pageIndex},#{pageSize}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="sblxtj" resultType="java.util.Map">
|
||||
select sblx, count(1) as sl from mosty_yszx.tb_ys_sxt where
|
||||
xt_sjzt = '1' and xt_scbz = '0' and sblx is not null
|
||||
<if test="dto.ssbmdm != nul and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
${useSql}
|
||||
group by sblx order by sl desc
|
||||
</select>
|
||||
|
||||
<select id="sblbCount" resultType="int">
|
||||
select count(1) from mosty_yszx.tb_ys_sxt where
|
||||
xt_sjzt = '1' and xt_scbz = '0'
|
||||
<if test="dto.ssbmdm != nul and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
${useSql}
|
||||
</select>
|
||||
|
||||
<select id="sblb" resultType="java.util.Map">
|
||||
select count(1) from mosty_yszx.tb_ys_sxt where
|
||||
xt_sjzt = '1' and xt_scbz = '0'
|
||||
<if test="dto.ssbmdm != nul and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
${useSql}
|
||||
limit #{pageIndex},#{pageSize}
|
||||
order by xt_cjsj desc
|
||||
</select>
|
||||
|
||||
<select id="jwzbmlbtj" resultType="java.util.Map">
|
||||
select ssbmdm, ssbm,
|
||||
COALESCE(SUM(jwz_lx = '1'),0) as jmjwz,
|
||||
COALESCE(SUM(jwz_lx = '2'),0) as ydjwc,
|
||||
COALESCE(SUM(jwz_lx = '3'),0) as zhzagt
|
||||
from mosty_jcgl.tb_jcgl_jwz where xt_sjzt='1' and xt_scbz='0'
|
||||
<if test="dto.jwzlx != null and dto.jwzlx != ''">
|
||||
and jwz_lx = #{dto.jwzlx}
|
||||
</if>
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
${useSql}
|
||||
group by ssbmdm, ssbm
|
||||
</select>
|
||||
|
||||
<select id="bmtjjwz" resultType="java.util.Map">
|
||||
select ssbmdm, ssbm,
|
||||
COALESCE(SUM(jwz_lx = '1'),0) as jmjwz,
|
||||
COALESCE(SUM(jwz_lx = '2'),0) as ydjwc,
|
||||
COALESCE(SUM(jwz_lx = '3'),0) as zhzagt
|
||||
from mosty_jcgl.tb_jcgl_jwz where xt_sjzt='1' and xt_scbz='0'
|
||||
<if test="dto.jwzlx != null and dto.jwzlx != ''">
|
||||
and jwz_lx = #{dto.jwzlx}
|
||||
</if>
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
${useSql}
|
||||
group by ssbmdm, ssbm order by ssbmdm asc
|
||||
</select>
|
||||
|
||||
<select id="clbmtj" resultType="java.util.Map">
|
||||
select ssbmdm, ssbm, count(1) as sl from mosty_qwgl.tb_qw_cl where xt_sjzt='1' and xt_scbz='0' and
|
||||
ywid in(
|
||||
select id from mosty_qwgl.tb_qw_xfbb where xt_sjzt='1' and xt_scbz='0'
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and bbkssj >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
)
|
||||
${useSql}
|
||||
group by ssbmdm,ssbm order by sl desc
|
||||
</select>
|
||||
|
||||
<select id="fjbmtj" resultType="java.util.Map">
|
||||
select ssbmdm, ssbm, count(1) as sl from mosty_qwgl.tb_qw_jl where xt_sjzt='1' and jllx='02' and xt_scbz='0' and
|
||||
ywid in(
|
||||
select id from mosty_qwgl.tb_qw_xfbb where xt_sjzt='1' and xt_scbz='0'
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and bbkssj >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
)
|
||||
${useSql}
|
||||
group by ssbmdm,ssbm order by sl desc
|
||||
</select>
|
||||
|
||||
<select id="mjbmtj" resultType="java.util.Map">
|
||||
select ssbmdm, ssbm, count(1) as sl from mosty_qwgl.tb_qw_jl where xt_sjzt='1' and jllx='01' and xt_scbz='0' and
|
||||
ywid in(
|
||||
select id from mosty_qwgl.tb_qw_xfbb where xt_sjzt='1' and xt_scbz='0'
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and bbkssj >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
)
|
||||
${useSql}
|
||||
group by ssbmdm, ssbm order by sl desc
|
||||
</select>
|
||||
|
||||
<select id="zttjz" resultType="java.util.Map">
|
||||
select a.sl as mjsl,b.sl as fjsl,c.sl as clsl from
|
||||
(
|
||||
select count(1) as sl from mosty_qwgl.tb_qw_jl where xt_sjzt='1' and jllx='01' and xt_scbz='0' and
|
||||
ywid in(
|
||||
select id from mosty_qwgl.tb_qw_xfbb where xt_sjzt='1' and xt_scbz='0'
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and bbkssj >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
)
|
||||
${useSql}
|
||||
) a,
|
||||
(
|
||||
select count(1) as sl from mosty_qwgl.tb_qw_jl where xt_sjzt='1' and jllx='02' and xt_scbz='0' and
|
||||
ywid in(
|
||||
select id from mosty_qwgl.tb_qw_xfbb where xt_sjzt='1' and xt_scbz='0'
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and bbkssj >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
)
|
||||
${useSql}
|
||||
) b,
|
||||
(
|
||||
select count(1) as sl from mosty_qwgl.tb_qw_cl where xt_sjzt='1' and xt_scbz='0' and
|
||||
ywid in(
|
||||
select id from mosty_qwgl.tb_qw_xfbb where xt_sjzt='1' and xt_scbz='0'
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and bbkssj >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
)
|
||||
${useSql}
|
||||
) c
|
||||
</select>
|
||||
|
||||
<select id="lbtj" resultType="java.util.Map">
|
||||
select ssbmdm, ssbm, COALESCE(SUM(txzblx = '01'),0) as jwzd,COALESCE(SUM(txzblx = '02'),0) as
|
||||
zfjly,COALESCE(SUM(txzblx = '03'),0) as djj from mosty_qwgl.tb_qw_znzb where xt_sjzt='1' and xt_scbz='0' and
|
||||
ywid in(
|
||||
select id from mosty_qwgl.tb_qw_xfbb where xt_sjzt='1' and xt_scbz='0'
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and bbkssj >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
)
|
||||
<if test="dto.txzblx != null and dto.txzblx != ''">
|
||||
and txzblx = #{dto.txzblx}
|
||||
</if>
|
||||
${useSql}
|
||||
group by ssbmdm, ssbm
|
||||
</select>
|
||||
|
||||
<select id="bmtj" resultType="java.util.Map">
|
||||
select ssbmdm, ssbm,count(1) as sl from mosty_qwgl.tb_qw_znzb where xt_sjzt='1' and xt_scbz='0' and
|
||||
ywid in(
|
||||
select id from mosty_qwgl.tb_qw_xfbb where xt_sjzt='1' and xt_scbz='0'
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and bbkssj >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
)
|
||||
<if test="dto.txzblx != null and dto.txzblx != ''">
|
||||
and txzblx = #{dto.txzblx}
|
||||
</if>
|
||||
${useSql}
|
||||
group by ssbmdm,ssbm order by sl desc
|
||||
</select>
|
||||
|
||||
<select id="gzybmlbtj" resultType="java.util.Map">
|
||||
select ssbmdm, ssbm, COALESCE(SUM(sblx = '01'),0) as spjk,COALESCE(SUM(sblx = '02'),0) as
|
||||
jtkk from mosty_yszx.tb_ys_sxt where
|
||||
xt_sjzt = '1' and xt_scbz = '0' and sblx is not null
|
||||
<if test="dto.ssbmdm != nul and dto.ssbmdm != ''">
|
||||
and ssbmdm = #{dto.ssbmdm}
|
||||
</if>
|
||||
${useSql}
|
||||
group by ssbmdm, ssbm
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mosty.sjzx.mapper.TbCaseTypeMapper">
|
||||
|
||||
</mapper>
|
||||
|
30
mosty-sjzx/src/main/resources/mapper/TbJqAllMapper.xml
Normal file
30
mosty-sjzx/src/main/resources/mapper/TbJqAllMapper.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mosty.sjzx.mapper.TbJqAllMapper">
|
||||
<insert id="insertEntity" parameterType="com.mosty.base.model.entity.sjzx.TbJqAll">
|
||||
insert into tb_jq_all(id, jq110_id, jjdbh, jjdwbh, jjdwmc, gljjdbh, jjybh, jjyxm, jjtbh, jjtip, hrsj, lhlxbh,
|
||||
bjfsbh, bjrq, bjsj, jjsj, jqfsksnf, jqfsksyf, jqfsksny, jqfskszs, jqfsksrq, jqfskssj,
|
||||
jqfsksxs, jqfsjssj, hrsc, jjsc, jjlyh, bjdh, bjdh_yhxm, bjdh_yhdz, bjr_sfzh, bjr_xm,
|
||||
bjr_xb,
|
||||
bjr_lxdh, bjr_zzdw, sfdzxzqh, sfdz, bjnr, jqjb, bjlb, bjlx, bjxl, ldgbh, bjxlmc, bjlxmc,
|
||||
bjlbmc, bkrs, ssrs, swrs, ywwxwz, ywbzxl, ywbkry, sfsw, sfswybj, sfzdjq, jd, wd, zb,
|
||||
zbhash, czzt, zdjqtjlx, ssbm, ssbmdm, ssxgaj, sfjmjq,
|
||||
ssxgajdm, sssgaj, sssgajdm, xt_sjly, xt_sjzt, xt_scbz, xt_cjip, xt_cjsj, xt_cjr_id,
|
||||
xt_cjr,
|
||||
xt_cjbmdm, xt_cjbmmc, xt_zhgxip, xt_zhgxsj, xt_zhgxrid, xt_zhgxr, xt_zhgxbmdm, xt_zhgxbm,
|
||||
bz)
|
||||
values (#{id}, #{jq110Id}, #{jjdbh}, #{jjdwbh}, #{jjdwmc}, #{gljjdbh}, #{jjybh}, #{jjyxm}, #{jjtbh}, #{jjtip},
|
||||
#{hrsj}, #{lhlxbh}, #{bjfsbh}, #{bjrq}, #{bjsj}, #{jjsj}, #{jqfsksnf}, #{jqfsksyf}, #{jqfsksny},
|
||||
#{jqfskszs}, #{jqfsksrq}, #{jqfskssj}, #{jqfsksxs}, #{jqfsjssj}, #{hrsc}, #{jjsc}, #{jjlyh},
|
||||
#{bjdh}, #{bjdhYhxm}, #{bjdhYhdz}, #{bjrSfzh}, #{bjrXm}, #{bjrXb}, #{bjrLxdh}, #{bjrZzdw},
|
||||
#{sfdzxzqh}, #{sfdz}, #{bjnr}, #{jqjb}, #{bjlb}, #{bjlx}, #{bjxl}, #{ldgbh}, #{bjxlmc}, #{bjlxmc},
|
||||
#{bjlbmc}, #{bkrs}, #{ssrs}, #{swrs},
|
||||
#{ywwxwz}, #{ywbzxl}, #{ywbkry}, #{sfsw}, #{sfswybj}, #{sfzdjq}, #{jd}, #{wd},
|
||||
ST_GEOMFROMTEXT(#{zb,typeHandler=com.mosty.base.feign.handle.PolygonTypeHandler}),
|
||||
#{zbhash}, #{czzt}, #{zdjqtjlx}, #{ssbm}, #{ssbmdm}, #{ssxgaj}, #{sfjmjq},
|
||||
#{ssxgajdm}, #{sssgaj}, #{sssgajdm}, #{xtSjly}, #{xtSjzt}, #{xtScbz}, #{xtCjip}, #{xtCjsj}, #{xtCjrId},
|
||||
#{xtCjr}, #{xtCjbmdm}, #{xtCjbmmc}, #{xtZhgxip}, #{xtZhgxsj}, #{xtZhgxrid}, #{xtZhgxr}, #{xtZhgxbmdm},
|
||||
#{xtZhgxbm}, #{bz})
|
||||
</insert>
|
||||
</mapper>
|
||||
|
21
mosty-sjzx/src/main/resources/mapper/TbJqDzMapper.xml
Normal file
21
mosty-sjzx/src/main/resources/mapper/TbJqDzMapper.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.mosty.sjzx.mapper.TbJqDzMapper">
|
||||
|
||||
<insert id="insertEntity">
|
||||
insert into tb_jq_dz(
|
||||
id,jq_id,dztz_sj,dztz_ryid,dztz_rysfzh,dztz_ryxm,jd,wd,zb,zbhash,dzxzqh,dz,tp_id,
|
||||
ssbm, ssbmdm, ssxgaj, ssxgajdm, sssgaj, sssgajdm, xt_sjly, xt_sjzt, xt_scbz,
|
||||
xt_cjip, xt_cjsj, xt_cjr_id, xt_cjr, xt_cjbmdm, xt_cjbmmc, xt_zhgxip, xt_zhgxsj,
|
||||
xt_zhgxrid, xt_zhgxr, xt_zhgxbmdm, xt_zhgxbm, bz
|
||||
)values (
|
||||
#{id},#{jqId},#{dztzSj},#{dztzRyid},#{dztzRysfzh},#{dztzRyxm},#{jd},#{wd},
|
||||
ST_GEOMFROMTEXT(#{zb,typeHandler = com.mosty.base.feign.handle.PolygonTypeHandler}),
|
||||
#{zbhash},#{dzxzqh},#{dz},#{tpId},
|
||||
#{ssbm}, #{ssbmdm}, #{ssxgaj}, #{ssxgajdm},
|
||||
#{sssgaj}, #{sssgajdm}, #{xtSjly}, #{xtSjzt}, #{xtScbz}, #{xtCjip}, #{xtCjsj}, #{xtCjrId}, #{xtCjr},
|
||||
#{xtCjbmdm}, #{xtCjbmmc}, #{xtZhgxip},
|
||||
#{xtZhgxsj}, #{xtZhgxrid}, #{xtZhgxr}, #{xtZhgxbmdm}, #{xtZhgxbm}, #{bz}
|
||||
)
|
||||
</insert>
|
||||
</mapper>
|
969
mosty-sjzx/src/main/resources/mapper/TbJqMapper.xml
Normal file
969
mosty-sjzx/src/main/resources/mapper/TbJqMapper.xml
Normal file
@ -0,0 +1,969 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mosty.sjzx.mapper.TbJqMapper">
|
||||
<resultMap type="com.mosty.base.model.entity.sjzx.TbJq" id="TbJqMap">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="jq110Id" column="jq110_id" jdbcType="VARCHAR"/>
|
||||
<result property="jjdbh" column="jjdbh" jdbcType="VARCHAR"/>
|
||||
<result property="jjdwbh" column="jjdwbh" jdbcType="VARCHAR"/>
|
||||
<result property="jjdwmc" column="jjdwmc" jdbcType="VARCHAR"/>
|
||||
<result property="gljjdbh" column="gljjdbh" jdbcType="VARCHAR"/>
|
||||
<result property="jjybh" column="jjybh" jdbcType="VARCHAR"/>
|
||||
<result property="jjyxm" column="jjyxm" jdbcType="VARCHAR"/>
|
||||
<result property="jjtbh" column="jjtbh" jdbcType="VARCHAR"/>
|
||||
<result property="jjtip" column="jjtip" jdbcType="VARCHAR"/>
|
||||
<result property="hrsj" column="hrsj" jdbcType="TIMESTAMP"/>
|
||||
<result property="lhlxbh" column="lhlxbh" jdbcType="VARCHAR"/>
|
||||
<result property="bjfsbh" column="bjfsbh" jdbcType="VARCHAR"/>
|
||||
<result property="bjrq" column="bjrq" jdbcType="TIMESTAMP"/>
|
||||
<result property="bjsj" column="bjsj" jdbcType="TIMESTAMP"/>
|
||||
<result property="jjsj" column="jjsj" jdbcType="TIMESTAMP"/>
|
||||
<result property="jqfsksnf" column="jqfsksnf" jdbcType="INTEGER"/>
|
||||
<result property="jqfsksyf" column="jqfsksyf" jdbcType="INTEGER"/>
|
||||
<result property="jqfsksny" column="jqfsksny" jdbcType="INTEGER"/>
|
||||
<result property="jqfskszs" column="jqfskszs" jdbcType="INTEGER"/>
|
||||
<result property="jqfsksrq" column="jqfsksrq" jdbcType="TIMESTAMP"/>
|
||||
<result property="jqfskssj" column="jqfskssj" jdbcType="TIMESTAMP"/>
|
||||
<result property="jqfsksxs" column="jqfsksxs" jdbcType="INTEGER"/>
|
||||
<result property="jqfsjssj" column="jqfsjssj" jdbcType="TIMESTAMP"/>
|
||||
<result property="hrsc" column="hrsc" jdbcType="INTEGER"/>
|
||||
<result property="jjsc" column="jjsc" jdbcType="INTEGER"/>
|
||||
<result property="jjlyh" column="jjlyh" jdbcType="VARCHAR"/>
|
||||
<result property="bjdh" column="bjdh" jdbcType="VARCHAR"/>
|
||||
<result property="bjdhYhxm" column="bjdh_yhxm" jdbcType="VARCHAR"/>
|
||||
<result property="bjdhYhdz" column="bjdh_yhdz" jdbcType="VARCHAR"/>
|
||||
<result property="bjrSfzh" column="bjr_sfzh" jdbcType="VARCHAR"/>
|
||||
<result property="bjrXm" column="bjr_xm" jdbcType="VARCHAR"/>
|
||||
<result property="bjrXb" column="bjr_xb" jdbcType="VARCHAR"/>
|
||||
<result property="bjrLxdh" column="bjr_lxdh" jdbcType="VARCHAR"/>
|
||||
<result property="bjrZzdw" column="bjr_zzdw" jdbcType="VARCHAR"/>
|
||||
<result property="sfdzxzqh" column="sfdzxzqh" jdbcType="VARCHAR"/>
|
||||
<result property="sfdz" column="sfdz" jdbcType="VARCHAR"/>
|
||||
<result property="ldgbh" column="ldgbh" jdbcType="VARCHAR"/>
|
||||
<result property="bjnr" column="bjnr" jdbcType="VARCHAR"/>
|
||||
<result property="jqjb" column="jqjb" jdbcType="VARCHAR"/>
|
||||
<result property="bjlb" column="bjlb" jdbcType="VARCHAR"/>
|
||||
<result property="bjlx" column="bjlx" jdbcType="VARCHAR"/>
|
||||
<result property="bjxl" column="bjxl" jdbcType="VARCHAR"/>
|
||||
<result property="bjxlmc" column="bjxlmc" jdbcType="VARCHAR"/>
|
||||
<result property="bjlxmc" column="bjlxmc" jdbcType="VARCHAR"/>
|
||||
<result property="bjlbmc" column="bjlbmc" jdbcType="VARCHAR"/>
|
||||
<result property="bkrs" column="bkrs" jdbcType="INTEGER"/>
|
||||
<result property="ssrs" column="ssrs" jdbcType="INTEGER"/>
|
||||
<result property="swrs" column="swrs" jdbcType="INTEGER"/>
|
||||
<result property="ywwxwz" column="ywwxwz" jdbcType="VARCHAR"/>
|
||||
<result property="ywbzxl" column="ywbzxl" jdbcType="VARCHAR"/>
|
||||
<result property="ywbkry" column="ywbkry" jdbcType="VARCHAR"/>
|
||||
<result property="sfsw" column="sfsw" jdbcType="VARCHAR"/>
|
||||
<result property="sfswybj" column="sfswybj" jdbcType="VARCHAR"/>
|
||||
<result property="sfzdjq" column="sfzdjq" jdbcType="VARCHAR"/>
|
||||
<result property="jd" column="jd" jdbcType="NUMERIC"/>
|
||||
<result property="wd" column="wd" jdbcType="NUMERIC"/>
|
||||
<result property="czzt" column="czzt" jdbcType="VARCHAR"/>
|
||||
<result property="zdjqtjlx" column="zdjqtjlx" jdbcType="VARCHAR"/>
|
||||
<result property="sfjmjq" column="sfjmjq" jdbcType="VARCHAR"/>
|
||||
<result property="ssbm" column="ssbm" jdbcType="VARCHAR"/>
|
||||
<result property="ssbmdm" column="ssbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgaj" column="ssxgaj" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgajdm" column="ssxgajdm" jdbcType="VARCHAR"/>
|
||||
<result property="sssgaj" column="sssgaj" jdbcType="VARCHAR"/>
|
||||
<result property="sssgajdm" column="sssgajdm" jdbcType="VARCHAR"/>
|
||||
<result property="xtSjly" column="xt_sjly" jdbcType="VARCHAR"/>
|
||||
<result property="xtSjzt" column="xt_sjzt" jdbcType="VARCHAR"/>
|
||||
<result property="xtScbz" column="xt_scbz" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjip" column="xt_cjip" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjsj" column="xt_cjsj" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjrId" column="xt_cjr_id" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjr" column="xt_cjr" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjbmdm" column="xt_cjbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjbmmc" column="xt_cjbmmc" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxip" column="xt_zhgxip" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxsj" column="xt_zhgxsj" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxrid" column="xt_zhgxrid" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxr" column="xt_zhgxr" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxbmdm" column="xt_zhgxbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxbm" column="xt_zhgxbm" jdbcType="VARCHAR"/>
|
||||
<result property="bz" column="bz" jdbcType="VARCHAR"/>
|
||||
<result property="color" column="color" jdbcType="VARCHAR"/>
|
||||
<result property="distance" column="distance" jdbcType="NUMERIC"/>
|
||||
<result property="zb" column="zb" typeHandler="com.mosty.base.feign.handle.PolygonTypeHandler"/>
|
||||
<result property="zbhash" column="zbhash" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, jq110_id, jjdbh, jjdwbh, jjdwmc, gljjdbh, jjybh, jjyxm, jjtbh, jjtip,hrsj, lhlxbh, bjfsbh, bjrq,
|
||||
bjsj, jjsj, jqfsksnf,jqfsksyf,jqfsksny,jqfskszs,jqfsksrq,jqfskssj,jqfsksxs,jqfsjssj,hrsc, jjsc, jjlyh,
|
||||
bjdh, bjdh_yhxm, bjdh_yhdz,bjr_sfzh, bjr_xm, bjr_xb, bjr_lxdh, bjr_zzdw, sfdzxzqh, sfdz, bjnr, jqjb,
|
||||
bjlb, bjlx,bjxl, bjxlmc,bjlxmc,bjlbmc,ldgbh,bkrs, ssrs, swrs, ywwxwz, ywbzxl, ywbkry, sfsw, sfswybj,sfzdjq,
|
||||
jd, wd, czzt,zdjqtjlx,sfjmjq, ssbm, ssbmdm, ssxgaj, ssxgajdm, sssgaj, sssgajdm, xt_sjly, xt_sjzt,
|
||||
xt_scbz,xt_cjip, xt_cjsj, xt_cjr_id, xt_cjr, xt_cjbmdm, xt_cjbmmc, xt_zhgxip, xt_zhgxsj, xt_zhgxrid,
|
||||
xt_zhgxr, xt_zhgxbmdm, xt_zhgxbm, bz, color
|
||||
</sql>
|
||||
|
||||
<select id="getZfgkCount" resultType="Integer" parameterType="Map">
|
||||
select count(1) from tb_jq where xt_sjzt = '1' and xt_scbz = '0'
|
||||
and (bjxlmc like '%赌%' or bjlbmc like '%赌%' or bjlxmc like '%赌%')
|
||||
<if test="dto.bjnr != null and dto.bjnr != ''">
|
||||
and bjnr like concat ('%',#{dto.bjnr},'%')
|
||||
</if>
|
||||
<if test="dto.jqjb != null and dto.jqjb != ''">
|
||||
and jqjb = #{dto.jqjb}
|
||||
</if>
|
||||
<if test="dto.bjlb != null and dto.bjlb != ''">
|
||||
and bjlb = #{dto.bjlb}
|
||||
</if>
|
||||
<if test="dto.bjlx != null and dto.bjlx != ''">
|
||||
and bjlx = #{dto.bjlx}
|
||||
</if>
|
||||
<if test="dto.bjxl != null and dto.bjxl != ''">
|
||||
and bjxl = #{dto.bjxl}
|
||||
</if>
|
||||
<if test="dto.czzt != null and dto.czzt != ''">
|
||||
and czzt = #{dto.czzt}
|
||||
</if>
|
||||
<if test="dto.zdjqtjlx != null and dto.zdjqtjlx != ''">
|
||||
and zdjqtjlx = #{dto.zdjqtjlx}
|
||||
</if>
|
||||
<if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''">
|
||||
and bjsj between #{dto.startTime} and #{dto.endTime}
|
||||
</if>
|
||||
<if test="dto.jd != null and dto.wd != null and dto.radius != null">
|
||||
<![CDATA[and st_distance_sphere(POINT(jd,wd),POINT(#{dto.jd},#{dto.wd})) <= #{dto.radius}]]>
|
||||
</if>
|
||||
${useSql}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getCount" resultType="Integer" parameterType="Map">
|
||||
select count(1) from tb_jq where xt_scbz = '0'
|
||||
<if test="dto.bjnr != null and dto.bjnr != ''">
|
||||
and bjnr like concat ('%',#{dto.bjnr},'%')
|
||||
</if>
|
||||
<if test="dto.bjrXm != null and dto.bjrXm != ''">
|
||||
and bjr_xm like concat ('%',#{dto.bjrXm},'%')
|
||||
</if>
|
||||
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != '' and dto.type != '03' ">
|
||||
and ssbmdm like concat (#{dto.ssbmdm},'%')
|
||||
</if>
|
||||
|
||||
|
||||
<if test="dto.keyword != null and dto.keyword != ''">
|
||||
and (
|
||||
bjnr like concat ('%',#{dto.keyword},'%')
|
||||
or bjr_lxdh like concat ('%',#{dto.keyword},'%')
|
||||
or ssbm like concat ('%',#{dto.keyword},'%')
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="dto.type != null and dto.type != ''">
|
||||
<if test="dto.type == '01' ">
|
||||
and ssbm like concat ('%交%')
|
||||
</if>
|
||||
<if test="dto.type == '03' ">
|
||||
and ssbm not like concat ('%交%') and ssbmdm not like concat (#{dto.ssbmdm},'%')
|
||||
</if>
|
||||
</if>
|
||||
|
||||
<!--<if test="dto.jqjb != null and dto.jqjb != ''">
|
||||
and jqjb = #{dto.jqjb}
|
||||
</if>-->
|
||||
|
||||
<if test="dto.bjlb != null and dto.bjlb != ''">
|
||||
<if test='dto.bjlb == "1"'>
|
||||
and bjlb = '01000000'
|
||||
</if>
|
||||
<if test='dto.bjlb == "2"'>
|
||||
and bjlb = '02000000'
|
||||
</if>
|
||||
<if test='dto.bjlb == "3"'>
|
||||
and bjlb = '03000000'
|
||||
</if>
|
||||
<if test='dto.bjlb == "4"'>
|
||||
and bjlb not in ('01000000','02000000','03000000')
|
||||
</if>
|
||||
</if>
|
||||
|
||||
<if test="list != null and list.size() != 0">
|
||||
and jqjb in
|
||||
<foreach collection="list" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.bjlx != null and dto.bjlx != ''">
|
||||
and bjlx = #{dto.bjlx}
|
||||
</if>
|
||||
<if test="dto.bjxl != null and dto.bjxl != ''">
|
||||
and bjxl = #{dto.bjxl}
|
||||
</if>
|
||||
<if test="dto.sfzdjq != null and dto.sfzdjq != ''">
|
||||
and sfzdjq = #{dto.sfzdjq}
|
||||
</if>
|
||||
|
||||
<if test="dto.sfjmjq != null and dto.sfjmjq != ''">
|
||||
and sfjmjq = #{dto.sfjmjq}
|
||||
</if>
|
||||
|
||||
<if test="dto.color != null and dto.color != ''">
|
||||
and color = #{dto.color}
|
||||
</if>
|
||||
|
||||
<if test="czztList != null and czztList.size() != 0">
|
||||
and czzt in
|
||||
<foreach collection="czztList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="bjlbList != null and bjlbList.size() != 0">
|
||||
and bjlb in
|
||||
<foreach collection="bjlbList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="dto.zdjqtjlx != null and dto.zdjqtjlx != ''">
|
||||
and zdjqtjlx = #{dto.zdjqtjlx}
|
||||
</if>
|
||||
<if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''">
|
||||
and bjsj between #{dto.startTime} and #{dto.endTime}
|
||||
</if>
|
||||
<if test="dto.jd != null and dto.wd != null and dto.radius != null">
|
||||
<![CDATA[and st_distance_sphere(POINT(jd,wd),POINT(#{dto.jd},#{dto.wd})) <= #{dto.radius}]]>
|
||||
</if>
|
||||
<!-- ${useSql}-->
|
||||
</select>
|
||||
|
||||
<select id="getZfgkList" parameterType="Map" resultMap="TbJqMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
<if test="dto.jd != null and dto.wd != null and dto.radius != null">
|
||||
,st_distance_sphere(POINT(jd,wd),POINT(#{dto.jd},#{dto.wd})) as distance
|
||||
</if>
|
||||
from tb_jq where xt_sjzt = '1' and xt_scbz = '0'
|
||||
and (bjxlmc like '%赌%' or bjlbmc like '%赌%' or bjlxmc like '%赌%')
|
||||
<if test="dto.bjnr != null and dto.bjnr != ''">
|
||||
and bjnr like concat ('%',#{dto.bjnr},'%')
|
||||
</if>
|
||||
<if test="list != null and list.size() != 0">
|
||||
and jqjb in
|
||||
<foreach collection="list" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.bjlb != null and dto.bjlb != ''">
|
||||
<if test='dto.bjlb == "1"'>
|
||||
and bjlb = '01000000'
|
||||
</if>
|
||||
<if test='dto.bjlb == "2"'>
|
||||
and bjlb = '02000000'
|
||||
</if>
|
||||
<if test='dto.bjlb == "3"'>
|
||||
and bjlb = '03000000'
|
||||
</if>
|
||||
<if test='dto.bjlb == "4"'>
|
||||
and bjlb not in ('01000000','02000000','03000000')
|
||||
</if>
|
||||
</if>
|
||||
<if test="dto.bjlx != null and dto.bjlx != ''">
|
||||
and bjlx = #{dto.bjlx}
|
||||
</if>
|
||||
<if test="dto.bjxl != null and dto.bjxl != ''">
|
||||
and bjxl = #{dto.bjxl}
|
||||
</if>
|
||||
<if test="dto.czzt != null and dto.czzt != ''">
|
||||
and czzt = #{dto.czzt}
|
||||
</if>
|
||||
<if test="dto.zdjqtjlx != null and dto.zdjqtjlx != ''">
|
||||
and zdjqtjlx = #{dto.zdjqtjlx}
|
||||
</if>
|
||||
<if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''">
|
||||
and bjsj between #{dto.startTime} and #{dto.endTime}
|
||||
</if>
|
||||
<if test="dto.jd != null and dto.wd != null and dto.radius != null">
|
||||
<![CDATA[having distance <= #{dto.radius}]]>
|
||||
</if>
|
||||
${useSql}
|
||||
order by bjsj desc
|
||||
limit #{pageIndex},#{pageSize}
|
||||
</select>
|
||||
|
||||
<!--查询分页-->
|
||||
<select id="getListByPage" parameterType="Map" resultMap="TbJqMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
<if test="dto.jd != null and dto.wd != null and dto.radius != null">
|
||||
,st_distance_sphere(POINT(jd,wd),POINT(#{dto.jd},#{dto.wd})) as distance
|
||||
</if>
|
||||
from tb_jq where xt_scbz = '0'
|
||||
<if test="dto.bjnr != null and dto.bjnr != ''">
|
||||
and bjnr like concat ('%',#{dto.bjnr},'%')
|
||||
</if>
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != '' and dto.type != '03' ">
|
||||
and ssbmdm like concat (#{dto.ssbmdm},'%')
|
||||
</if>
|
||||
|
||||
<if test="dto.keyword != null and dto.keyword != ''">
|
||||
and (
|
||||
bjnr like concat ('%',#{dto.keyword},'%')
|
||||
or bjr_lxdh like concat ('%',#{dto.keyword},'%')
|
||||
or ssbm like concat ('%',#{dto.keyword},'%')
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="dto.type != null and dto.type != ''">
|
||||
<if test="dto.type == '01' ">
|
||||
and ssbm like concat ('%交%')
|
||||
</if>
|
||||
<if test="dto.type == '03' ">
|
||||
and ssbm not like concat ('%交%') and ssbmdm not like concat (#{dto.ssbmdm},'%')
|
||||
</if>
|
||||
</if>
|
||||
|
||||
<if test="dto.bjrXm != null and dto.bjrXm != ''">
|
||||
and bjr_xm like concat ('%',#{dto.bjrXm},'%')
|
||||
</if>
|
||||
<if test="dto.bjlb != null and dto.bjlb != ''">
|
||||
<if test='dto.bjlb == "1"'>
|
||||
and bjlb = '01000000'
|
||||
</if>
|
||||
<if test='dto.bjlb == "2"'>
|
||||
and bjlb = '02000000'
|
||||
</if>
|
||||
<if test='dto.bjlb == "3"'>
|
||||
and bjlb = '03000000'
|
||||
</if>
|
||||
<if test='dto.bjlb == "4"'>
|
||||
and bjlb not in ('01000000','02000000','03000000')
|
||||
</if>
|
||||
</if>
|
||||
<if test="dto.bjlx != null and dto.bjlx != ''">
|
||||
and bjlx = #{dto.bjlx}
|
||||
</if>
|
||||
<if test="dto.bjxl != null and dto.bjxl != ''">
|
||||
and bjxl = #{dto.bjxl}
|
||||
</if>
|
||||
|
||||
<if test="dto.sfzdjq != null and dto.sfzdjq != '' ">
|
||||
and sfzdjq = #{dto.sfzdjq}
|
||||
</if>
|
||||
<if test="dto.sfjmjq != null and dto.sfjmjq != ''">
|
||||
and sfjmjq = #{dto.sfjmjq}
|
||||
</if>
|
||||
<if test="dto.color != null and dto.color != ''">
|
||||
and color = #{dto.color}
|
||||
</if>
|
||||
<if test="czztList != null and czztList.size() != 0">
|
||||
and czzt in
|
||||
<foreach collection="czztList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.zdjqtjlx != null and dto.zdjqtjlx != ''">
|
||||
and zdjqtjlx = #{dto.zdjqtjlx}
|
||||
</if>
|
||||
<if test="list != null and list.size() != 0">
|
||||
and jqjb in
|
||||
<foreach collection="list" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
|
||||
<if test="bjlbList != null and bjlbList.size() != 0">
|
||||
and bjlb in
|
||||
<foreach collection="bjlbList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''">
|
||||
and bjsj between #{dto.startTime} and #{dto.endTime}
|
||||
</if>
|
||||
<if test="dto.jd != null and dto.wd != null and dto.radius != null">
|
||||
<![CDATA[having distance <= #{dto.radius}]]>
|
||||
</if>
|
||||
<!-- ${useSql}-->
|
||||
order by bjsj desc
|
||||
limit #{pageIndex},#{pageSize}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getList" parameterType="Map" resultMap="TbJqMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
<if test="dto.jd != null and dto.wd != null and dto.radius != null">
|
||||
,st_distance_sphere(POINT(jd,wd),POINT(#{dto.jd},#{dto.wd})) as distance
|
||||
</if>
|
||||
from tb_jq where xt_sjzt = '1' and xt_scbz = '0'
|
||||
<if test="dto.bjnr != null and dto.bjnr != ''">
|
||||
and bjnr like concat ('%',#{dto.bjnr},'%')
|
||||
</if>
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm like concat (#{dto.ssbmdm},'%')
|
||||
</if>
|
||||
<if test="dto.jqjb != null and dto.jqjb != ''">
|
||||
and jqjb = #{dto.jqjb}
|
||||
</if>
|
||||
<if test="dto.bjlb != null and dto.bjlb != ''">
|
||||
and bjlb = #{dto.bjlb}
|
||||
</if>
|
||||
<if test="dto.bjlx != null and dto.bjlx != ''">
|
||||
and bjlx = #{dto.bjlx}
|
||||
</if>
|
||||
<if test="dto.bjxl != null and dto.bjxl != ''">
|
||||
and bjxl = #{dto.bjxl}
|
||||
</if>
|
||||
<if test="dto.czzt != null and dto.czzt != ''">
|
||||
and czzt = #{dto.czzt}
|
||||
</if>
|
||||
<if test="dto.zdjqtjlx != null and dto.zdjqtjlx != ''">
|
||||
and zdjqtjlx = #{dto.zdjqtjlx}
|
||||
</if>
|
||||
<if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''">
|
||||
and bjsj between #{dto.startTime} and #{dto.endTime}
|
||||
</if>
|
||||
|
||||
<choose>
|
||||
<when test=" bjlbList != null and bjlbList.size() != 0">
|
||||
and ( bjlb in
|
||||
<foreach collection="bjlbList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
<if test="mylbList != null and mylbList.size() != 0">
|
||||
<foreach collection="mylbList" item="item" separator=" ">
|
||||
or bjnr like concat ('%',#{item},'%')
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="mylbList != null and mylbList.size() != 0">
|
||||
and (
|
||||
<foreach collection="mylbList" item="item" separator=" or ">
|
||||
bjnr like concat ('%',#{item},'%')
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<if test="dto.jd != null and dto.wd != null and dto.radius != null">
|
||||
<![CDATA[having distance <= #{dto.radius}]]>
|
||||
</if>
|
||||
<!-- ${useSql}-->
|
||||
order by bjsj desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getJqHotMap" parameterType="Map" resultType="java.util.Map">
|
||||
select jd as lng,wd as lat,count(1) as count
|
||||
from tb_jq where xt_sjzt = '1' and xt_scbz = '0' and LENGTH(jd) and LENGTH(wd) >0
|
||||
<if test="dto.bjnr != null and dto.bjnr != ''">
|
||||
and bjnr like concat ('%',#{dto.bjnr},'%')
|
||||
</if>
|
||||
<if test="dto.ssbmdm != null and dto.ssbmdm != ''">
|
||||
and ssbmdm like concat (#{dto.ssbmdm},'%')
|
||||
</if>
|
||||
<if test="dto.jqjb != null and dto.jqjb != ''">
|
||||
and jqjb = #{dto.jqjb}
|
||||
</if>
|
||||
<if test="dto.bjlb != null and dto.bjlb != ''">
|
||||
and bjlb = #{dto.bjlb}
|
||||
</if>
|
||||
<if test="dto.bjlx != null and dto.bjlx != ''">
|
||||
and bjlx = #{dto.bjlx}
|
||||
</if>
|
||||
<if test="dto.bjxl != null and dto.bjxl != ''">
|
||||
and bjxl = #{dto.bjxl}
|
||||
</if>
|
||||
<if test="dto.czzt != null and dto.czzt != ''">
|
||||
and czzt = #{dto.czzt}
|
||||
</if>
|
||||
<if test="dto.zdjqtjlx != null and dto.zdjqtjlx != ''">
|
||||
and zdjqtjlx = #{dto.zdjqtjlx}
|
||||
</if>
|
||||
<if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''">
|
||||
and bjsj between #{dto.startTime} and #{dto.endTime}
|
||||
</if>
|
||||
<if test="bjlbList != null and bjlbList.size() != 0">
|
||||
and bjlb in
|
||||
<foreach collection="bjlbList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.jd != null and dto.wd != null and dto.radius != null">
|
||||
<![CDATA[having distance <= #{dto.radius}]]>
|
||||
</if>
|
||||
GROUP BY jd,wd
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<update id="updateEntity" parameterType="com.mosty.base.model.entity.sjzx.TbJq">
|
||||
update tb_jq
|
||||
<set>
|
||||
<if test="jq110Id != null and jq110Id != ''">
|
||||
jq110_id = #{jq110Id},
|
||||
</if>
|
||||
<if test="jjdbh != null and jjdbh != ''">
|
||||
jjdbh = #{jjdbh},
|
||||
</if>
|
||||
<if test="jjdwbh != null and jjdwbh != ''">
|
||||
jjdwbh = #{jjdwbh},
|
||||
</if>
|
||||
<if test="jjdwmc != null and jjdwmc != ''">
|
||||
jjdwmc = #{jjdwmc},
|
||||
</if>
|
||||
<if test="gljjdbh != null and gljjdbh != ''">
|
||||
gljjdbh = #{gljjdbh},
|
||||
</if>
|
||||
<if test="jjybh != null and jjybh != ''">
|
||||
jjybh = #{jjybh},
|
||||
</if>
|
||||
<if test="jjyxm != null and jjyxm != ''">
|
||||
jjyxm = #{jjyxm},
|
||||
</if>
|
||||
<if test="jjtbh != null and jjtbh != ''">
|
||||
jjtbh = #{jjtbh},
|
||||
</if>
|
||||
<if test="jjtip != null and jjtip != ''">
|
||||
jjtip = #{jjtip},
|
||||
</if>
|
||||
<if test="hrsj != null">
|
||||
hrsj = #{hrsj},
|
||||
</if>
|
||||
<if test="lhlxbh != null and lhlxbh != ''">
|
||||
lhlxbh = #{lhlxbh},
|
||||
</if>
|
||||
<if test="bjfsbh != null and bjfsbh != ''">
|
||||
bjfsbh = #{bjfsbh},
|
||||
</if>
|
||||
<if test="bjrq != null">
|
||||
bjrq = #{bjrq},
|
||||
</if>
|
||||
<if test="bjsj != null">
|
||||
bjsj = #{bjsj},
|
||||
</if>
|
||||
<if test="jjsj != null">
|
||||
jjsj = #{jjsj},
|
||||
</if>
|
||||
<if test="jqfsksnf != null">
|
||||
jqfsksnf = #{jqfsksnf},
|
||||
</if>
|
||||
<if test="jqfsksyf != null">
|
||||
jqfsksyf = #{jqfsksyf},
|
||||
</if>
|
||||
<if test="jqfsksny != null">
|
||||
jqfsksny = #{jqfsksny},
|
||||
</if>
|
||||
<if test="jqfskszs != null">
|
||||
jqfskszs = #{jqfskszs},
|
||||
</if>
|
||||
<if test="jqfsksrq != null">
|
||||
jqfsksrq = #{jqfsksrq},
|
||||
</if>
|
||||
<if test="jqfskssj != null">
|
||||
jqfskssj = #{jqfskssj},
|
||||
</if>
|
||||
<if test="jqfsksxs != null">
|
||||
jqfsksxs = #{jqfsksxs},
|
||||
</if>
|
||||
<if test="jqfsjssj != null">
|
||||
jqfsjssj = #{jqfsjssj},
|
||||
</if>
|
||||
<if test="hrsc != null">
|
||||
hrsc = #{hrsc},
|
||||
</if>
|
||||
<if test="jjsc != null">
|
||||
jjsc = #{jjsc},
|
||||
</if>
|
||||
<if test="jjlyh != null and jjlyh != ''">
|
||||
jjlyh = #{jjlyh},
|
||||
</if>
|
||||
<if test="bjdh != null and bjdh != ''">
|
||||
bjdh = #{bjdh},
|
||||
</if>
|
||||
<if test="bjdhYhxm != null and bjdhYhxm != ''">
|
||||
bjdh_yhxm = #{bjdhYhxm},
|
||||
</if>
|
||||
<if test="bjdhYhdz != null and bjdhYhdz != ''">
|
||||
bjdh_yhdz = #{bjdhYhdz},
|
||||
</if>
|
||||
<if test="bjrSfzh != null and bjrSfzh != ''">
|
||||
bjr_sfzh = #{bjrSfzh},
|
||||
</if>
|
||||
<if test="bjrXm != null and bjrXm != ''">
|
||||
bjr_xm = #{bjrXm},
|
||||
</if>
|
||||
<if test="bjrXb != null and bjrXb != ''">
|
||||
bjr_xb = #{bjrXb},
|
||||
</if>
|
||||
<if test="bjrLxdh != null and bjrLxdh != ''">
|
||||
bjr_lxdh = #{bjrLxdh},
|
||||
</if>
|
||||
<if test="bjrZzdw != null and bjrZzdw != ''">
|
||||
bjr_zzdw = #{bjrZzdw},
|
||||
</if>
|
||||
<if test="sfdzxzqh != null and sfdzxzqh != ''">
|
||||
sfdzxzqh = #{sfdzxzqh},
|
||||
</if>
|
||||
<if test="sfdz != null and sfdz != ''">
|
||||
sfdz = #{sfdz},
|
||||
</if>
|
||||
<if test="bjnr != null and bjnr != ''">
|
||||
bjnr = #{bjnr},
|
||||
</if>
|
||||
<if test="jqjb != null and jqjb != ''">
|
||||
jqjb = #{jqjb},
|
||||
</if>
|
||||
<if test="bjlb != null and bjlb != ''">
|
||||
bjlb = #{bjlb},
|
||||
</if>
|
||||
<if test="bjlx != null and bjlx != ''">
|
||||
bjlx = #{bjlx},
|
||||
</if>
|
||||
<if test="bjxl != null and bjxl != ''">
|
||||
bjxl = #{bjxl},
|
||||
</if>
|
||||
<if test="bjxlmc != null and bjxlmc != ''">
|
||||
bjxlmc = #{bjxlmc},
|
||||
</if>
|
||||
<if test="bjlxmc != null and bjlxmc != ''">
|
||||
bjlxmc = #{bjlxmc},
|
||||
</if>
|
||||
<if test="bjlbmc != null and bjlbmc != ''">
|
||||
bjlbmc = #{bjlbmc},
|
||||
</if>
|
||||
<if test="ldgbh != null and ldgbh != ''">
|
||||
ldgbh = #{ldgbh},
|
||||
</if>
|
||||
<if test="bkrs != null">
|
||||
bkrs = #{bkrs},
|
||||
</if>
|
||||
<if test="ssrs != null">
|
||||
ssrs = #{ssrs},
|
||||
</if>
|
||||
<if test="swrs != null">
|
||||
swrs = #{swrs},
|
||||
</if>
|
||||
<if test="ywwxwz != null">
|
||||
ywwxwz = #{ywwxwz},
|
||||
</if>
|
||||
<if test="ywbzxl != null">
|
||||
ywbzxl = #{ywbzxl},
|
||||
</if>
|
||||
<if test="ywbkry != null">
|
||||
ywbkry = #{ywbkry},
|
||||
</if>
|
||||
<if test="sfsw != null">
|
||||
sfsw = #{sfsw},
|
||||
</if>
|
||||
<if test="sfswybj != null">
|
||||
sfswybj = #{sfswybj},
|
||||
</if>
|
||||
<if test="sfzdjq != null and sfzdjq != ''">
|
||||
sfzdjq = #{sfzdjq},
|
||||
</if>
|
||||
<if test="jd != null">
|
||||
jd = #{jd},
|
||||
</if>
|
||||
<if test="wd != null">
|
||||
wd = #{wd},
|
||||
</if>
|
||||
<if test="zb != null">
|
||||
zb = ST_GEOMFROMTEXT(#{zb,typeHandler=com.mosty.base.feign.handle.PolygonTypeHandler}),
|
||||
</if>
|
||||
<if test="zbhash != null and zbhash != ''">
|
||||
zbhash = #{zbhash},
|
||||
</if>
|
||||
<if test="czzt != null and czzt != ''">
|
||||
czzt = #{czzt},
|
||||
</if>
|
||||
<if test="zdjqtjlx != null and zdjqtjlx != ''">
|
||||
zdjqtjlx = #{zdjqtjlx},
|
||||
</if>
|
||||
<if test="ssbm != null and ssbm != ''">
|
||||
ssbm = #{ssbm},
|
||||
</if>
|
||||
<if test="ssbmdm != null and ssbmdm != ''">
|
||||
ssbmdm = #{ssbmdm},
|
||||
</if>
|
||||
<if test="ssxgaj != null and ssxgaj != ''">
|
||||
ssxgaj = #{ssxgaj},
|
||||
</if>
|
||||
<if test="ssxgajdm != null and ssxgajdm != ''">
|
||||
ssxgajdm = #{ssxgajdm},
|
||||
</if>
|
||||
<if test="sssgaj != null and sssgaj != ''">
|
||||
sssgaj = #{sssgaj},
|
||||
</if>
|
||||
<if test="sssgajdm != null and sssgajdm != ''">
|
||||
sssgajdm = #{sssgajdm},
|
||||
</if>
|
||||
<if test="xtSjly != null and xtSjly != ''">
|
||||
xt_sjly = #{xtSjly},
|
||||
</if>
|
||||
<if test="xtSjzt != null and xtSjzt != ''">
|
||||
xt_sjzt = #{xtSjzt},
|
||||
</if>
|
||||
<if test="xtScbz != null and xtScbz != ''">
|
||||
xt_scbz = #{xtScbz},
|
||||
</if>
|
||||
<if test="xtCjip != null and xtCjip != ''">
|
||||
xt_cjip = #{xtCjip},
|
||||
</if>
|
||||
<if test="xtCjsj != null">
|
||||
xt_cjsj = #{xtCjsj},
|
||||
</if>
|
||||
<if test="xtCjrId != null and xtCjrId != ''">
|
||||
xt_cjr_id = #{xtCjrId},
|
||||
</if>
|
||||
<if test="xtCjr != null and xtCjr != ''">
|
||||
xt_cjr = #{xtCjr},
|
||||
</if>
|
||||
<if test="xtCjbmdm != null and xtCjbmdm != ''">
|
||||
xt_cjbmdm = #{xtCjbmdm},
|
||||
</if>
|
||||
<if test="xtCjbmmc != null and xtCjbmmc != ''">
|
||||
xt_cjbmmc = #{xtCjbmmc},
|
||||
</if>
|
||||
<if test="xtZhgxip != null and xtZhgxip != ''">
|
||||
xt_zhgxip = #{xtZhgxip},
|
||||
</if>
|
||||
<if test="xtZhgxsj != null">
|
||||
xt_zhgxsj = #{xtZhgxsj},
|
||||
</if>
|
||||
<if test="xtZhgxrid != null and xtZhgxrid != ''">
|
||||
xt_zhgxrid = #{xtZhgxrid},
|
||||
</if>
|
||||
<if test="xtZhgxr != null and xtZhgxr != ''">
|
||||
xt_zhgxr = #{xtZhgxr},
|
||||
</if>
|
||||
<if test="xtZhgxbmdm != null and xtZhgxbmdm != ''">
|
||||
xt_zhgxbmdm = #{xtZhgxbmdm},
|
||||
</if>
|
||||
<if test="xtZhgxbm != null and xtZhgxbm != ''">
|
||||
xt_zhgxbm = #{xtZhgxbm},
|
||||
</if>
|
||||
<if test="color != null and color != ''">
|
||||
color = #{color},
|
||||
</if>
|
||||
<if test="bz != null and bz != ''">
|
||||
bz = #{bz}
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="TbJqMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from tb_jq
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEntity" parameterType="com.mosty.base.model.entity.sjzx.TbJq">
|
||||
insert into tb_jq(id, jq110_id, jjdbh, jjdwbh, jjdwmc, gljjdbh, jjybh, jjyxm, jjtbh, jjtip, hrsj, lhlxbh,
|
||||
bjfsbh, bjrq, bjsj, jjsj, jqfsksnf, jqfsksyf, jqfsksny, jqfskszs, jqfsksrq, jqfskssj,
|
||||
jqfsksxs, jqfsjssj, hrsc, jjsc, jjlyh, bjdh, bjdh_yhxm, bjdh_yhdz, bjr_sfzh, bjr_xm, bjr_xb,
|
||||
bjr_lxdh, bjr_zzdw, sfdzxzqh, sfdz, bjnr, jqjb, bjlb, bjlx, bjxl, ldgbh, bjxlmc, bjlxmc,
|
||||
bjlbmc, bkrs, ssrs, swrs, ywwxwz, ywbzxl, ywbkry, sfsw, sfswybj, sfzdjq, jd, wd,
|
||||
czzt, zdjqtjlx, ssbm, ssbmdm, ssxgaj, sfjmjq,
|
||||
ssxgajdm, sssgaj, sssgajdm, xt_sjly, xt_sjzt, xt_scbz, xt_cjip, xt_cjsj, xt_cjr_id, xt_cjr,
|
||||
xt_cjbmdm, xt_cjbmmc, xt_zhgxip, xt_zhgxsj, xt_zhgxrid, xt_zhgxr, xt_zhgxbmdm, xt_zhgxbm, bz, color,
|
||||
zb, zbhash)
|
||||
values (#{id}, #{jq110Id}, #{jjdbh}, #{jjdwbh}, #{jjdwmc}, #{gljjdbh}, #{jjybh}, #{jjyxm}, #{jjtbh}, #{jjtip},
|
||||
#{hrsj}, #{lhlxbh}, #{bjfsbh}, #{bjrq}, #{bjsj}, #{jjsj}, #{jqfsksnf}, #{jqfsksyf}, #{jqfsksny},
|
||||
#{jqfskszs}, #{jqfsksrq}, #{jqfskssj}, #{jqfsksxs}, #{jqfsjssj}, #{hrsc}, #{jjsc}, #{jjlyh},
|
||||
#{bjdh}, #{bjdhYhxm}, #{bjdhYhdz}, #{bjrSfzh}, #{bjrXm}, #{bjrXb}, #{bjrLxdh}, #{bjrZzdw},
|
||||
#{sfdzxzqh}, #{sfdz}, #{bjnr}, #{jqjb}, #{bjlb}, #{bjlx}, #{bjxl}, #{ldgbh}, #{bjxlmc}, #{bjlxmc},
|
||||
#{bjlbmc}, #{bkrs}, #{ssrs}, #{swrs},
|
||||
#{ywwxwz}, #{ywbzxl}, #{ywbkry}, #{sfsw}, #{sfswybj}, #{sfzdjq}, #{jd}, #{wd},
|
||||
#{czzt}, #{zdjqtjlx}, #{ssbm}, #{ssbmdm}, #{ssxgaj}, #{sfjmjq},
|
||||
#{ssxgajdm}, #{sssgaj}, #{sssgajdm}, #{xtSjly}, #{xtSjzt}, #{xtScbz}, #{xtCjip}, #{xtCjsj}, #{xtCjrId},
|
||||
#{xtCjr}, #{xtCjbmdm}, #{xtCjbmmc}, #{xtZhgxip}, #{xtZhgxsj}, #{xtZhgxrid}, #{xtZhgxr}, #{xtZhgxbmdm},
|
||||
#{xtZhgxbm}, #{bz}, #{color},
|
||||
ST_GEOMFROMTEXT(#{zb,typeHandler=com.mosty.base.feign.handle.PolygonTypeHandler}),
|
||||
#{zbhash} )
|
||||
</insert>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
update tb_jq
|
||||
set xt_scbz = '1'
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="getStatistics" resultType="java.util.Map">
|
||||
select bjlb, count(bjlb) count
|
||||
from tb_jq
|
||||
where xt_scbz = '0'
|
||||
and xt_sjzt = '1'
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
and bjrq >= #{startTime}
|
||||
and bjrq <= #{endTime}
|
||||
</if>
|
||||
<if test="bjnr != null and bjnr != ''">
|
||||
<!--and match(bjnr) against (#{bjnr})-->
|
||||
and bjnr like concat ('%',#{bjnr},'%')
|
||||
</if>
|
||||
group by bjlb
|
||||
</select>
|
||||
|
||||
<select id="getYjxx30Day" resultType="java.util.Map">
|
||||
select yj_lx,jd,wd,yjbqmc,ssbmdm from mosty_yjzl.tb_yjxx a where a.xt_sjzt = '1' and a.xt_scbz = '0'
|
||||
and jd is not null and wd is not null and yjbqmc is not null and yj_lx is not null
|
||||
<if test="kssj != null and kssj != ''">
|
||||
and a.yj_fsrq >= #{kssj}
|
||||
</if>
|
||||
<if test="jssj != null and jssj != ''">
|
||||
and a.yj_fsrq <= #{jssj}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getPcryList" resultType="java.util.Map">
|
||||
select jd,wd,ssbmdm from mosty_hczx.tb_hc_bpcry a where a.xt_sjzt = '1' and a.xt_scbz = '0'
|
||||
and jd is not null and wd is not null and bqxxsj is not null
|
||||
<if test="kssj != null and kssj != ''">
|
||||
and a.pcrq >= #{kssj}
|
||||
</if>
|
||||
<if test="jssj != null and jssj != ''">
|
||||
and a.pcrq <= #{jssj}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getPcclList" resultType="java.util.Map">
|
||||
select jd,wd,ssbmdm from mosty_hczx.tb_hc_bpccl a where a.xt_sjzt = '1' and a.xt_scbz = '0'
|
||||
and jd is not null and wd is not null and bqxxsj is not null
|
||||
<if test="kssj != null and kssj != ''">
|
||||
and a.pcrq >= #{kssj}
|
||||
</if>
|
||||
<if test="jssj != null and jssj != ''">
|
||||
and a.pcrq <= #{jssj}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getJqTj" resultType="java.util.Map">
|
||||
select count(1) count,jqfsksxs time from tb_jq where xt_sjzt = '1' and xt_scbz = '0'
|
||||
and bjxl in ("01110200", "01110300", "01120300", "01120400", "01120700", "01120800", "01121000","01130100",
|
||||
"01140100", "01149900", "02030200", "02030300", "02030400", "02030500", "02040100", "02050100",
|
||||
"02050400","02121700", "02130000")
|
||||
and date_format(bjrq,'%Y-%m-%d') = #{kssj}
|
||||
group by jqfsksxs order by jqfsksxs
|
||||
</select>
|
||||
|
||||
<select id="getJqTjByTime" resultType="java.util.Map">
|
||||
select count(1) count,bjrq time from tb_jq where xt_sjzt = '1' and xt_scbz = '0'
|
||||
and bjxl in ("01110200", "01110300", "01120300", "01120400", "01120700", "01120800", "01121000","01130100",
|
||||
"01140100", "01149900", "02030200", "02030300", "02030400", "02030500", "02040100", "02050100",
|
||||
"02050400","02121700", "02130000")
|
||||
and date_format(bjrq,'%Y-%m-%d') >= #{kssj} and date_format(bjrq,'%Y-%m-%d') <= #{jssj}
|
||||
group by bjrq order by bjrq
|
||||
</select>
|
||||
|
||||
<select id="getWzList" resultType="java.util.Map">
|
||||
select sum(xfsc) xfsc,sum(xflc) xflc,date_format(dwsj,'%H') time from mosty_wzzx.tb_wz_sswz a
|
||||
where a.xt_sjzt = '1' and a.xt_scbz = '0'
|
||||
and a.dwrq = #{kssj} and ywid is not null group by date_format(dwsj,'%H')
|
||||
order by time
|
||||
</select>
|
||||
|
||||
<select id="getBbList" resultType="java.util.Map">
|
||||
select sum(xfsc) xfsc,sum(xflc) xflc,date_format(xfrq,'%Y-%m-%d') time from mosty_qwgl.tb_qw_xfbb a
|
||||
where a.xt_scbz = '0' and a.xt_sjzt = '1' and a.xfrq >= #{kssj} and a.xfrq <= #{jssj}
|
||||
group by xfrq
|
||||
</select>
|
||||
|
||||
<select id="getPcryTj" resultType="java.util.Map">
|
||||
select count(1) count,date_format(pcsj,'%H') time from mosty_hczx.tb_hc_bpcry a
|
||||
where a.xt_sjzt = '1' and a.xt_scbz = '0'
|
||||
and a.pcrq = #{kssj}
|
||||
group by date_format(pcsj,'%H') order by date_format(pcsj,'%H')
|
||||
</select>
|
||||
|
||||
<select id="getPcclTj" resultType="java.util.Map">
|
||||
select count(1) count,date_format(pcsj,'%H') time from mosty_hczx.tb_hc_bpccl a
|
||||
where a.xt_sjzt = '1' and a.xt_scbz = '0'
|
||||
and a.pcrq = #{kssj}
|
||||
group by date_format(pcsj,'%H') order by date_format(pcsj,'%H')
|
||||
</select>
|
||||
|
||||
<select id="getPcZdryTj" resultType="java.util.Map">
|
||||
select count(1) count,date_format(pcsj,'%H') time from mosty_hczx.tb_hc_bpcry a
|
||||
where a.xt_sjzt = '1' and a.xt_scbz = '0'
|
||||
and a.pcrq = #{kssj} and bqmc is not null
|
||||
group by date_format(pcsj,'%H') order by date_format(pcsj,'%H')
|
||||
</select>
|
||||
|
||||
<select id="getPcryByTime" resultType="java.util.Map">
|
||||
select count(1) count,pcrq time from mosty_hczx.tb_hc_bpcry a
|
||||
where a.xt_sjzt = '1' and a.xt_scbz = '0'
|
||||
and a.pcrq >= #{kssj} and a.pcrq <=#{jssj}
|
||||
group by pcrq order by pcrq
|
||||
</select>
|
||||
|
||||
<select id="getPcclByTime" resultType="java.util.Map">
|
||||
select count(1) count,pcrq time from mosty_hczx.tb_hc_bpccl a
|
||||
where a.xt_sjzt = '1' and a.xt_scbz = '0'
|
||||
and a.pcrq >= #{kssj} and a.pcrq <=#{jssj}
|
||||
group by pcrq order by pcrq
|
||||
</select>
|
||||
|
||||
<select id="getZdryByTime" resultType="java.util.Map">
|
||||
select count(1) count,pcrq time from mosty_hczx.tb_hc_bpcry a
|
||||
where a.xt_sjzt = '1' and a.xt_scbz = '0'
|
||||
and a.pcrq >= #{kssj} and a.pcrq <=#{jssj}
|
||||
and bqmc is not null
|
||||
group by pcrq order by pcrq
|
||||
</select>
|
||||
|
||||
<update id="updateJqCzzt">
|
||||
update tb_jq set czzt = #{czzt} where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="selectDict" resultType="com.mosty.common.config.entity.SysDictItem">
|
||||
select *
|
||||
from mosty_base.sys_dict_item
|
||||
where zdbh = #{dictName} and dm = #{dm}
|
||||
and xt_zxbz = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectJjdbh" resultType="java.lang.String">
|
||||
SELECT DISTINCT jjdbh FROM tb_jq WHERE xt_scbz = '0'
|
||||
<if test="jwd != null and jwd != ''">
|
||||
AND jd is null AND wd is null
|
||||
</if>
|
||||
AND DATEDIFF(bjrq, NOW()) = 0
|
||||
</select>
|
||||
|
||||
<update id="updateJqJwd" parameterType="com.mosty.base.model.entity.sjzx.TbJq">
|
||||
update tb_jq
|
||||
<set>
|
||||
<if test="fxdwjd != null">
|
||||
jd = #{jd},
|
||||
</if>
|
||||
<if test="fxdwwd != null">
|
||||
wd = #{wd}
|
||||
</if>
|
||||
<if test="zb != null">
|
||||
zb = ST_GEOMFROMTEXT(#{zb,typeHandler=com.mosty.base.feign.handle.PolygonTypeHandler}),
|
||||
</if>
|
||||
<if test="zbhash != null and zbhash != ''">
|
||||
zbhash = #{zbhash},
|
||||
</if>
|
||||
</set>
|
||||
where jjdbh = #{jjdbh}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
91
mosty-sjzx/src/main/resources/mapper/TbSjCyjlMapper.xml
Normal file
91
mosty-sjzx/src/main/resources/mapper/TbSjCyjlMapper.xml
Normal file
@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mosty.sjzx.mapper.TbSjCyjlMapper">
|
||||
<resultMap type="com.mosty.base.model.entity.sjzx.TbSjCyjl" id="TbSjCyjlMap">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="sjId" column="sj_id" jdbcType="VARCHAR"/>
|
||||
<result property="jlId" column="jl_id" jdbcType="VARCHAR"/>
|
||||
<result property="jlSfzh" column="jl_sfzh" jdbcType="VARCHAR"/>
|
||||
<result property="jlXm" column="jl_xm" jdbcType="VARCHAR"/>
|
||||
<result property="jlLxdh" column="jl_lxdh" jdbcType="VARCHAR"/>
|
||||
<result property="sdzlsj" column="sdzlsj" jdbcType="TIMESTAMP"/>
|
||||
<result property="qszlsj" column="qszlsj" jdbcType="TIMESTAMP"/>
|
||||
<result property="ddxcsj" column="ddxcsj" jdbcType="TIMESTAMP"/>
|
||||
<result property="jssj" column="jssj" jdbcType="TIMESTAMP"/>
|
||||
<result property="mjfj" column="mjfj" jdbcType="VARCHAR"/>
|
||||
<result property="sfzyjz" column="sfzyjz" jdbcType="VARCHAR"/>
|
||||
<result property="zybqdm" column="zybqdm" jdbcType="VARCHAR"/>
|
||||
<result property="zybq" column="zybq" jdbcType="VARCHAR"/>
|
||||
<result property="dqwz" column="dqwz" jdbcType="VARCHAR"/>
|
||||
<result property="jd" column="jd" jdbcType="NUMERIC"/>
|
||||
<result property="wd" column="wd" jdbcType="NUMERIC"/>
|
||||
<result property="zb" column="zb" typeHandler="com.mosty.base.feign.handle.PolygonTypeHandler"/>
|
||||
<result property="zbhash" column="zbhash" jdbcType="VARCHAR"/>
|
||||
<result property="zbsj" column="zbsj" jdbcType="TIMESTAMP"/>
|
||||
<result property="jlzt" column="jlzt" jdbcType="VARCHAR"/>
|
||||
<result property="tpId" column="tp_id" jdbcType="VARCHAR"/>
|
||||
<result property="ssbm" column="ssbm" jdbcType="VARCHAR"/>
|
||||
<result property="ssbmdm" column="ssbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgaj" column="ssxgaj" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgajdm" column="ssxgajdm" jdbcType="VARCHAR"/>
|
||||
<result property="sssgaj" column="sssgaj" jdbcType="VARCHAR"/>
|
||||
<result property="sssgajdm" column="sssgajdm" jdbcType="VARCHAR"/>
|
||||
<result property="sssgajid" column="sssgajid" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgajid" column="ssxgajid" jdbcType="VARCHAR"/>
|
||||
<result property="ssbmid" column="ssbmid" jdbcType="VARCHAR"/>
|
||||
<result property="xtSjly" column="xt_sjly" jdbcType="VARCHAR"/>
|
||||
<result property="xtSjzt" column="xt_sjzt" jdbcType="VARCHAR"/>
|
||||
<result property="xtScbz" column="xt_scbz" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjip" column="xt_cjip" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjsj" column="xt_cjsj" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjrId" column="xt_cjr_id" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjr" column="xt_cjr" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjbmdm" column="xt_cjbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjbmmc" column="xt_cjbm" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxip" column="xt_zhgxip" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxsj" column="xt_zhgxsj" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxrid" column="xt_zhgxrid" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxr" column="xt_zhgxr" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxbmdm" column="xt_zhgxbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxbm" column="xt_zhgxbm" jdbcType="VARCHAR"/>
|
||||
<result property="bz" column="bz" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!--查询所有-->
|
||||
<select id="queryAll" resultMap="TbSjCyjlMap">
|
||||
select * from tb_sj_cyjl where xt_sjzt = '1' and xt_scbz = '0'
|
||||
${useSql}
|
||||
</select>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="TbSjCyjlMap">
|
||||
select * from tb_sj_cyjl where xt_sjzt = '1' and xt_scbz = '0'
|
||||
and id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="joinCopCount" resultType="java.util.Map">
|
||||
SELECT COUNT(*)allsl,
|
||||
(SELECT COUNT(*) from tb_sj_cyjl where xt_sjzt='1' and mjfj='01'
|
||||
<if test="t.sjId !=null and t.sjId!=''">
|
||||
and sj_id=#{t.sjId}
|
||||
</if>
|
||||
) mjsl,
|
||||
(SELECT COUNT(*) from tb_sj_cyjl where xt_sjzt='1' and mjfj='02'
|
||||
<if test="t.sjId !=null and t.sjId!=''">
|
||||
and sj_id=#{t.sjId}
|
||||
</if>
|
||||
)fjsl,
|
||||
(SELECT COUNT(*) from tb_sj_cyjl where xt_sjzt='1' and sfzyjz='1'
|
||||
<if test="t.sjId !=null and t.sjId!=''">
|
||||
and sj_id=#{t.sjId}
|
||||
</if>
|
||||
)tsjz
|
||||
from tb_sj_cyjl where xt_sjzt='1'
|
||||
<if test="t.sjId !=null and t.sjId!=''">
|
||||
and sj_id=#{t.sjId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
77
mosty-sjzx/src/main/resources/mapper/TbSjDzMapper.xml
Normal file
77
mosty-sjzx/src/main/resources/mapper/TbSjDzMapper.xml
Normal file
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mosty.sjzx.mapper.TbSjDzMapper">
|
||||
|
||||
<resultMap type="com.mosty.base.model.entity.sjzx.TbSjDz" id="tbSjdzMap">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="sjId" column="sj_id" jdbcType="VARCHAR"/>
|
||||
<result property="dztzSj" column="dztz_sj" jdbcType="TIMESTAMP"/>
|
||||
<result property="dztzRyid" column="dztz_ryid" jdbcType="VARCHAR"/>
|
||||
<result property="dztzRysfzh" column="dztz_rysfzh" jdbcType="VARCHAR"/>
|
||||
<result property="dztzRyxm" column="dztz_ryxm" jdbcType="VARCHAR"/>
|
||||
<result property="jd" column="jd" jdbcType="NUMERIC"/>
|
||||
<result property="wd" column="wd" jdbcType="NUMERIC"/>
|
||||
<result property="zb" column="zb" typeHandler="com.mosty.base.feign.handle.PolygonTypeHandler"/>
|
||||
<result property="zbhash" column="zbhash" jdbcType="VARCHAR"/>
|
||||
<result property="dzxzqh" column="dzxzqh" jdbcType="VARCHAR"/>
|
||||
<result property="dz" column="dz" jdbcType="VARCHAR"/>
|
||||
<result property="tpId" column="tp_id" jdbcType="VARCHAR"/>
|
||||
<result property="ssbm" column="ssbm" jdbcType="VARCHAR"/>
|
||||
<result property="ssbmdm" column="ssbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgaj" column="ssxgaj" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgajdm" column="ssxgajdm" jdbcType="VARCHAR"/>
|
||||
<result property="sssgaj" column="sssgaj" jdbcType="VARCHAR"/>
|
||||
<result property="sssgajdm" column="sssgajdm" jdbcType="VARCHAR"/>
|
||||
<result property="xtSjly" column="xt_sjly" jdbcType="VARCHAR"/>
|
||||
<result property="xtSjzt" column="xt_sjzt" jdbcType="VARCHAR"/>
|
||||
<result property="xtScbz" column="xt_scbz" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjip" column="xt_cjip" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjsj" column="xt_cjsj" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjrId" column="xt_cjr_id" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjr" column="xt_cjr" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjbmdm" column="xt_cjbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjbmmc" column="xt_cjbmmc" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxip" column="xt_zhgxip" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxsj" column="xt_zhgxsj" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxrid" column="xt_zhgxrid" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxr" column="xt_zhgxr" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxbmdm" column="xt_zhgxbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxbm" column="xt_zhgxbm" jdbcType="VARCHAR"/>
|
||||
<result property="bz" column="bz" jdbcType="VARCHAR"/>
|
||||
<result property="sssgajid" column="sssgajid" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgajid" column="ssxgajid" jdbcType="VARCHAR"/>
|
||||
<result property="ssbmid" column="ssbmid" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="base_column_list">
|
||||
id
|
||||
,sj_id,dztz_sj,dztz_ryid,dztz_rysfzh,dztz_ryxm,jd,wd,ssbmid,ssxgajid,sssgajid,
|
||||
zbhash,dzxzqh,dz,tp_id,ssbm, ssbmdm, ssxgaj, ssxgajdm, sssgaj, sssgajdm, xt_sjly, xt_sjzt, xt_scbz,
|
||||
xt_cjip, xt_cjsj, xt_cjr_id, xt_cjr, xt_cjbmdm, xt_cjbmmc, xt_zhgxip, xt_zhgxsj, xt_zhgxrid,
|
||||
xt_zhgxr, xt_zhgxbmdm, xt_zhgxbm, bz
|
||||
</sql>
|
||||
|
||||
<sql id="zb_sql">
|
||||
ST_ASWKT
|
||||
(zb) as zb
|
||||
</sql>
|
||||
|
||||
<insert id="insertEntity" parameterType="com.mosty.base.model.entity.sjzx.TbSjDz">
|
||||
insert into tb_sj_dz
|
||||
(id,sj_id,dztz_sj,dztz_ryid,dztz_rysfzh,dztz_ryxm,jd,wd,zb,ssbmid,ssxgajid,sssgajid,
|
||||
zbhash,dzxzqh,dz,tp_id, ssbm, ssbmdm, ssxgaj, ssxgajdm, sssgaj, sssgajdm,
|
||||
xt_sjly, xt_sjzt, xt_scbz, xt_cjip, xt_cjsj, xt_cjr_id,
|
||||
xt_cjr, xt_cjbmdm, xt_cjbmmc, xt_zhgxip, xt_zhgxsj, xt_zhgxrid,
|
||||
xt_zhgxr, xt_zhgxbmdm, xt_zhgxbm, bz)
|
||||
values (
|
||||
#{id}, #{sjId}, #{dztzSj}, #{dztzRyid}, #{dztzRysfzh}, #{dztzRyxm}, #{jd},
|
||||
#{wd},
|
||||
ST_GEOMFROMTEXT(#{zb,typeHandler = com.mosty.base.feign.handle.PolygonTypeHandler}),#{ssbmid},#{ssxgajid},#{sssgajid},
|
||||
#{zbhash},
|
||||
#{dzxzqh}, #{dz},#{tpId}, #{ssbm}, #{ssbmdm}, #{ssxgaj}, #{ssxgajdm}, #{sssgaj}, #{sssgajdm},
|
||||
#{xtSjly}, #{xtSjzt}, #{xtScbz}, #{xtCjip}, #{xtCjsj}, #{xtCjrId},#{xtCjr}, #{xtCjbmdm},
|
||||
#{xtCjbmmc}, #{xtZhgxip}, #{xtZhgxsj}, #{xtZhgxrid},#{xtZhgxr}, #{xtZhgxbmdm}, #{xtZhgxbm}, #{bz})
|
||||
</insert>
|
||||
</mapper>
|
||||
|
||||
|
281
mosty-sjzx/src/main/resources/mapper/TbSjMapper.xml
Normal file
281
mosty-sjzx/src/main/resources/mapper/TbSjMapper.xml
Normal file
@ -0,0 +1,281 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mosty.sjzx.mapper.TbSjMapper">
|
||||
|
||||
<resultMap type="com.mosty.base.model.entity.sjzx.TbSj" id="TbSjMap">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="ywId" column="yw_id" jdbcType="VARCHAR"/>
|
||||
<result property="sjFl" column="sj_fl" jdbcType="VARCHAR"/>
|
||||
<result property="sjJb" column="sj_jb" jdbcType="VARCHAR"/>
|
||||
<result property="sjFssj" column="sj_fssj" jdbcType="TIMESTAMP"/>
|
||||
<result property="sjBt" column="sj_bt" jdbcType="VARCHAR"/>
|
||||
<result property="sjNr" column="sj_nr" jdbcType="VARCHAR"/>
|
||||
<result property="bjrxm" column="bjrxm" jdbcType="VARCHAR"/>
|
||||
<result property="bjrlxdh" column="bjrlxdh" jdbcType="VARCHAR"/>
|
||||
<result property="csjd" column="csjd" jdbcType="NUMERIC"/>
|
||||
<result property="cswd" column="cswd" jdbcType="NUMERIC"/>
|
||||
<result property="cszb" column="cszb" typeHandler="com.mosty.base.feign.handle.PolygonTypeHandler"/>
|
||||
<result property="cszbhash" column="cszbhash" jdbcType="VARCHAR"/>
|
||||
<result property="csdzxzqh" column="csdzxzqh" jdbcType="VARCHAR"/>
|
||||
<result property="csdz" column="csdz" jdbcType="VARCHAR"/>
|
||||
<result property="dqjd" column="dqjd" jdbcType="NUMERIC"/>
|
||||
<result property="dqwd" column="dqwd" jdbcType="NUMERIC"/>
|
||||
<result property="dqzb" column="dqzb" typeHandler="com.mosty.base.feign.handle.PolygonTypeHandler"/>
|
||||
<result property="dqzbhash" column="dqzbhash" jdbcType="VARCHAR"/>
|
||||
<result property="dqdzxzqh" column="dqdzxzqh" jdbcType="VARCHAR"/>
|
||||
<result property="dqdz" column="dqdz" jdbcType="VARCHAR"/>
|
||||
<result property="czkssj" column="czkssj" jdbcType="TIMESTAMP"/>
|
||||
<result property="czjssj" column="czjssj" jdbcType="TIMESTAMP"/>
|
||||
<result property="qcHx" column="qc_hx" jdbcType="INTEGER"/>
|
||||
<result property="qcJj" column="qc_jj" jdbcType="INTEGER"/>
|
||||
<result property="qcGz" column="qc_gz" jdbcType="INTEGER"/>
|
||||
<result property="qcGxcs" column="qc_gxcs" jdbcType="INTEGER"/>
|
||||
<result property="qcGxsj" column="qc_gxsj" jdbcType="TIMESTAMP"/>
|
||||
<result property="tpId" column="tp_id" jdbcType="VARCHAR"/>
|
||||
<result property="czzt" column="czzt" jdbcType="VARCHAR"/>
|
||||
<result property="czsm" column="czsm" jdbcType="VARCHAR"/>
|
||||
<result property="ssbm" column="ssbm" jdbcType="VARCHAR"/>
|
||||
<result property="ssbmdm" column="ssbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgaj" column="ssxgaj" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgajdm" column="ssxgajdm" jdbcType="VARCHAR"/>
|
||||
<result property="sssgaj" column="sssgaj" jdbcType="VARCHAR"/>
|
||||
<result property="sssgajdm" column="sssgajdm" jdbcType="VARCHAR"/>
|
||||
<result property="sssgajid" column="sssgajid" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgajid" column="ssxgajid" jdbcType="VARCHAR"/>
|
||||
<result property="ssbmid" column="ssbmid" jdbcType="VARCHAR"/>
|
||||
<result property="xtSjly" column="xt_sjly" jdbcType="VARCHAR"/>
|
||||
<result property="xtSjzt" column="xt_sjzt" jdbcType="VARCHAR"/>
|
||||
<result property="xtScbz" column="xt_scbz" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjip" column="xt_cjip" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjsj" column="xt_cjsj" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjrId" column="xt_cjr_id" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjr" column="xt_cjr" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjbmdm" column="xt_cjbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjbmmc" column="xt_cjbmmc" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxip" column="xt_zhgxip" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxsj" column="xt_zhgxsj" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxrid" column="xt_zhgxrid" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxr" column="xt_zhgxr" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxbmdm" column="xt_zhgxbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxbm" column="xt_zhgxbm" jdbcType="VARCHAR"/>
|
||||
<result property="bz" column="bz" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="base_column_list">
|
||||
id
|
||||
,yw_id,sj_fl,sj_jb,bjrxm,bjrlxdh,sj_fssj,sj_bt,sj_nr,csjd,cswd,ST_ASWKT (cszb) as cszb,cszbhash,csdzxzqh,csdz,dqjd,dqwd,
|
||||
ST_ASWKT (dqzb) as dqzb,dqzbhash,dqdzxzqh,dqdz,czkssj,czjssj,qc_hx,qc_jj,qc_gz,qc_gxcs,qc_gxsj,tp_id,ssbm,
|
||||
ssbmdm, ssxgaj, ssxgajdm, sssgaj, sssgajdm, xt_sjly, xt_sjzt, xt_scbz,xt_cjip, xt_cjsj, xt_cjr_id, xt_cjr,
|
||||
xt_cjbmdm, xt_cjbmmc, xt_zhgxip, xt_zhgxsj, xt_zhgxrid,xt_zhgxr, xt_zhgxbmdm, xt_zhgxbm, bz,ssbmid,ssxgajid,sssgajid,czzt,czsm
|
||||
</sql>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="TbSjMap">
|
||||
select
|
||||
<include refid="base_column_list"/>
|
||||
from tb_sj
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insertEntity">
|
||||
insert into tb_sj(id, yw_id, sj_fl, sj_jb, bjrxm, bjrlxdh, sj_fssj, sj_bt, sj_nr, csjd, cswd, cszb, cszbhash,
|
||||
csdzxzqh, csdz,ssbmid,ssxgajid,sssgajid,czzt,czsm,
|
||||
dqjd, dqwd, dqzb, dqzbhash, dqdzxzqh, dqdz, czkssj, czjssj, qc_hx, qc_jj, qc_gz, qc_gxcs,
|
||||
qc_gxsj,
|
||||
tp_id, ssbm, ssbmdm, ssxgaj, ssxgajdm, sssgaj, sssgajdm, xt_sjly, xt_sjzt, xt_scbz,
|
||||
xt_cjip, xt_cjsj, xt_cjr_id, xt_cjr, xt_cjbmdm,
|
||||
xt_cjbmmc, xt_zhgxip, xt_zhgxsj, xt_zhgxrid, xt_zhgxr, xt_zhgxbmdm, xt_zhgxbm, bz)
|
||||
values (#{id}, #{ywId}, #{sjFl}, #{sjJb}, #{bjrxm}, #{bjrlxdh}, #{sjFssj}, #{sjBt}, #{sjNr}, #{csjd}, #{cswd},
|
||||
ST_GEOMFROMTEXT(#{cszb,typeHandler = com.mosty.base.feign.handle.PolygonTypeHandler}),
|
||||
#{cszbhash}, #{csdzxzqh}, #{csdz},#{ssbmid},#{ssxgajid},#{sssgajid},#{czzt},#{czsm}, #{dqjd}, #{dqwd},
|
||||
ST_GEOMFROMTEXT(#{dqzb,typeHandler = com.mosty.base.feign.handle.PolygonTypeHandler}), #{dqzbhash},
|
||||
#{dqdzxzqh}, #{dqdz}, #{czkssj}, #{czjssj}, #{qcHx}, #{qcJj}, #{qcGz}, #{qcGxcs}, #{qcGxsj},
|
||||
#{tpId}, #{ssbm}, #{ssbmdm}, #{ssxgaj}, #{ssxgajdm}, #{sssgaj}, #{sssgajdm}, #{xtSjly},
|
||||
#{xtSjzt}, #{xtScbz}, #{xtCjip}, #{xtCjsj}, #{xtCjrId}, #{xtCjr}, #{xtCjbmdm}, #{xtCjbmmc},
|
||||
#{xtZhgxip}, #{xtZhgxsj}, #{xtZhgxrid}, #{xtZhgxr}, #{xtZhgxbmdm}, #{xtZhgxbm}, #{bz})
|
||||
</insert>
|
||||
|
||||
<!--通过主键修改数据-->
|
||||
<update id="updateEntity">
|
||||
update tb_sj
|
||||
<set>
|
||||
<if test="ywId != null and ywId != ''">
|
||||
yw_id = #{ywId},
|
||||
</if>
|
||||
<if test="sjFl != null and sjFl != ''">
|
||||
sj_fl = #{sjFl},
|
||||
</if>
|
||||
<if test="sjJb != null and sjJb != ''">
|
||||
sj_jb = #{sjJb},
|
||||
</if>
|
||||
<if test="bjrxm != null and bjrxm != ''">
|
||||
bjrxm = #{bjrxm},
|
||||
</if>
|
||||
<if test="bjrlxdh != null and bjrlxdh != ''">
|
||||
bjrlxdh = #{bjrlxdh},
|
||||
</if>
|
||||
<if test="sjFssj != null">
|
||||
sj_fssj = #{sjFssj},
|
||||
</if>
|
||||
<if test="sjBt != null and sjBt != ''">
|
||||
sj_bt = #{sjBt},
|
||||
</if>
|
||||
<if test="sjNr != null and sjNr != ''">
|
||||
sj_nr = #{sjNr},
|
||||
</if>
|
||||
<if test="csjd != null">
|
||||
csjd = #{csjd},
|
||||
</if>
|
||||
<if test="cswd != null">
|
||||
cswd = #{cswd},
|
||||
</if>
|
||||
<if test="cszb != null">
|
||||
cszb = ST_GEOMFROMTEXT(#{cszb, typeHandler = com.mosty.base.feign.handle.PolygonTypeHandler}),
|
||||
</if>
|
||||
<if test="cszbhash != null and cszbhash != ''">
|
||||
cszbhash = #{cszbhash},
|
||||
</if>
|
||||
<if test="csdzxzqh != null and csdzxzqh != ''">
|
||||
csdzxzqh = #{csdzxzqh},
|
||||
</if>
|
||||
<if test="csdz != null and csdz != ''">
|
||||
csdz = #{csdz},
|
||||
</if>
|
||||
<if test="dqjd != null">
|
||||
dqjd = #{dqjd},
|
||||
</if>
|
||||
<if test="dqwd != null">
|
||||
dqwd = #{dqwd},
|
||||
</if>
|
||||
<if test="dqzb != null">
|
||||
dqzb = ST_GEOMFROMTEXT(#{dqzb, typeHandler = com.mosty.base.feign.handle.PolygonTypeHandler}),
|
||||
</if>
|
||||
<if test="dqzbhash != null and dqzbhash != ''">
|
||||
dqzbhash = #{dqzbhash},
|
||||
</if>
|
||||
<if test="dqdzxzqh != null and dqdzxzqh != ''">
|
||||
dqdzxzqh = #{dqdzxzqh},
|
||||
</if>
|
||||
<if test="dqdz != null and dqdz != ''">
|
||||
dqdz = #{dqdz},
|
||||
</if>
|
||||
<if test="czkssj != null">
|
||||
czkssj = #{czkssj},
|
||||
</if>
|
||||
<if test="czjssj != null">
|
||||
czjssj = #{czjssj},
|
||||
</if>
|
||||
<if test="qcHx != null">
|
||||
qc_hx = #{qcHx},
|
||||
</if>
|
||||
<if test="qcJj != null">
|
||||
qc_jj = #{qcJj},
|
||||
</if>
|
||||
<if test="qcGz != null">
|
||||
qc_gz = #{qcGz},
|
||||
</if>
|
||||
<if test="qcGxcs != null">
|
||||
qc_gxcs = #{qcGxcs},
|
||||
</if>
|
||||
<if test="qcGxsj != null">
|
||||
qc_gxsj = #{qcGxsj},
|
||||
</if>
|
||||
<if test="tpId != null and tpId != ''">
|
||||
tp_id = #{tpId},
|
||||
</if>
|
||||
<if test="czzt != null and czzt != ''">
|
||||
czzt = #{czzt},
|
||||
</if>
|
||||
<if test="czsm != null and czsm != ''">
|
||||
czsm = #{czsm},
|
||||
</if>
|
||||
<if test="ssbm != null and ssbm != ''">
|
||||
ssbm = #{ssbm},
|
||||
</if>
|
||||
<if test="ssbmdm != null and ssbmdm != ''">
|
||||
ssbmdm = #{ssbmdm},
|
||||
</if>
|
||||
<if test="ssxgaj != null and ssxgaj != ''">
|
||||
ssxgaj = #{ssxgaj},
|
||||
</if>
|
||||
<if test="ssxgajdm != null and ssxgajdm != ''">
|
||||
ssxgajdm = #{ssxgajdm},
|
||||
</if>
|
||||
<if test="sssgaj != null and sssgaj != ''">
|
||||
sssgaj = #{sssgaj},
|
||||
</if>
|
||||
<if test="sssgajdm != null and sssgajdm != ''">
|
||||
sssgajdm = #{sssgajdm},
|
||||
</if>
|
||||
<if test="ssbmid != null and ssbmid != ''">
|
||||
ssbmid = #{ssbmid},
|
||||
</if>
|
||||
<if test="ssxgajid != null and ssxgajid != ''">
|
||||
ssxgajid = #{ssxgajid},
|
||||
</if>
|
||||
<if test="sssgajid != null and sssgajid != ''">
|
||||
sssgajid = #{sssgajid},
|
||||
</if>
|
||||
<if test="xtSjly != null and xtSjly != ''">
|
||||
xt_sjly = #{xtSjly},
|
||||
</if>
|
||||
<if test="xtSjzt != null and xtSjzt != ''">
|
||||
xt_sjzt = #{xtSjzt},
|
||||
</if>
|
||||
<if test="xtScbz != null and xtScbz != ''">
|
||||
xt_scbz = #{xtScbz},
|
||||
</if>
|
||||
<if test="xtCjip != null and xtCjip != ''">
|
||||
xt_cjip = #{xtCjip},
|
||||
</if>
|
||||
<if test="xtCjsj != null">
|
||||
xt_cjsj = #{xtCjsj},
|
||||
</if>
|
||||
<if test="xtCjrId != null and xtCjrId != ''">
|
||||
xt_cjr_id = #{xtCjrId},
|
||||
</if>
|
||||
<if test="xtCjr != null and xtCjr != ''">
|
||||
xt_cjr = #{xtCjr},
|
||||
</if>
|
||||
<if test="xtCjbmdm != null and xtCjbmdm != ''">
|
||||
xt_cjbmdm = #{xtCjbmdm},
|
||||
</if>
|
||||
<if test="xtCjbmmc != null and xtCjbmmc != ''">
|
||||
xt_cjbmmc = #{xtCjbmmc},
|
||||
</if>
|
||||
<if test="xtZhgxip != null and xtZhgxip != ''">
|
||||
xt_zhgxip = #{xtZhgxip},
|
||||
</if>
|
||||
<if test="xtZhgxsj != null">
|
||||
xt_zhgxsj = #{xtZhgxsj},
|
||||
</if>
|
||||
<if test="xtZhgxrid != null and xtZhgxrid != ''">
|
||||
xt_zhgxrid = #{xtZhgxrid},
|
||||
</if>
|
||||
<if test="xtZhgxr != null and xtZhgxr != ''">
|
||||
xt_zhgxr = #{xtZhgxr},
|
||||
</if>
|
||||
<if test="xtZhgxbmdm != null and xtZhgxbmdm != ''">
|
||||
xt_zhgxbmdm = #{xtZhgxbmdm},
|
||||
</if>
|
||||
<if test="xtZhgxbm != null and xtZhgxbm != ''">
|
||||
xt_zhgxbm = #{xtZhgxbm},
|
||||
</if>
|
||||
<if test="bz != null and bz != ''">
|
||||
bz = #{bz},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete
|
||||
from tb_sj
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
59
mosty-sjzx/src/main/resources/mapper/TbSjSpbfMapper.xml
Normal file
59
mosty-sjzx/src/main/resources/mapper/TbSjSpbfMapper.xml
Normal file
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mosty.sjzx.mapper.TbSjSpbfMapper">
|
||||
<resultMap type="com.mosty.base.model.entity.sjzx.TbSjSpbf" id="TbSjSpbfMap">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="sjId" column="sj_id" jdbcType="VARCHAR"/>
|
||||
<result property="sxtId" column="sxt_id" jdbcType="VARCHAR"/>
|
||||
<result property="bfkssj" column="bfkssj" jdbcType="TIMESTAMP"/>
|
||||
<result property="bfjssj" column="bfjssj" jdbcType="TIMESTAMP"/>
|
||||
<result property="wz" column="wz" jdbcType="VARCHAR"/>
|
||||
<result property="tpId" column="tp_id" jdbcType="VARCHAR"/>
|
||||
<result property="ssbm" column="ssbm" jdbcType="VARCHAR"/>
|
||||
<result property="ssbmdm" column="ssbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgaj" column="ssxgaj" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgajdm" column="ssxgajdm" jdbcType="VARCHAR"/>
|
||||
<result property="sssgaj" column="sssgaj" jdbcType="VARCHAR"/>
|
||||
<result property="sssgajdm" column="sssgajdm" jdbcType="VARCHAR"/>
|
||||
<result property="xtSjly" column="xt_sjly" jdbcType="VARCHAR"/>
|
||||
<result property="xtSjzt" column="xt_sjzt" jdbcType="VARCHAR"/>
|
||||
<result property="xtScbz" column="xt_scbz" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjip" column="xt_cjip" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjsj" column="xt_cjsj" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjrId" column="xt_cjr_id" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjr" column="xt_cjr" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjbmdm" column="xt_cjbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjbmmc" column="xt_cjbmmc" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxip" column="xt_zhgxip" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxsj" column="xt_zhgxsj" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxrid" column="xt_zhgxrid" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxr" column="xt_zhgxr" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxbmdm" column="xt_zhgxbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxbm" column="xt_zhgxbm" jdbcType="VARCHAR"/>
|
||||
<result property="bz" column="bz" jdbcType="VARCHAR"/>
|
||||
<result property="sssgajid" column="sssgajid" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgajid" column="ssxgajid" jdbcType="VARCHAR"/>
|
||||
<result property="ssbmid" column="ssbmid" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!--查询所有-->
|
||||
<select id="queryAll" resultMap="TbSjSpbfMap">
|
||||
select * from tb_sj_spbf where xt_sjzt = '1' and xt_scbz = '0'
|
||||
${useSql}
|
||||
</select>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="TbSjSpbfMap">
|
||||
select * from tb_sj_spbf where xt_sjzt = '1' and xt_scbz = '0'
|
||||
and id = #{id}
|
||||
</select>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete
|
||||
from tb_sj_spbf
|
||||
where id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
|
16
mosty-sjzx/src/main/resources/rebel.xml
Normal file
16
mosty-sjzx/src/main/resources/rebel.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>mosty-sjzx</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="E:/project/rs/mosty-dyga-cloud/mosty-sjzx/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
Reference in New Issue
Block a user