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
56b9a1c6
Commit
56b9a1c6
authored
Jul 02, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-07-02-4提交
parent
3f5ef328
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
14 deletions
+29
-14
TargetLogMapper.java
...dao/module/order/dal/mysql/targetLog/TargetLogMapper.java
+2
-2
TargetLogService.java
...udao/module/order/service/targetLog/TargetLogService.java
+1
-1
TargetLogServiceImpl.java
.../module/order/service/targetLog/TargetLogServiceImpl.java
+3
-2
TargetLogJob.java
...java/cn/iocoder/yudao/module/order/task/TargetLogJob.java
+23
-9
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dal/mysql/targetLog/TargetLogMapper.java
View file @
56b9a1c6
...
...
@@ -73,9 +73,9 @@ public interface TargetLogMapper extends AbstractMapper<TargetLogDO> {
@Select
({
"<script>"
,
"select * from ecw_target_log where deleted=0 and
DATE_FORMAT(create_time,'%Y-%m')='2024-06'
"
,
"select * from ecw_target_log where deleted=0 and
(DATE_FORMAT(create_time,'%Y-%m')=#{sDate} OR DATE_FORMAT(achievement_time,'%Y-%m')=#{sDate})
"
,
"</script>"
})
List
<
TargetLogDO
>
selectList2
();
List
<
TargetLogDO
>
selectList2
(
String
sDate
);
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/targetLog/TargetLogService.java
View file @
56b9a1c6
...
...
@@ -38,7 +38,7 @@ public interface TargetLogService extends IService<TargetLogDO> {
*/
void
deleteTargetLog
(
Long
id
);
List
<
TargetLogDO
>
selectList2
();
List
<
TargetLogDO
>
selectList2
(
String
sDate
);
/**
* 获得部门业绩日志
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/targetLog/TargetLogServiceImpl.java
View file @
56b9a1c6
...
...
@@ -62,8 +62,8 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
private
OrderConsignorService
orderConsignorService
;
public
List
<
TargetLogDO
>
selectList2
()
{
return
targetLogMapper
.
selectList2
();
public
List
<
TargetLogDO
>
selectList2
(
String
sDate
)
{
return
targetLogMapper
.
selectList2
(
sDate
);
}
@Override
...
...
@@ -334,6 +334,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
//收货人
CustomerDO
consigneeDO
=
customerService
.
getCustomer
(
info
.
getConsigneeVO
().
getCustomerId
());
if
(
info
.
getType
().
contains
(
"2"
))
{
//层级1: 订单为海外仓订单,业绩归属发货人+
//发货人归属客户经理(判断优先级最高,只要是海外仓,不需要判断其他条件)
...
...
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/task/TargetLogJob.java
View file @
56b9a1c6
...
...
@@ -31,6 +31,8 @@ public class TargetLogJob implements JobHandler {
int
var1
=
30
;
int
var2
=
3
;
int
var3
=
6
;
String
sDate
=
""
;
if
(
StringUtils
.
isNotBlank
(
param
))
{
String
[]
vars
=
param
.
split
(
StrUtil
.
COMMA
);
if
(
vars
.
length
>
0
)
{
...
...
@@ -42,21 +44,33 @@ public class TargetLogJob implements JobHandler {
if
(
vars
.
length
>
2
)
{
var3
=
Integer
.
parseInt
(
vars
[
2
]);
}
sDate
=
vars
[
0
]
+
"-"
+
vars
[
1
];
}
zTest
m
=
new
zTest
();
m
.
setTestname
(
"开始计算业绩归属"
);
if
(
sDate
==
null
||
sDate
.
length
()
==
0
)
{
m
.
setTestname
(
"日期参数为空。"
);
m
.
setCreatedate
(
new
Date
());
zTestMapper2
.
insert
(
m
);
return
""
;
}
//System.out.println("定时任务参数:" + param);
List
<
TargetLogDO
>
list
=
targetLogService
.
selectList2
(
sDate
);
if
(
CollectionUtil
.
isEmpty
(
list
))
{
m
.
setTestname
(
sDate
+
"获取业绩归属数据为空"
);
m
.
setCreatedate
(
new
Date
());
zTestMapper2
.
insert
(
m
);
}
m
.
setTestname
(
sDate
+
"开始处理业绩归属数据:"
+
list
.
size
());
m
.
setCreatedate
(
new
Date
());
zTestMapper2
.
insert
(
m
);
//System.out.println("定时任务参数:" + param);
List
<
TargetLogDO
>
list
=
targetLogService
.
selectList2
();
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
for
(
TargetLogDO
t
:
list
)
{
targetLogService
.
dealTargetLogTask
(
t
.
getOrderId
(),
null
,
t
.
getId
());
}
for
(
TargetLogDO
t
:
list
)
{
targetLogService
.
dealTargetLogTask
(
t
.
getOrderId
(),
null
,
t
.
getId
());
}
zTest
m2
=
new
zTest
();
m2
.
setTestname
(
"业绩归属计算完毕"
);
...
...
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