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
3ad08473
Commit
3ad08473
authored
Dec 11, 2023
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
d3a8ce0d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
146 additions
and
12 deletions
+146
-12
DCustomerController.java
...in/java/com/dsk/cscec/controller/DCustomerController.java
+9
-0
DCustomer.java
...biz-api/src/main/java/com/dsk/cscec/domain/DCustomer.java
+13
-0
DCustomerSearchBo.java
.../main/java/com/dsk/cscec/domain/bo/DCustomerSearchBo.java
+21
-7
IDCustomerService.java
...rc/main/java/com/dsk/cscec/service/IDCustomerService.java
+2
-0
DCustomerServiceImpl.java
...java/com/dsk/cscec/service/impl/DCustomerServiceImpl.java
+52
-1
DCustomerMapper.xml
...z-api/src/main/resources/mapper/cscec/DCustomerMapper.xml
+49
-4
No files found.
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/controller/DCustomerController.java
View file @
3ad08473
...
...
@@ -14,6 +14,7 @@ import com.dsk.system.domain.SysDept;
import
com.dsk.system.domain.vo.SysDeptVo
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -43,6 +44,14 @@ public class DCustomerController extends BaseController {
return
baseService
.
allSearchList
(
bo
,
query
);
}
/**
* 供应商信息
*/
@GetMapping
(
"/info/{customerKey}"
)
public
R
<
DCustomer
>
info
(
@PathVariable
String
customerKey
)
{
return
R
.
ok
(
baseService
.
info
(
customerKey
));
}
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/domain/DCustomer.java
View file @
3ad08473
...
...
@@ -3,6 +3,8 @@ package com.dsk.cscec.domain;
import
java.util.Date
;
import
java.io.Serializable
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
/**
...
...
@@ -19,6 +21,7 @@ public class DCustomer implements Serializable {
/**
* 客商主键
*/
@TableId
(
value
=
"customer_key"
)
private
Long
customerKey
;
/**
* ipm供应商id
...
...
@@ -528,5 +531,15 @@ public class DCustomer implements Serializable {
* 数据更新时间
*/
private
Date
loadTime
;
/**
* 企业合作数量
*/
@TableField
(
exist
=
false
)
private
Integer
enterpriseCooperationCount
;
/**
* 项目合作数量
*/
@TableField
(
exist
=
false
)
private
Integer
projectCooperationCount
;
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/domain/bo/DCustomerSearchBo.java
View file @
3ad08473
...
...
@@ -2,6 +2,8 @@ package com.dsk.cscec.domain.bo;
import
lombok.Data
;
import
java.util.List
;
/**
* @Author lcl
* @Data 2023/12/8 16:07
...
...
@@ -15,30 +17,42 @@ public class DCustomerSearchBo {
/**
* 区域
*/
private
String
[]
region
;
private
List
<
String
>
region
;
/**
* 省
*/
private
String
[]
province
;
private
List
<
String
>
province
;
/**
* 市
*/
private
String
[]
city
;
private
List
<
String
>
city
;
/**
* 供应商类别
*/
private
String
[]
customerClass
;
private
List
<
String
>
customerClass
;
/**
* 供应商状态
*/
private
String
[]
customerState
;
private
List
<
String
>
customerState
;
/**
* 评价等级
*/
private
String
[]
creditLevel
;
private
List
<
String
>
creditLevel
;
/**
* 资质等级
*/
private
String
[]
credential
;
private
List
<
String
>
credential
;
/**
* 准入时间(开始)
*/
private
String
approveDateBegion
;
/**
* 准入时间(结束)
*/
private
String
approveDateEnd
;
/**
* 是否队伍 0:否 1:是
*/
private
Integer
isTeam
;
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/IDCustomerService.java
View file @
3ad08473
...
...
@@ -16,5 +16,7 @@ public interface IDCustomerService extends IService<DCustomer> {
TableDataInfo
<
DCustomer
>
allSearchList
(
DCustomerSearchBo
bo
,
PageQuery
query
);
DCustomer
info
(
String
customerKey
);
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/impl/DCustomerServiceImpl.java
View file @
3ad08473
package
com
.
dsk
.
cscec
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.dsk.common.core.domain.PageQuery
;
import
com.dsk.common.core.page.TableDataInfo
;
...
...
@@ -8,6 +10,10 @@ import com.dsk.cscec.mapper.DCustomerMapper;
import
com.dsk.cscec.domain.DCustomer
;
import
com.dsk.cscec.service.IDCustomerService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 组织维表(DCustomer)表服务实现类
...
...
@@ -20,7 +26,52 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
@Override
public
TableDataInfo
<
DCustomer
>
allSearchList
(
DCustomerSearchBo
bo
,
PageQuery
query
)
{
return
TableDataInfo
.
build
(
baseMapper
.
allSearchList
(
query
.
build
(),
bo
));
dealWithCustomerClass
(
bo
);
Page
<
DCustomer
>
page
=
baseMapper
.
allSearchList
(
query
.
build
(),
bo
);
if
(
CollectionUtils
.
isNotEmpty
(
page
.
getRecords
()))
{
for
(
DCustomer
customer
:
page
.
getRecords
())
{
}
}
return
TableDataInfo
.
build
(
page
);
}
@Override
public
DCustomer
info
(
String
customerKey
)
{
return
baseMapper
.
selectById
(
customerKey
);
}
private
void
dealWithCustomerClass
(
DCustomerSearchBo
bo
)
{
if
(!
ObjectUtils
.
isEmpty
(
bo
.
getCustomerClass
()))
{
List
<
String
>
list
=
new
ArrayList
<>();
Integer
isTeam
=
null
;
for
(
String
customerClass
:
bo
.
getCustomerClass
())
{
switch
(
customerClass
){
case
"专业分包"
:
list
.
add
(
"专业分包"
);
break
;
case
"物资设备"
:
list
.
add
(
"分供"
);
break
;
case
"施工机械"
:
list
.
add
(
"租赁"
);
break
;
case
"劳务分包"
:
if
(
isTeam
==
null
)
isTeam
=
0
;
list
.
add
(
"劳务分包"
);
break
;
case
"劳务队伍"
:
if
(
isTeam
==
null
)
isTeam
=
1
;
list
.
add
(
"劳务分包"
);
break
;
default
:
break
;
}
}
bo
.
setCustomerClass
(
list
);
bo
.
setIsTeam
(
isTeam
);
}
}
}
dsk-module/dsk-biz-api/src/main/resources/mapper/cscec/DCustomerMapper.xml
View file @
3ad08473
...
...
@@ -6,13 +6,58 @@
<select
id=
"allSearchList"
resultType=
"com.dsk.cscec.domain.DCustomer"
>
select
customer_
code, customer_name, recommend_org, register_region, register_province, register_city, customer_class, primary_business, paytax_type, tax_rate
,
customer_state, leader_name, labor_captain_phone, labor_captain_idcard, service_team_personnum, service_team_speciality, construct_job_scope, credential
,
register_capital, contact_person, contact_phone, approve_date2, credit_level
customer_
key, customer_id, customer_code, customer_name, recommend_org, register_region, register_province, register_city, customer_class, primary_business
,
paytax_type, tax_rate, customer_state, leader_name, labor_captain_phone, labor_captain_idcard, service_team_personnum, service_team_speciality
,
construct_job_scope, credential,
register_capital, contact_person, contact_phone, approve_date2, credit_level
from d_customer
where recommend_org_id = 'F17305B4EA4444CBAB12892C7B99E475'
<if
test=
"bo.customerName != null and bo.customerName != '' "
>
and customer_name like concat('%',#{bo.customerName},'%')
</if>
order by approve_date2 desc
<if
test=
"bo.region != null and bo.region != '' "
>
and register_region in
<foreach
collection=
"region"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"bo.province != null and bo.province != '' "
>
and register_province in
<foreach
collection=
"province"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"bo.city != null and bo.city != '' "
>
and register_city in
<foreach
collection=
"city"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"bo.customerClass != null and bo.customerClass != '' "
>
and customer_class in
<foreach
collection=
"customerClass"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"bo.customerState != null and bo.customerState != '' "
>
and customer_state in
<foreach
collection=
"customerState"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"bo.creditLevel != null and bo.creditLevel != '' "
>
and credit_level in
<foreach
collection=
"creditLevel"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"bo.credential != null and bo.credential != '' "
>
and credential in
<foreach
collection=
"credential"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"bo.approveDateBegion != null and bo.approveDateBegion != '' "
>
and approve_date2
>
= #{bo.approveDateBegion}
</if>
<if
test=
"bo.approveDateEnd != null and bo.approveDateEnd != '' "
>
and approve_date2
<
= #{bo.approveDateBegion}
</if>
<if
test=
"bo.isTeam != null"
>
and leader_name is
<if
test=
"bo.isTeam == 0"
>
not
</if>
null
</if>
order by approve_date2 desc
</select>
</mapper>
\ No newline at end of file
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