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
48fbaa1a
Commit
48fbaa1a
authored
May 13, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-05-13新功能和运维BUG处理
parent
ce9726ab
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
535 additions
and
310 deletions
+535
-310
CalculateCustomerTypeEvent.java
...pollo/core/event/Customer/CalculateCustomerTypeEvent.java
+37
-0
CalculateOrderVValueEvent.java
...rk/apollo/core/event/Order/CalculateOrderVValueEvent.java
+31
-0
CalculateCustomerType.java
...yudao/module/delivery/listener/CalculateCustomerType.java
+62
-0
BoxServiceImpl.java
...der/yudao/module/shipment/service/box/BoxServiceImpl.java
+22
-9
BoxPreloadGoodsServiceImpl.java
...t/service/boxPreloadGoods/BoxPreloadGoodsServiceImpl.java
+383
-301
No files found.
yudao-framework/yudao-spring-boot-starter-config/src/main/java/cn/iocoder/yudao/framework/apollo/core/event/Customer/CalculateCustomerTypeEvent.java
0 → 100644
View file @
48fbaa1a
package
cn
.
iocoder
.
yudao
.
framework
.
apollo
.
core
.
event
.
Customer
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
/*
lanbm 2024-05-07 添加公海捞取是计算客户类型
*/
@Data
public
class
CalculateCustomerTypeEvent
{
/**
* 客户编码
*/
private
String
customerNumber
;
/*
客户ID
*/
private
Long
customerId
;
/*
新客户经理
*/
private
Long
oldCustomerService
;
/*
老客户经理
*/
private
Long
newCustomerService
;
/*
客户状态:1.线索2.意向3.成交
通过客户状态来判断客户是否是已成交客户
*/
private
Integer
status
;
}
yudao-framework/yudao-spring-boot-starter-config/src/main/java/cn/iocoder/yudao/framework/apollo/core/event/Order/CalculateOrderVValueEvent.java
0 → 100644
View file @
48fbaa1a
package
cn
.
iocoder
.
yudao
.
framework
.
apollo
.
core
.
event
.
Order
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/*
lanbm 2024-05-13 add
计算订单V值
*/
@Data
public
class
CalculateOrderVValueEvent
{
/*
订单id
*/
private
Long
orderId
;
/*
根据体积或重量计算出的V值
*/
private
BigDecimal
calVvalue
;
/*
业绩产生时间
*/
private
Date
yejiCreateDate
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/listener/CalculateCustomerType.java
0 → 100644
View file @
48fbaa1a
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
listener
;
import
cn.iocoder.yudao.framework.apollo.core.event.Customer.CalculateCustomerTypeEvent
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
/*
lanbm 2024-05-07 add
*/
@Component
(
"CalculateCustomerType"
)
@AllArgsConstructor
@Slf4j
public
class
CalculateCustomerType
{
//监听公海捞取事件,计算客户是新客户类型还是老客户类型,此字段用户计算订单业绩类型
@Resource
private
CustomerService
customerService
;
/**
* 客户捞取监听事件 lanbm 2024-05-07 add
* @param event
*/
@EventListener
(
CalculateCustomerTypeEvent
.
class
)
public
void
CalculateCustomerTypePushEvent
(
CalculateCustomerTypeEvent
event
)
{
if
(
event
.
getNewCustomerService
()
==
event
.
getOldCustomerService
())
{
//新客户经理和老客户经理是同一客户经理
//继续判断有无成交记录
//有成交记录 客户业绩类型=老客户
//没成交记录 客户业绩类型=新客户
boolean
bR
=
isHaving_TransactionRecords
(
event
);
if
(
bR
==
true
)
{
//有成交记录
customerService
.
updateCustomerNewOrOld
(
event
.
getCustomerId
(),
false
);
}
else
{
//无成交记录
customerService
.
updateCustomerNewOrOld
(
event
.
getCustomerId
(),
true
);
}
}
else
{
//新客户经理和老客户经理不是同一客户经理
//客户业绩类型=新客户
customerService
.
updateCustomerNewOrOld
(
event
.
getCustomerId
(),
true
);
}
}
/*
通过客户状态来判断有无成交记录
1.线索2.意向3.成交
*/
private
boolean
isHaving_TransactionRecords
(
CalculateCustomerTypeEvent
event
)
{
if
(
event
.
getStatus
()
==
3
)
return
true
;
else
return
false
;
}
}
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/box/BoxServiceImpl.java
View file @
48fbaa1a
...
...
@@ -1527,10 +1527,12 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
List
<
Long
>
warehouseIdList
;
if
(
countryId
!=
null
)
{
List
<
WarehouseDO
>
warehouseList
=
warehouseService
.
findByCountryIdList
(
Collections
.
singletonList
(
countryId
));
List
<
WarehouseDO
>
warehouseList
=
warehouseService
.
findByCountryIdList
(
Collections
.
singletonList
(
countryId
));
warehouseIdList
=
warehouseList
.
stream
().
map
(
WarehouseDO:
:
getId
).
collect
(
Collectors
.
toList
());
query
.
setWarehouseIdList
(
warehouseIdList
);
}
//上面都是处理查询条件相关逻辑
return
boxInfoQuery1
(
boxMapper
.
selectPage2
(
page
,
query
),
false
);
}
...
...
@@ -2292,7 +2294,9 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
.
map
(
BoxBaseBackVO:
:
getId
)
.
collect
(
Collectors
.
toList
());
Map
<
Long
,
BoxGoodsStatistics
>
shipmentStatisticsMap
=
boxPreloadGoodsService
.
getBoxStatistics
(
idList
);
//ecw_box_preload_goods 预装货物 lanbm 2024-05-13 添加注释
Map
<
Long
,
BoxGoodsStatistics
>
shipmentStatisticsMap
=
boxPreloadGoodsService
.
getBoxStatistics
(
idList
);
List
<
Long
>
cabinetIdList
=
boxBackList
.
stream
()
.
map
(
BoxBaseBackVO:
:
getCabinetId
)
...
...
@@ -2301,6 +2305,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
Map
<
Long
,
CabinetDO
>
cabinetMap
=
new
HashMap
<>();
//ecw_cabinet 柜型配置 lanbm 2024-05-13 添加注释
if
(
CollectionUtils
.
isNotEmpty
(
cabinetIdList
))
{
List
<
CabinetDO
>
cabinetDOList
=
cabinetService
.
getCabinetList
(
cabinetIdList
);
cabinetMap
=
cabinetDOList
.
stream
()
...
...
@@ -2310,7 +2315,9 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
Set
<
Long
>
destWarehouseIdList
=
boxBackList
.
stream
()
.
map
(
BoxBaseBackVO:
:
getDestWarehouseId
)
.
collect
(
Collectors
.
toSet
());
List
<
WarehouseDO
>
warehouseDOList
=
warehouseService
.
getByIdList
(
new
ArrayList
<>(
destWarehouseIdList
));
//ecw_warehouse 仓库相关信息
List
<
WarehouseDO
>
warehouseDOList
=
warehouseService
.
getByIdList
(
new
ArrayList
<>(
destWarehouseIdList
));
Map
<
Long
,
WarehouseDO
>
warehouseDOMap
=
warehouseDOList
.
stream
()
.
collect
(
Collectors
.
toMap
(
WarehouseDO:
:
getId
,
v
->
v
));
...
...
@@ -2340,22 +2347,28 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
}
//设置目的地
WarehouseDO
destWarehouse
=
warehouseDOMap
.
get
(
boxBackVO
.
getDestWarehouseId
());
WarehouseRespVO
destWarehouseResp
=
WarehouseConvert
.
INSTANCE
.
convert
(
destWarehouse
);
WarehouseDO
destWarehouse
=
warehouseDOMap
.
get
(
boxBackVO
.
getDestWarehouseId
());
WarehouseRespVO
destWarehouseResp
=
WarehouseConvert
.
INSTANCE
.
convert
(
destWarehouse
);
boxBackVO
.
setDestWarehouseResp
(
destWarehouseResp
);
Long
channelId
=
boxBackVO
.
getShippingChannelId
();
if
(
channelId
!=
null
&&
channelId
!=
0
)
{
ChannelDO
channelDO
=
channelMap
.
get
(
channelId
);
boxBackVO
.
setChannelRespVO
(
ChannelConvert
.
INSTANCE
.
convert
(
channelDO
));
boxBackVO
.
setChannelRespVO
(
ChannelConvert
.
INSTANCE
.
convert
(
channelDO
));
}
//统计信息
BoxGoodsStatistics
boxStatistics
=
shipmentStatisticsMap
.
get
(
shipmentId
);
//统计信息 lanbm2024-05-13 添加注释
BoxGoodsStatistics
boxStatistics
=
shipmentStatisticsMap
.
get
(
shipmentId
);
boxBackVO
.
setBoxStatistics
(
boxStatistics
);
if
(
searchDcDate
)
{
BoxCabinetUnloadDO
boxCabinetUnloadDO
=
boxCabinetUnloadService
.
getOne
(
new
LambdaQueryWrapperX
<
BoxCabinetUnloadDO
>()
BoxCabinetUnloadDO
boxCabinetUnloadDO
=
boxCabinetUnloadService
.
getOne
(
new
LambdaQueryWrapperX
<
BoxCabinetUnloadDO
>()
.
eq
(
BoxCabinetUnloadDO:
:
getShipmentId
,
shipmentId
)
.
last
(
"limit 1"
)
);
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxPreloadGoods/BoxPreloadGoodsServiceImpl.java
View file @
48fbaa1a
This diff is collapsed.
Click to expand it.
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