Merge remote-tracking branch 'origin/master'
# Conflicts: # src/main/java/com/hisense/monitormanage/controller/Controller.java
This commit is contained in:
commit
3a2f2b8e38
18
pom.xml
18
pom.xml
|
@ -104,6 +104,24 @@
|
||||||
<artifactId>hutool-all</artifactId>
|
<artifactId>hutool-all</artifactId>
|
||||||
<version>5.7.18</version>
|
<version>5.7.18</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--swagger -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.springfox</groupId>
|
||||||
|
<artifactId>springfox-swagger2</artifactId>
|
||||||
|
<version>2.9.2</version>
|
||||||
|
</dependency>
|
||||||
|
<!--swagger-ui.html模式 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.springfox</groupId>
|
||||||
|
<artifactId>springfox-swagger-ui</artifactId>
|
||||||
|
<version>2.9.2</version>
|
||||||
|
</dependency>
|
||||||
|
<!--doc.html模式 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
|
<artifactId>swagger-bootstrap-ui</artifactId>
|
||||||
|
<version>1.9.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
import org.springframework.cache.annotation.EnableCaching;
|
import org.springframework.cache.annotation.EnableCaching;
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
|
@EnableSwagger2
|
||||||
@MapperScan("com.hisense.monitormanage.mapper")
|
@MapperScan("com.hisense.monitormanage.mapper")
|
||||||
@EnableCaching
|
@EnableCaching
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.hisense.monitormanage.config;
|
||||||
|
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
|
import org.springframework.context.annotation.Bean;//
|
||||||
|
import org.springframework.context.annotation.Configuration;//
|
||||||
|
import springfox.documentation.builders.ApiInfoBuilder;//
|
||||||
|
import springfox.documentation.builders.PathSelectors;//
|
||||||
|
import springfox.documentation.builders.RequestHandlerSelectors;//
|
||||||
|
import springfox.documentation.service.ApiInfo;//
|
||||||
|
import springfox.documentation.service.Contact;//
|
||||||
|
import springfox.documentation.spi.DocumentationType;//
|
||||||
|
import springfox.documentation.spring.web.plugins.Docket;//
|
||||||
|
import springfox.documentation.swagger2.annotations.EnableSwagger2;//
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author admin
|
||||||
|
* @version 1.0.0
|
||||||
|
* @ClassName SwaggerConfig.java
|
||||||
|
* @Description swagger配置类
|
||||||
|
* @createTime 2022年05月17日 09:39:00
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
@EnableSwagger2
|
||||||
|
public class SwaggerConfig {
|
||||||
|
|
||||||
|
@Value("${swagger.enable:false}")
|
||||||
|
private boolean enable;
|
||||||
|
@Bean
|
||||||
|
public Docket createRestApi(){
|
||||||
|
return new Docket(DocumentationType.SWAGGER_2)
|
||||||
|
.enable(enable)
|
||||||
|
.select()
|
||||||
|
.apis(RequestHandlerSelectors.basePackage("com.hisense.monitormanage.controller"))
|
||||||
|
.paths(PathSelectors.any())
|
||||||
|
.build()
|
||||||
|
.apiInfo(apiInfo());
|
||||||
|
}
|
||||||
|
|
||||||
|
//构建 api文档的详细信息函数,注意这里的注解引用的是哪个
|
||||||
|
private ApiInfo apiInfo() {
|
||||||
|
return new ApiInfoBuilder()
|
||||||
|
//页面标题
|
||||||
|
.title("Spring Boot Swagger2 接口文档")
|
||||||
|
//创建人
|
||||||
|
.contact(new Contact("Hisense", "", "332163564@qq.com"))
|
||||||
|
//版本号
|
||||||
|
.version("1.0")
|
||||||
|
//描述
|
||||||
|
.description("API 描述")
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -6,7 +6,6 @@ import com.hisense.monitormanage.entity.*;
|
||||||
import com.hisense.monitormanage.mapper.*;
|
import com.hisense.monitormanage.mapper.*;
|
||||||
import com.hisense.monitormanage.service.*;
|
import com.hisense.monitormanage.service.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
@ -268,6 +267,26 @@ public class Controller {
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订阅任务下发接口
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("subscribe")
|
||||||
|
public JSONObject subscribe(){
|
||||||
|
return monitorService.subscribe();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事件模板分页查询接口
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("tamplate")
|
||||||
|
public JSONObject tamplate(){
|
||||||
|
return monitorService.template();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//查询视频点播巡检结果,只取异常的
|
//查询视频点播巡检结果,只取异常的
|
||||||
// @RequestMapping("listChannelPlayStates")
|
// @RequestMapping("listChannelPlayStates")
|
||||||
// public Result listChannelPlayStates(
|
// public Result listChannelPlayStates(
|
||||||
|
|
|
@ -1,23 +1,47 @@
|
||||||
package com.hisense.monitormanage.controller;
|
package com.hisense.monitormanage.controller;
|
||||||
|
|
||||||
|
import com.hisense.monitormanage.entity.CaseCityLaw;
|
||||||
import com.hisense.monitormanage.service.SJZTService;
|
import com.hisense.monitormanage.service.SJZTService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Api(tags = "数交中台-城市执法案件")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("api/project")
|
@RequestMapping("api/project")
|
||||||
public class SJZTController {
|
public class SJZTController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private SJZTService sjztService;
|
private SJZTService sjztService;
|
||||||
|
|
||||||
|
//从接口获取案件数据
|
||||||
@GetMapping("listSJZTDatas")
|
@GetMapping("listSJZTDatas")
|
||||||
|
@ApiOperation("获取案件数据,根据后台条件调用接口获取")
|
||||||
public List<Map> listSJZTDatas(){
|
public List<Map> listSJZTDatas(){
|
||||||
return sjztService.listSJZTDatas();
|
return sjztService.listSJZTDatas();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//测试保存
|
||||||
|
@GetMapping("batchSaveSJZT")
|
||||||
|
@ApiOperation("测试保存,根据后台条件调用接口获取并保存到表,这个后台条件需要改动,也可能是做成自动任务调度")
|
||||||
|
public void batchSaveSJZT(){
|
||||||
|
sjztService.batchSave();
|
||||||
|
}
|
||||||
|
|
||||||
|
//从表中查询案件数据,需要根据要求增加条件
|
||||||
|
@GetMapping("listSJZTByDt")
|
||||||
|
@ApiOperation("获取案件数据,根据ajjlsj从表中获取")
|
||||||
|
@ApiImplicitParam(name="ajjlsj",value="案件建立时间,2021-01-01",paramType = "query",required = true,dataType = "string")
|
||||||
|
public List<CaseCityLaw> listSJZTByDt(
|
||||||
|
@RequestParam(value="ajjlsj") String ajjlsj
|
||||||
|
){
|
||||||
|
return sjztService.listSJZTByDt(ajjlsj);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ import com.hisense.monitormanage.mapper.CameraMapper;
|
||||||
import com.hisense.monitormanage.mapper.ProjectMapper;
|
import com.hisense.monitormanage.mapper.ProjectMapper;
|
||||||
import com.hisense.monitormanage.mapper.ScenicMapper;
|
import com.hisense.monitormanage.mapper.ScenicMapper;
|
||||||
import com.hisense.monitormanage.service.MonitorService;
|
import com.hisense.monitormanage.service.MonitorService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
|
@ -2,7 +2,11 @@ package com.hisense.monitormanage.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@ -13,11 +17,13 @@ import java.time.LocalDateTime;
|
||||||
* @Description 城市执法案件类
|
* @Description 城市执法案件类
|
||||||
* @createTime 2022年05月13日 15:32:00
|
* @createTime 2022年05月13日 15:32:00
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName("t_case_cityLaw")
|
||||||
public class CaseCityLaw {
|
public class CaseCityLaw {
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
private Long id;
|
private Long id;
|
||||||
private String ajbs;
|
|
||||||
private String rwh;
|
|
||||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
private LocalDateTime ajjlsj;
|
private LocalDateTime ajjlsj;
|
||||||
private String dzms;
|
private String dzms;
|
||||||
|
@ -26,140 +32,29 @@ public class CaseCityLaw {
|
||||||
private String wtlymc;
|
private String wtlymc;
|
||||||
private String ajlxbs;
|
private String ajlxbs;
|
||||||
private String ajlxmc;
|
private String ajlxmc;
|
||||||
private String wtlxbs;
|
|
||||||
private String wtlxmc;
|
|
||||||
private String dlbs;
|
private String dlbs;
|
||||||
private String dlmc;
|
private String dlmc;
|
||||||
private String xlbs;
|
private String xlbs;
|
||||||
private String xlmc;
|
private String xlmc;
|
||||||
private String wtlxdm;
|
|
||||||
private String bjbm;
|
|
||||||
private String qbs;
|
private String qbs;
|
||||||
private String qmc;
|
private String qmc;
|
||||||
private String jdbs;
|
private String jdbs;
|
||||||
private String jdmc;
|
private String jdmc;
|
||||||
private String sqbs;
|
private String sqbs;
|
||||||
private String sqmc;
|
private String sqmc;
|
||||||
private String wgbs;
|
private String xzb;
|
||||||
private String wgmc;
|
private String yzb;
|
||||||
private String zrwgbs;
|
|
||||||
private String zrwgmc;
|
|
||||||
private String dlbs2;
|
|
||||||
private String dlmc2;
|
|
||||||
private String dllxbs;
|
|
||||||
private String dllxmc;
|
|
||||||
private double xzb;
|
|
||||||
private double yzb;
|
|
||||||
private String hdsxbs;
|
|
||||||
private String wtdjbs;
|
|
||||||
private String wtdjmc;
|
|
||||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
private LocalDateTime pqsj;
|
private LocalDateTime pqsj;
|
||||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
private LocalDateTime ajjssj;
|
private LocalDateTime ajjssj;
|
||||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
private LocalDateTime ajzfsj;
|
private LocalDateTime ajzfsj;
|
||||||
private String ywbs;
|
|
||||||
private String ywmc;
|
|
||||||
private String tlxsys;
|
|
||||||
private String latjbs;
|
|
||||||
private String latjmc;
|
|
||||||
private String jatjbs;
|
|
||||||
private String jatjmc;
|
|
||||||
private String ajxsbh;
|
|
||||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
|
||||||
private LocalDateTime ajzxhdsj;
|
|
||||||
private String ajgkbs;
|
|
||||||
private String jjhts;
|
|
||||||
private String jjyqs;
|
|
||||||
private String yjzbbs;
|
|
||||||
private String yjzbmc;
|
|
||||||
private String ejzbbs;
|
|
||||||
private String ejzbmc;
|
|
||||||
private String mqsbzrzt;
|
|
||||||
private String zsqybs;
|
|
||||||
private String zsqymc;
|
|
||||||
private String zsjdbs;
|
|
||||||
private String zsjdmc;
|
|
||||||
private String zssqbs;
|
|
||||||
private String zssqmc;
|
|
||||||
private String dxlx;
|
|
||||||
private String dxly;
|
|
||||||
private String dxsbrxm;
|
|
||||||
private String sfbmbs;
|
|
||||||
private String czsxcqjaaqjacqwjayqja;
|
private String czsxcqjaaqjacqwjayqja;
|
||||||
private String sbtpsl;
|
private String sbtpsl;
|
||||||
private String cztpsl;
|
private String cztpsl;
|
||||||
private String clssqy;
|
|
||||||
private String clssgs;
|
|
||||||
private String sbqy;
|
|
||||||
private String sfxhfsf;
|
|
||||||
private String sqbhfsf;
|
|
||||||
private String mydmyybbmy;
|
|
||||||
private String hfnr;
|
|
||||||
private String bslly;
|
|
||||||
private String sfggdxl;
|
|
||||||
private String bmyly;
|
|
||||||
private String zjbjs;
|
|
||||||
private String tsyqs;
|
|
||||||
private String jalxbs;
|
|
||||||
private String zdajshztzzy;
|
|
||||||
private String sfzdajzzy;
|
|
||||||
private String zflas;
|
|
||||||
private String zfajh;
|
|
||||||
private String zfrwh;
|
|
||||||
private String czgwbs;
|
|
||||||
private String czgw;
|
|
||||||
private String dbs;
|
|
||||||
private String dfdbs;
|
|
||||||
private String asdfdbs;
|
|
||||||
private String csdfdbs;
|
|
||||||
private String mydpf;
|
|
||||||
private String glajbs;
|
|
||||||
private String yqcs;
|
|
||||||
private String gzcs;
|
|
||||||
private String jxid;
|
|
||||||
private String jxmc;
|
|
||||||
private String csbs;
|
|
||||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
|
||||||
private LocalDateTime dbsj;
|
|
||||||
private String dbrybs;
|
|
||||||
private String dbryxm;
|
|
||||||
private String fjfz;
|
|
||||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
|
||||||
private LocalDateTime ldsj;
|
|
||||||
private String sfdybs;
|
|
||||||
private String cxbls;
|
|
||||||
private String ldbs;
|
|
||||||
private String ldmc;
|
|
||||||
private String xybs;
|
|
||||||
private String xymc;
|
|
||||||
private String gdlxbs;
|
|
||||||
private String gdlx;
|
|
||||||
private String zajrwh;
|
|
||||||
private String zajbzw1zrw0zrw1ptrw;
|
|
||||||
private String zxpccgh;
|
|
||||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
|
||||||
private LocalDateTime scpqsj;
|
|
||||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
|
||||||
private LocalDateTime zhycpqsj;
|
|
||||||
private String bqzd;
|
|
||||||
private String dpbs;
|
|
||||||
private String wjlxid;
|
|
||||||
private String bjys;
|
|
||||||
private String ztys;
|
|
||||||
private String sbrssbm;
|
|
||||||
private String yczjdzpwgkehtbs1htg0whtg;
|
|
||||||
private String yczjdzpwgkehtcs;
|
|
||||||
private String wgxggajfsdgaryhdpch;
|
|
||||||
private String wgxggdhhm;
|
|
||||||
private String xflb;
|
|
||||||
private String yjjbajje;
|
|
||||||
private String yqajstgyqdzpdbjrw1;
|
|
||||||
private String sqjaj;
|
|
||||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
|
||||||
private LocalDateTime operatetime;
|
|
||||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
|
||||||
private LocalDateTime updatetime;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,5 +14,7 @@ import java.util.Map;
|
||||||
* @createTime 2022年05月13日 16:22:00
|
* @createTime 2022年05月13日 16:22:00
|
||||||
*/
|
*/
|
||||||
public interface CaseCityLawMapper extends BaseMapper<CaseCityLaw> {
|
public interface CaseCityLawMapper extends BaseMapper<CaseCityLaw> {
|
||||||
|
//public void batchSave(List<Map> list);
|
||||||
public void batchSave(List<Map> list);
|
public void batchSave(List<Map> list);
|
||||||
|
public void singleSave(Map map);
|
||||||
}
|
}
|
||||||
|
|
|
@ -585,7 +585,7 @@ public class MonitorService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//渣土车轨迹数据
|
//渣土车轨迹数据,最新的
|
||||||
public List<Map> resCatalogApplyZTYS () {
|
public List<Map> resCatalogApplyZTYS () {
|
||||||
String token = this.qidiToken();
|
String token = this.qidiToken();
|
||||||
HttpHeaders headers = new HttpHeaders();
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
|
|
@ -3,7 +3,11 @@ package com.hisense.monitormanage.service;
|
||||||
import cn.hutool.crypto.SecureUtil;
|
import cn.hutool.crypto.SecureUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator;
|
||||||
|
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
import com.hisense.monitormanage.entity.CaseCityLaw;
|
||||||
import com.hisense.monitormanage.mapper.CaseCityLawMapper;
|
import com.hisense.monitormanage.mapper.CaseCityLawMapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -83,21 +87,10 @@ public class SJZTService {
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
JSONObject search = new JSONObject();
|
JSONObject search = new JSONObject();
|
||||||
search.put("opt","LIKE");
|
search.put("opt","LIKE");
|
||||||
search.put("key","AJJLSJ");
|
search.put("key","WTLYMC");
|
||||||
// search.put("val",this.dateStr());
|
// search.put("val",this.dateStr());
|
||||||
search.put("val","2017");
|
search.put("val","微信举报");
|
||||||
|
|
||||||
// search.put("opt","EQ");
|
|
||||||
// search.put("key","SPEED");
|
|
||||||
// search.put("val","0");
|
|
||||||
// JSONArray searchArray = new JSONArray();
|
|
||||||
// searchArray.add(search);
|
|
||||||
// String encode = "";
|
|
||||||
// try {
|
|
||||||
// encode = URLEncoder.encode(JSONObject.toJSONString(searchArray), "UTF-8").replace("+", "%20");
|
|
||||||
// } catch (UnsupportedEncodingException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// }
|
|
||||||
map.put("json",search);
|
map.put("json",search);
|
||||||
int i = 1;
|
int i = 1;
|
||||||
int roundCount = 0;
|
int roundCount = 0;
|
||||||
|
@ -114,7 +107,6 @@ public class SJZTService {
|
||||||
JSONObject jsonObject = responseEntity.getBody();
|
JSONObject jsonObject = responseEntity.getBody();
|
||||||
count = jsonObject.getIntValue("count");
|
count = jsonObject.getIntValue("count");
|
||||||
JSONArray jsonArray = jsonObject.getJSONArray("list");
|
JSONArray jsonArray = jsonObject.getJSONArray("list");
|
||||||
log.info("[listSJZTDatas] 返回数据的数量:{}",jsonArray.size());
|
|
||||||
maps.addAll(JSONObject.parseArray(JSONObject.toJSONString(jsonArray), Map.class));
|
maps.addAll(JSONObject.parseArray(JSONObject.toJSONString(jsonArray), Map.class));
|
||||||
i++;
|
i++;
|
||||||
roundCount = i*10000;
|
roundCount = i*10000;
|
||||||
|
@ -123,11 +115,12 @@ public class SJZTService {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} while(roundCount <=count);
|
} while(roundCount <=count);
|
||||||
System.out.println(maps.size());
|
|
||||||
|
log.info("[listSJZTDatas] 返回数据的数量:{}",maps.size());
|
||||||
return maps;
|
return maps;
|
||||||
}
|
}
|
||||||
|
|
||||||
//保存案件数据
|
//从接口获取案件数据并保存
|
||||||
public void batchSave(){
|
public void batchSave(){
|
||||||
String token = this.sjztToken();
|
String token = this.sjztToken();
|
||||||
HttpHeaders headers = new HttpHeaders();
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
@ -137,6 +130,7 @@ public class SJZTService {
|
||||||
JSONObject search = new JSONObject();
|
JSONObject search = new JSONObject();
|
||||||
search.put("opt","LIKE");
|
search.put("opt","LIKE");
|
||||||
search.put("key","AJJLSJ");
|
search.put("key","AJJLSJ");
|
||||||
|
// search.put("val",this.dateStr());
|
||||||
search.put("val","2017");
|
search.put("val","2017");
|
||||||
|
|
||||||
map.put("json",search);
|
map.put("json",search);
|
||||||
|
@ -163,14 +157,25 @@ public class SJZTService {
|
||||||
}
|
}
|
||||||
} while(roundCount <=count);
|
} while(roundCount <=count);
|
||||||
System.out.println(mapList.size());
|
System.out.println(mapList.size());
|
||||||
List<List<Map>> lists = Lists.partition(mapList,200);
|
|
||||||
|
IdentifierGenerator identifierGenerator=new DefaultIdentifierGenerator();
|
||||||
|
mapList.forEach(m-> m.put("id",identifierGenerator.nextId(new Object())));//给id赋值
|
||||||
|
|
||||||
|
List<List<Map>> lists = Lists.partition(mapList,50);
|
||||||
try{
|
try{
|
||||||
lists.forEach(l->caseCityLawMapper.batchSave(l));
|
lists.forEach(l->caseCityLawMapper.batchSave(l));
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
log.error("[SJZTService batchsave Exception]:",e.getMessage());
|
log.error("[SJZTService batchsave Exception]:",e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<CaseCityLaw> listSJZTByDt(String ajjlsj){
|
||||||
|
QueryWrapper<CaseCityLaw> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.like("ajjlsj",ajjlsj);
|
||||||
|
return caseCityLawMapper.selectList(wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//获取当前日期的时间串,2022-05-08 00:00:00
|
//获取当前日期的时间串,2022-05-08 00:00:00
|
||||||
|
|
|
@ -11,7 +11,7 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||||
spring.datasource.name=defaultDataSource
|
spring.datasource.name=defaultDataSource
|
||||||
# 数据库连接地址
|
# 数据库连接地址
|
||||||
#spring.datasource.url=jdbc:mysql://15.72.183.91:3306/monitor_manage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
#spring.datasource.url=jdbc:mysql://15.72.183.91:3306/monitor_manage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
spring.datasource.url=jdbc:mysql://15.72.183.91:3306/monitor_manage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=true&serverTimezone=GMT%2B8
|
spring.datasource.url=jdbc:mysql://15.72.183.91:3306/monitor_manage?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=true&serverTimezone=GMT%2B8
|
||||||
# 数据库用户名&密码:
|
# 数据库用户名&密码:
|
||||||
spring.datasource.username=root
|
spring.datasource.username=root
|
||||||
spring.datasource.password=w@CmM1mBVQkPhdrc
|
spring.datasource.password=w@CmM1mBVQkPhdrc
|
||||||
|
@ -21,4 +21,6 @@ hwx.file.work-path=D:/tupian/
|
||||||
hwx.file.pic-host=http://127.0.0.1:7009
|
hwx.file.pic-host=http://127.0.0.1:7009
|
||||||
spring.resources.static-locations=classpath:/static,classpath:/public,file:${hwx.file.work-path}
|
spring.resources.static-locations=classpath:/static,classpath:/public,file:${hwx.file.work-path}
|
||||||
mybatis-plus.mapper-locations=classpath*:/mapper/*.xml
|
mybatis-plus.mapper-locations=classpath*:/mapper/*.xml
|
||||||
|
#??????swagger,true???false??
|
||||||
|
swagger.enable=true
|
||||||
|
|
||||||
|
|
|
@ -4,19 +4,35 @@
|
||||||
|
|
||||||
<insert id="batchSave" parameterType="java.util.List">
|
<insert id="batchSave" parameterType="java.util.List">
|
||||||
INSERT INTO t_case_citylaw
|
INSERT INTO t_case_citylaw
|
||||||
(ajjlsj,dzms,wtms,wtlybs,wtlymc,ajlxbs,ajlxmc,dlbs,dlmc,xlbs,xlmc,qbs,qmc,jdbs,
|
(id,ajjlsj,dzms,wtms,wtlybs,wtlymc,ajlxbs,ajlxmc,dlbs,dlmc,xlbs,xlmc,qbs,qmc,jdbs,
|
||||||
jdmc,sqbs,sqmc,xab,yzb,pqsj,sjjssj,ajzfsj,casxcqjaaqjacqwjayqja,sbtpsl,catpsl
|
jdmc,sqbs,sqmc,xzb,yzb,pqsj,ajjssj,ajzfsj,czsxcqjaaqjacqwjayqja,sbtpsl,cztpsl
|
||||||
)
|
)
|
||||||
VALUES
|
VALUES
|
||||||
<foreach collection="list" item="item" separator="," >
|
<foreach collection="list" item="item" separator="," >
|
||||||
(
|
(
|
||||||
#{item.AJJLSJ},#{item.DZMS},#{item.WTMS},#{item.WTLYBS},#{item.WTLYMC},
|
#{item.id},#{item.AJJLSJ},#{item.DZMS},#{item.WTMS},#{item.WTLYBS},#{item.WTLYMC},
|
||||||
#{item.AJLXBS},#{item.AJLXMC},#{item.DLBS},#{item.DLMC},#{item.XLBS},
|
#{item.AJLXBS},#{item.AJLXMC},#{item.DLBS},#{item.DLMC},#{item.XLBS},
|
||||||
#{item.XLMC},#{item.QBS},#{item.QMC},#{item.JDBS},#{item.JDMC},#{item.SQBS},
|
#{item.XLMC},#{item.QBS},#{item.QMC},#{item.JDBS},#{item.JDMC},#{item.SQBS},
|
||||||
#{item.SQMC},#{item.XZB},#{item.YZB},#{item.PQSJ},#{item.AJJSSJ},#{item.AJZFSJ},
|
#{item.SQMC},#{item.XZB},#{item.YZB},#{item.PQSJ},#{item.AJJSSJ},#{item.AJZFSJ},
|
||||||
#{item.CZSXCQJAAQJACQWJAYQJA},#{item.SBTPSL},#{item.CZTPSL}
|
#{item.CZSXCQJAAQJACQWJAYQJA},#{item.SBTPSL},#{item.CZTPSL}
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="singleSave" parameterType="java.util.Map">
|
||||||
|
INSERT INTO t_case_citylaw
|
||||||
|
(id,ajjlsj,dzms,wtms,wtlybs,wtlymc,ajlxbs,ajlxmc,dlbs,dlmc,xlbs,xlmc,qbs,qmc,jdbs,
|
||||||
|
jdmc,sqbs,sqmc,xzb,yzb,pqsj,ajjssj,ajzfsj,czsxcqjaaqjacqwjayqja,sbtpsl,cztpsl
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
#{id},#{AJJLSJ},#{DZMS},#{WTMS},#{WTLYBS},#{WTLYMC},
|
||||||
|
#{AJLXBS},#{AJLXMC},#{DLBS},#{DLMC},#{XLBS},
|
||||||
|
#{XLMC},#{QBS},#{QMC},#{JDBS},#{JDMC},#{SQBS},
|
||||||
|
#{SQMC},#{XZB},#{YZB},#{PQSJ},#{AJJSSJ},#{AJZFSJ},
|
||||||
|
#{itCZSXCQJAAQJACQWJAYQJA},#{SBTPSL},#{CZTPSL}
|
||||||
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -37,11 +37,5 @@ class MonitorManageApplicationTests {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void reverseGeocodeTest(){
|
|
||||||
String location = "location";
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
|
||||||
map.put("location",location);
|
|
||||||
monitorService.reverseGeocode(map);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue