Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xzxt-api-report
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
雷紫添
xzxt-api-report
Commits
ff414044
Commit
ff414044
authored
May 16, 2022
by
dupengfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
甘肃 未知名尸体照片 提取
parent
b8e5fbfc
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
308 additions
and
0 deletions
+308
-0
src/main/java/com/founder/controller/UnknownCorpse.java
+32
-0
src/main/java/com/founder/dao/UnknownCorpseDao.java
+22
-0
src/main/java/com/founder/model/TbStStZp.java
+21
-0
src/main/java/com/founder/service/UnKnownCorpseService.java
+13
-0
src/main/java/com/founder/service/impl/UnKnownCorpseServiceImpl.java
+88
-0
src/main/resources/application-dev.yml
+6
-0
src/main/resources/application-gansu.yml
+96
-0
src/main/resources/application-prod.yml
+5
-0
src/main/resources/mybatis/mapper/UnknownCorpseDao.xml
+25
-0
No files found.
src/main/java/com/founder/controller/UnknownCorpse.java
0 → 100644
View file @
ff414044
package
com
.
founder
.
controller
;
import
com.founder.service.UnKnownCorpseService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
/*
* @Description TODO
* @Author du_pengfei
* @Date 2022/5/13
* @Version 1.0
*/
@RestController
@RequestMapping
(
"/wzmst"
)
public
class
UnknownCorpse
{
@Autowired
UnKnownCorpseService
service
;
@ResponseBody
@GetMapping
(
"/st"
)
public
String
unknown
(){
service
.
picToPackage
();
return
"success"
;
}
}
src/main/java/com/founder/dao/UnknownCorpseDao.java
0 → 100644
View file @
ff414044
package
com
.
founder
.
dao
;
import
com.founder.model.TbStStZp
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/*
* @Description 未知名尸体
* @Author du_pengfei
* @Date 2022/5/13
* @Version 1.0
*/
@Mapper
public
interface
UnknownCorpseDao
{
public
List
<
String
>
selectStbh
();
public
List
<
TbStStZp
>
selectStnr
(
String
stbh
);
}
src/main/java/com/founder/model/TbStStZp.java
0 → 100644
View file @
ff414044
package
com
.
founder
.
model
;
import
lombok.Data
;
/*
* @Description TODO
* @Author du_pengfei
* @Date 2022/5/13
* @Version 1.0
*/
@Data
public
class
TbStStZp
{
private
String
xxzjbh
;
private
String
stbh
;
private
String
dzwjmc
;
private
byte
[]
dzwjnr
;
}
src/main/java/com/founder/service/UnKnownCorpseService.java
0 → 100644
View file @
ff414044
package
com
.
founder
.
service
;
/*
* @Description TODO
* @Author du_pengfei
* @Date 2022/5/13
* @Version 1.0
*/
public
interface
UnKnownCorpseService
{
public
void
picToPackage
();
}
src/main/java/com/founder/service/impl/UnKnownCorpseServiceImpl.java
0 → 100644
View file @
ff414044
package
com
.
founder
.
service
.
impl
;
/*
* @Description 未知名尸体
* @Author du_pengfei
* @Date 2022/5/13
* @Version 1.0
*/
import
com.founder.dao.UnknownCorpseDao
;
import
com.founder.model.TbStStZp
;
import
com.founder.service.UnKnownCorpseService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
java.io.*
;
import
java.nio.ByteBuffer
;
import
java.nio.channels.FileChannel
;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
import
java.nio.file.Paths
;
import
java.nio.file.StandardCopyOption
;
import
java.util.List
;
@Slf4j
@Service
public
class
UnKnownCorpseServiceImpl
implements
UnKnownCorpseService
{
@Autowired
UnknownCorpseDao
dao
;
@Value
(
"${stPicPath}"
)
private
String
path
;
@Override
public
void
picToPackage
(){
List
<
String
>
list
=
dao
.
selectStbh
();
list
.
forEach
(
stbh
->
{
Path
dirPath
=
Paths
.
get
(
path
+
stbh
);
if
(
Files
.
notExists
(
dirPath
)){
try
{
Files
.
createDirectories
(
dirPath
);
}
catch
(
IOException
e
)
{
log
.
error
(
"创建文件夹失败: {}"
,
e
.
getMessage
());
e
.
printStackTrace
();
}
}
outputFile
(
stbh
);
});
}
private
void
outputFile
(
String
stbh
){
List
<
TbStStZp
>
tbStStZps
=
dao
.
selectStnr
(
stbh
);
tbStStZps
.
forEach
(
stzp
->
{
String
s
=
path
+
stzp
.
getStbh
()
+
"/"
+
stzp
.
getDzwjmc
();
Path
picPath
=
Paths
.
get
(
s
);
try
{
if
(
Files
.
notExists
(
picPath
)){
Files
.
createFile
(
picPath
);
}
FileOutputStream
fs
=
new
FileOutputStream
(
s
);
FileChannel
channel
=
fs
.
getChannel
();
ByteBuffer
buffer
=
ByteBuffer
.
wrap
(
stzp
.
getDzwjnr
());
while
(
buffer
.
hasRemaining
()){
channel
.
write
(
buffer
);
}
buffer
.
clear
();
fs
.
close
();
}
catch
(
IOException
e
)
{
log
.
error
(
"创建文件失败:{}"
,
e
.
getMessage
());
e
.
printStackTrace
();
}
});
}
}
src/main/resources/application-dev.yml
View file @
ff414044
...
...
@@ -32,6 +32,12 @@ unZipPath: C:\ZTZP\temp\
cron
:
0 0 12 * * ?
#----------------------兵团 在逃人员照片入库 end ----------------#
#----------------------甘肃 抽取未知名尸体照片到本地 begin ----------------#
# 尸体照片存放地址
stPicPath
:
/Users/mac/xzxt-api-report/target/classes/WEB-INF/static/file/
#----------------------甘肃 抽取未知名尸体照片到本地 end ----------------#
fileDir
:
D:/fileDir/
outDir
:
D:/outDir/
#isCs: true
...
...
src/main/resources/application-gansu.yml
0 → 100644
View file @
ff414044
spring
:
datasource
:
xzxt
:
driver-class-name
:
oracle.jdbc.OracleDriver
username
:
XZXT
password
:
XzxtPwd#62
jdbc-url
:
jdbc:oracle:thin:@10.178.8.65:1521:GSXZ1
type
:
com.alibaba.druid.pool.DruidDataSource
manager
:
driver-class-name
:
oracle.jdbc.OracleDriver
username
:
XZXT
password
:
XzxtPwd#62
jdbc-url
:
jdbc:oracle:thin:@10.178.8.65:1521:GSXZ1
type
:
com.alibaba.druid.pool.DruidDataSource
#配置jpa 使其展示sql语句
jpa
:
show-sql
:
true
redis
:
host
:
65.65.100.194
port
:
43079
password
:
Xzxt#4302
#----------------------兵团 在逃人员照片入库 begin ----------------#
#压缩包所在文件目录 记得路径后面加上反斜杠 \
picPath
:
C:\ZTZP\ztrychuli\
#文件备份目录 记得路径后面加上反斜杠 \
backupPath
:
C:\ZTZP\ztbf\
#文件解压后的目录 记得路径后面加上反斜杠 \
unZipPath
:
C:\ZTZP\temp\
#定时任务 每天中午 12 点
cron
:
0 0 12 * * ?
#----------------------兵团 在逃人员照片入库 end ----------------#
#----------------------甘肃 抽取未知名尸体照片到本地 begin ----------------#
# 尸体照片存放地址
stPicPath
:
/Users/mac/xzxt-api-report/target/classes/WEB-INF/static/file/
#----------------------甘肃 抽取未知名尸体照片到本地 end ----------------#
fileDir
:
D:/fileDir/
outDir
:
D:/outDir/
#isCs: true
isCs
:
false
poorSize
:
100
ftpserverip
:
10.143.242.44
nginxport
:
9053
ftpport
:
4546
ftpuser
:
ftpuser
ftppass
:
fou3rfnder4SD1
ftpbathPath
:
C:/ftp/xzxt
ftpfilePath
:
/hunan
redistimeout
:
60000
ipaddress
:
/IP_ADDRESS
codemsg
:
status
:
-
code
:
"
10101"
name
:
"
入库成功"
-
code
:
"
10102"
name
:
"
入库执行中"
-
code
:
"
10103"
name
:
"
结果查询成功"
-
code
:
"
10104"
name
:
"
比对核查进行中"
-
code
:
"
10105"
name
:
"
比对核查已完成"
-
code
:
"
10201"
name
:
"
Zip解压失败"
-
code
:
"
10202"
name
:
"
头文件解析失败"
-
code
:
"
10203"
name
:
"
内容文件解析失败"
-
code
:
"
10299"
name
:
"
服务方执行异常"
-
code
:
"
10301"
name
:
"
采集信息类别代码错误"
-
code
:
"
10303"
name
:
"
数据内容质量验证错误"
-
code
:
"
10304"
name
:
"
数据量超限"
-
code
:
"
10305"
name
:
"
数据包编号重复(任务号重复)"
-
code
:
"
10306"
name
:
"
用户信息验证错误"
-
code
:
"
19999"
name
:
"
其他错误"
-
code
:
"
010101"
name
:
"
入省库成功"
-
code
:
"
010102"
name
:
"
访问ip地址未授权"
-
code
:
"
010103"
name
:
"
请勿重复提交"
-
code
:
"
010104"
name
:
"
用户身份证信息有误"
src/main/resources/application-prod.yml
View file @
ff414044
...
...
@@ -26,6 +26,11 @@ unZipPath: /Users/mac/xzxt-api-report/target/classes/WEB-INF/static/temp/
cron
:
0 0 12 * * ?
#----------------------兵团 在逃人员照片入库 end ----------------#
#----------------------甘肃 抽取未知名尸体照片到本地 begin ----------------#
stPicPath
:
/Users/mac/xzxt-api-report/target/classes/WEB-INF/static/file/
#----------------------甘肃 抽取未知名尸体照片到本地 end ----------------#
fileDir
:
D:/fileDir/
outDir
:
D:/outDir/
...
...
src/main/resources/mybatis/mapper/UnknownCorpseDao.xml
0 → 100644
View file @
ff414044
<?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.dao.UnknownCorpseDao"
>
<select
id=
"selectStbh"
resultType=
"java.lang.String"
>
select STBH from tb_st_st_zp group by STBH
</select>
<select
id=
"selectStnr"
resultType=
"com.founder.model.TbStStZp"
>
select
XXZJBH xxzjhb,
STBH stbh,
STZP_DZWJMC || STZP_DZWJGS dzwjmc,
STZP_DZWJNR dzwjnr
from TB_ST_ST_ZP
where stbh = #{stbh, jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
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