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
13545881
Commit
13545881
authored
May 23, 2024
by
liuzeheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
1e8d8540
870c4269
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
339 additions
and
172 deletions
+339
-172
BpmTaskController.java
...o/module/bpm/controller/admin/task/BpmTaskController.java
+35
-11
BpmTaskServiceImpl.java
...der/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
+5
-2
EcwVzController.java
...dao/module/delivery/controller/admin/EcwVzController.java
+31
-4
CalculateCustomerType.java
...yudao/module/delivery/listener/CalculateCustomerType.java
+13
-4
CalculateOrderYeJiTypeListener.java
...ule/delivery/listener/CalculateOrderYeJiTypeListener.java
+1
-2
ReceiveCustomerCalTypeListener.java
...ule/delivery/listener/ReceiveCustomerCalTypeListener.java
+2
-3
OrderExtMapper.java
.../iocoder/yudao/module/delivery/mapper/OrderExtMapper.java
+3
-0
OrderServiceExtImpl.java
...dao/module/delivery/service/Impl/OrderServiceExtImpl.java
+5
-0
OrderServiceExt.java
...ocoder/yudao/module/delivery/service/OrderServiceExt.java
+3
-0
OrderExtMapper.xml
...elivery-rest/src/main/resources/mapper/OrderExtMapper.xml
+11
-4
SalesReportMapper.xml
...very-rest/src/main/resources/mapper/SalesReportMapper.xml
+136
-98
OrderMapper.java
...coder/yudao/module/order/dal/mysql/order/OrderMapper.java
+6
-4
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+6
-10
OrderWarehouseInServiceImpl.java
...service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
+14
-6
BoxPreloadGoodsController.java
.../shipment/controller/admin/BoxPreloadGoodsController.java
+1
-0
DownloadLogServiceImpl.java
...le/system/service/downloadLog/DownloadLogServiceImpl.java
+3
-0
PayableServiceImpl.java
...dao/module/wealth/service/payable/PayableServiceImpl.java
+52
-12
PayableQueryVO.java
...ocoder/yudao/module/wealth/vo/payable/PayableQueryVO.java
+8
-2
PayableMapper.xml
...-rest/src/main/resources/mapper/payable/PayableMapper.xml
+4
-10
No files found.
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java
View file @
13545881
...
...
@@ -9,6 +9,8 @@ import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import
cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.copy.ProcessCopyPageReqVO
;
import
cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.copy.ProcessCopyRespVO
;
import
cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*
;
import
cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO
;
import
cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmTaskExtMapper
;
import
cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService
;
import
cn.iocoder.yudao.module.bpm.service.task.BpmTaskService
;
import
io.swagger.annotations.Api
;
...
...
@@ -21,7 +23,9 @@ import org.springframework.web.bind.annotation.*;
import
javax.annotation.Resource
;
import
javax.validation.Valid
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
web
.
core
.
util
.
WebFrameworkUtils
.
getLoginUserId
;
...
...
@@ -42,6 +46,9 @@ public class BpmTaskController {
@Resource
private
BpmProcessInstanceService
processInstanceService
;
@Resource
private
BpmTaskExtMapper
taskExtMapper
;
@GetMapping
(
"todo-page"
)
@ApiOperation
(
"获取 Todo 待办任务分页"
)
@PreAuthorize
(
"@ss.hasPermission('bpm:task:query')"
)
...
...
@@ -100,12 +107,22 @@ public class BpmTaskController {
//先校验流程是否同一类,然后批量审批
//String jsonStr = JsonUtils.toJsonString(BpmList);
//JsonUtils.SaveLog("参数为:"+jsonStr);
long
id
=
getLoginUserId
();
long
id
=
getLoginUserId
();
for
(
BpmTaskApproveReqVO
ReqVO
:
BpmList
)
{
List
<
BpmTaskRespVO
>
taskList
=
taskService
.
getTaskListByProcessInstanceId
(
ReqVO
.
getId
());
if
(
taskList
.
size
()>
0
)
{
String
sid
=
taskList
.
get
(
0
).
getId
();
//查询当前用户的待办任务
List
<
BpmTaskExtDO
>
taskList1
=
taskExtMapper
.
selectListByProcessInstanceId
(
ReqVO
.
getId
());
if
(
taskList1
==
null
||
taskList1
.
size
()
==
0
)
continue
;
List
<
BpmTaskExtDO
>
taskList
=
taskList1
.
stream
().
filter
(
t
->
t
.
getAssigneeUserId
()
==
id
).
sorted
(
Comparator
.
comparingLong
(
BpmTaskExtDO:
:
getId
).
reversed
()).
collect
(
Collectors
.
toList
());
if
(
taskList
==
null
)
continue
;
if
(
taskList
.
size
()
>
0
)
{
String
sid
=
taskList
.
get
(
0
).
getTaskId
();
ReqVO
.
setId
(
sid
);
//String jsonStr = JsonUtils.toJsonString(ReqVO);
//JsonUtils.SaveLog("参数为:"+jsonStr);
...
...
@@ -124,13 +141,20 @@ public class BpmTaskController {
@PreAuthorize
(
"@ss.hasPermission('bpm:task:update')"
)
public
CommonResult
<
Boolean
>
rejectTask2
(
@Valid
@RequestBody
List
<
BpmTaskRejectReqVO
>
BpmList
)
{
//先校验流程是否同一类,然后批量审批
LoginUser
l
=
SecurityFrameworkUtils
.
getLoginUser
();
LoginUser
l
=
SecurityFrameworkUtils
.
getLoginUser
();
for
(
BpmTaskRejectReqVO
reqVO
:
BpmList
)
{
List
<
BpmTaskRespVO
>
taskList
=
taskService
.
getTaskListByProcessInstanceId
(
reqVO
.
getId
());
if
(
taskList
.
size
()>
0
)
{
String
sid
=
taskList
.
get
(
0
).
getId
();
List
<
BpmTaskExtDO
>
taskList1
=
taskExtMapper
.
selectListByProcessInstanceId
(
reqVO
.
getId
());
if
(
taskList1
==
null
||
taskList1
.
size
()
==
0
)
continue
;
List
<
BpmTaskExtDO
>
taskList
=
taskList1
.
stream
().
filter
(
t
->
t
.
getAssigneeUserId
()
==
l
.
getId
()).
sorted
(
Comparator
.
comparingLong
(
BpmTaskExtDO:
:
getId
).
reversed
()).
collect
(
Collectors
.
toList
());
if
(
taskList
==
null
)
continue
;
if
(
taskList
.
size
()
>
0
)
{
String
sid
=
taskList
.
get
(
0
).
getTaskId
();
reqVO
.
setId
(
sid
);
taskService
.
rejectTask
(
l
,
reqVO
);
}
...
...
@@ -144,7 +168,7 @@ public class BpmTaskController {
@Idempotent
(
timeout
=
5
)
@PreAuthorize
(
"@ss.hasPermission('bpm:task:update')"
)
public
CommonResult
<
Boolean
>
rejectTask
(
@Valid
@RequestBody
BpmTaskRejectReqVO
reqVO
)
{
BpmTaskRejectReqVO
reqVO
)
{
taskService
.
rejectTask
(
SecurityFrameworkUtils
.
getLoginUser
(),
reqVO
);
return
success
(
true
);
}
...
...
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
View file @
13545881
...
...
@@ -222,7 +222,8 @@ public class BpmTaskServiceImpl implements BpmTaskService {
@Override
public
List
<
BpmTaskRespVO
>
getTaskListByProcessInstanceId
(
String
processInstanceId
)
{
// 获得任务列表
List
<
HistoricTaskInstance
>
tasks
=
historyService
.
createHistoricTaskInstanceQuery
()
List
<
HistoricTaskInstance
>
tasks
=
historyService
.
createHistoricTaskInstanceQuery
()
.
processInstanceId
(
processInstanceId
)
.
orderByHistoricTaskInstanceStartTime
().
desc
()
// 创建时间倒序
.
list
();
...
...
@@ -231,7 +232,9 @@ public class BpmTaskServiceImpl implements BpmTaskService {
}
// 获得 TaskExtDO Map
List
<
BpmTaskExtDO
>
bpmTaskExtDOs
=
taskExtMapper
.
selectListByTaskIds
(
convertSet
(
tasks
,
HistoricTaskInstance:
:
getId
));
List
<
BpmTaskExtDO
>
bpmTaskExtDOs
=
taskExtMapper
.
selectListByTaskIds
(
convertSet
(
tasks
,
HistoricTaskInstance:
:
getId
));
Map
<
String
,
BpmTaskExtDO
>
bpmTaskExtDOMap
=
convertMap
(
bpmTaskExtDOs
,
BpmTaskExtDO:
:
getTaskId
);
// 获得 ProcessInstance Map
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/EcwVzController.java
View file @
13545881
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
controller
.
admin
;
import
cn.iocoder.yudao.framework.apollo.core.event.Customer.ReceiveCustomerCalTypeEvent
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVz
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVzPageReq
;
...
...
@@ -8,9 +9,13 @@ import cn.iocoder.yudao.module.delivery.listener.TestEvent;
import
cn.iocoder.yudao.module.delivery.service.EcwVzService
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.module.delivery.service.OrderServiceExt
;
import
cn.iocoder.yudao.module.delivery.service.ZTestService
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO
;
import
cn.iocoder.yudao.module.order.service.order.OrderService
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -22,6 +27,7 @@ import javax.validation.*;
import
io.swagger.v3.oas.annotations.Operation
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -44,6 +50,12 @@ public class EcwVzController {
@Resource
private
ZTestService
zTestService
;
@Autowired
private
OrderService
orderService
;
@Resource
private
OrderServiceExt
orderServiceExt
;
@Resource
private
ApplicationContext
applicationContext
;
...
...
@@ -144,10 +156,25 @@ public class EcwVzController {
applicationContext.publishEvent(even);
*/
zTest
m
=
new
zTest
();
m
.
setTestname
(
"111"
);
m
.
setCreatedate
(
new
Date
());
zTestService
.
save
(
m
);
zTest
m
=
new
zTest
();
orderService
.
UpdateOrderYeJiType
((
long
)
1
,
1
);
orderService
.
UpdateOrderVValue
((
long
)
1
,
new
BigDecimal
(
101
),
new
Date
());
ReceiveCustomerCalTypeEvent
e
=
new
ReceiveCustomerCalTypeEvent
();
e
.
setCustomerId
((
long
)
49345
);
if
(
orderServiceExt
.
IsHavingOrder
(
e
)
==
0
)
{
m
.
setTestname
(
"无业绩"
);
m
.
setCreatedate
(
new
Date
());
zTestService
.
save
(
m
);
}
else
{
m
.
setTestname
(
"有业绩"
);
m
.
setCreatedate
(
new
Date
());
zTestService
.
save
(
m
);
}
return
success
(
true
);
}
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/listener/CalculateCustomerType.java
View file @
13545881
...
...
@@ -3,6 +3,7 @@ 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
cn.iocoder.yudao.module.delivery.entity.deptex.zTest
;
import
cn.iocoder.yudao.module.delivery.service.OrderServiceExt
;
import
cn.iocoder.yudao.module.delivery.service.ZTestService
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -26,6 +27,10 @@ public class CalculateCustomerType {
@Resource
private
ZTestService
zTestService
;
@Resource
private
OrderServiceExt
orderServiceExt
;
/**
* 客户捞取监听事件 lanbm 2024-05-07 add
* @param event
...
...
@@ -34,7 +39,7 @@ public class CalculateCustomerType {
public
void
CalculateCustomerTypePushEvent
(
CalculateCustomerTypeEvent
event
)
{
zTest
m
=
new
zTest
();
String
sMsg
=
"计算开始"
;
String
sMsg
=
"计算开始"
+
event
.
getCustomerId
()
;
if
(
event
.
getNewCustomerService
()
==
event
.
getOldCustomerService
())
{
//新客户经理和老客户经理是同一客户经理
//继续判断有无成交记录
...
...
@@ -72,9 +77,13 @@ public class CalculateCustomerType {
1.线索2.意向3.成交
*/
private
boolean
isHaving_TransactionRecords
(
CalculateCustomerTypeEvent
event
)
{
if
(
event
.
getStatus
()
==
3
)
return
true
;
else
int
c
=
orderServiceExt
.
IsHavingOrder
(
event
)
;
if
(
c
==
0
)
return
false
;
else
return
true
;
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/listener/CalculateOrderYeJiTypeListener.java
View file @
13545881
...
...
@@ -45,7 +45,7 @@ public class CalculateOrderYeJiTypeListener {
CalculateOrderYeJiTypeEvent
event
)
{
zTest
m
=
new
zTest
();
String
sMsg
=
"计算业绩类型"
;
String
sMsg
=
"计算业绩类型"
+
event
.
getCustomerId
()
;
OrderDO
orderDO
=
orderService
.
getById
(
event
.
getOrderId
());
if
(
orderDO
==
null
)
{
...
...
@@ -74,6 +74,5 @@ public class CalculateOrderYeJiTypeListener {
m
.
setCreatedate
(
new
Date
());
zTestService
.
save
(
m
);
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/listener/ReceiveCustomerCalTypeListener.java
View file @
13545881
...
...
@@ -39,7 +39,7 @@ public class ReceiveCustomerCalTypeListener {
//CustomerServiceImpl receiveCustomer 函数中触发,移交,系统分配,接收时判断
//CustomerServiceImpl updateCustomer 函数中触发,完善客户信息
zTest
m
=
new
zTest
();
String
sMsg
=
"接收客户"
;
String
sMsg
=
"接收客户"
+
event
.
getCustomerId
()
;
if
(
event
.
getIsNew
()
==
true
)
{
//移交接收前是新客户
sMsg
+=
",新客户"
;
...
...
@@ -67,11 +67,10 @@ public class ReceiveCustomerCalTypeListener {
/*
判断客户是否有已入参订单
select COUNT(id) from ecw_target_log where deleted = 0 and customer_id = 17442
需要在2个表中查询数据
*/
private
boolean
IsHavingRuCanOrder
(
ReceiveCustomerCalTypeEvent
event
)
{
//判断客户是否有已入参订单
//int a = orderServiceExt.IsHavingOrderConsignee(event);//收货方客户
//int b = orderServiceExt.IsHavingOrderConsignor(event);//发货方客户
int
c
=
orderServiceExt
.
IsHavingOrder
(
event
);
if
(
c
==
0
)
return
false
;
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/mapper/OrderExtMapper.java
View file @
13545881
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
mapper
;
import
cn.iocoder.yudao.framework.apollo.core.event.Customer.CalculateCustomerTypeEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.Customer.ReceiveCustomerCalTypeEvent
;
import
cn.iocoder.yudao.module.delivery.entity.orderdata.OrderExt
;
import
org.apache.ibatis.annotations.Mapper
;
...
...
@@ -21,4 +22,6 @@ public interface OrderExtMapper {
*/
int
IsHavingOrder
(
ReceiveCustomerCalTypeEvent
event
);
int
IsHavingOrder
(
CalculateCustomerTypeEvent
event
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/Impl/OrderServiceExtImpl.java
View file @
13545881
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
.
Impl
;
import
cn.iocoder.yudao.framework.apollo.core.event.Customer.CalculateCustomerTypeEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.Customer.ReceiveCustomerCalTypeEvent
;
import
cn.iocoder.yudao.module.delivery.entity.orderdata.OrderExt
;
import
cn.iocoder.yudao.module.delivery.mapper.OrderExtMapper
;
...
...
@@ -38,4 +39,8 @@ public class OrderServiceExtImpl implements OrderServiceExt {
return
orderExtMapper
.
IsHavingOrder
(
event
);
}
public
int
IsHavingOrder
(
CalculateCustomerTypeEvent
event
)
{
return
orderExtMapper
.
IsHavingOrder
(
event
);
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/OrderServiceExt.java
View file @
13545881
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
;
import
cn.iocoder.yudao.framework.apollo.core.event.Customer.CalculateCustomerTypeEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.Customer.ReceiveCustomerCalTypeEvent
;
//import cn.iocoder.yudao.module.delivery.entity.orderdata.OrderExt;
...
...
@@ -24,4 +25,6 @@ public interface OrderServiceExt {
*/
int
IsHavingOrder
(
ReceiveCustomerCalTypeEvent
event
);
int
IsHavingOrder
(
CalculateCustomerTypeEvent
event
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/resources/mapper/OrderExtMapper.xml
View file @
13545881
...
...
@@ -28,10 +28,17 @@
<select
id=
"IsHavingOrder"
resultType=
"java.lang.Integer"
>
select COUNT(id)
from ecw_target_log
where deleted = 0
and customer_id = #{customerId}
SELECT COUNT(*)
from (
select id as id
from ecw_target_log
where deleted = 0
and customer_id = #{customerId}
UNION
SELECT order_id as id
from ecw_order
where deleted = 0
and customer_id = #{customerId}) as a
</select>
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/resources/mapper/SalesReportMapper.xml
View file @
13545881
This diff is collapsed.
Click to expand it.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dal/mysql/order/OrderMapper.java
View file @
13545881
...
...
@@ -6003,7 +6003,8 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
lanbm 2024-05-13 add
*/
@Update
(
"update ecw_order set yeji_type=#{yejiType} where order_id = #{orderId}"
)
void
UpdateOrderYeJiType
(
@Param
(
"orderId"
)
Long
orderId
,
int
yejiType
);
void
UpdateOrderYeJiType
(
@Param
(
"orderId"
)
Long
orderId
,
@Param
(
"yejiType"
)
int
yejiType
);
/*
...
...
@@ -6011,8 +6012,9 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
yeji_create_date 业绩产生时间
简单的SQL语句用SQL注解来写比较方便
*/
@Update
(
"update ecw_order set cal_v_value=#{yejiType},yeji_create_date=#{yejiCreateDate} where order_id = #{orderId}"
)
void
UpdateOrderVValue
(
@Param
(
"orderId"
)
Long
orderId
,
BigDecimal
calVvalue
,
Date
yejiCreateDate
);
@Update
(
"update ecw_order set cal_v_value=#{calVvalue},yeji_create_date=#{yejiCreateDate} where order_id = #{orderId}"
)
void
UpdateOrderVValue
(
@Param
(
"orderId"
)
Long
orderId
,
@Param
(
"calVvalue"
)
BigDecimal
calVvalue
,
@Param
(
"yejiCreateDate"
)
Date
yejiCreateDate
);
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderServiceImpl.java
View file @
13545881
...
...
@@ -5,8 +5,8 @@ import cn.hutool.core.date.DateUtil;
import
cn.hutool.core.util.StrUtil
;
import
cn.iocoder.yudao.framework.apollo.core.dto.OrderDto
;
import
cn.iocoder.yudao.framework.apollo.core.event.*
;
//
import cn.iocoder.yudao.framework.apollo.core.event.Order.CalculateOrderVValueEvent;
//
import cn.iocoder.yudao.framework.apollo.core.event.Order.CalculateOrderYeJiTypeEvent;
import
cn.iocoder.yudao.framework.apollo.core.event.Order.CalculateOrderVValueEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.Order.CalculateOrderYeJiTypeEvent
;
import
cn.iocoder.yudao.framework.common.enums.UserTypeEnum
;
import
cn.iocoder.yudao.framework.common.util.bigDecimal.BigDecimalUtils
;
import
cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO
;
...
...
@@ -420,11 +420,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderBusinessService
.
addOrderOperateLog
(
order
.
getOrderId
(),
"新建订单"
,
null
);
//lanbm 2024-04-13 修改,在创建完订单号,计算订单业绩类型
/*
CalculateOrderYeJiTypeEvent
even
=
new
CalculateOrderYeJiTypeEvent
();
even
.
setOrderId
(
order
.
getOrderId
());
applicationContext
.
publishEvent
(
even
);
*/
// 返回
return
order
;
}
...
...
@@ -1667,19 +1665,16 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
"编辑订单"
,
null
);
//lanbm 2024-04-13 修改,在创建完订单号,计算订单业绩类型
/*
Long orderId = updateReqVO.getOrderId();
Long
orderId
=
updateReqVO
.
getOrderId
();
CalculateOrderYeJiTypeEvent
even
=
new
CalculateOrderYeJiTypeEvent
();
even
.
setOrderId
(
orderId
);
applicationContext
.
publishEvent
(
even
);
*/
//end lanbm 2024-04-13 修改,在创建完订单号,计算订单业绩类型
//入仓完成,计算V值 lanbm 2024-05-13 add
/*
CalculateOrderVValueEvent
event
=
new
CalculateOrderVValueEvent
();
event
.
setOrderId
(
updateObj
.
getOrderId
());
applicationContext.publishEvent(event);
*/
applicationContext
.
publishEvent
(
event
);
//end 入仓完成,计算V值 lanbm 2024-05-13 add
}
...
...
@@ -3365,7 +3360,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
receivableService
.
verificationReceivableIsWriteOff
(
orderDO
.
getOrderId
(),
null
);
List
<
OrderItemDO
>
orderItemDOList
=
orderItemMapper
.
selectList
(
new
LambdaQueryWrapper
<
OrderItemDO
>().
eq
(
OrderItemDO:
:
getOrderId
,
orderDO
.
getOrderId
()));
List
<
OrderItemInWarehouseVO
>
orderItemInWarehouseVOList
=
orderWarehouseInVO
.
getOrderItemInWarehouseVOList
();
List
<
OrderItemInWarehouseVO
>
orderItemInWarehouseVOList
=
orderWarehouseInVO
.
getOrderItemInWarehouseVOList
();
if
(
CollectionUtil
.
isNotEmpty
(
orderItemInWarehouseVOList
)
&&
CollectionUtil
.
isNotEmpty
(
orderItemDOList
))
{
orderItemInWarehouseVOList
.
forEach
(
vo
->
{
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
View file @
13545881
...
...
@@ -303,12 +303,14 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
createOrderWarehouseIn
(
@Valid
OrderWarehouseInCreateReqVO
createReqVO
)
{
public
boolean
createOrderWarehouseIn
(
@Valid
OrderWarehouseInCreateReqVO
createReqVO
)
{
Long
orderId
=
createReqVO
.
getOrderId
();
Long
brand
=
createReqVO
.
getBrand
();
Long
orderItemId
=
createReqVO
.
getOrderItemId
();
List
<
OrderWarehouseInItemDto
>
orderWarehouseInItemDoList
=
createReqVO
.
getOrderWarehouseInItemDoList
();
List
<
OrderWarehouseInItemDto
>
orderWarehouseInItemDoList
=
createReqVO
.
getOrderWarehouseInItemDoList
();
// 非下单货物,请求中包含
String
prodTitleZh
=
createReqVO
.
getProdTitleZh
();
...
...
@@ -355,7 +357,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
}
// 若已经存在入仓纪录,则就是追加。
List
<
OrderWarehouseInDO
>
orderWarehouseInDOS
=
orderWarehouseInMapper
.
selectList
(
new
LambdaQueryWrapperX
<
OrderWarehouseInDO
>()
List
<
OrderWarehouseInDO
>
orderWarehouseInDOS
=
orderWarehouseInMapper
.
selectList
(
new
LambdaQueryWrapperX
<
OrderWarehouseInDO
>()
.
eq
(
OrderWarehouseInDO:
:
getOrderId
,
orderId
).
eq
(
OrderWarehouseInDO:
:
getOrderItemId
,
orderItemId
));
boolean
isAppend
=
CollectionUtil
.
isNotEmpty
(
orderWarehouseInDOS
);
...
...
@@ -452,8 +455,13 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
* @param isUpdateWarehouseProdAttrIds
* @return 返回订单项id
*/
private
Long
doSaveOrUpdateOrderWarehouseInDo
(
OrderWarehouseInCreateReqVO
createReqVO
,
Long
orderId
,
Long
orderItemId
,
OrderDO
orderDO
,
List
<
String
>
pictureUrls
,
boolean
isDeleteNotInWarehouseIn
,
boolean
isUpdateWarehouseProdAttrIds
)
{
private
Long
doSaveOrUpdateOrderWarehouseInDo
(
OrderWarehouseInCreateReqVO
createReqVO
,
Long
orderId
,
Long
orderItemId
,
OrderDO
orderDO
,
List
<
String
>
pictureUrls
,
boolean
isDeleteNotInWarehouseIn
,
boolean
isUpdateWarehouseProdAttrIds
)
{
//lanbm 2024-05-21 添加注释
boolean
isAddNewOrderItem
=
createReqVO
.
getType
()
!=
0
;
OrderItemDO
orderItemDO
;
...
...
@@ -2656,7 +2664,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
updateReqVO.getPictureUrls(),
false,
true);*/
//对明细做修改
this
.
doSaveOrUpdateOrderWarehouseInDo
(
orderWarehouseInCreateReqVO
,
orderId
,
orderItemId
,
orderDO
,
updateReqVO
.
getPictureUrls
(),
...
...
yudao-module-shipment/yudao-module-shipment-rest/src/main/java/cn/iocoder/yudao/module/shipment/controller/admin/BoxPreloadGoodsController.java
View file @
13545881
...
...
@@ -293,6 +293,7 @@ public class BoxPreloadGoodsController {
@ApiOperation
(
"下载预装单"
)
@ApiImplicitParam
(
name
=
"shipmentId"
,
value
=
"出货单ID"
,
required
=
true
,
example
=
"20"
,
dataTypeClass
=
Long
.
class
)
public
CommonResult
<
String
>
downloadPreloadGoodsList
(
@RequestParam
(
"shipmentId"
)
Long
shipmentId
,
HttpServletResponse
response
)
throws
Exception
{
//预装单 lanbm 2024-05-22 处理问题
BoxDO
box
=
boxService
.
getBox
(
shipmentId
);
FileMakeReqDTO
reqDTO
=
new
FileMakeReqDTO
();
JSONObject
jsonObject
=
new
JSONObject
();
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/downloadLog/DownloadLogServiceImpl.java
View file @
13545881
...
...
@@ -273,6 +273,7 @@ public class DownloadLogServiceImpl extends AbstractService<DownloadLogMapper, D
break
;
// ......不同类型的文件制作
case
SHIPMENT_PRELOAD_EXCEL_EXPORT:
//预装单导出 lanbm 2024-05-22 添加注释
shipmentPreloadExcelExportPushEvent
(
downloadLog
);
break
;
//异常订单导出
...
...
@@ -339,9 +340,11 @@ public class DownloadLogServiceImpl extends AbstractService<DownloadLogMapper, D
shipmentSummeryExcelExportPushEvent
(
downloadLog
);
break
;
case
SHIPMENT_SEA_PRELOAD_EXCEL_EXPORT:
//海运预装单导出,lanbm 2024-05-22 添加注释
shipmentSeaPreloadExcelExportPushEvent
(
downloadLog
);
break
;
case
SHIPMENT_AIR_LOAD_EXCEL_EXPORT:
//空运预装单 lanbm 2024-05-22 添加注释
shipmentAirLoadExcelExportPushEvent
(
downloadLog
);
break
;
case
ACHIEVEMENT_DETAIL_EXCEL_EXPORT:
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/payable/PayableServiceImpl.java
View file @
13545881
...
...
@@ -100,7 +100,9 @@ public class PayableServiceImpl extends AbstractService<PayableMapper, PayableDO
}
@Override
public
PageResult
<
PayableOrderBackVo
>
getPayablePage
(
PayableQueryVO
query
,
PageVO
page
)
{
public
PageResult
<
PayableOrderBackVo
>
getPayablePage
(
PayableQueryVO
query
,
PageVO
page
)
{
List
<
AdminUserDO
>
ListUser
=
adminUserService
.
getUsersList
();
Map
<
Long
,
String
>
userMap
=
ListUser
.
stream
().
collect
(
...
...
@@ -118,6 +120,48 @@ public class PayableServiceImpl extends AbstractService<PayableMapper, PayableDO
queryWrapper
.
eq
(
StringUtils
.
isNotBlank
(
query
.
getTransportId
()),
"a.transport_id"
,
query
.
getTransportId
());
queryWrapper
.
eq
(
StringUtils
.
isNotBlank
(
query
.
getDepartureId
()),
"a.start_warehouse_id"
,
query
.
getDepartureId
());
queryWrapper
.
eq
(
StringUtils
.
isNotBlank
(
query
.
getObjectiveId
()),
"a.dest_warehouse_id"
,
query
.
getObjectiveId
());
//lanbm 2024-05-22 添加的查询条件
if
(
query
.
getBeginCreateTime
()
!=
null
&&
query
.
getEndCreateTime
()
!=
null
)
{
if
(
query
.
getDateType
()
==
1
)
{
//预装时间,
queryWrapper
.
between
(
"b.yz_date"
,
query
.
getBeginCreateTime
(),
query
.
getEndCreateTime
());
}
else
if
(
query
.
getDateType
()
==
2
)
{
//装柜时间,
queryWrapper
.
between
(
"b.zg_date"
,
query
.
getBeginCreateTime
(),
query
.
getEndCreateTime
());
}
else
if
(
query
.
getDateType
()
==
3
)
{
//起运时间
queryWrapper
.
between
(
"b.qy_date"
,
query
.
getBeginCreateTime
(),
query
.
getEndCreateTime
());
}
else
if
(
query
.
getDateType
()
==
4
)
{
//到港时间
queryWrapper
.
between
(
"b.dg_date"
,
query
.
getBeginCreateTime
(),
query
.
getEndCreateTime
());
}
else
if
(
query
.
getDateType
()
==
5
)
{
//清关时间
queryWrapper
.
between
(
"b.qg_date"
,
query
.
getBeginCreateTime
(),
query
.
getEndCreateTime
());
}
else
if
(
query
.
getDateType
()
==
6
)
{
//卸柜时间
queryWrapper
.
between
(
"b.th_date"
,
query
.
getBeginCreateTime
(),
query
.
getEndCreateTime
());
}
else
if
(
query
.
getDateType
()
==
7
)
{
//费用产生时间
queryWrapper
.
between
(
"a.freecsdate"
,
query
.
getBeginCreateTime
(),
query
.
getEndCreateTime
());
}
}
//queryWrapper.between()
payableMapper
.
selectListPage
(
mpPage
,
queryWrapper
);
//lanbm 2024-05-17 add
...
...
@@ -129,22 +173,18 @@ public class PayableServiceImpl extends AbstractService<PayableMapper, PayableDO
v
.
setTransportTypeName
(
"专线空运"
);
}
String
sCreator
=
""
;
if
(
v
.
getCreator
()==
null
)
{
String
sCreator
=
""
;
if
(
v
.
getCreator
()
==
null
)
{
v
.
setCreator
(
""
);
}
else
{
long
l
=
Long
.
parseLong
(
v
.
getCreator
());
}
else
{
long
l
=
Long
.
parseLong
(
v
.
getCreator
());
v
.
setCreator
(
userMap
.
get
(
l
));
}
if
(
v
.
getUpdater
()==
null
)
{
if
(
v
.
getUpdater
()
==
null
)
{
v
.
setUpdater
(
""
);
}
else
{
long
l
=
Long
.
parseLong
(
v
.
getUpdater
());
}
else
{
long
l
=
Long
.
parseLong
(
v
.
getUpdater
());
v
.
setUpdater
(
userMap
.
get
(
l
));
}
}
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/payable/PayableQueryVO.java
View file @
13545881
...
...
@@ -8,6 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import
java.util.Date
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
@Data
...
...
@@ -76,11 +77,11 @@ public class PayableQueryVO {
@ApiModelProperty
(
value
=
"发票号"
)
private
String
invoiceNumber
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
_HOUR_MINUTE_SECOND
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
@ApiModelProperty
(
value
=
"开始创建时间"
)
private
Date
beginCreateTime
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
_HOUR_MINUTE_SECOND
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
@ApiModelProperty
(
value
=
"结束创建时间"
)
private
Date
endCreateTime
;
...
...
@@ -100,4 +101,9 @@ public class PayableQueryVO {
@ApiModelProperty
(
value
=
"客户名称"
)
private
String
customerName
;
/*
时间节点查询类型
*/
private
int
dateType
;
}
yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/payable/PayableMapper.xml
View file @
13545881
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.iocoder.yudao.module.wealth.dal.mysql.payable.PayableMapper"
>
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
<select
id=
"selectListPage"
resultType=
"cn.iocoder.yudao.module.wealth.vo.payable.PayableOrderBackVo"
>
select a.*,b.shipment_status_air as shipmentStatusAir,
b.shipment_status as shipmentStatus
select a.*,
b.shipment_status_air as shipmentStatusAir,
b.shipment_status as shipmentStatus
from ecw_payable a
left join ecw_box b on a.payable_no =b.self_no and b.deleted=
0
left join ecw_box b on a.payable_no = b.self_no and b.deleted =
0
${ew.customSqlSegment}
</select>
</mapper>
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