Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
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
fulixin
dsk-operate-sys-cscec
Commits
97a38414
Commit
97a38414
authored
Nov 21, 2023
by
liuChang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出
parent
d17ead35
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
520 additions
and
38 deletions
+520
-38
application-dev.yml
dsk-admin/src/main/resources/application-dev.yml
+1
-1
application-test.yml
dsk-admin/src/main/resources/application-test.yml
+1
-1
ComposeQueryDto.java
.../src/main/java/com/dsk/jsk/domain/bo/ComposeQueryDto.java
+2
-0
ImportantProjectDto.java
.../main/java/com/dsk/jsk/domain/bo/ImportantProjectDto.java
+67
-0
ExportController.java
...main/java/com/dsk/search/controller/ExportController.java
+36
-19
ExportService.java
...i/src/main/java/com/dsk/search/service/ExportService.java
+17
-15
ObjectUtils.java
...iz-api/src/main/java/com/dsk/search/util/ObjectUtils.java
+394
-0
SysUserFileRecordServiceImpl.java
...dsk/system/service/impl/SysUserFileRecordServiceImpl.java
+2
-2
No files found.
dsk-admin/src/main/resources/application-dev.yml
View file @
97a38414
...
...
@@ -196,7 +196,7 @@ dsk:
# accessKeyId: aec7b3ff2y2q8x6t49a7e2c463ce21912
# accessKeySecret: ee8a53c7ea04eb3ac311406c8f56f95b
# protocol: https
exportBackUrl
:
http
s://szh-test.jiansheku.com
/export/backUrl
exportBackUrl
:
http
://47.104.91.229:9099/prod-api
/export/backUrl
sa-token
:
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
...
...
dsk-admin/src/main/resources/application-test.yml
View file @
97a38414
...
...
@@ -196,7 +196,7 @@ dsk:
# accessKeyId: aec7b3ff2y2q8x6t49a7e2c463ce21912
# accessKeySecret: ee8a53c7ea04eb3ac311406c8f56f95b
# protocol: https
exportBackUrl
:
http://47.104.91.229:9099/export/backUrl
exportBackUrl
:
http://47.104.91.229:9099/
prod-api/
export/backUrl
sa-token
:
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/jsk/domain/bo/ComposeQueryDto.java
View file @
97a38414
...
...
@@ -61,6 +61,8 @@ public class ComposeQueryDto extends BasePage {
JskBidWinListDto
jskBidWinListDto
;
//专项债项目
SpecialBondProjectDto
specialBondProjectDto
;
//重点项目清单
ImportantProjectDto
importantProjectDto
;
//投标计划
JskBidPlanDto
jskBidPlanDto
;
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/jsk/domain/bo/ImportantProjectDto.java
0 → 100644
View file @
97a38414
package
com
.
dsk
.
jsk
.
domain
.
bo
;
import
lombok.Data
;
/**
* 组合查询参数
* @author Administrator
*
*/
@Data
public
class
ImportantProjectDto
{
Long
id
;
String
md5
;
String
projectName
;
//关键字
String
keyword
;
//关键字查询范围
String
keywordStr
;
String
province
;
String
city
;
String
area
;
String
year
;
String
domicile
;
Double
startMoney
;
Double
endMoney
;
//项目级别
String
projectLevel
;
//项目类型
String
buildingProjectType
;
//文件标题
String
fileTitle
;
String
fileUrl
;
//拟开工时间
String
planStartDate
;
//拟建成时间
String
planCompletionDate
;
//项目总投资
String
projectTotalInvestment
;
//已完成投资额(万元)
String
completedInvestment
;
//年度投资金额(万元)
String
completedPlanInvestment
;
//主管部门
String
chargeDepartment
;
//项目法人
String
constructUnit
;
//项目法人id
String
constructUnitId
;
//联系方式及联系人
String
contactPersonAndTel
;
//建设规模
String
projectScale
;
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/search/controller/ExportController.java
View file @
97a38414
...
...
@@ -9,8 +9,10 @@ import com.dsk.jsk.domain.JskCombineSearchDto;
import
com.dsk.jsk.domain.bo.ComposeQueryDto
;
import
com.dsk.jsk.domain.bo.UrbanInvestmentPlatformDto
;
import
com.dsk.search.service.ExportService
;
import
com.dsk.search.util.ObjectUtils
;
import
com.dsk.system.service.ISysUserFileRecordService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -18,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.annotation.Resource
;
import
javax.validation.Valid
;
import
java.util.Arrays
;
/**
* @author lc
...
...
@@ -46,69 +49,83 @@ public class ExportController {
* 企业基本信息表导出
*/
@PostMapping
(
"/enterprise/info"
)
public
void
enterpriseInfoExport
(
@RequestBody
JSONObject
object
)
{
ComposeQueryDto
compose
=
com
.
alibaba
.
fastjson2
.
JSONObject
.
parseObject
(
object
.
toJSONString
(),
ComposeQueryDto
.
class
);
public
AjaxResult
enterpriseInfoExport
(
@RequestBody
JSONObject
object
)
{
ComposeQueryDto
compose
=
JSONObject
.
parseObject
(
object
.
toJSONString
(),
ComposeQueryDto
.
class
);
if
(
null
==
compose
.
getAptitudeQueryDto
()
||
CollectionUtils
.
isEmpty
(
compose
.
getAptitudeQueryDto
().
getAptitudeDtoList
())
||
!
ObjectUtils
.
hasValueThroughObj
(
compose
.
getAptitudeQueryDto
(),
null
,
Arrays
.
asList
(
"and"
,
"or"
,
"yes"
,
"no"
,
"level"
,
"qualification"
,
"new"
,
"only"
)))
{
return
AjaxResult
.
warn
(
"导出筛选条件为空!"
);
}
if
(
StringUtils
.
isEmpty
(
compose
.
getExportExeclName
())){
object
.
put
(
"exportExeclName"
,
"企业基本信息导出"
);
}
exportService
.
enterpriseInfoExport
(
object
);
return
exportService
.
enterpriseInfoExport
(
object
);
}
/*
* 企业资质表导出
*/
@PostMapping
(
"/aptitude"
)
public
void
enterpriseAptitudeExport
(
@RequestBody
JSONObject
object
)
{
ComposeQueryDto
compose
=
com
.
alibaba
.
fastjson2
.
JSONObject
.
parseObject
(
object
.
toJSONString
(),
ComposeQueryDto
.
class
);
public
AjaxResult
enterpriseAptitudeExport
(
@RequestBody
JSONObject
object
)
{
ComposeQueryDto
compose
=
JSONObject
.
parseObject
(
object
.
toJSONString
(),
ComposeQueryDto
.
class
);
if
(
null
==
compose
.
getAptitudeQueryDto
()
||
CollectionUtils
.
isEmpty
(
compose
.
getAptitudeQueryDto
().
getAptitudeDtoList
())
||
!
ObjectUtils
.
hasValueThroughObj
(
compose
.
getAptitudeQueryDto
().
getAptitudeDtoList
().
get
(
0
),
null
,
Arrays
.
asList
(
"and"
,
"or"
,
"yes"
,
"no"
,
"level"
,
"qualification"
,
"new"
,
"only"
)))
{
return
AjaxResult
.
warn
(
"导出筛选条件为空!"
);
}
if
(
StringUtils
.
isEmpty
(
compose
.
getExportExeclName
())){
object
.
put
(
"exportExeclName"
,
"企业资质信息导出"
);
}
exportService
.
enterpriseAptitudeExport
(
object
);
return
exportService
.
enterpriseAptitudeExport
(
object
);
}
/*
* 重点项目清单导出
*/
@RequestMapping
(
"/important"
)
public
void
exportImportant
(
@RequestBody
JSONObject
object
)
{
ComposeQueryDto
compose
=
com
.
alibaba
.
fastjson2
.
JSONObject
.
parseObject
(
object
.
toJSONString
(),
ComposeQueryDto
.
class
);
public
AjaxResult
exportImportant
(
@RequestBody
JSONObject
object
)
{
ComposeQueryDto
compose
=
JSONObject
.
parseObject
(
object
.
toJSONString
(),
ComposeQueryDto
.
class
);
if
(
null
==
compose
.
getImportantProjectDto
()
||
!
ObjectUtils
.
hasValueThroughObj
(
compose
.
getImportantProjectDto
(),
null
,
Arrays
.
asList
(
"and"
,
"or"
,
"yes"
,
"no"
,
"level"
,
"qualification"
,
"new"
,
"only"
)))
{
return
AjaxResult
.
warn
(
"导出筛选条件为空!"
);
}
if
(
StringUtils
.
isEmpty
(
compose
.
getExportExeclName
())){
object
.
put
(
"exportExeclName"
,
"重点项目导出"
);
}
exportService
.
importantExport
(
object
);
return
exportService
.
importantExport
(
object
);
}
/**
* 集团成员列表导出
*/
@PostMapping
(
"/combine/memberList"
)
public
void
memberListExportPre
(
@RequestBody
JskCombineSearchDto
dto
)
throws
Exception
{
exportService
.
memberListExport
(
dto
);
public
AjaxResult
memberListExportPre
(
@RequestBody
JskCombineSearchDto
dto
)
throws
Exception
{
return
exportService
.
memberListExport
(
dto
);
}
//集团中标业绩导出
@PostMapping
(
"/combine/win/bid"
)
@SaCheckPermission
(
"combine:info:export:win:bid"
)
public
void
exportWinBid
(
@RequestBody
JskCombineSearchDto
dto
)
{
exportService
.
exportWinBid
(
dto
);
public
AjaxResult
exportWinBid
(
@RequestBody
JskCombineSearchDto
dto
)
{
return
exportService
.
exportWinBid
(
dto
);
}
//集团招标业绩导出
@PostMapping
(
"/combine/bid"
)
@SaCheckPermission
(
"combine:info:export:win:bid"
)
public
void
exportBid
(
@RequestBody
JskCombineSearchDto
dto
)
{
exportService
.
exportBid
(
dto
);
public
AjaxResult
exportBid
(
@RequestBody
JskCombineSearchDto
dto
)
{
return
exportService
.
exportBid
(
dto
);
}
//查城投平台导出
@PostMapping
(
value
=
"/uipSerach"
)
public
void
uipSerachExport
(
@RequestBody
@Valid
EnterpriseUipSearchBody
vo
)
throws
Exception
{
exportService
.
uipSerachExport
(
vo
);
public
AjaxResult
uipSerachExport
(
@RequestBody
@Valid
EnterpriseUipSearchBody
vo
)
throws
Exception
{
return
exportService
.
uipSerachExport
(
vo
);
}
//市场经济 城投平台导出
@PostMapping
(
"/urbanInvestmentPlatform"
)
public
void
export
(
@RequestBody
UrbanInvestmentPlatformDto
dto
)
{
exportService
.
export
(
dto
);
public
AjaxResult
export
(
@RequestBody
UrbanInvestmentPlatformDto
dto
)
{
return
exportService
.
export
(
dto
);
}
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/search/service/ExportService.java
View file @
97a38414
...
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson2.JSONObject;
import
com.dsk.acc.openapi.client.util.CommonUtils
;
import
com.dsk.biz.utils.ExcelUtils
;
import
com.dsk.common.constant.Constants
;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.utils.DskOpenApiUtil
;
import
com.dsk.component.UploadComponent
;
import
com.dsk.jsk.domain.EnterpriseUipSearchBody
;
...
...
@@ -43,8 +44,7 @@ public class ExportService {
private
UploadComponent
uploadComponent
;
//企业基本信息导出
@Async
public
void
enterpriseInfoExport
(
JSONObject
object
)
{
public
AjaxResult
enterpriseInfoExport
(
JSONObject
object
)
{
SysUserFileRecord
fileRecord
=
new
SysUserFileRecord
();
fileRecord
.
setFileName
(
object
.
get
(
"exportExeclName"
).
toString
());
fileRecord
.
setType
(
1
);
...
...
@@ -56,11 +56,11 @@ public class ExportService {
//回调函数
object
.
put
(
"exportBackUrl"
,
EXPORT_BACK_URL
);
dskOpenApiUtil
.
requestBody
(
"/operate/export/enterprise"
,
object
);
return
AjaxResult
.
success
();
}
//企业资质导出
@Async
public
void
enterpriseAptitudeExport
(
JSONObject
object
)
{
public
AjaxResult
enterpriseAptitudeExport
(
JSONObject
object
)
{
SysUserFileRecord
fileRecord
=
new
SysUserFileRecord
();
fileRecord
.
setFileName
(
object
.
get
(
"exportExeclName"
).
toString
());
fileRecord
.
setType
(
1
);
...
...
@@ -72,11 +72,11 @@ public class ExportService {
//回调函数
object
.
put
(
"exportBackUrl"
,
EXPORT_BACK_URL
);
dskOpenApiUtil
.
requestBody
(
"/operate/export/aptitude"
,
object
);
return
AjaxResult
.
success
();
}
//重点项目清单
@Async
public
void
importantExport
(
JSONObject
object
)
{
public
AjaxResult
importantExport
(
JSONObject
object
)
{
SysUserFileRecord
fileRecord
=
new
SysUserFileRecord
();
fileRecord
.
setFileName
(
object
.
get
(
"exportExeclName"
).
toString
());
fileRecord
.
setType
(
1
);
...
...
@@ -88,12 +88,11 @@ public class ExportService {
//回调函数
object
.
put
(
"exportBackUrl"
,
EXPORT_BACK_URL
);
dskOpenApiUtil
.
requestBody
(
"/operate/export/important"
,
object
);
return
AjaxResult
.
success
();
}
//集团成员导出
@Async
public
void
memberListExport
(
JskCombineSearchDto
dto
)
{
public
AjaxResult
memberListExport
(
JskCombineSearchDto
dto
)
{
SysUserFileRecord
fileRecord
=
new
SysUserFileRecord
();
fileRecord
.
setFileName
(
dto
.
getExportExeclName
());
fileRecord
.
setType
(
1
);
...
...
@@ -105,11 +104,11 @@ public class ExportService {
//回调函数
dto
.
setExportBackUrl
(
EXPORT_BACK_URL
);
dskOpenApiUtil
.
requestBody
(
"/operate/export/member"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
return
AjaxResult
.
success
();
}
//集团中标业绩导出
@Async
public
void
exportWinBid
(
JskCombineSearchDto
dto
)
{
public
AjaxResult
exportWinBid
(
JskCombineSearchDto
dto
)
{
SysUserFileRecord
fileRecord
=
new
SysUserFileRecord
();
fileRecord
.
setFileName
(
dto
.
getExportExeclName
());
fileRecord
.
setType
(
1
);
...
...
@@ -121,11 +120,11 @@ public class ExportService {
//回调函数
dto
.
setExportBackUrl
(
EXPORT_BACK_URL
);
dskOpenApiUtil
.
requestBody
(
"/operate/export/combineBid"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
return
AjaxResult
.
success
();
}
//集团招标业绩
@Async
public
void
exportBid
(
JskCombineSearchDto
dto
)
{
public
AjaxResult
exportBid
(
JskCombineSearchDto
dto
)
{
SysUserFileRecord
fileRecord
=
new
SysUserFileRecord
();
fileRecord
.
setFileName
(
dto
.
getExportExeclName
());
fileRecord
.
setType
(
1
);
...
...
@@ -137,11 +136,12 @@ public class ExportService {
//回调函数
dto
.
setExportBackUrl
(
EXPORT_BACK_URL
);
dskOpenApiUtil
.
requestBody
(
"/operate/export/combine/tender"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
return
AjaxResult
.
success
();
}
@Async
public
void
uipSerachExport
(
EnterpriseUipSearchBody
pageDto
)
{
public
AjaxResult
uipSerachExport
(
EnterpriseUipSearchBody
pageDto
)
{
// 分页参数
pageDto
.
setPageNum
(
1
);
if
(
null
==
pageDto
.
getPageSize
()||
pageDto
.
getPageSize
()>=
2000
){
...
...
@@ -211,10 +211,11 @@ public class ExportService {
ExcelUtils
<
UrbanInvestmentExportVo
>
util
=
new
ExcelUtils
<>(
UrbanInvestmentExportVo
.
class
);
ByteArrayOutputStream
ba
=
util
.
exportExcel
(
resultList
,
"查城投平台"
,
title
,
true
);
uploadComponent
.
upload
(
title
,
ba
,
Constants
.
SUFFIX_XLSX
,
Constants
.
CONTENT_TYPE_XLSX
);
return
AjaxResult
.
success
();
}
@Async
public
void
export
(
UrbanInvestmentPlatformDto
pageDto
)
{
public
AjaxResult
export
(
UrbanInvestmentPlatformDto
pageDto
)
{
// 分页参数
pageDto
.
setPageNum
(
1
);
...
...
@@ -285,5 +286,6 @@ public class ExportService {
ExcelUtils
<
UrbanInvestmentExportVo
>
util
=
new
ExcelUtils
<>(
UrbanInvestmentExportVo
.
class
);
ByteArrayOutputStream
ba
=
util
.
exportExcel
(
resultList
,
"城投平台"
,
title
,
true
);
uploadComponent
.
upload
(
title
,
ba
,
Constants
.
SUFFIX_XLSX
,
Constants
.
CONTENT_TYPE_XLSX
);
return
AjaxResult
.
success
();
}
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/search/util/ObjectUtils.java
0 → 100644
View file @
97a38414
This diff is collapsed.
Click to expand it.
dsk-system/src/main/java/com/dsk/system/service/impl/SysUserFileRecordServiceImpl.java
View file @
97a38414
...
...
@@ -75,9 +75,9 @@ public class SysUserFileRecordServiceImpl implements ISysUserFileRecordService
return
AjaxResult
.
error
(
"回调参数异常:"
+
object
.
toString
());
}
SysUserFileRecord
fileRecord
=
new
SysUserFileRecord
();
fileRecord
.
setId
(
(
Long
)
object
.
get
(
"uniqueCode"
));
fileRecord
.
setId
(
Long
.
valueOf
(
object
.
get
(
"uniqueCode"
).
toString
()
));
fileRecord
.
setUrl
(
object
.
get
(
"url"
).
toString
());
fileRecord
.
set
Type
(
0
);
fileRecord
.
set
Status
(
0
);
baseMapper
.
updateById
(
fileRecord
);
log
.
info
(
"导出回调成功:"
+
object
.
toString
());
return
AjaxResult
.
success
();
...
...
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