Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
64f063bf
Commit
64f063bf
authored
Nov 15, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充客户列表最新跟进记录信息
parent
dc53642f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
1 deletion
+46
-1
OfferRespVO.java
...va/cn/iocoder/yudao/module/sale/vo/offer/OfferRespVO.java
+6
-0
OfferController.java
...o/module/sale/controller/admin/offer/OfferController.java
+40
-1
No files found.
yudao-module-sale/yudao-module-sale-core/src/main/java/cn/iocoder/yudao/module/sale/vo/offer/OfferRespVO.java
View file @
64f063bf
package
cn
.
iocoder
.
yudao
.
module
.
sale
.
vo
.
offer
;
import
cn.iocoder.yudao.module.customer.vo.customerFollowup.CustomerFollowupBackVO
;
import
cn.iocoder.yudao.module.depository.dto.LogisticsInfoDto
;
import
cn.iocoder.yudao.module.sale.vo.offer.prod.OfferProdRespVO
;
import
cn.iocoder.yudao.module.sale.vo.offer.transport.OfferTransportCreateReqVO
;
import
cn.iocoder.yudao.module.sale.vo.offer.transport.OfferTransportRespVO
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.*
;
...
...
@@ -90,4 +92,8 @@ public class OfferRespVO extends OfferBaseVO {
@ApiModelProperty
(
value
=
"业务员名称-客户经理"
)
private
String
businessManagerName
;
@ApiModelProperty
(
"最新跟进记录信息"
)
@TableField
(
exist
=
false
)
private
CustomerFollowupBackVO
followupBackVO
;
}
yudao-module-sale/yudao-module-sale-rest/src/main/java/cn/iocoder/yudao/module/sale/controller/admin/offer/OfferController.java
View file @
64f063bf
...
...
@@ -2,8 +2,13 @@ package cn.iocoder.yudao.module.sale.controller.admin.offer;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.framework.security.core.LoginUser
;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
import
cn.iocoder.yudao.module.customer.convert.customerFollowup.CustomerFollowupConvert
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO
;
import
cn.iocoder.yudao.module.customer.service.customerFollowup.CustomerFollowupService
;
import
cn.iocoder.yudao.module.customer.vo.customer.vo.CustomerRespVO
;
import
cn.iocoder.yudao.module.sale.dal.dataobject.offer.OfferDO
;
import
cn.iocoder.yudao.module.sale.vo.offer.*
;
import
cn.iocoder.yudao.module.sale.vo.offerApproval.OfferApprovalBackInfoVO
;
...
...
@@ -49,7 +54,8 @@ public class OfferController {
private
OfferService
offerService
;
@Resource
private
RoleApi
roleApi
;
@Resource
private
CustomerFollowupService
customerFollowupService
;
@PostMapping
(
"/create"
)
@ApiOperation
(
"创建报价单管理"
)
...
...
@@ -179,6 +185,17 @@ public class OfferController {
// @PreAuthorize("@ss.hasPermission('ecw:offer:query')")
public
CommonResult
<
PageResult
<
OfferRespVO
>>
getOfferPage
(
@Valid
OfferPageReqVO
pageVO
)
{
PageResult
<
OfferRespVO
>
pageResult
=
offerService
.
offerPage
(
pageVO
);
if
(
CollectionUtil
.
isNotEmpty
(
pageResult
.
getList
()))
{
for
(
OfferRespVO
respVO
:
pageResult
.
getList
())
{
CustomerFollowupDO
customerFollowupDO
=
customerFollowupService
.
getOne
(
new
LambdaQueryWrapperX
<
CustomerFollowupDO
>()
.
eq
(
CustomerFollowupDO:
:
getOfferId
,
respVO
.
getOfferId
())
.
orderByDesc
(
CustomerFollowupDO:
:
getId
)
.
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
customerFollowupDO
))
{
respVO
.
setFollowupBackVO
(
CustomerFollowupConvert
.
INSTANCE
.
convert
(
customerFollowupDO
));
}
}
}
return
success
(
pageResult
);
}
...
...
@@ -200,6 +217,17 @@ public class OfferController {
}
addDataScopeQuery
(
pageVO
,
loginUser
,
roleRespDTOS
);
PageResult
<
OfferRespVO
>
pageResult
=
offerService
.
offerPage
(
pageVO
);
if
(
CollectionUtil
.
isNotEmpty
(
pageResult
.
getList
()))
{
for
(
OfferRespVO
respVO
:
pageResult
.
getList
())
{
CustomerFollowupDO
customerFollowupDO
=
customerFollowupService
.
getOne
(
new
LambdaQueryWrapperX
<
CustomerFollowupDO
>()
.
eq
(
CustomerFollowupDO:
:
getOfferId
,
respVO
.
getOfferId
())
.
orderByDesc
(
CustomerFollowupDO:
:
getId
)
.
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
customerFollowupDO
))
{
respVO
.
setFollowupBackVO
(
CustomerFollowupConvert
.
INSTANCE
.
convert
(
customerFollowupDO
));
}
}
}
return
success
(
pageResult
);
}
...
...
@@ -210,6 +238,17 @@ public class OfferController {
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
pageVO
.
setDeptId
(
Objects
.
isNull
(
loginUser
)
||
Objects
.
isNull
(
loginUser
.
getDeptId
())
?
0L
:
loginUser
.
getDeptId
());
PageResult
<
OfferRespVO
>
pageResult
=
offerService
.
offerPage
(
pageVO
);
if
(
CollectionUtil
.
isNotEmpty
(
pageResult
.
getList
()))
{
for
(
OfferRespVO
respVO
:
pageResult
.
getList
())
{
CustomerFollowupDO
customerFollowupDO
=
customerFollowupService
.
getOne
(
new
LambdaQueryWrapperX
<
CustomerFollowupDO
>()
.
eq
(
CustomerFollowupDO:
:
getOfferId
,
respVO
.
getOfferId
())
.
orderByDesc
(
CustomerFollowupDO:
:
getId
)
.
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
customerFollowupDO
))
{
respVO
.
setFollowupBackVO
(
CustomerFollowupConvert
.
INSTANCE
.
convert
(
customerFollowupDO
));
}
}
}
return
success
(
pageResult
);
}
...
...
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