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
dcf977b6
Commit
dcf977b6
authored
Jul 25, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-fix' into dev
parents
c7f2a341
c385c3e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
21 deletions
+25
-21
OrderBusinessServiceImpl.java
...le/order/service/order/impl/OrderBusinessServiceImpl.java
+4
-0
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/order/impl/OrderBusinessServiceImpl.java
View file @
dcf977b6
...
@@ -200,6 +200,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -200,6 +200,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
AdminUserRespDTO
adminUserRespDTO
=
adminUserApi
.
getUser
(
order
.
getSalesmanId
());
AdminUserRespDTO
adminUserRespDTO
=
adminUserApi
.
getUser
(
order
.
getSalesmanId
());
if
(
Objects
.
nonNull
(
adminUserRespDTO
))
{
if
(
Objects
.
nonNull
(
adminUserRespDTO
))
{
order
.
setDeptId
(
adminUserRespDTO
.
getDeptId
());
order
.
setDeptId
(
adminUserRespDTO
.
getDeptId
());
}
else
{
order
.
setDeptId
(
0L
);
}
}
}
else
if
(
CollectionUtil
.
isEmpty
(
orderExceptionDOList
)
&&
}
else
if
(
CollectionUtil
.
isEmpty
(
orderExceptionDOList
)
&&
Objects
.
nonNull
(
customerDO
)
Objects
.
nonNull
(
customerDO
)
...
@@ -2048,6 +2050,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2048,6 +2050,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
AdminUserRespDTO
adminUserRespDTO
=
adminUserApi
.
getUser
(
customerDO
.
getCustomerService
());
AdminUserRespDTO
adminUserRespDTO
=
adminUserApi
.
getUser
(
customerDO
.
getCustomerService
());
if
(
Objects
.
nonNull
(
adminUserRespDTO
))
{
if
(
Objects
.
nonNull
(
adminUserRespDTO
))
{
orderDO
.
setDeptId
(
adminUserRespDTO
.
getDeptId
());
orderDO
.
setDeptId
(
adminUserRespDTO
.
getDeptId
());
}
else
{
orderDO
.
setDeptId
(
0L
);
}
}
}
else
{
}
else
{
orderDO
.
setSalesmanId
(
0L
);
orderDO
.
setSalesmanId
(
0L
);
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/targetLog/TargetLogServiceImpl.java
View file @
dcf977b6
...
@@ -103,7 +103,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
...
@@ -103,7 +103,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
public
void
addTargetLog
(
Long
orderId
,
Date
achievementTime
,
TargetLogEnum
targetLogEnum
)
{
public
void
addTargetLog
(
Long
orderId
,
Date
achievementTime
,
TargetLogEnum
targetLogEnum
)
{
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
if
(
targetLogEnum
.
getType
()
==
1
||
targetLogEnum
.
getType
()
==
3
)
{
//装柜和合单
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
)
{
//退仓和拆单
}
else
if
(
targetLogEnum
.
getType
()
==
2
||
targetLogEnum
.
getType
()
==
4
)
{
//退仓和拆单
targetLogMapper
.
delete
(
new
LambdaQueryWrapperX
<
TargetLogDO
>()
targetLogMapper
.
delete
(
new
LambdaQueryWrapperX
<
TargetLogDO
>()
.
eq
(
TargetLogDO:
:
getOrderId
,
orderId
));
.
eq
(
TargetLogDO:
:
getOrderId
,
orderId
));
...
@@ -116,12 +116,12 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
...
@@ -116,12 +116,12 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
orderIds
.
stream
().
forEach
(
item
->
targetLogMapper
.
delete
(
new
LambdaQueryWrapperX
<
TargetLogDO
>()
orderIds
.
stream
().
forEach
(
item
->
targetLogMapper
.
delete
(
new
LambdaQueryWrapperX
<
TargetLogDO
>()
.
eq
(
TargetLogDO:
:
getOrderId
,
item
)));
.
eq
(
TargetLogDO:
:
getOrderId
,
item
)));
}
else
if
(
targetLogEnum
.
getType
()
==
4
)
{
//拆单,分别计算每个订单的业绩归属
}
else
if
(
targetLogEnum
.
getType
()
==
4
)
{
//拆单,分别计算每个订单的业绩归属
orderIds
.
stream
().
forEach
(
item
->
dealTargetLog
(
item
,
achievementTime
,
targetLogEnum
.
getType
()));
orderIds
.
stream
().
forEach
(
item
->
dealTargetLog
(
item
,
achievementTime
,
targetLogEnum
.
getType
()));
}
}
}
}
@Override
@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
>()
List
<
TargetLogDO
>
targetLogDOS
=
targetLogMapper
.
selectList
(
new
LambdaQueryWrapperX
<
TargetLogDO
>()
.
betweenIfPresent
(
TargetLogDO:
:
getAchievementTime
,
startTime
,
endTime
)
.
betweenIfPresent
(
TargetLogDO:
:
getAchievementTime
,
startTime
,
endTime
)
.
in
(
TargetLogDO:
:
getUserId
,
collect
));
.
in
(
TargetLogDO:
:
getUserId
,
collect
));
...
@@ -136,19 +136,19 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
...
@@ -136,19 +136,19 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
if
(
targetLogDO
==
null
)
{
if
(
targetLogDO
==
null
)
{
Date
time
=
targetLogMapper
.
selectCabinetSealingTime
(
orderDO
.
getOrderId
());
Date
time
=
targetLogMapper
.
selectCabinetSealingTime
(
orderDO
.
getOrderId
());
if
(
time
!=
null
)
{
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
);
long
selectCount
=
targetLogMapper
.
selectCount
(
TargetLogDO:
:
getOrderId
,
orderId
);
if
(
selectCount
>
0L
)
{
if
(
selectCount
>
0L
)
{
return
;
return
;
}
}
OrderBackInfoDto
info
=
orderQueryService
.
info
(
orderId
);
OrderBackInfoDto
info
=
orderQueryService
.
info
(
orderId
);
if
(
info
.
getIsInOpenSea
()){
if
(
info
.
getIsInOpenSea
())
{
// 订单归属客户产生业绩时在公海池,不添加业绩日志
// 订单归属客户产生业绩时在公海池,不添加业绩日志
return
;
return
;
}
}
...
@@ -167,21 +167,21 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
...
@@ -167,21 +167,21 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
// }
// }
// }
// }
// }
// }
TargetLogDO
targetLogDO
=
new
TargetLogDO
();
TargetLogDO
targetLogDO
=
new
TargetLogDO
();
targetLogDO
.
setOrderId
(
orderId
);
targetLogDO
.
setOrderId
(
orderId
);
targetLogDO
.
setCustomerId
(
info
.
getCustomerId
());
targetLogDO
.
setCustomerId
(
info
.
getCustomerId
());
targetLogDO
.
setUserId
(
info
.
getSalesmanId
());
targetLogDO
.
setUserId
(
Objects
.
isNull
(
info
.
getSalesmanId
())
?
0L
:
info
.
getSalesmanId
());
targetLogDO
.
setAchievementTime
(
achievementTime
);
targetLogDO
.
setAchievementTime
(
achievementTime
);
if
(
info
.
getTransportId
()
==
3
)
{
if
(
info
.
getTransportId
()
==
3
)
{
targetLogDO
.
setLdBoxTime
(
achievementTime
);
targetLogDO
.
setLdBoxTime
(
achievementTime
);
}
else
{
}
else
{
targetLogDO
.
setLdBoxTime
(
targetLogMapper
.
selectCabinetLoadTime
(
orderId
));
targetLogDO
.
setLdBoxTime
(
targetLogMapper
.
selectCabinetLoadTime
(
orderId
));
}
}
targetLogDO
.
setCompleteVolume
(
info
.
getWVolume
());
targetLogDO
.
setCompleteVolume
(
info
.
getWVolume
());
targetLogDO
.
setCompleteWeight
(
info
.
getVWeight
());
targetLogDO
.
setCompleteWeight
(
info
.
getVWeight
());
targetLogDO
.
setType
(
type
);
targetLogDO
.
setType
(
type
);
targetLogMapper
.
insert
(
targetLogDO
);
targetLogMapper
.
insert
(
targetLogDO
);
// customerService.updateCustomerIsNewToOld(customerId);
// 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