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
32558625
Commit
32558625
authored
Jun 06, 2023
by
lixiaolei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
submit
parent
bc0a4b65
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
381 additions
and
49 deletions
+381
-49
BusinessFollowRecordController.java
...b/controller/business/BusinessFollowRecordController.java
+25
-22
BusinessInfoController.java
...m/dsk/web/controller/business/BusinessInfoController.java
+5
-2
application-dev.yml
dsk-admin/src/main/resources/application-dev.yml
+1
-1
BusinessInfo.java
.../java/com/dsk/common/core/domain/entity/BusinessInfo.java
+78
-0
FileUtils.java
...on/src/main/java/com/dsk/common/utils/file/FileUtils.java
+171
-2
BusinessBrowseVo.java
.../main/java/com/dsk/system/domain/vo/BusinessBrowseVo.java
+33
-4
BusinessFollowRecordMapper.java
...ava/com/dsk/system/mapper/BusinessFollowRecordMapper.java
+2
-1
BusinessUserMapper.java
...c/main/java/com/dsk/system/mapper/BusinessUserMapper.java
+7
-0
IBusinessFollowRecordService.java
.../com/dsk/system/service/IBusinessFollowRecordService.java
+2
-1
BusinessFollowRecordServiceImpl.java
.../system/service/impl/BusinessFollowRecordServiceImpl.java
+3
-1
BusinessInfoServiceImpl.java
.../com/dsk/system/service/impl/BusinessInfoServiceImpl.java
+13
-7
BusinessRelateCompanyServiceImpl.java
...system/service/impl/BusinessRelateCompanyServiceImpl.java
+2
-2
BusinessInfoMapper.xml
...src/main/resources/mapper/business/BusinessInfoMapper.xml
+31
-6
BusinessUserMapper.xml
...src/main/resources/mapper/business/BusinessUserMapper.xml
+8
-0
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/business/BusinessFollowRecordController.java
View file @
32558625
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
javax.servlet.http.HttpServletResponse
;
import
com.dsk.common.core.domain.entity.BusinessFollowRecord
;
import
com.dsk.system.domain.BusinessIdDto
;
import
com.dsk.system.service.IBusinessFollowRecordService
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -39,11 +40,12 @@ public class BusinessFollowRecordController extends BaseController
* 根据项目id查询项目跟进记录
*/
// @PreAuthorize("@ss.hasPermi('system:record:list')")
@GetMapping
(
"/list/{businessId}"
)
public
AjaxResult
list
(
@PathVariable
Integer
businessId
)
{
return
success
(
businessFollowRecordService
.
selectBusinessFollowRecordList
(
businessId
));
}
// @GetMapping("/list/{businessId}")
// public TableDataInfo list(@PathVariable("businessId") Integer businessId)
// {
// startPage();
// return getDataTable(businessFollowRecordService.selectBusinessFollowRecordList(businessId));
// }
/**
* 新增项目跟进记录
...
...
@@ -60,13 +62,24 @@ public class BusinessFollowRecordController extends BaseController
* 分页查询项目跟进记录
*/
// @PreAuthorize("@ss.hasPermi('system:record:list')")
// @GetMapping("/list")
// public TableDataInfo list(BusinessFollowRecord businessFollowRecord)
// {
// startPage();
// List<BusinessFollowRecord> list = businessFollowRecordService.selectBusinessFollowRecordList(businessFollowRecord);
// return getDataTable(list);
// }
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
@RequestBody
(
required
=
false
)
BusinessIdDto
businessId
)
{
startPage
();
List
<
BusinessFollowRecord
>
list
=
businessFollowRecordService
.
selectBusinessFollowRecordList
(
businessId
);
return
getDataTable
(
list
);
}
/**
* 删除项目跟进记录
*/
// @PreAuthorize("@ss.hasPermi('system:record:remove')")
// @Log(title = "项目跟进记录", businessType = BusinessType.DELETE)
@DeleteMapping
(
"remove/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
(
value
=
"ids"
,
required
=
false
)
Long
[]
ids
)
{
return
toAjax
(
businessFollowRecordService
.
deleteBusinessFollowRecordByIds
(
ids
));
}
// /**
// * 导出项目跟进记录列表
...
...
@@ -102,14 +115,4 @@ public class BusinessFollowRecordController extends BaseController
// return toAjax(businessFollowRecordService.updateBusinessFollowRecord(businessFollowRecord));
// }
// /**
// * 删除项目跟进记录
// */
// @PreAuthorize("@ss.hasPermi('system:record:remove')")
// @Log(title = "项目跟进记录", businessType = BusinessType.DELETE)
// @DeleteMapping("/{ids}")
// public AjaxResult remove(@PathVariable Long[] ids)
// {
// return toAjax(businessFollowRecordService.deleteBusinessFollowRecordByIds(ids));
// }
}
dsk-admin/src/main/java/com/dsk/web/controller/business/BusinessInfoController.java
View file @
32558625
...
...
@@ -4,6 +4,8 @@ import java.util.List;
import
com.dsk.common.core.domain.entity.BusinessInfo
;
import
com.dsk.common.dtos.BusinessInfoDto
;
import
com.dsk.common.exception.base.BaseException
;
import
com.dsk.common.utils.CheckUtils
;
import
com.dsk.system.domain.BusinessAddDto
;
import
com.dsk.system.domain.BusinessListDto
;
import
com.dsk.system.domain.vo.BusinessBrowseVo
;
...
...
@@ -69,9 +71,9 @@ public class BusinessInfoController extends BaseController
*/
// @PreAuthorize("@ss.hasPermi('system:business:query')")
@GetMapping
(
"/browse/{businessId}"
)
public
AjaxResult
browse
(
@PathVariable
Integer
i
d
)
public
AjaxResult
browse
(
@PathVariable
(
"businessId"
)
Integer
businessI
d
)
{
return
success
(
businessInfoService
.
browse
(
i
d
));
return
success
(
businessInfoService
.
browse
(
businessI
d
));
}
/**
...
...
@@ -114,6 +116,7 @@ public class BusinessInfoController extends BaseController
@PostMapping
(
"/edit"
)
public
AjaxResult
edit
(
@RequestBody
BusinessInfo
businessInfo
)
{
if
(!
CheckUtils
.
isPhone
(
businessInfo
.
getConstructionPhone
())
||
!
CheckUtils
.
isPhone
(
businessInfo
.
getSupervisorPhone
()))
throw
new
BaseException
(
"500"
,
"请输入正确的手机号码"
);
return
toAjax
(
businessInfoService
.
updateBusinessInfo
(
businessInfo
));
}
...
...
dsk-admin/src/main/resources/application-dev.yml
View file @
32558625
...
...
@@ -9,7 +9,7 @@ ruoyi:
# 实例演示开关
demoEnabled
:
true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
profile
:
D:/dsk-operate-sys/uploadPath
profile
:
D:/dsk-operate-sys/uploadPath
/
# 获取ip地址开关
addressEnabled
:
false
# 验证码类型 math 数组计算 char 字符验证
...
...
dsk-common/src/main/java/com/dsk/common/core/domain/entity/BusinessInfo.java
View file @
32558625
...
...
@@ -142,6 +142,78 @@ public class BusinessInfo extends BaseEntity
@Excel
(
name
=
"评标委员会"
)
private
String
evaluationBidCouncil
;
/** 建设单位 */
@Excel
(
name
=
"建设单位"
)
private
String
constructionUnit
;
/** 建设单位负责人 */
@Excel
(
name
=
"建设单位负责人"
)
private
String
constructionPrincipal
;
/** 建设单位联系电话 */
@Excel
(
name
=
"建设单位联系电话"
)
private
String
constructionPhone
;
/** 主管单位 */
@Excel
(
name
=
"主管单位"
)
private
String
supervisorUnit
;
/** 主管单位负责人 */
@Excel
(
name
=
"主管单位负责人"
)
private
String
supervisorPrincipal
;
/** 主管单位联系电话 */
@Excel
(
name
=
"主管单位联系电话"
)
private
String
supervisorPhone
;
public
String
getConstructionUnit
()
{
return
constructionUnit
;
}
public
void
setConstructionUnit
(
String
constructionUnit
)
{
this
.
constructionUnit
=
constructionUnit
;
}
public
String
getConstructionPrincipal
()
{
return
constructionPrincipal
;
}
public
void
setConstructionPrincipal
(
String
constructionPrincipal
)
{
this
.
constructionPrincipal
=
constructionPrincipal
;
}
public
String
getConstructionPhone
()
{
return
constructionPhone
;
}
public
void
setConstructionPhone
(
String
constructionPhone
)
{
this
.
constructionPhone
=
constructionPhone
;
}
public
String
getSupervisorUnit
()
{
return
supervisorUnit
;
}
public
void
setSupervisorUnit
(
String
supervisorUnit
)
{
this
.
supervisorUnit
=
supervisorUnit
;
}
public
String
getSupervisorPrincipal
()
{
return
supervisorPrincipal
;
}
public
void
setSupervisorPrincipal
(
String
supervisorPrincipal
)
{
this
.
supervisorPrincipal
=
supervisorPrincipal
;
}
public
String
getSupervisorPhone
()
{
return
supervisorPhone
;
}
public
void
setSupervisorPhone
(
String
supervisorPhone
)
{
this
.
supervisorPhone
=
supervisorPhone
;
}
public
String
getEvaluationBidWay
()
{
return
evaluationBidWay
;
}
...
...
@@ -437,6 +509,12 @@ public class BusinessInfo extends BaseEntity
.
append
(
"earnestMoneyPay"
,
getEarnestMoneyPay
())
.
append
(
"earnestMoney"
,
getEarnestMoney
())
.
append
(
"evaluationBidCouncil"
,
getEvaluationBidCouncil
())
.
append
(
"constructionUnit"
,
getConstructionUnit
())
.
append
(
"constructionPrincipal"
,
getConstructionPrincipal
())
.
append
(
"constructionPhone"
,
getConstructionPhone
())
.
append
(
"supervisorUnit"
,
getSupervisorUnit
())
.
append
(
"supervisorPrincipal"
,
getSupervisorPrincipal
())
.
append
(
"supervisorPhone"
,
getSupervisorPhone
())
.
toString
();
}
}
dsk-common/src/main/java/com/dsk/common/utils/file/FileUtils.java
View file @
32558625
...
...
@@ -9,11 +9,14 @@ import java.io.OutputStream;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.nio.charset.StandardCharsets
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.dsk.common.utils.DateUtils
;
import
com.dsk.common.utils.StringUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
com.dsk.common.config.RuoYiConfig
;
...
...
@@ -25,10 +28,51 @@ import org.apache.commons.io.FilenameUtils;
*
* @author dsk
*/
@Slf4j
public
class
FileUtils
{
public
static
String
FILENAME_PATTERN
=
"[a-zA-Z0-9_\\-\\|\\.\\u4e00-\\u9fa5]+"
;
/**
* 检查目录是否存在,如果不存在,则创建目录,如果创建失败则返回false
*
* @param path 文件夹路径
* @return boolean
*/
public
static
boolean
newFolder
(
String
path
)
{
File
file
=
new
File
(
path
);
if
(!
file
.
exists
())
{
boolean
isSuccess
=
file
.
mkdir
();
if
(!
isSuccess
)
file
.
mkdirs
();
return
!
isSuccess
;
}
else
{
return
true
;
}
}
/**
*
*
* @param folderPath 文件夹路径
* @return 文件夹路径
*/
public
static
String
newFolder1
(
String
folderPath
)
{
String
filePath
=
folderPath
;
try
{
File
myFilePath
=
new
File
(
filePath
);
if
(!
myFilePath
.
exists
())
{
myFilePath
.
mkdirs
();
}
}
catch
(
Exception
e
)
{
log
.
error
(
"创建文件夹失败"
);
filePath
=
""
;
e
.
printStackTrace
();
}
return
filePath
;
}
/**
* 输出指定文件的byte数组
*
...
...
@@ -104,12 +148,12 @@ public class FileUtils
return
FileUploadUtils
.
getPathFileName
(
uploadDir
,
pathName
);
}
/**
/* */
/**
* 删除文件
*
* @param filePath 文件
* @return
*/
*/
/*
public static boolean deleteFile(String filePath)
{
boolean flag = false;
...
...
@@ -120,7 +164,132 @@ public class FileUtils
flag = file.delete();
}
return flag;
}*/
/**
* 删除整个文件夹或者文某个文件
*
* @param filePath 文件
* @return
*/
public
static
boolean
deleteFile
(
String
filePath
)
{
try
{
if
(
StringUtils
.
isNotEmpty
(
delAllFile
(
filePath
)))
return
false
;
File
file
=
new
File
(
filePath
);
return
file
.
delete
();
}
catch
(
Exception
e
)
{
log
.
info
(
"删除文件失败"
);
e
.
printStackTrace
();
return
false
;
}
}
/**
* 文件夹过滤
*
* @param path 文件夹路径
*/
public
static
String
delAllFile
(
String
path
)
{
String
hint
=
"这是一个根目录,请更换目录!"
;
File
file
=
new
File
(
path
);
if
(!
file
.
exists
())
{
return
hint
;
}
// if (!file.isDirectory()) {
// return false;
// }
if
(
file
.
getAbsolutePath
().
equalsIgnoreCase
(
"/"
))
{
return
hint
;
}
if
(
file
.
getAbsolutePath
().
equalsIgnoreCase
(
"/root"
))
{
return
hint
;
}
if
(
file
.
getAbsolutePath
().
equalsIgnoreCase
(
"/usr"
)
||
file
.
getAbsolutePath
().
equalsIgnoreCase
(
"/opt"
)
||
file
.
getAbsolutePath
().
equalsIgnoreCase
(
"/bin"
)
||
file
.
getAbsolutePath
().
equalsIgnoreCase
(
"/sbin"
)
||
file
.
getAbsolutePath
().
equalsIgnoreCase
(
"/etc"
)
||
file
.
getAbsolutePath
().
equalsIgnoreCase
(
"/selinux"
)
||
file
.
getAbsolutePath
().
equalsIgnoreCase
(
"/sys"
)
||
file
.
getAbsolutePath
().
equalsIgnoreCase
(
"/var"
)
||
file
.
getAbsolutePath
().
equalsIgnoreCase
(
"/home"
)
||
file
.
getAbsolutePath
().
equalsIgnoreCase
(
"/net"
))
{
return
hint
;
}
if
(
file
.
getAbsolutePath
().
equalsIgnoreCase
(
"C://"
)
||
file
.
getAbsolutePath
().
equalsIgnoreCase
(
"C:\\\\"
))
{
return
hint
;
}
return
""
;
}
/**
* 获取文件夹中所有文件
* @param filePath 全路径
* @return
*/
public
static
List
<
String
>
getAllFiles
(
String
filePath
)
{
List
<
String
>
fileList
=
new
ArrayList
<
String
>();
File
file
=
new
File
(
filePath
);
if
(!
file
.
exists
())
{
return
fileList
;
}
if
(!
file
.
isDirectory
())
{
return
fileList
;
}
// 获取当前目录下的文件和文件夹
File
[]
files
=
file
.
listFiles
();
if
(
files
!=
null
)
{
for
(
File
directory
:
files
)
{
// 如果是文件夹则递归调用此方法
if
(
directory
.
isDirectory
())
{
fileList
.
add
(
directory
.
getPath
());
getAllFiles
(
directory
.
getPath
());
}
else
{
// 如果是文件则直接输出路径
fileList
.
add
(
directory
.
getPath
());
}
}
return
fileList
;
}
return
fileList
;
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
getAllFileNames
(
"D:/dsk-operate-sys/uploadPath/10"
).
size
());
}
/**
* 获取文件夹中的所有文件,不包括文件夹
*
* @param path 文件夹路径
* @return List<File>
*/
public
static
List
<
File
>
getAllFileNames
(
String
path
)
{
List
<
File
>
fileList
=
new
ArrayList
<
File
>();
File
file
=
new
File
(
path
);
if
(!
file
.
exists
())
{
return
fileList
;
}
if
(!
file
.
isDirectory
())
{
return
fileList
;
}
String
[]
tempList
=
file
.
list
();
File
tempFile
;
for
(
String
fileName
:
tempList
)
{
if
(
path
.
endsWith
(
File
.
separator
))
{
tempFile
=
new
File
(
path
+
fileName
);
}
else
{
tempFile
=
new
File
(
path
+
File
.
separator
+
fileName
);
}
if
(
tempFile
.
isFile
())
{
fileList
.
add
(
tempFile
);
}
if
(
tempFile
.
isDirectory
())
{
List
<
File
>
allFiles
=
getAllFileNames
(
tempFile
.
getAbsolutePath
());
fileList
.
addAll
(
allFiles
);
}
}
return
fileList
;
}
/**
* 文件名称验证
...
...
dsk-system/src/main/java/com/dsk/system/domain/vo/BusinessBrowseVo.java
View file @
32558625
package
com
.
dsk
.
system
.
domain
.
vo
;
import
com.dsk.common.annotation.Excel
;
import
com.dsk.common.core.domain.entity.BusinessRelateCompany
;
import
lombok.Data
;
...
...
@@ -53,6 +54,21 @@ public class BusinessBrowseVo {
*/
private
String
districtName
;
/**
* 省id
*/
private
Integer
provinceId
;
/**
* 市id
*/
private
Integer
cityId
;
/**
* 区id
*/
private
Integer
districtId
;
/**
* 商务团队
*/
...
...
@@ -73,10 +89,23 @@ public class BusinessBrowseVo {
*/
private
List
<
String
>
labelList
;
/**
* 关键企业
*/
private
List
<
BusinessRelateCompany
>
relateCompany
;
/** 建设单位 */
private
String
constructionUnit
;
/** 建设单位负责人 */
private
String
constructionPrincipal
;
/** 建设单位联系电话 */
private
String
constructionPhone
;
/** 主管单位 */
private
String
supervisorUnit
;
/** 主管单位负责人 */
private
String
supervisorPrincipal
;
/** 主管单位联系电话 */
private
String
supervisorPhone
;
/**
* 联系人统计
...
...
dsk-system/src/main/java/com/dsk/system/mapper/BusinessFollowRecordMapper.java
View file @
32558625
package
com
.
dsk
.
system
.
mapper
;
import
com.dsk.common.core.domain.entity.BusinessFollowRecord
;
import
com.dsk.system.domain.BusinessIdDto
;
import
java.util.List
;
...
...
@@ -34,7 +35,7 @@ public interface BusinessFollowRecordMapper
* @param businessId 项目id
* @return 项目跟进记录集合
*/
public
List
<
BusinessFollowRecord
>
selectBusinessFollowRecordList
(
Integer
businessId
);
public
List
<
BusinessFollowRecord
>
selectBusinessFollowRecordList
(
BusinessIdDto
businessId
);
/**
* 新增项目跟进记录
...
...
dsk-system/src/main/java/com/dsk/system/mapper/BusinessUserMapper.java
View file @
32558625
...
...
@@ -58,4 +58,11 @@ public interface BusinessUserMapper
* @return 结果
*/
public
int
deleteBusinessUserByIds
(
Long
[]
ids
);
/**
* 根据项目id查询项目的创建人
* @param businessId
* @return
*/
String
selectCreatorByBusinessId
(
Integer
businessId
);
}
dsk-system/src/main/java/com/dsk/system/service/IBusinessFollowRecordService.java
View file @
32558625
package
com
.
dsk
.
system
.
service
;
import
com.dsk.common.core.domain.entity.BusinessFollowRecord
;
import
com.dsk.system.domain.BusinessIdDto
;
import
java.util.List
;
...
...
@@ -26,7 +27,7 @@ public interface IBusinessFollowRecordService
* @param businessId 项目跟进记录
* @return 项目跟进记录集合
*/
public
List
<
BusinessFollowRecord
>
selectBusinessFollowRecordList
(
Integer
businessId
);
public
List
<
BusinessFollowRecord
>
selectBusinessFollowRecordList
(
BusinessIdDto
businessId
);
/**
* 分页查询项目跟进记录列表
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessFollowRecordServiceImpl.java
View file @
32558625
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
com.dsk.common.core.domain.entity.BusinessFollowRecord
;
import
com.dsk.common.utils.DateUtils
;
import
com.dsk.system.domain.BusinessIdDto
;
import
com.dsk.system.mapper.BusinessFollowRecordMapper
;
import
com.dsk.system.service.IBusinessFollowRecordService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -35,7 +36,7 @@ public class BusinessFollowRecordServiceImpl implements IBusinessFollowRecordSer
}
@Override
public
List
<
BusinessFollowRecord
>
selectBusinessFollowRecordList
(
Integer
businessId
)
public
List
<
BusinessFollowRecord
>
selectBusinessFollowRecordList
(
BusinessIdDto
businessId
)
{
return
businessFollowRecordMapper
.
selectBusinessFollowRecordList
(
businessId
);
}
...
...
@@ -78,6 +79,7 @@ public class BusinessFollowRecordServiceImpl implements IBusinessFollowRecordSer
* @return 结果
*/
@Override
@Transactional
public
int
deleteBusinessFollowRecordByIds
(
Long
[]
ids
)
{
return
businessFollowRecordMapper
.
deleteBusinessFollowRecordByIds
(
ids
);
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessInfoServiceImpl.java
View file @
32558625
...
...
@@ -8,6 +8,7 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.dsk.common.config.RuoYiConfig
;
import
com.dsk.common.constant.HttpStatus
;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.core.domain.entity.BusinessInfo
;
...
...
@@ -15,8 +16,10 @@ import com.dsk.common.core.domain.entity.BusinessLabel;
import
com.dsk.common.core.domain.entity.BusinessRelateCompany
;
import
com.dsk.common.core.domain.entity.BusinessUser
;
import
com.dsk.common.exception.base.BaseException
;
import
com.dsk.common.utils.CheckUtils
;
import
com.dsk.common.utils.DateUtils
;
import
com.dsk.common.utils.SecurityUtils
;
import
com.dsk.common.utils.file.FileUtils
;
import
com.dsk.system.domain.BusinessExcelDto
;
import
com.dsk.system.domain.BusinessAddDto
;
import
com.dsk.system.domain.BusinessListDto
;
...
...
@@ -82,11 +85,11 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
*/
@Override
public
List
<
BusinessListVo
>
selectBusinessInfoList
(
BusinessListDto
dto
)
{
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
);
}
...
...
@@ -96,15 +99,18 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
//查询项目基本信息
BusinessInfo
businessInfo
=
businessInfoMapper
.
selectBusinessInfoById
(
businessId
);
BeanUtil
.
copyProperties
(
businessInfo
,
businessBrowseVo
);
//商务团队
businessBrowseVo
.
setTeam
(
businessUserMapper
.
selectCreatorByBusinessId
(
businessId
));
//查询项目标签
businessBrowseVo
.
setLabelList
(
businessLabelMapper
.
selectBusinessLabelList
(
new
BusinessLabel
(
businessId
)).
stream
().
map
(
p
->
p
.
getLabel
()).
collect
(
Collectors
.
toList
()));
//查询关键企业
businessBrowseVo
.
setRelateCompany
(
businessRelateCompanyMapper
.
selectBusinessRelateCompanyList
(
new
BusinessRelateCompany
(
businessId
)));
//相关数据统计
BusinessBrowseVo
total
=
businessInfoMapper
.
selectTotal
(
businessId
);
businessBrowseVo
.
setBacklogCount
(
total
.
getBacklogCount
());
businessBrowseVo
.
setContactsCount
(
total
.
getContactsCount
());
businessBrowseVo
.
setFollowRecordCount
(
total
.
getFollowRecordCount
());
businessBrowseVo
.
setRelateCompanyCount
(
total
.
getRelateCompanyCount
());
//资料文档统计
businessBrowseVo
.
setRelateCompanyCount
(
FileUtils
.
getAllFileNames
(
RuoYiConfig
.
getProfile
()+
businessId
).
size
());
return
businessBrowseVo
;
}
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessRelateCompanyServiceImpl.java
View file @
32558625
...
...
@@ -63,7 +63,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
@Transactional
public
int
insertBusinessRelateCompany
(
BusinessRelateCompany
businessRelateCompany
)
{
if
(!
CheckUtils
.
isPhone
(
businessRelateCompany
.
getPhone
()))
throw
new
BaseException
(
"500"
,
"请输入正确的手机号码"
);
//
if(!CheckUtils.isPhone(businessRelateCompany.getPhone())) throw new BaseException("500","请输入正确的手机号码");
businessRelateCompany
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
businessRelateCompanyMapper
.
insertBusinessRelateCompany
(
businessRelateCompany
);
}
...
...
@@ -78,7 +78,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
@Transactional
public
int
updateBusinessRelateCompany
(
BusinessRelateCompany
businessRelateCompany
)
{
if
(!
CheckUtils
.
isPhone
(
businessRelateCompany
.
getPhone
()))
throw
new
BaseException
(
"500"
,
"请输入正确的手机号码"
);
//
if(!CheckUtils.isPhone(businessRelateCompany.getPhone())) throw new BaseException("500","请输入正确的手机号码");
businessRelateCompany
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
businessRelateCompanyMapper
.
updateBusinessRelateCompany
(
businessRelateCompany
);
}
...
...
dsk-system/src/main/resources/mapper/business/BusinessInfoMapper.xml
View file @
32558625
...
...
@@ -24,7 +24,6 @@
<result
property=
"districtId"
column=
"district_id"
/>
<result
property=
"projectType"
column=
"project_type"
/>
<result
property=
"projectCategory"
column=
"project_category"
/>
<result
property=
"team"
column=
"team"
/>
<result
property=
"isPrivate"
column=
"is_private"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
...
...
@@ -35,6 +34,12 @@
<result
property=
"earnestMoneyPay"
column=
"earnest_money_pay"
/>
<result
property=
"earnestMoney"
column=
"earnest_money"
/>
<result
property=
"evaluationBidCouncil"
column=
"evaluation_bid_council"
/>
<result
property=
"constructionUnit"
column=
"construction_unit"
/>
<result
property=
"constructionPrincipal"
column=
"construction_principal"
/>
<result
property=
"constructionPhone"
column=
"construction_phone"
/>
<result
property=
"supervisorUnit"
column=
"supervisor_unit"
/>
<result
property=
"supervisorPrincipal"
column=
"supervisor_principal"
/>
<result
property=
"supervisorPhone"
column=
"supervisor_phone"
/>
</resultMap>
<sql
id=
"selectBusinessInfoVo"
>
...
...
@@ -57,7 +62,6 @@
district_id,
project_type,
project_category,
team,
is_private,
create_time,
update_time,
...
...
@@ -68,7 +72,13 @@
bid_open_place,
earnest_money_pay,
earnest_money,
evaluation_bid_council
evaluation_bid_council,
construction_unit,
construction_principal,
construction_phone,
supervisor_unit,
supervisor_principal,
supervisor_phone
from business_info
</sql>
...
...
@@ -246,7 +256,6 @@
<if
test=
"districtId != null"
>
district_id,
</if>
<if
test=
"projectType != null"
>
project_type,
</if>
<if
test=
"projectCategory != null"
>
project_category,
</if>
<if
test=
"team != null"
>
team,
</if>
<if
test=
"isPrivate != null"
>
is_private,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
...
...
@@ -257,6 +266,12 @@
<if
test=
"earnestMoneyPay != null"
>
earnest_money_pay,
</if>
<if
test=
"earnestMoney != null"
>
earnest_money,
</if>
<if
test=
"evaluationBidCouncil != null"
>
evaluation_bid_council,
</if>
<if
test=
"constructionUnit != null"
>
construction_unit,
</if>
<if
test=
"constructionPrincipal != null"
>
construction_principal,
</if>
<if
test=
"constructionPhone != null"
>
construction_phone,
</if>
<if
test=
"supervisorUnit != null"
>
supervisor_unit,
</if>
<if
test=
"supervisorPrincipal != null"
>
supervisor_principal,
</if>
<if
test=
"supervisorPhone != null"
>
supervisor_phone,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"projectName != null"
>
#{projectName},
</if>
...
...
@@ -277,7 +292,6 @@
<if
test=
"districtId != null"
>
#{districtId},
</if>
<if
test=
"projectType != null"
>
#{projectType},
</if>
<if
test=
"projectCategory != null"
>
#{projectCategory},
</if>
<if
test=
"team != null"
>
#{team},
</if>
<if
test=
"isPrivate != null"
>
#{isPrivate},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
...
...
@@ -289,6 +303,12 @@
<if
test=
"earnestMoneyPay != null"
>
#{earnestMoneyPay},
</if>
<if
test=
"earnestMoney != null"
>
#{earnestMoney},
</if>
<if
test=
"evaluationBidCouncil != null"
>
#{evaluationBidCouncil},
</if>
<if
test=
"constructionUnit != null"
>
#{constructionUnit},
</if>
<if
test=
"constructionPrincipal != null"
>
#{constructionPrincipal},
</if>
<if
test=
"constructionPhone != null"
>
#{constructionPhone},
</if>
<if
test=
"supervisorUnit != null"
>
#{supervisorUnit},
</if>
<if
test=
"supervisorPrincipal != null"
>
#{supervisorPrincipal},
</if>
<if
test=
"supervisorPhone != null"
>
#{supervisorPhone},
</if>
</trim>
</insert>
...
...
@@ -313,7 +333,6 @@
<if
test=
"districtId != null"
>
district_id = #{districtId},
</if>
<if
test=
"projectType != null"
>
project_type = #{projectType},
</if>
<if
test=
"projectCategory != null"
>
project_category = #{projectCategory},
</if>
<if
test=
"team != null"
>
team = #{team},
</if>
<if
test=
"isPrivate != null"
>
is_private = #{isPrivate},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
...
...
@@ -325,6 +344,12 @@
<if
test=
"earnestMoneyPay != null"
>
earnest_money_pay = #{earnestMoneyPay},
</if>
<if
test=
"earnestMoney != null"
>
earnest_money = #{earnestMoney},
</if>
<if
test=
"evaluationBidCouncil != null"
>
evaluation_bid_council = #{evaluationBidCouncil},
</if>
<if
test=
"constructionUnit != null"
>
construction_unit = #{constructionUnit},
</if>
<if
test=
"constructionPrincipal != null"
>
construction_principal = #{constructionPrincipal},
</if>
<if
test=
"constructionPhone != null"
>
construction_phone = #{constructionPhone},
</if>
<if
test=
"supervisorUnit != null"
>
supervisor_unit = #{supervisorUnit},
</if>
<if
test=
"supervisorPrincipal != null"
>
supervisor_principal = #{supervisorPrincipal},
</if>
<if
test=
"supervisorPhone != null"
>
evaluation_bid_council = #{supervisorPhone},
</if>
</trim>
where id = #{id}
</update>
...
...
dsk-system/src/main/resources/mapper/business/BusinessUserMapper.xml
View file @
32558625
...
...
@@ -33,6 +33,14 @@
<include
refid=
"selectBusinessUserVo"
/>
where id = #{id}
</select>
<select
id=
"selectCreatorByBusinessId"
resultType=
"java.lang.String"
>
select u.nick_name
from business_user bu
left join business_info i on i.id = bu.business_id
left join sys_user u on u.user_id = bu.user_id
where bu.is_founder = 1
and i.id = #{BusinessId}
</select>
<insert
id=
"insertBusinessUser"
parameterType=
"com.dsk.common.core.domain.entity.BusinessUser"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into business_user
...
...
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