Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
12c85dcf
Commit
12c85dcf
authored
Nov 30, 2021
by
李腾威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
作战指挥处置记录预览
parent
34994fb4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
53 deletions
+56
-53
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+1
-18
pom.xml
...ule/amos-boot-module-biz/amos-boot-module-jcs-biz/pom.xml
+5
-5
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+44
-29
ESAlertCalledService.java
...oot/module/jcs/biz/service/impl/ESAlertCalledService.java
+1
-1
Spire.Doc.jar
...boot-system-jcs/src/main/resources/localLib/Spire.Doc.jar
+0
-0
pom.xml
pom.xml
+5
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
12c85dcf
...
...
@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.command.biz.controller;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
...
...
@@ -19,7 +18,6 @@ import com.yeejoin.amos.boot.module.command.api.dto.CarTaskDto;
import
com.yeejoin.amos.boot.module.command.api.dto.SeismometeorologyDto
;
import
com.yeejoin.amos.boot.module.command.biz.service.impl.RemoteSecurityService
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireBrigadeResourceDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireTeam
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.feign.IotFeignClient
;
...
...
@@ -49,16 +47,13 @@ import com.yeejoin.amos.boot.module.jcs.api.service.*;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.DateUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -75,7 +70,6 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* *指挥资源Api
...
...
@@ -690,17 +684,6 @@ public class CommandController extends BaseController {
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
selectAlertCalledcount
(
id
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"下载附件"
,
notes
=
"下载附件"
)
@PostMapping
(
value
=
"/downLoad"
)
public
void
downLoad
(
@RequestBody
List
<
String
>
path
,
HttpServletResponse
response
){
try
{
IOUtils
.
copy
(
new
FileInputStream
(
readUrl
+
path
.
get
(
0
)),
response
.
getOutputStream
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
/**
* * @param null
*
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/pom.xml
View file @
12c85dcf
...
...
@@ -40,11 +40,11 @@
</exclusion>
</exclusions>
</dependency>
<!-- <dependency>--
>
<!-- <groupId>com.spire</groupId>--
>
<!-- <artifactId>Spire.Doc</artifactId>--
>
<!-- <version>1.0.0</version>--
>
<!-- </dependency>--
>
<dependency
>
<groupId>
e-iceblue
</groupId
>
<artifactId>
spire.doc
</artifactId
>
<version>
4.9.0
</version
>
</dependency
>
</dependencies>
</project>
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
View file @
12c85dcf
...
...
@@ -728,15 +728,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
if
(
i
==
0
)
{
dto
.
setDisatchNum
(
String
.
valueOf
(
first
.
size
()));
}
dto
.
setCarName
(
first
.
get
(
i
).
get
(
"carName"
).
toString
());
dto
.
setStation
(
first
.
get
(
i
).
get
(
"companyName"
).
toString
());
// 随车人员
List
<
PowerData
>
powerDataOne
=
powerTransferMapper
.
getPowerDataOne
(
Long
.
valueOf
(
first
.
get
(
i
).
get
(
"id"
).
toString
()));
if
(!
ValidationUtil
.
isEmpty
(
powerDataOne
))
{
dto
.
setPersonNum
(
String
.
valueOf
(
powerDataOne
.
size
()));
}
else
{
dto
.
setPersonNum
(
"0"
);
}
handleFunc
(
dto
,
first
.
get
(
i
));
LocalDateTime
dateTime
=
(
LocalDateTime
)
first
.
get
(
i
).
get
(
"recDate"
);
Date
date
=
Date
.
from
(
dateTime
.
toInstant
(
ZoneOffset
.
of
(
"+8"
)));
...
...
@@ -750,15 +743,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
for
(
int
i
=
0
;
i
<
other
.
size
();
i
++)
{
AlertCalledPowerInfoDto
dto
=
new
AlertCalledPowerInfoDto
();
dto
.
setCarName
(
other
.
get
(
i
).
get
(
"carName"
).
toString
());
dto
.
setStation
(
other
.
get
(
i
).
get
(
"companyName"
).
toString
());
// 随车人员
List
<
PowerData
>
powerDataOne
=
powerTransferMapper
.
getPowerDataOne
(
Long
.
valueOf
(
first
.
get
(
i
).
get
(
"id"
).
toString
()));
if
(!
ValidationUtil
.
isEmpty
(
powerDataOne
))
{
dto
.
setPersonNum
(
String
.
valueOf
(
powerDataOne
.
size
()));
}
else
{
dto
.
setPersonNum
(
"0"
);
}
handleFunc
(
dto
,
first
.
get
(
i
));
LocalDateTime
dateTime
=
(
LocalDateTime
)
first
.
get
(
i
).
get
(
"recDate"
);
Date
date
=
Date
.
from
(
dateTime
.
toInstant
(
ZoneOffset
.
of
(
"+8"
)));
...
...
@@ -793,6 +779,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
String
filePath
=
this
.
getClass
().
getClassLoader
().
getResource
(
"templates"
).
getPath
();
String
fileName
=
filePath
+
"/"
+
System
.
currentTimeMillis
()
+
".docx"
;
String
newFileName
=
""
;
AlertCalledPowerInfoTablePolicy
calledPowerInfoTablePolicy
=
new
AlertCalledPowerInfoTablePolicy
();
AlertCallCommandTablePolicy
alertCallCommandTablePolicy
=
new
AlertCallCommandTablePolicy
();
...
...
@@ -812,13 +799,26 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
// docx 转 doc
Document
document
=
new
Document
();
document
.
loadFromFile
(
fileName
);
String
newFileName
=
System
.
currentTimeMillis
()+
".doc"
;
//保存结果文件
document
.
saveToFile
(
newFileName
,
FileFormat
.
Doc
);
String
os
=
System
.
getProperty
(
"os.name"
);
//拼接完整连接
String
pa1
=
""
;
if
(
os
.
toLowerCase
().
startsWith
(
"win"
)){
String
pa
=
fileName
.
substring
(
1
);
document
.
loadFromFile
(
pa
);
newFileName
=
filePath
+
"/"
+
System
.
currentTimeMillis
()+
".doc"
;
//保存结果文件
pa1
=
newFileName
.
substring
(
1
);
document
.
saveToFile
(
pa1
,
FileFormat
.
Doc
);
}
else
{
document
.
loadFromFile
(
fileName
);
newFileName
=
filePath
+
System
.
currentTimeMillis
()+
".doc"
;
document
.
saveToFile
(
newFileName
,
FileFormat
.
Doc
);
pa1
=
newFileName
;
}
System
.
out
.
println
(
pa1
);
FeignClientResult
<
Map
<
String
,
String
>>
date
=
Systemctl
.
fileStorageClient
.
updateCommonFile
(
WordConverterUtils
.
fileToMultipartFile
(
new
File
(
newFileName
)));
FeignClientResult
<
Map
<
String
,
String
>>
date
=
Systemctl
.
fileStorageClient
.
updateCommonFile
(
WordConverterUtils
.
fileToMultipartFile
(
new
File
(
pa1
)));
if
(
date
!=
null
)
{
Map
<
String
,
String
>
map
=
date
.
getResult
();
...
...
@@ -841,18 +841,33 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
out
.
close
();
template
.
close
();
// File file = new File(fileName);
// if(file.exists()) {
// String htmlPath = System.getProperty("user.dir") + File.separator + "lookHtml" + File.separator + "file" + File.separator;
// String name = urlString.substring(urlString.lastIndexOf('/') + 1);
// new File(fileName).renameTo(new File(htmlPath+name.substring(0, name.indexOf(".")) + ".html"));
// }
File
file
=
new
File
(
fileName
);
if
(
file
.
exists
())
{
file
.
delete
();
}
File
file1
=
new
File
(
newFileName
);
if
(
file1
.
exists
())
{
file1
.
delete
();
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
}
void
handleFunc
(
AlertCalledPowerInfoDto
dto
,
Map
<
String
,
Object
>
map
)
{
dto
.
setCarName
(
map
.
get
(
"carName"
).
toString
());
dto
.
setStation
(
map
.
get
(
"companyName"
).
toString
());
// 随车人员
List
<
PowerData
>
powerDataOne
=
powerTransferMapper
.
getPowerDataOne
(
Long
.
valueOf
(
map
.
get
(
"id"
).
toString
()));
if
(!
ValidationUtil
.
isEmpty
(
powerDataOne
))
{
dto
.
setPersonNum
(
String
.
valueOf
(
powerDataOne
.
size
()));
}
else
{
dto
.
setPersonNum
(
"0"
);
}
}
static
int
dangerListDataStartRow
=
2
;
// 表头占两行
static
int
dangerListDataStartRowNew
=
1
;
// 表头占一行
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ESAlertCalledService.java
View file @
12c85dcf
...
...
@@ -57,7 +57,7 @@ public class ESAlertCalledService {
public
void
init
()
throws
Exception
{
//初始化ES,重建索引
//
initEs();
initEs
();
}
/**
...
...
amos-boot-system-jcs/src/main/resources/localLib/Spire.Doc.jar
deleted
100644 → 0
View file @
34994fb4
File deleted
pom.xml
View file @
12c85dcf
...
...
@@ -283,6 +283,11 @@
<name>
Snapshots
</name>
<url>
http://172.16.1.6:8081/nexus/content/repositories/snapshots/
</url>
</repository>
<repository>
<id>
com.e-iceblue
</id>
<name>
e-iceblue
</name>
<url>
https://repo.e-iceblue.com/nexus/content/groups/public/
</url>
</repository>
</repositories>
<modules>
...
...
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