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
7a7a791c
Commit
7a7a791c
authored
Jul 25, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对添加业绩日志时业务经理为null的数据给默认值0
parent
131b816c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
TargetLogServiceImpl.java
.../module/order/service/targetLog/TargetLogServiceImpl.java
+21
-21
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/targetLog/TargetLogServiceImpl.java
View file @
7a7a791c
...
...
@@ -103,7 +103,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
public
void
addTargetLog
(
Long
orderId
,
Date
achievementTime
,
TargetLogEnum
targetLogEnum
)
{
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
if
(
targetLogEnum
.
getType
()
==
1
||
targetLogEnum
.
getType
()
==
3
)
{
//装柜和合单
dealTargetLog
(
orderId
,
achievementTime
,
targetLogEnum
.
getType
());
dealTargetLog
(
orderId
,
achievementTime
,
targetLogEnum
.
getType
());
}
else
if
(
targetLogEnum
.
getType
()
==
2
||
targetLogEnum
.
getType
()
==
4
)
{
//退仓和拆单
targetLogMapper
.
delete
(
new
LambdaQueryWrapperX
<
TargetLogDO
>()
.
eq
(
TargetLogDO:
:
getOrderId
,
orderId
));
...
...
@@ -116,12 +116,12 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
orderIds
.
stream
().
forEach
(
item
->
targetLogMapper
.
delete
(
new
LambdaQueryWrapperX
<
TargetLogDO
>()
.
eq
(
TargetLogDO:
:
getOrderId
,
item
)));
}
else
if
(
targetLogEnum
.
getType
()
==
4
)
{
//拆单,分别计算每个订单的业绩归属
orderIds
.
stream
().
forEach
(
item
->
dealTargetLog
(
item
,
achievementTime
,
targetLogEnum
.
getType
()));
orderIds
.
stream
().
forEach
(
item
->
dealTargetLog
(
item
,
achievementTime
,
targetLogEnum
.
getType
()));
}
}
@Override
public
List
<
TargetLogDO
>
getTargetLogListByUserIds
(
List
<
Long
>
collect
,
Date
startTime
,
Date
endTime
)
{
public
List
<
TargetLogDO
>
getTargetLogListByUserIds
(
List
<
Long
>
collect
,
Date
startTime
,
Date
endTime
)
{
List
<
TargetLogDO
>
targetLogDOS
=
targetLogMapper
.
selectList
(
new
LambdaQueryWrapperX
<
TargetLogDO
>()
.
betweenIfPresent
(
TargetLogDO:
:
getAchievementTime
,
startTime
,
endTime
)
.
in
(
TargetLogDO:
:
getUserId
,
collect
));
...
...
@@ -136,19 +136,19 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
if
(
targetLogDO
==
null
)
{
Date
time
=
targetLogMapper
.
selectCabinetSealingTime
(
orderDO
.
getOrderId
());
if
(
time
!=
null
)
{
dealTargetLog
(
orderDO
.
getOrderId
(),
time
,
TargetLogEnum
.
LOADING
.
getType
());
dealTargetLog
(
orderDO
.
getOrderId
(),
time
,
TargetLogEnum
.
LOADING
.
getType
());
}
}
});
}
private
void
dealTargetLog
(
Long
orderId
,
Date
achievementTime
,
Integer
type
)
{
private
void
dealTargetLog
(
Long
orderId
,
Date
achievementTime
,
Integer
type
)
{
long
selectCount
=
targetLogMapper
.
selectCount
(
TargetLogDO:
:
getOrderId
,
orderId
);
if
(
selectCount
>
0L
)
{
return
;
}
OrderBackInfoDto
info
=
orderQueryService
.
info
(
orderId
);
if
(
info
.
getIsInOpenSea
()){
if
(
info
.
getIsInOpenSea
())
{
// 订单归属客户产生业绩时在公海池,不添加业绩日志
return
;
}
...
...
@@ -167,21 +167,21 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
// }
// }
// }
TargetLogDO
targetLogDO
=
new
TargetLogDO
();
targetLogDO
.
setOrderId
(
orderId
);
targetLogDO
.
setCustomerId
(
info
.
getCustomerId
());
targetLogDO
.
setUserId
(
info
.
getSalesmanId
());
targetLogDO
.
setAchievementTime
(
achievementTime
);
if
(
info
.
getTransportId
()
==
3
)
{
targetLogDO
.
setLdBoxTime
(
achievementTime
);
}
else
{
targetLogDO
.
setLdBoxTime
(
targetLogMapper
.
selectCabinetLoadTime
(
orderId
));
}
targetLogDO
.
setCompleteVolume
(
info
.
getWVolume
());
targetLogDO
.
setCompleteWeight
(
info
.
getVWeight
());
targetLogDO
.
setType
(
type
);
targetLogMapper
.
insert
(
targetLogDO
);
// customerService.updateCustomerIsNewToOld(customerId);
TargetLogDO
targetLogDO
=
new
TargetLogDO
();
targetLogDO
.
setOrderId
(
orderId
);
targetLogDO
.
setCustomerId
(
info
.
getCustomerId
());
targetLogDO
.
setUserId
(
Objects
.
isNull
(
info
.
getSalesmanId
())
?
0L
:
info
.
getSalesmanId
());
targetLogDO
.
setAchievementTime
(
achievementTime
);
if
(
info
.
getTransportId
()
==
3
)
{
targetLogDO
.
setLdBoxTime
(
achievementTime
);
}
else
{
targetLogDO
.
setLdBoxTime
(
targetLogMapper
.
selectCabinetLoadTime
(
orderId
));
}
targetLogDO
.
setCompleteVolume
(
info
.
getWVolume
());
targetLogDO
.
setCompleteWeight
(
info
.
getVWeight
());
targetLogDO
.
setType
(
type
);
targetLogMapper
.
insert
(
targetLogDO
);
// customerService.updateCustomerIsNewToOld(customerId);
// }
}
}
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