| | |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.OrderDomainParam; |
| | | import com.zy.asrs.entity.result.OrderPakoutMainVo; |
| | | import com.zy.asrs.entity.result.WrkTraceVo; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.model.DetlDto; |
| | |
| | | EntityWrapper<OrderPakout> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else { |
| | | wrapper.orderBy("settle").orderBy("create_time", false); |
| | | if (!Cools.isEmpty(orderByField)){ |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } else { |
| | | wrapper.orderBy("update_time", false); |
| | | } |
| | | wrapper.eq("status", 1); |
| | | return R.ok(orderService.selectPage(new Page<>(curr, limit), wrapper)); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/order/delete/auth") |
| | | @ManagerAuth(memo = "手动删除订单") |
| | | @ManagerAuth(memo = "手动删除计划组货单") |
| | | @Transactional |
| | | public R delete(@RequestParam Long orderId){ |
| | | orderService.remove(orderId); |
| | |
| | | // throw new CoolException("删除订单失败"); |
| | | // } |
| | | // orderDetlService.modifyStatus(orderId, 0); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/order/abandoned/auth") |
| | | @ManagerAuth(memo = "手动废弃计划组货单") |
| | | @Transactional |
| | | public R abandoned(@RequestParam Long orderId){ |
| | | orderService.updateSettle(orderId,99L,getUserId()); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<OrderPakout> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else { |
| | | wrapper.orderBy("settle").orderBy("create_time", false); |
| | | |
| | | try{ |
| | | String itemName = null; |
| | | String cstmrName = null; |
| | | Integer settle = null; |
| | | Integer status = null; |
| | | Date modiTimeStart = null, modiTimeEnd = null; |
| | | for (Map.Entry<String, Object> entry : param.entrySet()) { |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (Cools.isEmpty(val)) { |
| | | continue; |
| | | } |
| | | if (val.contains(RANGE_TIME_LINK)) { |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | modiTimeStart = DateUtils.convert(dates[0]); |
| | | modiTimeEnd = DateUtils.convert(dates[1]); |
| | | } else if (entry.getKey().equals("settle")) { |
| | | settle = Integer.parseInt(val); |
| | | } else if (entry.getKey().equals("status")) { |
| | | status = Integer.parseInt(val); |
| | | } |
| | | // else if (entry.getKey().equals("order_no")) { |
| | | // orderNo = val; |
| | | // } |
| | | else if (entry.getKey().equals("item_name")) { |
| | | itemName = val; |
| | | } else if (entry.getKey().equals("cstmr_name")) { |
| | | cstmrName = val; |
| | | } |
| | | } |
| | | List<OrderPakoutMainVo> orderPakoutMainVos = orderService.selectOrderPakoutMainVoList(itemName, cstmrName, settle, status, modiTimeStart, modiTimeEnd, curr, limit); |
| | | Page<OrderPakoutMainVo> page = new Page<OrderPakoutMainVo>(curr, limit).setRecords(orderPakoutMainVos); |
| | | page.setTotal(orderService.selectOrderPakoutMainVoListTotal(itemName, cstmrName, settle, status, modiTimeStart, modiTimeEnd)); |
| | | return R.ok(page); |
| | | } catch (Exception e){ |
| | | |
| | | } |
| | | wrapper.eq("status", 1); |
| | | return R.ok(orderService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | return R.error(); |
| | | } |
| | | |
| | | |
| | | } |