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
3a23b76e
Commit
3a23b76e
authored
May 15, 2024
by
施翔轲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询供应商基本情况
parent
316ddee6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
18 deletions
+66
-18
CustomerInfoController.java
...java/com/dsk/cscec/controller/CustomerInfoController.java
+8
-2
ICustomerInfoService.java
...main/java/com/dsk/cscec/service/ICustomerInfoService.java
+5
-0
CustomerInfoServiceImpl.java
...a/com/dsk/cscec/service/impl/CustomerInfoServiceImpl.java
+53
-16
No files found.
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/controller/CustomerInfoController.java
View file @
3a23b76e
...
...
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
/**
* 供应商相关
...
...
@@ -78,7 +79,12 @@ public class CustomerInfoController extends BaseController {
return
iCustomerInfoService
.
queryCooperationList
(
bo
,
query
);
}
/**
* 查询供应商基本情况
*/
@GetMapping
(
"/queryBasicInfo"
)
public
R
<
Map
<
String
,
Long
>>
queryBasicInfo
()
{
return
R
.
ok
(
iCustomerInfoService
.
queryBasicInfo
());
}
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/ICustomerInfoService.java
View file @
3a23b76e
...
...
@@ -59,4 +59,9 @@ public interface ICustomerInfoService extends IService<DCustomer> {
* @return
*/
Map
<
String
,
Object
>
cooperationStatistic
(
String
companyName
);
/**
* 查询供应商基本情况
*/
Map
<
String
,
Long
>
queryBasicInfo
();
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/impl/CustomerInfoServiceImpl.java
View file @
3a23b76e
...
...
@@ -54,23 +54,23 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
@Override
public
TableDataInfo
<
CustomerInfoVo
>
queryPageList
(
CustomerInfoBo
bo
,
PageQuery
query
)
{
if
(
"劳务分包"
.
equals
(
bo
.
getCustomerClass
()))
{
if
(
"劳务分包"
.
equals
(
bo
.
getCustomerClass
()))
{
bo
.
setServiceTeamLogo
(
"N"
);
}
if
(
"劳务分包队伍"
.
equals
(
bo
.
getCustomerClass
()))
{
if
(
"劳务分包队伍"
.
equals
(
bo
.
getCustomerClass
()))
{
bo
.
setCustomerClass
(
"劳务分包"
);
bo
.
setServiceTeamLogo
(
"Y"
);
}
Page
<
CustomerInfoVo
>
page
=
baseMapper
.
queryListByType
(
query
.
build
(),
bo
);
if
(
CollectionUtils
.
isNotEmpty
(
page
.
getRecords
()))
{
page
.
getRecords
().
parallelStream
().
forEach
(
item
->
{
page
.
getRecords
().
parallelStream
().
forEach
(
item
->
{
DCustomerListVo
vo
=
subcontractMapper
.
selectStatisticByCustomerId
(
item
.
getCustomerId
());
//企业合作数量
item
.
setEnterpriseCooperationCount
(
vo
.
getEnterpriseCooperationCount
());
//项目合作数量
item
.
setProjectCooperationCount
(
vo
.
getProjectCooperationCount
());
//关键字标红
if
(!
ObjectUtils
.
isEmpty
(
bo
.
getCustomerName
()))
{
if
(!
ObjectUtils
.
isEmpty
(
bo
.
getCustomerName
()))
{
item
.
setCustomerName
(
StringUtils
.
markInRed
(
item
.
getCustomerName
(),
bo
.
getCustomerName
()));
}
try
{
...
...
@@ -80,11 +80,11 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
Integer
companyId
=
MapUtil
.
getInt
(
data
,
"jskEid"
);
item
.
setCompanyId
(
companyId
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"CustomerInfoServiceImpl.queryPageList() error:"
+
e
);
}
//关键字标红
if
(!
ObjectUtils
.
isEmpty
(
bo
.
getLeaderName
()))
{
if
(!
ObjectUtils
.
isEmpty
(
bo
.
getLeaderName
()))
{
item
.
setCustomerName
(
StringUtils
.
markInRed
(
item
.
getLeaderName
(),
bo
.
getLeaderName
()));
}
});
...
...
@@ -94,18 +94,18 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
@Override
public
CustomerApproveVo
queryApproveByBo
(
CustomerInfoBo
bo
)
{
if
(
ObjectUtil
.
isNull
(
bo
.
getCustomerKey
())
&&
StringUtil
.
isBlank
(
bo
.
getCustomerName
())
&&
StringUtil
.
isBlank
(
bo
.
getUnifySocialCode
()))
{
Assert
.
isTrue
(
false
,
"参数不能为空"
);
if
(
ObjectUtil
.
isNull
(
bo
.
getCustomerKey
())
&&
StringUtil
.
isBlank
(
bo
.
getCustomerName
())
&&
StringUtil
.
isBlank
(
bo
.
getUnifySocialCode
()))
{
Assert
.
isTrue
(
false
,
"参数不能为空"
);
}
LambdaQueryWrapper
<
DCustomer
>
lqw
=
Wrappers
.
lambdaQuery
();
lqw
.
eq
(
DCustomer:
:
getRecommendOrgId
,
AdvisoryBodyManageQueryConstants
.
LEVEL1_COMPANY_ID
);
lqw
.
eq
(
ObjectUtil
.
isNotNull
(
bo
.
getCustomerKey
()),
DCustomer:
:
getCustomerKey
,
bo
.
getCustomerKey
());
lqw
.
eq
(
StringUtil
.
isNotBlank
(
bo
.
getUnifySocialCode
()),
DCustomer:
:
getUnifySocialCode
,
bo
.
getUnifySocialCode
());
lqw
.
eq
(
StringUtil
.
isNotBlank
(
bo
.
getCustomerName
()),
DCustomer:
:
getCustomerName
,
bo
.
getCustomerName
());
lqw
.
eq
(
ObjectUtil
.
isNotNull
(
bo
.
getCustomerKey
()),
DCustomer:
:
getCustomerKey
,
bo
.
getCustomerKey
());
lqw
.
eq
(
StringUtil
.
isNotBlank
(
bo
.
getUnifySocialCode
()),
DCustomer:
:
getUnifySocialCode
,
bo
.
getUnifySocialCode
());
lqw
.
eq
(
StringUtil
.
isNotBlank
(
bo
.
getCustomerName
()),
DCustomer:
:
getCustomerName
,
bo
.
getCustomerName
());
lqw
.
orderByDesc
(
DCustomer:
:
getApproveDate2
);
lqw
.
last
(
"limit 1"
);
DCustomer
dCustomer
=
baseMapper
.
selectOne
(
lqw
);
if
(
ObjectUtil
.
isNotEmpty
(
dCustomer
))
{
if
(
ObjectUtil
.
isNotEmpty
(
dCustomer
))
{
//营业执照url
dCustomer
.
setBusinessLicenseList
(
baseMapper
.
selectBusinessLicense
(
dCustomer
.
getCustomerId
()));
//组织机构代码证url
...
...
@@ -133,7 +133,7 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
@Override
public
TableDataInfo
<
AdvisoryBodyVo
>
queryAdvisoryList
(
AdvisoryBodyBo
bo
,
PageQuery
query
)
{
bo
.
setContractOrgId
(
AdvisoryBodyManageQueryConstants
.
LEVEL1_COMPANY_ID
);
Page
<
AdvisoryBodyVo
>
page
=
advisoryBodyMapper
.
queryListByBo
(
query
.
build
(),
bo
);
Page
<
AdvisoryBodyVo
>
page
=
advisoryBodyMapper
.
queryListByBo
(
query
.
build
(),
bo
);
page
.
getRecords
().
parallelStream
().
forEach
(
vo
->
{
try
{
Map
<
String
,
Object
>
map
=
opportunityRadarService
.
enterpriseByName
(
vo
.
getOwnerName
());
...
...
@@ -157,11 +157,11 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
@Override
public
TableDataInfo
<
CustomerCooperationVo
>
queryCooperationList
(
CustomerCooperationBo
bo
,
PageQuery
query
)
{
if
(
StringUtil
.
isBlank
(
bo
.
getCustomerId
())
&&
StringUtil
.
isBlank
(
bo
.
getCustomerName
()))
{
Assert
.
isTrue
(
false
,
"供应商不能为空"
);
if
(
StringUtil
.
isBlank
(
bo
.
getCustomerId
())
&&
StringUtil
.
isBlank
(
bo
.
getCustomerName
()))
{
Assert
.
isTrue
(
false
,
"供应商不能为空"
);
}
bo
.
setSignOrgId
(
AdvisoryBodyManageQueryConstants
.
LEVEL1_COMPANY_ID
);
Page
<
CustomerCooperationVo
>
page
=
dSubcontractMapper
.
selectCooperationList
(
query
.
build
(),
bo
);
Page
<
CustomerCooperationVo
>
page
=
dSubcontractMapper
.
selectCooperationList
(
query
.
build
(),
bo
);
return
TableDataInfo
.
build
(
page
);
}
...
...
@@ -190,4 +190,41 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
// result.put("在施工程情况", 0);
return
result
;
}
/**
* 查询供应商基本情况
*/
@Override
public
Map
<
String
,
Long
>
queryBasicInfo
()
{
HashMap
<
String
,
Long
>
infoMap
=
new
HashMap
<>();
//专业分包数量
Long
zyfbCount
=
baseMapper
.
selectCount
(
new
LambdaQueryWrapper
<
DCustomer
>()
.
eq
(
DCustomer:
:
getRecommendOrgId
,
"F17305B4EA4444CBAB12892C7B99E475"
)
.
eq
(
DCustomer:
:
getCustomerClass
,
"专业分包"
));
//机械施工数量
Long
jxsgCount
=
baseMapper
.
selectCount
(
new
LambdaQueryWrapper
<
DCustomer
>()
.
eq
(
DCustomer:
:
getRecommendOrgId
,
"F17305B4EA4444CBAB12892C7B99E475"
)
.
eq
(
DCustomer:
:
getCustomerClass
,
"租赁"
));
//物资设备数量
Long
wzsbCount
=
baseMapper
.
selectCount
(
new
LambdaQueryWrapper
<
DCustomer
>()
.
eq
(
DCustomer:
:
getRecommendOrgId
,
"F17305B4EA4444CBAB12892C7B99E475"
)
.
eq
(
DCustomer:
:
getCustomerClass
,
"分供"
));
//劳务分包数量
Long
lwfbCount
=
baseMapper
.
selectCount
(
new
LambdaQueryWrapper
<
DCustomer
>()
.
eq
(
DCustomer:
:
getRecommendOrgId
,
"F17305B4EA4444CBAB12892C7B99E475"
)
.
eq
(
DCustomer:
:
getCustomerClass
,
"劳务分包"
)
.
eq
(
DCustomer:
:
getServiceTeamLogo
,
"N"
));
//劳务分包队伍数量
Long
lwfbdwCount
=
baseMapper
.
selectCount
(
new
LambdaQueryWrapper
<
DCustomer
>()
.
eq
(
DCustomer:
:
getRecommendOrgId
,
"F17305B4EA4444CBAB12892C7B99E475"
)
.
eq
(
DCustomer:
:
getCustomerClass
,
"劳务分包"
)
.
eq
(
DCustomer:
:
getServiceTeamLogo
,
"Y"
));
infoMap
.
put
(
"customerTotal"
,
zyfbCount
+
jxsgCount
+
wzsbCount
+
lwfbCount
+
lwfbdwCount
);
infoMap
.
put
(
"zyfbCount"
,
zyfbCount
);
infoMap
.
put
(
"jxsgCount"
,
jxsgCount
);
infoMap
.
put
(
"wzsbCount"
,
wzsbCount
);
infoMap
.
put
(
"lwfbCount"
,
lwfbCount
);
infoMap
.
put
(
"lwfbdwCount"
,
lwfbdwCount
);
return
infoMap
;
}
}
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