Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
map-parent
Commits
c94a0c42
Commit
c94a0c42
authored
Jun 26, 2021
by
YANGYANG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时空全省案件和全国案件提交
parent
25f155a5
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
241 additions
and
5 deletions
+241
-5
service/asj/src/main/java/com/founder/asj/AsjApplication.java
+2
-2
service/asj/src/main/java/com/founder/asj/config/MybatisBaseDbConfig.java
+58
-0
service/asj/src/main/java/com/founder/asj/config/MybatisQgDbConfig.java
+50
-0
service/asj/src/main/java/com/founder/asj/controller/TbStAsjController.java
+20
-0
service/asj/src/main/java/com/founder/asj/mapper/TbStAsjMapper.java
+2
-0
service/asj/src/main/java/com/founder/asj/mapper/xml/TbStAsjMapper.xml
+32
-3
service/asj/src/main/java/com/founder/asj/qgxzMapper/TbStAsjqgMapper.java
+26
-0
service/asj/src/main/java/com/founder/asj/qgxzMapper/xml/TbStAsjqgMapper.xml
+26
-0
service/asj/src/main/java/com/founder/asj/service/TbStAsjService.java
+6
-0
service/asj/src/main/java/com/founder/asj/service/impl/TbStAsjServiceImpl.java
+13
-0
service/pom.xml
+6
-0
No files found.
service/asj/src/main/java/com/founder/asj/AsjApplication.java
View file @
c94a0c42
...
@@ -2,10 +2,10 @@ package com.founder.asj;
...
@@ -2,10 +2,10 @@ package com.founder.asj;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.context.annotation.ComponentScan
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
@SpringBootApplication
@SpringBootApplication
@
ComponentScan
(
basePackages
=
{
"com.founder"
})
@
EnableSwagger2
public
class
AsjApplication
{
public
class
AsjApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
...
service/asj/src/main/java/com/founder/asj/config/MybatisBaseDbConfig.java
0 → 100644
View file @
c94a0c42
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
);
}
}
service/asj/src/main/java/com/founder/asj/config/MybatisQgDbConfig.java
0 → 100644
View file @
c94a0c42
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
);
}
}
service/asj/src/main/java/com/founder/asj/controller/TbStAsjController.java
View file @
c94a0c42
...
@@ -445,5 +445,25 @@ public class TbStAsjController {
...
@@ -445,5 +445,25 @@ public class TbStAsjController {
SysUser
user
=
sysUsersService
.
getOne
(
wrapper
);
SysUser
user
=
sysUsersService
.
getOne
(
wrapper
);
return
MapRestResult
.
build
(
200
,
"成功"
,
1
,
user
.
getIdentitycard
());
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
);
}
}
}
service/asj/src/main/java/com/founder/asj/mapper/TbStAsjMapper.java
View file @
c94a0c42
...
@@ -35,4 +35,6 @@ public interface TbStAsjMapper extends BaseMapper<TbStAsj> {
...
@@ -35,4 +35,6 @@ public interface TbStAsjMapper extends BaseMapper<TbStAsj> {
List
<
TbStAsj
>
selectAsjxxByReceivingList
(
Receiving
receiving
);
List
<
TbStAsj
>
selectAsjxxByReceivingList
(
Receiving
receiving
);
List
<
TbStAsj
>
selectTlAsjxx
(
Receiving
receiving
);
List
<
TbStAsj
>
selectTlAsjxx
(
Receiving
receiving
);
List
<
Map
<
String
,
Object
>>
getAsjxxByZjhm
(
@Param
(
value
=
"zjhm"
)
String
zjhm
);
}
}
service/asj/src/main/java/com/founder/asj/mapper/xml/TbStAsjMapper.xml
View file @
c94a0c42
...
@@ -428,7 +428,36 @@
...
@@ -428,7 +428,36 @@
</if>
</if>
</sql>
</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>
</mapper>
service/asj/src/main/java/com/founder/asj/qgxzMapper/TbStAsjqgMapper.java
0 → 100644
View file @
c94a0c42
package
com
.
founder
.
asj
.
qgxzMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.founder.commonutils.asjEntity.TbStAsj
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
import
java.util.Map
;
/**
* <p>
* 案事件基本信息 Mapper 接口
* </p>
*
* @author yangyang
* @since 2021-06-25
*/
@Mapper
@Component
public
interface
TbStAsjqgMapper
extends
BaseMapper
<
TbStAsj
>
{
List
<
Map
<
String
,
Object
>>
getqgAsjxxByZjhm
(
@Param
(
value
=
"zjhm"
)
String
zjhm
,
@Param
(
value
=
"ssdw"
)
String
ssdw
);
}
service/asj/src/main/java/com/founder/asj/qgxzMapper/xml/TbStAsjqgMapper.xml
0 → 100644
View file @
c94a0c42
<?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.qgxzMapper.TbStAsjqgMapper"
>
<select
id=
"getqgAsjxxByZjhm"
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_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
FROM TB_ST_ASJ T,TB_XW_ZBFZXYR XYR
where
T.ASJBH = XYR.ASJBH
AND
T.XXSC_PDBZ = 0
AND
XYR.XXSC_PDBZ = 0
<if
test=
"ssdw != null and ssdw != ''"
>
AND T.ASJBH NOT LIKE '%A' || #{ssdw, jdbcType=VARCHAR } || '%'
</if>
<if
test=
"zjhm != null and zjhm != ''"
>
AND XYR.zhfzxyr_Cyzj_Zjhm = #{zjhm}
</if>
</select>
</mapper>
service/asj/src/main/java/com/founder/asj/service/TbStAsjService.java
View file @
c94a0c42
...
@@ -6,6 +6,7 @@ import com.founder.commonutils.asjEntity.CbxszAndXlaj;
...
@@ -6,6 +6,7 @@ import com.founder.commonutils.asjEntity.CbxszAndXlaj;
import
com.founder.commonutils.asjEntity.TbStAsj
;
import
com.founder.commonutils.asjEntity.TbStAsj
;
import
com.founder.commonutils.publicEntity.MapRestResult
;
import
com.founder.commonutils.publicEntity.MapRestResult
;
import
com.founder.commonutils.publicEntity.Receiving
;
import
com.founder.commonutils.publicEntity.Receiving
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -33,4 +34,9 @@ public interface TbStAsjService extends IService<TbStAsj> {
...
@@ -33,4 +34,9 @@ public interface TbStAsjService extends IService<TbStAsj> {
List
<
TbStAsj
>
selectAsjxxList
(
Receiving
receiving
);
List
<
TbStAsj
>
selectAsjxxList
(
Receiving
receiving
);
MapRestResult
selectTlAsjxxList
(
Receiving
receiving
);
MapRestResult
selectTlAsjxxList
(
Receiving
receiving
);
List
<
Map
<
String
,
Object
>>
getAsjxxByZjhm
(
String
zjhm
);
List
<
Map
<
String
,
Object
>>
getqgAsjxxByZjhm
(
String
zjhm
,
String
ssdw
);
}
}
service/asj/src/main/java/com/founder/asj/service/impl/TbStAsjServiceImpl.java
View file @
c94a0c42
...
@@ -3,6 +3,7 @@ package com.founder.asj.service.impl;
...
@@ -3,6 +3,7 @@ package com.founder.asj.service.impl;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.founder.asj.mapper.TbStAsjMapper
;
import
com.founder.asj.mapper.TbStAsjMapper
;
import
com.founder.asj.qgxzMapper.TbStAsjqgMapper
;
import
com.founder.asj.service.TbStAsjService
;
import
com.founder.asj.service.TbStAsjService
;
import
com.founder.commonutils.asjEntity.CbxszAndXlaj
;
import
com.founder.commonutils.asjEntity.CbxszAndXlaj
;
import
com.founder.commonutils.asjEntity.TbStAsj
;
import
com.founder.commonutils.asjEntity.TbStAsj
;
...
@@ -28,6 +29,8 @@ public class TbStAsjServiceImpl extends ServiceImpl<TbStAsjMapper, TbStAsj> impl
...
@@ -28,6 +29,8 @@ public class TbStAsjServiceImpl extends ServiceImpl<TbStAsjMapper, TbStAsj> impl
@Autowired
@Autowired
private
TbStAsjMapper
tbStAsjMapper
;
private
TbStAsjMapper
tbStAsjMapper
;
@Autowired
private
TbStAsjqgMapper
tbStAsjqgMapper
;
@Override
@Override
public
List
<
String
>
getXszajbhByAsjbh
(
String
asjbh
)
{
public
List
<
String
>
getXszajbhByAsjbh
(
String
asjbh
)
{
...
@@ -71,4 +74,14 @@ public class TbStAsjServiceImpl extends ServiceImpl<TbStAsjMapper, TbStAsj> impl
...
@@ -71,4 +74,14 @@ public class TbStAsjServiceImpl extends ServiceImpl<TbStAsjMapper, TbStAsj> impl
return
MapRestResult
.
build
(
200
,
"同类案件查询成功"
,
tbStAsjMapper
.
selectTlAsjxx
(
receiving
));
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
);
}
}
}
service/pom.xml
View file @
c94a0c42
...
@@ -159,12 +159,18 @@
...
@@ -159,12 +159,18 @@
<groupId>
com.google.code.gson
</groupId>
<groupId>
com.google.code.gson
</groupId>
<artifactId>
gson
</artifactId>
<artifactId>
gson
</artifactId>
</dependency>
</dependency>
<!-- alibaba的druid数据库连接池 -->
<dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
<artifactId>
fastjson
</artifactId>
<version>
1.2.35
</version>
<version>
1.2.35
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
druid-spring-boot-starter
</artifactId>
<version>
1.1.10
</version>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<artifactId>
junit
</artifactId>
<version>
4.12
</version>
<version>
4.12
</version>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment