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
48c7f5ff
Commit
48c7f5ff
authored
Nov 04, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提供刷新全部到仓订单数据接口
parent
f3d601b3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
0 deletions
+43
-0
OrderWarehouseCheckService.java
...rvice/orderWarehouseCheck/OrderWarehouseCheckService.java
+5
-0
OrderWarehouseCheckServiceImpl.java
...e/orderWarehouseCheck/OrderWarehouseCheckServiceImpl.java
+25
-0
OrderWarehouseCheckController.java
...in/orderWarehouseCheck/OrderWarehouseCheckController.java
+13
-0
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseCheck/OrderWarehouseCheckService.java
View file @
48c7f5ff
...
...
@@ -50,4 +50,9 @@ public interface OrderWarehouseCheckService extends IService<OrderWarehouseCheck
* @param updates 更新详情
*/
void
update
(
OrderWarehouseCheckUpdateReqVO
checkUpdateReqVO
);
/**
* 所有符合条件的订单全部强制到仓
*/
void
allForce
();
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseCheck/OrderWarehouseCheckServiceImpl.java
View file @
48c7f5ff
...
...
@@ -5,6 +5,7 @@ import cn.hutool.core.date.DateUtil;
import
cn.iocoder.yudao.framework.common.exception.ServiceException
;
import
cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil
;
import
cn.iocoder.yudao.framework.mybatis.core.service.AbstractService
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
import
cn.iocoder.yudao.module.depository.dal.dataobject.warehouse.WarehouseAreaDO
;
import
cn.iocoder.yudao.module.depository.dal.dataobject.warehouse.WarehouseAreaPositionDO
;
...
...
@@ -13,12 +14,15 @@ import cn.iocoder.yudao.module.depository.dal.mysql.warehouse.WarehouseAreaPosit
import
cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseCheck.OrderWarehouseCheckDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseIn.OrderWarehouseInDO
;
import
cn.iocoder.yudao.module.order.dal.mysql.order.OrderMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderWarehouseCheck.OrderWarehouseCheckMapper
;
import
cn.iocoder.yudao.module.order.enums.ErrorCodeConstants
;
import
cn.iocoder.yudao.module.order.service.order.OrderBusinessService
;
import
cn.iocoder.yudao.module.order.service.order.OrderItemService
;
import
cn.iocoder.yudao.module.order.service.order.OrderLocationService
;
import
cn.iocoder.yudao.module.order.service.orderWarehouseIn.OrderWarehouseInService
;
import
cn.iocoder.yudao.module.order.vo.order.OrderBackPageVO
;
import
cn.iocoder.yudao.module.order.vo.order.OrderQueryVO
;
import
cn.iocoder.yudao.module.order.vo.order.WarehouseCheckInfoVO
;
import
cn.iocoder.yudao.module.order.vo.order.WarehouseInInfoVO
;
import
cn.iocoder.yudao.module.order.vo.orderItem.OrderItemCheckWarehouseVO
;
...
...
@@ -29,7 +33,9 @@ import cn.iocoder.yudao.module.order.vo.orderWarehouseCheck.OrderWarehouseCheckU
import
cn.iocoder.yudao.module.order.vo.orderWarehouseCheck.OrderWarehouseCheckUpdateReqVO
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.jetbrains.annotations.NotNull
;
...
...
@@ -54,6 +60,9 @@ public class OrderWarehouseCheckServiceImpl
@Autowired
private
OrderBusinessService
orderBusinessService
;
@Autowired
private
OrderMapper
orderMapper
;
@Autowired
private
OrderWarehouseInService
orderWarehouseInService
;
@Autowired
...
...
@@ -167,6 +176,22 @@ public class OrderWarehouseCheckServiceImpl
check
(
orderId
);
}
@Override
public
void
allForce
()
{
OrderQueryVO
queryVO
=
new
OrderQueryVO
();
queryVO
.
setInWarehouseState
(
218
);
long
allCount
=
orderMapper
.
orderCount
(
queryVO
);
int
size
=
1000
;
int
start
=
0
;
while
(
start
<=
allCount
)
{
List
<
OrderBackPageVO
>
list
=
orderMapper
.
orderList
(
start
,
size
,
queryVO
);
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
list
.
stream
().
map
(
OrderBackPageVO:
:
getOrderId
).
forEach
(
this
::
check
);
}
start
+=
size
;
}
}
@Override
public
void
update
(
OrderWarehouseCheckUpdateReqVO
checkUpdateReqVO
)
{
Map
<
Long
,
OrderWarehouseCheckDO
>
mappings
=
listByOrderItemId
(
checkUpdateReqVO
.
getOrderItemId
()).
stream
()
...
...
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/orderWarehouseCheck/OrderWarehouseCheckController.java
View file @
48c7f5ff
package
cn
.
iocoder
.
yudao
.
module
.
order
.
controller
.
admin
.
orderWarehouseCheck
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseCheck.OrderWarehouseCheckDO
;
import
cn.iocoder.yudao.module.order.service.order.OrderQueryService
;
import
cn.iocoder.yudao.module.order.service.orderWarehouseCheck.OrderWarehouseCheckService
;
import
cn.iocoder.yudao.module.order.vo.order.OrderQueryVO
;
import
cn.iocoder.yudao.module.order.vo.orderWarehouseCheck.OrderWarehouseCheckUpdateReqVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
...
...
@@ -25,6 +28,8 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
public
class
OrderWarehouseCheckController
{
@Autowired
private
OrderWarehouseCheckService
service
;
@Autowired
private
OrderQueryService
orderQueryService
;
@GetMapping
(
"/query"
)
@ApiOperation
(
"到仓查询"
)
...
...
@@ -55,4 +60,12 @@ public class OrderWarehouseCheckController {
service
.
update
(
req
);
return
success
(
true
);
}
@PutMapping
(
"/all/force"
)
@ApiOperation
(
"全部强制到仓(紧刷新数据处理)"
)
public
CommonResult
<
Boolean
>
allForce
()
{
service
.
allForce
();
return
success
(
true
);
}
}
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