| | |
| | | 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.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.ManLocDetl; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | |
| | | import com.zy.asrs.service.OrderDetlService; |
| | | import com.zy.asrs.service.OrderService; |
| | | import com.zy.asrs.service.PakoutService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.system.entity.User; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | |
| | | EntityWrapper<Pakout> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | |
| | | User user = getUser(); |
| | | if (user.getRoleId() != 2 || user.getRoleId() != 24) { |
| | | wrapper.eq("create_by", user.getId()); |
| | | } |
| | | |
| | | |
| | | |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(pakoutService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | wrapper.eq(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | |
| | | @RequestMapping(value = "/pakout/delete/auth") |
| | | @ManagerAuth(memo = "手动删除订单") |
| | | public R delete(@RequestParam String docNum){ |
| | | pakoutService.deletePakout(docNum); |
| | | try{ |
| | | pakoutService.deletePakout(docNum); |
| | | }catch (Exception e){ |
| | | return R.error(e+""); |
| | | } |
| | | return R.ok("拣货单删除成功"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pakout/deleteDetl/auth") |
| | | @ManagerAuth(memo = "手动删除订单") |
| | | public R deleteDetl(@RequestParam String wrkNo){ |
| | | try{ |
| | | pakoutService.deletePakoutByWrkNo(wrkNo); |
| | | }catch (Exception e){ |
| | | return R.error(e+""); |
| | | } |
| | | return R.ok("拣货单删除成功"); |
| | | } |
| | | |