Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
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
Administrator
dsk-cr20g
Commits
147b5941
Commit
147b5941
authored
Jun 09, 2023
by
dengguangman
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
efacfcb9
d956e1c9
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
171 additions
and
109 deletions
+171
-109
BusinessFileController.java
...m/dsk/web/controller/business/BusinessFileController.java
+8
-19
EnterpriseStatisticBody.java
...dsk/common/core/domain/model/EnterpriseStatisticBody.java
+1
-0
FileUtils.java
...on/src/main/java/com/dsk/common/utils/file/FileUtils.java
+97
-36
index.js
dsk-operate-ui/src/router/index.js
+2
-2
index.vue
dsk-operate-ui/src/views/macro/economies/index.vue
+1
-1
index.vue
dsk-operate-ui/src/views/macro/enterprises/index.vue
+1
-1
index.vue
dsk-operate-ui/src/views/macro/financing/index.vue
+30
-14
BusinessListDto.java
.../src/main/java/com/dsk/system/domain/BusinessListDto.java
+0
-6
BusinessBrowseVo.java
.../main/java/com/dsk/system/domain/vo/BusinessBrowseVo.java
+6
-1
BusinessFollowRecordMapper.java
...ava/com/dsk/system/mapper/BusinessFollowRecordMapper.java
+2
-1
IBusinessFollowRecordService.java
.../com/dsk/system/service/IBusinessFollowRecordService.java
+2
-1
BusinessFollowRecordServiceImpl.java
.../system/service/impl/BusinessFollowRecordServiceImpl.java
+9
-6
BusinessInfoServiceImpl.java
.../com/dsk/system/service/impl/BusinessInfoServiceImpl.java
+6
-6
BusinessFollowRecordMapper.xml
.../resources/mapper/business/BusinessFollowRecordMapper.xml
+6
-15
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/business/BusinessFileController.java
View file @
147b5941
...
...
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -69,17 +70,6 @@ public class BusinessFileController extends BaseController {
return
getDataTable
(
allFiles
);
}
/* *//**
* 上传文件及文件夹
* @param url
* @param folderPath
* @return
*//*
@GetMapping("/upload/{url}/{folderPath}")
public AjaxResult uploadFolder(@PathVariable("url") String url,@PathVariable("folderPath") String folderPath) throws IOException {
return toAjax(FileUtils.uploadFolder(url, LOCALPATH + folderPath));
}*/
/**
* 上传文件及文件夹
* @param file 文件流
...
...
@@ -87,7 +77,7 @@ public class BusinessFileController extends BaseController {
* @return
*/
@PostMapping
(
"/upload"
)
public
AjaxResult
uploadFolder
(
@RequestPart
(
"file"
)
MultipartFile
file
,
HttpServletRequest
request
){
public
AjaxResult
uploadFolder
(
@RequestPart
(
"file"
)
MultipartFile
file
,
HttpServletRequest
request
){
try
{
String
businessFileName
=
request
.
getHeader
(
"FilePath"
);
// 上传文件路径
...
...
@@ -96,7 +86,7 @@ public class BusinessFileController extends BaseController {
String
fileName
=
FileUploadUtils
.
upload
(
filePath
,
file
);
String
url
=
serverConfig
.
getUrl
()
+
fileName
;
AjaxResult
ajax
=
AjaxResult
.
success
();
ajax
.
put
(
"url"
,
url
);
ajax
.
put
(
"url"
,
fileName
);
return
ajax
;
}
catch
(
IOException
e
)
{
return
AjaxResult
.
error
(
e
.
getMessage
());
...
...
@@ -105,12 +95,11 @@ public class BusinessFileController extends BaseController {
/**
* 下载文件
* @param url
* @param targetFolder
* @return
* @param filePath 要下载的文件路径
* @param response 返回的响应
*/
@
GetMapping
(
"/download/{url}/{targetFolder}
"
)
public
AjaxResult
downloadFolder
(
@PathVariable
(
"url"
)
String
url
,
@PathVariable
(
"targetFolder"
)
String
targetFolder
)
throws
IOException
{
return
toAjax
(
FileUtils
.
downloadFolder
(
url
,
targetFolder
)
);
@
PostMapping
(
"/download
"
)
public
void
downloadFolder
(
@RequestBody
BusinessIdDto
filePath
,
HttpServletResponse
response
)
{
FileUtils
.
downloadByFilePath
(
filePath
.
getFilePath
(),
response
);
}
}
dsk-common/src/main/java/com/dsk/common/core/domain/model/EnterpriseStatisticBody.java
View file @
147b5941
...
...
@@ -18,5 +18,6 @@ public class EnterpriseStatisticBody
*/
@NotNull
(
message
=
"企业id不能为空"
)
private
Integer
companyId
;
private
Boolean
isFy
=
false
;
}
dsk-common/src/main/java/com/dsk/common/utils/file/FileUtils.java
View file @
147b5941
...
...
@@ -4,6 +4,7 @@ import com.dsk.common.config.RuoYiConfig;
import
com.dsk.common.core.domain.entity.BusinessFileVo
;
import
com.dsk.common.exception.base.BaseException
;
import
com.dsk.common.utils.DateUtils
;
import
com.dsk.common.utils.ServletUtils
;
import
com.dsk.common.utils.StringUtils
;
import
com.dsk.common.utils.uuid.IdUtils
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -29,8 +30,6 @@ import java.nio.charset.StandardCharsets;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipInputStream
;
/**
* 文件处理工具类
...
...
@@ -313,46 +312,95 @@ public class FileUtils
}
/**
* 下载文件
* @param url 要下载的文件链接
* @param targetFolder 目标文件
* 根据文件路径下载文件
* @param filePath 要下载的文件路径
* @param response 返回的响应
*/
public
static
void
downloadByFilePath
(
String
filePath
,
HttpServletResponse
response
)
{
try
{
// path是指想要下载的文件的路径
File
file
=
new
File
(
filePath
);
// log.info(file.getPath());
if
(!
file
.
exists
())
throw
new
BaseException
(
"文件不存在!"
);
// 获取文件名
String
filename
=
file
.
getName
();
// log.info("文件名: "+filename);
// 获取文件后缀名
// String ext = filename.substring(filename.lastIndexOf(".") + 1).toLowerCase();
// log.info("文件后缀名:" + ext);
// 将文件写入输入流
FileInputStream
fileInputStream
=
new
FileInputStream
(
file
);
InputStream
fis
=
new
BufferedInputStream
(
fileInputStream
);
byte
[]
buffer
=
new
byte
[
fis
.
available
()];
fis
.
read
(
buffer
);
// 清空response
response
.
reset
();
// 设置response的Header
response
.
setCharacterEncoding
(
"UTF-8"
);
//文件类型
response
.
setContentType
(
"application/octet-stream"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
filename
,
"UTF-8"
));
//文件名称
response
.
addHeader
(
"Download-filename"
,
URLEncoder
.
encode
(
filename
,
"UTF-8"
));
// 告知浏览器文件的大小
response
.
addHeader
(
"Content-Length"
,
""
+
file
.
length
());
OutputStream
outputStream
=
new
BufferedOutputStream
(
response
.
getOutputStream
());
outputStream
.
write
(
buffer
);
fis
.
close
();
outputStream
.
flush
();
}
catch
(
IOException
ex
)
{
ex
.
printStackTrace
();
}
}
/**
* 根据文件url下载文件
* @param filePath 要下载的文件链接
* @param response 响应体
* @return
* @throws IOException
*/
public
static
boolean
downloadFolder
(
String
url
,
String
targetFolder
)
throws
IOException
{
URL
downloadUrl
=
new
URL
(
url
);
HttpURLConnection
connection
=
(
HttpURLConnection
)
downloadUrl
.
openConnection
();
connection
.
setRequestMethod
(
"GET"
);
connection
.
connect
();
if
(
connection
.
getResponseCode
()
!=
HttpURLConnection
.
HTTP_OK
)
{
throw
new
RuntimeException
(
"下载文件夹失败: "
+
connection
.
getResponseMessage
());
}
try
(
ZipInputStream
zipInputStream
=
new
ZipInputStream
(
connection
.
getInputStream
()))
{
ZipEntry
entry
;
while
((
entry
=
zipInputStream
.
getNextEntry
())
!=
null
)
{
String
entryName
=
entry
.
getName
();
if
(
StringUtils
.
isBlank
(
entryName
))
{
continue
;
}
public
static
void
downloadByUrl
(
String
filePath
,
HttpServletResponse
response
){
// String fileUrl = request.getParameter("fileUrl"); // 获取文件链接
File
entryFile
=
new
File
(
targetFolder
,
entryName
);
if
(
entry
.
isDirectory
())
{
entryFile
.
mkdirs
();
}
else
{
File
parent
=
entryFile
.
getParentFile
();
if
(!
parent
.
exists
())
{
parent
.
mkdirs
();
}
try
(
FileOutputStream
outputStream
=
new
FileOutputStream
(
entryFile
))
{
IOUtils
.
copy
(
zipInputStream
,
outputStream
);
}
}
try
{
URL
url
=
new
URL
(
filePath
);
HttpURLConnection
connection
=
(
HttpURLConnection
)
url
.
openConnection
();
connection
.
setRequestMethod
(
"GET"
);
// 设置响应头,告诉浏览器下载文件
String
contentType
=
connection
.
getContentType
();
// 获取文件类型
response
.
setContentType
(
contentType
);
String
filename
=
extractFilenameFromUrl
(
filePath
);
// 从链接中提取文件名
response
.
setHeader
(
"Content-Disposition"
,
"attachment; filename="
+
filename
+
""
);
// 将文件流写入响应输出流
InputStream
inputStream
=
connection
.
getInputStream
();
byte
[]
buffer
=
new
byte
[
4096
];
int
bytesRead
=
-
1
;
while
((
bytesRead
=
inputStream
.
read
(
buffer
))
!=
-
1
)
{
response
.
getOutputStream
().
write
(
buffer
,
0
,
bytesRead
);
}
inputStream
.
close
();
connection
.
disconnect
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
true
;
}
// 从文件链接中提取文件名
public
static
String
extractFilenameFromUrl
(
String
url
)
{
int
slashIndex
=
url
.
lastIndexOf
(
'/'
);
int
dotIndex
=
url
.
lastIndexOf
(
'.'
);
if
(
dotIndex
==
-
1
||
dotIndex
<
slashIndex
)
{
return
"download"
;
}
return
url
.
substring
(
slashIndex
+
1
);
}
/**
...
...
@@ -568,4 +616,17 @@ public class FileUtils
String
baseName
=
FilenameUtils
.
getBaseName
(
fileName
);
return
baseName
;
}
/**
* 获取本地服务的域名,端口
* @return
*/
public
static
String
getUrl
()
{
HttpServletRequest
request
=
ServletUtils
.
getRequest
();
StringBuffer
url
=
request
.
getRequestURL
();
String
contextPath
=
request
.
getServletContext
().
getContextPath
();
return
url
.
delete
(
url
.
length
()
-
request
.
getRequestURI
().
length
(),
url
.
length
()).
append
(
contextPath
).
toString
();
}
}
dsk-operate-ui/src/router/index.js
View file @
147b5941
...
...
@@ -116,7 +116,7 @@ export const constantRoutes = [
]
},
{
path
:
'/financing
Details
'
,
path
:
'/financing'
,
component
:
Layout
,
hidden
:
true
,
redirect
:
'noredirect'
,
...
...
@@ -125,7 +125,7 @@ export const constantRoutes = [
path
:
'/macro/financing/details/:id(
\\
d+)'
,
component
:
()
=>
import
(
'@/views/macro/financing/details'
),
name
:
'financingDetails'
,
meta
:
{
title
:
'区域专项债详情'
}
meta
:
{
title
:
'区域专项债详情'
,
icon
:
''
}
}
]
},
...
...
dsk-operate-ui/src/views/macro/economies/index.vue
View file @
147b5941
...
...
@@ -32,7 +32,7 @@ export default {
},
data
()
{
return
{
activeName
:
'f
our
'
,
activeName
:
'f
irst
'
,
dataQuery
:{},
province
:
''
}
...
...
dsk-operate-ui/src/views/macro/enterprises/index.vue
View file @
147b5941
...
...
@@ -68,7 +68,7 @@
// import LocalEnterprises from './component/localEnterprises'
// import Offsite from './component/offsite'
import
aptitudeCode
from
'@/assets/json/aptitudeCode'
import
{
countGroupByMonth
,
countGroupByProvince
,
getYear
}
from
'@/api/macro/macro'
import
{
enterprise
}
from
'@/api/macro/macro'
export
default
{
name
:
'Enterprises'
,
// components: {LocalEnterprises,Offsite},
...
...
dsk-operate-ui/src/views/macro/financing/index.vue
View file @
147b5941
...
...
@@ -11,15 +11,16 @@
:data=
"tableData"
element-loading-text=
"Loading"
border
show-summary
height=
"360"
fit
@
sort-change=
"sortChange"
highlight-current-row
>
<el-table-column
prop=
"name"
label=
"项目类型"
width=
"150"
/>
<el-table-column
prop=
"
value
"
label=
"项目个数"
sortable=
"custom"
width=
"140"
/>
<el-table-column
prop=
"
totalInvestment
"
label=
"投资额(亿元)"
sortable=
"custom"
width=
"140"
/>
<el-table-column
prop=
"proportion"
label=
"比例"
width=
"140"
sortable=
"custom"
/>
<el-table-column
prop=
"
number
"
label=
"项目个数"
sortable=
"custom"
width=
"140"
/>
<el-table-column
prop=
"
value
"
label=
"投资额(亿元)"
sortable=
"custom"
width=
"140"
/>
<el-table-column
prop=
"proportion"
label=
"比例
(%)
"
width=
"140"
sortable=
"custom"
/>
</el-table>
</div>
</div>
...
...
@@ -37,6 +38,7 @@
v-loading=
"tableLoading"
:data=
"listData"
element-loading-text=
"Loading"
@
sort-change=
"sortChange1"
border
fit
highlight-current-row
...
...
@@ -49,10 +51,10 @@
<router-link
:to=
"'/macro/financing/details/'+ scope.row.id"
tag=
"a"
class=
"a-link"
>
{{
scope
.
row
.
projectName
}}
</router-link>
</
template
>
</el-table-column>
<el-table-column
prop=
"projectTotalInvestment"
label=
"项目总投资(亿)"
sortable
width=
"155"
/>
<el-table-column
prop=
"projectCapital"
label=
"项目资本金(亿)"
sortable
width=
"155"
/>
<el-table-column
prop=
"econData007"
label=
"项目收益倍数(倍)"
width=
"150"
/>
<el-table-column
prop=
"zxz"
label=
"专项债金额(亿)"
width=
"150"
/>
<el-table-column
prop=
"projectTotalInvestment"
label=
"项目总投资(亿)"
sortable
=
"custom"
width=
"155"
/>
<el-table-column
prop=
"projectCapital"
label=
"项目资本金(亿)"
sortable
=
"custom"
width=
"155"
/>
<el-table-column
prop=
"econData007"
label=
"项目收益倍数(倍)"
sortable=
"custom"
width=
"150"
/>
<el-table-column
prop=
"zxz"
label=
"专项债金额(亿)"
sortable=
"custom"
width=
"150"
/>
<el-table-column
prop=
"specialCapital"
label=
"专项债用作资本金(亿)"
width=
"170"
/>
<el-table-column
prop=
"projectEntity"
label=
"项目主体"
>
<!--<template slot-scope="scope">-->
...
...
@@ -126,8 +128,9 @@ export default {
for
(
var
i
=
0
;
i
<
res
.
data
.
length
;
i
++
){
var
obj
=
{};
obj
.
name
=
res
.
data
[
i
].
projectType
;
obj
.
value
=
res
.
data
[
i
].
count
;
obj
.
totalInvestment
=
res
.
data
[
i
].
totalInvestment
;
obj
.
value
=
res
.
data
[
i
].
totalInvestment
;
obj
.
number
=
res
.
data
[
i
].
count
;
// obj.totalInvestment=res.data[i].totalInvestment;
obj
.
proportion
=
res
.
data
[
i
].
proportion
;
list
.
push
(
obj
)
}
...
...
@@ -140,8 +143,6 @@ export default {
for
(
let
i
=
0
;
i
<
10
;
i
++
){
data
.
push
(
arr
[
i
])
}
console
.
log
(
arr
)
console
.
log
(
data
)
this
.
initChart
(
data
)
})
},
...
...
@@ -156,8 +157,8 @@ export default {
formatter
:
function
(
params
)
{
var
result
=
''
result
+=
'<h3 style="color: #232226;padding: 0 0 5px 0;margin: 0;">'
+
params
.
data
.
name
+
'</h3>'
result
+=
'<p style="color: rgba(35,35,35,0.8);padding: 0;margin: 0;">'
+
params
.
data
.
value
+
'个</p>'
result
+=
'<p style="color: rgba(35,35,35,0.8);padding: 0;margin: 0;">'
+
params
.
data
.
totalInvestment
+
'亿元</p>'
result
+=
'<p style="color: rgba(35,35,35,0.8);padding: 0;margin: 0;">'
+
params
.
data
.
number
+
'个</p>'
result
+=
'<p style="color: rgba(35,35,35,0.8);padding: 0;margin: 0;">'
+
params
.
data
.
value
+
'亿元</p>'
result
+=
'<p style="color: rgba(35,35,35,0.8);padding: 0;margin: 0;">'
+
params
.
data
.
proportion
+
'%</p>'
return
result
;
},
...
...
@@ -189,8 +190,10 @@ export default {
myChart
.
setOption
(
option
);
},
sortChange
({
column
,
prop
,
order
}){
if
(
prop
===
'
value
'
){
if
(
prop
===
'
number
'
){
this
.
queryParams
.
field
=
'count'
}
else
if
(
prop
===
'value'
){
this
.
queryParams
.
field
=
'totalInvestment '
}
else
{
this
.
queryParams
.
field
=
prop
}
...
...
@@ -233,6 +236,19 @@ export default {
this
.
pageIndex
=
val
this
.
getData
()
},
sortChange1
({
column
,
prop
,
order
}){
this
.
tableParams
.
field
=
prop
;
if
(
column
.
order
===
"ascending"
){
this
.
tableParams
.
order
=
'asc'
}
else
if
(
column
.
order
===
"descending"
){
this
.
tableParams
.
order
=
'desc'
}
else
{
this
.
tableParams
.
order
=
''
this
.
tableParams
.
field
=
''
}
this
.
pageIndex
=
1
;
this
.
getData
()
},
}
}
</
script
>
...
...
dsk-system/src/main/java/com/dsk/system/domain/BusinessListDto.java
View file @
147b5941
...
...
@@ -11,12 +11,6 @@ import java.util.List;
**/
@Data
public
class
BusinessListDto
{
/**
* 拜访方式
*/
private
String
visitWay
;
/**
* 项目名称
*/
...
...
dsk-system/src/main/java/com/dsk/system/domain/vo/BusinessBrowseVo.java
View file @
147b5941
...
...
@@ -121,9 +121,14 @@ public class BusinessBrowseVo {
private
Integer
backlogCount
;
/**
*
资料文档
统计
*
相关企业
统计
*/
private
Integer
relateCompanyCount
;
/**
* 资料文档统计
*/
private
Integer
fileCount
;
}
dsk-system/src/main/java/com/dsk/system/mapper/BusinessFollowRecordMapper.java
View file @
147b5941
...
...
@@ -3,6 +3,7 @@ package com.dsk.system.mapper;
import
com.dsk.common.core.domain.entity.BusinessFollowRecord
;
import
com.dsk.system.domain.BusinessIdDto
;
import
com.dsk.system.domain.BusinessListDto
;
import
com.dsk.system.domain.vo.BusinessListVo
;
import
java.util.List
;
...
...
@@ -20,7 +21,7 @@ public interface BusinessFollowRecordMapper
* @param userId
* @return
*/
List
<
String
>
selectRelateProject
(
Integer
userId
);
List
<
BusinessListVo
>
selectRelateProject
(
Integer
userId
);
/**
* 查询关联业主企业
...
...
dsk-system/src/main/java/com/dsk/system/service/IBusinessFollowRecordService.java
View file @
147b5941
...
...
@@ -3,6 +3,7 @@ package com.dsk.system.service;
import
com.dsk.common.core.domain.entity.BusinessFollowRecord
;
import
com.dsk.system.domain.BusinessIdDto
;
import
com.dsk.system.domain.BusinessListDto
;
import
com.dsk.system.domain.vo.BusinessListVo
;
import
java.util.List
;
...
...
@@ -59,7 +60,7 @@ public interface IBusinessFollowRecordService
* @param userId
* @return
*/
List
<
String
>
selectRelateProject
(
Integer
userId
);
List
<
BusinessListVo
>
selectRelateProject
(
Integer
userId
);
/**
* 查询关联业主企业
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessFollowRecordServiceImpl.java
View file @
147b5941
package
com
.
dsk
.
system
.
service
.
impl
;
import
com.dsk.common.core.domain.entity.BusinessFollowRecord
;
import
com.dsk.common.exception.base.BaseException
;
import
com.dsk.common.utils.DateUtils
;
import
com.dsk.common.utils.SecurityUtils
;
import
com.dsk.system.domain.BusinessIdDto
;
import
com.dsk.system.domain.BusinessListDto
;
import
com.dsk.system.domain.vo.BusinessListVo
;
import
com.dsk.system.mapper.BusinessFollowRecordMapper
;
import
com.dsk.system.service.IBusinessFollowRecordService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -45,11 +48,11 @@ public class BusinessFollowRecordServiceImpl implements IBusinessFollowRecordSer
@Override
public
List
<
BusinessFollowRecord
>
allFollow
(
BusinessListDto
dto
)
{
//userId不传值,就查询全部门项目
//
if (dto.getUserId() == null) {
//
Long deptId = SecurityUtils.getLoginUser().getDeptId();
//
if (deptId == null) throw new BaseException("请登录");
//
dto.setDeptId(deptId.intValue());
//
}
if
(
dto
.
getUserId
()
==
null
)
{
Long
deptId
=
SecurityUtils
.
getLoginUser
().
getDeptId
();
if
(
deptId
==
null
)
throw
new
BaseException
(
"请登录"
);
dto
.
setDeptId
(
deptId
.
intValue
());
}
return
businessFollowRecordMapper
.
allFollow
(
dto
);
}
...
...
@@ -72,7 +75,7 @@ public class BusinessFollowRecordServiceImpl implements IBusinessFollowRecordSer
}
@Override
public
List
<
String
>
selectRelateProject
(
Integer
userId
)
{
public
List
<
BusinessListVo
>
selectRelateProject
(
Integer
userId
)
{
return
businessFollowRecordMapper
.
selectRelateProject
(
userId
);
}
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessInfoServiceImpl.java
View file @
147b5941
...
...
@@ -80,11 +80,11 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
@Override
public
List
<
BusinessListVo
>
selectBusinessInfoList
(
BusinessListDto
dto
)
{
//userId不传值,就查询全部门项目
//
if (dto.getUserId() == null) {
//
Long deptId = SecurityUtils.getLoginUser().getDeptId();
//
if (deptId == null) throw new BaseException("请登录");
//
dto.setDeptId(deptId.intValue());
//
}
if
(
dto
.
getUserId
()
==
null
)
{
Long
deptId
=
SecurityUtils
.
getLoginUser
().
getDeptId
();
if
(
deptId
==
null
)
throw
new
BaseException
(
"请登录"
);
dto
.
setDeptId
(
deptId
.
intValue
());
}
return
businessInfoMapper
.
selectBusinessInfoList
(
dto
);
}
...
...
@@ -105,7 +105,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
businessBrowseVo
.
setFollowRecordCount
(
total
.
getFollowRecordCount
());
businessBrowseVo
.
setRelateCompanyCount
(
total
.
getRelateCompanyCount
());
//资料文档统计
businessBrowseVo
.
set
RelateCompany
Count
(
FileUtils
.
getAllFileNames
(
RuoYiConfig
.
getProfile
()+
businessId
).
size
());
businessBrowseVo
.
set
File
Count
(
FileUtils
.
getAllFileNames
(
RuoYiConfig
.
getProfile
()+
businessId
).
size
());
return
businessBrowseVo
;
}
...
...
dsk-system/src/main/resources/mapper/business/BusinessFollowRecordMapper.xml
View file @
147b5941
...
...
@@ -75,29 +75,20 @@
<if
test=
"deptId != null"
>
and u.dept_id = #{deptId}
</if>
<if
test=
"projectName != null and projectName != ''"
>
and i.project_name = #{projectName}
</if>
<if
test=
"ownerCompany != null and ownerCompany != ''"
>
and i.construction_unit = #{ownerCompany}
</if>
<if
test=
"visitWay != null and visitWay != ''"
>
and f.visit_way = #{visitWay}
</if>
</where>
ORDER BY f.creat_time DESC
</select>
<select
id=
"selectRelateProject"
resultType=
"
java.lang.String
"
>
select i.
project_n
ame
<select
id=
"selectRelateProject"
resultType=
"
com.dsk.system.domain.vo.BusinessListVo
"
>
select i.
id,i.project_name as projectN
ame
from business_info i
left join business_
follow_record f on f
.business_id = i.id
where
f
.user_id = #{userId}
left join business_
user u on u
.business_id = i.id
where
u
.user_id = #{userId}
</select>
<select
id=
"selectRelateCompany"
resultType=
"java.lang.String"
>
select i.construction_unit
from business_info i
left join business_
follow_record f on f
.business_id = i.id
where
f
.user_id = #{userId}
left join business_
user u on u
.business_id = i.id
where
u
.user_id = #{userId}
</select>
<insert
id=
"insertBusinessFollowRecord"
parameterType=
"com.dsk.common.core.domain.entity.BusinessFollowRecord"
useGeneratedKeys=
"true"
...
...
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