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
e3c74abb
Commit
e3c74abb
authored
Dec 13, 2023
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
47e4322f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
38 deletions
+30
-38
DCustomerController.java
...in/java/com/dsk/cscec/controller/DCustomerController.java
+1
-1
DCustomerServiceImpl.java
...java/com/dsk/cscec/service/impl/DCustomerServiceImpl.java
+6
-6
DCustomerMapper.xml
...z-api/src/main/resources/mapper/cscec/DCustomerMapper.xml
+23
-31
No files found.
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/controller/DCustomerController.java
View file @
e3c74abb
...
@@ -30,7 +30,7 @@ public class DCustomerController extends BaseController {
...
@@ -30,7 +30,7 @@ public class DCustomerController extends BaseController {
* 供应商总台账筛选
* 供应商总台账筛选
*/
*/
@PostMapping
(
"/all/searchList"
)
@PostMapping
(
"/all/searchList"
)
public
TableDataInfo
<
DCustomer
>
allSearchList
(
@RequestBody
DCustomerSearchBo
bo
,
PageQuery
query
)
{
public
TableDataInfo
<
DCustomer
>
allSearchList
(
@RequestBody
DCustomerSearchBo
bo
,
@RequestBody
PageQuery
query
)
{
return
baseService
.
allSearchList
(
bo
,
query
);
return
baseService
.
allSearchList
(
bo
,
query
);
}
}
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/impl/DCustomerServiceImpl.java
View file @
e3c74abb
...
@@ -43,22 +43,22 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
...
@@ -43,22 +43,22 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
dealWithCustomerClass
(
bo
);
dealWithCustomerClass
(
bo
);
Page
<
DCustomer
>
page
=
baseMapper
.
allSearchList
(
query
.
build
(),
bo
);
Page
<
DCustomer
>
page
=
baseMapper
.
allSearchList
(
query
.
build
(),
bo
);
if
(
CollectionUtils
.
isNotEmpty
(
page
.
getRecords
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
page
.
getRecords
()))
{
for
(
DCustomer
customer
:
page
.
getRecords
())
{
page
.
getRecords
().
parallelStream
().
forEach
(
item
->
{
//企业合作数量
//企业合作数量
customer
.
setEnterpriseCooperationCount
(
subcontractMapper
.
selectEnterpriseCountByCustomerId
(
customer
.
getCustomerId
()));
item
.
setEnterpriseCooperationCount
(
subcontractMapper
.
selectEnterpriseCountByCustomerId
(
item
.
getCustomerId
()));
//项目合作数量
//项目合作数量
customer
.
setProjectCooperationCount
(
subcontractMapper
.
selectProjectCountByCustomerId
(
customer
.
getCustomerId
()));
item
.
setProjectCooperationCount
(
subcontractMapper
.
selectProjectCountByCustomerId
(
item
.
getCustomerId
()));
try
{
try
{
Map
<
String
,
Object
>
map
=
opportunityRadarService
.
enterpriseByName
(
customer
.
getCustomerName
());
Map
<
String
,
Object
>
map
=
opportunityRadarService
.
enterpriseByName
(
item
.
getCustomerName
());
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"data"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"data"
)))
{
Map
<
String
,
Object
>
data
=
BeanUtil
.
beanToMap
(
map
.
get
(
"data"
));
Map
<
String
,
Object
>
data
=
BeanUtil
.
beanToMap
(
map
.
get
(
"data"
));
Integer
companyId
=
MapUtil
.
getInt
(
data
,
"jskEid"
);
Integer
companyId
=
MapUtil
.
getInt
(
data
,
"jskEid"
);
customer
.
setCompanyId
(
companyId
);
item
.
setCompanyId
(
companyId
);
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
//
//
}
}
}
}
);
}
}
return
TableDataInfo
.
build
(
page
);
return
TableDataInfo
.
build
(
page
);
}
}
...
...
dsk-module/dsk-biz-api/src/main/resources/mapper/cscec/DCustomerMapper.xml
View file @
e3c74abb
...
@@ -12,37 +12,29 @@
...
@@ -12,37 +12,29 @@
from d_customer
from d_customer
where recommend_org_id = 'F17305B4EA4444CBAB12892C7B99E475'
where recommend_org_id = 'F17305B4EA4444CBAB12892C7B99E475'
<if
test=
"bo.customerName != null and bo.customerName != '' "
>
and customer_name like concat('%',#{bo.customerName},'%')
</if>
<if
test=
"bo.customerName != null and bo.customerName != '' "
>
and customer_name like concat('%',#{bo.customerName},'%')
</if>
<!-- <if test="bo.region != null and bo.region != '' ">-->
<if
test=
"bo.province != null and bo.province.size > 0 and (bo.city == null or bo.city.size == 0) "
>
<!-- and register_region in-->
and register_province in
<!-- <foreach collection="region" item="item" open="(" separator="," close=")">-->
<foreach
collection=
"bo.province"
item=
"item"
open=
"("
separator=
","
close=
")"
>
<!-- #{item}-->
#{item}
<!-- </foreach>-->
</foreach>
<!-- </if>-->
</if>
<choose>
<if
test=
"bo.city != null and bo.city.size > 0 and (bo.province == null or bo.province.size == 0) "
>
<when
test=
"bo.province != null and bo.province.size > 0 and (bo.city == null or bo.city.size == 0) "
>
and register_city in
and register_province in
<foreach
collection=
"bo.city"
item=
"item"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"province"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
#{item}
</foreach>
</foreach>
</if>
</when>
<if
test=
"bo.province != null and bo.province.size > 0 and bo.city != null and bo.city.size > 0 "
>
<when
test=
"bo.city != null and bo.city.size > 0 "
>
and ( register_province in
and register_city in
<foreach
collection=
"bo.province"
item=
"item"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"city"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
#{item}
</foreach>
</foreach>
or register_city in
</when>
<foreach
collection=
"bo.city"
item=
"item"
open=
"("
separator=
","
close=
")"
>
<otherwise>
#{item}
and ( register_province in
</foreach>
<foreach
collection=
"province"
item=
"item"
open=
"("
separator=
","
close=
")"
>
)
#{item}
</if>
</foreach>
or register_city in
<foreach
collection=
"city"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
)
</otherwise>
</choose>
<if
test=
"bo.customerClass != null and bo.customerClass != '' "
>
<if
test=
"bo.customerClass != null and bo.customerClass != '' "
>
and customer_class in
and customer_class in
<foreach
collection=
"customerClass"
item=
"item"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"customerClass"
item=
"item"
open=
"("
separator=
","
close=
")"
>
...
...
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