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
bdef71b4
Commit
bdef71b4
authored
May 28, 2024
by
liuzeheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
ba7a8458
9e373d99
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
352 additions
and
239 deletions
+352
-239
CustomerGoEvent.java
...framework/apollo/core/event/Customer/CustomerGoEvent.java
+10
-0
CustomerServiceImpl.java
...module/customer/service/customer/CustomerServiceImpl.java
+8
-3
CalculateOrderVValueListener.java
...odule/delivery/listener/CalculateOrderVValueListener.java
+26
-9
CalculateOrderYeJiTypeListener.java
...ule/delivery/listener/CalculateOrderYeJiTypeListener.java
+6
-1
CustomerGoListener.java
...er/yudao/module/delivery/listener/CustomerGoListener.java
+16
-0
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+175
-138
OrderExceptionServiceImpl.java
...der/service/orderException/OrderExceptionServiceImpl.java
+3
-1
OrderWarehouseInServiceImpl.java
...service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
+82
-74
OrderController.java
.../module/order/controller/admin/order/OrderController.java
+1
-1
OrderExceptionController.java
...eptionResult/orderException/OrderExceptionController.java
+2
-1
OrderWarehouseInController.java
...er/admin/orderWarehouseIn/OrderWarehouseInController.java
+2
-1
MyOrderController.java
.../module/order/controller/app/order/MyOrderController.java
+5
-2
BoxServiceImpl.java
...der/yudao/module/shipment/service/box/BoxServiceImpl.java
+14
-8
MyBoxController.java
...dao/module/shipment/controller/admin/MyBoxController.java
+2
-0
No files found.
yudao-framework/yudao-spring-boot-starter-config/src/main/java/cn/iocoder/yudao/framework/apollo/core/event/Customer/CustomerGoEvent.java
0 → 100644
View file @
bdef71b4
package
cn
.
iocoder
.
yudao
.
framework
.
apollo
.
core
.
event
.
Customer
;
import
lombok.Data
;
/*
发货人代码的客户去向处理逻辑
lanbm 2024-05-27 add
*/
@Data
public
class
CustomerGoEvent
{
}
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customer/CustomerServiceImpl.java
View file @
bdef71b4
...
...
@@ -2898,12 +2898,16 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
}
@Override
public
void
updateCustomerByFinishWarehouseIn
(
Long
customerId
,
Long
orderId
,
String
orderNo
,
Date
rucangTime
)
{
public
void
updateCustomerByFinishWarehouseIn
(
Long
customerId
,
Long
orderId
,
String
orderNo
,
Date
rucangTime
)
{
//更新客户状态
CustomerDO
customer
=
customerMapper
.
selectById
(
customerId
);
if
(
customer
!=
null
)
{
Date
oldEstimateEnterOpenSeaTime
=
customer
.
getEstimateEnterOpenSeaTime
();
Date
oldEstimateEnterOpenSeaTime
=
customer
.
getEstimateEnterOpenSeaTime
();
boolean
isFcl
=
isFcl
(
customer
);
//海运整柜 不掉入公海
...
...
@@ -2956,7 +2960,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
customerOperateLogService
.
createOperateLog
(
customerOperateLogCreateReqVO
);
//转成成交客户
if
(
CustomerStatusEnum
.
CLUE
.
getValue
().
equals
(
customer
.
getStatus
())
||
CustomerStatusEnum
.
INTENTION
.
getValue
().
equals
(
customer
.
getStatus
()))
{
if
(
CustomerStatusEnum
.
CLUE
.
getValue
().
equals
(
customer
.
getStatus
())
||
CustomerStatusEnum
.
INTENTION
.
getValue
().
equals
(
customer
.
getStatus
()))
{
this
.
updateCustomerStatus
(
customerId
,
CustomerStatusEnum
.
DEAL
);
}
}
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/listener/CalculateOrderVValueListener.java
View file @
bdef71b4
...
...
@@ -42,16 +42,25 @@ public class CalculateOrderVValueListener {
@EventListener
(
CalculateOrderVValueEvent
.
class
)
public
void
CalculateOrderVValuePushEvent
(
CalculateOrderVValueEvent
event
)
{
zTest
m
=
new
zTest
();
String
sMsg
=
"计算V值"
;
zTest
m
=
new
zTest
();
String
sMsg
=
"计算V值"
;
OrderDO
orderDO
=
orderService
.
getById
(
event
.
getOrderId
());
if
(
orderDO
==
null
)
{
throw
exception
(
ORDER_NOT_EXISTS
);
}
if
(
orderDO
.
getRucangTime
()
==
null
)
{
sMsg
+=
",订单入仓时间为空,暂不处理。"
;
m
.
setTestname
(
sMsg
);
m
.
setCreatedate
(
new
Date
());
zTestService
.
save
(
m
);
return
;
}
//订单状态为已入仓之后的状态,其他状态是否排除,后续和客户确认,先按此逻辑处理
int
nS
=
orderDO
.
getStatus
();
if
(
nS
>=
5
)
{
sMsg
+=
",已入仓"
;
sMsg
+=
",已入仓"
;
//查询配置参数信息
EcwVz
temp
=
null
;
BigDecimal
CalVvalue
=
new
BigDecimal
(
0
);
...
...
@@ -62,7 +71,12 @@ public class CalculateOrderVValueListener {
if
(
temp
==
null
)
{
throw
exception
(
VCONFIG_NOT_EXISTS
);
}
CalVvalue
=
new
BigDecimal
(
temp
.
getVz
()).
divide
(
orderDO
.
getSumVolume
());
if
(
orderDO
.
getSumVolume
()
==
null
||
orderDO
.
getSumVolume
().
equals
(
new
BigDecimal
(
0
))
==
true
)
{
CalVvalue
=
new
BigDecimal
(
0
);
}
else
{
CalVvalue
=
new
BigDecimal
(
temp
.
getVz
()).
divide
(
orderDO
.
getSumVolume
());
}
}
else
if
(
orderDO
.
getTransportId
()
==
3
)
{
//空运计算V值
temp
=
ecwVzService
.
getOne
(
new
LambdaQueryWrapperX
<
EcwVz
>()
...
...
@@ -70,7 +84,12 @@ public class CalculateOrderVValueListener {
if
(
temp
==
null
)
{
throw
exception
(
VCONFIG_NOT_EXISTS
);
}
CalVvalue
=
new
BigDecimal
(
temp
.
getVz
()).
divide
(
orderDO
.
getSumWeight
());
if
(
orderDO
.
getSumWeight
()
==
null
||
orderDO
.
getSumWeight
().
equals
(
new
BigDecimal
(
0
))
==
true
)
{
CalVvalue
=
new
BigDecimal
(
0
);
}
else
{
CalVvalue
=
new
BigDecimal
(
temp
.
getVz
()).
divide
(
orderDO
.
getSumWeight
());
}
}
//计算业绩产生时间
...
...
@@ -81,10 +100,8 @@ public class CalculateOrderVValueListener {
}
orderService
.
UpdateOrderVValue
(
event
.
getOrderId
(),
CalVvalue
,
event
.
getYejiCreateDate
());
}
else
{
sMsg
+=
",未入仓"
;
}
else
{
sMsg
+=
",未入仓"
;
}
m
.
setTestname
(
sMsg
);
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/listener/CalculateOrderYeJiTypeListener.java
View file @
bdef71b4
...
...
@@ -55,7 +55,12 @@ public class CalculateOrderYeJiTypeListener {
event
.
setCustomerId
(
orderDO
.
getCustomerId
());
CustomerDO
customerDO
=
customerService
.
getById
(
event
.
getCustomerId
());
if
(
customerDO
==
null
)
{
throw
exception
(
CUSTOMER_NOT_EXISTS
);
//throw exception(CUSTOMER_NOT_EXISTS);
sMsg
+=
",客户不存在先不计算业绩类型"
;
m
.
setTestname
(
sMsg
);
m
.
setCreatedate
(
new
Date
());
zTestService
.
save
(
m
);
return
;
}
int
isNew
=
0
;
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/listener/CustomerGoListener.java
0 → 100644
View file @
bdef71b4
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
listener
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
/*
发货人带来的客户的去向处理逻辑
lanbm 2024-05-27 add
*/
@Component
(
"CustomerGoListener"
)
@AllArgsConstructor
@Slf4j
public
class
CustomerGoListener
{
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderServiceImpl.java
View file @
bdef71b4
This diff is collapsed.
Click to expand it.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderException/OrderExceptionServiceImpl.java
View file @
bdef71b4
...
...
@@ -911,7 +911,9 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
List
<
CustomerDO
>
list
=
new
ArrayList
<>();
list
.
add
(
customerService
.
getCustomer
(
orderExceptionDO
.
getCustomerId
()));
customerService
.
assignedCustomer
(
list
,
Long
.
parseLong
(
vo
.
getCustomerService
()),
CustomerOperateTypeEnum
.
ASSIGN
,
"处理未分配客户经理异常时分配"
,
null
);
customerService
.
assignedCustomer
(
list
,
Long
.
parseLong
(
vo
.
getCustomerService
()),
CustomerOperateTypeEnum
.
ASSIGN
,
"处理未分配客户经理异常时分配"
,
null
);
}
else
if
(
vo
.
getOrderExceptionHandlerResult
().
equals
(
OrderExceptionResult
.
NOT_CUSTOMER_SERVICE_EXCEPTION_RESULT
.
NOT
))
{
orderExceptionDO
.
setOrderExceptionStatus
(
2
);
}
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
View file @
bdef71b4
This diff is collapsed.
Click to expand it.
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/order/OrderController.java
View file @
bdef71b4
...
...
@@ -151,7 +151,7 @@ public class OrderController {
}
}
//lanbm 2024-05-13 添加注释
//lanbm 2024-05-13 添加注释
member_user 注册会员用户
Long
orderId
=
orderService
.
createOrder
(
createReqVO
,
null
).
getOrderId
();
return
success
(
orderId
);
}
...
...
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/orderExceptionResult/orderException/OrderExceptionController.java
View file @
bdef71b4
...
...
@@ -107,7 +107,8 @@ public class OrderExceptionController {
@ApiOperation
(
"根据订单ID获取所有的订单异常列表"
)
@ApiImplicitParam
(
name
=
"orderId"
,
value
=
"订单ID"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
public
CommonResult
<
List
<
OrderExceptionBackVO
>>
getOrderExceptionListByOrderId
(
@RequestParam
(
"orderId"
)
Long
orderId
)
{
List
<
OrderExceptionBackVO
>
list
=
orderExceptionService
.
getOrderExceptionListByOrderId
(
orderId
);
List
<
OrderExceptionBackVO
>
list
=
orderExceptionService
.
getOrderExceptionListByOrderId
(
orderId
);
return
success
(
list
);
}
...
...
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/orderWarehouseIn/OrderWarehouseInController.java
View file @
bdef71b4
...
...
@@ -69,7 +69,8 @@ public class OrderWarehouseInController {
/**
* 订单完成入仓操作的放重复提交缓存key
*/
private
static
final
String
ORDER_FINISH_WAREHOUSE_IN_KEY
=
"jiedao:order:finish:warehouse:in:{0}"
;
private
static
final
String
ORDER_FINISH_WAREHOUSE_IN_KEY
=
"jiedao:order:finish:warehouse:in:{0}"
;
@PostMapping
(
"/create"
)
...
...
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/app/order/MyOrderController.java
View file @
bdef71b4
...
...
@@ -137,13 +137,16 @@ public class MyOrderController {
Long
userId
=
loginUser
.
getId
();
createReqVO
.
setUserId
(
userId
);
MemberUserDO
memberUserDO
=
memberUserService
.
info
(
userId
);
if
(
Objects
.
isNull
(
memberUserDO
)
||
memberUserDO
.
getStatus
()
==
1
||
memberUserDO
.
getDeleted
())
{
if
(
Objects
.
isNull
(
memberUserDO
)
||
memberUserDO
.
getStatus
()
==
1
||
memberUserDO
.
getDeleted
())
{
return
error
(
MEMBER_NOT_EXISTS
);
}
if
(
null
==
createReqVO
.
getStatus
())
{
createReqVO
.
setStatus
(
2
);
}
if
(
StringUtils
.
isNotBlank
(
createReqVO
.
getType
())
&&
createReqVO
.
getType
().
contains
(
"4"
))
{
if
(
StringUtils
.
isNotBlank
(
createReqVO
.
getType
())
&&
createReqVO
.
getType
().
contains
(
"4"
))
{
// TODO 客户端下单处理未知的类型
String
type
=
Arrays
.
stream
(
createReqVO
.
getType
().
split
(
StrUtil
.
COMMA
)).
filter
(
s
->
!
StringUtils
.
equals
(
"4"
,
s
)).
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
joining
(
StrUtil
.
COMMA
));
createReqVO
.
setType
(
type
);
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/box/BoxServiceImpl.java
View file @
bdef71b4
...
...
@@ -2224,7 +2224,8 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
Long
deptId
=
SecurityFrameworkUtils
.
getLoginUser
().
getDeptId
();
DeptWarehouseBaseVO
deptWarehouseBaseVO
=
new
DeptWarehouseBaseVO
();
deptWarehouseBaseVO
.
setDeptId
(
deptId
);
List
<
DeptWarehouseDO
>
deptWarehouseDOS
=
warehouseService
.
deptList
(
deptWarehouseBaseVO
);
List
<
DeptWarehouseDO
>
deptWarehouseDOS
=
warehouseService
.
deptList
(
deptWarehouseBaseVO
);
if
(
CollectionUtil
.
isEmpty
(
deptWarehouseDOS
))
{
throw
exception
(
DEPT_NOT_FOUND
);
...
...
@@ -2319,11 +2320,11 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
return
boxInfoQuery1
(
result
,
searchDcDate
);
}
private
PageResult
<
BoxBackVO
>
boxInfoQuery1
(
PageResult
<
BoxBackVO
>
result
,
boolean
searchDcDate
)
{
private
PageResult
<
BoxBackVO
>
boxInfoQuery1
(
PageResult
<
BoxBackVO
>
result
,
boolean
searchDcDate
)
{
List
<
BoxBackVO
>
boxBackList
=
result
.
getList
();
if
(
CollectionUtil
.
isNotEmpty
(
boxBackList
))
{
List
<
Long
>
idList
=
boxBackList
.
stream
()
.
map
(
BoxBaseBackVO:
:
getId
)
.
collect
(
Collectors
.
toList
());
...
...
@@ -2361,12 +2362,14 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
.
collect
(
Collectors
.
toList
());
Map
<
Long
,
ChannelDO
>
channelMap
=
new
HashMap
<>();
if
(
CollectionUtils
.
isNotEmpty
(
channelIdList
))
{
List
<
ChannelDO
>
channelDOList
=
channelService
.
getChannelList
(
channelIdList
);
List
<
ChannelDO
>
channelDOList
=
channelService
.
getChannelList
(
channelIdList
);
channelMap
=
channelDOList
.
stream
()
.
collect
(
Collectors
.
toMap
(
ChannelDO:
:
getChannelId
,
v
->
v
));
}
List
<
BoxApprovalDO
>
approvalDOList
=
boxApprovalService
.
getBackApprovalList
(
idList
);
List
<
BoxApprovalDO
>
approvalDOList
=
boxApprovalService
.
getBackApprovalList
(
idList
);
Map
<
Long
,
List
<
BoxApprovalDO
>>
shipmentApprovalMap
=
approvalDOList
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
BoxApprovalDO:
:
getShipmentId
));
...
...
@@ -2411,7 +2414,8 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
}
}
List
<
BoxApprovalDO
>
itemApprovalList
=
shipmentApprovalMap
.
get
(
shipmentId
);
List
<
BoxApprovalDO
>
itemApprovalList
=
shipmentApprovalMap
.
get
(
shipmentId
);
if
(
CollectionUtils
.
isNotEmpty
(
itemApprovalList
))
{
BoxApprovalDO
boxApprovalDO
=
itemApprovalList
.
get
(
0
);
//查询反审信息
...
...
@@ -2507,7 +2511,8 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
.
likeIfPresent
(
BoxDO:
:
getSelfNo
,
query
.
getSelfNo
())
//已出仓 222
.
eq
(
BoxDO:
:
getCheckoutStatus
,
AirCheckoutStatusEnum
.
CHECKOUT
.
getStatus
())
.
eq
(
BoxDO:
:
getCheckoutStatus
,
AirCheckoutStatusEnum
.
CHECKOUT
.
getStatus
())
.
and
(
i
->
i
.
and
(
t
->
t
.
eq
(
BoxDO:
:
getDcCustomsStatus
,
3
)
...
...
@@ -2544,7 +2549,8 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
);
boxBackVO
.
setOrderNum
(
orderNum
);
long
orderExitNum
=
boxOrderExitService
.
count
(
new
LambdaQueryWrapper
<
BoxOrderExitDO
>()
long
orderExitNum
=
boxOrderExitService
.
count
(
new
LambdaQueryWrapper
<
BoxOrderExitDO
>()
.
eq
(
BoxOrderExitDO:
:
getShipmentId
,
shipmentId
)
);
boxBackVO
.
setOrderExitNum
(
orderExitNum
);
...
...
yudao-module-shipment/yudao-module-shipment-rest/src/main/java/cn/iocoder/yudao/module/shipment/controller/admin/MyBoxController.java
View file @
bdef71b4
...
...
@@ -75,6 +75,8 @@ public class MyBoxController {
@PostMapping
(
"/exitPageAir"
)
@ApiOperation
(
"获得退场出货分页, use this"
)
public
CommonResult
<
PageResult
<
BoxBackVO
>>
getBoxExitPageAir
(
@Valid
@RequestBody
MyBoxExitQueryVO
query
)
{
//空运退场到仓列表 lanbm 2024-05-27 添加注释
//此出有个仓库权限的限制,管来没有权限,数据符合逻辑也是显示不出来信息的
PageResult
<
BoxBackVO
>
pageResult
=
boxService
.
getBoxExitPageAir
(
query
);
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