From d763f91da2dee979ac6825569cf61e9f8816d0fe Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期二, 12 十一月 2024 14:32:34 +0800 Subject: [PATCH] Revert "#" --- src/main/java/com/zy/asrs/controller/OrderDetlController.java | 49 ++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 42 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/OrderDetlController.java b/src/main/java/com/zy/asrs/controller/OrderDetlController.java index 2e40bd2..86b40f3 100644 --- a/src/main/java/com/zy/asrs/controller/OrderDetlController.java +++ b/src/main/java/com/zy/asrs/controller/OrderDetlController.java @@ -1,28 +1,42 @@ package com.zy.asrs.controller; -import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.mapper.Wrapper; import com.baomidou.mybatisplus.plugins.Page; -import com.core.common.DateUtils; -import com.zy.asrs.entity.OrderDetl; -import com.zy.asrs.service.OrderDetlService; import com.core.annotations.ManagerAuth; import com.core.common.BaseRes; import com.core.common.Cools; +import com.core.common.DateUtils; import com.core.common.R; +import com.zy.asrs.entity.OrderDetl; +import com.zy.asrs.mapper.OrderDetlMapper; +import com.zy.asrs.service.OrderDetlService; import com.zy.common.web.BaseController; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import java.util.*; +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; @RestController public class OrderDetlController extends BaseController { @Autowired private OrderDetlService orderDetlService; + + @Resource + private OrderDetlMapper orderDetlMapper; + + @PostMapping("/orderDetl/list/pda/auth") + public R getPdaOrderDetl(@RequestBody Map<String,Object> map) { + EntityWrapper<OrderDetl> wrapper = new EntityWrapper<>(); + wrapper.eq("order_no", map.get("orderNo")); + return R.ok(orderDetlService.selectList(wrapper)); + } @RequestMapping(value = "/orderDetl/{id}/auth") @ManagerAuth @@ -40,8 +54,20 @@ EntityWrapper<OrderDetl> wrapper = new EntityWrapper<>(); excludeTrash(param); convert(param, wrapper); - if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} - return R.ok(orderDetlService.selectPage(new Page<>(curr, limit), wrapper)); + if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else { + wrapper.orderBy("create_time", false); + } + wrapper.eq("status", 1); + Page<OrderDetl> orderDetlPage = orderDetlService.selectPage(new Page<>(curr, limit), wrapper); + return R.ok(orderDetlPage); + } + + @RequestMapping(value = "/orderDetl/pakout/list/auth") + @ManagerAuth + public R pakoutList(@RequestParam(defaultValue = "1")Integer curr, + @RequestParam(defaultValue = "10")Integer limit, + @RequestParam Map<String, Object> param){ + return R.ok(orderDetlService.getPakoutPage(toPage(curr, limit, param, OrderDetl.class))); } private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ @@ -120,4 +146,13 @@ return R.ok(); } + @RequestMapping(value = "/orderDetl/getPrintDetl/{id}") + @ManagerAuth + public R getPrintDetl(@PathVariable("id") Integer id) { + if (Cools.isEmpty(id)) { + return R.parse("id涓虹┖"); + } + return R.ok(orderDetlMapper.selectPrintData(id)); + } + } -- Gitblit v1.9.1