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
523251bb
Commit
523251bb
authored
Dec 26, 2023
by
chenyuefang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
内部合作统计
parent
a78281c3
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
121 additions
and
0 deletions
+121
-0
AdvisoryBodyMapper.java
...rc/main/java/com/dsk/cscec/mapper/AdvisoryBodyMapper.java
+7
-0
DSubcontractMapper.java
...rc/main/java/com/dsk/cscec/mapper/DSubcontractMapper.java
+7
-0
ICustomerInfoService.java
...main/java/com/dsk/cscec/service/ICustomerInfoService.java
+26
-0
CustomerInfoServiceImpl.java
...a/com/dsk/cscec/service/impl/CustomerInfoServiceImpl.java
+28
-0
EnterpriseStatisticBody.java
...main/java/com/dsk/jsk/domain/EnterpriseStatisticBody.java
+1
-0
EnterpriseService.java
.../src/main/java/com/dsk/jsk/service/EnterpriseService.java
+8
-0
AdvisoryBodyMapper.xml
...pi/src/main/resources/mapper/cscec/AdvisoryBodyMapper.xml
+24
-0
DSubcontractMapper.xml
...pi/src/main/resources/mapper/cscec/DSubcontractMapper.xml
+20
-0
No files found.
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/mapper/AdvisoryBodyMapper.java
View file @
523251bb
...
...
@@ -33,6 +33,13 @@ public interface AdvisoryBodyMapper extends BaseMapper<AdvisoryBody> {
*/
Page
<
AdvisoryBodyVo
>
queryListByBo
(
IPage
<
AdvisoryBodyBo
>
build
,
@Param
(
"bo"
)
AdvisoryBodyBo
bo
);
/**
* 咨询机构合作记录数量
* @param bo
* @return
*/
int
countByBo
(
@Param
(
"bo"
)
AdvisoryBodyBo
bo
);
/**
* 根据咨询机构名称查询咨询机构Cids
* @param advisoryBodyName 咨询机构名称
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/mapper/DSubcontractMapper.java
View file @
523251bb
...
...
@@ -31,5 +31,12 @@ public interface DSubcontractMapper extends BaseMapper<DSubcontract> {
* @return
*/
Page
<
CustomerCooperationVo
>
selectCooperationList
(
IPage
<
CustomerCooperationBo
>
build
,
@Param
(
"bo"
)
CustomerCooperationBo
bo
);
/**
* 供应商合作记录数量
* @param bo
* @return
*/
int
countByBo
(
@Param
(
"bo"
)
CustomerCooperationBo
bo
);
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/ICustomerInfoService.java
View file @
523251bb
...
...
@@ -12,6 +12,8 @@ import com.dsk.cscec.domain.vo.CustomerApproveVo;
import
com.dsk.cscec.domain.vo.CustomerCooperationVo
;
import
com.dsk.cscec.domain.vo.CustomerInfoVo
;
import
java.util.Map
;
/**
* 组织维表(DCustomer)表服务接口
*
...
...
@@ -20,10 +22,27 @@ import com.dsk.cscec.domain.vo.CustomerInfoVo;
*/
public
interface
ICustomerInfoService
extends
IService
<
DCustomer
>
{
/**
* 供应商分类列表
* @param bo
* @param query
* @return
*/
TableDataInfo
<
CustomerInfoVo
>
queryPageList
(
CustomerInfoBo
bo
,
PageQuery
query
);
/**
* 供应商准入情况
* @param bo
* @return
*/
CustomerApproveVo
queryApproveByBo
(
CustomerInfoBo
bo
);
/**
* 咨询机构合作记录
* @param bo
* @param query
* @return
*/
TableDataInfo
<
AdvisoryBodyVo
>
queryAdvisoryList
(
AdvisoryBodyBo
bo
,
PageQuery
query
);
/**
...
...
@@ -33,4 +52,11 @@ public interface ICustomerInfoService extends IService<DCustomer> {
* @return
*/
TableDataInfo
<
CustomerCooperationVo
>
queryCooperationList
(
CustomerCooperationBo
bo
,
PageQuery
query
);
/**
* 内部合作统计
* @param companyName
* @return
*/
Map
<
String
,
Object
>
cooperationStatistic
(
String
companyName
);
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/impl/CustomerInfoServiceImpl.java
View file @
523251bb
...
...
@@ -28,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
...
...
@@ -97,6 +98,7 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
Assert
.
isTrue
(
false
,
"参数不能为空"
);
}
LambdaQueryWrapper
<
DCustomer
>
lqw
=
Wrappers
.
lambdaQuery
();
lqw
.
eq
(
DCustomer:
:
getRecommendOrgId
,
QueryConstants
.
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
());
...
...
@@ -123,4 +125,30 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
Page
<
CustomerCooperationVo
>
page
=
dSubcontractMapper
.
selectCooperationList
(
query
.
build
(),
bo
);
return
TableDataInfo
.
build
(
page
);
}
@Override
public
Map
<
String
,
Object
>
cooperationStatistic
(
String
companyName
)
{
if
(
StringUtil
.
isBlank
(
companyName
))
{
return
new
HashMap
<>();
}
AdvisoryBodyBo
advisoryBodyBo
=
new
AdvisoryBodyBo
();
advisoryBodyBo
.
setContractOrgId
(
QueryConstants
.
LEVEL1_COMPANY_ID
);
advisoryBodyBo
.
setAdvisoryBodyName
(
companyName
);
LambdaQueryWrapper
<
DCustomer
>
lqw
=
Wrappers
.
lambdaQuery
();
lqw
.
eq
(
DCustomer:
:
getRecommendOrgId
,
QueryConstants
.
LEVEL1_COMPANY_ID
);
lqw
.
eq
(
StringUtil
.
isNotBlank
(
companyName
),
DCustomer:
:
getCustomerName
,
companyName
);
CustomerCooperationBo
customerCooperationBo
=
new
CustomerCooperationBo
();
customerCooperationBo
.
setSignOrgId
(
QueryConstants
.
LEVEL1_COMPANY_ID
);
customerCooperationBo
.
setCustomerName
(
companyName
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"advisoryList"
,
advisoryBodyMapper
.
countByBo
(
advisoryBodyBo
));
result
.
put
(
"cooperationList"
,
subcontractMapper
.
countByBo
(
customerCooperationBo
));
result
.
put
(
"approveInfo"
,
baseMapper
.
exists
(
lqw
)
?
1
:
0
);
// result.put("施工业绩", 0);
// result.put("在施工程情况", 0);
return
result
;
}
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/jsk/domain/EnterpriseStatisticBody.java
View file @
523251bb
...
...
@@ -18,6 +18,7 @@ public class EnterpriseStatisticBody
*/
@NotNull
(
message
=
"企业id不能为空"
)
private
Integer
companyId
;
private
String
companyName
;
private
Boolean
isFy
=
false
;
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/jsk/service/EnterpriseService.java
View file @
523251bb
...
...
@@ -8,6 +8,7 @@ import com.dsk.common.core.domain.R;
import
com.dsk.common.core.page.TableDataInfo
;
import
com.dsk.common.utils.EncodeIdUtil
;
import
com.dsk.common.utils.redis.RedisUtils
;
import
com.dsk.cscec.service.ICustomerInfoService
;
import
com.dsk.jsk.domain.*
;
import
com.dsk.system.utils.DskOpenApiUtil
;
import
org.apache.commons.collections4.CollectionUtils
;
...
...
@@ -39,6 +40,9 @@ public class EnterpriseService {
@Autowired
private
DskOpenApiUtil
dskOpenApiUtil
;
@Autowired
private
ICustomerInfoService
iCustomerInfoService
;
public
R
label
(
EnterpriseInfoLabelBody
body
)
throws
Exception
{
List
<
Map
<
String
,
Object
>>
mapList
=
new
ArrayList
<>();
if
(
body
.
isVaildCid
())
{
...
...
@@ -104,6 +108,10 @@ public class EnterpriseService {
Map
statisticMapData
=
MapUtils
.
getMap
(
statisticMap
,
"data"
,
null
);
if
(
MapUtils
.
isEmpty
(
statisticMapData
))
return
R
.
ok
();
//内部合作
Map
<
String
,
Object
>
cooperation
=
iCustomerInfoService
.
cooperationStatistic
(
body
.
getCompanyName
());
statisticMapData
.
put
(
"cooperation"
,
cooperation
);
Map
performance
=
MapUtils
.
getMap
(
statisticMapData
,
"performance"
);
Map
business
=
MapUtils
.
getMap
(
statisticMapData
,
"business"
);
...
...
dsk-module/dsk-biz-api/src/main/resources/mapper/cscec/AdvisoryBodyMapper.xml
View file @
523251bb
...
...
@@ -61,6 +61,30 @@
order by dp.contract_sign_date desc
</select>
<select
id=
"countByBo"
resultType=
"int"
>
select count(1)
from advisory_body_project abp
left join advisory_body ab on ab.advisory_body_id = abp.advisory_body_id
left join d_project dp on dp.project_key = abp.project_key
<where>
<if
test=
"bo.advisoryBodyId != null and bo.advisoryBodyId != ''"
>
and ab.advisory_body_id = #{bo.advisoryBodyId}
</if>
<if
test=
"bo.advisoryBodyCid != null and bo.advisoryBodyCid != ''"
>
and ab.advisory_body_cid = #{bo.advisoryBodyCid}
</if>
<if
test=
"bo.advisoryBodyName != null and bo.advisoryBodyName != ''"
>
and ab.advisory_body_name = #{bo.advisoryBodyName}
</if>
<if
test=
"bo.contractOrgId != null and bo.contractOrgId != ''"
>
and dp.contract_org_id = #{bo.contractOrgId}
</if>
<if
test=
"bo.contractOrgName != null and bo.contractOrgName != ''"
>
and dp.contract_org_name = #{bo.contractOrgName}
</if>
</where>
</select>
<select
id=
"selectAdvisoryBodyCidsByName"
resultType=
"java.lang.Long"
>
select
ab.advisory_body_cid
...
...
dsk-module/dsk-biz-api/src/main/resources/mapper/cscec/DSubcontractMapper.xml
View file @
523251bb
...
...
@@ -71,4 +71,24 @@
</where>
order by ds.sign_date desc
</select>
<select
id=
"countByBo"
resultType=
"int"
>
select count (1)
from d_subcontract ds
left join d_project dp on dp.project_id = ds.project_id
<where>
<if
test=
"bo.signOrgId != null and bo.signOrgId != ''"
>
and ds.sign_org_id =#{bo.signOrgId}
</if>
<if
test=
"bo.signOrgName != null and bo.signOrgName != ''"
>
and ds.sign_org_name =#{bo.signOrgName}
</if>
<if
test=
"bo.customerId != null and bo.customerId != ''"
>
and ds.customer_id =#{bo.customerId}
</if>
<if
test=
"bo.customerName != null and bo.customerName != ''"
>
and ds.customer_name =#{bo.customerName}
</if>
</where>
</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