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
770d858c
Commit
770d858c
authored
Jul 31, 2023
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标红
parent
563d64b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
13 deletions
+31
-13
StringUtils.java
...ommon/src/main/java/com/dsk/common/utils/StringUtils.java
+5
-0
BusinessInfoServiceImpl.java
.../com/dsk/system/service/impl/BusinessInfoServiceImpl.java
+11
-5
CustomerServiceImpl.java
...java/com/dsk/system/service/impl/CustomerServiceImpl.java
+15
-8
No files found.
dsk-common/src/main/java/com/dsk/common/utils/StringUtils.java
View file @
770d858c
...
...
@@ -612,4 +612,9 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
}
return
sb
.
toString
();
}
//字符串标红
public
static
String
markInRed
(
String
oldStr
,
String
str
)
{
return
oldStr
.
replace
(
str
,
"<font color='#FF204E'>"
+
str
+
"</font>"
);
}
}
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessInfoServiceImpl.java
View file @
770d858c
...
...
@@ -94,10 +94,17 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
public
List
<
BusinessListVo
>
selectBusinessInfoList
(
BusinessListDto
dto
)
{
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
dto
.
setUserId
(
user
.
getUserId
());
if
(
user
.
getIsExperience
()
==
1
)
{
if
(
user
.
getIsExperience
()
==
1
)
{
dto
.
setIsPrivate
(
1
);
}
return
businessInfoMapper
.
selectBusinessInfoList
(
dto
);
List
<
BusinessListVo
>
businessListVos
=
businessInfoMapper
.
selectBusinessInfoList
(
dto
);
if
(!
CollectionUtils
.
isEmpty
(
businessListVos
)
&&
ObjectUtil
.
isNotEmpty
(
dto
.
getProjectName
()))
{
for
(
BusinessListVo
vo
:
businessListVos
)
{
vo
.
setProjectName
(
StringUtils
.
markInRed
(
vo
.
getProjectName
(),
dto
.
getProjectName
()));
vo
.
setOwnerCompany
(
StringUtils
.
markInRed
(
vo
.
getOwnerCompany
(),
dto
.
getProjectName
()));
}
}
return
businessListVos
;
}
@Override
...
...
@@ -139,7 +146,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
for
(
Map
<
String
,
Object
>
map
:
list
)
{
BusinessLikeProjectNameListVo
vo
=
new
BusinessLikeProjectNameListVo
();
vo
.
setProjectName
(
MapUtil
.
getStr
(
map
,
"projectName"
).
replace
(
dto
.
getProjectName
(),
"<font color='#FF204E'>"
+
dto
.
getProjectName
()
+
"</font>"
));
vo
.
setProjectName
(
StringUtils
.
markInRed
(
MapUtil
.
getStr
(
map
,
"projectName"
),
dto
.
getProjectName
()
));
vo
.
setCompanyName
(
MapUtil
.
getStr
(
map
,
"tenderee"
));
vo
.
setInvestmentAmount
(
Double
.
parseDouble
(
MapUtil
.
getStr
(
map
,
"projectContractAmount"
)));
vo
.
setProjectType
(
MapUtil
.
getStr
(
map
,
"projectType"
));
...
...
@@ -148,7 +155,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"模糊查询项目名称调用失败!"
);
}
...
...
@@ -414,7 +421,6 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
return
map
;
}
private
BusinessRelateCompany
dealwithCustomer
(
BusinessInfo
bean
)
{
BusinessRelateCompany
relateCompany
=
new
BusinessRelateCompany
();
relateCompany
.
setBusinessId
(
bean
.
getId
());
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/CustomerServiceImpl.java
View file @
770d858c
...
...
@@ -26,6 +26,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
javax.annotation.Resource
;
...
...
@@ -59,7 +60,13 @@ public class CustomerServiceImpl implements ICustomerService {
public
List
<
CustomerListVo
>
selectList
(
CustomerSearchDto
dto
)
{
dto
.
setUserId
(
SecurityUtils
.
getUserId
());
dto
.
setStatus
(
ObjectUtils
.
isEmpty
(
dto
.
getStatus
())
?
0
:
dto
.
getStatus
());
return
baseMapper
.
selectList
(
dto
);
List
<
CustomerListVo
>
customerListVos
=
baseMapper
.
selectList
(
dto
);
if
(!
CollectionUtils
.
isEmpty
(
customerListVos
)
&&
ObjectUtil
.
isNotEmpty
(
dto
.
getCompanyName
()))
{
for
(
CustomerListVo
vo
:
customerListVos
)
{
vo
.
setCompanyName
(
StringUtils
.
markInRed
(
vo
.
getCompanyName
(),
dto
.
getCompanyName
()));
}
}
return
customerListVos
;
}
@Override
...
...
@@ -78,14 +85,14 @@ public class CustomerServiceImpl implements ICustomerService {
dealWithcustomerData
(
customer
);
if
(
ObjectUtils
.
isEmpty
(
customer
.
getUipId
()))
{
try
{
List
<
Integer
>
list
=
new
ArrayList
<>();
List
<
Integer
>
list
=
new
ArrayList
<>();
list
.
add
(
customer
.
getCompanyId
());
R
res
=
enterpriseService
.
getUipIdByCid
(
list
);
if
(!
ObjectUtils
.
isEmpty
(
res
.
getData
())){
List
<
Map
<
String
,
Object
>>
data
=
(
List
<
Map
<
String
,
Object
>>)
res
.
getData
();
if
(!
ObjectUtils
.
isEmpty
(
res
.
getData
()))
{
List
<
Map
<
String
,
Object
>>
data
=
(
List
<
Map
<
String
,
Object
>>)
res
.
getData
();
customer
.
setUipId
(
MapUtil
.
getStr
(
BeanUtil
.
beanToMap
(
data
.
get
((
0
))),
"uipId"
));
}
if
(
ObjectUtils
.
isEmpty
(
customer
.
getUipId
()))
{
if
(
ObjectUtils
.
isEmpty
(
customer
.
getUipId
()))
{
res
=
enterpriseService
.
getUipId
(
customer
.
getCompanyName
());
if
(!
ObjectUtils
.
isEmpty
(
res
.
getData
()))
{
customer
.
setUipId
(
MapUtil
.
getStr
(
BeanUtil
.
beanToMap
(
res
.
getData
()),
"uipId"
));
...
...
@@ -199,7 +206,7 @@ public class CustomerServiceImpl implements ICustomerService {
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"data"
)))
{
Map
<
String
,
Object
>
data
=
BeanUtil
.
beanToMap
(
map
.
get
(
"data"
));
Integer
companyId
=
MapUtil
.
getInt
(
data
,
"jskEid"
);
if
(
ObjectUtil
.
isNotEmpty
(
customer
.
getCompanyId
())
&&
!
customer
.
getCompanyId
().
equals
(
companyId
))
{
if
(
ObjectUtil
.
isNotEmpty
(
customer
.
getCompanyId
())
&&
!
customer
.
getCompanyId
().
equals
(
companyId
))
{
return
;
}
customer
.
setCompanyId
(
companyId
);
...
...
@@ -219,9 +226,9 @@ public class CustomerServiceImpl implements ICustomerService {
customer
.
setDistrictId
(
MapUtil
.
getInt
(
data
,
"countyId"
));
}
if
(
ObjectUtils
.
isEmpty
(
customer
.
getRegisterAddress
()))
{
if
(
ObjectUtil
.
isNotEmpty
(
MapUtil
.
getStr
(
data
,
"domicile"
)))
{
if
(
ObjectUtil
.
isNotEmpty
(
MapUtil
.
getStr
(
data
,
"domicile"
)))
{
customer
.
setRegisterAddress
(
MapUtil
.
getStr
(
data
,
"domicile"
));
}
else
{
}
else
{
String
address
=
null
;
if
(
ObjectUtils
.
isEmpty
(
MapUtil
.
getStr
(
data
,
"province"
)))
{
address
=
MapUtil
.
getStr
(
data
,
"province"
);
...
...
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