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
95c115a4
Commit
95c115a4
authored
Nov 09, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提供获取报价单编号接口和客户关联的报价单下拉框接口
parent
2f910c29
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
5 deletions
+45
-5
OfferService.java
...iocoder/yudao/module/sale/service/offer/OfferService.java
+9
-0
OfferServiceImpl.java
...udao/module/sale/service/offer/impl/OfferServiceImpl.java
+14
-5
OfferController.java
...o/module/sale/controller/admin/offer/OfferController.java
+22
-0
No files found.
yudao-module-sale/yudao-module-sale-core/src/main/java/cn/iocoder/yudao/module/sale/service/offer/OfferService.java
View file @
95c115a4
...
...
@@ -188,4 +188,13 @@ public interface OfferService extends IService<OfferDO> {
* @param result 处理结果说明
*/
void
addOfferLog
(
Long
offerId
,
String
number
,
Long
customerId
,
Integer
followUpMethod
,
String
userId
,
String
result
);
/**
* 跟进客户查询其关联的报价单
*
* @param customerId 客户id
* @param searchKey 关键字搜索
* @return
*/
List
<
OfferRespVO
>
getCustomerOfferSelect
(
Long
customerId
,
String
searchKey
);
}
yudao-module-sale/yudao-module-sale-core/src/main/java/cn/iocoder/yudao/module/sale/service/offer/impl/OfferServiceImpl.java
View file @
95c115a4
...
...
@@ -927,12 +927,12 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl
}
// 查询该订单是否有绑定报价单
OfferDO
offer
=
offerMapper
.
selectOne
(
new
LambdaQueryWrapper
<
OfferDO
>().
eq
(
OfferDO:
:
getOfferId
,
orderDO
.
getOrderId
()).
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
offer
)){
if
(
Objects
.
nonNull
(
offer
))
{
throw
exception
(
ORDER_BOUND_OFFER
);
}
//如果订单关联上报价单
if
(
orderDO
!=
null
&&
offerDO
.
getOfferId
()!=
null
)
{
this
.
checkOrderSalesman
(
orderDO
,
offerDO
.
getOfferId
())
;
if
(
orderDO
!=
null
&&
offerDO
.
getOfferId
()
!=
null
)
{
this
.
checkOrderSalesman
(
orderDO
,
offerDO
.
getOfferId
())
;
}
}
else
{
...
...
@@ -960,12 +960,13 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl
/**
* 赢单处理报价单时,再次判断业绩归属
*
* @param orderDO
* @param offerId
*/
private
void
checkOrderSalesman
(
OrderDO
orderDO
,
Long
offerId
)
{
orderService
.
checkOrderSalesman
(
orderDO
,
offerId
,
null
,
null
,
null
,
null
);
orderService
.
updateOrderCustomerAndSalesmanId
(
orderDO
.
getCustomerId
()!=
null
?
orderDO
.
getCustomerId
():
0
,
orderDO
.
getSalesmanId
()!=
null
?
orderDO
.
getSalesmanId
():
0
,
orderDO
.
getOrderId
())
;
orderService
.
checkOrderSalesman
(
orderDO
,
offerId
,
null
,
null
,
null
,
null
);
orderService
.
updateOrderCustomerAndSalesmanId
(
orderDO
.
getCustomerId
()
!=
null
?
orderDO
.
getCustomerId
()
:
0
,
orderDO
.
getSalesmanId
()
!=
null
?
orderDO
.
getSalesmanId
()
:
0
,
orderDO
.
getOrderId
())
;
}
private
OrderDO
generateOrder
(
OfferDO
offerDO
,
OfferResultVO
offerResultVO
)
{
...
...
@@ -1533,4 +1534,12 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl
}
return
JSONObject
.
parseObject
(
offerDO
.
getEstCost
(),
EstCostVO
.
class
);
}
@Override
public
List
<
OfferRespVO
>
getCustomerOfferSelect
(
Long
customerId
,
String
searchKey
)
{
List
<
OfferDO
>
offerDOList
=
offerMapper
.
selectList
(
new
LambdaQueryWrapper
<
OfferDO
>().
eq
(
OfferDO:
:
getRelationId
,
customerId
)
.
like
(
StringUtils
.
isNotBlank
(
searchKey
),
OfferDO:
:
getNumber
,
searchKey
)
.
orderByDesc
(
OfferDO:
:
getOrderId
).
last
(
"limit 10"
));
return
OfferConvert
.
INSTANCE
.
convertList
(
offerDOList
);
}
}
yudao-module-sale/yudao-module-sale-rest/src/main/java/cn/iocoder/yudao/module/sale/controller/admin/offer/OfferController.java
View file @
95c115a4
...
...
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.framework.security.core.LoginUser
;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
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
;
import
cn.iocoder.yudao.module.system.api.permission.RoleApi
;
...
...
@@ -164,6 +165,15 @@ public class OfferController {
}
@GetMapping
(
"/getNumber/{offerId}"
)
@ApiOperation
(
"获得报价单编号"
)
@ApiImplicitParam
(
name
=
"offerId"
,
value
=
"报价单ID"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
public
CommonResult
<
String
>
getOfferNumber
(
@PathVariable
(
"offerId"
)
Long
offerId
)
{
OfferDO
offer
=
offerService
.
getOffer
(
offerId
);
return
success
(
offer
.
getNumber
());
}
@GetMapping
(
"/page"
)
@ApiOperation
(
"获得报价单管理分页"
)
// @PreAuthorize("@ss.hasPermission('ecw:offer:query')")
...
...
@@ -271,6 +281,18 @@ public class OfferController {
return
success
(
respVOList
);
}
@GetMapping
(
"/customer/select"
)
@ApiOperation
(
value
=
"获得客户关联的报价单列表下拉框数据"
,
notes
=
"获取客户关联的报价单列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"customerId"
,
value
=
"客户id"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
),
@ApiImplicitParam
(
name
=
"searchKey"
,
value
=
"关键字搜索(当前只支出报价单编号模糊匹配)"
,
required
=
false
,
example
=
"1024"
,
dataTypeClass
=
String
.
class
),
})
public
CommonResult
<
List
<
OfferRespVO
>>
getCustomerOfferSelect
(
@RequestParam
(
"customerId"
)
Long
customerId
,
@RequestParam
(
value
=
"searchKey"
,
required
=
false
)
String
searchKey
)
{
// 核查订单关联报价单异常
List
<
OfferRespVO
>
respVOList
=
offerService
.
getCustomerOfferSelect
(
customerId
,
searchKey
);
return
success
(
respVOList
);
}
@PutMapping
(
"/association"
)
@ApiOperation
(
value
=
"订单关联报价单"
,
notes
=
"订单关联报价单"
)
@ApiImplicitParams
({
...
...
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