Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
1025c13c
Commit
1025c13c
authored
Oct 17, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ziliaoxiazai youhua
parent
bae691d3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
29 deletions
+53
-29
CommonServiceImpl.java
.../boot/module/hygf/biz/service/impl/CommonServiceImpl.java
+51
-27
FinancingInfoServiceImpl.java
...odule/hygf/biz/service/impl/FinancingInfoServiceImpl.java
+0
-2
UnitInfoServiceImpl.java
...oot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
+2
-0
informationTemp.xlsx
...ygf-biz/src/main/resources/templates/informationTemp.xlsx
+0
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/CommonServiceImpl.java
View file @
1025c13c
...
@@ -64,6 +64,8 @@ import java.util.concurrent.ExecutionException;
...
@@ -64,6 +64,8 @@ import java.util.concurrent.ExecutionException;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.Future
;
import
java.util.concurrent.Future
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
import
java.util.zip.ZipOutputStream
;
...
@@ -875,15 +877,13 @@ public class CommonServiceImpl {
...
@@ -875,15 +877,13 @@ public class CommonServiceImpl {
redisUtils
.
set
(
redisKey
,
MapBuilder
.<
String
,
Object
>
create
()
redisUtils
.
set
(
redisKey
,
MapBuilder
.<
String
,
Object
>
create
()
.
put
(
"value"
,
100
).
build
());
.
put
(
"value"
,
100
).
build
());
// response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename*=UTF-8''" + encodedFilename);
cleanup
(
ziLiaoDir
);
cleanup
(
ziLiaoDir
);
}
}
private
void
fillSheet
(
Sheet
sheet
,
Object
data
)
{
private
void
fillSheet
(
Sheet
sheet
,
Object
data
)
{
if
(
Objects
.
isNull
(
null
)){
if
(
Objects
.
isNull
(
data
)){
return
;
return
;
}
}
int
startRow
=
1
;
int
startRow
=
1
;
...
@@ -1454,25 +1454,25 @@ public class CommonServiceImpl {
...
@@ -1454,25 +1454,25 @@ public class CommonServiceImpl {
// });
// });
}
}
@Async
//
@Async
void
cleanup
(
Path
tempDir
)
{
//
void cleanup(Path tempDir) {
try
{
//
try {
Files
.
walk
(
tempDir
).
sorted
(
Comparator
.
reverseOrder
()).
forEach
(
path
->
{
//
Files.walk(tempDir).sorted(Comparator.reverseOrder()).forEach(path -> {
try
{
//
try {
Files
.
delete
(
path
);
//
Files.delete(path);
}
catch
(
IOException
e
)
{
//
} catch (IOException e) {
e
.
printStackTrace
();
//
e.printStackTrace();
}
//
}
});
//
});
}
catch
(
IOException
e
)
{
//
} catch (IOException e) {
e
.
printStackTrace
();
//
e.printStackTrace();
}
//
}
}
//
}
//
private
static
String
extractFileNameFromUrl
(
String
url
)
{
//
private static String extractFileNameFromUrl(String url) {
String
fileName
=
url
.
substring
(
url
.
lastIndexOf
(
'/'
)
+
1
);
//
String fileName = url.substring(url.lastIndexOf('/') + 1);
return
fileName
;
//
return fileName;
}
//
}
...
@@ -1706,7 +1706,28 @@ void cleanup(Path tempDir) {
...
@@ -1706,7 +1706,28 @@ void cleanup(Path tempDir) {
// }
// }
}
}
@Async
public
void
cleanup
(
Path
tempDir
)
{
try
(
Stream
<
Path
>
paths
=
Files
.
walk
(
tempDir
))
{
List
<
Path
>
filesToDelete
=
paths
.
sorted
(
Comparator
.
reverseOrder
())
.
collect
(
Collectors
.
toList
());
// 分批删除文件
int
batchSize
=
100
;
// 根据实际情况调整批次大小
for
(
int
i
=
0
;
i
<
filesToDelete
.
size
();
i
+=
batchSize
)
{
List
<
Path
>
batch
=
filesToDelete
.
subList
(
i
,
Math
.
min
(
i
+
batchSize
,
filesToDelete
.
size
()));
batch
.
forEach
(
file
->
{
try
{
Files
.
delete
(
file
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
});
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
public
static
List
<
Map
<
String
,
Object
>>
convertList
(
List
<
Object
>
objectList
)
{
public
static
List
<
Map
<
String
,
Object
>>
convertList
(
List
<
Object
>
objectList
)
{
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
...
@@ -1760,10 +1781,13 @@ void cleanup(Path tempDir) {
...
@@ -1760,10 +1781,13 @@ void cleanup(Path tempDir) {
List
<
Map
<
String
,
String
>>
items
=
(
List
<
Map
<
String
,
String
>>)
stringStringMap
.
get
(
"items"
);
List
<
Map
<
String
,
String
>>
items
=
(
List
<
Map
<
String
,
String
>>)
stringStringMap
.
get
(
"items"
);
List
<
String
>
values
=
new
ArrayList
<>();
List
<
String
>
values
=
new
ArrayList
<>();
int
startNum
=
1
;
int
startNum
=
1
;
for
(
Map
<
String
,
String
>
item
:
items
)
{
if
(
CollectionUtil
.
isNotEmpty
(
items
)){
values
.
add
(
startNum
++
+
"."
+
item
.
get
(
"value"
)+
"。"
)
;
for
(
Map
<
String
,
String
>
item
:
items
)
{
values
.
add
(
startNum
++
+
"."
+
item
.
get
(
"value"
)+
"。"
)
;
}
urls
.
add
(
stringStringMap
.
get
(
"type"
)+
":"
+
String
.
join
(
""
,
values
));
}
}
urls
.
add
(
stringStringMap
.
get
(
"type"
)+
":"
+
String
.
join
(
""
,
values
));
}
}
map
.
put
(
"rectificationIdeas"
,
String
.
join
(
","
,
urls
));
map
.
put
(
"rectificationIdeas"
,
String
.
join
(
","
,
urls
));
}
}
...
@@ -1828,7 +1852,7 @@ void cleanup(Path tempDir) {
...
@@ -1828,7 +1852,7 @@ void cleanup(Path tempDir) {
List
<
ConstructionGirdRecords
>
getConstructionRecordsBasic
(
String
peasantHouseholdId
)
{
List
<
ConstructionGirdRecords
>
getConstructionRecordsBasic
(
String
peasantHouseholdId
)
{
// 施工自审操作记录
// 施工自审操作记录
LambdaQueryWrapper
<
ConstructionGirdRecords
>
up5
=
new
LambdaQueryWrapper
<
ConstructionGirdRecords
>();
LambdaQueryWrapper
<
ConstructionGirdRecords
>
up5
=
new
LambdaQueryWrapper
<
ConstructionGirdRecords
>();
up5
.
eq
(
ConstructionGirdRecords:
:
get
WorkOrderPowerStation
Id
,
peasantHouseholdId
);
up5
.
eq
(
ConstructionGirdRecords:
:
get
PeasantHousehold
Id
,
peasantHouseholdId
);
up5
.
orderByAsc
(
ConstructionGirdRecords:
:
getRecDate
);
up5
.
orderByAsc
(
ConstructionGirdRecords:
:
getRecDate
);
return
constructionGirdRecordsMapper
.
selectList
(
up5
);
return
constructionGirdRecordsMapper
.
selectList
(
up5
);
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/FinancingInfoServiceImpl.java
View file @
1025c13c
...
@@ -76,8 +76,6 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
...
@@ -76,8 +76,6 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
@Autowired
@Autowired
private
PowerStationEngineeringInfoMapper
powerStationEngineeringInfoMapper
;
private
PowerStationEngineeringInfoMapper
powerStationEngineeringInfoMapper
;
@Autowired
@Autowired
private
CommonServiceImpl
commonService
;
@Autowired
private
AcceptanceCheckServiceImpl
acceptanceCheckService
;
private
AcceptanceCheckServiceImpl
acceptanceCheckService
;
@Autowired
@Autowired
private
AcceptanceCheckAuditingServiceImpl
acceptanceCheckAuditingService
;
private
AcceptanceCheckAuditingServiceImpl
acceptanceCheckAuditingService
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
View file @
1025c13c
...
@@ -40,6 +40,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -40,6 +40,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
...
@@ -141,6 +142,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -141,6 +142,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
@Autowired
@Autowired
WorkFlowService
workFlowService
;
WorkFlowService
workFlowService
;
@Autowired
@Autowired
@Lazy
CommonServiceImpl
commonService
;
CommonServiceImpl
commonService
;
@Autowired
@Autowired
AmosRequestContext
amosRequestContext
;
AmosRequestContext
amosRequestContext
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/templates/informationTemp.xlsx
View file @
1025c13c
No preview for this file type
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