Commit 14b30aa4 by cc150520900118

时空内蒙

parent b7d43a49
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>service</artifactId>
<groupId>com.founder</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>view</artifactId>
<build>
<finalName>view</finalName>
</build>
</project>
\ No newline at end of file
package com.founder.asj;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@SpringBootApplication
@EnableSwagger2
public class AsjApplication {
public static void main(String[] args) {
System.setProperty("es.set.netty.runtime.available.processors", "false");
SpringApplication.run(AsjApplication.class, args);
}
}
package com.founder.asj.config;
import com.baomidou.mybatisplus.core.injector.ISqlInjector;
import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@MapperScan("com.founder.asj.mapper")
public class EduConfig {
/**
* 逻辑删除插件
*/
@Bean
public ISqlInjector sqlInjector() {
return new LogicSqlInjector();
}
/**
* 分页插件
*/
@Bean
public PaginationInterceptor paginationInterceptor() {
return new PaginationInterceptor();
}
}
package com.founder.asj.config;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.core.injector.ISqlInjector;
import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
@Configuration
@MapperScan(basePackages = {"com.founder.asj.mapper"},
sqlSessionTemplateRef = "xzxtSqlTemplate")
public class MybatisBaseDbConfig {
@Bean(name = "xzxtdbDatasource")
@ConfigurationProperties(prefix = "spring.datasource.xzxtdb")
public DruidDataSource druidXzxtdbDatasource()
{
return DruidDataSourceBuilder.create().build();
}
@Bean(name = "xzxtdbSqlFactory")
@Primary
public SqlSessionFactory sqlSessionFactory(@Qualifier("xzxtdbDatasource") DruidDataSource dataSource)
throws Exception
{
MybatisSqlSessionFactoryBean factoryBean = new MybatisSqlSessionFactoryBean();
factoryBean.setDataSource(dataSource);
MybatisConfiguration configuration = new MybatisConfiguration();
factoryBean.setConfiguration(configuration);
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
factoryBean.setMapperLocations(resolver.getResources("classpath*:com/founder/asj/mapper/xml/*.xml"));
return factoryBean.getObject();
}
@Bean(name = "xzxtSqlTemplate")
@Primary
public SqlSessionTemplate sqlSessionTemplate(@Qualifier("xzxtdbSqlFactory")
SqlSessionFactory sqlSessionFactory)
{
return new SqlSessionTemplate(sqlSessionFactory);
}
}
package com.founder.asj.config;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
import com.baomidou.mybatisplus.core.injector.ISqlInjector;
import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
@Configuration
@MapperScan(basePackages = {"com.founder.asj.qgxzMapper"},
sqlSessionTemplateRef = "qgSqlTemplate")
public class MybatisQgDbConfig {
@Bean(name = "qgdbDatasource")
@ConfigurationProperties(prefix = "spring.datasource.qgdb")
public DruidDataSource druidQgdbDatasource()
{
return DruidDataSourceBuilder.create().build();
}
@Bean(name = "qgdbSqlFactory")
public SqlSessionFactory sqlSessionFactory(@Qualifier("qgdbDatasource") DruidDataSource dataSource)
throws Exception
{
MybatisSqlSessionFactoryBean factoryBean = new MybatisSqlSessionFactoryBean();
factoryBean.setDataSource(dataSource);
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
factoryBean.setMapperLocations(resolver.getResources("classpath*:com/founder/asj/qgxzMapper/xml/*.xml"));
return factoryBean.getObject();
}
@Bean(name = "qgSqlTemplate")
public SqlSessionTemplate sqlSessionTemplate(@Qualifier("qgdbSqlFactory")
SqlSessionFactory sqlSessionFactory)
{
return new SqlSessionTemplate(sqlSessionFactory);
}
}
package com.founder.asj.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.founder.asj.service.SysUsersService;
import com.founder.asj.service.TbStAsjBzService;
import com.founder.asj.service.TbStAsjService;
import com.founder.commonutils.viewEntity.AsjQuery;
import com.founder.commonutils.viewEntity.CbxszAndXlaj;
import com.founder.commonutils.viewEntity.TbStAsj;
import com.founder.commonutils.viewEntity.TbXwAsjbz;
import com.founder.commonutils.publicEntity.MapRestResult;
import com.founder.commonutils.publicEntity.Receiving;
import com.founder.commonutils.publicEntity.SysUser;
import com.founder.servicebase.logs.OperLog;
import com.founder.servicebase.logs.OperationType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>
* 案事件基本信息 前端控制器
* </p>
*
* @author Guojunfeng
* @since 2021-03-03
*/
@Api(description = "案事件管理")
@RestController
@RequestMapping("/asj")
public class TbStAsjController {
@Autowired
private SysUsersService sysUsersService;
@Autowired
private TbStAsjService tbStAsjService;
@Autowired
private TbStAsjBzService tbStAsjBzService;
@Value("${ssdw}")
private String ssdw;
//案件查询(存储reids)
@OperLog(message = "案件查询",operation = OperationType.QUERY)
@ApiOperation(value = "案件查询(存储reids)")
@PostMapping("/ajxx")
public MapRestResult selectAsjxx(@RequestBody Receiving receiving) {
receiving.setSsdw(ssdw);//设置所属单位,用于案件类别代码转译
//return tbStAsjService.selectAsjxxList(receiving);
List<TbStAsj> asjList = tbStAsjService.selectAsjxxList(receiving);
return MapRestResult.ok(asjList);
}
//案件查询(同类案件 chent20200507)
@OperLog(message = "案件查询(同类案件)",operation = OperationType.QUERY)
@ApiOperation(value = "案件查询(同类案件)")
@PostMapping("/tlajxx")
public MapRestResult selectTlAsjxx(@RequestBody Receiving receiving) {
return tbStAsjService.selectTlAsjxxList(receiving);
}
@OperLog(message = "按条件查询案件",operation = OperationType.QUERY)
@ApiOperation(value = "按条件查询案件")
@PostMapping("/getAsj")
public MapRestResult getAsj(@RequestBody AsjQuery asjQuery) {
QueryWrapper<TbStAsj> wrapper = new QueryWrapper<>();
String asjbh = asjQuery.getAsjbh();
String ajmc = asjQuery.getAjmc();
String xsjqlbdm = asjQuery.getXsjqlbdm();
Date begin = asjQuery.getBegin();
Date end = asjQuery.getEnd();
//判断条件值是否为空,如果不为空拼接条件
if (!StringUtils.isEmpty(asjbh)) {
wrapper.eq("asjbh", asjbh);
}
if (!StringUtils.isEmpty(ajmc)) {
wrapper.like("ajmc", ajmc);
}
if (!StringUtils.isEmpty(xsjqlbdm)) {
wrapper.eq("xsjqlbdm", xsjqlbdm);
}
if (!StringUtils.isEmpty(begin)) {
wrapper.ge("ASJFSSJ_ASJFSKSSJ", begin);
}
if (!StringUtils.isEmpty(end)) {
wrapper.le("ASJFSSJ_ASJFSJSSJ", end);
}
List<TbStAsj> list = tbStAsjService.list(wrapper);
return MapRestResult.ok(list);
}
@OperLog(message = "获取所有案件(带分页)",operation = OperationType.QUERY)
@ApiOperation(value = "获取所有案件(带分页)")
@GetMapping("getPageAsj/{current}/{limit}")
public MapRestResult getPageAsj(@PathVariable long current,
@PathVariable long limit) {
//创建page对象
Page<TbStAsj> pageAsj = new Page<>(current, limit);
tbStAsjService.page(pageAsj, null);
long total = pageAsj.getTotal();//总记录数
List<TbStAsj> records = pageAsj.getRecords(); //数据list集合
return MapRestResult.build(202,"成功获取案件信息",total,records);
}
@OperLog(message = "带条件查询所有案件(带分页)",operation = OperationType.QUERY)
@ApiOperation(value = "带条件查询所有案件(带分页)")
@PostMapping("getPageAsjCondition/{current}/{limit}")
public MapRestResult getPageAsjCondition(@PathVariable long current, @PathVariable long limit,
@RequestBody(required = false) AsjQuery asjQuery) {
//创建page对象
Page<TbStAsj> pageAsj = new Page<>(current, limit);
//构建条件
QueryWrapper<TbStAsj> wrapper = new QueryWrapper<>();
String asjbh = asjQuery.getAsjbh();
String ajmc = asjQuery.getAjmc();
String xsjqlbdm = asjQuery.getXsjqlbdm();
Date begin = asjQuery.getBegin();
Date end = asjQuery.getEnd();
//判断条件值是否为空,如果不为空拼接条件
if (!StringUtils.isEmpty(asjbh)) {
wrapper.eq("asjbh", asjbh);
}
if (!StringUtils.isEmpty(ajmc)) {
wrapper.like("ajmc", ajmc);
}
if (!StringUtils.isEmpty(xsjqlbdm)) {
wrapper.eq("xsjqlbdm", xsjqlbdm);
}
if (!StringUtils.isEmpty(begin)) {
wrapper.ge("ASJFSSJ_ASJFSKSSJ", begin);
}
if (!StringUtils.isEmpty(end)) {
wrapper.le("ASJFSSJ_ASJFSJSSJ", end);
}
//调用方法实现条件查询分页
tbStAsjService.page(pageAsj,wrapper);
long total = pageAsj.getTotal();//总记录数
List<TbStAsj> records = pageAsj.getRecords(); //数据list集合
return MapRestResult.build(202,"成功获取案件信息",total,records);
}
@OperLog(message = "修改案件",operation = OperationType.QUERY)
@ApiOperation(value = "修改案件")
@PutMapping("updateAsj")
public MapRestResult updateAsj(@RequestBody TbStAsj tbStAsj) {
boolean flag = tbStAsjService.updateById(tbStAsj);
if (flag) {
return MapRestResult.ok();
} else {
return MapRestResult.error();
}
}
@ApiOperation(value = "获取案件标注信息")
@PostMapping("getAsjbzxx")
public MapRestResult get(@ApiParam(name = "asjbh", value = "案事件编号",required = true)
@RequestParam String asjbh) {
QueryWrapper<TbXwAsjbz> wrapper = new QueryWrapper<>();
//判断条件值是否为空,如果不为空拼接条件
if (!StringUtils.isEmpty(asjbh)) {
wrapper.eq("asjbh", asjbh);
}
//设置需要查询的字段
wrapper.select("ASJBH","AJZLB","AJXZLB","XALBDMBCMS",
"(select name from sys_dictitem where groupid='CODE_AJZLB'"+ "and code=AJZLB) as XSZALXDMSTR"
,"(select name from sys_dictitem where groupid='CODE_AJXZLB'"+"and code=AJXZLB) as XSLALXDMSTR"
,"(select name from sys_dictitem where groupid='CODE_XALBDMBCMS'"+"and code=XALBDMBCMS) as XALBDMBCMSSTR");
TbXwAsjbz asjbz = tbStAsjBzService.getOne(wrapper);
return MapRestResult.build(202,"成功获取案件标注信息","1",asjbz);
}
// 查询案事件标注信息
@OperLog(message = "获取串并线索组信息",operation = OperationType.QUERY)
@ApiOperation(value = "获取串并线索组信息")
@PostMapping("/getAsjxxCbzAndXlaj")
public MapRestResult getAsjxxCbzAndXlaj(@ApiParam(name = "asjbh", value = "案事件编号")
@RequestParam(required = true) String asjbh) {
JSONObject acb = new JSONObject();
JSONObject a = new JSONObject();
Map xszajbhMap = new HashMap<>();
// 通过案件编号去TB_YW_XSZ_CBAJ查询XSZAJBH
List<String> xszajbh = tbStAsjService.getXszajbhByAsjbh(asjbh);
if(xszajbh.size()>0){
xszajbhMap.put("listxszajbh",xszajbh);
xszajbhMap.put("asjbhs",asjbh);
// 通过该线索组编号在查询TB_YW_XSZ_CBAJ中 相关比重类型和案事件编号(出去传入的案件)
List<CbxszAndXlaj> listXszXgaj = tbStAsjService.GetlistXszXgaj(xszajbhMap);
// 将查回的线索组封装成json
JSONArray jsonArray = new JSONArray();
for(CbxszAndXlaj xsz : listXszXgaj){
JSONObject jo = new JSONObject();
if(!"".equals(xsz.getAsjbh())&&null!=xsz.getAsjbh()) {
jo.put("asjbh", xsz.getAsjbh());
}else{
jo.put("asjbh", "");
}
if(!"".equals(xsz.getCblx())&&null!=xsz.getCblx()) {
jo.put("cblx", xsz.getCblx());
}else{
jo.put("cblx", "");
}
if(!"".equals(xsz.getCblx_str())&&null!=xsz.getCblx_str()) {
jo.put("cblx_str", xsz.getCblx_str());
}else{
jo.put("cblx_str", "");
}
if(!"".equals(xsz.getAjmc())&&null!=xsz.getAjmc()) {
jo.put("ajmc", xsz.getAjmc());
}else{
jo.put("ajmc", "");
}
if(!"".equals(xsz.getAsjfssj_asjfskssj())&&null!=xsz.getAsjfssj_asjfskssj()) {
jo.put("asjfssj_asjfskssj", xsz.getAsjfssj_asjfskssj());
}else{
jo.put("asjfssj_asjfskssj", "");
}
if(!"".equals(xsz.getZcjdmc())&&null!=xsz.getZcjdmc()) {
jo.put("zcjdmc", xsz.getZcjdmc());
}else{
jo.put("zcjdmc", "");
}
if(!"".equals(xsz.getAjzlbmc())&&null!=xsz.getAjzlbmc()) {
jo.put("ajzlbmc", xsz.getAjzlbmc());
}else{
jo.put("ajzlbmc", "");
}
if(!"".equals(xsz.getAjxzlbmc())&&null!=xsz.getAjxzlbmc()) {
jo.put("ajxzlbmc", xsz.getAjxzlbmc());
}else{
jo.put("ajxzlbmc", "");
}
if(!"".equals(xsz.getXalbdmbcmsmc())&&null!=xsz.getXalbdmbcmsmc()) {
jo.put("xalbdmbcmsmc", xsz.getXalbdmbcmsmc());
}else{
jo.put("xalbdmbcmsmc", "");
}
if(!"".equals(xsz.getX())&&null!=xsz.getX()) {
jo.put("X", xsz.getX());
}else{
jo.put("X", "");
}
if(!"".equals(xsz.getY())&&null!=xsz.getY()) {
jo.put("Y", xsz.getY());
}else{
jo.put("Y", "");
}
if(!"".equals(xsz.getJyaq())&&null!=xsz.getJyaq()) {
jo.put("jyaq", xsz.getJyaq());
}else{
jo.put("jyaq", "");
}
jsonArray.add(jo);
}
a.put("xszaj",jsonArray);
System.out.println("线索组返回的list="+a.toString());
}
// 同样过案件编号去TB_YW_CBZ_CBAJ查询XLAJBH
List<String> listXlajbh = tbStAsjService.getXlajbhByAsjbh(asjbh);
if(listXlajbh.size()>0){
xszajbhMap.put("listXlajbh",listXlajbh);
xszajbhMap.put("asjbhs",asjbh);
// 通过该系列案件编号在查询TB_YW_CBZ_CBAJ中 相关串并依据和案事件编号(除去传入的案件)
List<CbxszAndXlaj> listCbzByXlajbh = tbStAsjService.GetlistCbzXgaj(xszajbhMap);
for (CbxszAndXlaj CbxszAndXlaj : listCbzByXlajbh) {
// 串并组系列案件编号 CBLX可能为多值进行翻译
// 这里是处理多个串并类型的方法
if(CbxszAndXlaj.getCblx() != null && !CbxszAndXlaj.getCblx().isEmpty()){
String[] cbyj;
if(CbxszAndXlaj.getCblx().contains(",")){
cbyj = CbxszAndXlaj.getCblx().split(",");
for (int i = 0; i < cbyj.length; i++) {
if(!StringUtils.isEmpty(cbyj[i])){
Map<String,String> map = new HashMap<String,String>();
map.put("groupid", "CODE_CBYP_CBLX");
map.put("code", cbyj[i]);
String name = tbStAsjService.getNameByCode(map);
if(name != null){
cbyj[i] = name;
}
}
}
}else{
cbyj = new String[1];
if(!StringUtils.isEmpty(CbxszAndXlaj.getCblx())){
Map<String,String> map = new HashMap<String,String>();
map.put("groupid", "CODE_CBYP_CBLX");
map.put("code", CbxszAndXlaj.getCblx());
String name = tbStAsjService.getNameByCode(map);
if(name != null){
cbyj[0] = name;
}
}else{
cbyj[0] = CbxszAndXlaj.getCblx();
}
}
if(cbyj != null && cbyj.length > 0){
String cbyjStr = "";
for (String str : cbyj) {
cbyjStr = cbyjStr + "、" + str;
}
CbxszAndXlaj.setCblx_str(cbyjStr.substring(1));
}else{
CbxszAndXlaj.setCblx_str("");
}
}
}
JSONArray jsonArrayCb = new JSONArray();
for(CbxszAndXlaj cbz : listCbzByXlajbh){
JSONObject jo = new JSONObject();
if(!"".equals(cbz.getAsjbh())&&null!=cbz.getAsjbh()) {
jo.put("asjbh", cbz.getAsjbh());
}else{
jo.put("asjbh", "");
}
if(!"".equals(cbz.getCblx())&&null!=cbz.getCblx()) {
jo.put("cblx", cbz.getCblx());
}else{
jo.put("cblx", "");
}
if(!"".equals(cbz.getCblx_str())&&null!=cbz.getCblx_str()) {
jo.put("cblx_str", cbz.getCblx_str());
}else{
jo.put("cblx_str", "");
}
if(!"".equals(cbz.getAjmc())&&null!=cbz.getAjmc()) {
jo.put("ajmc", cbz.getAjmc());
}else{
jo.put("ajmc", "");
}
if(!"".equals(cbz.getAsjfssj_asjfskssj())&&null!=cbz.getAsjfssj_asjfskssj()) {
jo.put("asjfssj_asjfskssj", cbz.getAsjfssj_asjfskssj());
}else{
jo.put("asjfssj_asjfskssj", "");
}
if(!"".equals(cbz.getZcjdmc())&&null!=cbz.getZcjdmc()) {
jo.put("zcjdmc", cbz.getZcjdmc());
}else{
jo.put("zcjdmc", "");
}
if(!"".equals(cbz.getAjzlbmc())&&null!=cbz.getAjzlbmc()) {
jo.put("ajzlbmc", cbz.getAjzlbmc());
}else{
jo.put("ajzlbmc", "");
}
if(!"".equals(cbz.getAjxzlbmc())&&null!=cbz.getAjxzlbmc()) {
jo.put("ajxzlbmc", cbz.getAjxzlbmc());
}else{
jo.put("ajxzlbmc", "");
}
if(!"".equals(cbz.getXalbdmbcmsmc())&&null!=cbz.getXalbdmbcmsmc()) {
jo.put("xalbdmbcmsmc", cbz.getXalbdmbcmsmc());
}else{
jo.put("xalbdmbcmsmc", "");
}
if(!"".equals(cbz.getX())&&null!=cbz.getX()) {
jo.put("X", cbz.getX());
}else{
jo.put("X", "");
}
if(!"".equals(cbz.getY())&&null!=cbz.getY()) {
jo.put("Y", cbz.getY());
}else{
jo.put("Y", "");
}
if(!"".equals(cbz.getJyaq())&&null!=cbz.getJyaq()) {
jo.put("jyaq", cbz.getJyaq());
}else{
jo.put("jyaq", "");
}
jsonArrayCb.add(jo);
}
acb.put("cbzaj",jsonArrayCb);
System.out.println("串并组组返回的list="+acb.toString());
acb.putAll(a);
}else{
acb.putAll(a);
}
System.out.println("线索组和串并组返回的Alllist="+acb.toString());
return MapRestResult.ok(acb);
}
@ApiOperation(value = "登录名拿到身份证号码接口")
@PostMapping("/loginSfzhm")
public MapRestResult getPageAsj(@ApiParam(name = "userName",value = "userName",required = true)
@RequestParam String userName) {
QueryWrapper<SysUser> wrapper = new QueryWrapper<>();
//判断条件值是否为空,如果不为空拼接条件
if (!StringUtils.isEmpty(userName)) {
wrapper.eq("USERNAME", userName);
}
//设置需要查询的字段
wrapper.select("IDENTITYCARD");
SysUser user = sysUsersService.getOne(wrapper);
return MapRestResult.build(200,"成功",1,user.getIdentitycard());
}
// 根据身份证查询全省案件
//@OperLog(message = "全省案件",operation = OperationType.QUERY)
@ApiOperation(value = "全省案件")
@PostMapping("/qsAjxx")
public MapRestResult qsAjxx(@ApiParam(name = "zjhm",value = "zjhm",required = true)
@RequestParam String zjhm) {
List<Map<String,Object>> asjList = tbStAsjService.getAsjxxByZjhm(zjhm);
return MapRestResult.build(200,"成功",asjList.size(),asjList);
}
// 根据身份证查询全国案件
//@OperLog(message = "全国案件",operation = OperationType.QUERY)
@ApiOperation(value = "全国案件")
@PostMapping("/qgAjxx")
public MapRestResult qgAjxx(@ApiParam(name = "zjhm",value = "zjhm",required = true)
@RequestParam String zjhm) {
List<Map<String,Object>> asjList = tbStAsjService.getqgAsjxxByZjhm(zjhm,ssdw.substring(0,2));
return MapRestResult.build(200,"成功",asjList.size(),asjList);
}
}
package com.founder.asj.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.founder.commonutils.publicEntity.SysUser;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* 用户登录 Mapper 接口
* </p>
*
* @author yy
* @since 2021-03-11
*/
@Mapper
public interface SysUsersMapper extends BaseMapper<SysUser> {
}
package com.founder.asj.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.founder.commonutils.viewEntity.TbXwAsjbz;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* 案事件标注Mapper 接口
* </p>
*
* @author yangyang
* @since 2021-03-05
*/
@Mapper
public interface TbStAsjBzMapper extends BaseMapper<TbXwAsjbz> {
}
package com.founder.asj.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.founder.commonutils.viewEntity.CbxszAndXlaj;
import com.founder.commonutils.viewEntity.TbStAsj;
import com.founder.commonutils.publicEntity.Receiving;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* <p>
* 案事件基本信息 Mapper 接口
* </p>
*
* @author Guojunfeng
* @since 2021-03-03
*/
@Mapper
public interface TbStAsjMapper extends BaseMapper<TbStAsj> {
List<String> getXszajbhByAsjbh(@Param(value = "asjbh")String asjbh);
List<String> getXlajbhByAsjbh(@Param(value = "asjbh")String asjbh);
List<CbxszAndXlaj> GetlistXszXgaj(Map map);
List<CbxszAndXlaj> GetlistCbzXgaj(Map map);
String getNameByCode(Map<String,String> map);
List<TbStAsj> selectAsjxxByReceivingList(Receiving receiving);
List<TbStAsj> selectTlAsjxx(Receiving receiving);
List<Map<String,Object>> getAsjxxByZjhm(@Param(value = "zjhm")String zjhm);
}
<?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.founder.asj.mapper.SysUsersMapper">
</mapper>
<?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.founder.asj.mapper.TbStAsjBzMapper">
</mapper>
<?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.founder.asj.mapper.TbStAsjMapper">
<select id="getXszajbhByAsjbh" parameterType="java.lang.String" resultType="String">
select
distinct XSZAJBH
from TB_YW_XSZ_CBAJ where 1=1 AND XXSC_PDBZ = 0
<if test="asjbh!=null and asjbh!=''">
and asjbh = #{asjbh}
</if>
</select>
<select id="getXlajbhByAsjbh" parameterType="java.lang.String" resultType="String">
select
distinct XLAJBH
from TB_YW_CBZ_CBAJ where 1=1 AND XXSC_PDBZ = 0
<if test="asjbh!=null and asjbh!=''">
and asjbh = #{asjbh}
</if>
</select>
<select id="GetlistXszXgaj" parameterType="java.util.Map" resultType="com.founder.commonutils.viewEntity.CbxszAndXlaj">
select
distinct a.ASJBH,
a.CBLX,
(select name from sys_dictitem where groupid='CODE_CBYP_CBLX' and code=a.CBLX) as cblx_str,
b.AJMC as ajmc,
b.ASJFSDD_DQJD as x,
b.ASJFSDD_DQWD as y,
to_char(b.JYAQ) as jyaq,
to_char(b.ASJFSSJ_ASJFSKSSJ,'yyyy-MM-dd hh24:mi:ss') as asjfssj_asjfskssj,
(select name from SYS_DICTITEM where groupid='CODE_ZCJDDM' AND code = b.ZCJDDM) as zcjdmc,
(select name from SYS_DICTITEM where groupid='CODE_AJZLB' AND code = bz.AJZLB) as ajzlbmc,
(select name from SYS_DICTITEM where groupid='CODE_AJXZLB' AND code = bz.AJXZLB) as ajxzlbmc,
(select name from SYS_DICTITEM where groupid='CODE_XALBDMBCMS' AND code = bz.XALBDMBCMS) as xalbdmbcmsmc
from TB_YW_XSZ_CBAJ a,TB_ST_ASJ b,TB_ST_ASJBZ bz where 1=1 AND a.asjbh = b.asjbh
AND a.asjbh = bz.asjbh
AND a.XXSC_PDBZ = 0
AND a.ASJBH != #{asjbhs}
AND a.XSZAJBH IN
<foreach collection="listxszajbh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="GetlistCbzXgaj" parameterType="java.util.Map" resultType="com.founder.commonutils.viewEntity.CbxszAndXlaj">
select
distinct a.ASJBH,
a.CBLX,
b.AJMC as ajmc,
b.ASJFSDD_DQJD as x,
b.ASJFSDD_DQWD as y,
to_char(b.JYAQ) as jyaq,
to_char(b.ASJFSSJ_ASJFSKSSJ,'yyyy-MM-dd hh24:mi:ss') as asjfssj_asjfskssj,
(select name from SYS_DICTITEM where groupid='CODE_ZCJDDM' AND code = b.ZCJDDM) as zcjdmc,
(select name from SYS_DICTITEM where groupid='CODE_AJZLB' AND code = bz.AJZLB) as ajzlbmc,
(select name from SYS_DICTITEM where groupid='CODE_AJXZLB' AND code = bz.AJXZLB) as ajxzlbmc,
(select name from SYS_DICTITEM where groupid='CODE_XALBDMBCMS' AND code = bz.XALBDMBCMS) as xalbdmbcmsmc
from TB_YW_CBZ_CBAJ a,TB_ST_ASJ b,TB_ST_ASJBZ bz where 1=1 AND a.asjbh = b.asjbh
AND a.asjbh = bz.asjbh
AND a.XXSC_PDBZ = 0
AND a.ASJBH != #{asjbhs}
AND a.XLAJBH IN
<foreach collection="listXlajbh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<!-- 根据code和groupid查询name值-->
<select id="getNameByCode" parameterType="java.util.Map" resultType="java.lang.String">
select name from SYS_DICTITEM where scbz='0'
<if test="groupid!=null and groupid!=''">and groupid = #{groupid}</if>
<if test="code!=null and code!=''">and code = #{code}</if>
</select>
<select id="selectAsjxxByReceivingList" parameterType="com.founder.commonutils.publicEntity.Receiving" resultType="com.founder.commonutils.viewEntity.TbStAsj">
SELECT
KYMYQZ_WPSL
,T.ASJBH
,KYZZQZ_WPSL
,KYFZQZ_WPSL
,KYQTQZ_WPSL
,SLSJ
,SLDW_GAJGJGDM
,SLDW_GAJGMC
,LARQ
,LADW_GAJGJGDM
,LADW_GAJGMC
,ZARY_RS
,SJCWJZRMBY
,ZCZJ_ZCXWYJMS
,ZCZJ_ZXSJ01
,ZCZJDW_GAJGJGDM
,ZCZJDW_GAJGMC
,YSSCQSRQ
,YSSCQSAJSCFHJDDM
,SFCXAJ_PDBZ
,CXAJYYDM
,CXAJDW_GAJGJGDM
,CXAJDW_GAJGMC
,CXAJRQ
,XSAJXSGZJGDM
,ZBR_XM
,ZBR_GMSFHM
,ZBR_LXDH
,XBR_XM
,XBR_GMSFHM
,XBR_LXDH
,XSJSFZR_XM
,XSJSFZR_GMSFHM
,XSJSFZR_LXDH
,GAJGFZR_XM
,GAJGFZR_GMSFHM
,GAJGFZR_LXDH
,T.JJBH
,XCKYBH
,ASJLYDM
,XSJQLBDM
,ZCJDDM
,XSAJLASCJGDM
,AJLBDM
,ZATZ_JYQK
,TSSDDM
,ZATZZDFL_JYQK
,ZATZBCMS_JYQK
,ZATZ_AJZATZJHBD
,AJMC
,FXASJSJ
,FXASJDD_XZQHDM
,FXASJDD_DZMC
,ASJFSSJ_ASJFSKSSJ
,ASJFSSJ_ASJFSJSSJ
,ASJFSSJ_RSDDM
,ASJFSSJ_ZASJ_ZASJLBDM
,ASJFSSJ_ZASJ_DMBCMS
,ASJFSDD_XZQHDM
,ASJFSDD_DZMC
,ASJFSDD_DQJD
,ASJFSDD_DQWD
,ASJFSDD_DQJD as x
,ASJFSDD_DQWD as y
,ASJFSDD_DYLBDM
,ASJFSDD_SACS_SACSLBDM
,ASJFSDD_SACS_DMBCMS
,ASJFSDD_KJBW_KJBWLBDM
,ASJFSDD_KJBW_DMBCMS
,ASJFSDD_SFJZWN_PDBZ
,ASJFSDD_JZWCS
,ASJFSDD_ASJFSLC
,ASJFSDD_SFZLZZ_PDBZ
,JYAQ
,SFSQ_PDBZ
,SFSB_PDBZ
,SFMA_PDBZ
,SFSH_PDBZ
,SFSJDQPCL_PDBZ
,SFSW_PDBZ
,SFGM_PDBZ
,SWASJSWQK
,ASJDBJBDM
,LLFS_LLFSDM
,LLFS_DMBCMS
,LLSJ
,SY_JYQK
,FZXYRTSXW_FZXYRTSXWDM
,FZXYRTSXW_DMBCMS
,FZXYRSXZAHJQK
,QTSDTD_JYQK
,ASJFSSJFX_ASJFSKSSJ
,ASJFSSJFX_ASJFSJSSJ
,ZARFX_RSXX
,ZARFX_RSSX
,FZXYRTZ_JYQK
,FZXYRTSZC_FZXYRTSZCDM
,FZXYRTSZC_DMBCMS
,ZAGJ_SAWPDM
,ZAGJ_JYQK
,ZADJMS
,ZAMDMS
,KJFWDM
,LCZA_JYQK
,JHZA_JYQK
,GTFZFZXYRZHXSDM
,GTFZFZXYRGC_GTFZFZXYRGCDM
,GTFZFZXYRGC_DMBCMS
,XZWPFX_SAWP_SAWPDM
,XZWPFX_SAWP_DMBCMS
,SSWPQX_JYQK
,FZXYRYLWP_JYQK
,XCKYWP_JYQK
,FXXS_JYQK
,ASJSWRY_RS
,ASJSSRY_RS
,ASJSSCW_JYQK
,SSJZRMBY
,KYZSQZ_WPSL
,JJSD_JJSDDM
,JSSD_JSSDDM
,ZPSD_ZPSDDM
,LKJZKJFS_LKJZKJFSDM
,ZAZBSD_ZAZBSDDM
,JRJZKJFSJSD_JRJZKJFSJSDDM
<if test="ssdw != '441900000000'">
,(select name from sys_dictitem where groupid='CODE_AJLB' and code=T.ajlbdm) as ajlbdmStr
</if>
FROM tb_st_asj T WHERE 1=1
<include refid="queryWhereByReceiving"/>
</select>
<sql id="queryWhereByReceiving">
<if test="asjbh!= null">
AND T.ASJBH= #{ asjbh , jdbcType=VARCHAR }
</if>
<if test="ajlbdm!= null">
AND T.AJLBDM= #{ ajlbdm , jdbcType=VARCHAR }
</if>
<if test="jyaq!= null">
AND T.JYAQ LIKE '%' || #{jyaq , jdbcType=VARCHAR } || '%'
</if>
<if test="asjfssj_asjfskssj_start!= null">
AND T.ASJFSSJ_ASJFSKSSJ <![CDATA[>=]]> to_date(#{asjfssj_asjfskssj_start},'yyyy-MM-dd hh24:mi:ss')
</if>
<if test="asjfssj_asjfskssj_end!= null">
AND T.ASJFSSJ_ASJFSKSSJ <![CDATA[<]]> to_date(#{asjfssj_asjfskssj_end},'yyyy-MM-dd hh24:mi:ss')
</if>
<if test="ajslsj_start!= null">
AND T.SLSJ <![CDATA[>=]]> to_date(#{ajslsj_start},'yyyy-MM-dd hh24:mi:ss')
</if>
<if test="ajslsj_end!= null">
AND T.SLSJ <![CDATA[<]]> to_date(#{ajslsj_end},'yyyy-MM-dd hh24:mi:ss')
</if>
<if test="larq_start!= null">
AND T.LARQ <![CDATA[>=]]> to_date(#{larq_start},'yyyy-MM-dd hh24:mi:ss')
</if>
<if test="larq_end!= null">
AND T.LARQ <![CDATA[<]]> to_date(#{larq_end},'yyyy-MM-dd hh24:mi:ss')
</if>
<if test="ladw_gajgjgdm!= null">
AND T.LADW_GAJGJGDM= #{ ladw_gajgjgdm , jdbcType=VARCHAR }
</if>
<if test="afdxzqhdm!= null">
AND T.ASJFSDD_XZQHDM= #{ afdxzqhdm , jdbcType=VARCHAR }
</if>
<if test="asjfsd_dzmc!= null">
AND T.ASJFSDD_DZMC LIKE '%' || #{asjfsd_dzmc , jdbcType=VARCHAR } || '%'
</if>
<if test="x!= null and x!=0.0">
AND T.ASJFSDD_DQJD= #{ x , jdbcType=DOUBLE }
</if>
<if test="y!= null and y!=0.0">
AND T.ASJFSDD_DQWD= #{ y , jdbcType=DOUBLE }
</if>
<if test="zcjddm!= null">
AND T.ZCJDDM= #{ zcjddm , jdbcType=VARCHAR }
</if>
<if test="xckybh!= null">
AND T.XCKYBH= #{ xckybh , jdbcType=VARCHAR }
</if>
</sql>
<!--同类案件-->
<select id="selectTlAsjxx" parameterType="com.founder.commonutils.publicEntity.Receiving" resultType="com.founder.commonutils.viewEntity.TbStAsj">
SELECT
KYMYQZ_WPSL
,T.ASJBH
,KYZZQZ_WPSL
,KYFZQZ_WPSL
,KYQTQZ_WPSL
,SLSJ
,SLDW_GAJGJGDM
,SLDW_GAJGMC
,LARQ
,LADW_GAJGJGDM
,LADW_GAJGMC
,ZARY_RS
,SJCWJZRMBY
,ZCZJ_ZCXWYJMS
,ZCZJ_ZXSJ01
,ZCZJDW_GAJGJGDM
,ZCZJDW_GAJGMC
,YSSCQSRQ
,YSSCQSAJSCFHJDDM
,SFCXAJ_PDBZ
,CXAJYYDM
,CXAJDW_GAJGJGDM
,CXAJDW_GAJGMC
,CXAJRQ
,XSAJXSGZJGDM
,ZBR_XM
,ZBR_GMSFHM
,ZBR_LXDH
,XBR_XM
,XBR_GMSFHM
,XBR_LXDH
,XSJSFZR_XM
,XSJSFZR_GMSFHM
,XSJSFZR_LXDH
,GAJGFZR_XM
,GAJGFZR_GMSFHM
,GAJGFZR_LXDH
,T.JJBH
,XCKYBH
,ASJLYDM
,XSJQLBDM
,ZCJDDM
,XSAJLASCJGDM
,AJLBDM
,ZATZ_JYQK
,TSSDDM
,ZATZZDFL_JYQK
,ZATZBCMS_JYQK
,ZATZ_AJZATZJHBD
,AJMC
,FXASJSJ
,FXASJDD_XZQHDM
,FXASJDD_DZMC
,ASJFSSJ_ASJFSKSSJ
,ASJFSSJ_ASJFSJSSJ
,ASJFSSJ_RSDDM
,ASJFSSJ_ZASJ_ZASJLBDM
,ASJFSSJ_ZASJ_DMBCMS
,ASJFSDD_XZQHDM
,ASJFSDD_DZMC
,ASJFSDD_DQJD
,ASJFSDD_DQWD
,ASJFSDD_DQJD as x
,ASJFSDD_DQWD as y
,ASJFSDD_DYLBDM
,ASJFSDD_SACS_SACSLBDM
,ASJFSDD_SACS_DMBCMS
,ASJFSDD_KJBW_KJBWLBDM
,ASJFSDD_KJBW_DMBCMS
,ASJFSDD_SFJZWN_PDBZ
,ASJFSDD_JZWCS
,ASJFSDD_ASJFSLC
,ASJFSDD_SFZLZZ_PDBZ
,JYAQ
,SFSQ_PDBZ
,SFSB_PDBZ
,SFMA_PDBZ
,SFSH_PDBZ
,SFSJDQPCL_PDBZ
,SFSW_PDBZ
,SFGM_PDBZ
,SWASJSWQK
,ASJDBJBDM
,LLFS_LLFSDM
,LLFS_DMBCMS
,LLSJ
,SY_JYQK
,FZXYRTSXW_FZXYRTSXWDM
,FZXYRTSXW_DMBCMS
,FZXYRSXZAHJQK
,QTSDTD_JYQK
,ASJFSSJFX_ASJFSKSSJ
,ASJFSSJFX_ASJFSJSSJ
,ZARFX_RSXX
,ZARFX_RSSX
,FZXYRTZ_JYQK
,FZXYRTSZC_FZXYRTSZCDM
,FZXYRTSZC_DMBCMS
,ZAGJ_SAWPDM
,ZAGJ_JYQK
,ZADJMS
,ZAMDMS
,KJFWDM
,LCZA_JYQK
,JHZA_JYQK
,GTFZFZXYRZHXSDM
,GTFZFZXYRGC_GTFZFZXYRGCDM
,GTFZFZXYRGC_DMBCMS
,XZWPFX_SAWP_SAWPDM
,XZWPFX_SAWP_DMBCMS
,SSWPQX_JYQK
,FZXYRYLWP_JYQK
,XCKYWP_JYQK
,FXXS_JYQK
,ASJSWRY_RS
,ASJSSRY_RS
,ASJSSCW_JYQK
,SSJZRMBY
,KYZSQZ_WPSL
,JJSD_JJSDDM
,JSSD_JSSDDM
,ZPSD_ZPSDDM
,LKJZKJFS_LKJZKJFSDM
,ZAZBSD_ZAZBSDDM
,JRJZKJFSJSD_JRJZKJFSJSDDM
<if test="ssdw != '441900000000'">
,(select name from sys_dictitem where groupid='CODE_AJLB' and code=T.ajlbdm) as ajlbdmStr
</if>
, (select name from sys_dictitem where groupid='CODE_ZCJDDM' and code=T.ZCJDDM) as zcjddmStr
FROM tb_st_asj T
left join tb_st_asjbz T1 on T1.asjbh=T.asjbh
WHERE 1=1 and ASJFSDD_DQJD is not null and ASJFSDD_DQWD is not null
<include refid="queryWhereByTlasj"/>
</select>
<sql id="queryWhereByTlasj">
<if test="asjfssj_asjfskssj_start!= null">
AND T.ASJFSSJ_ASJFSKSSJ <![CDATA[>=]]> to_date(#{asjfssj_asjfskssj_start},'yyyy-MM-dd hh24:mi:ss')
</if>
<if test="asjfssj_asjfskssj_end!= null">
AND T.ASJFSSJ_ASJFSKSSJ <![CDATA[<]]> to_date(#{asjfssj_asjfskssj_end},'yyyy-MM-dd hh24:mi:ss')
</if>
<if test="qsjd!=null and qsjd!='' and jsjd!=null and jsjd!='' and qswd!=null and qswd!='' and jswd!=null and jswd!=''">
AND T.ASJFSDD_DQJD <![CDATA[>=]]>#{qsjd,jdbcType=VARCHAR} AND T.ASJFSDD_DQJD <![CDATA[<=]]>#{jsjd,jdbcType=VARCHAR}
AND T.ASJFSDD_DQWD <![CDATA[>=]]>#{qswd,jdbcType=VARCHAR} AND T.ASJFSDD_DQWD <![CDATA[<=]]>#{jswd,jdbcType=VARCHAR}
</if>
<if test="ajzlb!= null and ajzlb!=''" >
AND T1.ajzlb= #{ ajzlb , jdbcType=VARCHAR }
</if>
<if test="ajxzlb!= null and ajxzlb!=''" >
AND T1.ajxzlb= #{ ajxzlb , jdbcType=VARCHAR }
</if>
<if test="xalbdmbcms!= null and xalbdmbcms!=''">
AND T1.xalbdmbcms= #{ xalbdmbcms , jdbcType=VARCHAR }
</if>
<if test="gjc!= null and gjc.length>0">
and(
<foreach collection="gjc" item="item" index="index" separator=" or ">
T.jyaq like '%${item}%'
</foreach>
)
</if>
<if test="zcjddm!= null and zcjddm!=''">
and T.zcjddm in (${zcjddm})
</if>
</sql>
<select id="getAsjxxByZjhm" parameterType="java.lang.String" resultType="map">
SELECT
T.asjbh AS asjbh,
TO_CHAR(XYR.ZHRQ,'YYYY-MM-DD HH24:mi:ss') AS zhrq,
(select name from SYS_DICTITEM where groupid='CODE_DAZT' AND code = XYR.zhfzxyr_Fzxyrdaztdm) AS zhfzxyrFzxyrdaztdmMc,
T.ajmc AS ajmc,
(select name from SYS_DICTITEM where groupid='CODE_AJLB' AND code = T.ajlbdm) AS ajlbdmMc,
TO_CHAR(T.asjfssj_Asjfskssj,'YYYY-MM-DD HH24:mi:ss') AS asjfssjAsjfskssj,
TO_CHAR(T.larq,'YYYY-MM-DD HH24:mi:ss') AS larq,
T.ZUZDW_ZBR_XM AS zuzdwZbrXm,
(select name from SYS_DICTITEM where groupid='CODE_UNIT' AND code = T.zuzdw_Gajgjgdm) AS zuzdwGajgjgdmMc,
(select name from SYS_DICTITEM where groupid='CODE_ZCJDDM' AND code = T.zcjddm) AS zcjddmMc,
(select name from SYS_DICTITEM where groupid='CODE_UNIT' AND code = T.ladw_Gajgjgdm) AS ladwGajgjgdmMc,
ASJBZ.ajzlb AS ajzlb,
(select name from SYS_DICTITEM where groupid='CODE_AJZLB' AND code = ASJBZ.ajzlb) AS ajzlbMc,
ASJBZ.ajxzlb AS ajxzlb,
(select name from SYS_DICTITEM where groupid='CODE_AJXZLB' AND code = ASJBZ.ajxzlb) AS ajxzlbMc,
ASJBZ.xalbdmbcms AS xalbdmbcms,
(select name from SYS_DICTITEM where groupid='CODE_XALBDMBCMS' AND code = ASJBZ.xalbdmbcms) AS xalbdmbcmsMc
FROM TB_ST_ASJ T,TB_ST_ASJBZ ASJBZ,TB_XW_ZBFZXYR XYR
where
T.ASJBH = ASJBZ.ASJBH(+)
AND
T.ASJBH = XYR.ASJBH
AND
T.XXSC_PDBZ = 0
AND
XYR.XXSC_PDBZ = 0
<if test="zjhm != null and zjhm != ''">
and XYR.zhfzxyr_Cyzj_Zjhm = #{zjhm}
</if>
</select>
</mapper>
package com.founder.asj.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.founder.commonutils.publicEntity.SysUser;
public interface SysUsersService extends IService<SysUser> {
}
package com.founder.asj.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.founder.commonutils.viewEntity.TbXwAsjbz;
/**
* <p>
* 案事件基本信息 服务类
* </p>
*
* @author yangyang
* @since 2021-03-0
*/
public interface TbStAsjBzService extends IService<TbXwAsjbz> {
}
package com.founder.asj.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.founder.commonutils.viewEntity.CbxszAndXlaj;
import com.founder.commonutils.viewEntity.TbStAsj;
import com.founder.commonutils.publicEntity.MapRestResult;
import com.founder.commonutils.publicEntity.Receiving;
import java.util.List;
import java.util.Map;
/**
* <p>
* 案事件基本信息 服务类
* </p>
*
* @author Guojunfeng
* @since 2021-03-03
*/
public interface TbStAsjService extends IService<TbStAsj> {
List<String> getXszajbhByAsjbh(String asjbh);
List<String> getXlajbhByAsjbh(String asjbh);
List<CbxszAndXlaj> GetlistXszXgaj(Map map);
List<CbxszAndXlaj> GetlistCbzXgaj(Map map);
String getNameByCode(Map<String,String> map);
List<TbStAsj> selectAsjxxList(Receiving receiving);
MapRestResult selectTlAsjxxList(Receiving receiving);
List<Map<String,Object>> getAsjxxByZjhm(String zjhm);
List<Map<String,Object>> getqgAsjxxByZjhm(String zjhm,String ssdw);
}
package com.founder.asj.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.founder.asj.mapper.SysUsersMapper;
import com.founder.asj.service.SysUsersService;
import com.founder.commonutils.publicEntity.SysUser;
import org.springframework.stereotype.Service;
@Service
public class SysUsersServiceImpl extends ServiceImpl<SysUsersMapper, SysUser> implements SysUsersService {
}
package com.founder.asj.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.founder.asj.mapper.TbStAsjBzMapper;
import com.founder.asj.service.TbStAsjBzService;
import com.founder.commonutils.viewEntity.TbXwAsjbz;
import org.springframework.stereotype.Service;
/**
* <p>
* 案事件基本信息 服务实现类
* </p>
*
* @author yangyang
* @since 2021-03-03
*/
@Service
public class TbStAsjBzServiceImpl extends ServiceImpl<TbStAsjBzMapper, TbXwAsjbz> implements TbStAsjBzService {
}
package com.founder.asj.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.founder.asj.mapper.TbStAsjMapper;
import com.founder.asj.qgxzMapper.TbStAsjqgMapper;
import com.founder.asj.service.TbStAsjService;
import com.founder.commonutils.viewEntity.CbxszAndXlaj;
import com.founder.commonutils.viewEntity.TbStAsj;
import com.founder.commonutils.publicEntity.MapRestResult;
import com.founder.commonutils.publicEntity.Receiving;
import com.founder.commonutils.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* <p>
* 案事件基本信息 服务实现类
* </p>
*
* @author Guojunfeng
* @since 2021-03-03
*/
@Service
public class TbStAsjServiceImpl extends ServiceImpl<TbStAsjMapper, TbStAsj> implements TbStAsjService {
@Autowired
private TbStAsjMapper tbStAsjMapper;
@Autowired
private TbStAsjqgMapper tbStAsjqgMapper;
@Override
public List<String> getXszajbhByAsjbh(String asjbh) {
return tbStAsjMapper.getXszajbhByAsjbh(asjbh);
}
@Override
public List<String> getXlajbhByAsjbh(String asjbh) {
return tbStAsjMapper.getXlajbhByAsjbh(asjbh);
}
@Override
public List<CbxszAndXlaj> GetlistXszXgaj(Map map) {
return tbStAsjMapper.GetlistXszXgaj(map);
}
@Override
public List<CbxszAndXlaj> GetlistCbzXgaj(Map map) {
return tbStAsjMapper.GetlistCbzXgaj(map);
}
@Override
public String getNameByCode(Map<String,String> map){
return tbStAsjMapper.getNameByCode(map);
}
@Override
public List<TbStAsj> selectAsjxxList(Receiving receiving) {
return tbStAsjMapper.selectAsjxxByReceivingList(receiving);
}
//utils.StringUtil
@Override
public MapRestResult selectTlAsjxxList(Receiving receiving) {
if(StringUtil.isEmpty(receiving.getQsjd())||StringUtil.isEmpty(receiving.getJsjd())||StringUtil.isEmpty(receiving.getQswd())||StringUtil.isEmpty(receiving.getJswd())){
return MapRestResult.error("起始经纬度不能为空");
}else if(StringUtil.isEmpty(receiving.getAsjfssj_asjfskssj_start())||StringUtil.isEmpty(receiving.getAsjfssj_asjfskssj_end())){
return MapRestResult.error("时间段不能为空");
}else if(StringUtil.isEmpty(receiving.getAjzlb())&&StringUtil.isEmpty(receiving.getAjxzlb())&&StringUtil.isEmpty(receiving.getXalbdmbcms())){
return MapRestResult.error("案件标签为空,无法推算同类案件");
}else{
return MapRestResult.build(200,"同类案件查询成功",tbStAsjMapper.selectTlAsjxx(receiving));
}
}
@Override
public List<Map<String, Object>> getAsjxxByZjhm(String zjhm) {
return tbStAsjMapper.getAsjxxByZjhm(zjhm);
}
@Override
public List<Map<String, Object>> getqgAsjxxByZjhm(String zjhm,String ssdw) {
return tbStAsjqgMapper.getqgAsjxxByZjhm(zjhm,ssdw);
}
}
#配置中心地址
spring.cloud.nacos.config.server-addr=47.92.48.137:9949
spring.cloud.nacos.discovery.server-addr=47.92.48.137:9949
#spring.cloud.nacos.config.server-addr=26.3.13.184:8848
#spring.cloud.nacos.discovery.server-addr=26.3.13.184:8848
spring.profiles.active=prod
# 该配置影响统一配置中心中的dataId
spring.application.name=asj
spring.cloud.nacos.config.namespace=prod
#spring.cloud.nacos.config.ext-config[0].data-id=image.properties
# 开启动态刷新配置,否则配置文件修改,工程无法感知
#spring.cloud.nacos.config.ext-config[0].refresh=true
spring.cloud.nacos.config.shared-dataids=asjpz.properties
spring.cloud.nacos.config.refreshable-dataids=asjpz.properties
management.health.elasticsearch.enabled: false
\ No newline at end of file
package com.founder.demo;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
import com.baomidou.mybatisplus.generator.config.GlobalConfig;
import com.baomidou.mybatisplus.generator.config.PackageConfig;
import com.baomidou.mybatisplus.generator.config.StrategyConfig;
import com.baomidou.mybatisplus.generator.config.rules.DateType;
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
import org.junit.Test;
/**
* @author
* @since 2018/12/13
*/
public class CodeGenerator {
@Test
public void run() {
// 1、创建代码生成器
AutoGenerator mpg = new AutoGenerator();
// 2、全局配置
GlobalConfig gc = new GlobalConfig();
String projectPath = System.getProperty("user.dir");
gc.setOutputDir("F:\\MyProject\\map-parent\\service\\es" + "/src/main/java");//生成路径
gc.setAuthor("chent");//作者
gc.setOpen(false); //生成后是否打开资源管理器
gc.setFileOverride(false); //重新生成时文件是否覆盖
//UserServie
gc.setServiceName("%sService"); //去掉Service接口的首字母I
gc.setIdType(IdType.ID_WORKER_STR); //主键策略
gc.setDateType(DateType.ONLY_DATE);//定义生成的实体类中日期类型
gc.setSwagger2(true);//开启Swagger2模式
mpg.setGlobalConfig(gc);
// 3、数据源配置
DataSourceConfig dsc = new DataSourceConfig();
// dsc.setUrl("jdbc:mysql://47.92.225.109:3900/guli?serverTimezone=GMT%2B8");
// dsc.setDriverName("com.mysql.cj.jdbc.Driver");
// dsc.setUsername("root");
// dsc.setPassword("root");
// dsc.setDbType(DbType.MYSQL);
dsc.setUrl("jdbc:oracle:thin:@47.92.129.99:1600:orcl");
dsc.setDriverName("oracle.jdbc.driver.OracleDriver");
dsc.setUsername("MAPYWGL");
dsc.setPassword("MAPYWGL");
dsc.setDbType(DbType.ORACLE);
mpg.setDataSource(dsc);
// 4、包配置
PackageConfig pc = new PackageConfig();
pc.setModuleName("eszy"); //模块名
//包 com.atguigu.eduservice
pc.setParent("com.founder");
//包 com.atguigu.eduservice.controller
//pc.setController("controller");
pc.setEntity("entity");
// pc.setService("service");
// pc.setMapper("mapper");
mpg.setPackageInfo(pc);
// 5、策略配置
StrategyConfig strategy = new StrategyConfig();
strategy.setInclude("TB_ZY_CAMERA");//生成的表
strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略
strategy.setTablePrefix(pc.getModuleName() + "_"); //生成实体时去掉表前缀
strategy.setColumnNaming(NamingStrategy.underline_to_camel);//数据库表字段映射到实体的命名策略
strategy.setEntityLombokModel(true); // lombok 模型 @Accessors(chain = true) setter链式操作
strategy.setRestControllerStyle(true); //restful api风格控制器
strategy.setControllerMappingHyphenStyle(true); //url中驼峰转连字符
mpg.setStrategy(strategy);
// 6、执行
mpg.execute();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment