| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | |
| | | import com.core.common.*; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.result.WrkTraceVo; |
| | | 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; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | |
| | | @Slf4j |
| | |
| | | private LocDetlService locDetlService; |
| | | @Autowired |
| | | private MatService matService; |
| | | @Autowired |
| | | private OrderServiceImpl orderService; |
| | | |
| | | @RequestMapping(value = "/orderLog/nav/list/auth") |
| | | @ManagerAuth |
| | |
| | | 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); |
| | |
| | | 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") |
| | |
| | | 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)); |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 文件上传,关闭单据 |
| | | */ |
| | | @PostMapping("/order/close") |
| | | @ResponseBody |
| | | @ManagerAuth |
| | | public R upload(MultipartFile file) throws IOException { |
| | | EasyExcel.read(file.getInputStream(), ExcelOrder.class, new CloseOrderReadListener(orderService)).sheet().doRead(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |