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
8d8fb696
Commit
8d8fb696
authored
Dec 19, 2023
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/V20231129-中建一局二公司' into V20231129-中建一局二公司
parents
514d85e1
7669331e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
6 deletions
+21
-6
DSubcontractMapper.java
...rc/main/java/com/dsk/cscec/mapper/DSubcontractMapper.java
+4
-1
DCustomerServiceImpl.java
...java/com/dsk/cscec/service/impl/DCustomerServiceImpl.java
+6
-4
DSubcontractMapper.xml
...pi/src/main/resources/mapper/cscec/DSubcontractMapper.xml
+11
-1
No files found.
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/mapper/DSubcontractMapper.java
View file @
8d8fb696
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.dsk.cscec.domain.DSubcontract
;
import
com.dsk.cscec.domain.vo.DCustomerListVo
;
import
com.dsk.cscec.domain.bo.CustomerCooperationBo
;
import
com.dsk.cscec.domain.vo.CustomerCooperationVo
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -21,7 +22,9 @@ public interface DSubcontractMapper extends BaseMapper<DSubcontract> {
Integer
selectProjectCountByCustomerId
(
String
customerId
);
/**
DCustomerListVo
selectStatisticByCustomerId
(
String
customerId
);
/**
* 供应商合作记录
* @param build
* @param bo
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/impl/DCustomerServiceImpl.java
View file @
8d8fb696
...
...
@@ -45,10 +45,11 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
Page
<
DCustomerListVo
>
page
=
baseMapper
.
allSearchList
(
query
.
build
(),
bo
);
if
(
CollectionUtils
.
isNotEmpty
(
page
.
getRecords
()))
{
page
.
getRecords
().
parallelStream
().
forEach
(
item
->{
DCustomerListVo
vo
=
subcontractMapper
.
selectStatisticByCustomerId
(
item
.
getCustomerId
());
//企业合作数量
item
.
setEnterpriseCooperationCount
(
subcontractMapper
.
selectEnterpriseCountByCustomerId
(
item
.
getCustomerId
()
));
item
.
setEnterpriseCooperationCount
(
vo
.
getEnterpriseCooperationCount
(
));
//项目合作数量
item
.
setProjectCooperationCount
(
subcontractMapper
.
selectProjectCountByCustomerId
(
item
.
getCustomerId
()
));
item
.
setProjectCooperationCount
(
vo
.
getProjectCooperationCount
(
));
try
{
Map
<
String
,
Object
>
map
=
opportunityRadarService
.
enterpriseByName
(
item
.
getCustomerName
());
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"data"
)))
{
...
...
@@ -71,10 +72,11 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
List
<
DCustomerListVo
>
records
=
baseMapper
.
allSearchList
(
query
.
build
(),
bo
).
getRecords
();
if
(
CollectionUtils
.
isNotEmpty
(
records
)){
records
.
parallelStream
().
forEach
(
item
->{
DCustomerListVo
vo
=
subcontractMapper
.
selectStatisticByCustomerId
(
item
.
getCustomerId
());
//企业合作数量
item
.
setEnterpriseCooperationCount
(
subcontractMapper
.
selectEnterpriseCountByCustomerId
(
item
.
getCustomerId
()
));
item
.
setEnterpriseCooperationCount
(
vo
.
getEnterpriseCooperationCount
(
));
//项目合作数量
item
.
setProjectCooperationCount
(
subcontractMapper
.
selectProjectCountByCustomerId
(
item
.
getCustomerId
()
));
item
.
setProjectCooperationCount
(
vo
.
getProjectCooperationCount
(
));
});
}
return
records
;
...
...
dsk-module/dsk-biz-api/src/main/resources/mapper/cscec/DSubcontractMapper.xml
View file @
8d8fb696
...
...
@@ -17,7 +17,17 @@
) a
</select>
<select
id=
"selectCooperationList"
resultType=
"com.dsk.cscec.domain.vo.CustomerCooperationVo"
>
<select
id=
"selectStatisticByCustomerId"
resultType=
"com.dsk.cscec.domain.vo.DCustomerListVo"
>
select
count(DISTINCT org.customer_id) enterpriseCooperationCount,
count(DISTINCT project.customer_id) projectCooperationCount
from d_customer dc
left join d_subcontract org on org.customer_id = dc.customer_id
left join d_subcontract project on project.customer_id = dc.customer_id
where dc.customer_id = #{customerId}
</select>
<select
id=
"selectCooperationList"
resultType=
"com.dsk.cscec.domain.vo.CustomerCooperationVo"
>
select ds.subcontract_key,ds.subcontract_id,ds.project_name,ds.sign_org_name,ds.sign_date,ds.subcontract_value,ds.settle_value,ds.job_scope,
dp.area_name,dp.province_name,dp.city_name,dp.project_manager_name,dp.project_manager_phone,dp.project_type2
from d_subcontract ds
...
...
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