Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zczlService
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
曹崟
zczlService
Commits
dddc94dd
Commit
dddc94dd
authored
Nov 22, 2021
by
dupengfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增人脸布控信息下发 侦查指令
parent
f93252b1
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
513 additions
and
6 deletions
+513
-6
src/main/java/com/founder/model/AppNotificationFaceVO.java
+212
-0
src/main/java/com/founder/zczl/controller/ZczlController.java
+182
-4
src/main/java/com/founder/zczl/dao/ZczlDao.java
+4
-0
src/main/java/com/founder/zczl/service/IZczlService.java
+4
-0
src/main/java/com/founder/zczl/service/impl/ZczlService.java
+8
-0
src/main/resources/application.properties
+1
-1
src/main/resources/mapper/ZczlMapper.xml
+37
-0
src/main/resources/static/word/exportFace.docx
+0
-0
src/test/java/com/founder/ZczlServiceApplicationTests.java
+65
-1
No files found.
src/main/java/com/founder/model/AppNotificationFaceVO.java
0 → 100644
View file @
dddc94dd
package
com
.
founder
.
model
;
/*
* @Description TODO
* @Author du_pengfei
* @Date 2021/11/17
* @Version 1.0
*/
public
class
AppNotificationFaceVO
{
// 消息id
private
String
notificationId
;
// 设备id
private
String
deviceId
;
// 证件照片
private
String
storagePath
;
// 采集时间
private
String
shotTime
;
// 姓名
private
String
name
;
// 抓拍时间
private
String
faceAppearTime
;
// 相识度
private
String
similarity
;
//抓拍照片
private
String
txmc1
;
// 年龄下限
private
String
ageLowerLimit
;
// 年龄上线
private
String
ageUpLimit
;
// 是否刑事犯罪
private
String
isCriminalInvolved
;
// 是否在押人员
private
String
isDetainees
;
// 是否司机
private
String
isDriver
;
// 是否外国人
private
String
isForeigner
;
// 是否疑似恐怖分子
private
String
isSuspectedTerrorist
;
// 是否可疑人员
private
String
isSuspiciousPerson
;
// 数据来源
private
String
tabId
;
// 布控原因
private
String
caseDetil
;
// 证件号码
private
String
idCard
;
// 电话号码
private
String
casePhone
;
public
String
getNotificationId
()
{
return
notificationId
;
}
public
void
setNotificationId
(
String
notificationId
)
{
this
.
notificationId
=
notificationId
;
}
public
String
getDeviceId
()
{
return
deviceId
;
}
public
void
setDeviceId
(
String
deviceId
)
{
this
.
deviceId
=
deviceId
;
}
public
String
getStoragePath
()
{
return
storagePath
;
}
public
void
setStoragePath
(
String
storagePath
)
{
this
.
storagePath
=
storagePath
;
}
public
String
getShotTime
()
{
return
shotTime
;
}
public
void
setShotTime
(
String
shotTime
)
{
this
.
shotTime
=
shotTime
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getFaceAppearTime
()
{
return
faceAppearTime
;
}
public
void
setFaceAppearTime
(
String
faceAppearTime
)
{
this
.
faceAppearTime
=
faceAppearTime
;
}
public
String
getSimilarity
()
{
return
similarity
;
}
public
void
setSimilarity
(
String
similarity
)
{
this
.
similarity
=
similarity
;
}
public
String
getTxmc1
()
{
return
txmc1
;
}
public
void
setTxmc1
(
String
txmc1
)
{
this
.
txmc1
=
txmc1
;
}
public
String
getAgeLowerLimit
()
{
return
ageLowerLimit
;
}
public
void
setAgeLowerLimit
(
String
ageLowerLimit
)
{
this
.
ageLowerLimit
=
ageLowerLimit
;
}
public
String
getAgeUpLimit
()
{
return
ageUpLimit
;
}
public
void
setAgeUpLimit
(
String
ageUpLimit
)
{
this
.
ageUpLimit
=
ageUpLimit
;
}
public
String
getIsCriminalInvolved
()
{
return
isCriminalInvolved
;
}
public
void
setIsCriminalInvolved
(
String
isCriminalInvolved
)
{
this
.
isCriminalInvolved
=
isCriminalInvolved
;
}
public
String
getIsDetainees
()
{
return
isDetainees
;
}
public
void
setIsDetainees
(
String
isDetainees
)
{
this
.
isDetainees
=
isDetainees
;
}
public
String
getIsDriver
()
{
return
isDriver
;
}
public
void
setIsDriver
(
String
isDriver
)
{
this
.
isDriver
=
isDriver
;
}
public
String
getIsForeigner
()
{
return
isForeigner
;
}
public
void
setIsForeigner
(
String
isForeigner
)
{
this
.
isForeigner
=
isForeigner
;
}
public
String
getIsSuspectedTerrorist
()
{
return
isSuspectedTerrorist
;
}
public
void
setIsSuspectedTerrorist
(
String
isSuspectedTerrorist
)
{
this
.
isSuspectedTerrorist
=
isSuspectedTerrorist
;
}
public
String
getIsSuspiciousPerson
()
{
return
isSuspiciousPerson
;
}
public
void
setIsSuspiciousPerson
(
String
isSuspiciousPerson
)
{
this
.
isSuspiciousPerson
=
isSuspiciousPerson
;
}
public
String
getTabId
()
{
return
tabId
;
}
public
void
setTabId
(
String
tabId
)
{
this
.
tabId
=
tabId
;
}
public
String
getCaseDetil
()
{
return
caseDetil
;
}
public
void
setCaseDetil
(
String
caseDetil
)
{
this
.
caseDetil
=
caseDetil
;
}
public
String
getIdCard
()
{
return
idCard
;
}
public
void
setIdCard
(
String
idCard
)
{
this
.
idCard
=
idCard
;
}
public
String
getCasePhone
()
{
return
casePhone
;
}
public
void
setCasePhone
(
String
casePhone
)
{
this
.
casePhone
=
casePhone
;
}
}
src/main/java/com/founder/zczl/controller/ZczlController.java
View file @
dddc94dd
...
...
@@ -304,15 +304,28 @@ public class ZczlController {
@RequestMapping
(
value
=
"/receivedNewData"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
@ResponseBody
public
Map
<
String
,
Object
>
receivedNewData
(
@RequestParam
(
"id"
)
String
id
)
throws
IOException
{
public
Map
<
String
,
Object
>
receivedNewData
Car
(
@RequestParam
(
"id"
)
String
id
,
@RequestParam
(
"type"
)
String
type
)
throws
IOException
{
if
(
"1"
.
equals
(
type
)){
return
carAlarm
(
id
);
}
else
if
(
"2"
.
equals
(
type
)){
return
faceAlarm
(
id
);
}
else
{
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"code"
,
201
);
resultMap
.
put
(
"message"
,
"type类型错误,1-车辆告警,2-人脸告警"
);
return
resultMap
;
}
}
public
Map
<
String
,
Object
>
carAlarm
(
String
id
)
throws
IOException
{
TbYwZczl
tbYwZczl
=
new
TbYwZczl
();
//用刘罗成 发送指令
User
user
=
loginService
.
getUserByUsername
(
"180349"
);
tbYwZczl
.
setZlfqrxm
(
user
.
getTrueName
());
tbYwZczl
.
setZlfqrlxdh
(
user
.
getTelephone
());
tbYwZczl
.
setZlfqrgmsfhm
(
user
.
getIdentitycard
());
...
...
@@ -336,6 +349,12 @@ public class ZczlController {
String
[]
strings
=
id
.
split
(
","
);
for
(
String
str
:
strings
)
{
// 先判断是否 车辆的消息 2 不是
String
isCar
=
carOrFace
(
str
);
if
(
"2"
.
equals
(
isCar
)){
continue
;
}
AppNotificationVO
notification
=
zczlService
.
queryNotification
(
str
);
//每条指令 一个xxzjbh
String
zczlbh
=
anjianSeqService
.
importZlbhFnVal
(
"TB_YW_ZCZL"
,
user
.
getUnitcode
());
...
...
@@ -473,9 +492,150 @@ public class ZczlController {
return
resultMap
;
}
public
Map
<
String
,
Object
>
faceAlarm
(
String
id
)
throws
IOException
{
TbYwZczl
tbYwZczl
=
new
TbYwZczl
();
//用刘罗成 发送指令 180349
User
user
=
loginService
.
getUserByUsername
(
"admin"
);
tbYwZczl
.
setZlfqrxm
(
user
.
getTrueName
());
tbYwZczl
.
setZlfqrlxdh
(
user
.
getTelephone
());
tbYwZczl
.
setZlfqrgmsfhm
(
user
.
getIdentitycard
());
tbYwZczl
.
setZlfqrgajgdm
(
user
.
getUnitcode
());
tbYwZczl
.
setZlfqrdwmc
(
user
.
getUnitname
());
tbYwZczl
.
setXxscpdbz
(
"0"
);
tbYwZczl
.
setFqrjh
(
user
.
getPolicemanid
());
tbYwZczl
.
setSpsftg
(
"2"
);
tbYwZczl
.
setYwmc
(
"人脸布控侦查指令"
);
tbYwZczl
.
setHbqx
(
feedbackTime
(
1
));
tbYwZczl
.
setYwlx
(
"1"
);
tbYwZczl
.
setZllx
(
"9900"
);
tbYwZczl
.
setZlsy
(
"人脸布控侦查反馈"
);
tbYwZczl
.
setGzyq
(
"各单位指令负责人,请接到指令后立即组织工作专班,围绕布控人脸文件(见附件)中提供的线索进一步进行侦查、排查工作。相关工作情况请在回报期限内上报公安厅!"
);
//1 遍历最新的 id
String
[]
strings
=
id
.
split
(
","
);
for
(
String
str
:
strings
)
{
// 先判断是否 车辆的消息 2 不是
String
isCar
=
carOrFace
(
str
);
if
(
"1"
.
equals
(
isCar
))
{
continue
;
}
AppNotificationFaceVO
notification
=
zczlService
.
queryFaceNotification
(
str
);
//每条指令 一个xxzjbh
String
zczlbh
=
anjianSeqService
.
importZlbhFnVal
(
"TB_YW_ZCZL"
,
user
.
getUnitcode
());
tbYwZczl
.
setZczlbh
(
zczlbh
);
if
(
notification
!=
null
)
{
//2 生成 docx 文档
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
String
l
=
Long
.
toString
(
System
.
currentTimeMillis
());
// 文件真实名称
String
temFileName
=
"布控人脸详情"
+
l
+
".docx"
;
map
.
put
(
"notificationId"
,
notification
.
getNotificationId
());
map
.
put
(
"shotTime"
,
notification
.
getShotTime
());
map
.
put
(
"storagePath"
,
new
ImageEntity
(
WordUtil
.
image2byte
(
notification
.
getStoragePath
()),
200
,
100
));
map
.
put
(
"name"
,
notification
.
getName
());
map
.
put
(
"faceAppearTime"
,
notification
.
getFaceAppearTime
());
map
.
put
(
"similarity"
,
notification
.
getSimilarity
());
map
.
put
(
"txmc1"
,
new
ImageEntity
(
WordUtil
.
image2byte
(
notification
.
getTxmc1
()),
200
,
100
));
map
.
put
(
"ageLowerLimit"
,
notification
.
getAgeLowerLimit
());
map
.
put
(
"ageUpLimit"
,
notification
.
getAgeUpLimit
());
map
.
put
(
"isCriminalInvolved"
,
notification
.
getIsCriminalInvolved
());
map
.
put
(
"isDetainees"
,
notification
.
getIsDetainees
());
map
.
put
(
"isDriver"
,
notification
.
getIsDriver
());
map
.
put
(
"isForeigner"
,
notification
.
getIsForeigner
());
map
.
put
(
"isSuspectedTerrorist"
,
notification
.
getIsSuspectedTerrorist
());
map
.
put
(
"isSuspiciousPerson"
,
notification
.
getIsSuspiciousPerson
());
map
.
put
(
"tabId"
,
notification
.
getTabId
());
map
.
put
(
"caseDetil"
,
notification
.
getCaseDetil
());
map
.
put
(
"idCard"
,
notification
.
getIdCard
());
map
.
put
(
"casePhone"
,
notification
.
getCasePhone
());
//根据设备id 确定要将指令发送单位
//String subCode = notification.getDeviceId().substring(0, 4);
//String unitCode = zczlService.queryUnitCode(subCode);
//tbYwZczl.setZljsdwdm(unitCode);
// 文件模版路径
String
templatePath
=
getRootPath
()
+
"WEB-INF/classes/static/word/exportFace.docx"
;
// 文件临时路径
String
temDir
=
getRootPath
()
+
"WEB-INF/classes/static/temp/"
;
// 文件生产后,导出到临时文件目录
WordUtil
.
exportWord
(
templatePath
,
temDir
,
temFileName
,
map
);
//线下测试用固定的单位代码
tbYwZczl
.
setZljsdwdm
(
"150100050600"
);
try
{
//3 插入数据到 tb_yw_zczl
//新增侦查指令信息
zczlService
.
importZczl
(
tbYwZczl
);
//新增侦查指令附件信息
// 临时文件
File
temFile
=
new
File
(
temDir
+
temFileName
);
// 实际文件存放位置 在项目根路径下
String
unloadDir
=
getRootPath
()
+
"zczl/"
+
zczlbh
+
"/"
;
File
dir
=
new
File
(
unloadDir
);
//如果不存在创建
if
(!
dir
.
exists
())
{
dir
.
mkdirs
();
}
//为避免文件重名,加上日期的前缀
String
fileName
=
StringUtil
.
getUUID
();
//将文件存入数据库中
TbYwZczlFj
fjxx
=
new
TbYwZczlFj
();
String
xxzjbh
=
zczlService
.
getXxzjbhFnVal
(
user
.
getUnitcode
());
fjxx
.
setZczlbh
(
zczlbh
);
fjxx
.
setXxzjbh
(
xxzjbh
);
//电子文件名称
fjxx
.
setDzwjmc
(
temFileName
);
//电子文件内容
fjxx
.
setDzwjnr
(
fileConvertToByteArray
(
temFile
));
//电子文件位置
fjxx
.
setDzwjwz
(
"/zczl/"
+
zczlbh
+
"/"
+
fileName
);
// 保存到 附件表中
zczlService
.
saveImportZczlfj
(
fjxx
);
//将文件内容写入服务器生成的文件中
copyFile
(
temDir
+
temFileName
,
unloadDir
,
fileName
);
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
"新增侦查指令信息出错!"
,
e
);
}
//4 删除 临时文件
WordUtil
.
delAllFiles
(
temDir
+
temFileName
);
//5 修改标识 表示已经发送了侦查指令
int
flag
=
zczlService
.
updateNotification
(
str
);
}
}
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"code"
,
200
);
resultMap
.
put
(
"success"
,
"true"
);
return
resultMap
;
}
//@ResponseBody
//@RequestMapping("/test")
@Scheduled
(
initialDelay
=
200000L
,
fixedDelay
=
43200000L
)
//
@Scheduled(initialDelay = 200000L, fixedDelay = 43200000L)
//@Scheduled(initialDelay = 10000L, fixedDelay = 60000L)
public
void
dayTask
()
throws
IOException
{
...
...
@@ -484,7 +644,7 @@ public class ZczlController {
String
s
=
String
.
join
(
","
,
ids
);
if
(!
""
.
equals
(
s
)){
Map
<
String
,
Object
>
map
=
receivedNewData
(
s
);
Map
<
String
,
Object
>
map
=
receivedNewData
Car
(
s
,
"1"
);
logger
.
info
(
"消息ID:{}"
,
s
);
logger
.
info
(
"定时任务,发送侦查指令:{}"
,
map
.
get
(
"code"
));
}
else
{
...
...
@@ -492,6 +652,24 @@ public class ZczlController {
}
}
// 判断这条消息是否是车辆布控消息 是返回 1 不是(人脸)返回 2
private
String
carOrFace
(
String
notificationId
){
AppNotificationVO
carNotification
=
zczlService
.
queryIsOrNotCarNotification
(
notificationId
);
if
(
carNotification
==
null
){
return
"2"
;
}
else
{
return
"1"
;
}
}
public
Map
<
String
,
Object
>
receivedNewDataFace
(){
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
return
map
;
}
/**
* 跳转侦查指令统计
...
...
src/main/java/com/founder/zczl/dao/ZczlDao.java
View file @
dddc94dd
...
...
@@ -171,4 +171,8 @@ public interface ZczlDao {
List
<
String
>
queryNotSeedNotification
();
String
queryUnitCode
(
@Param
(
"subCode"
)
String
subCode
);
AppNotificationVO
queryIsOrNotCarNotification
(
@Param
(
"id"
)
String
notificationId
);
AppNotificationFaceVO
queryFaceAlarm
(
@Param
(
"id"
)
String
str
);
}
src/main/java/com/founder/zczl/service/IZczlService.java
View file @
dddc94dd
...
...
@@ -164,4 +164,8 @@ public interface IZczlService {
List
<
String
>
queryNotSeedNotification
();
String
queryUnitCode
(
String
subCode
);
AppNotificationVO
queryIsOrNotCarNotification
(
String
notificationId
);
AppNotificationFaceVO
queryFaceNotification
(
String
str
);
}
src/main/java/com/founder/zczl/service/impl/ZczlService.java
View file @
dddc94dd
...
...
@@ -1966,5 +1966,13 @@ public class ZczlService implements IZczlService {
return
zczlDao
.
queryUnitCode
(
subCode
);
}
@Override
public
AppNotificationVO
queryIsOrNotCarNotification
(
String
notificationId
)
{
return
zczlDao
.
queryIsOrNotCarNotification
(
notificationId
);
}
@Override
public
AppNotificationFaceVO
queryFaceNotification
(
String
str
)
{
return
zczlDao
.
queryFaceAlarm
(
str
);
}
}
src/main/resources/application.properties
View file @
dddc94dd
#��������ʹ��dev����ʽ����ʹ��prod
spring.profiles.active
=
pro
spring.profiles.active
=
dev
server.port
=
9046
# ҳ��Ĭ��ǰĿ¼
spring.mvc.view.prefix
=
/WEB-INF/jsp/
...
...
src/main/resources/mapper/ZczlMapper.xml
View file @
dddc94dd
...
...
@@ -1897,6 +1897,14 @@
</select>
<select
id=
"queryIsOrNotCarNotification"
resultType=
"com.founder.model.AppNotificationVO"
>
select
n.NOTIFICATIONID notificationId
from TB_APP_NOTIFICATION n right join TB_APP_MOTORVEHICLEOBJECT m on n.NOTIFICATIONID = m.NOTIFICATIONID
where 1=1
and n.NOTIFICATIONID = #{id, jdbcType=VARCHAR}
</select>
<select
id=
"queryImageInfo"
resultType=
"com.founder.model.TbAppSubimageinfoobject"
>
select HEIGHT height,
WIDTH width,
...
...
@@ -1921,6 +1929,34 @@
</select>
<select
id=
"queryFaceAlarm"
resultType=
"com.founder.model.AppNotificationFaceVO"
>
select n.NOTIFICATIONID notificationId,
f.DEVICEID deviceId,
f.STORAGEPATH storagePath,
f.SHOTTIME shotTime,
f.NAME name,
f.FACEAPPEARTIME faceAppearTime,
f.SIMILARITY similarity,
f.TXMC1 txmc1,
f.AGELOWERLIMIT ageLowerLimit,
f.AGEUPLIMIT ageUpLimit,
case when f.ISCRIMINALINVOLVED = '1' then '是' when f.ISCRIMINALINVOLVED = '2' then '否' end isCriminalInvolved,
case when f.ISDETAINEES = '1' then '是' when f.ISDETAINEES = '2' then '否' end isDetainees,
case when f.ISDRIVER = '1' then '是' when f.ISDRIVER = '2' then '否' end isDriver,
case when f.ISFOREIGNER = '1' then '是' when f.ISFOREIGNER = '2' then '否' end isForeigner,
case when f.ISSUSPECTEDTERRORIST = '1' then '是' when f.ISSUSPECTEDTERRORIST = '2' then '否' end isSuspectedTerrorist,
case when f.ISSUSPICIOUSPERSON = '1' then '是' when f.ISSUSPICIOUSPERSON = '2' then '否' end isSuspiciousPerson,
case when f.TABID = '2012' then '兵团重点人员库' when f.TABID = '2004' then '全国在逃库' end tabId,
d.CASEDETIL caseDetil,
d.IDCARD idCard,
d.CASEPHONE casePhone
from TB_APP_NOTIFICATION n
inner join TB_APP_FACEOBJECT f on n.NOTIFICATIONID = f.NOTIFICATIONID
inner join TB_APP_FACEALARMDETAIL d on f.NOTIFICATIONID = d.NOTIFICATIONID
where 1=1 and n.send_zczl_flag = 0
and n.NOTIFICATIONID = #{id, jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
src/main/resources/static/word/exportFace.docx
0 → 100644
View file @
dddc94dd
File added
src/test/java/com/founder/ZczlServiceApplicationTests.java
View file @
dddc94dd
...
...
@@ -4,8 +4,10 @@ import cn.afterturn.easypoi.entity.ImageEntity;
import
com.founder.model.AppNotificationVO
;
import
com.founder.util.WordUtil
;
import
com.founder.zczl.controller.ZczlController
;
import
com.founder.zczl.dao.ZczlDao
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringRunner
;
...
...
@@ -14,6 +16,7 @@ import java.time.LocalDateTime;
import
java.time.format.DateTimeFormatter
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.Map
;
//@RunWith(SpringRunner.class)
//@SpringBootTest
...
...
@@ -41,12 +44,38 @@ public class ZczlServiceApplicationTests {
map
.
put
(
"pictures"
,
imageEntities
);
WordUtil
.
exportWord
(
"src/main/resources/
word/export.docx"
,
"src/main/resources
/temp/"
,
"aab.docx"
,
map
);
WordUtil
.
exportWord
(
"src/main/resources/
static/word/export.docx"
,
"src/main/resources/static
/temp/"
,
"aab.docx"
,
map
);
}
@Test
public
void
exportFaceAlarm
()
throws
IOException
{
//ImageEntity wordImageEntity = new ImageEntity(WordUtil.image2byte("https://t7.baidu.com/it/u=2168645659,3174029352&fm=193&f=GIF"),200, 200);
//https://t7.baidu.com/it/u=2531125946,3055766435&fm=193&f=GIF
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"du"
);
//map.put("brandreliability", "100");
map
.
put
(
"storagePath"
,
new
ImageEntity
(
WordUtil
.
image2byte
(
"https://t7.baidu.com/it/u=2168645659,3174029352&fm=193&f=GIF"
),
200
,
100
));
map
.
put
(
"similarity"
,
"98.9"
);
//ArrayList<ImageEntity> imageEntities1 = new ArrayList<>();
//imageEntities1.add(new ImageEntity(WordUtil.image2byte("https://t7.baidu.com/it/u=2168645659,3174029352&fm=193&f=GIF"), 200, 100));
//map.put("ni", "2021-03-01");
//map.put("ma", "2021-03-01");
//map.put("cao", "1213123131");
//map.put("bi", "1213123131");
WordUtil
.
exportWord
(
"src/main/resources/static/word/exportkt.docx"
,
"src/main/resources/static/temp/"
,
"aab.docx"
,
map
);
}
@Test
public
void
delTest
(){
WordUtil
.
delAllFiles
(
"src/main/resources/temp/aaa.docx"
);
...
...
@@ -73,4 +102,39 @@ public class ZczlServiceApplicationTests {
System
.
out
.
println
(
s
);
}
@Autowired
ZczlDao
dao
;
@Test
public
void
isOrNotTest
(){
AppNotificationVO
notification
=
dao
.
queryIsOrNotCarNotification
(
"13132131231323"
);
String
type
=
""
;
if
(
notification
==
null
){
type
=
"2"
;
}
else
{
type
=
"1"
;
}
String
[]
numbers
=
{
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
,
"10"
};
for
(
String
s:
numbers
)
{
if
(
s
.
equals
(
type
))
{
continue
;
}
System
.
out
.
println
(
"Count is: "
+
s
);
}
}
@Autowired
ZczlController
controller
;
@Test
public
void
faceAlarm
()
throws
IOException
{
Map
<
String
,
Object
>
map
=
controller
.
faceAlarm
(
"31231234ui4u4u0sfjks"
);
System
.
out
.
println
(
map
.
toString
());
}
}
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