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
84ed93b5
Commit
84ed93b5
authored
Dec 13, 2023
by
chenyuefang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f3188fd4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
5 deletions
+51
-5
CustomerInfoController.java
...java/com/dsk/cscec/controller/CustomerInfoController.java
+11
-0
CustomerInfoVo.java
...src/main/java/com/dsk/cscec/domain/vo/CustomerInfoVo.java
+4
-0
ICustomerInfoService.java
...main/java/com/dsk/cscec/service/ICustomerInfoService.java
+1
-0
CustomerInfoServiceImpl.java
...a/com/dsk/cscec/service/impl/CustomerInfoServiceImpl.java
+35
-5
No files found.
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/controller/CustomerInfoController.java
View file @
84ed93b5
...
@@ -3,7 +3,9 @@ package com.dsk.cscec.controller;
...
@@ -3,7 +3,9 @@ package com.dsk.cscec.controller;
import
com.dsk.common.core.controller.BaseController
;
import
com.dsk.common.core.controller.BaseController
;
import
com.dsk.common.core.domain.PageQuery
;
import
com.dsk.common.core.domain.PageQuery
;
import
com.dsk.common.core.domain.R
;
import
com.dsk.common.core.page.TableDataInfo
;
import
com.dsk.common.core.page.TableDataInfo
;
import
com.dsk.cscec.domain.DCustomer
;
import
com.dsk.cscec.domain.bo.CustomerInfoBo
;
import
com.dsk.cscec.domain.bo.CustomerInfoBo
;
import
com.dsk.cscec.domain.vo.CustomerInfoVo
;
import
com.dsk.cscec.domain.vo.CustomerInfoVo
;
import
com.dsk.cscec.service.ICustomerInfoService
;
import
com.dsk.cscec.service.ICustomerInfoService
;
...
@@ -11,6 +13,8 @@ import lombok.RequiredArgsConstructor;
...
@@ -11,6 +13,8 @@ import lombok.RequiredArgsConstructor;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.NotEmpty
;
/**
/**
* 供应商相关
* 供应商相关
*
*
...
@@ -35,6 +39,13 @@ public class CustomerInfoController extends BaseController {
...
@@ -35,6 +39,13 @@ public class CustomerInfoController extends BaseController {
return
iCustomerInfoService
.
queryPageList
(
bo
,
query
);
return
iCustomerInfoService
.
queryPageList
(
bo
,
query
);
}
}
/**
* 合作记录-供应商准入情况
*/
@GetMapping
(
"/getByName/{name}"
)
public
R
<
DCustomer
>
list
(
@NotEmpty
(
message
=
"企业名称不能为空"
)
@PathVariable
String
name
)
{
return
R
.
ok
(
iCustomerInfoService
.
queryByName
(
name
));
}
}
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/domain/vo/CustomerInfoVo.java
View file @
84ed93b5
...
@@ -141,6 +141,10 @@ public class CustomerInfoVo {
...
@@ -141,6 +141,10 @@ public class CustomerInfoVo {
* 合作项目数量
* 合作项目数量
*/
*/
private
Integer
projectCooperationCount
;
private
Integer
projectCooperationCount
;
/**
* jsk企业id
*/
private
Integer
companyId
;
/**
/**
* 资源平台分类
* 资源平台分类
*/
*/
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/ICustomerInfoService.java
View file @
84ed93b5
...
@@ -17,4 +17,5 @@ public interface ICustomerInfoService extends IService<DCustomer> {
...
@@ -17,4 +17,5 @@ public interface ICustomerInfoService extends IService<DCustomer> {
TableDataInfo
<
CustomerInfoVo
>
queryPageList
(
CustomerInfoBo
bo
,
PageQuery
query
);
TableDataInfo
<
CustomerInfoVo
>
queryPageList
(
CustomerInfoBo
bo
,
PageQuery
query
);
DCustomer
queryByName
(
String
name
);
}
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/impl/CustomerInfoServiceImpl.java
View file @
84ed93b5
package
com
.
dsk
.
cscec
.
service
.
impl
;
package
com
.
dsk
.
cscec
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.map.MapUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.dsk.common.core.domain.PageQuery
;
import
com.dsk.common.core.domain.PageQuery
;
...
@@ -11,8 +15,12 @@ import com.dsk.cscec.domain.vo.CustomerInfoVo;
...
@@ -11,8 +15,12 @@ import com.dsk.cscec.domain.vo.CustomerInfoVo;
import
com.dsk.cscec.mapper.DCustomerMapper
;
import
com.dsk.cscec.mapper.DCustomerMapper
;
import
com.dsk.cscec.mapper.DSubcontractMapper
;
import
com.dsk.cscec.mapper.DSubcontractMapper
;
import
com.dsk.cscec.service.ICustomerInfoService
;
import
com.dsk.cscec.service.ICustomerInfoService
;
import
com.dsk.search.service.BusinessOpportunityRadarService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Map
;
/**
/**
* 组织维表(DCustomer)表服务实现类
* 组织维表(DCustomer)表服务实现类
...
@@ -26,6 +34,9 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
...
@@ -26,6 +34,9 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
@Autowired
@Autowired
private
DSubcontractMapper
subcontractMapper
;
private
DSubcontractMapper
subcontractMapper
;
@Autowired
private
BusinessOpportunityRadarService
opportunityRadarService
;
@Override
@Override
public
TableDataInfo
<
CustomerInfoVo
>
queryPageList
(
CustomerInfoBo
bo
,
PageQuery
query
)
{
public
TableDataInfo
<
CustomerInfoVo
>
queryPageList
(
CustomerInfoBo
bo
,
PageQuery
query
)
{
if
(
"劳务分包"
.
equals
(
bo
.
getCustomerClass
())){
if
(
"劳务分包"
.
equals
(
bo
.
getCustomerClass
())){
...
@@ -37,13 +48,32 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
...
@@ -37,13 +48,32 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
}
}
Page
<
CustomerInfoVo
>
page
=
baseMapper
.
queryListByType
(
query
.
build
(),
bo
);
Page
<
CustomerInfoVo
>
page
=
baseMapper
.
queryListByType
(
query
.
build
(),
bo
);
if
(
CollectionUtils
.
isNotEmpty
(
page
.
getRecords
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
page
.
getRecords
()))
{
for
(
CustomerInfoVo
customerInfoVo
:
page
.
getRecords
())
{
page
.
getRecords
().
parallelStream
().
forEach
(
item
->
{
//
公司
合作数量
//
企业
合作数量
customerInfoVo
.
setEnterpriseCooperationCount
(
subcontractMapper
.
selectEnterpriseCountByCustomerId
(
customerInfoVo
.
getCustomerId
()));
item
.
setEnterpriseCooperationCount
(
subcontractMapper
.
selectEnterpriseCountByCustomerId
(
item
.
getCustomerId
()));
//项目合作数量
//项目合作数量
customerInfoVo
.
setProjectCooperationCount
(
subcontractMapper
.
selectProjectCountByCustomerId
(
customerInfoVo
.
getCustomerId
()));
item
.
setProjectCooperationCount
(
subcontractMapper
.
selectProjectCountByCustomerId
(
item
.
getCustomerId
()));
}
try
{
Map
<
String
,
Object
>
map
=
opportunityRadarService
.
enterpriseByName
(
item
.
getCustomerName
());
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"data"
)))
{
Map
<
String
,
Object
>
data
=
BeanUtil
.
beanToMap
(
map
.
get
(
"data"
));
Integer
companyId
=
MapUtil
.
getInt
(
data
,
"jskEid"
);
item
.
setCompanyId
(
companyId
);
}
}
catch
(
Exception
e
){
//
}
});
}
}
return
TableDataInfo
.
build
(
page
);
return
TableDataInfo
.
build
(
page
);
}
}
@Override
public
DCustomer
queryByName
(
String
name
)
{
LambdaQueryWrapper
<
DCustomer
>
lqw
=
Wrappers
.
lambdaQuery
();
lqw
.
eq
(
DCustomer:
:
getCustomerName
,
name
);
lqw
.
orderByDesc
(
DCustomer:
:
getApproveDate2
);
lqw
.
last
(
"limit 1"
);
return
baseMapper
.
selectOne
(
lqw
);
}
}
}
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