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
0828d84e
Commit
0828d84e
authored
May 25, 2023
by
lcl
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://192.168.60.201/root/dsk-operate-sys
parents
254fdb95
cb6a159c
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
97 additions
and
63 deletions
+97
-63
BusinessInfoController.java
...m/dsk/web/controller/business/BusinessInfoController.java
+5
-5
BusinessInfo.java
.../java/com/dsk/common/core/domain/entity/BusinessInfo.java
+0
-13
BusinessBrowseVo.java
.../main/java/com/dsk/system/domain/vo/BusinessBrowseVo.java
+5
-0
BusinessBacklogMapper.java
...ain/java/com/dsk/system/mapper/BusinessBacklogMapper.java
+3
-3
BusinessContactsMapper.java
...in/java/com/dsk/system/mapper/BusinessContactsMapper.java
+2
-2
BusinessFollowRecordMapper.java
...ava/com/dsk/system/mapper/BusinessFollowRecordMapper.java
+3
-3
BusinessInfoMapper.java
...c/main/java/com/dsk/system/mapper/BusinessInfoMapper.java
+1
-1
BusinessLabelMapper.java
.../main/java/com/dsk/system/mapper/BusinessLabelMapper.java
+8
-0
BusinessRelateCompanyMapper.java
...va/com/dsk/system/mapper/BusinessRelateCompanyMapper.java
+1
-2
BusinessUserMapper.java
...c/main/java/com/dsk/system/mapper/BusinessUserMapper.java
+11
-3
BusinessBacklogServiceImpl.java
...m/dsk/system/service/impl/BusinessBacklogServiceImpl.java
+1
-1
BusinessContactsServiceImpl.java
.../dsk/system/service/impl/BusinessContactsServiceImpl.java
+1
-1
BusinessFollowRecordServiceImpl.java
.../system/service/impl/BusinessFollowRecordServiceImpl.java
+1
-1
BusinessInfoServiceImpl.java
.../com/dsk/system/service/impl/BusinessInfoServiceImpl.java
+32
-10
BusinessRelateCompanyServiceImpl.java
...system/service/impl/BusinessRelateCompanyServiceImpl.java
+1
-2
BusinessUserServiceImpl.java
.../com/dsk/system/service/impl/BusinessUserServiceImpl.java
+1
-1
BusinessBacklogMapper.xml
.../main/resources/mapper/business/BusinessBacklogMapper.xml
+2
-2
BusinessContactsMapper.xml
...main/resources/mapper/business/BusinessContactsMapper.xml
+2
-2
BusinessFollowRecordMapper.xml
.../resources/mapper/business/BusinessFollowRecordMapper.xml
+2
-2
BusinessInfoMapper.xml
...src/main/resources/mapper/business/BusinessInfoMapper.xml
+0
-5
BusinessLabelMapper.xml
...rc/main/resources/mapper/business/BusinessLabelMapper.xml
+5
-0
BusinessRelateCompanyMapper.xml
...resources/mapper/business/BusinessRelateCompanyMapper.xml
+2
-2
BusinessUserMapper.xml
...src/main/resources/mapper/business/BusinessUserMapper.xml
+8
-2
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/business/BusinessInfoController.java
View file @
0828d84e
...
@@ -58,9 +58,9 @@ public class BusinessInfoController extends BaseController
...
@@ -58,9 +58,9 @@ public class BusinessInfoController extends BaseController
*/
*/
// @PreAuthorize("@ss.hasPermi('system:info:list')")
// @PreAuthorize("@ss.hasPermi('system:info:list')")
@GetMapping
(
"/browse/{businessId}"
)
@GetMapping
(
"/browse/{businessId}"
)
public
AjaxResult
browse
(
@PathVariable
Integer
i
d
)
public
AjaxResult
browse
(
@PathVariable
Integer
businessI
d
)
{
{
return
success
(
businessInfoService
.
browse
(
i
d
));
return
success
(
businessInfoService
.
browse
(
businessI
d
));
}
}
/**
/**
...
@@ -74,14 +74,14 @@ public class BusinessInfoController extends BaseController
...
@@ -74,14 +74,14 @@ public class BusinessInfoController extends BaseController
}
}
/**
/**
* 删除项目
列表
* 删除项目
*/
*/
// @PreAuthorize("@ss.hasPermi('system:info:remove')")
// @PreAuthorize("@ss.hasPermi('system:info:remove')")
// @Log(title = "项目详情", businessType = BusinessType.DELETE)
// @Log(title = "项目详情", businessType = BusinessType.DELETE)
@DeleteMapping
(
"/remove/{ids}"
)
@DeleteMapping
(
"/remove/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
(
value
=
"ids"
,
required
=
false
)
Long
[]
ids
)
public
AjaxResult
remove
(
@PathVariable
(
value
=
"ids"
,
required
=
false
)
Long
id
)
{
{
return
toAjax
(
businessInfoService
.
deleteBusinessInfoById
s
(
ids
));
return
toAjax
(
businessInfoService
.
deleteBusinessInfoById
(
id
));
}
}
/**
/**
...
...
dsk-common/src/main/java/com/dsk/common/core/domain/entity/BusinessInfo.java
View file @
0828d84e
...
@@ -102,10 +102,6 @@ public class BusinessInfo extends BaseEntity
...
@@ -102,10 +102,6 @@ public class BusinessInfo extends BaseEntity
@Excel
(
name
=
"项目类别"
)
@Excel
(
name
=
"项目类别"
)
private
String
projectCategory
;
private
String
projectCategory
;
/** 商务团队 */
@Excel
(
name
=
"商务团队"
)
private
String
team
;
/** 0 仅自己可见,1 他人可见 */
/** 0 仅自己可见,1 他人可见 */
@Excel
(
name
=
"0 仅自己可见,1 他人可见"
)
@Excel
(
name
=
"0 仅自己可见,1 他人可见"
)
private
Integer
isPrivate
;
private
Integer
isPrivate
;
...
@@ -313,15 +309,7 @@ public class BusinessInfo extends BaseEntity
...
@@ -313,15 +309,7 @@ public class BusinessInfo extends BaseEntity
{
{
return
projectCategory
;
return
projectCategory
;
}
}
public
void
setTeam
(
String
team
)
{
this
.
team
=
team
;
}
public
String
getTeam
()
{
return
team
;
}
public
void
setIsPrivate
(
Integer
isPrivate
)
public
void
setIsPrivate
(
Integer
isPrivate
)
{
{
this
.
isPrivate
=
isPrivate
;
this
.
isPrivate
=
isPrivate
;
...
@@ -354,7 +342,6 @@ public class BusinessInfo extends BaseEntity
...
@@ -354,7 +342,6 @@ public class BusinessInfo extends BaseEntity
.
append
(
"districtId"
,
getDistrictId
())
.
append
(
"districtId"
,
getDistrictId
())
.
append
(
"projectType"
,
getProjectType
())
.
append
(
"projectType"
,
getProjectType
())
.
append
(
"projectCategory"
,
getProjectCategory
())
.
append
(
"projectCategory"
,
getProjectCategory
())
.
append
(
"team"
,
getTeam
())
.
append
(
"isPrivate"
,
getIsPrivate
())
.
append
(
"isPrivate"
,
getIsPrivate
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"updateTime"
,
getUpdateTime
())
...
...
dsk-system/src/main/java/com/dsk/system/domain/vo/BusinessBrowseVo.java
View file @
0828d84e
...
@@ -98,5 +98,10 @@ public class BusinessBrowseVo {
...
@@ -98,5 +98,10 @@ public class BusinessBrowseVo {
*/
*/
private
Integer
relateCompanyCount
;
private
Integer
relateCompanyCount
;
/**
* 相关企业统计
*/
private
Integer
fileCount
;
}
}
dsk-system/src/main/java/com/dsk/system/mapper/BusinessBacklogMapper.java
View file @
0828d84e
...
@@ -44,12 +44,12 @@ public interface BusinessBacklogMapper
...
@@ -44,12 +44,12 @@ public interface BusinessBacklogMapper
public
int
updateBusinessBacklog
(
BusinessBacklog
businessBacklog
);
public
int
updateBusinessBacklog
(
BusinessBacklog
businessBacklog
);
/**
/**
* 删除项目工作待办
*
根据项目id
删除项目工作待办
*
*
* @param
id 项目工作待办
主键
* @param
businessId 项目id
主键
* @return 结果
* @return 结果
*/
*/
public
int
deleteB
usinessBacklogById
(
Long
i
d
);
public
int
deleteB
acklogByBusinessId
(
Long
businessI
d
);
/**
/**
* 批量删除项目工作待办
* 批量删除项目工作待办
...
...
dsk-system/src/main/java/com/dsk/system/mapper/BusinessContactsMapper.java
View file @
0828d84e
...
@@ -47,10 +47,10 @@ public interface BusinessContactsMapper
...
@@ -47,10 +47,10 @@ public interface BusinessContactsMapper
/**
/**
* 删除项目联系人
* 删除项目联系人
*
*
* @param
i
d 项目联系人主键
* @param
businessI
d 项目联系人主键
* @return 结果
* @return 结果
*/
*/
public
int
deleteBusinessContactsBy
Id
(
Long
i
d
);
public
int
deleteBusinessContactsBy
BusinessId
(
Long
businessI
d
);
/**
/**
* 批量删除项目联系人
* 批量删除项目联系人
...
...
dsk-system/src/main/java/com/dsk/system/mapper/BusinessFollowRecordMapper.java
View file @
0828d84e
...
@@ -53,12 +53,12 @@ public interface BusinessFollowRecordMapper
...
@@ -53,12 +53,12 @@ public interface BusinessFollowRecordMapper
public
int
updateBusinessFollowRecord
(
BusinessFollowRecord
businessFollowRecord
);
public
int
updateBusinessFollowRecord
(
BusinessFollowRecord
businessFollowRecord
);
/**
/**
* 删除项目跟进记录
*
根据项目id
删除项目跟进记录
*
*
* @param
id 项目跟进记录主键
* @param
businessId 项目主键id
* @return 结果
* @return 结果
*/
*/
public
int
deleteBusinessFollowRecordBy
Id
(
Long
i
d
);
public
int
deleteBusinessFollowRecordBy
BusinessId
(
Long
businessI
d
);
/**
/**
* 批量删除项目跟进记录
* 批量删除项目跟进记录
...
...
dsk-system/src/main/java/com/dsk/system/mapper/BusinessInfoMapper.java
View file @
0828d84e
...
@@ -84,7 +84,7 @@ public interface BusinessInfoMapper extends BaseMapper<BusinessInfo>
...
@@ -84,7 +84,7 @@ public interface BusinessInfoMapper extends BaseMapper<BusinessInfo>
public
int
deleteBusinessInfoByIds
(
Long
[]
ids
);
public
int
deleteBusinessInfoByIds
(
Long
[]
ids
);
/**
/**
*
根据项目统计
*
统计项目相关的信息数量
* @param business
* @param business
* @return
* @return
*/
*/
...
...
dsk-system/src/main/java/com/dsk/system/mapper/BusinessLabelMapper.java
View file @
0828d84e
...
@@ -53,6 +53,14 @@ public interface BusinessLabelMapper
...
@@ -53,6 +53,14 @@ public interface BusinessLabelMapper
*/
*/
public
int
deleteBusinessLabelById
(
BusinessIdDto
dto
);
public
int
deleteBusinessLabelById
(
BusinessIdDto
dto
);
/**
* 根据项目id删除项目标签
*
* @param businessId 项目主键
* @return 结果
*/
public
int
deleteBusinessLabelByBusinessId
(
Long
businessId
);
/**
/**
* 批量删除项目标签
* 批量删除项目标签
*
*
...
...
dsk-system/src/main/java/com/dsk/system/mapper/BusinessRelateCompanyMapper.java
View file @
0828d84e
...
@@ -2,7 +2,6 @@ package com.dsk.system.mapper;
...
@@ -2,7 +2,6 @@ package com.dsk.system.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.dsk.common.core.domain.entity.BusinessRelateCompany
;
import
com.dsk.common.core.domain.entity.BusinessRelateCompany
;
import
com.dsk.system.domain.customer.CustomerDecisionChain
;
import
java.util.List
;
import
java.util.List
;
...
@@ -52,7 +51,7 @@ public interface BusinessRelateCompanyMapper extends BaseMapper<BusinessRelateCo
...
@@ -52,7 +51,7 @@ public interface BusinessRelateCompanyMapper extends BaseMapper<BusinessRelateCo
* @param id 项目关联单位主键
* @param id 项目关联单位主键
* @return 结果
* @return 结果
*/
*/
public
int
delete
BusinessRelateCompanyBy
Id
(
Long
id
);
public
int
delete
RelateCompanyByBusiness
Id
(
Long
id
);
/**
/**
* 批量删除项目关联单位
* 批量删除项目关联单位
...
...
dsk-system/src/main/java/com/dsk/system/mapper/BusinessUserMapper.java
View file @
0828d84e
...
@@ -19,6 +19,14 @@ public interface BusinessUserMapper
...
@@ -19,6 +19,14 @@ public interface BusinessUserMapper
*/
*/
public
BusinessUser
selectBusinessUserById
(
Long
id
);
public
BusinessUser
selectBusinessUserById
(
Long
id
);
/**
* 根据项目id查询项目的创建者
*
* @param businessId 项目id主键
* @return 项目创建者名称
*/
String
selectCreatorBybusinessId
(
Integer
businessId
);
/**
/**
* 查询项目用户关联列表
* 查询项目用户关联列表
*
*
...
@@ -44,12 +52,12 @@ public interface BusinessUserMapper
...
@@ -44,12 +52,12 @@ public interface BusinessUserMapper
public
int
updateBusinessUser
(
BusinessUser
businessUser
);
public
int
updateBusinessUser
(
BusinessUser
businessUser
);
/**
/**
* 删除项目用户关联
*
根据项目id
删除项目用户关联
*
*
* @param
i
d 项目用户关联主键
* @param
businessI
d 项目用户关联主键
* @return 结果
* @return 结果
*/
*/
public
int
deleteBusinessUserBy
Id
(
Long
i
d
);
public
int
deleteBusinessUserBy
BusinessId
(
Long
businessI
d
);
/**
/**
* 批量删除项目用户关联
* 批量删除项目用户关联
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessBacklogServiceImpl.java
View file @
0828d84e
...
@@ -97,6 +97,6 @@ public class BusinessBacklogServiceImpl implements IBusinessBacklogService
...
@@ -97,6 +97,6 @@ public class BusinessBacklogServiceImpl implements IBusinessBacklogService
@Override
@Override
public
int
deleteBusinessBacklogById
(
Long
id
)
public
int
deleteBusinessBacklogById
(
Long
id
)
{
{
return
businessBacklogMapper
.
deleteB
usinessBacklogBy
Id
(
id
);
return
businessBacklogMapper
.
deleteB
acklogByBusiness
Id
(
id
);
}
}
}
}
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessContactsServiceImpl.java
View file @
0828d84e
...
@@ -98,6 +98,6 @@ public class BusinessContactsServiceImpl implements IBusinessContactsService
...
@@ -98,6 +98,6 @@ public class BusinessContactsServiceImpl implements IBusinessContactsService
@Override
@Override
public
int
deleteBusinessContactsById
(
Long
id
)
public
int
deleteBusinessContactsById
(
Long
id
)
{
{
return
businessContactsMapper
.
deleteBusinessContactsById
(
id
);
return
businessContactsMapper
.
deleteBusinessContactsBy
Business
Id
(
id
);
}
}
}
}
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessFollowRecordServiceImpl.java
View file @
0828d84e
...
@@ -92,6 +92,6 @@ public class BusinessFollowRecordServiceImpl implements IBusinessFollowRecordSer
...
@@ -92,6 +92,6 @@ public class BusinessFollowRecordServiceImpl implements IBusinessFollowRecordSer
@Override
@Override
public
int
deleteBusinessFollowRecordById
(
Long
id
)
public
int
deleteBusinessFollowRecordById
(
Long
id
)
{
{
return
businessFollowRecordMapper
.
deleteBusinessFollowRecordById
(
id
);
return
businessFollowRecordMapper
.
deleteBusinessFollowRecordBy
Business
Id
(
id
);
}
}
}
}
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessInfoServiceImpl.java
View file @
0828d84e
package
com
.
dsk
.
system
.
service
.
impl
;
package
com
.
dsk
.
system
.
service
.
impl
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.core.domain.entity.BusinessInfo
;
import
com.dsk.common.core.domain.entity.BusinessInfo
;
import
com.dsk.common.core.domain.entity.BusinessLabel
;
import
com.dsk.common.core.domain.entity.BusinessLabel
;
import
com.dsk.common.core.domain.entity.BusinessRelateCompany
;
import
com.dsk.common.core.domain.entity.BusinessRelateCompany
;
import
com.dsk.common.core.domain.entity.BusinessUser
;
import
com.dsk.common.core.domain.entity.BusinessUser
;
import
com.dsk.common.dtos.BusinessInfoDto
;
import
com.dsk.common.utils.DateUtils
;
import
com.dsk.common.utils.DateUtils
;
import
com.dsk.common.utils.SecurityUtils
;
import
com.dsk.system.domain.BusinessAddDto
;
import
com.dsk.system.domain.BusinessAddDto
;
import
com.dsk.system.domain.BusinessListDto
;
import
com.dsk.system.domain.BusinessListDto
;
import
com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto
;
import
com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto
;
import
com.dsk.system.domain.customer.vo.CustomerBusinessListVo
;
import
com.dsk.system.domain.customer.vo.CustomerBusinessListVo
;
import
com.dsk.system.domain.vo.BusinessBrowseVo
;
import
com.dsk.system.domain.vo.BusinessBrowseVo
;
import
com.dsk.system.domain.vo.BusinessListVo
;
import
com.dsk.system.domain.vo.BusinessListVo
;
import
com.dsk.system.mapper.BusinessInfoMapper
;
import
com.dsk.system.mapper.*
;
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
com.dsk.system.service.IBusinessInfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -46,6 +40,12 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -46,6 +40,12 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
private
BusinessRelateCompanyMapper
businessRelateCompanyMapper
;
private
BusinessRelateCompanyMapper
businessRelateCompanyMapper
;
@Resource
@Resource
private
BusinessLabelMapper
businessLabelMapper
;
private
BusinessLabelMapper
businessLabelMapper
;
@Resource
private
BusinessBacklogMapper
businessBacklogMapper
;
@Resource
private
BusinessContactsMapper
businessContactsMapper
;
@Resource
private
BusinessFollowRecordMapper
businessFollowRecordMapper
;
/**
/**
* 查询项目详情
* 查询项目详情
...
@@ -80,10 +80,15 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -80,10 +80,15 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
//查询项目基本信息
//查询项目基本信息
BusinessInfo
businessInfo
=
businessInfoMapper
.
selectBusinessInfoById
(
businessId
);
BusinessInfo
businessInfo
=
businessInfoMapper
.
selectBusinessInfoById
(
businessId
);
BeanUtil
.
copyProperties
(
businessInfo
,
businessBrowseVo
);
BeanUtil
.
copyProperties
(
businessInfo
,
businessBrowseVo
);
//查询商务团队
String
team
=
""
;
team
=
businessUserMapper
.
selectCreatorBybusinessId
(
businessId
);
businessBrowseVo
.
setTeam
(
team
);
//查询项目标签
//查询项目标签
businessBrowseVo
.
setLabelList
(
businessLabelMapper
.
selectBusinessLabelList
(
new
BusinessLabel
(
businessId
)).
stream
().
map
(
p
->
p
.
getLabel
()).
collect
(
Collectors
.
toList
()));
businessBrowseVo
.
setLabelList
(
businessLabelMapper
.
selectBusinessLabelList
(
new
BusinessLabel
(
businessId
)).
stream
().
map
(
p
->
p
.
getLabel
()).
collect
(
Collectors
.
toList
()));
//查询关键企业
//查询关键企业
businessBrowseVo
.
setRelateCompany
(
businessRelateCompanyMapper
.
selectBusinessRelateCompanyList
(
new
BusinessRelateCompany
(
businessId
)));
businessBrowseVo
.
setRelateCompany
(
businessRelateCompanyMapper
.
selectBusinessRelateCompanyList
(
new
BusinessRelateCompany
(
businessId
)));
//统计项目相关的信息数量
BusinessBrowseVo
total
=
businessInfoMapper
.
selectTotal
(
businessId
);
BusinessBrowseVo
total
=
businessInfoMapper
.
selectTotal
(
businessId
);
businessBrowseVo
.
setBacklogCount
(
total
.
getBacklogCount
());
businessBrowseVo
.
setBacklogCount
(
total
.
getBacklogCount
());
businessBrowseVo
.
setContactsCount
(
total
.
getContactsCount
());
businessBrowseVo
.
setContactsCount
(
total
.
getContactsCount
());
...
@@ -117,7 +122,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -117,7 +122,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
//新增用户-项目关系信息
//新增用户-项目关系信息
int
addbusinessUser
=
businessUserMapper
.
insertBusinessUser
(
new
BusinessUser
(
businessInfo
.
getId
(),
deptId
.
intValue
(),
dto
.
getUserId
(),
1
));
int
addbusinessUser
=
businessUserMapper
.
insertBusinessUser
(
new
BusinessUser
(
businessInfo
.
getId
(),
deptId
.
intValue
(),
dto
.
getUserId
(),
1
));
//新增项目-关联企业信息
//新增项目-关联企业信息
int
addRelateCompany
=
businessRelateCompanyMapper
.
insertBusinessRelateCompany
(
new
BusinessRelateCompany
(
businessInfo
.
getId
(),
dto
.
getCompanyId
(),
dto
.
getOwnerCompany
(),
"业主"
));
int
addRelateCompany
=
businessRelateCompanyMapper
.
insertBusinessRelateCompany
(
new
BusinessRelateCompany
(
businessInfo
.
getId
(),
dto
.
getCompanyId
(),
dto
.
getOwnerCompany
(),
"业主
单位
"
));
return
addbusinessUser
>
0
&&
addRelateCompany
>
0
?
AjaxResult
.
success
()
:
AjaxResult
.
error
();
return
addbusinessUser
>
0
&&
addRelateCompany
>
0
?
AjaxResult
.
success
()
:
AjaxResult
.
error
();
}
}
return
AjaxResult
.
error
();
return
AjaxResult
.
error
();
...
@@ -157,8 +162,25 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -157,8 +162,25 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
* @return 结果
* @return 结果
*/
*/
@Override
@Override
@Transactional
public
int
deleteBusinessInfoById
(
Long
id
)
{
public
int
deleteBusinessInfoById
(
Long
id
)
{
return
businessInfoMapper
.
deleteBusinessInfoById
(
id
);
int
removeBusiness
=
businessInfoMapper
.
deleteBusinessInfoById
(
id
);
if
(
removeBusiness
>
0
)
{
//删除用户关联项目
businessUserMapper
.
deleteBusinessUserByBusinessId
(
id
);
//删除项目关联单位
businessRelateCompanyMapper
.
deleteRelateCompanyByBusinessId
(
id
);
//删除项目关联工作待办
businessBacklogMapper
.
deleteBacklogByBusinessId
(
id
);
//删除项目关联联系人
businessContactsMapper
.
deleteBusinessContactsByBusinessId
(
id
);
//删除项目跟进记录
businessFollowRecordMapper
.
deleteBusinessFollowRecordByBusinessId
(
id
);
//删除项目标签
businessLabelMapper
.
deleteBusinessLabelByBusinessId
(
id
);
return
1
;
}
return
0
;
}
}
/**
/**
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessRelateCompanyServiceImpl.java
View file @
0828d84e
...
@@ -4,7 +4,6 @@ import java.util.List;
...
@@ -4,7 +4,6 @@ import java.util.List;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.core.domain.entity.BusinessRelateCompany
;
import
com.dsk.common.core.domain.entity.BusinessRelateCompany
;
import
com.dsk.common.exception.base.BaseException
;
import
com.dsk.common.exception.base.BaseException
;
import
com.dsk.common.utils.CheckUtils
;
import
com.dsk.common.utils.CheckUtils
;
...
@@ -104,7 +103,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
...
@@ -104,7 +103,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
@Override
@Override
public
int
deleteBusinessRelateCompanyById
(
Long
id
)
public
int
deleteBusinessRelateCompanyById
(
Long
id
)
{
{
return
businessRelateCompanyMapper
.
delete
BusinessRelateCompanyBy
Id
(
id
);
return
businessRelateCompanyMapper
.
delete
RelateCompanyByBusiness
Id
(
id
);
}
}
@Override
@Override
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessUserServiceImpl.java
View file @
0828d84e
...
@@ -92,6 +92,6 @@ public class BusinessUserServiceImpl implements IBusinessUserService
...
@@ -92,6 +92,6 @@ public class BusinessUserServiceImpl implements IBusinessUserService
@Override
@Override
public
int
deleteBusinessUserById
(
Long
id
)
public
int
deleteBusinessUserById
(
Long
id
)
{
{
return
businessUserMapper
.
deleteBusinessUserById
(
id
);
return
businessUserMapper
.
deleteBusinessUserBy
Business
Id
(
id
);
}
}
}
}
dsk-system/src/main/resources/mapper/business/BusinessBacklogMapper.xml
View file @
0828d84e
...
@@ -82,10 +82,10 @@
...
@@ -82,10 +82,10 @@
where id = #{id}
where id = #{id}
</update>
</update>
<delete
id=
"deleteB
usinessBacklogBy
Id"
parameterType=
"Long"
>
<delete
id=
"deleteB
acklogByBusiness
Id"
parameterType=
"Long"
>
delete
delete
from business_backlog
from business_backlog
where
id = #{i
d}
where
business_id = #{businessI
d}
</delete>
</delete>
<delete
id=
"deleteBusinessBacklogByIds"
parameterType=
"String"
>
<delete
id=
"deleteBusinessBacklogByIds"
parameterType=
"String"
>
...
...
dsk-system/src/main/resources/mapper/business/BusinessContactsMapper.xml
View file @
0828d84e
...
@@ -93,10 +93,10 @@
...
@@ -93,10 +93,10 @@
where id = #{id}
where id = #{id}
</update>
</update>
<delete
id=
"deleteBusinessContactsById"
parameterType=
"Long"
>
<delete
id=
"deleteBusinessContactsBy
Business
Id"
parameterType=
"Long"
>
delete
delete
from business_contacts
from business_contacts
where
id = #{i
d}
where
business_id = #{businessI
d}
</delete>
</delete>
<delete
id=
"deleteBusinessContactsByIds"
parameterType=
"String"
>
<delete
id=
"deleteBusinessContactsByIds"
parameterType=
"String"
>
...
...
dsk-system/src/main/resources/mapper/business/BusinessFollowRecordMapper.xml
View file @
0828d84e
...
@@ -107,10 +107,10 @@
...
@@ -107,10 +107,10 @@
where id = #{id}
where id = #{id}
</update>
</update>
<delete
id=
"deleteBusinessFollowRecordById"
parameterType=
"Long"
>
<delete
id=
"deleteBusinessFollowRecordBy
Business
Id"
parameterType=
"Long"
>
delete
delete
from business_follow_record
from business_follow_record
where
id = #{i
d}
where
business_id = #{businessI
d}
</delete>
</delete>
<delete
id=
"deleteBusinessFollowRecordByIds"
parameterType=
"String"
>
<delete
id=
"deleteBusinessFollowRecordByIds"
parameterType=
"String"
>
...
...
dsk-system/src/main/resources/mapper/business/BusinessInfoMapper.xml
View file @
0828d84e
...
@@ -24,7 +24,6 @@
...
@@ -24,7 +24,6 @@
<result
property=
"districtId"
column=
"district_id"
/>
<result
property=
"districtId"
column=
"district_id"
/>
<result
property=
"projectType"
column=
"project_type"
/>
<result
property=
"projectType"
column=
"project_type"
/>
<result
property=
"projectCategory"
column=
"project_category"
/>
<result
property=
"projectCategory"
column=
"project_category"
/>
<result
property=
"team"
column=
"team"
/>
<result
property=
"isPrivate"
column=
"is_private"
/>
<result
property=
"isPrivate"
column=
"is_private"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
...
@@ -52,7 +51,6 @@
...
@@ -52,7 +51,6 @@
district_id,
district_id,
project_type,
project_type,
project_category,
project_category,
team,
is_private,
is_private,
create_time,
create_time,
update_time,
update_time,
...
@@ -173,7 +171,6 @@
...
@@ -173,7 +171,6 @@
<if
test=
"districtId != null"
>
district_id,
</if>
<if
test=
"districtId != null"
>
district_id,
</if>
<if
test=
"projectType != null"
>
project_type,
</if>
<if
test=
"projectType != null"
>
project_type,
</if>
<if
test=
"projectCategory != null"
>
project_category,
</if>
<if
test=
"projectCategory != null"
>
project_category,
</if>
<if
test=
"team != null"
>
team,
</if>
<if
test=
"isPrivate != null"
>
is_private,
</if>
<if
test=
"isPrivate != null"
>
is_private,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
...
@@ -199,7 +196,6 @@
...
@@ -199,7 +196,6 @@
<if
test=
"districtId != null"
>
#{districtId},
</if>
<if
test=
"districtId != null"
>
#{districtId},
</if>
<if
test=
"projectType != null"
>
#{projectType},
</if>
<if
test=
"projectType != null"
>
#{projectType},
</if>
<if
test=
"projectCategory != null"
>
#{projectCategory},
</if>
<if
test=
"projectCategory != null"
>
#{projectCategory},
</if>
<if
test=
"team != null"
>
#{team},
</if>
<if
test=
"isPrivate != null"
>
#{isPrivate},
</if>
<if
test=
"isPrivate != null"
>
#{isPrivate},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
...
@@ -229,7 +225,6 @@
...
@@ -229,7 +225,6 @@
<if
test=
"districtId != null"
>
district_id = #{districtId},
</if>
<if
test=
"districtId != null"
>
district_id = #{districtId},
</if>
<if
test=
"projectType != null"
>
project_type = #{projectType},
</if>
<if
test=
"projectType != null"
>
project_type = #{projectType},
</if>
<if
test=
"projectCategory != null"
>
project_category = #{projectCategory},
</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=
"isPrivate != null"
>
is_private = #{isPrivate},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
...
...
dsk-system/src/main/resources/mapper/business/BusinessLabelMapper.xml
View file @
0828d84e
...
@@ -71,4 +71,9 @@
...
@@ -71,4 +71,9 @@
#{id}
#{id}
</foreach>
</foreach>
</delete>
</delete>
<delete
id=
"deleteBusinessLabelByBusinessId"
>
delete
from business_label
where business_id = #{businessId}
</delete>
</mapper>
</mapper>
\ No newline at end of file
dsk-system/src/main/resources/mapper/business/BusinessRelateCompanyMapper.xml
View file @
0828d84e
...
@@ -97,10 +97,10 @@
...
@@ -97,10 +97,10 @@
where id = #{id}
where id = #{id}
</update>
</update>
<delete
id=
"delete
BusinessRelateCompanyBy
Id"
parameterType=
"Long"
>
<delete
id=
"delete
RelateCompanyByBusiness
Id"
parameterType=
"Long"
>
delete
delete
from business_relate_company
from business_relate_company
where
id = #{i
d}
where
business_id = #{businessI
d}
</delete>
</delete>
<delete
id=
"deleteBusinessRelateCompanyByIds"
parameterType=
"String"
>
<delete
id=
"deleteBusinessRelateCompanyByIds"
parameterType=
"String"
>
...
...
dsk-system/src/main/resources/mapper/business/BusinessUserMapper.xml
View file @
0828d84e
...
@@ -33,6 +33,12 @@
...
@@ -33,6 +33,12 @@
<include
refid=
"selectBusinessUserVo"
/>
<include
refid=
"selectBusinessUserVo"
/>
where id = #{id}
where id = #{id}
</select>
</select>
<select
id=
"selectCreatorBybusinessId"
resultType=
"java.lang.String"
>
select u.nick_name
from business_user b
left join sys_user u on u.user_id = b.user_id
where b.is_founder = 1 and business_id =#{businessId}
</select>
<insert
id=
"insertBusinessUser"
parameterType=
"com.dsk.common.core.domain.entity.BusinessUser"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<insert
id=
"insertBusinessUser"
parameterType=
"com.dsk.common.core.domain.entity.BusinessUser"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into business_user
insert into business_user
...
@@ -67,10 +73,10 @@
...
@@ -67,10 +73,10 @@
where id = #{id}
where id = #{id}
</update>
</update>
<delete
id=
"deleteBusinessUserById"
parameterType=
"Long"
>
<delete
id=
"deleteBusinessUserBy
Business
Id"
parameterType=
"Long"
>
delete
delete
from business_user
from business_user
where
id = #{id}
where
business_id = #{businessId} and is_founder = 1
</delete>
</delete>
<delete
id=
"deleteBusinessUserByIds"
parameterType=
"String"
>
<delete
id=
"deleteBusinessUserByIds"
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