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
bbd965fc
Commit
bbd965fc
authored
Jul 25, 2023
by
yht15023815643
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev20230707' of
http://192.168.60.201/root/dsk-operate-sys
into dev20230707
parents
8ebe0599
a0904cfd
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
181 additions
and
20 deletions
+181
-20
BusinessInfo.java
.../java/com/dsk/common/core/domain/entity/BusinessInfo.java
+24
-0
BusinessRelateCompany.java
.../dsk/common/core/domain/entity/BusinessRelateCompany.java
+7
-5
EnterpriseInvestmentBody.java
...sk/common/core/domain/model/EnterpriseInvestmentBody.java
+2
-0
BusinessListVo.java
...rc/main/java/com/dsk/system/domain/vo/BusinessListVo.java
+10
-0
EnterpriseService.java
...ain/java/com/dsk/system/dskService/EnterpriseService.java
+28
-2
IBusinessInfoService.java
...ain/java/com/dsk/system/service/IBusinessInfoService.java
+8
-1
IBusinessRelateCompanyService.java
...com/dsk/system/service/IBusinessRelateCompanyService.java
+0
-3
BusinessInfoServiceImpl.java
.../com/dsk/system/service/impl/BusinessInfoServiceImpl.java
+63
-6
BusinessRelateCompanyServiceImpl.java
...system/service/impl/BusinessRelateCompanyServiceImpl.java
+21
-0
BusinessInfoMapper.xml
...src/main/resources/mapper/business/BusinessInfoMapper.xml
+11
-1
BusinessRelateCompanyMapper.xml
...resources/mapper/business/BusinessRelateCompanyMapper.xml
+7
-2
No files found.
dsk-common/src/main/java/com/dsk/common/core/domain/entity/BusinessInfo.java
View file @
bbd965fc
...
@@ -164,6 +164,28 @@ public class BusinessInfo extends BaseEntity
...
@@ -164,6 +164,28 @@ public class BusinessInfo extends BaseEntity
/** 主管单位联系电话 */
/** 主管单位联系电话 */
@Excel
(
name
=
"主管单位联系电话"
)
@Excel
(
name
=
"主管单位联系电话"
)
private
String
supervisorPhone
;
private
String
supervisorPhone
;
/** 建设单位城投id */
@Excel
(
name
=
"建设单位城投id"
)
private
String
constructionUnitUipId
;
/** 建设单位建设库id */
@Excel
(
name
=
"建设单位建设库id"
)
private
Integer
constructionUnitCid
;
public
String
getConstructionUnitUipId
()
{
return
constructionUnitUipId
;
}
public
void
setConstructionUnitUipId
(
String
constructionUnitUipId
)
{
this
.
constructionUnitUipId
=
constructionUnitUipId
;
}
public
Integer
getConstructionUnitCid
()
{
return
constructionUnitCid
;
}
public
void
setConstructionUnitCid
(
Integer
constructionUnitCid
)
{
this
.
constructionUnitCid
=
constructionUnitCid
;
}
public
String
getConstructionUnit
()
{
public
String
getConstructionUnit
()
{
return
constructionUnit
;
return
constructionUnit
;
...
@@ -514,6 +536,8 @@ public class BusinessInfo extends BaseEntity
...
@@ -514,6 +536,8 @@ public class BusinessInfo extends BaseEntity
.
append
(
"supervisorUnit"
,
getSupervisorUnit
())
.
append
(
"supervisorUnit"
,
getSupervisorUnit
())
.
append
(
"supervisorPrincipal"
,
getSupervisorPrincipal
())
.
append
(
"supervisorPrincipal"
,
getSupervisorPrincipal
())
.
append
(
"supervisorPhone"
,
getSupervisorPhone
())
.
append
(
"supervisorPhone"
,
getSupervisorPhone
())
.
append
(
"constructionUnitUipId"
,
getConstructionUnitUipId
())
.
append
(
"constructionUnitCid"
,
getConstructionUnitCid
())
.
toString
();
.
toString
();
}
}
}
}
dsk-common/src/main/java/com/dsk/common/core/domain/entity/BusinessRelateCompany.java
View file @
bbd965fc
...
@@ -2,14 +2,11 @@ package com.dsk.common.core.domain.entity;
...
@@ -2,14 +2,11 @@ package com.dsk.common.core.domain.entity;
import
com.dsk.common.annotation.Excel
;
import
com.dsk.common.annotation.Excel
;
import
com.dsk.common.core.domain.BaseEntity
;
import
com.dsk.common.core.domain.BaseEntity
;
import
com.dsk.common.utils.CheckUtils
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
javax.validation.constraints.Pattern
;
/**
/**
* 项目关联单位对象 business_relate_company
* 项目关联单位对象 business_relate_company
*
*
...
@@ -29,10 +26,14 @@ public class BusinessRelateCompany extends BaseEntity
...
@@ -29,10 +26,14 @@ public class BusinessRelateCompany extends BaseEntity
@Excel
(
name
=
"项目id"
)
@Excel
(
name
=
"项目id"
)
private
Integer
businessId
;
private
Integer
businessId
;
/** 单位id */
/** 单位
建设库
id */
@Excel
(
name
=
"单位id"
)
@Excel
(
name
=
"单位
建设库
id"
)
private
Integer
companyId
;
private
Integer
companyId
;
/** 单位城投id */
@Excel
(
name
=
"单位城投id"
)
private
String
companyUipId
;
/** 单位名称 */
/** 单位名称 */
@Excel
(
name
=
"单位名称"
)
@Excel
(
name
=
"单位名称"
)
private
String
companyName
;
private
String
companyName
;
...
@@ -71,6 +72,7 @@ public class BusinessRelateCompany extends BaseEntity
...
@@ -71,6 +72,7 @@ public class BusinessRelateCompany extends BaseEntity
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"depth"
,
getDepth
())
.
append
(
"depth"
,
getDepth
())
.
append
(
"companyType"
,
getCompanyType
())
.
append
(
"companyType"
,
getCompanyType
())
.
append
(
"companyUipId"
,
getCompanyUipId
())
.
toString
();
.
toString
();
}
}
...
...
dsk-common/src/main/java/com/dsk/common/core/domain/model/EnterpriseInvestmentBody.java
View file @
bbd965fc
...
@@ -21,6 +21,8 @@ public class EnterpriseInvestmentBody extends BasePage {
...
@@ -21,6 +21,8 @@ public class EnterpriseInvestmentBody extends BasePage {
private
Integer
hasBid
;
private
Integer
hasBid
;
private
double
stockPercentageMin
;
private
double
stockPercentageMin
;
private
double
stockPercentageMax
;
private
double
stockPercentageMax
;
//搜索-企业名称
private
String
keyword
;
public
boolean
isVaildCid
()
{
public
boolean
isVaildCid
()
{
return
0
==
cid
;
return
0
==
cid
;
...
...
dsk-system/src/main/java/com/dsk/system/domain/vo/BusinessListVo.java
View file @
bbd965fc
...
@@ -48,6 +48,16 @@ public class BusinessListVo {
...
@@ -48,6 +48,16 @@ public class BusinessListVo {
*/
*/
private
String
ownerCompany
;
private
String
ownerCompany
;
/**
* 业主单位城投id
*/
private
String
ownerCompanyUipId
;
/**
* 业主单位建设库id
*/
private
Integer
ownerCompanyCid
;
/**
/**
* 最后跟进时间
* 最后跟进时间
*/
*/
...
...
dsk-system/src/main/java/com/dsk/system/dskService/EnterpriseService.java
View file @
bbd965fc
...
@@ -145,9 +145,35 @@ public class EnterpriseService {
...
@@ -145,9 +145,35 @@ public class EnterpriseService {
}
}
public
TableDataInfo
investment
(
EnterpriseInvestmentBody
body
)
throws
Exception
{
public
TableDataInfo
investment
(
EnterpriseInvestmentBody
body
)
throws
Exception
{
if
(
body
.
isVaildCid
())
return
new
TableDataInfo
(
new
ArrayList
<>(),
0
);
if
(
body
.
isVaildCid
())
{
return
new
TableDataInfo
(
new
ArrayList
<>(),
0
);
}
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/operate/enterprise/investment"
,
BeanUtil
.
beanToMap
(
body
,
false
,
false
));
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/operate/enterprise/investment"
,
BeanUtil
.
beanToMap
(
body
,
false
,
false
));
return
dskOpenApiUtil
.
responsePage
(
map
);
Integer
code
=
MapUtils
.
getInteger
(
map
,
"code"
,
300
);
if
(!
code
.
equals
(
HttpStatus
.
OK
.
value
()))
{
throw
new
RuntimeException
();
}
Map
data
=
MapUtils
.
getMap
(
map
,
"data"
,
null
);
List
<
Object
>
list
=
CommonUtils
.
assertAsArray
(
MapUtils
.
getObject
(
data
,
"list"
,
""
));
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
new
TableDataInfo
(
list
,
0
);
}
List
<
Object
>
newList
=
new
ArrayList
<>(
20
);
for
(
Object
companyObj
:
list
)
{
Map
<
String
,
Object
>
companyMap
=
CommonUtils
.
assertAsMap
(
companyObj
);
String
businessStatus
=
MapUtils
.
getString
(
companyMap
,
"businessStatus"
);
if
(!
"注销"
.
equals
(
businessStatus
))
{
newList
.
add
(
companyMap
);
}
}
for
(
Object
companyObj
:
list
)
{
Map
<
String
,
Object
>
companyMap
=
CommonUtils
.
assertAsMap
(
companyObj
);
String
businessStatus
=
MapUtils
.
getString
(
companyMap
,
"businessStatus"
);
if
(
"注销"
.
equals
(
businessStatus
))
{
newList
.
add
(
companyMap
);
}
}
return
new
TableDataInfo
(
newList
,
MapUtils
.
getInteger
(
data
,
"totalCount"
,
0
));
}
}
public
TableDataInfo
affiliates
(
EnterpriseAffiliatesBody
body
)
throws
Exception
{
public
TableDataInfo
affiliates
(
EnterpriseAffiliatesBody
body
)
throws
Exception
{
...
...
dsk-system/src/main/java/com/dsk/system/service/IBusinessInfoService.java
View file @
bbd965fc
...
@@ -10,8 +10,8 @@ import com.dsk.system.domain.vo.BusinessBrowseVo;
...
@@ -10,8 +10,8 @@ import com.dsk.system.domain.vo.BusinessBrowseVo;
import
com.dsk.system.domain.vo.BusinessListVo
;
import
com.dsk.system.domain.vo.BusinessListVo
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 项目详情Service接口
* 项目详情Service接口
...
@@ -99,4 +99,11 @@ public interface IBusinessInfoService
...
@@ -99,4 +99,11 @@ public interface IBusinessInfoService
List
<
CustomerBusinessListVo
>
selectCustomerBusinessList
(
CustomerBusinessSearchDto
dto
);
List
<
CustomerBusinessListVo
>
selectCustomerBusinessList
(
CustomerBusinessSearchDto
dto
);
/**
* 查询企业的城投id和建设库id
* @param companyName
* @return
*/
Map
queryUipIdOrCid
(
String
companyName
);
}
}
dsk-system/src/main/java/com/dsk/system/service/IBusinessRelateCompanyService.java
View file @
bbd965fc
package
com
.
dsk
.
system
.
service
;
package
com
.
dsk
.
system
.
service
;
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.system.domain.BusinessIdDto
;
import
com.dsk.system.domain.BusinessIdDto
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
java.util.List
;
import
java.util.List
;
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessInfoServiceImpl.java
View file @
bbd965fc
...
@@ -2,8 +2,10 @@ package com.dsk.system.service.impl;
...
@@ -2,8 +2,10 @@ package com.dsk.system.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.dsk.acc.openapi.client.util.CommonUtils
;
import
com.dsk.common.config.RuoYiConfig
;
import
com.dsk.common.config.RuoYiConfig
;
import
com.dsk.common.constant.HttpStatus
;
import
com.dsk.common.constant.HttpStatus
;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.core.domain.AjaxResult
;
...
@@ -11,10 +13,7 @@ import com.dsk.common.core.domain.entity.BusinessInfo;
...
@@ -11,10 +13,7 @@ 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.BusinessUser
;
import
com.dsk.common.core.domain.entity.BusinessUser
;
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.*
;
import
com.dsk.common.utils.DateUtils
;
import
com.dsk.common.utils.SecurityUtils
;
import
com.dsk.common.utils.StringUtils
;
import
com.dsk.common.utils.file.FileUtils
;
import
com.dsk.common.utils.file.FileUtils
;
import
com.dsk.system.domain.BusinessAddDto
;
import
com.dsk.system.domain.BusinessAddDto
;
import
com.dsk.system.domain.BusinessExcelDto
;
import
com.dsk.system.domain.BusinessExcelDto
;
...
@@ -29,6 +28,7 @@ import com.dsk.system.mapper.BusinessLabelMapper;
...
@@ -29,6 +28,7 @@ import com.dsk.system.mapper.BusinessLabelMapper;
import
com.dsk.system.mapper.BusinessUserMapper
;
import
com.dsk.system.mapper.BusinessUserMapper
;
import
com.dsk.system.service.IBusinessInfoService
;
import
com.dsk.system.service.IBusinessInfoService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.MapUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -37,6 +37,7 @@ import javax.annotation.Resource;
...
@@ -37,6 +37,7 @@ import javax.annotation.Resource;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.LinkedList
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 项目详情Service业务层处理
* 项目详情Service业务层处理
...
@@ -55,6 +56,8 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -55,6 +56,8 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
private
BusinessLabelMapper
businessLabelMapper
;
private
BusinessLabelMapper
businessLabelMapper
;
@Resource
@Resource
private
ReadBusinessInfoExcel
readBusinessInfoExcel
;
private
ReadBusinessInfoExcel
readBusinessInfoExcel
;
@Resource
private
DskOpenApiUtil
dskOpenApiUtil
;
/**
/**
* 查询项目详情
* 查询项目详情
...
@@ -156,7 +159,6 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -156,7 +159,6 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
BusinessAddDto
businessAddDto
=
new
BusinessAddDto
();
BusinessAddDto
businessAddDto
=
new
BusinessAddDto
();
BeanUtil
.
copyProperties
(
businessInfo
,
businessAddDto
);
BeanUtil
.
copyProperties
(
businessInfo
,
businessAddDto
);
businessAddDto
.
setUserId
(
userId
.
intValue
());
businessAddDto
.
setUserId
(
userId
.
intValue
());
businessAddDto
.
setCompanyId
(
0
);
AjaxResult
add
=
insertBusinessInfo
(
businessAddDto
);
AjaxResult
add
=
insertBusinessInfo
(
businessAddDto
);
if
(
add
.
get
(
"code"
).
equals
(
HttpStatus
.
SUCCESS
))
rowSuccess
++;
if
(
add
.
get
(
"code"
).
equals
(
HttpStatus
.
SUCCESS
))
rowSuccess
++;
}
}
...
@@ -191,10 +193,20 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -191,10 +193,20 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
BusinessInfo
businessInfo
=
new
BusinessInfo
();
BusinessInfo
businessInfo
=
new
BusinessInfo
();
BeanUtil
.
copyProperties
(
dto
,
businessInfo
);
BeanUtil
.
copyProperties
(
dto
,
businessInfo
);
businessInfo
.
setConstructionUnit
(
dto
.
getOwnerCompany
());
businessInfo
.
setConstructionUnit
(
dto
.
getOwnerCompany
());
//查询企业的城投id和建设库id
Map
map
=
queryUipIdOrCid
(
dto
.
getOwnerCompany
());
if
(
map
.
containsKey
(
"jskEid"
)){
businessInfo
.
setConstructionUnitCid
(
MapUtils
.
getInteger
(
map
,
"jskEid"
,
null
));
}
else
{
businessInfo
.
setConstructionUnitUipId
(
MapUtils
.
getString
(
map
,
"uipId"
,
null
));
businessInfo
.
setConstructionUnitCid
(
MapUtils
.
getInteger
(
map
,
"companyId"
,
null
));
}
int
addBusiness
=
businessInfoMapper
.
insertBusinessInfo
(
businessInfo
);
int
addBusiness
=
businessInfoMapper
.
insertBusinessInfo
(
businessInfo
);
if
(
addBusiness
>
0
)
{
if
(
addBusiness
>
0
)
{
//获取登陆用户的部门id
//获取登陆用户的部门id
Long
deptId
=
SecurityUtils
.
getLoginUser
().
getDeptId
();
// Long deptId = SecurityUtils.getLoginUser().getDeptId();
Long
deptId
=
100
l
;
//新增用户-项目关系信息
//新增用户-项目关系信息
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
));
return
addbusinessUser
>
0
?
AjaxResult
.
success
()
:
AjaxResult
.
error
();
return
addbusinessUser
>
0
?
AjaxResult
.
success
()
:
AjaxResult
.
error
();
...
@@ -224,6 +236,14 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -224,6 +236,14 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
throw
new
BaseException
(
"500"
,
"请输入正确的电话号码"
);
throw
new
BaseException
(
"500"
,
"请输入正确的电话号码"
);
}
}
businessInfo
.
setUpdateTime
(
DateUtils
.
getNowDate
());
businessInfo
.
setUpdateTime
(
DateUtils
.
getNowDate
());
//查询企业的城投id和建设库id
Map
map
=
queryUipIdOrCid
(
businessInfo
.
getConstructionUnit
());
if
(
map
.
containsKey
(
"jskEid"
)){
businessInfo
.
setConstructionUnitCid
(
MapUtils
.
getInteger
(
map
,
"jskEid"
,
null
));
}
else
{
businessInfo
.
setConstructionUnitUipId
(
MapUtils
.
getString
(
map
,
"uipId"
,
null
));
businessInfo
.
setConstructionUnitCid
(
MapUtils
.
getInteger
(
map
,
"companyId"
,
null
));
}
return
businessInfoMapper
.
updateBusinessInfo
(
businessInfo
);
return
businessInfoMapper
.
updateBusinessInfo
(
businessInfo
);
}
}
...
@@ -276,4 +296,41 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -276,4 +296,41 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
public
List
<
CustomerBusinessListVo
>
selectCustomerBusinessList
(
CustomerBusinessSearchDto
dto
)
{
public
List
<
CustomerBusinessListVo
>
selectCustomerBusinessList
(
CustomerBusinessSearchDto
dto
)
{
return
businessInfoMapper
.
selectCustomerBusinessList
(
dto
);
return
businessInfoMapper
.
selectCustomerBusinessList
(
dto
);
}
}
@Override
public
Map
queryUipIdOrCid
(
String
companyName
){
Map
<
Object
,
Object
>
map
=
MapUtil
.
builder
().
build
();
if
(
StringUtils
.
isEmpty
(
companyName
))
return
map
;
//查询城投企业
Map
<
String
,
Object
>
paramMap
=
MapUtil
.<
String
,
Object
>
builder
().
put
(
"companyName"
,
companyName
).
build
();
Map
<
String
,
Object
>
resultMap
=
dskOpenApiUtil
.
requestBody
(
"/urbanInvestment/detailsByCompanyName"
,
paramMap
);
Integer
code
=
MapUtils
.
getInteger
(
resultMap
,
"code"
,
300
);
if
(
code
==
HttpStatus
.
SUCCESS
){
Map
data
=
MapUtils
.
getMap
(
resultMap
,
"data"
,
null
);
if
(
data
!=
null
){
map
.
put
(
"uipId"
,
MapUtils
.
getString
(
data
,
"uipId"
,
null
));
map
.
put
(
"companyId"
,
MapUtils
.
getInteger
(
data
,
"companyId"
,
null
));
}
}
if
(
MapUtil
.
isEmpty
(
map
))
{
//查村建设库企业
Map
<
String
,
Object
>
jskParamMap
=
MapUtil
.<
String
,
Object
>
builder
()
.
put
(
"keyword"
,
companyName
)
.
put
(
"page"
,
MapUtil
.<
String
,
Object
>
builder
().
put
(
"page"
,
1
).
put
(
"limit"
,
10
).
build
())
.
build
();
Map
<
String
,
Object
>
jskResultMap
=
dskOpenApiUtil
.
requestBody
(
"/enterprise/index"
,
jskParamMap
);
if
(
MapUtils
.
getInteger
(
resultMap
,
"code"
,
300
).
equals
(
HttpStatus
.
SUCCESS
)){
Map
data
=
MapUtils
.
getMap
(
jskResultMap
,
"data"
,
null
);
if
(
data
!=
null
){
List
<
Object
>
list
=
CommonUtils
.
assertAsArray
(
MapUtils
.
getObject
(
data
,
"list"
,
""
));
if
(
CollectionUtil
.
isNotEmpty
(
list
)){
for
(
Object
obj
:
list
)
{
map
.
put
(
"jskEid"
,
MapUtils
.
getInteger
(
BeanUtil
.
beanToMap
(
obj
,
false
,
false
),
"jskEid"
,
null
));
}
}
}
}
}
return
map
;
}
}
}
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessRelateCompanyServiceImpl.java
View file @
bbd965fc
...
@@ -5,12 +5,15 @@ import com.dsk.common.core.domain.entity.BusinessRelateCompany;
...
@@ -5,12 +5,15 @@ import com.dsk.common.core.domain.entity.BusinessRelateCompany;
import
com.dsk.common.utils.DateUtils
;
import
com.dsk.common.utils.DateUtils
;
import
com.dsk.system.domain.BusinessIdDto
;
import
com.dsk.system.domain.BusinessIdDto
;
import
com.dsk.system.mapper.BusinessRelateCompanyMapper
;
import
com.dsk.system.mapper.BusinessRelateCompanyMapper
;
import
com.dsk.system.service.IBusinessInfoService
;
import
com.dsk.system.service.IBusinessRelateCompanyService
;
import
com.dsk.system.service.IBusinessRelateCompanyService
;
import
org.apache.commons.collections4.MapUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -24,6 +27,8 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
...
@@ -24,6 +27,8 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
{
{
@Resource
@Resource
private
BusinessRelateCompanyMapper
businessRelateCompanyMapper
;
private
BusinessRelateCompanyMapper
businessRelateCompanyMapper
;
@Resource
private
IBusinessInfoService
businessInfoService
;
/**
/**
* 查询项目关联单位
* 查询项目关联单位
...
@@ -61,6 +66,14 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
...
@@ -61,6 +66,14 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
{
{
// if(!CheckUtils.isPhone(businessRelateCompany.getPhone())) throw new BaseException("500","请输入正确的电话号码");
// if(!CheckUtils.isPhone(businessRelateCompany.getPhone())) throw new BaseException("500","请输入正确的电话号码");
businessRelateCompany
.
setCreateTime
(
DateUtils
.
getNowDate
());
businessRelateCompany
.
setCreateTime
(
DateUtils
.
getNowDate
());
//查询企业的城投id和建设库id
Map
map
=
businessInfoService
.
queryUipIdOrCid
(
businessRelateCompany
.
getCompanyName
());
if
(
map
.
containsKey
(
"jskEid"
)){
businessRelateCompany
.
setCompanyId
(
MapUtils
.
getInteger
(
map
,
"jskEid"
,
null
));
}
else
{
businessRelateCompany
.
setCompanyUipId
(
MapUtils
.
getString
(
map
,
"uipId"
,
null
));
businessRelateCompany
.
setCompanyId
(
MapUtils
.
getInteger
(
map
,
"companyId"
,
null
));
}
return
businessRelateCompanyMapper
.
insertBusinessRelateCompany
(
businessRelateCompany
);
return
businessRelateCompanyMapper
.
insertBusinessRelateCompany
(
businessRelateCompany
);
}
}
...
@@ -76,6 +89,14 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
...
@@ -76,6 +89,14 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
{
{
// if(!CheckUtils.isPhone(businessRelateCompany.getPhone())) throw new BaseException("500","请输入正确的电话号码");
// if(!CheckUtils.isPhone(businessRelateCompany.getPhone())) throw new BaseException("500","请输入正确的电话号码");
businessRelateCompany
.
setUpdateTime
(
DateUtils
.
getNowDate
());
businessRelateCompany
.
setUpdateTime
(
DateUtils
.
getNowDate
());
//查询企业的城投id和建设库id
Map
map
=
businessInfoService
.
queryUipIdOrCid
(
businessRelateCompany
.
getCompanyName
());
if
(
map
.
containsKey
(
"jskEid"
)){
businessRelateCompany
.
setCompanyId
(
MapUtils
.
getInteger
(
map
,
"jskEid"
,
null
));
}
else
{
businessRelateCompany
.
setCompanyUipId
(
MapUtils
.
getString
(
map
,
"uipId"
,
null
));
businessRelateCompany
.
setCompanyId
(
MapUtils
.
getInteger
(
map
,
"companyId"
,
null
));
}
return
businessRelateCompanyMapper
.
updateBusinessRelateCompany
(
businessRelateCompany
);
return
businessRelateCompanyMapper
.
updateBusinessRelateCompany
(
businessRelateCompany
);
}
}
...
...
dsk-system/src/main/resources/mapper/business/BusinessInfoMapper.xml
View file @
bbd965fc
...
@@ -78,7 +78,9 @@
...
@@ -78,7 +78,9 @@
construction_phone,
construction_phone,
supervisor_unit,
supervisor_unit,
supervisor_principal,
supervisor_principal,
supervisor_phone
supervisor_phone,
construction_unit_uip_id,
construction_unit_cid
from business_info
from business_info
</sql>
</sql>
...
@@ -92,6 +94,8 @@
...
@@ -92,6 +94,8 @@
i.district_name districtName,
i.district_name districtName,
i.investment_amount investmentAmount,
i.investment_amount investmentAmount,
i.construction_unit ownerCompany,
i.construction_unit ownerCompany,
i.construction_unit_uip_id ownerCompanyUipId,
i.construction_unit_cid ownerCompanyCid,
MAX(f.creat_time) followTime,
MAX(f.creat_time) followTime,
u.nick_name nickName,
u.nick_name nickName,
GROUP_CONCAT(DISTINCT l.label) label
GROUP_CONCAT(DISTINCT l.label) label
...
@@ -284,6 +288,8 @@
...
@@ -284,6 +288,8 @@
<if
test=
"supervisorUnit != null"
>
supervisor_unit,
</if>
<if
test=
"supervisorUnit != null"
>
supervisor_unit,
</if>
<if
test=
"supervisorPrincipal != null"
>
supervisor_principal,
</if>
<if
test=
"supervisorPrincipal != null"
>
supervisor_principal,
</if>
<if
test=
"supervisorPhone != null"
>
supervisor_phone,
</if>
<if
test=
"supervisorPhone != null"
>
supervisor_phone,
</if>
<if
test=
"constructionUnitUipId != null"
>
construction_unit_uip_id,
</if>
<if
test=
"constructionUnitCid != null"
>
construction_unit_cid,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"projectName != null"
>
#{projectName},
</if>
<if
test=
"projectName != null"
>
#{projectName},
</if>
...
@@ -321,6 +327,8 @@
...
@@ -321,6 +327,8 @@
<if
test=
"supervisorUnit != null"
>
#{supervisorUnit},
</if>
<if
test=
"supervisorUnit != null"
>
#{supervisorUnit},
</if>
<if
test=
"supervisorPrincipal != null"
>
#{supervisorPrincipal},
</if>
<if
test=
"supervisorPrincipal != null"
>
#{supervisorPrincipal},
</if>
<if
test=
"supervisorPhone != null"
>
#{supervisorPhone},
</if>
<if
test=
"supervisorPhone != null"
>
#{supervisorPhone},
</if>
<if
test=
"constructionUnitUipId != null"
>
#{constructionUnitUipId},
</if>
<if
test=
"constructionUnitCid != null"
>
#{constructionUnitCid},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -343,6 +351,8 @@
...
@@ -343,6 +351,8 @@
city_id = #{cityId},
city_id = #{cityId},
district_name = #{districtName},
district_name = #{districtName},
district_id = #{districtId},
district_id = #{districtId},
construction_unit_uip_id = #{constructionUnitUipId},
construction_unit_cid = #{constructionUnitCid},
<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=
"isPrivate != null"
>
is_private = #{isPrivate},
</if>
<if
test=
"isPrivate != null"
>
is_private = #{isPrivate},
</if>
...
...
dsk-system/src/main/resources/mapper/business/BusinessRelateCompanyMapper.xml
View file @
bbd965fc
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"depth"
column=
"depth"
/>
<result
property=
"depth"
column=
"depth"
/>
<result
property=
"companyType"
column=
"company_type"
/>
<result
property=
"companyType"
column=
"company_type"
/>
<result
property=
"companyUipId"
column=
"company_uip_id"
/>
</resultMap>
</resultMap>
<sql
id=
"selectBusinessRelateCompanyVo"
>
<sql
id=
"selectBusinessRelateCompanyVo"
>
...
@@ -29,7 +30,8 @@
...
@@ -29,7 +30,8 @@
depth,
depth,
create_time,
create_time,
update_time,
update_time,
company_type
company_type,
company_uip_id
from business_relate_company
from business_relate_company
</sql>
</sql>
...
@@ -71,6 +73,7 @@
...
@@ -71,6 +73,7 @@
<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>
<if
test=
"companyType != null"
>
company_type,
</if>
<if
test=
"companyType != null"
>
company_type,
</if>
<if
test=
"companyUipId != null"
>
company_uip_id,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"businessId != null"
>
#{businessId},
</if>
<if
test=
"businessId != null"
>
#{businessId},
</if>
...
@@ -83,6 +86,7 @@
...
@@ -83,6 +86,7 @@
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"companyType != null"
>
#{companyType},
</if>
<if
test=
"companyType != null"
>
#{companyType},
</if>
<if
test=
"companyUipId != null"
>
#{companyUipId},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -90,7 +94,8 @@
...
@@ -90,7 +94,8 @@
update business_relate_company
update business_relate_company
<trim
prefix=
"SET"
suffixOverrides=
","
>
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"businessId != null"
>
business_id = #{businessId},
</if>
<if
test=
"businessId != null"
>
business_id = #{businessId},
</if>
<if
test=
"companyId != null"
>
company_id = #{companyId},
</if>
company_id = #{companyId},
company_uip_id = #{companyUipId},
<if
test=
"companyName != null"
>
company_name = #{companyName},
</if>
<if
test=
"companyName != null"
>
company_name = #{companyName},
</if>
<if
test=
"depth != null"
>
depth = #{depth},
</if>
<if
test=
"depth != null"
>
depth = #{depth},
</if>
<if
test=
"companyRole != null"
>
company_role = #{companyRole},
</if>
<if
test=
"companyRole != null"
>
company_role = #{companyRole},
</if>
...
...
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