From aa221b6b6c3939130c78e4219207d14ce877ff30 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期三, 06 八月 2025 15:57:34 +0800
Subject: [PATCH] 1
---
src/main/java/com/zy/asrs/controller/OrderLogController.java | 51 +++++++++++++++++++++++++--------------------------
1 files changed, 25 insertions(+), 26 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/OrderLogController.java b/src/main/java/com/zy/asrs/controller/OrderLogController.java
index bbbad84..237e355 100644
--- a/src/main/java/com/zy/asrs/controller/OrderLogController.java
+++ b/src/main/java/com/zy/asrs/controller/OrderLogController.java
@@ -12,7 +12,6 @@
import com.zy.asrs.excel.CloseOrderReadListener;
import com.zy.asrs.excel.ExcelOrder;
import com.zy.asrs.service.*;
-import com.zy.asrs.service.impl.OrderServiceImpl;
import com.zy.common.web.BaseController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
@@ -45,12 +44,13 @@
private LocDetlService locDetlService;
@Autowired
private MatService matService;
+
@Autowired
- private OrderServiceImpl orderService;
+ private OrderService orderService;
@RequestMapping(value = "/orderLog/nav/list/auth")
@ManagerAuth
- public R navList(@RequestParam(required = false) String orderNo) {
+ public R navList(@RequestParam(required = false) String orderNo){
EntityWrapper<OrderLog> wrapper = new EntityWrapper<>();
if (!Cools.isEmpty(orderNo)) {
wrapper.like("order_no", orderNo);
@@ -78,17 +78,15 @@
@RequestMapping(value = "/orderLog/head/page/auth")
@ManagerAuth
- public R head(@RequestParam(defaultValue = "1") Integer curr,
- @RequestParam(defaultValue = "10") Integer limit,
- @RequestParam(required = false) String orderByField,
- @RequestParam(required = false) String orderByType,
- @RequestParam Map<String, Object> param) {
+ public R head(@RequestParam(defaultValue = "1")Integer curr,
+ @RequestParam(defaultValue = "10")Integer limit,
+ @RequestParam(required = false)String orderByField,
+ @RequestParam(required = false)String orderByType,
+ @RequestParam Map<String, Object> param){
EntityWrapper<OrderLog> wrapper = new EntityWrapper<>();
excludeTrash(param);
convert(param, wrapper);
- if (!Cools.isEmpty(orderByField)) {
- wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
- } else {
+ if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else {
wrapper.orderBy("settle").orderBy("create_time", false);
}
wrapper.eq("status", 1);
@@ -97,9 +95,12 @@
@RequestMapping(value = "/orderLog/detl/all/auth")
@ManagerAuth
- public R head(@RequestParam Long orderId) {
+ public R head(@RequestParam Long orderId){
return R.ok().add(orderDetlLogService.selectList(new EntityWrapper<OrderDetlLog>().eq("order_id", orderId)));
}
+
+
+
@PostMapping(value = "/orderLog/wrk/trace/auth")
@@ -181,24 +182,22 @@
@RequestMapping(value = "/orderLog/list/auth")
@ManagerAuth
- public R list(@RequestParam(defaultValue = "1") Integer curr,
- @RequestParam(defaultValue = "10") Integer limit,
- @RequestParam(required = false) String orderByField,
- @RequestParam(required = false) String orderByType,
- @RequestParam Map<String, Object> param) {
+ public R list(@RequestParam(defaultValue = "1")Integer curr,
+ @RequestParam(defaultValue = "10")Integer limit,
+ @RequestParam(required = false)String orderByField,
+ @RequestParam(required = false)String orderByType,
+ @RequestParam Map<String, Object> param){
EntityWrapper<OrderLog> wrapper = new EntityWrapper<>();
excludeTrash(param);
convert(param, wrapper);
- if (!Cools.isEmpty(orderByField)) {
- wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
- }
+ if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
return R.ok(orderLogService.selectPage(new Page<>(curr, limit), wrapper));
}
- private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper) {
- for (Map.Entry<String, Object> entry : map.entrySet()) {
+ private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){
+ for (Map.Entry<String, Object> entry : map.entrySet()){
String val = String.valueOf(entry.getValue());
- if (val.contains(RANGE_TIME_LINK)) {
+ if (val.contains(RANGE_TIME_LINK)){
String[] dates = val.split(RANGE_TIME_LINK);
wrapper.ge(entry.getKey(), DateUtils.convert(dates[0]));
wrapper.le(entry.getKey(), DateUtils.convert(dates[1]));
@@ -211,7 +210,7 @@
@RequestMapping(value = "/orderLog/export/auth")
@ManagerAuth
- public R export(@RequestBody JSONObject param) {
+ public R export(@RequestBody JSONObject param){
EntityWrapper<OrderLog> wrapper = new EntityWrapper<>();
List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
Map<String, Object> map = excludeTrash(param.getJSONObject("order"));
@@ -227,7 +226,7 @@
wrapper.like("id", condition);
Page<OrderLog> page = orderLogService.selectPage(new Page<>(0, 10), wrapper);
List<Map<String, Object>> result = new ArrayList<>();
- for (OrderLog order : page.getRecords()) {
+ for (OrderLog order : page.getRecords()){
Map<String, Object> map = new HashMap<>();
map.put("id", order.getId());
map.put("value", order.getOrderNo());
@@ -240,7 +239,7 @@
@ManagerAuth
public R query(@RequestBody JSONObject param) {
Wrapper<OrderLog> wrapper = new EntityWrapper<OrderLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
- if (null != orderLogService.selectOne(wrapper)) {
+ if (null != orderLogService.selectOne(wrapper)){
return R.parse(BaseRes.REPEAT).add(getComment(Order.class, String.valueOf(param.get("key"))));
}
return R.ok();
--
Gitblit v1.9.1