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
7f448876
Commit
7f448876
authored
Jun 27, 2023
by
lixiaolei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
submit
parent
4ded92a0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
15 deletions
+38
-15
BusinessFileController.java
...m/dsk/web/controller/business/BusinessFileController.java
+6
-4
BusinessIdDto.java
...em/src/main/java/com/dsk/system/domain/BusinessIdDto.java
+5
-0
BusinessBrowseVo.java
.../main/java/com/dsk/system/domain/vo/BusinessBrowseVo.java
+1
-3
BusinessLabelVo.java
...c/main/java/com/dsk/system/domain/vo/BusinessLabelVo.java
+18
-0
BusinessInfoServiceImpl.java
.../com/dsk/system/service/impl/BusinessInfoServiceImpl.java
+7
-7
BusinessLabelMapper.xml
...rc/main/resources/mapper/business/BusinessLabelMapper.xml
+1
-1
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/business/BusinessFileController.java
View file @
7f448876
...
...
@@ -88,10 +88,12 @@ public class BusinessFileController extends BaseController {
//校验是否上传同名文件
File
newFile
=
new
File
(
filePath
);
// 获取当前目录下的文件和文件夹
File
[]
files
=
newFile
.
listFiles
();
for
(
File
allFile
:
files
)
{
if
(
filename
.
equals
(
allFile
.
getName
()))
return
error
(
"文件已存在"
);
if
(
newFile
.
exists
())
{
// 获取当前目录下的文件和文件夹
File
[]
files
=
newFile
.
listFiles
();
for
(
File
allFile
:
files
)
{
if
(
filename
.
equals
(
allFile
.
getName
()))
return
error
(
"文件已存在"
);
}
}
// 上传并返回文件全路径
...
...
dsk-system/src/main/java/com/dsk/system/domain/BusinessIdDto.java
View file @
7f448876
...
...
@@ -15,6 +15,11 @@ public class BusinessIdDto {
*/
private
Integer
businessId
;
/**
* 项目标签id
*/
private
Integer
labelId
;
/**
* 项目标签名称
*/
...
...
dsk-system/src/main/java/com/dsk/system/domain/vo/BusinessBrowseVo.java
View file @
7f448876
...
...
@@ -2,8 +2,6 @@ package com.dsk.system.domain.vo;
import
lombok.Data
;
import
java.util.List
;
/**
* @author lxl
* @Description:
...
...
@@ -90,7 +88,7 @@ public class BusinessBrowseVo {
/**
* 项目标签
*/
private
List
<
String
>
labelList
;
private
String
labelList
;
/** 建设单位 */
private
String
constructionUnit
;
...
...
dsk-system/src/main/java/com/dsk/system/domain/vo/BusinessLabelVo.java
0 → 100644
View file @
7f448876
package
com
.
dsk
.
system
.
domain
.
vo
;
import
lombok.Data
;
/**
* @author lxl
* @Description:
* @Date 2023/6/27 下午 2:51
**/
@Data
public
class
BusinessLabelVo
{
//主键
private
Integer
id
;
//标签
private
String
label
;
}
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessInfoServiceImpl.java
View file @
7f448876
...
...
@@ -3,6 +3,7 @@ package com.dsk.system.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.dsk.common.config.RuoYiConfig
;
import
com.dsk.common.constant.HttpStatus
;
import
com.dsk.common.core.domain.AjaxResult
;
...
...
@@ -21,10 +22,10 @@ import com.dsk.system.domain.BusinessListDto;
import
com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto
;
import
com.dsk.system.domain.customer.vo.CustomerBusinessListVo
;
import
com.dsk.system.domain.vo.BusinessBrowseVo
;
import
com.dsk.system.domain.vo.BusinessLabelVo
;
import
com.dsk.system.domain.vo.BusinessListVo
;
import
com.dsk.system.mapper.BusinessInfoMapper
;
import
com.dsk.system.mapper.BusinessLabelMapper
;
import
com.dsk.system.mapper.BusinessRelateCompanyMapper
;
import
com.dsk.system.mapper.BusinessUserMapper
;
import
com.dsk.system.service.IBusinessInfoService
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -36,7 +37,6 @@ import javax.annotation.Resource;
import
java.util.ArrayList
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* 项目详情Service业务层处理
...
...
@@ -52,8 +52,6 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
@Resource
private
BusinessUserMapper
businessUserMapper
;
@Resource
private
BusinessRelateCompanyMapper
businessRelateCompanyMapper
;
@Resource
private
BusinessLabelMapper
businessLabelMapper
;
@Resource
private
ReadBusinessInfoExcel
readBusinessInfoExcel
;
...
...
@@ -108,12 +106,14 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
//商务团队
businessBrowseVo
.
setTeam
(
businessUserMapper
.
selectCreatorByBusinessId
(
businessId
));
//查询是否是项目创建人
Long
userId
=
SecurityUtils
.
getLoginUser
().
getUserId
();
if
(
userId
==
null
)
throw
new
BaseException
(
"请登录"
);
// Long userId = SecurityUtils.getLoginUser().getUserId();
// if (userId == null) throw new BaseException("请登录");
Long
userId
=
103
l
;
Integer
founder
=
businessUserMapper
.
selectFounder
(
businessId
,
userId
);
businessBrowseVo
.
setIsFounder
(
founder
==
null
?
0
:
founder
);
//查询项目标签
businessBrowseVo
.
setLabelList
(
businessLabelMapper
.
selectBusinessLabelList
(
new
BusinessLabel
(
businessId
)).
stream
().
map
(
p
->
p
.
getLabel
()).
collect
(
Collectors
.
toList
()));
List
<
BusinessLabel
>
labels
=
businessLabelMapper
.
selectBusinessLabelList
(
new
BusinessLabel
(
businessId
));
businessBrowseVo
.
setLabelList
(
JSONObject
.
toJSONString
(
BeanUtil
.
copyToList
(
labels
,
BusinessLabelVo
.
class
)));
//相关数据统计
BusinessBrowseVo
total
=
businessInfoMapper
.
selectTotal
(
businessId
);
businessBrowseVo
.
setBacklogCount
(
total
.
getBacklogCount
());
...
...
dsk-system/src/main/resources/mapper/business/BusinessLabelMapper.xml
View file @
7f448876
...
...
@@ -62,7 +62,7 @@
<delete
id=
"deleteBusinessLabelById"
>
delete
from business_label
where
business_id = #{businessId} and label = #{label
}
where
id = #{labelId
}
</delete>
<delete
id=
"deleteBusinessLabelByIds"
parameterType=
"String"
>
...
...
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