| | |
| | | package com.zy.asrs.wms.asrs.controller;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.metadata.IPage;
|
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
| | | import com.zy.asrs.framework.common.Cools;
|
| | | import com.zy.asrs.framework.common.R;
|
| | | import com.zy.asrs.wms.asrs.entity.OrderDetl;
|
| | | import com.zy.asrs.wms.common.annotation.CacheData;
|
| | | import com.zy.asrs.wms.common.annotation.OperationLog;
|
| | | import com.zy.asrs.wms.common.domain.BaseParam;
|
| | |
| | | import org.springframework.web.bind.annotation.*;
|
| | |
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Arrays;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.*;
|
| | |
|
| | | @RestController
|
| | | @RequestMapping("/api")
|
| | |
| | | @PostMapping("/orderDetlLog/page")
|
| | | @CacheData(tableName = {"man_order_detl_log"})
|
| | | public R page(@RequestBody Map<String, Object> map) {
|
| | | BaseParam baseParam = buildParam(map, BaseParam.class);
|
| | | PageParam<OrderDetlLog, BaseParam> pageParam = new PageParam<>(baseParam, OrderDetlLog.class);
|
| | | return R.ok().add(orderDetlLogService.page(pageParam, pageParam.buildWrapper(true)));
|
| | | if (!Objects.isNull(map.get("orderType"))) {
|
| | | BaseParam baseParam = buildParam(map, BaseParam.class);
|
| | | PageParam<OrderDetl, BaseParam> pageParam = new PageParam<>(baseParam, OrderDetl.class);
|
| | | QueryWrapper<OrderDetl> queryWrapper = pageParam.buildWrapper(true);
|
| | | IPage<OrderDetl> detls = orderDetlLogService.pageByType(pageParam, queryWrapper);
|
| | | return R.ok().add(detls);
|
| | | } else {
|
| | | BaseParam baseParam = buildParam(map, BaseParam.class);
|
| | | PageParam<OrderDetlLog, BaseParam> pageParam = new PageParam<>(baseParam, OrderDetlLog.class);
|
| | | return R.ok().add(orderDetlLogService.page(pageParam, pageParam.buildWrapper(true)));
|
| | | }
|
| | | }
|
| | |
|
| | | @PreAuthorize("hasAuthority('asrs:orderDetlLog:list')")
|